Class: CheckoutSdk::Payments::HostedPaymentsClient

Inherits:
Client
  • Object
show all
Defined in:
lib/checkout_sdk/payments/hosted/hosted_payments_client.rb

Constant Summary collapse

HOSTED_PAYMENTS =
'hosted-payments'

Instance Attribute Summary

Attributes inherited from Client

#api_client, #authorization_type, #configuration

Instance Method Summary collapse

Constructor Details

#initialize(api_client, configuration) ⇒ HostedPaymentsClient

Returns a new instance of HostedPaymentsClient.

Parameters:



10
11
12
# File 'lib/checkout_sdk/payments/hosted/hosted_payments_client.rb', line 10

def initialize(api_client, configuration)
  super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY
end

Instance Method Details

#create_hosted_payments_page_session(hosted_payments_session) ⇒ Object

Parameters:



15
16
17
# File 'lib/checkout_sdk/payments/hosted/hosted_payments_client.rb', line 15

def create_hosted_payments_page_session(hosted_payments_session)
  api_client.invoke_post(HOSTED_PAYMENTS, sdk_authorization, hosted_payments_session)
end

#get_hosted_payments_page_details(hosted_payment_id) ⇒ Object

Parameters:

  • hosted_payment_id (String)


20
21
22
# File 'lib/checkout_sdk/payments/hosted/hosted_payments_client.rb', line 20

def get_hosted_payments_page_details(hosted_payment_id)
  api_client.invoke_get(build_path(HOSTED_PAYMENTS, hosted_payment_id), sdk_authorization)
end