Class: Unit::CashDeposit::ListByPostalCodeParams
- Inherits:
-
Object
- Object
- Unit::CashDeposit::ListByPostalCodeParams
- Defined in:
- lib/unit/models/cash_deposit/list_by_postal_code_params.rb
Instance Attribute Summary collapse
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
-
#service_type ⇒ Object
readonly
Returns the value of attribute service_type.
Instance Method Summary collapse
-
#initialize(postal_code, limit = CASH_DEPOSIT_LIMIT, offset = CASH_DEPOSIT_OFFSET, service_type = nil) ⇒ ListByPostalCodeParams
constructor
A new instance of ListByPostalCodeParams.
- #to_hash ⇒ Object
Constructor Details
#initialize(postal_code, limit = CASH_DEPOSIT_LIMIT, offset = CASH_DEPOSIT_OFFSET, service_type = nil) ⇒ ListByPostalCodeParams
Returns a new instance of ListByPostalCodeParams.
14 15 16 17 18 19 20 |
# File 'lib/unit/models/cash_deposit/list_by_postal_code_params.rb', line 14 def initialize(postal_code, limit = CASH_DEPOSIT_LIMIT, offset = CASH_DEPOSIT_OFFSET, service_type = nil) @limit = limit @offset = offset @postal_code = postal_code @service_type = service_type end |
Instance Attribute Details
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
8 9 10 |
# File 'lib/unit/models/cash_deposit/list_by_postal_code_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_postal_code_params.rb', line 8 def offset @offset end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
8 9 10 |
# File 'lib/unit/models/cash_deposit/list_by_postal_code_params.rb', line 8 def postal_code @postal_code end |
#service_type ⇒ Object (readonly)
Returns the value of attribute service_type.
8 9 10 |
# File 'lib/unit/models/cash_deposit/list_by_postal_code_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_postal_code_params.rb', line 22 def to_hash params = { "page[limit]": limit, "page[offset]": offset, "filter[postalCode]": postal_code, "filter[serviceType]": service_type } params.compact end |