Class: AxiomusApi::RegionsResponse::Region
- Inherits:
-
Object
- Object
- AxiomusApi::RegionsResponse::Region
- Defined in:
- lib/axiomus_api/response/regions_response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#courier ⇒ Object
Returns the value of attribute courier.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pickup ⇒ Object
Returns the value of attribute pickup.
Instance Method Summary collapse
-
#initialize(node) ⇒ Region
constructor
A new instance of Region.
Constructor Details
#initialize(node) ⇒ Region
Returns a new instance of Region.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/axiomus_api/response/regions_response.rb', line 32 def initialize(node) @code = node.xpath('@region_code').text @name = node.xpath('@name').text @courier = node.xpath('courier/city').map do |n| City.new(n) end @pickup = node.xpath('pickup/office').map do |n| Office.new(n) end end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
27 28 29 |
# File 'lib/axiomus_api/response/regions_response.rb', line 27 def code @code end |
#courier ⇒ Object
Returns the value of attribute courier.
29 30 31 |
# File 'lib/axiomus_api/response/regions_response.rb', line 29 def courier @courier end |
#name ⇒ Object
Returns the value of attribute name.
28 29 30 |
# File 'lib/axiomus_api/response/regions_response.rb', line 28 def name @name end |
#pickup ⇒ Object
Returns the value of attribute pickup.
30 31 32 |
# File 'lib/axiomus_api/response/regions_response.rb', line 30 def pickup @pickup end |