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