Class: Unit::Account::Credit::BalanceHistoryRequest
- Inherits:
-
Object
- Object
- Unit::Account::Credit::BalanceHistoryRequest
- Defined in:
- lib/unit/models/account/credit/balance_history_request.rb
Instance Attribute Summary collapse
-
#_until ⇒ Object
readonly
Returns the value of attribute _until.
-
#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.
-
#since ⇒ Object
readonly
Returns the value of attribute since.
Instance Method Summary collapse
-
#initialize(limit = BALANCE_HISTORY_LIMIT, offset = BALANCE_HISTORY_OFFSET, account_id = nil, customer_id = nil, since = nil, _until = nil) ⇒ BalanceHistoryRequest
constructor
A new instance of BalanceHistoryRequest.
- #to_hash ⇒ Object
Constructor Details
#initialize(limit = BALANCE_HISTORY_LIMIT, offset = BALANCE_HISTORY_OFFSET, account_id = nil, customer_id = nil, since = nil, _until = nil) ⇒ BalanceHistoryRequest
Returns a new instance of BalanceHistoryRequest.
17 18 19 20 21 22 23 24 25 |
# File 'lib/unit/models/account/credit/balance_history_request.rb', line 17 def initialize(limit = BALANCE_HISTORY_LIMIT, offset = BALANCE_HISTORY_OFFSET, account_id = nil, customer_id = nil, since = nil, _until = nil) @limit = limit @offset = offset @account_id = account_id @customer_id = customer_id @since = since @_until = _until end |
Instance Attribute Details
#_until ⇒ Object (readonly)
Returns the value of attribute _until.
9 10 11 |
# File 'lib/unit/models/account/credit/balance_history_request.rb', line 9 def _until @_until end |
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
9 10 11 |
# File 'lib/unit/models/account/credit/balance_history_request.rb', line 9 def account_id @account_id end |
#customer_id ⇒ Object (readonly)
Returns the value of attribute customer_id.
9 10 11 |
# File 'lib/unit/models/account/credit/balance_history_request.rb', line 9 def customer_id @customer_id end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
9 10 11 |
# File 'lib/unit/models/account/credit/balance_history_request.rb', line 9 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
9 10 11 |
# File 'lib/unit/models/account/credit/balance_history_request.rb', line 9 def offset @offset end |
#since ⇒ Object (readonly)
Returns the value of attribute since.
9 10 11 |
# File 'lib/unit/models/account/credit/balance_history_request.rb', line 9 def since @since end |
Instance Method Details
#to_hash ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/unit/models/account/credit/balance_history_request.rb', line 27 def to_hash params = { "page[limit]": limit, "page[offset]": offset, "filter[accountId]": account_id, "filter[customerId]": customer_id, "filter[since]": since, "filter[until]": _until } params.compact end |