Class: Smartsend::Address
- Inherits:
-
Object
- Object
- Smartsend::Address
- Defined in:
- lib/smartsend/address.rb
Instance Attribute Summary collapse
-
#address_line1 ⇒ Object
Returns the value of attribute address_line1.
-
#address_line2 ⇒ Object
Returns the value of attribute address_line2.
-
#city ⇒ Object
Returns the value of attribute city.
-
#company ⇒ Object
Returns the value of attribute company.
-
#country ⇒ Object
Returns the value of attribute country.
-
#email ⇒ Object
Returns the value of attribute email.
-
#internal_id ⇒ Object
Returns the value of attribute internal_id.
-
#internal_reference ⇒ Object
Returns the value of attribute internal_reference.
-
#name_line1 ⇒ Object
Returns the value of attribute name_line1.
-
#name_line2 ⇒ Object
Returns the value of attribute name_line2.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#sms ⇒ Object
Returns the value of attribute sms.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Address
constructor
A new instance of Address.
- #serialize ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Address
Returns a new instance of Address.
6 7 8 9 10 |
# File 'lib/smartsend/address.rb', line 6 def initialize(args={}) args.each do |k, v| instance_variable_set "@#{k}", v end end |
Instance Attribute Details
#address_line1 ⇒ Object
Returns the value of attribute address_line1.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def address_line1 @address_line1 end |
#address_line2 ⇒ Object
Returns the value of attribute address_line2.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def address_line2 @address_line2 end |
#city ⇒ Object
Returns the value of attribute city.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def city @city end |
#company ⇒ Object
Returns the value of attribute company.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def company @company end |
#country ⇒ Object
Returns the value of attribute country.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def country @country end |
#email ⇒ Object
Returns the value of attribute email.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def email @email end |
#internal_id ⇒ Object
Returns the value of attribute internal_id.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def internal_id @internal_id end |
#internal_reference ⇒ Object
Returns the value of attribute internal_reference.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def internal_reference @internal_reference end |
#name_line1 ⇒ Object
Returns the value of attribute name_line1.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def name_line1 @name_line1 end |
#name_line2 ⇒ Object
Returns the value of attribute name_line2.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def name_line2 @name_line2 end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def postal_code @postal_code end |
#sms ⇒ Object
Returns the value of attribute sms.
2 3 4 |
# File 'lib/smartsend/address.rb', line 2 def sms @sms end |
Instance Method Details
#serialize ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/smartsend/address.rb', line 12 def serialize { :internal_id => internal_id, :internal_reference => internal_reference, :company => company, :name_line1 => name_line1, :name_line2 => name_line2, :address_line1 => address_line1, :address_line2 => address_line2, :postal_code => postal_code, :city => city, :country => country, :sms => sms, :email => email } end |