Class: CheckoutSdk::PaymentMethods::PaymentMethodsClient

Inherits:
Client
  • Object
show all
Defined in:
lib/checkout_sdk/payment_methods/payment_methods_client.rb

Overview

Client for the Payment Methods configuration API. GET /payment-methods returns the configured payment methods for a processing channel.

Instance Attribute Summary

Attributes inherited from Client

#api_client, #authorization_type, #configuration

Instance Method Summary collapse

Constructor Details

#initialize(api_client, configuration) ⇒ PaymentMethodsClient

Returns a new instance of PaymentMethodsClient.

Parameters:



13
14
15
# File 'lib/checkout_sdk/payment_methods/payment_methods_client.rb', line 13

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

Instance Method Details

#get_payment_methods(payment_methods_query) ⇒ Object

Get available payment methods.

Parameters:



19
20
21
# File 'lib/checkout_sdk/payment_methods/payment_methods_client.rb', line 19

def get_payment_methods(payment_methods_query)
  api_client.invoke_get(PAYMENT_METHODS, sdk_authorization, payment_methods_query)
end