Module: BurstSms::ListsAddRecipient
- Included in:
- API
- Defined in:
- lib/burstsms/lists_add_recipient.rb
Defined Under Namespace
Classes: Response
Instance Method Summary collapse
- #add_list_recipient(list_id, mobile, options = {}) ⇒ Object
- #add_list_recipient_body(list_id, mobile, options = {}) ⇒ Object
Instance Method Details
#add_list_recipient(list_id, mobile, options = {}) ⇒ Object
6 7 8 9 |
# File 'lib/burstsms/lists_add_recipient.rb', line 6 def add_list_recipient(list_id, mobile, ={}) response = post_to_api(add_list_recipient_body(list_id, mobile, )) Response.parse(response.body) end |
#add_list_recipient_body(list_id, mobile, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/burstsms/lists_add_recipient.rb', line 11 def add_list_recipient_body(list_id, mobile, ={}) build_request("contact-lists.add-recipient", :mobile => mobile, :list_id => list_id, :firstname => (.has_key?(:firstname) ? [:firstname] : nil), :lastname => (.has_key?(:lastname) ? [:lastname] : nil), :mobile_dest_country => (.has_key?(:mobile_dest_country) ? [:mobile_dest_country] : nil) ) end |