Module: Simpal
- Defined in:
- lib/simpal.rb,
lib/simpal/order.rb,
lib/simpal/client.rb,
lib/simpal/constants.rb,
lib/simpal/api/orders.rb,
lib/simpal/client_error.rb,
lib/simpal/paypal_object.rb,
lib/simpal/payment/refund.rb,
lib/simpal/payment/capture.rb,
lib/simpal/middleware/headers.rb,
lib/simpal/api/payments/refunds.rb,
lib/simpal/api/payments/captures.rb,
lib/simpal/payment/authorization.rb,
lib/simpal/middleware/authorization.rb,
lib/simpal/api/payments/authorizations.rb
Overview
A simple, lightweight wrapper around PayPal’s REST API.
Defined Under Namespace
Modules: API, Middleware, Order, Payment Classes: Client, ClientError, PayPalObject
Constant Summary collapse
- VERSION =
Returns The gem’s semantic version number.
'1.1.0'
Class Attribute Summary collapse
-
.client ⇒ Simpal::Client
The default client to use when performing API requests.
Class Method Summary collapse
-
.client_for(client) ⇒ Simpal::Client
Returns the API client to use for a set of request parameters.
Class Attribute Details
.client ⇒ Simpal::Client
Returns The default client to use when performing API requests.
29 30 31 |
# File 'lib/simpal.rb', line 29 def client @client end |
Class Method Details
.client_for(client) ⇒ Simpal::Client
Returns the API client to use for a set of request parameters.
37 38 39 40 41 42 |
# File 'lib/simpal.rb', line 37 def client_for(client) client ||= self.client return client if client.is_a?(Simpal::Client) raise ClientError, 'API client is missing. Did you forget to set `Simpal.client`?' end |