Class: PayPalCheckoutSdk::Orders::OrdersPatchRequest
- Inherits:
-
Object
- Object
- PayPalCheckoutSdk::Orders::OrdersPatchRequest
- Defined in:
- lib/orders/orders_patch_request.rb
Overview
Updates an order that has the CREATED or APPROVED status. You cannot update an order with COMPLETED status. You can patch these attributes and objects:
| Attribute or object | Operations |
|---|---|
intent | Replace |
purchase_units | Replace, add |
purchase_units.custom_id | Replace, add, remove |
purchase_units.description | Replace, add, remove |
purchase_units.payee.email | Replace, add |
purchase_units.shipping | Replace, add, remove |
purchase_units.soft_descriptor | Replace, add, remove |
purchase_units.amount | Replace |
purchase_units.invoice_id | Replace, add, remove |
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) ⇒ OrdersPatchRequest
constructor
A new instance of OrdersPatchRequest.
- #request_body(patchRequest) ⇒ Object
Constructor Details
#initialize(order_id) ⇒ OrdersPatchRequest
Returns a new instance of OrdersPatchRequest.
18 19 20 21 22 23 24 25 26 |
# File 'lib/orders/orders_patch_request.rb', line 18 def initialize(order_id) @headers = {} @body = nil @verb = "PATCH" @path = "/v2/checkout/orders/{order_id}?" @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_patch_request.rb', line 16 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers.
16 17 18 |
# File 'lib/orders/orders_patch_request.rb', line 16 def headers @headers end |
#path ⇒ Object
Returns the value of attribute path.
16 17 18 |
# File 'lib/orders/orders_patch_request.rb', line 16 def path @path end |
#verb ⇒ Object
Returns the value of attribute verb.
16 17 18 |
# File 'lib/orders/orders_patch_request.rb', line 16 def verb @verb end |
Instance Method Details
#request_body(patchRequest) ⇒ Object
28 29 30 |
# File 'lib/orders/orders_patch_request.rb', line 28 def request_body(patchRequest) @body = patchRequest end |