Class: Inttegro::Resources::Schedules
- Inherits:
-
Object
- Object
- Inttegro::Resources::Schedules
- Defined in:
- lib/inttegro/resources/schedules.rb
Overview
Client for observing and canceling scheduled Chimes.
Access this resource through Client#schedules.
Instance Method Summary collapse
-
#cancel(schedule_id:) ⇒ Inttegro::Schedule::CancelDetail
Request cancellation of a Chime schedule that has not won its execution race.
-
#initialize(http) ⇒ Schedules
constructor
A new instance of Schedules.
-
#lookup(schedule_id:) ⇒ Inttegro::Schedule::Detail
Retrieve one scheduled Chime.
Constructor Details
#initialize(http) ⇒ Schedules
Returns a new instance of Schedules.
11 12 13 |
# File 'lib/inttegro/resources/schedules.rb', line 11 def initialize(http) @http = T.let(http, Inttegro::HTTPClient) end |
Instance Method Details
#cancel(schedule_id:) ⇒ Inttegro::Schedule::CancelDetail
Request cancellation of a Chime schedule that has not won its execution race.
31 32 33 34 35 36 37 |
# File 'lib/inttegro/resources/schedules.rb', line 31 def cancel(schedule_id:) @http.post_resource( "/schedules/cancel", Inttegro::Schedule::CancelDetail, :scheduled_chime, { schedule_id: schedule_id } ) end |
#lookup(schedule_id:) ⇒ Inttegro::Schedule::Detail
Retrieve one scheduled Chime.
19 20 21 22 23 24 25 |
# File 'lib/inttegro/resources/schedules.rb', line 19 def lookup(schedule_id:) @http.post_resource( "/schedules/lookup", Inttegro::Schedule::Detail, :scheduled_chime, { schedule_id: schedule_id } ) end |