module Simpal
A simple, lightweight wrapper around PayPal's REST API
.
Constants
- VERSION
Attributes
client[RW]
@return [Simpal::Client] The default client to use when performing API
requests.
Public Class Methods
client_for(client)
click to toggle source
Returns the API
client to use for a set of request parameters.
@param client [Simpal::Client, nil] The preferred client, or `nil`. @return [Simpal::Client] The client to make the request with. @raise [Simpal::ClientError] When an acceptable `Simpal::Client` can't be found.
# File lib/simpal.rb, line 38 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