Class: Unit::AtmLocation::ListByPostalCodeParams
- Inherits:
-
Object
- Object
- Unit::AtmLocation::ListByPostalCodeParams
- Defined in:
- lib/unit/models/atm_location/list_by_postal_code_params.rb
Instance Attribute Summary collapse
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
-
#search_radius ⇒ Object
readonly
Returns the value of attribute search_radius.
Instance Method Summary collapse
-
#initialize(postal_code, search_radius = nil) ⇒ ListByPostalCodeParams
constructor
A new instance of ListByPostalCodeParams.
- #to_hash ⇒ Object
Constructor Details
#initialize(postal_code, search_radius = nil) ⇒ ListByPostalCodeParams
Returns a new instance of ListByPostalCodeParams.
12 13 14 15 |
# File 'lib/unit/models/atm_location/list_by_postal_code_params.rb', line 12 def initialize(postal_code, search_radius = nil) @postal_code = postal_code @search_radius = search_radius end |
Instance Attribute Details
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
8 9 10 |
# File 'lib/unit/models/atm_location/list_by_postal_code_params.rb', line 8 def postal_code @postal_code end |
#search_radius ⇒ Object (readonly)
Returns the value of attribute search_radius.
8 9 10 |
# File 'lib/unit/models/atm_location/list_by_postal_code_params.rb', line 8 def search_radius @search_radius end |
Instance Method Details
#to_hash ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/unit/models/atm_location/list_by_postal_code_params.rb', line 17 def to_hash params = { "filter[postalCode]": postal_code, "filter[searchRadius]": search_radius } params.compact end |