Class: Unit::CheckPayment::ListPaymentParams
- Inherits:
-
Object
- Object
- Unit::CheckPayment::ListPaymentParams
- Defined in:
- lib/unit/models/check_payment/list_check_payment_params.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.
-
#check_number ⇒ Object
readonly
Returns the value of attribute check_number.
-
#customer_id ⇒ Object
readonly
Returns the value of attribute customer_id.
-
#from_amount ⇒ Object
readonly
Returns the value of attribute from_amount.
-
#include ⇒ Object
readonly
Returns the value of attribute include.
-
#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.
-
#sort ⇒ Object
readonly
Returns the value of attribute sort.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#to_amount ⇒ Object
readonly
Returns the value of attribute to_amount.
Instance Method Summary collapse
-
#initialize(limit = CHECK_PAYMENT_LIMIT, offset = CHECK_PAYMENT_OFFSET, account_id = nil, customer_id = nil, tags = nil, sort = nil, since = nil, _until = nil, status = nil, from_amount = nil, to_amount = nil, check_number = nil, include = nil) ⇒ ListPaymentParams
constructor
A new instance of ListPaymentParams.
- #to_hash ⇒ Object
Constructor Details
#initialize(limit = CHECK_PAYMENT_LIMIT, offset = CHECK_PAYMENT_OFFSET, account_id = nil, customer_id = nil, tags = nil, sort = nil, since = nil, _until = nil, status = nil, from_amount = nil, to_amount = nil, check_number = nil, include = nil) ⇒ ListPaymentParams
Returns a new instance of ListPaymentParams.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 24 def initialize(limit = CHECK_PAYMENT_LIMIT, offset = CHECK_PAYMENT_OFFSET, account_id = nil, customer_id = nil, = nil, sort = nil, since = nil, _until = nil, status = nil, from_amount = nil, to_amount = nil, check_number = nil, include = nil) @limit = limit @offset = offset @account_id = account_id @customer_id = customer_id @tags = @sort = sort @since = since @until = _until @status = status @from_amount = from_amount @to_amount = to_amount @check_number = check_number @include = include end |
Instance Attribute Details
#_until ⇒ Object (readonly)
Returns the value of attribute _until.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def _until @_until end |
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def account_id @account_id end |
#check_number ⇒ Object (readonly)
Returns the value of attribute check_number.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def check_number @check_number end |
#customer_id ⇒ Object (readonly)
Returns the value of attribute customer_id.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def customer_id @customer_id end |
#from_amount ⇒ Object (readonly)
Returns the value of attribute from_amount.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def from_amount @from_amount end |
#include ⇒ Object (readonly)
Returns the value of attribute include.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def include @include end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def offset @offset end |
#since ⇒ Object (readonly)
Returns the value of attribute since.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def since @since end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def sort @sort end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def status @status end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def @tags end |
#to_amount ⇒ Object (readonly)
Returns the value of attribute to_amount.
8 9 10 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 8 def to_amount @to_amount end |
Instance Method Details
#to_hash ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/unit/models/check_payment/list_check_payment_params.rb', line 42 def to_hash params = { "page[limit]": limit, "page[offset]": offset, "filter[accountId]": account_id, "filter[customerId]": customer_id, "filter[tags]": , "sort": sort, "filter[since]": since, "filter[until]": _until, "filter[fromAmount]": from_amount, "filter[toAmount]": to_amount, "filter[checkNumber]": check_number, "include": include&.join(",") } status&.each_with_index&.map do |val, index| params.merge!({ "filter[status][#{index}]": val }) end end |