Class: Unit::Transaction::GetTransactionParams
- Inherits:
-
Object
- Object
- Unit::Transaction::GetTransactionParams
- Defined in:
- lib/unit/models/transaction/get_transaction_params.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#include ⇒ Object
Returns the value of attribute include.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Instance Method Summary collapse
-
#initialize(transaction_id, account_id, customer_id = nil, include = nil) ⇒ GetTransactionParams
constructor
A new instance of GetTransactionParams.
- #to_hash ⇒ Object
Constructor Details
#initialize(transaction_id, account_id, customer_id = nil, include = nil) ⇒ GetTransactionParams
Returns a new instance of GetTransactionParams.
14 15 16 17 18 19 |
# File 'lib/unit/models/transaction/get_transaction_params.rb', line 14 def initialize(transaction_id, account_id, customer_id = nil, include = nil) @transaction_id = transaction_id @account_id = account_id @customer_id = customer_id @include = include end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
8 9 10 |
# File 'lib/unit/models/transaction/get_transaction_params.rb', line 8 def account_id @account_id end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
8 9 10 |
# File 'lib/unit/models/transaction/get_transaction_params.rb', line 8 def customer_id @customer_id end |
#include ⇒ Object
Returns the value of attribute include.
8 9 10 |
# File 'lib/unit/models/transaction/get_transaction_params.rb', line 8 def include @include end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
8 9 10 |
# File 'lib/unit/models/transaction/get_transaction_params.rb', line 8 def transaction_id @transaction_id end |
Instance Method Details
#to_hash ⇒ Object
21 22 23 24 25 |
# File 'lib/unit/models/transaction/get_transaction_params.rb', line 21 def to_hash params = { "filter[customerId]": customer_id, "include": include&.join(",") } params.compact end |