Class: Responsys::Api::Object::Recipient
- Inherits:
-
Object
- Object
- Responsys::Api::Object::Recipient
- Includes:
- Responsys::Api::Object
- Defined in:
- lib/responsys/api/object/recipient.rb
Instance Attribute Summary collapse
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#email_address ⇒ Object
Returns the value of attribute email_address.
-
#email_format ⇒ Object
Returns the value of attribute email_format.
-
#list_name ⇒ Object
Returns the value of attribute list_name.
-
#mobile_number ⇒ Object
Returns the value of attribute mobile_number.
-
#recipient_id ⇒ Object
Returns the value of attribute recipient_id.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Recipient
constructor
A new instance of Recipient.
- #to_api ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Recipient
Returns a new instance of Recipient.
8 9 10 11 12 13 14 15 |
# File 'lib/responsys/api/object/recipient.rb', line 8 def initialize( = {}) @list_name = [:listName] || InteractObject.new("", "") @recipient_id = [:recipientId] || "" @customer_id = [:customerId] || "" @email_address = [:emailAddress] || "" @mobile_number = [:mobileNumber] || "" @email_format = [:emailFormat] || EmailFormat.new end |
Instance Attribute Details
#customer_id ⇒ Object
Returns the value of attribute customer_id.
6 7 8 |
# File 'lib/responsys/api/object/recipient.rb', line 6 def customer_id @customer_id end |
#email_address ⇒ Object
Returns the value of attribute email_address.
6 7 8 |
# File 'lib/responsys/api/object/recipient.rb', line 6 def email_address @email_address end |
#email_format ⇒ Object
Returns the value of attribute email_format.
6 7 8 |
# File 'lib/responsys/api/object/recipient.rb', line 6 def email_format @email_format end |
#list_name ⇒ Object
Returns the value of attribute list_name.
6 7 8 |
# File 'lib/responsys/api/object/recipient.rb', line 6 def list_name @list_name end |
#mobile_number ⇒ Object
Returns the value of attribute mobile_number.
6 7 8 |
# File 'lib/responsys/api/object/recipient.rb', line 6 def mobile_number @mobile_number end |
#recipient_id ⇒ Object
Returns the value of attribute recipient_id.
6 7 8 |
# File 'lib/responsys/api/object/recipient.rb', line 6 def recipient_id @recipient_id end |
Instance Method Details
#to_api ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/responsys/api/object/recipient.rb', line 17 def to_api { listName: @list_name.to_api, recipientId: @recipient_id.to_i, customerId: @customer_id.to_s, emailAddress: @email_address.to_s, mobileNumber: @mobile_number.to_s, emailFormat: @email_format.to_api } end |