class Paysafe::Api::PaymentsApi

Public Instance Methods

create_customer(**data) click to toggle source
# File lib/paysafe/api/payments_api.rb, line 9
def create_customer(**data)
  perform_post_with_object("/paymenthub/v1/customers", data, Customer)
end
create_payment(**data) click to toggle source
# File lib/paysafe/api/payments_api.rb, line 17
def create_payment(**data)
  perform_post_with_object("/paymenthub/v1/payments", data, Payment)
end
create_single_use_customer_token(id:) click to toggle source
# File lib/paysafe/api/payments_api.rb, line 13
def create_single_use_customer_token(id:)
  perform_post_with_object("/paymenthub/v1/customers/#{id}/singleusecustomertokens", {}, SingleUseToken)
end
create_standalone_credit(**data) click to toggle source
# File lib/paysafe/api/payments_api.rb, line 21
def create_standalone_credit(**data)
  perform_post_with_object("/paymenthub/v1/standalonecredits", data, StandaloneCredit)
end
get_customer(id:) click to toggle source
# File lib/paysafe/api/payments_api.rb, line 25
def get_customer(id:)
  perform_get_with_object("/paymenthub/v1/customers/#{id}", Customer)
end
get_payment(id:) click to toggle source
# File lib/paysafe/api/payments_api.rb, line 29
def get_payment(id:)
  perform_get_with_object("/paymenthub/v1/payments/#{id}", Payment)
end
get_payment_methods(currency_code:) click to toggle source
# File lib/paysafe/api/payments_api.rb, line 5
def get_payment_methods(currency_code:)
  perform_get_with_object("/paymenthub/v1/paymentmethods?currencyCode=#{currency_code}", PaymentMethods)
end
get_standalone_credit(id:) click to toggle source
# File lib/paysafe/api/payments_api.rb, line 33
def get_standalone_credit(id:)
  perform_get_with_object("/paymenthub/v1/standalonecredits/#{id}", StandaloneCredit)
end