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:<table><thead><tr><th align=“left”>Attribute or object</th><th align=“left”>Operations</th></tr></thead><tbody><tr><td>intent
</td><td align=“left”>Replace</td></tr><tr><td>purchase_units
</td><td align=“left”>Replace, add</td></tr><tr><td>purchase_units[].custom_id
</td><td align=“left”>Replace, add, remove</td></tr><tr><td>purchase_units[].description
</td><td align=“left”>Replace, add, remove</td></tr><tr><td>purchase_units[].payee.email
</td><td align=“left”>Replace, add</td></tr><tr><td>purchase_units[].shipping
</td><td align=“left”>Replace, add, remove</td></tr><tr><td>purchase_units[].soft_descriptor
</td><td align=“left”>Replace, add, remove</td></tr><tr><td>purchase_units[].amount
</td><td align=“left”>Replace</td></tr><tr><td>purchase_units[].invoice_id
</td><td align=“left”>Replace, add, remove</td></tr></tbody></table>
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 |