Module: Unit::AtmLocation

Defined in:
lib/unit/models/atm_location/atm_location.rb,
lib/unit/models/atm_location/list_by_address_params.rb,
lib/unit/models/atm_location/list_by_coordinates_params.rb,
lib/unit/models/atm_location/list_by_postal_code_params.rb

Defined Under Namespace

Classes: ListByAddressParams, ListByCoordinatesParams, ListByPostalCodeParams

Class Method Summary collapse

Class Method Details

.list_by_address(address:, search_radius: nil) ⇒ Object

Get a list of ATM locations by address by calling Unit’s API

Parameters:

  • address (Address)
  • search_radius (Integer) (defaults to: nil)
    • optional

See Also:



32
33
34
35
# File 'lib/unit/models/atm_location/atm_location.rb', line 32

def list_by_address(address:, search_radius: nil)
  params = ListByAddressParams.new(address, search_radius)
  Unit::Resource::AtmLocationResource.list(params)
end

.list_by_coordinates(coordinates:, search_radius: nil) ⇒ Object

Get a list of ATM locations by coordinates by calling Unit’s API

Parameters:

  • coordinates (Coordinates)
  • search_radius (Integer) (defaults to: nil)
    • optional

See Also:



14
15
16
17
# File 'lib/unit/models/atm_location/atm_location.rb', line 14

def list_by_coordinates(coordinates:, search_radius: nil)
  params = ListByCoordinatesParams.new(coordinates, search_radius)
  Unit::Resource::AtmLocationResource.list(params)
end

.list_by_postal_code(postal_code:, search_radius: nil) ⇒ Object

Get a list of ATM locations by postal code by calling Unit’s API

Parameters:

  • postal_code (String)
  • search_radius (Integer) (defaults to: nil)
    • optional

See Also:



23
24
25
26
# File 'lib/unit/models/atm_location/atm_location.rb', line 23

def list_by_postal_code(postal_code:, search_radius: nil)
  params = ListByPostalCodeParams.new(postal_code, search_radius)
  Unit::Resource::AtmLocationResource.list(params)
end