Class: ValdeMaximus::Conduit
- Inherits:
-
Object
- Object
- ValdeMaximus::Conduit
- Defined in:
- lib/valdemaximus-conduit.rb
Instance Method Summary collapse
- #add_phone_numbers(phone_numbers, lazy = true) ⇒ Object
-
#initialize(p = {}) ⇒ Conduit
constructor
A new instance of Conduit.
- #send_message(body, list, node_id = '') ⇒ Object
- #status_of_phone_number(phone_number, date = nil) ⇒ Object
- #status_of_phone_numbers(phone_numbers, date = nil) ⇒ Object
Constructor Details
#initialize(p = {}) ⇒ Conduit
Returns a new instance of Conduit.
10 11 12 |
# File 'lib/valdemaximus-conduit.rb', line 10 def initialize(p={}) assign_properties(p) end |
Instance Method Details
#add_phone_numbers(phone_numbers, lazy = true) ⇒ Object
18 19 20 |
# File 'lib/valdemaximus-conduit.rb', line 18 def add_phone_numbers(phone_numbers, lazy=true) send('/phone_numbers', 'phone_number[]' => phone_numbers, :lazy => lazy.to_s) end |
#send_message(body, list, node_id = '') ⇒ Object
14 15 16 |
# File 'lib/valdemaximus-conduit.rb', line 14 def (body, list, node_id='') send('/messages', :body => body, :node_id => node_id.to_s, 'to[]' => list) end |
#status_of_phone_number(phone_number, date = nil) ⇒ Object
26 27 28 |
# File 'lib/valdemaximus-conduit.rb', line 26 def status_of_phone_number(phone_number, date=nil) get("/phone_numbers/#{phone_number}") end |
#status_of_phone_numbers(phone_numbers, date = nil) ⇒ Object
22 23 24 |
# File 'lib/valdemaximus-conduit.rb', line 22 def status_of_phone_numbers(phone_numbers, date=nil) get('/phone_numbers', {'phone_number[]' => phone_numbers, :date => date}) end |