Module: TestHelpers::SMSGlobal
- Defined in:
- lib/action_sms_gateways/connection_adapters/test_helpers/sms_global.rb
Instance Method Summary collapse
- #sample_delivery_receipt(options = {}) ⇒ Object
- #sample_delivery_response(options = {}) ⇒ Object
- #sample_incoming_sms(options = {}) ⇒ Object
- #sample_message_id ⇒ Object
Instance Method Details
#sample_delivery_receipt(options = {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/action_sms_gateways/connection_adapters/test_helpers/sms_global.rb', line 26 def sample_delivery_receipt( = {}) [:message_id] ||= "6942744494999745" [:status] ||= "DELIVRD" [:error] ||= "000" [:date] ||= "1005132312" { "msgid"=> [:message_id], "dlrstatus"=> [:status], "dlr_err"=> [:error], "donedate"=> [:date] } end |
#sample_delivery_response(options = {}) ⇒ Object
18 19 20 |
# File 'lib/action_sms_gateways/connection_adapters/test_helpers/sms_global.rb', line 18 def sample_delivery_response( = {}) [:failed] ? "ERROR: No action requested" : "OK: 0; Sent queued message ID: 86b1a945370734f4 SMSGlobalMsgID:6942744494999745" end |
#sample_incoming_sms(options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/action_sms_gateways/connection_adapters/test_helpers/sms_global.rb', line 3 def sample_incoming_sms( = {}) [:message] ||= "Endia kasdf ofeao" [:to] ||= "61447100308" [:from] ||= "61447100399" [:date] ||= "2010-05-13 23:59:11" params = { "to" => [:to], "from" => [:from], "msg"=> [:message], "date" => [:date] } params.merge!("userfield" => @config[:authentication_key]) unless [:authentic] == false params end |
#sample_message_id ⇒ Object
22 23 24 |
# File 'lib/action_sms_gateways/connection_adapters/test_helpers/sms_global.rb', line 22 def "SMSGlobalMsgID:6942744494999745" end |