Module: PaypalAPI::OrdersV1::APIs
- Included in:
- PaypalAPI::OrdersV1, PaypalAPI::OrdersV1
- Defined in:
- lib/paypal-api/api_collections/orders_v1.rb
Overview
Common methods for PaypalAPI::OrdersV1 class and client.orders_v1 instance
Instance Method Summary collapse
-
#cancel(id, query: nil, body: nil, headers: nil) ⇒ Response
Cancel order.
-
#create(query: nil, body: nil, headers: nil) ⇒ Response
Create Order.
-
#pay(id, query: nil, body: nil, headers: nil) ⇒ Response
Pay for order.
-
#show(id, query: nil, body: nil, headers: nil) ⇒ Response
Show order details.
Instance Method Details
#cancel(id, query: nil, body: nil, headers: nil) ⇒ Response
Note:
This method is DEPRECATED on PayPal
Cancel order
54 55 56 |
# File 'lib/paypal-api/api_collections/orders_v1.rb', line 54 def cancel(id, query: nil, body: nil, headers: nil) client.delete("/v1/checkout/orders/#{encode(id)}", query: query, body: body, headers: headers) end |
#create(query: nil, body: nil, headers: nil) ⇒ Response
Note:
This method is DEPRECATED on PayPal
Create Order
28 29 30 |
# File 'lib/paypal-api/api_collections/orders_v1.rb', line 28 def create(query: nil, body: nil, headers: nil) client.post("/v1/checkout/orders", query: query, body: body, headers: headers) end |
#pay(id, query: nil, body: nil, headers: nil) ⇒ Response
Pay for order
66 67 68 |
# File 'lib/paypal-api/api_collections/orders_v1.rb', line 66 def pay(id, query: nil, body: nil, headers: nil) client.post("/v1/checkout/orders/#{encode(id)}/pay", query: query, body: body, headers: headers) end |
#show(id, query: nil, body: nil, headers: nil) ⇒ Response
Note:
This method is DEPRECATED on PayPal
Show order details
41 42 43 |
# File 'lib/paypal-api/api_collections/orders_v1.rb', line 41 def show(id, query: nil, body: nil, headers: nil) client.get("/v1/checkout/orders/#{encode(id)}", query: query, body: body, headers: headers) end |