Class: Redox::Request::Scheduling

Inherits:
Object
  • Object
show all
Defined in:
lib/redox/request/scheduling.rb

Constant Summary collapse

CREATE_META =
Redox::Models::Meta.new(EventType: 'New', DataModel: 'Scheduling')
CANCEL_META =
Redox::Models::Meta.new(EventType: 'Cancel', DataModel: 'Scheduling')
RESCHEDULE_META =
Redox::Models::Meta.new(EventType: 'Reschedule', DataModel: 'Scheduling')
MODIFICATION_META =
Redox::Models::Meta.new(EventType: 'Modification', DataModel: 'Scheduling')

Class Method Summary collapse

Class Method Details

.cancel(model, meta: Redox::Models::Meta.new) ⇒ Object



14
15
16
17
# File 'lib/redox/request/scheduling.rb', line 14

def self.cancel(model, meta: Redox::Models::Meta.new)
  meta = CANCEL_META.merge(meta)
  return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(model, meta))))
end

.create(model, meta: Redox::Models::Meta.new) ⇒ Object



9
10
11
12
# File 'lib/redox/request/scheduling.rb', line 9

def self.create(model, meta: Redox::Models::Meta.new)
  meta = CREATE_META.merge(meta)
  return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(model, meta))))
end

.modification(model, meta: Redox::Models::Meta.new) ⇒ Object



24
25
26
27
# File 'lib/redox/request/scheduling.rb', line 24

def self.modification(model, meta: Redox::Models::Meta.new)
  meta = MODIFICATION_META.merge(meta)
  return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(model, meta))))
end

.reschedule(model, meta: Redox::Models::Meta.new) ⇒ Object



19
20
21
22
# File 'lib/redox/request/scheduling.rb', line 19

def self.reschedule(model, meta: Redox::Models::Meta.new)
  meta = RESCHEDULE_META.merge(meta)
  return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(model, meta))))
end