Module: BurstSms::MessagesAdd
- Included in:
- API
- Defined in:
- lib/burstsms/messages_add.rb
Defined Under Namespace
Classes: Response
Instance Method Summary collapse
- #add_message(from, list_id, message, options = {}) ⇒ Object
- #add_message_body(from, list_id, message, options = {}) ⇒ Object
Instance Method Details
#add_message(from, list_id, message, options = {}) ⇒ Object
6 7 8 9 |
# File 'lib/burstsms/messages_add.rb', line 6 def (from, list_id, , ={}) @response = post_to_api((from, list_id, , )) Response.parse(@response.body) end |
#add_message_body(from, list_id, message, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/burstsms/messages_add.rb', line 11 def (from, list_id, , ={}) build_request("messages.add", :list_id => list_id, :caller_id => check_valid_sender(from), :message => encode_msg(), :sendtime => (.has_key?(:sendtime) ? [:sendtime] : nil), :validity => (.has_key?(:validity) ? [:validity] : nil), :contact_list => (.has_key?(:contact_list) ? [:contact_list] : nil) ) end |