Class: PayPalCheckoutSdk::Orders::OrdersValidateRequest
- Inherits:
-
Object
- Object
- PayPalCheckoutSdk::Orders::OrdersValidateRequest
- Defined in:
- lib/orders/orders_validate_request.rb
Overview
Validates a payment method and checks it for contingencies.
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(order_id) ⇒ OrdersValidateRequest
constructor
A new instance of OrdersValidateRequest.
- #pay_pal_client_metadata_id(pay_pal_client_metadata_id) ⇒ Object
- #request_body(orderActionRequest) ⇒ Object
Constructor Details
#initialize(order_id) ⇒ OrdersValidateRequest
Returns a new instance of OrdersValidateRequest.
18 19 20 21 22 23 24 25 26 |
# File 'lib/orders/orders_validate_request.rb', line 18 def initialize(order_id) @headers = {} @body = nil @verb = "POST" @path = "/v2/checkout/orders/{order_id}/validate-payment-method?" @path = @path.gsub("{order_id}", CGI::escape(order_id.to_s)) @headers["Content-Type"] = "application/json" end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
16 17 18 |
# File 'lib/orders/orders_validate_request.rb', line 16 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers.
16 17 18 |
# File 'lib/orders/orders_validate_request.rb', line 16 def headers @headers end |
#path ⇒ Object
Returns the value of attribute path.
16 17 18 |
# File 'lib/orders/orders_validate_request.rb', line 16 def path @path end |
#verb ⇒ Object
Returns the value of attribute verb.
16 17 18 |
# File 'lib/orders/orders_validate_request.rb', line 16 def verb @verb end |
Instance Method Details
#pay_pal_client_metadata_id(pay_pal_client_metadata_id) ⇒ Object
28 29 30 |
# File 'lib/orders/orders_validate_request.rb', line 28 def () @headers["PayPal-Client-Metadata-Id"] = end |
#request_body(orderActionRequest) ⇒ Object
32 33 34 |
# File 'lib/orders/orders_validate_request.rb', line 32 def request_body(orderActionRequest) @body = orderActionRequest end |