Class: RMC::Item::Schedule

Inherits:
Object
  • Object
show all
Defined in:
lib/rmc/item/schedule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection, data) ⇒ Schedule

Returns a new instance of Schedule.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/rmc/item/schedule.rb', line 27

def initialize(connection, data)
  @connection = connection

  @id = data['id']
  @name = data['name']
  @status = data['status']

  @frequency = data['frequency']
  @recur = data['recur']
  @startTime = data['startTime']
  @month = data['month']
  @year = data['year']

  @dayofweek = data['dayofweek']
  @dayofmonth = data['dayofmonth']

  @nextRunTime = data['nextRunTime']

  @appType = data['appType']
  @resourceCategory = data['resourceCategory']
  @resourceList = data['resourceList']
end

Instance Attribute Details

#appTypeObject (readonly)

Returns the value of attribute appType.



23
24
25
# File 'lib/rmc/item/schedule.rb', line 23

def appType
  @appType
end

#connectionObject

Returns the value of attribute connection.



6
7
8
# File 'lib/rmc/item/schedule.rb', line 6

def connection
  @connection
end

#dayofmonthObject (readonly)

Returns the value of attribute dayofmonth.



19
20
21
# File 'lib/rmc/item/schedule.rb', line 19

def dayofmonth
  @dayofmonth
end

#dayofweekObject (readonly)

Returns the value of attribute dayofweek.



18
19
20
# File 'lib/rmc/item/schedule.rb', line 18

def dayofweek
  @dayofweek
end

#frequencyObject (readonly)

Returns the value of attribute frequency.



12
13
14
# File 'lib/rmc/item/schedule.rb', line 12

def frequency
  @frequency
end

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/rmc/item/schedule.rb', line 8

def id
  @id
end

#monthObject (readonly)

Returns the value of attribute month.



15
16
17
# File 'lib/rmc/item/schedule.rb', line 15

def month
  @month
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/rmc/item/schedule.rb', line 9

def name
  @name
end

#nextRunTimeObject (readonly)

Returns the value of attribute nextRunTime.



21
22
23
# File 'lib/rmc/item/schedule.rb', line 21

def nextRunTime
  @nextRunTime
end

#recurObject (readonly)

Returns the value of attribute recur.



13
14
15
# File 'lib/rmc/item/schedule.rb', line 13

def recur
  @recur
end

#resourceCategoryObject (readonly)

Returns the value of attribute resourceCategory.



24
25
26
# File 'lib/rmc/item/schedule.rb', line 24

def resourceCategory
  @resourceCategory
end

#resourceListObject (readonly)

Returns the value of attribute resourceList.



25
26
27
# File 'lib/rmc/item/schedule.rb', line 25

def resourceList
  @resourceList
end

#startTimeObject (readonly)

Returns the value of attribute startTime.



14
15
16
# File 'lib/rmc/item/schedule.rb', line 14

def startTime
  @startTime
end

#statusObject (readonly)

Returns the value of attribute status.



10
11
12
# File 'lib/rmc/item/schedule.rb', line 10

def status
  @status
end

#yearObject (readonly)

Returns the value of attribute year.



16
17
18
# File 'lib/rmc/item/schedule.rb', line 16

def year
  @year
end

Instance Method Details

#deleteObject



50
51
52
53
54
55
# File 'lib/rmc/item/schedule.rb', line 50

def delete
  @connection.request(
      :url => "/schedule-jobs/#{@id}",
      :method => :delete,
  )
end