Class: Unit::Payment::PatchBookPaymentRequest
- Inherits:
-
Object
- Object
- Unit::Payment::PatchBookPaymentRequest
- Defined in:
- lib/unit/models/payment/patch_book_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) ⇒ PatchBookPaymentRequest
constructor
A new instance of PatchBookPaymentRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(payment_id, tags = nil) ⇒ PatchBookPaymentRequest
Returns a new instance of PatchBookPaymentRequest.
12 13 14 15 |
# File 'lib/unit/models/payment/patch_book_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_book_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_book_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_book_payment_request.rb', line 17 def to_json_api payload = { data: { type: "bookPayment", attributes: { tags: } } } payload[:data][:attributes].compact! payload.to_json end |