Class: Unit::CheckDeposit::PatchDepositRequest
- Inherits:
-
Object
- Object
- Unit::CheckDeposit::PatchDepositRequest
- Defined in:
- lib/unit/models/check_deposit/patch_deposit_request.rb
Instance Attribute Summary collapse
-
#deposit_id ⇒ Object
readonly
Returns the value of attribute deposit_id.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(deposit_id, tags) ⇒ PatchDepositRequest
constructor
A new instance of PatchDepositRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(deposit_id, tags) ⇒ PatchDepositRequest
Returns a new instance of PatchDepositRequest.
12 13 14 15 |
# File 'lib/unit/models/check_deposit/patch_deposit_request.rb', line 12 def initialize(deposit_id, ) @deposit_id = deposit_id @tags = end |
Instance Attribute Details
#deposit_id ⇒ Object (readonly)
Returns the value of attribute deposit_id.
8 9 10 |
# File 'lib/unit/models/check_deposit/patch_deposit_request.rb', line 8 def deposit_id @deposit_id end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/check_deposit/patch_deposit_request.rb', line 8 def @tags end |
Instance Method Details
#to_json_api ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/unit/models/check_deposit/patch_deposit_request.rb', line 17 def to_json_api payload = { data: { type: "checkDeposit", attributes: { tags: } } } payload[:data][:attributes].compact! payload.to_json end |