Class: Twizo::SmsParams
- Defined in:
- lib/twizo/modules/params/sms_params.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#callback_url ⇒ Object
Returns the value of attribute callback_url.
-
#dcs ⇒ Object
Returns the value of attribute dcs.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#recipients ⇒ Object
Returns the value of attribute recipients.
-
#result_type ⇒ Object
Returns the value of attribute result_type.
-
#scheduled_delivery ⇒ Object
Returns the value of attribute scheduled_delivery.
-
#sender ⇒ Object
Returns the value of attribute sender.
-
#sender_npi ⇒ Object
Returns the value of attribute sender_npi.
-
#sender_ton ⇒ Object
Returns the value of attribute sender_ton.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#udh ⇒ Object
Returns the value of attribute udh.
-
#validity ⇒ Object
Returns the value of attribute validity.
Instance Method Summary collapse
Methods inherited from Params
#format_input, #format_to_array
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def body @body end |
#callback_url ⇒ Object
Returns the value of attribute callback_url.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def callback_url @callback_url end |
#dcs ⇒ Object
Returns the value of attribute dcs.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def dcs @dcs end |
#pid ⇒ Object
Returns the value of attribute pid.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def pid @pid end |
#recipients ⇒ Object
Returns the value of attribute recipients.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def recipients @recipients end |
#result_type ⇒ Object
Returns the value of attribute result_type.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def result_type @result_type end |
#scheduled_delivery ⇒ Object
Returns the value of attribute scheduled_delivery.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def scheduled_delivery @scheduled_delivery end |
#sender ⇒ Object
Returns the value of attribute sender.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def sender @sender end |
#sender_npi ⇒ Object
Returns the value of attribute sender_npi.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def sender_npi @sender_npi end |
#sender_ton ⇒ Object
Returns the value of attribute sender_ton.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def sender_ton @sender_ton end |
#tag ⇒ Object
Returns the value of attribute tag.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def tag @tag end |
#udh ⇒ Object
Returns the value of attribute udh.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def udh @udh end |
#validity ⇒ Object
Returns the value of attribute validity.
7 8 9 |
# File 'lib/twizo/modules/params/sms_params.rb', line 7 def validity @validity end |
Instance Method Details
#to_json(send_advanced = nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/twizo/modules/params/sms_params.rb', line 9 def to_json(send_advanced = nil) json = { :recipients => format_to_array(recipients), :body => body, :sender => sender, :senderTon => sender_ton, :senderNpi => sender_npi, :pid => pid, :scheduledDelivery => scheduled_delivery, :tag => tag, :validity => validity, :resultType => result_type, :callbackUrl => callback_url, } if send_advanced json[:dcs] = dcs json[:udh] = udh end json.to_json end |