Class: Unit::Account::Deposit::CreateDepositAccountRequest
- Inherits:
-
Object
- Object
- Unit::Account::Deposit::CreateDepositAccountRequest
- Defined in:
- lib/unit/models/account/deposit/create_deposit_account_request.rb
Instance Attribute Summary collapse
-
#deposit_product ⇒ Object
readonly
Returns the value of attribute deposit_product.
-
#idempotency_key ⇒ Object
readonly
Returns the value of attribute idempotency_key.
-
#relationships ⇒ Object
readonly
Returns the value of attribute relationships.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(deposit_product, tags = nil, relationships = nil, idempotency_key = nil) ⇒ CreateDepositAccountRequest
constructor
A new instance of CreateDepositAccountRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(deposit_product, tags = nil, relationships = nil, idempotency_key = nil) ⇒ CreateDepositAccountRequest
Returns a new instance of CreateDepositAccountRequest.
15 16 17 18 19 20 |
# File 'lib/unit/models/account/deposit/create_deposit_account_request.rb', line 15 def initialize(deposit_product, = nil, relationships = nil, idempotency_key = nil) @deposit_product = deposit_product @tags = @idempotency_key = idempotency_key @relationships = relationships end |
Instance Attribute Details
#deposit_product ⇒ Object (readonly)
Returns the value of attribute deposit_product.
9 10 11 |
# File 'lib/unit/models/account/deposit/create_deposit_account_request.rb', line 9 def deposit_product @deposit_product end |
#idempotency_key ⇒ Object (readonly)
Returns the value of attribute idempotency_key.
9 10 11 |
# File 'lib/unit/models/account/deposit/create_deposit_account_request.rb', line 9 def idempotency_key @idempotency_key end |
#relationships ⇒ Object (readonly)
Returns the value of attribute relationships.
9 10 11 |
# File 'lib/unit/models/account/deposit/create_deposit_account_request.rb', line 9 def relationships @relationships end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
9 10 11 |
# File 'lib/unit/models/account/deposit/create_deposit_account_request.rb', line 9 def @tags end |
Instance Method Details
#to_json_api ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/unit/models/account/deposit/create_deposit_account_request.rb', line 22 def to_json_api payload = { data: { type: "depositAccount", attributes: { depositProduct: deposit_product, tags: , idempotencyKey: idempotency_key }, relationships: relationships } } payload[:data][:attributes].compact! payload.to_json end |