Class: Inttegro::Resources::Chimes

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

Instance Method Summary collapse

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

#send(payload) ⇒ Object



11
12
13
# File 'lib/inttegro/resources/chimes.rb', line 11

def send(payload)
  @http.post_resource("/chimes/send", Inttegro::Chime, :chime, payload)
end