Class: Unit::Statement::ListStatementParams
- Inherits:
-
Object
- Object
- Unit::Statement::ListStatementParams
- Defined in:
- lib/unit/models/statement/list_statement_params.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#customer_id ⇒ Object
readonly
Returns the value of attribute customer_id.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#period ⇒ Object
readonly
Returns the value of attribute period.
-
#sort ⇒ Object
readonly
Returns the value of attribute sort.
Instance Method Summary collapse
-
#initialize(limit = STATEMENT_LIST_LIMIT, offset = STATEMENT_LIST_OFFSET, account_id = nil, customer_id = nil, period = nil, sort = nil) ⇒ ListStatementParams
constructor
A new instance of ListStatementParams.
- #to_hash ⇒ Object
Constructor Details
#initialize(limit = STATEMENT_LIST_LIMIT, offset = STATEMENT_LIST_OFFSET, account_id = nil, customer_id = nil, period = nil, sort = nil) ⇒ ListStatementParams
Returns a new instance of ListStatementParams.
16 17 18 19 20 21 22 23 24 |
# File 'lib/unit/models/statement/list_statement_params.rb', line 16 def initialize(limit = STATEMENT_LIST_LIMIT, offset = STATEMENT_LIST_OFFSET, account_id = nil, customer_id = nil, period = nil, sort = nil) @limit = limit @offset = offset @account_id = account_id @customer_id = customer_id @period = period @sort = sort end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
8 9 10 |
# File 'lib/unit/models/statement/list_statement_params.rb', line 8 def account_id @account_id end |
#customer_id ⇒ Object (readonly)
Returns the value of attribute customer_id.
8 9 10 |
# File 'lib/unit/models/statement/list_statement_params.rb', line 8 def customer_id @customer_id end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
8 9 10 |
# File 'lib/unit/models/statement/list_statement_params.rb', line 8 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
8 9 10 |
# File 'lib/unit/models/statement/list_statement_params.rb', line 8 def offset @offset end |
#period ⇒ Object (readonly)
Returns the value of attribute period.
8 9 10 |
# File 'lib/unit/models/statement/list_statement_params.rb', line 8 def period @period end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
8 9 10 |
# File 'lib/unit/models/statement/list_statement_params.rb', line 8 def sort @sort end |
Instance Method Details
#to_hash ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/unit/models/statement/list_statement_params.rb', line 26 def to_hash params = { "page[limit]": limit, "page[offset]": offset, "filter[accountId]": account_id, "filter[customerId]": customer_id, "filter[period]": period, "sort": sort } params.compact end |