Class: LUSI::API::Country::AddressCountry
- Inherits:
-
Country
- Object
- LUSI::API::Core::BasicCode
- LUSI::API::Core::Code
- Country
- LUSI::API::Country::AddressCountry
- Defined in:
- lib/lusi_api/country.rb
Overview
Represents the country component of an address in the LUSI API
Instance Attribute Summary collapse
-
#region ⇒ String. nil
The text description of the region of the address.
Attributes inherited from Country
Attributes inherited from LUSI::API::Core::BasicCode
Class Method Summary collapse
-
.get_instance(api = nil, lookup = nil, iso_alpha2_code: nil, region: nil, **kwargs) {|obj| ... } ⇒ Array<AddressCountry>?
Returns AddressCountry instances matching the supplied parameters.
Instance Method Summary collapse
-
#initialize(xml = nil, lookup = nil, region: nil, **kwargs) ⇒ void
constructor
Initialises a new AddressCountry instance.
Methods inherited from Country
Methods inherited from LUSI::API::Core::BasicCode
Constructor Details
#initialize(xml = nil, lookup = nil, region: nil, **kwargs) ⇒ void
Initialises a new AddressCountry instance
57 58 59 60 |
# File 'lib/lusi_api/country.rb', line 57 def initialize(xml = nil, lookup = nil, region: nil, **kwargs) super(xml, lookup, **kwargs) @region = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Region', region) end |
Instance Attribute Details
#region ⇒ String. nil
Returns the text description of the region of the address.
39 40 41 |
# File 'lib/lusi_api/country.rb', line 39 def region @region end |
Class Method Details
.get_instance(api = nil, lookup = nil, iso_alpha2_code: nil, region: nil, **kwargs) {|obj| ... } ⇒ Array<AddressCountry>?
Returns AddressCountry instances matching the supplied parameters
48 49 50 51 |
# File 'lib/lusi_api/country.rb', line 48 def self.get_instance(api = nil, lookup = nil, iso_alpha2_code: nil, region: nil, **kwargs) super(api, lookup, 'LUSIReference', 'Lookup.asmx', 'GetAddressCountries', 'xmlns:AddressCountry', iso_alpha2_code: iso_alpha2_code, region: region, **kwargs) end |