Class: Unit::AtmLocation::ListByCoordinatesParams

Inherits:
Object
  • Object
show all
Defined in:
lib/unit/models/atm_location/list_by_coordinates_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(coordinates, search_radius = nil) ⇒ ListByCoordinatesParams

Returns a new instance of ListByCoordinatesParams.

Parameters:

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


12
13
14
15
# File 'lib/unit/models/atm_location/list_by_coordinates_params.rb', line 12

def initialize(coordinates, search_radius = nil)
  @coordinates = coordinates
  @search_radius = search_radius
end

Instance Attribute Details

#coordinatesObject (readonly)

Returns the value of attribute coordinates.



8
9
10
# File 'lib/unit/models/atm_location/list_by_coordinates_params.rb', line 8

def coordinates
  @coordinates
end

#search_radiusObject (readonly)

Returns the value of attribute search_radius.



8
9
10
# File 'lib/unit/models/atm_location/list_by_coordinates_params.rb', line 8

def search_radius
  @search_radius
end

Instance Method Details

#to_hashObject



17
18
19
20
21
22
23
# File 'lib/unit/models/atm_location/list_by_coordinates_params.rb', line 17

def to_hash
  params = {
    "filter[coordinates]": coordinates.represent,
    "filter[searchRadius]": search_radius
  }
  params.compact
end