Module: Simpal::Order
- Defined in:
- lib/simpal/order.rb
Overview
Class Method Summary collapse
-
.authorize(id, params = {}, headers: {}, client: nil) ⇒ Hash
Authorize the payment for an order.
-
.capture(id, params = {}, headers: {}, client: nil) ⇒ Hash
Capture the payment for an order.
-
.create(params = {}, headers: {}, client: nil) ⇒ Simpal::PayPalObject
Create an order.
-
.retrieve(id, headers: {}, client: nil) ⇒ Hash
Retrieve an order.
-
.update(id, params = [], headers: {}, client: nil) ⇒ Boolean
Update an order.
Class Method Details
.authorize(id, params = {}, headers: {}, client: nil) ⇒ Hash
Authorize the payment for an order.
56 57 58 59 |
# File 'lib/simpal/order.rb', line 56 def self.(id, params = {}, headers: {}, client: nil) resource = API::Orders.(id, params, headers: headers, client: client) PayPalObject.new(resource) end |
.capture(id, params = {}, headers: {}, client: nil) ⇒ Hash
Capture the payment for an order.
70 71 72 73 |
# File 'lib/simpal/order.rb', line 70 def self.capture(id, params = {}, headers: {}, client: nil) resource = API::Orders.capture(id, params, headers: headers, client: client) PayPalObject.new(resource) end |
.create(params = {}, headers: {}, client: nil) ⇒ Simpal::PayPalObject
Create an order.
15 16 17 18 |
# File 'lib/simpal/order.rb', line 15 def self.create(params = {}, headers: {}, client: nil) resource = API::Orders.create(params, headers: headers, client: client) PayPalObject.new(resource) end |
.retrieve(id, headers: {}, client: nil) ⇒ Hash
Retrieve an order.
42 43 44 45 |
# File 'lib/simpal/order.rb', line 42 def self.retrieve(id, headers: {}, client: nil) resource = API::Orders.retrieve(id, headers: headers, client: client) PayPalObject.new(resource) end |