Class: Unit::CashDeposit::ListByCoordinatesParams
- Inherits:
-
Object
- Object
- Unit::CashDeposit::ListByCoordinatesParams
- Defined in:
- lib/unit/models/cash_deposit/list_by_coordinates_params.rb
Instance Attribute Summary collapse
-
#coordinates ⇒ Object
readonly
Returns the value of attribute coordinates.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#service_type ⇒ Object
readonly
Returns the value of attribute service_type.
Instance Method Summary collapse
-
#initialize(coordinates, limit = CASH_DEPOSIT_LIMIT, offset = CASH_DEPOSIT_OFFSET, service_type = nil) ⇒ ListByCoordinatesParams
constructor
A new instance of ListByCoordinatesParams.
- #to_hash ⇒ Object
Constructor Details
#initialize(coordinates, limit = CASH_DEPOSIT_LIMIT, offset = CASH_DEPOSIT_OFFSET, service_type = nil) ⇒ ListByCoordinatesParams
Returns a new instance of ListByCoordinatesParams.
14 15 16 17 18 19 20 |
# File 'lib/unit/models/cash_deposit/list_by_coordinates_params.rb', line 14 def initialize(coordinates, limit = CASH_DEPOSIT_LIMIT, offset = CASH_DEPOSIT_OFFSET, service_type = nil) @limit = limit @offset = offset @coordinates = coordinates @service_type = service_type end |
Instance Attribute Details
#coordinates ⇒ Object (readonly)
Returns the value of attribute coordinates.
8 9 10 |
# File 'lib/unit/models/cash_deposit/list_by_coordinates_params.rb', line 8 def coordinates @coordinates end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
8 9 10 |
# File 'lib/unit/models/cash_deposit/list_by_coordinates_params.rb', line 8 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
8 9 10 |
# File 'lib/unit/models/cash_deposit/list_by_coordinates_params.rb', line 8 def offset @offset end |
#service_type ⇒ Object (readonly)
Returns the value of attribute service_type.
8 9 10 |
# File 'lib/unit/models/cash_deposit/list_by_coordinates_params.rb', line 8 def service_type @service_type end |
Instance Method Details
#to_hash ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/unit/models/cash_deposit/list_by_coordinates_params.rb', line 22 def to_hash params = { "page[limit]": limit, "page[offset]": offset, "filter[coordinates]": coordinates.represent, "filter[serviceType]": service_type } params.compact end |