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