class DHL::Ecommerce::Location
Attributes
account_id[R]
address[R]
email[R]
fax[R]
id[R]
phone[R]
Public Class Methods
new(attributes = {})
click to toggle source
Calls superclass method
DHL::Ecommerce::Base::new
# 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
Public Instance Methods
account()
click to toggle source
# File lib/dhl/ecommerce/location.rb, line 19 def account @account ||= DHL::Ecommerce::Account.find(account_id) end