Class: Inttegro::Resources::Broadcasts

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

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ Broadcasts

Returns a new instance of Broadcasts.



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

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

Instance Method Details

#cancel(broadcast_id:) ⇒ Object



17
18
19
20
21
# File 'lib/inttegro/resources/broadcasts.rb', line 17

def cancel(broadcast_id:)
  @http.post_resource("/broadcasts/cancel", Inttegro::BroadcastCancelDetail, :broadcast,
    { broadcast_id: broadcast_id }
  )
end

#lookup(broadcast_id:) ⇒ Object



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

def lookup(broadcast_id:)
  @http.post_resource("/broadcasts/lookup", Inttegro::BroadcastDetail, :broadcast,
    { broadcast_id: broadcast_id }
  )
end