Module: EventMachine::Smsified::ReportingModule
Instance Method Summary collapse
-
#delivery_status(options, &blk) ⇒ Object
Get the delivery status of an outstanding SMS request.
-
#retrieve_sms(message_id, &blk) ⇒ Object
Retrieve a single SMS.
-
#search_sms(query_string, &blk) ⇒ Object
Retrieve multiple SMS messages based on a query string.
Instance Method Details
#delivery_status(options, &blk) ⇒ Object
Get the delivery status of an outstanding SMS request
14 15 16 17 18 19 20 21 |
# File 'lib/em-smsified/reporting.rb', line 14 def delivery_status(, &blk) raise ArgumentError, 'an options Hash is required' if !.instance_of?(Hash) raise ArgumentError, ':sender_address is required' if [:sender_address].nil? && @sender_address.nil? [:sender_address] = [:sender_address] || @sender_address get("/smsmessaging/outbound/#{options[:sender_address]}/requests/#{options[:request_id]}/deliveryInfos", SMSIFIED_HTTP_HEADERS, &blk) end |
#retrieve_sms(message_id, &blk) ⇒ Object
Retrieve a single SMS
30 31 32 |
# File 'lib/em-smsified/reporting.rb', line 30 def retrieve_sms(, &blk) get("/messages/#{message_id}", SMSIFIED_HTTP_HEADERS, &blk) end |
#search_sms(query_string, &blk) ⇒ Object
Retrieve multiple SMS messages based on a query string
41 42 43 |
# File 'lib/em-smsified/reporting.rb', line 41 def search_sms(query_string, &blk) get("/messages?#{query_string}", SMSIFIED_HTTP_HEADERS, &blk) end |