Module: Adyen::REST::ModifyPayment
- Included in:
- Client
- Defined in:
- lib/adyen/rest/modify_payment.rb
Overview
This module implements the Payment.capture API to capture previously authorised payments.
Defined Under Namespace
Instance Method Summary collapse
-
#cancel_or_refund_payment(attributes = {}) ⇒ Object
Constructs and issues a Payment.cancel API call.
- #cancel_or_refund_payment_request(attributes = {}) ⇒ Object
-
#cancel_payment(attributes = {}) ⇒ Object
Constructs and issues a Payment.cancel API call.
- #cancel_payment_request(attributes = {}) ⇒ Object
-
#capture_payment(attributes = {}) ⇒ Object
Constructs and issues a Payment.capture API call.
- #capture_payment_request(attributes = {}) ⇒ Object
-
#refund_payment(attributes = {}) ⇒ Object
Constructs and issues a Payment.cancel API call.
- #refund_payment_request(attributes = {}) ⇒ Object
Instance Method Details
#cancel_or_refund_payment(attributes = {}) ⇒ Object
Constructs and issues a Payment.cancel API call.
74 75 76 77 |
# File 'lib/adyen/rest/modify_payment.rb', line 74 def cancel_or_refund_payment(attributes = {}) request = cancel_or_refund_payment_request(attributes) execute_request(request) end |
#cancel_or_refund_payment_request(attributes = {}) ⇒ Object
79 80 81 82 83 84 85 86 |
# File 'lib/adyen/rest/modify_payment.rb', line 79 def cancel_or_refund_payment_request(attributes = {}) Adyen::REST::ModifyPayment::Request.new('Payment.cancelOrRefund', attributes, response_class: Adyen::REST::ModifyPayment::Response, response_options: { expects: '[cancelOrRefund-received]' } ) end |
#cancel_payment(attributes = {}) ⇒ Object
Constructs and issues a Payment.cancel API call.
44 45 46 47 |
# File 'lib/adyen/rest/modify_payment.rb', line 44 def cancel_payment(attributes = {}) request = cancel_payment_request(attributes) execute_request(request) end |
#cancel_payment_request(attributes = {}) ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lib/adyen/rest/modify_payment.rb', line 49 def cancel_payment_request(attributes = {}) Adyen::REST::ModifyPayment::Request.new('Payment.cancel', attributes, response_class: Adyen::REST::ModifyPayment::Response, response_options: { expects: '[cancel-received]' } ) end |
#capture_payment(attributes = {}) ⇒ Object
Constructs and issues a Payment.capture API call.
29 30 31 32 |
# File 'lib/adyen/rest/modify_payment.rb', line 29 def capture_payment(attributes = {}) request = capture_payment_request(attributes) execute_request(request) end |
#capture_payment_request(attributes = {}) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/adyen/rest/modify_payment.rb', line 34 def capture_payment_request(attributes = {}) Adyen::REST::ModifyPayment::Request.new('Payment.capture', attributes, response_class: Adyen::REST::ModifyPayment::Response, response_options: { expects: '[capture-received]' } ) end |
#refund_payment(attributes = {}) ⇒ Object
Constructs and issues a Payment.cancel API call.
59 60 61 62 |
# File 'lib/adyen/rest/modify_payment.rb', line 59 def refund_payment(attributes = {}) request = refund_payment_request(attributes) execute_request(request) end |
#refund_payment_request(attributes = {}) ⇒ Object
64 65 66 67 68 69 70 71 |
# File 'lib/adyen/rest/modify_payment.rb', line 64 def refund_payment_request(attributes = {}) Adyen::REST::ModifyPayment::Request.new('Payment.refund', attributes, response_class: Adyen::REST::ModifyPayment::Response, response_options: { expects: '[refund-received]' } ) end |