Class: DHL::Ecommerce::Location
- Includes:
- Operations::Find, Operations::List
- Defined in:
- lib/dhl/ecommerce/location.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#fax ⇒ Object
readonly
Returns the value of attribute fax.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
Instance Method Summary collapse
- #account ⇒ Object
-
#initialize(attributes = {}) ⇒ Location
constructor
A new instance of Location.
Methods included from Operations::List
Methods included from Operations::Find
Constructor Details
#initialize(attributes = {}) ⇒ Location
Returns a new instance of Location.
9 10 11 12 13 14 15 16 17 |
# File 'lib/dhl/ecommerce/location.rb', line 9 def initialize(attributes = {}) super attributes unless attributes.empty? @id = attributes[:pickup].to_i if attributes[:pickup] @account_id = attributes[:account].to_i if attributes[:account] @address = StandardAddress.new attributes end end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
7 8 9 |
# File 'lib/dhl/ecommerce/location.rb', line 7 def account_id @account_id end |
#address ⇒ Object (readonly)
Returns the value of attribute address.
7 8 9 |
# File 'lib/dhl/ecommerce/location.rb', line 7 def address @address end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
7 8 9 |
# File 'lib/dhl/ecommerce/location.rb', line 7 def email @email end |
#fax ⇒ Object (readonly)
Returns the value of attribute fax.
7 8 9 |
# File 'lib/dhl/ecommerce/location.rb', line 7 def fax @fax end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/dhl/ecommerce/location.rb', line 7 def id @id end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
7 8 9 |
# File 'lib/dhl/ecommerce/location.rb', line 7 def phone @phone end |