Class: Unit::Counterparty::ListCounterpartyParams
- Inherits:
-
Object
- Object
- Unit::Counterparty::ListCounterpartyParams
- Defined in:
- lib/unit/models/counterparty/list_counterparty_params.rb
Instance Attribute Summary collapse
-
#account_number ⇒ Object
readonly
Returns the value of attribute account_number.
-
#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.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
-
#routing_number ⇒ Object
readonly
Returns the value of attribute routing_number.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(limit = COUNTER_PARTY_LIMIT, offset = COUNTER_PARTY_OFFSET, customer_id = nil, account_number = nil, routing_number = nil, tags = nil, permissions = nil) ⇒ ListCounterpartyParams
constructor
A new instance of ListCounterpartyParams.
- #to_hash ⇒ Object
Constructor Details
#initialize(limit = COUNTER_PARTY_LIMIT, offset = COUNTER_PARTY_OFFSET, customer_id = nil, account_number = nil, routing_number = nil, tags = nil, permissions = nil) ⇒ ListCounterpartyParams
Returns a new instance of ListCounterpartyParams.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/unit/models/counterparty/list_counterparty_params.rb', line 17 def initialize(limit = COUNTER_PARTY_LIMIT, offset = COUNTER_PARTY_OFFSET, customer_id = nil, account_number = nil, routing_number = nil, = nil, = nil) @limit = limit @offset = offset @customer_id = customer_id @account_number = account_number @routing_number = routing_number @tags = @permissions = end |
Instance Attribute Details
#account_number ⇒ Object (readonly)
Returns the value of attribute account_number.
8 9 10 |
# File 'lib/unit/models/counterparty/list_counterparty_params.rb', line 8 def account_number @account_number end |
#customer_id ⇒ Object (readonly)
Returns the value of attribute customer_id.
8 9 10 |
# File 'lib/unit/models/counterparty/list_counterparty_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/counterparty/list_counterparty_params.rb', line 8 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
8 9 10 |
# File 'lib/unit/models/counterparty/list_counterparty_params.rb', line 8 def offset @offset end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
8 9 10 |
# File 'lib/unit/models/counterparty/list_counterparty_params.rb', line 8 def @permissions end |
#routing_number ⇒ Object (readonly)
Returns the value of attribute routing_number.
8 9 10 |
# File 'lib/unit/models/counterparty/list_counterparty_params.rb', line 8 def routing_number @routing_number end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/counterparty/list_counterparty_params.rb', line 8 def @tags end |
Instance Method Details
#to_hash ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/unit/models/counterparty/list_counterparty_params.rb', line 28 def to_hash params = { "page[limit]": limit, "page[offset]": offset, "filter[customerId]": customer_id, "filter[accountNumber]": account_number, "filter[routingNumber]": routing_number, "filter[tags]": } &.each_with_index&.map do |val, index| params.merge!({ "filter[permissions][#{index}]": val }) end params.compact end |