Sha256: 1f99097f105167693bdc50b89f60cdd6a5c8f8cb39e25ea346f6f3e26dbb7863

Contents?: true

Size: 876 Bytes

Versions: 1

Compression:

Stored size: 876 Bytes

Contents

module Paysafe
  module REST
    class Client
      extend Forwardable

      delegate [:account_number, :api_base, :api_key, :api_secret, :test_mode, :timeouts] => :@config

      # Initializes a new Client object
      #
      # @param options [Hash]
      # @return [Paysafe::REST::Client]
      def initialize(**options)
        @config = Configuration.new(options)
      end

      # @return [Hash]
      def credentials
        { api_key: api_key, api_secret: api_secret }
      end

      # @return [Boolean]
      def credentials?
        credentials.values.all?
      end

      def customer_vault
        @customer_vault ||= Api::CustomerVaultApi.new(@config)
      end

      def card_payments
        @card_payments ||= Api::CardPaymentsApi.new(@config)
      end

      def payments
        @payments ||= Api::PaymentsApi.new(@config)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paysafe-0.12.0 lib/paysafe/rest/client.rb