class LUSI::API::Country::Nationality

Represents a nationality in the LUSI API @see Country

Public Class Methods

get_instance(api = nil, lookup = nil, iso_alpha2_code: nil, **kwargs) click to toggle source

Returns Nationality instances matching the specified parameters @param api [LUSI::API::Core::API] the LUSI API instance @param lookup [LUSI::API::Core::Lookup::LookupService, nil] the lookup service for object resolution @param identity [String, nil] the identity to search for @param description [String, nil] the description to search for @param iso_alpha2_code [String, nil] the ISO alpha-2 code to search for @return [Array<Nationality>, nil] the matching Nationality instances @yield [obj] Passes the Nationality instance to the block @yieldparam obj [LUSI::API::Country::Nationality] the Nationality instance

Calls superclass method LUSI::API::Core::Code::get_instance
# File lib/lusi_api/country.rb, line 90
def self.get_instance(api = nil, lookup = nil, iso_alpha2_code: nil, **kwargs)
  super(api, lookup, 'LUSIReference', 'Lookup.asmx', 'GetNationalities', 'xmlns:Nationality',
        iso_alpha2_code: iso_alpha2_code, **kwargs)
end

Protected Class Methods

get_instance_params(iso_alpha2_code: nil, **kwargs) click to toggle source

Returns a parameter hash for the LUSI API call @param (see get_instance) @param iso_alpha2_code [String, nil] the ISO alpha-2 code to search for @return [Hash<String, any>] the parameter hash for the LUSI API call

# File lib/lusi_api/country.rb, line 101
def self.get_instance_params(iso_alpha2_code: nil, **kwargs)
  params = super(**kwargs)
  params[:ISOAlpha2Code] = kwargs[:iso_alpha2_code] || ''
  params
end