Class: Inttegro::Resources::Chimes
- Inherits:
-
Object
- Object
- Inttegro::Resources::Chimes
- Defined in:
- lib/inttegro/resources/chimes.rb
Instance Method Summary collapse
- #broadcast(payload) ⇒ Object
-
#initialize(http) ⇒ Chimes
constructor
A new instance of Chimes.
- #lookup(chime_id:) ⇒ Object
- #page(payload = {}) ⇒ Object
- #schedule(payload) ⇒ Object
- #send(payload) ⇒ Object
Constructor Details
#initialize(http) ⇒ Chimes
Returns a new instance of Chimes.
7 8 9 |
# File 'lib/inttegro/resources/chimes.rb', line 7 def initialize(http) @http = T.let(http, Inttegro::HTTPClient) end |
Instance Method Details
#broadcast(payload) ⇒ Object
27 28 29 |
# File 'lib/inttegro/resources/chimes.rb', line 27 def broadcast(payload) @http.post_resource("/chimes/broadcast", Inttegro::BroadcastCreationDetail, :broadcast, payload) end |
#lookup(chime_id:) ⇒ Object
15 16 17 |
# File 'lib/inttegro/resources/chimes.rb', line 15 def lookup(chime_id:) @http.post_resource("/chimes/lookup", Inttegro::Chime, :chime, { chime_id: chime_id }) end |
#page(payload = {}) ⇒ Object
19 20 21 |
# File 'lib/inttegro/resources/chimes.rb', line 19 def page(payload = {}) @http.post_resource("/chimes/page", Inttegro::ChimePage, :page, payload || {}) end |
#schedule(payload) ⇒ Object
23 24 25 |
# File 'lib/inttegro/resources/chimes.rb', line 23 def schedule(payload) @http.post_resource("/chimes/schedule", Inttegro::ScheduleCreationDetail, :scheduled_chime, payload) end |