Class: CheckoutSdk::Client
- Inherits:
-
Object
- Object
- CheckoutSdk::Client
show all
- Defined in:
- lib/checkout_sdk/client.rb
Direct Known Subclasses
Accounts::AccountsClient, Apm::IdealClient, Balances::BalancesClient, CheckoutSdk::Customers::CustomersClient, Disputes::DisputesClient, Financial::FinancialClient, Forex::ForexClient, Forward::ForwardClient, Instruments::BaseInstrumentsClient, Issuing::IssuingClient, Metadata::MetadataClient, Payments::BasePaymentsClient, Payments::HostedPaymentsClient, Payments::PaymentContextsClient, Payments::PaymentSessionsClient, Payments::PaymentsLinksClient, Previous::Apm::KlarnaClient, Previous::Apm::SepaClient, Previous::Events::EventsClient, Previous::Reconciliation::ReconciliationClient, Previous::Sources::SourcesClient, Previous::Webhooks::WebhooksClient, Reports::ReportsClient, Risk::RiskClient, Sessions::SessionsClient, Tokens::TokensClient, Transfers::TransfersClient, Workflows::WorkflowsClient
Instance Attribute Summary collapse
Instance Attribute Details
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/checkout_sdk/client.rb', line 10
class Client
attr_reader :api_client,
:authorization_type,
:configuration
protected
def initialize(api_client, configuration, authorization_type)
@api_client = api_client
@authorization_type = authorization_type
@configuration = configuration
end
def build_path(*args)
args.join('/')
end
def sandbox?
@configuration.environment.is_sandbox
end
def sdk_authorization(authorization_type = nil)
if authorization_type.nil?
configuration.credentials.get_authorization(@authorization_type)
else
configuration.credentials.get_authorization(authorization_type)
end
end
end
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/checkout_sdk/client.rb', line 10
class Client
attr_reader :api_client,
:authorization_type,
:configuration
protected
def initialize(api_client, configuration, authorization_type)
@api_client = api_client
@authorization_type = authorization_type
@configuration = configuration
end
def build_path(*args)
args.join('/')
end
def sandbox?
@configuration.environment.is_sandbox
end
def sdk_authorization(authorization_type = nil)
if authorization_type.nil?
configuration.credentials.get_authorization(@authorization_type)
else
configuration.credentials.get_authorization(authorization_type)
end
end
end
|
#configuration ⇒ String
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/checkout_sdk/client.rb', line 10
class Client
attr_reader :api_client,
:authorization_type,
:configuration
protected
def initialize(api_client, configuration, authorization_type)
@api_client = api_client
@authorization_type = authorization_type
@configuration = configuration
end
def build_path(*args)
args.join('/')
end
def sandbox?
@configuration.environment.is_sandbox
end
def sdk_authorization(authorization_type = nil)
if authorization_type.nil?
configuration.credentials.get_authorization(@authorization_type)
else
configuration.credentials.get_authorization(authorization_type)
end
end
end
|