Class: PayPalCheckoutSdk::Payments::AuthorizationsCaptureRequest
- Inherits:
-
Object
- Object
- PayPalCheckoutSdk::Payments::AuthorizationsCaptureRequest
- Defined in:
- lib/payments/authorizations_capture_request.rb
Overview
Captures an authorized payment, by ID.
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#path ⇒ Object
Returns the value of attribute path.
-
#verb ⇒ Object
Returns the value of attribute verb.
Instance Method Summary collapse
-
#initialize(authorization_id) ⇒ AuthorizationsCaptureRequest
constructor
A new instance of AuthorizationsCaptureRequest.
- #pay_pal_request_id(pay_pal_request_id) ⇒ Object
- #prefer(prefer) ⇒ Object
- #request_body(capture) ⇒ Object
Constructor Details
#initialize(authorization_id) ⇒ AuthorizationsCaptureRequest
Returns a new instance of AuthorizationsCaptureRequest.
18 19 20 21 22 23 24 25 26 |
# File 'lib/payments/authorizations_capture_request.rb', line 18 def initialize() @headers = {} @body = nil @verb = "POST" @path = "/v2/payments/authorizations/{authorization_id}/capture?" @path = @path.gsub("{authorization_id}", CGI::escape(.to_s)) @headers["Content-Type"] = "application/json" end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
16 17 18 |
# File 'lib/payments/authorizations_capture_request.rb', line 16 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers.
16 17 18 |
# File 'lib/payments/authorizations_capture_request.rb', line 16 def headers @headers end |
#path ⇒ Object
Returns the value of attribute path.
16 17 18 |
# File 'lib/payments/authorizations_capture_request.rb', line 16 def path @path end |
#verb ⇒ Object
Returns the value of attribute verb.
16 17 18 |
# File 'lib/payments/authorizations_capture_request.rb', line 16 def verb @verb end |
Instance Method Details
#pay_pal_request_id(pay_pal_request_id) ⇒ Object
28 29 30 |
# File 'lib/payments/authorizations_capture_request.rb', line 28 def pay_pal_request_id(pay_pal_request_id) @headers["PayPal-Request-Id"] = pay_pal_request_id end |
#prefer(prefer) ⇒ Object
32 33 34 |
# File 'lib/payments/authorizations_capture_request.rb', line 32 def prefer(prefer) @headers["Prefer"] = prefer end |
#request_body(capture) ⇒ Object
36 37 38 |
# File 'lib/payments/authorizations_capture_request.rb', line 36 def request_body(capture) @body = capture end |