Sha256: 552b8ccd5a7fb13641fff6b25756ee8cf039e0cfbe9da098ad8a0ab38d38934c

Contents?: true

Size: 765 Bytes

Versions: 1

Compression:

Stored size: 765 Bytes

Contents

module Paysafe
  module Api
    class PaymentsApi < BaseApi

      def get_payment_methods(currency_code:)
        perform_get_with_object("/paymenthub/v1/paymentmethods?currencyCode=#{currency_code}", PaymentMethods)
      end

      def create_payment(**data)
        perform_post_with_object("/paymenthub/v1/payments", data, Payment)
      end

      def create_standalone_credit(**data)
        perform_post_with_object("/paymenthub/v1/standalonecredits", data, StandaloneCredit)
      end

      def get_payment(id:)
        perform_get_with_object("/paymenthub/v1/payments/#{id}", Payment)
      end

      def get_standalone_credit(id:)
        perform_get_with_object("/paymenthub/v1/standalonecredits/#{id}", StandaloneCredit)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paysafe-0.11.0 lib/paysafe/api/payments_api.rb