Class: AxiomusApi::RegionsResponse::Office

Inherits:
Object
  • Object
show all
Defined in:
lib/axiomus_api/response/regions_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Office

Returns a new instance of Office.



19
20
21
22
23
# File 'lib/axiomus_api/response/regions_response.rb', line 19

def initialize(node)
  @code = node.xpath('@office_code').text.to_i
  @city_code = node.xpath('@city_code').text.to_i
  @name = node.text
end

Instance Attribute Details

#city_codeObject

Returns the value of attribute city_code.



16
17
18
# File 'lib/axiomus_api/response/regions_response.rb', line 16

def city_code
  @city_code
end

#codeObject

Returns the value of attribute code.



15
16
17
# File 'lib/axiomus_api/response/regions_response.rb', line 15

def code
  @code
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/axiomus_api/response/regions_response.rb', line 17

def name
  @name
end