Class: Inttegro::Resources::Schedules

Inherits:
Object
  • Object
show all
Defined in:
lib/inttegro/resources/schedules.rb

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ Schedules

Returns a new instance of Schedules.



7
8
9
# File 'lib/inttegro/resources/schedules.rb', line 7

def initialize(http)
  @http = T.let(http, Inttegro::HTTPClient)
end

Instance Method Details

#cancel(schedule_id:) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/inttegro/resources/schedules.rb', line 19

def cancel(schedule_id:)
  @http.post_resource(
    "/schedules/cancel",
    Inttegro::ScheduleCancelDetail, :scheduled_chime,
    { schedule_id: schedule_id }
  )
end

#lookup(schedule_id:) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/inttegro/resources/schedules.rb', line 11

def lookup(schedule_id:)
  @http.post_resource(
    "/schedules/lookup",
    Inttegro::ScheduleDetail, :scheduled_chime,
    { schedule_id: schedule_id }
  )
end