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