Class: Unit::Transaction::PatchTagsRequest
- Inherits:
-
Object
- Object
- Unit::Transaction::PatchTagsRequest
- Defined in:
- lib/unit/models/transaction/patch_tags_request.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Instance Method Summary collapse
-
#initialize(account_id, transaction_id, tags = nil) ⇒ PatchTagsRequest
constructor
A new instance of PatchTagsRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(account_id, transaction_id, tags = nil) ⇒ PatchTagsRequest
Returns a new instance of PatchTagsRequest.
13 14 15 16 17 |
# File 'lib/unit/models/transaction/patch_tags_request.rb', line 13 def initialize(account_id, transaction_id, = nil) @account_id = account_id @transaction_id = transaction_id = end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
8 9 10 |
# File 'lib/unit/models/transaction/patch_tags_request.rb', line 8 def account_id @account_id end |
#tags ⇒ Object
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/transaction/patch_tags_request.rb', line 8 def end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
8 9 10 |
# File 'lib/unit/models/transaction/patch_tags_request.rb', line 8 def transaction_id @transaction_id end |
Instance Method Details
#to_json_api ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/unit/models/transaction/patch_tags_request.rb', line 19 def to_json_api payload = { "data": { "type": "transaction", "attributes": { "tags": } } } payload[:data][:attributes].compact! payload.to_json end |