Class: Paysafe::REST::Client
- Inherits:
-
Object
- Object
- Paysafe::REST::Client
- Extended by:
- Forwardable
- Defined in:
- lib/paysafe/rest/client.rb
Instance Method Summary collapse
- #card_payments ⇒ Object
- #credentials ⇒ Hash
- #credentials? ⇒ Boolean
- #customer_vault ⇒ Object
-
#initialize(**options) ⇒ Paysafe::REST::Client
constructor
Initializes a new Client object.
- #payments ⇒ Object
Constructor Details
#initialize(**options) ⇒ Paysafe::REST::Client
Initializes a new Client object
12 13 14 |
# File 'lib/paysafe/rest/client.rb', line 12 def initialize(**) @config = Configuration.new(**) end |
Instance Method Details
#card_payments ⇒ Object
30 31 32 |
# File 'lib/paysafe/rest/client.rb', line 30 def card_payments @card_payments ||= Api::CardPaymentsApi.new(@config) end |
#credentials ⇒ Hash
17 18 19 |
# File 'lib/paysafe/rest/client.rb', line 17 def credentials { api_key: api_key, api_secret: api_secret } end |
#credentials? ⇒ Boolean
22 23 24 |
# File 'lib/paysafe/rest/client.rb', line 22 def credentials? credentials.values.all? end |
#customer_vault ⇒ Object
26 27 28 |
# File 'lib/paysafe/rest/client.rb', line 26 def customer_vault @customer_vault ||= Api::CustomerVaultApi.new(@config) end |
#payments ⇒ Object
34 35 36 |
# File 'lib/paysafe/rest/client.rb', line 34 def payments @payments ||= Api::PaymentsApi.new(@config) end |