Class: DHL::Ecommerce::StandardAddress
- Defined in:
- lib/dhl/ecommerce/standard_address.rb
Instance Attribute Summary collapse
-
#address_1 ⇒ Object
Returns the value of attribute address_1.
-
#address_2 ⇒ Object
Returns the value of attribute address_2.
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#firm ⇒ Object
Returns the value of attribute firm.
-
#name ⇒ Object
Returns the value of attribute name.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ StandardAddress
constructor
A new instance of StandardAddress.
Constructor Details
#initialize(attributes = {}) ⇒ StandardAddress
Returns a new instance of StandardAddress.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/dhl/ecommerce/standard_address.rb', line 6 def initialize(attributes = {}) super attributes unless attributes.empty? @name = attributes[:contact] if attributes[:contact] @name = attributes[:recipient] if attributes[:recipient] @firm = attributes[:account_name] if attributes[:account_name] @firm = attributes[:pickup_name] if attributes[:pickup_name] @address_1 = attributes[:address1] if attributes[:address1] @address_2 = attributes[:address2] if attributes[:address2] end end |
Instance Attribute Details
#address_1 ⇒ Object
Returns the value of attribute address_1.
4 5 6 |
# File 'lib/dhl/ecommerce/standard_address.rb', line 4 def address_1 @address_1 end |
#address_2 ⇒ Object
Returns the value of attribute address_2.
4 5 6 |
# File 'lib/dhl/ecommerce/standard_address.rb', line 4 def address_2 @address_2 end |
#city ⇒ Object
Returns the value of attribute city.
4 5 6 |
# File 'lib/dhl/ecommerce/standard_address.rb', line 4 def city @city end |
#country ⇒ Object
Returns the value of attribute country.
4 5 6 |
# File 'lib/dhl/ecommerce/standard_address.rb', line 4 def country @country end |
#firm ⇒ Object
Returns the value of attribute firm.
4 5 6 |
# File 'lib/dhl/ecommerce/standard_address.rb', line 4 def firm @firm end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/dhl/ecommerce/standard_address.rb', line 4 def name @name end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
4 5 6 |
# File 'lib/dhl/ecommerce/standard_address.rb', line 4 def postal_code @postal_code end |
#state ⇒ Object
Returns the value of attribute state.
4 5 6 |
# File 'lib/dhl/ecommerce/standard_address.rb', line 4 def state @state end |