checkout_sdk 0.3.2 → 1.0.0.beta.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +31 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +5 -2
- data/LICENSE.md +9 -0
- data/README.md +96 -110
- data/Rakefile +3 -1
- data/lib/checkout_sdk/abstract_checkout_sdk_builder.rb +28 -0
- data/lib/checkout_sdk/api_client.rb +135 -0
- data/lib/checkout_sdk/apm/apm.rb +12 -0
- data/lib/checkout_sdk/apm/ideal/ideal_client.rb +25 -0
- data/lib/checkout_sdk/apm/previous/klarna/credit_session_request.rb +30 -0
- data/lib/checkout_sdk/apm/previous/klarna/klarna.rb +24 -0
- data/lib/checkout_sdk/apm/previous/klarna/klarna_client.rb +55 -0
- data/lib/checkout_sdk/apm/previous/klarna/klarna_product.rb +30 -0
- data/lib/checkout_sdk/apm/previous/klarna/klarna_shipping_info.rb +33 -0
- data/lib/checkout_sdk/apm/previous/klarna/order_capture_request.rb +37 -0
- data/lib/checkout_sdk/apm/previous/sepa/sepa_client.rb +42 -0
- data/lib/checkout_sdk/authorization_type.rb +12 -0
- data/lib/checkout_sdk/checkout_api.rb +51 -0
- data/lib/checkout_sdk/checkout_configuration.rb +22 -0
- data/lib/checkout_sdk/checkout_oauth_sdk_builder.rb +52 -0
- data/lib/checkout_sdk/checkout_sdk_builder.rb +20 -0
- data/lib/checkout_sdk/checkout_static_keys_sdk_builder.rb +23 -0
- data/lib/checkout_sdk/checkout_utils.rb +15 -0
- data/lib/checkout_sdk/client.rb +46 -0
- data/lib/checkout_sdk/common/abstract_file_request.rb +11 -0
- data/lib/checkout_sdk/common/account_holder.rb +44 -0
- data/lib/checkout_sdk/common/account_holder_identification.rb +20 -0
- data/lib/checkout_sdk/common/account_holder_identification_type.rb +13 -0
- data/lib/checkout_sdk/common/account_holder_type.rb +11 -0
- data/lib/checkout_sdk/common/account_type.rb +11 -0
- data/lib/checkout_sdk/common/address.rb +26 -0
- data/lib/checkout_sdk/common/amount_allocations.rb +20 -0
- data/lib/checkout_sdk/common/bank_details.rb +17 -0
- data/lib/checkout_sdk/common/challenge_indicator.rb +12 -0
- data/lib/checkout_sdk/common/commission.rb +14 -0
- data/lib/checkout_sdk/common/common.rb +22 -0
- data/lib/checkout_sdk/common/country.rb +260 -0
- data/lib/checkout_sdk/common/currency.rb +168 -0
- data/lib/checkout_sdk/common/customer_request.rb +26 -0
- data/lib/checkout_sdk/common/file_purpose.rb +9 -0
- data/lib/checkout_sdk/common/file_request.rb +11 -0
- data/lib/checkout_sdk/common/instrument_type.rb +11 -0
- data/lib/checkout_sdk/common/payment_source_type.rb +52 -0
- data/lib/checkout_sdk/common/phone.rb +14 -0
- data/lib/checkout_sdk/common/update_customer_request.rb +14 -0
- data/lib/checkout_sdk/customers/customer_request.rb +26 -0
- data/lib/checkout_sdk/customers/customers.rb +4 -0
- data/lib/checkout_sdk/customers/customers_client.rb +37 -0
- data/lib/checkout_sdk/disputes/dispute_evidence_request.rb +60 -0
- data/lib/checkout_sdk/disputes/dispute_status.rb +19 -0
- data/lib/checkout_sdk/disputes/disputes.rb +6 -0
- data/lib/checkout_sdk/disputes/disputes_client.rb +55 -0
- data/lib/checkout_sdk/disputes/disputes_query_filter.rb +47 -0
- data/lib/checkout_sdk/environment.rb +59 -0
- data/lib/checkout_sdk/error.rb +30 -0
- data/lib/checkout_sdk/forex/forex.rb +4 -0
- data/lib/checkout_sdk/forex/forex_client.rb +21 -0
- data/lib/checkout_sdk/forex/quote_request.rb +23 -0
- data/lib/checkout_sdk/http_metadata.rb +9 -0
- data/lib/checkout_sdk/instruments/create/instrument_bank_account_request.rb +51 -0
- data/lib/checkout_sdk/instruments/create/instrument_request.rb +17 -0
- data/lib/checkout_sdk/instruments/create/instrument_token_request.rb +21 -0
- data/lib/checkout_sdk/instruments/get/bank_account_field_query.rb +14 -0
- data/lib/checkout_sdk/instruments/get/payment_network.rb +14 -0
- data/lib/checkout_sdk/instruments/instruments.rb +15 -0
- data/lib/checkout_sdk/instruments/instruments_client.rb +49 -0
- data/lib/checkout_sdk/instruments/update/update_instrument_bank_account_request.rb +51 -0
- data/lib/checkout_sdk/instruments/update/update_instrument_card_request.rb +27 -0
- data/lib/checkout_sdk/instruments/update/update_instrument_request.rb +17 -0
- data/lib/checkout_sdk/instruments/update/update_instrument_token_request.rb +15 -0
- data/lib/checkout_sdk/json_serializer.rb +54 -0
- data/lib/checkout_sdk/oauth_access_token.rb +27 -0
- data/lib/checkout_sdk/oauth_scopes.rb +41 -0
- data/lib/checkout_sdk/oauth_sdk_credentials.rb +112 -0
- data/lib/checkout_sdk/payments/airline_data.rb +17 -0
- data/lib/checkout_sdk/payments/authorization_request.rb +17 -0
- data/lib/checkout_sdk/payments/authorization_type.rb +11 -0
- data/lib/checkout_sdk/payments/billing_descriptor.rb +17 -0
- data/lib/checkout_sdk/payments/capture_request.rb +41 -0
- data/lib/checkout_sdk/payments/capture_type.rb +10 -0
- data/lib/checkout_sdk/payments/charge_bearer.rb +10 -0
- data/lib/checkout_sdk/payments/d_local_installments.rb +11 -0
- data/lib/checkout_sdk/payments/d_local_processing_settings.rb +17 -0
- data/lib/checkout_sdk/payments/destination/bank_account_destination.rb +42 -0
- data/lib/checkout_sdk/payments/destination/card_destination.rb +24 -0
- data/lib/checkout_sdk/payments/destination/destination.rb +19 -0
- data/lib/checkout_sdk/payments/destination/destination_type.rb +12 -0
- data/lib/checkout_sdk/payments/destination/id_destination.rb +18 -0
- data/lib/checkout_sdk/payments/destination/token_destination.rb +18 -0
- data/lib/checkout_sdk/payments/exemption.rb +17 -0
- data/lib/checkout_sdk/payments/flight_leg_details.rb +35 -0
- data/lib/checkout_sdk/payments/instruction_scheme.rb +11 -0
- data/lib/checkout_sdk/payments/merchant_initiated_reason.rb +12 -0
- data/lib/checkout_sdk/payments/network_token_type.rb +12 -0
- data/lib/checkout_sdk/payments/os_type.rb +10 -0
- data/lib/checkout_sdk/payments/passenger.rb +17 -0
- data/lib/checkout_sdk/payments/passenger_name.rb +11 -0
- data/lib/checkout_sdk/payments/payer.rb +17 -0
- data/lib/checkout_sdk/payments/payment_instruction.rb +32 -0
- data/lib/checkout_sdk/payments/payment_recipient.rb +20 -0
- data/lib/checkout_sdk/payments/payment_request.rb +86 -0
- data/lib/checkout_sdk/payments/payment_type.rb +13 -0
- data/lib/checkout_sdk/payments/payments.rb +82 -0
- data/lib/checkout_sdk/payments/payments_client.rb +86 -0
- data/lib/checkout_sdk/payments/payout_billing_descriptor.rb +11 -0
- data/lib/checkout_sdk/payments/payout_request.rb +38 -0
- data/lib/checkout_sdk/payments/preferred_schema.rb +11 -0
- data/lib/checkout_sdk/payments/processing_settings.rb +80 -0
- data/lib/checkout_sdk/payments/product.rb +47 -0
- data/lib/checkout_sdk/payments/product_type.rb +12 -0
- data/lib/checkout_sdk/payments/refund_request.rb +17 -0
- data/lib/checkout_sdk/payments/risk_request.rb +11 -0
- data/lib/checkout_sdk/payments/sender/corporate_sender.rb +27 -0
- data/lib/checkout_sdk/payments/sender/government_sender.rb +27 -0
- data/lib/checkout_sdk/payments/sender/individual_sender.rb +42 -0
- data/lib/checkout_sdk/payments/sender/instrument_sender.rb +11 -0
- data/lib/checkout_sdk/payments/sender/sender.rb +22 -0
- data/lib/checkout_sdk/payments/sender/sender_type.rb +12 -0
- data/lib/checkout_sdk/payments/sender/source_of_funds.rb +14 -0
- data/lib/checkout_sdk/payments/sender/ticket.rb +23 -0
- data/lib/checkout_sdk/payments/shipping_details.rb +17 -0
- data/lib/checkout_sdk/payments/shipping_preference.rb +11 -0
- data/lib/checkout_sdk/payments/source/apm/after_pay_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/apm/alipay_plus_source.rb +47 -0
- data/lib/checkout_sdk/payments/source/apm/bancontact_source.rb +24 -0
- data/lib/checkout_sdk/payments/source/apm/benefit_source.rb +11 -0
- data/lib/checkout_sdk/payments/source/apm/eps_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/apm/giropay_source.rb +27 -0
- data/lib/checkout_sdk/payments/source/apm/ideal_source.rb +21 -0
- data/lib/checkout_sdk/payments/source/apm/knet_source.rb +36 -0
- data/lib/checkout_sdk/payments/source/apm/mbway_source.rb +11 -0
- data/lib/checkout_sdk/payments/source/apm/multi_banco_source.rb +21 -0
- data/lib/checkout_sdk/payments/source/apm/p24_source.rb +24 -0
- data/lib/checkout_sdk/payments/source/apm/paypal_source.rb +11 -0
- data/lib/checkout_sdk/payments/source/apm/post_finance_source.rb +21 -0
- data/lib/checkout_sdk/payments/source/apm/qpay_source.rb +24 -0
- data/lib/checkout_sdk/payments/source/apm/sofort_source.rb +18 -0
- data/lib/checkout_sdk/payments/source/apm/stcpay_source.rb +11 -0
- data/lib/checkout_sdk/payments/source/apm/tamara_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/apm/we_chat_pay_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/bank_account_source.rb +30 -0
- data/lib/checkout_sdk/payments/source/card_source.rb +39 -0
- data/lib/checkout_sdk/payments/source/currency_account_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/id_source.rb +21 -0
- data/lib/checkout_sdk/payments/source/network_token_source.rb +45 -0
- data/lib/checkout_sdk/payments/source/payment_request_source.rb +18 -0
- data/lib/checkout_sdk/payments/source/payout_request_source.rb +22 -0
- data/lib/checkout_sdk/payments/source/payout_source_type.rb +9 -0
- data/lib/checkout_sdk/payments/source/provider_token_source.rb +21 -0
- data/lib/checkout_sdk/payments/source/token_source.rb +24 -0
- data/lib/checkout_sdk/payments/terminal_type.rb +11 -0
- data/lib/checkout_sdk/payments/three_ds_flow_type.rb +11 -0
- data/lib/checkout_sdk/payments/three_ds_request.rb +56 -0
- data/lib/checkout_sdk/payments/user_action.rb +10 -0
- data/lib/checkout_sdk/payments/void_request.rb +14 -0
- data/lib/checkout_sdk/platform_type.rb +10 -0
- data/lib/checkout_sdk/previous/checkout_api.rb +29 -0
- data/lib/checkout_sdk/previous/checkout_previous_sdk_builder.rb +11 -0
- data/lib/checkout_sdk/previous/checkout_previous_static_keys_sdk_builder.rb +24 -0
- data/lib/checkout_sdk/previous/previous_static_keys_sdk_credentials.rb +38 -0
- data/lib/checkout_sdk/sdk_authorization.rb +25 -0
- data/lib/checkout_sdk/sdk_credentials.rb +12 -0
- data/lib/checkout_sdk/sessions/authentication_method.rb +14 -0
- data/lib/checkout_sdk/sessions/authentication_type.rb +10 -0
- data/lib/checkout_sdk/sessions/card_holder_account_info.rb +32 -0
- data/lib/checkout_sdk/sessions/category.rb +10 -0
- data/lib/checkout_sdk/sessions/channel/app_session.rb +36 -0
- data/lib/checkout_sdk/sessions/channel/browser_session.rb +42 -0
- data/lib/checkout_sdk/sessions/channel/channel_data.rb +19 -0
- data/lib/checkout_sdk/sessions/channel/channel_data_type.rb +10 -0
- data/lib/checkout_sdk/sessions/channel/sdk_ephemeral_public_key.rb +19 -0
- data/lib/checkout_sdk/sessions/channel/sdk_interface_type.rb +11 -0
- data/lib/checkout_sdk/sessions/channel/three_ds_method_completion.rb +11 -0
- data/lib/checkout_sdk/sessions/channel/uie_elements.rb +13 -0
- data/lib/checkout_sdk/sessions/completion/completion_info.rb +19 -0
- data/lib/checkout_sdk/sessions/completion/completion_info_type.rb +10 -0
- data/lib/checkout_sdk/sessions/completion/hosted_completion_info.rb +21 -0
- data/lib/checkout_sdk/sessions/completion/non_hosted_completion_info.rb +15 -0
- data/lib/checkout_sdk/sessions/delivery_timeframe.rb +12 -0
- data/lib/checkout_sdk/sessions/installment.rb +17 -0
- data/lib/checkout_sdk/sessions/merchant_risk_info.rb +23 -0
- data/lib/checkout_sdk/sessions/recurring.rb +14 -0
- data/lib/checkout_sdk/sessions/session_address.rb +11 -0
- data/lib/checkout_sdk/sessions/session_marketplace_data.rb +11 -0
- data/lib/checkout_sdk/sessions/session_request.rb +68 -0
- data/lib/checkout_sdk/sessions/session_secret_credentials.rb +28 -0
- data/lib/checkout_sdk/sessions/session_source_type.rb +12 -0
- data/lib/checkout_sdk/sessions/sessions.rb +47 -0
- data/lib/checkout_sdk/sessions/sessions_billing_descriptor.rb +11 -0
- data/lib/checkout_sdk/sessions/sessions_client.rb +64 -0
- data/lib/checkout_sdk/sessions/shipping_indicator.rb +9 -0
- data/lib/checkout_sdk/sessions/source/card_source.rb +30 -0
- data/lib/checkout_sdk/sessions/source/id_source.rb +15 -0
- data/lib/checkout_sdk/sessions/source/network_token_source.rb +27 -0
- data/lib/checkout_sdk/sessions/source/session_scheme.rb +14 -0
- data/lib/checkout_sdk/sessions/source/session_source.rb +37 -0
- data/lib/checkout_sdk/sessions/source/token_source.rb +18 -0
- data/lib/checkout_sdk/sessions/three_ds_method_completion_request.rb +11 -0
- data/lib/checkout_sdk/sessions/transaction_type.rb +13 -0
- data/lib/checkout_sdk/static_keys_builder.rb +35 -0
- data/lib/checkout_sdk/static_keys_sdk_credentials.rb +35 -0
- data/lib/checkout_sdk/tokens/apple_pay_token_data.rb +20 -0
- data/lib/checkout_sdk/tokens/apple_pay_token_request.rb +15 -0
- data/lib/checkout_sdk/tokens/card_token_request.rb +36 -0
- data/lib/checkout_sdk/tokens/google_pay_token_data.rb +17 -0
- data/lib/checkout_sdk/tokens/google_pay_token_request.rb +15 -0
- data/lib/checkout_sdk/tokens/token_type.rb +11 -0
- data/lib/checkout_sdk/tokens/tokens.rb +10 -0
- data/lib/checkout_sdk/tokens/tokens_client.rb +21 -0
- data/lib/checkout_sdk/tokens/wallet_token_request.rb +19 -0
- data/lib/checkout_sdk/version.rb +3 -1
- data/lib/checkout_sdk.rb +59 -21
- data/sig/checkout_sdk.rbs +4 -0
- metadata +254 -81
- data/.gitignore +0 -11
- data/.travis.yml +0 -7
- data/Gemfile.lock +0 -45
- data/LICENSE +0 -21
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/checkout_sdk.gemspec +0 -24
- data/documentation/.gitignore +0 -20
- data/documentation/docs/environment.md +0 -26
- data/documentation/docs/getting_started.md +0 -48
- data/documentation/docs/initialize.md +0 -19
- data/documentation/docs/install.md +0 -21
- data/documentation/docs/payments.md +0 -200
- data/documentation/docs/sources.md +0 -53
- data/documentation/docs/tokens.md +0 -88
- data/documentation/docusaurus.config.js +0 -60
- data/documentation/package-lock.json +0 -13511
- data/documentation/package.json +0 -32
- data/documentation/sidebars.js +0 -10
- data/documentation/src/css/custom.css +0 -103
- data/documentation/src/pages/index.js +0 -10
- data/documentation/src/pages/styles.module.css +0 -37
- data/documentation/static/img/favicon.png +0 -0
- data/documentation/static/img/logo.png +0 -0
- data/documentation/static/img/undraw_docusaurus_mountain.svg +0 -170
- data/documentation/static/img/undraw_docusaurus_react.svg +0 -169
- data/documentation/static/img/undraw_docusaurus_tree.svg +0 -1
- data/documentation/yarn.lock +0 -9369
- data/lib/checkout_sdk/api_resource.rb +0 -77
- data/lib/checkout_sdk/configuration.rb +0 -10
- data/lib/checkout_sdk/data/capture_payment.rb +0 -11
- data/lib/checkout_sdk/data/payment_request_source.rb +0 -145
- data/lib/checkout_sdk/data/payment_source.rb +0 -40
- data/lib/checkout_sdk/data/refund_payment.rb +0 -11
- data/lib/checkout_sdk/data/request_token.rb +0 -67
- data/lib/checkout_sdk/data/void_payment.rb +0 -10
- data/spec/checkout_sdk/api_resource_spec.rb +0 -126
- data/spec/checkout_sdk/data/payment_request_source_spec.rb +0 -126
- data/spec/checkout_sdk/data/request_token_spec.rb +0 -107
- data/spec/checkout_sdk_spec.rb +0 -21
- data/spec/spec_helper.rb +0 -32
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'checkout_sdk/common/abstract_file_request'
|
4
|
+
require 'checkout_sdk/common/account_type'
|
5
|
+
require 'checkout_sdk/common/customer_request'
|
6
|
+
require 'checkout_sdk/common/amount_allocations'
|
7
|
+
require 'checkout_sdk/common/currency'
|
8
|
+
require 'checkout_sdk/common/account_holder_identification'
|
9
|
+
require 'checkout_sdk/common/account_holder'
|
10
|
+
require 'checkout_sdk/common/country'
|
11
|
+
require 'checkout_sdk/common/account_holder_identification_type'
|
12
|
+
require 'checkout_sdk/common/account_holder_type'
|
13
|
+
require 'checkout_sdk/common/instrument_type'
|
14
|
+
require 'checkout_sdk/common/bank_details'
|
15
|
+
require 'checkout_sdk/common/payment_source_type'
|
16
|
+
require 'checkout_sdk/common/commission'
|
17
|
+
require 'checkout_sdk/common/address'
|
18
|
+
require 'checkout_sdk/common/phone'
|
19
|
+
require 'checkout_sdk/common/file_request'
|
20
|
+
require 'checkout_sdk/common/file_purpose'
|
21
|
+
require 'checkout_sdk/common/challenge_indicator'
|
22
|
+
require 'checkout_sdk/common/update_customer_request'
|
@@ -0,0 +1,260 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Common
|
5
|
+
module Country
|
6
|
+
AF = 'AF'
|
7
|
+
AX = 'AX'
|
8
|
+
AL = 'AL'
|
9
|
+
DZ = 'DZ'
|
10
|
+
AS = 'AS'
|
11
|
+
AD = 'AD'
|
12
|
+
AO = 'AO'
|
13
|
+
AI = 'AI'
|
14
|
+
AG = 'AG'
|
15
|
+
AR = 'AR'
|
16
|
+
AM = 'AM'
|
17
|
+
AW = 'AW'
|
18
|
+
AC = 'AC'
|
19
|
+
AU = 'AU'
|
20
|
+
AQ = 'AQ'
|
21
|
+
AT = 'AT'
|
22
|
+
AZ = 'AZ'
|
23
|
+
BS = 'BS'
|
24
|
+
BH = 'BH'
|
25
|
+
BD = 'BD'
|
26
|
+
BB = 'BB'
|
27
|
+
BY = 'BY'
|
28
|
+
BE = 'BE'
|
29
|
+
BZ = 'BZ'
|
30
|
+
BJ = 'BJ'
|
31
|
+
BM = 'BM'
|
32
|
+
BT = 'BT'
|
33
|
+
BO = 'BO'
|
34
|
+
BQ = 'BQ'
|
35
|
+
BA = 'BA'
|
36
|
+
BW = 'BW'
|
37
|
+
BV = 'BV'
|
38
|
+
BR = 'BR'
|
39
|
+
IO = 'IO'
|
40
|
+
VG = 'VG'
|
41
|
+
BN = 'BN'
|
42
|
+
BG = 'BG'
|
43
|
+
BF = 'BF'
|
44
|
+
BI = 'BI'
|
45
|
+
KH = 'KH'
|
46
|
+
CM = 'CM'
|
47
|
+
CA = 'CA'
|
48
|
+
CV = 'CV'
|
49
|
+
KY = 'KY'
|
50
|
+
CF = 'CF'
|
51
|
+
TD = 'TD'
|
52
|
+
CL = 'CL'
|
53
|
+
CN = 'CN'
|
54
|
+
TW = 'TW'
|
55
|
+
CX = 'CX'
|
56
|
+
PF = 'PF'
|
57
|
+
CC = 'CC'
|
58
|
+
CO = 'CO'
|
59
|
+
KM = 'KM'
|
60
|
+
CG = 'CG'
|
61
|
+
CD = 'CD'
|
62
|
+
CK = 'CK'
|
63
|
+
CR = 'CR'
|
64
|
+
CI = 'CI'
|
65
|
+
HR = 'HR'
|
66
|
+
CU = 'CU'
|
67
|
+
CW = 'CW'
|
68
|
+
CY = 'CY'
|
69
|
+
CZ = 'CZ'
|
70
|
+
DK = 'DK'
|
71
|
+
DJ = 'DJ'
|
72
|
+
DM = 'DM'
|
73
|
+
DO = 'DO'
|
74
|
+
EC = 'EC'
|
75
|
+
EG = 'EG'
|
76
|
+
SV = 'SV'
|
77
|
+
GQ = 'GQ'
|
78
|
+
ER = 'ER'
|
79
|
+
EE = 'EE'
|
80
|
+
SZ = 'SZ'
|
81
|
+
ET = 'ET'
|
82
|
+
FK = 'FK'
|
83
|
+
FO = 'FO'
|
84
|
+
FJ = 'FJ'
|
85
|
+
FI = 'FI'
|
86
|
+
FR = 'FR'
|
87
|
+
GF = 'GF'
|
88
|
+
TF = 'TF'
|
89
|
+
GA = 'GA'
|
90
|
+
GM = 'GM'
|
91
|
+
GE = 'GE'
|
92
|
+
DE = 'DE'
|
93
|
+
GH = 'GH'
|
94
|
+
GI = 'GI'
|
95
|
+
GR = 'GR'
|
96
|
+
GL = 'GL'
|
97
|
+
GD = 'GD'
|
98
|
+
GP = 'GP'
|
99
|
+
GU = 'GU'
|
100
|
+
GT = 'GT'
|
101
|
+
GG = 'GG'
|
102
|
+
GN = 'GN'
|
103
|
+
GW = 'GW'
|
104
|
+
GY = 'GY'
|
105
|
+
HT = 'HT'
|
106
|
+
HM = 'HM'
|
107
|
+
HN = 'HN'
|
108
|
+
HK = 'HK'
|
109
|
+
HU = 'HU'
|
110
|
+
IS = 'IS'
|
111
|
+
IN = 'IN'
|
112
|
+
ID = 'ID'
|
113
|
+
IR = 'IR'
|
114
|
+
IQ = 'IQ'
|
115
|
+
IE = 'IE'
|
116
|
+
IM = 'IM'
|
117
|
+
IL = 'IL'
|
118
|
+
IT = 'IT'
|
119
|
+
JM = 'JM'
|
120
|
+
JP = 'JP'
|
121
|
+
JE = 'JE'
|
122
|
+
JO = 'JO'
|
123
|
+
KZ = 'KZ'
|
124
|
+
KE = 'KE'
|
125
|
+
KI = 'KI'
|
126
|
+
KP = 'KP'
|
127
|
+
KR = 'KR'
|
128
|
+
KW = 'KW'
|
129
|
+
KG = 'KG'
|
130
|
+
LA = 'LA'
|
131
|
+
LV = 'LV'
|
132
|
+
LB = 'LB'
|
133
|
+
LS = 'LS'
|
134
|
+
LR = 'LR'
|
135
|
+
LY = 'LY'
|
136
|
+
LI = 'LI'
|
137
|
+
LT = 'LT'
|
138
|
+
LU = 'LU'
|
139
|
+
MO = 'MO'
|
140
|
+
MK = 'MK'
|
141
|
+
MG = 'MG'
|
142
|
+
MW = 'MW'
|
143
|
+
MY = 'MY'
|
144
|
+
MV = 'MV'
|
145
|
+
ML = 'ML'
|
146
|
+
MT = 'MT'
|
147
|
+
MH = 'MH'
|
148
|
+
MQ = 'MQ'
|
149
|
+
MR = 'MR'
|
150
|
+
MU = 'MU'
|
151
|
+
YT = 'YT'
|
152
|
+
MX = 'MX'
|
153
|
+
FM = 'FM'
|
154
|
+
MD = 'MD'
|
155
|
+
MC = 'MC'
|
156
|
+
MN = 'MN'
|
157
|
+
ME = 'ME'
|
158
|
+
MS = 'MS'
|
159
|
+
MA = 'MA'
|
160
|
+
MZ = 'MZ'
|
161
|
+
MM = 'MM'
|
162
|
+
NA = 'NA'
|
163
|
+
NR = 'NR'
|
164
|
+
NP = 'NP'
|
165
|
+
NL = 'NL'
|
166
|
+
AN = 'AN'
|
167
|
+
NC = 'NC'
|
168
|
+
NZ = 'NZ'
|
169
|
+
NI = 'NI'
|
170
|
+
NE = 'NE'
|
171
|
+
NG = 'NG'
|
172
|
+
NU = 'NU'
|
173
|
+
NF = 'NF'
|
174
|
+
MP = 'MP'
|
175
|
+
NO = 'NO'
|
176
|
+
OM = 'OM'
|
177
|
+
PK = 'PK'
|
178
|
+
PW = 'PW'
|
179
|
+
PA = 'PA'
|
180
|
+
PG = 'PG'
|
181
|
+
PY = 'PY'
|
182
|
+
PE = 'PE'
|
183
|
+
PH = 'PH'
|
184
|
+
PN = 'PN'
|
185
|
+
PL = 'PL'
|
186
|
+
PT = 'PT'
|
187
|
+
PR = 'PR'
|
188
|
+
QA = 'QA'
|
189
|
+
RE = 'RE'
|
190
|
+
RO = 'RO'
|
191
|
+
RU = 'RU'
|
192
|
+
RW = 'RW'
|
193
|
+
BL = 'BL'
|
194
|
+
SH = 'SH'
|
195
|
+
KN = 'KN'
|
196
|
+
LC = 'LC'
|
197
|
+
MF = 'MF'
|
198
|
+
PM = 'PM'
|
199
|
+
VC = 'VC'
|
200
|
+
WS = 'WS'
|
201
|
+
SM = 'SM'
|
202
|
+
ST = 'ST'
|
203
|
+
SA = 'SA'
|
204
|
+
SN = 'SN'
|
205
|
+
RS = 'RS'
|
206
|
+
SC = 'SC'
|
207
|
+
SL = 'SL'
|
208
|
+
SG = 'SG'
|
209
|
+
SX = 'SX'
|
210
|
+
SK = 'SK'
|
211
|
+
SI = 'SI'
|
212
|
+
SB = 'SB'
|
213
|
+
SO = 'SO'
|
214
|
+
ZA = 'ZA'
|
215
|
+
GS = 'GS'
|
216
|
+
SS = 'SS'
|
217
|
+
ES = 'ES'
|
218
|
+
LK = 'LK'
|
219
|
+
SD = 'SD'
|
220
|
+
SR = 'SR'
|
221
|
+
SJ = 'SJ'
|
222
|
+
SE = 'SE'
|
223
|
+
CH = 'CH'
|
224
|
+
SY = 'SY'
|
225
|
+
TJ = 'TJ'
|
226
|
+
TZ = 'TZ'
|
227
|
+
TH = 'TH'
|
228
|
+
TL = 'TL'
|
229
|
+
TG = 'TG'
|
230
|
+
TK = 'TK'
|
231
|
+
TO = 'TO'
|
232
|
+
TT = 'TT'
|
233
|
+
TA = 'TA'
|
234
|
+
TN = 'TN'
|
235
|
+
TR = 'TR'
|
236
|
+
TM = 'TM'
|
237
|
+
TC = 'TC'
|
238
|
+
TV = 'TV'
|
239
|
+
VI = 'VI'
|
240
|
+
UG = 'UG'
|
241
|
+
UA = 'UA'
|
242
|
+
AE = 'AE'
|
243
|
+
GB = 'GB'
|
244
|
+
US = 'US'
|
245
|
+
UY = 'UY'
|
246
|
+
UZ = 'UZ'
|
247
|
+
VU = 'VU'
|
248
|
+
VA = 'VA'
|
249
|
+
VE = 'VE'
|
250
|
+
VN = 'VN'
|
251
|
+
UM = 'UM'
|
252
|
+
WF = 'WF'
|
253
|
+
EH = 'EH'
|
254
|
+
YE = 'YE'
|
255
|
+
ZM = 'ZM'
|
256
|
+
ZW = 'ZW'
|
257
|
+
PS = 'PS'
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
@@ -0,0 +1,168 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Common
|
5
|
+
module Currency
|
6
|
+
ALL = 'ALL'
|
7
|
+
STN = 'STN'
|
8
|
+
EEK = 'EEK'
|
9
|
+
BHD = 'BHD'
|
10
|
+
SCR = 'SCR'
|
11
|
+
DJF = 'DJF'
|
12
|
+
EGP = 'EGP'
|
13
|
+
MDL = 'MDL'
|
14
|
+
MZN = 'MZN'
|
15
|
+
BND = 'BND'
|
16
|
+
ZMK = 'ZMK'
|
17
|
+
SHP = 'SHP'
|
18
|
+
LBP = 'LBP'
|
19
|
+
AWG = 'AWG'
|
20
|
+
JMD = 'JMD'
|
21
|
+
KES = 'KES'
|
22
|
+
BYN = 'BYN'
|
23
|
+
KHR = 'KHR'
|
24
|
+
LAK = 'LAK'
|
25
|
+
MVR = 'MVR'
|
26
|
+
AOA = 'AOA'
|
27
|
+
TJS = 'TJS'
|
28
|
+
SVC = 'SVC'
|
29
|
+
GNF = 'GNF'
|
30
|
+
BRL = 'BRL'
|
31
|
+
MOP = 'MOP'
|
32
|
+
BOB = 'BOB'
|
33
|
+
CDF = 'CDF'
|
34
|
+
NAD = 'NAD'
|
35
|
+
LYD = 'LYD'
|
36
|
+
VUV = 'VUV'
|
37
|
+
QAR = 'QAR'
|
38
|
+
CLP = 'CLP'
|
39
|
+
HRK = 'HRK'
|
40
|
+
ISK = 'ISK'
|
41
|
+
FKP = 'FKP'
|
42
|
+
XCD = 'XCD'
|
43
|
+
NOK = 'NOK'
|
44
|
+
CUP = 'CUP'
|
45
|
+
VND = 'VND'
|
46
|
+
PEN = 'PEN'
|
47
|
+
KMF = 'KMF'
|
48
|
+
LVL = 'LVL'
|
49
|
+
MMK = 'MMK'
|
50
|
+
TRY = 'TRY'
|
51
|
+
VEF = 'VEF'
|
52
|
+
AUD = 'AUD'
|
53
|
+
TWD = 'TWD'
|
54
|
+
PKR = 'PKR'
|
55
|
+
SLL = 'SLL'
|
56
|
+
BGN = 'BGN'
|
57
|
+
LRD = 'LRD'
|
58
|
+
LKR = 'LKR'
|
59
|
+
XAF = 'XAF'
|
60
|
+
JOD = 'JOD'
|
61
|
+
ANG = 'ANG'
|
62
|
+
BSD = 'BSD'
|
63
|
+
CAD = 'CAD'
|
64
|
+
GIP = 'GIP'
|
65
|
+
MNT = 'MNT'
|
66
|
+
LTL = 'LTL'
|
67
|
+
BBD = 'BBD'
|
68
|
+
CLF = 'CLF'
|
69
|
+
BWP = 'BWP'
|
70
|
+
COP = 'COP'
|
71
|
+
PHP = 'PHP'
|
72
|
+
HUF = 'HUF'
|
73
|
+
FJD = 'FJD'
|
74
|
+
MWK = 'MWK'
|
75
|
+
THB = 'THB'
|
76
|
+
XPF = 'XPF'
|
77
|
+
RSD = 'RSD'
|
78
|
+
SAR = 'SAR'
|
79
|
+
UYU = 'UYU'
|
80
|
+
BZD = 'BZD'
|
81
|
+
SYP = 'SYP'
|
82
|
+
GMD = 'GMD'
|
83
|
+
SZL = 'SZL'
|
84
|
+
SBD = 'SBD'
|
85
|
+
ETB = 'ETB'
|
86
|
+
CHF = 'CHF'
|
87
|
+
MXN = 'MXN'
|
88
|
+
ARS = 'ARS'
|
89
|
+
GTQ = 'GTQ'
|
90
|
+
GHS = 'GHS'
|
91
|
+
NIO = 'NIO'
|
92
|
+
JPY = 'JPY'
|
93
|
+
BDT = 'BDT'
|
94
|
+
UZS = 'UZS'
|
95
|
+
SOS = 'SOS'
|
96
|
+
BTN = 'BTN'
|
97
|
+
NZD = 'NZD'
|
98
|
+
TZS = 'TZS'
|
99
|
+
IQD = 'IQD'
|
100
|
+
MGA = 'MGA'
|
101
|
+
DZD = 'DZD'
|
102
|
+
GYD = 'GYD'
|
103
|
+
USD = 'USD'
|
104
|
+
KWD = 'KWD'
|
105
|
+
CNY = 'CNY'
|
106
|
+
PYG = 'PYG'
|
107
|
+
SGD = 'SGD'
|
108
|
+
KZT = 'KZT'
|
109
|
+
PGK = 'PGK'
|
110
|
+
AMD = 'AMD'
|
111
|
+
GBP = 'GBP'
|
112
|
+
AFN = 'AFN'
|
113
|
+
CRC = 'CRC'
|
114
|
+
XOF = 'XOF'
|
115
|
+
YER = 'YER'
|
116
|
+
MRU = 'MRU'
|
117
|
+
DKK = 'DKK'
|
118
|
+
TOP = 'TOP'
|
119
|
+
INR = 'INR'
|
120
|
+
SDG = 'SDG'
|
121
|
+
DOP = 'DOP'
|
122
|
+
ZWL = 'ZWL'
|
123
|
+
UGX = 'UGX'
|
124
|
+
SEK = 'SEK'
|
125
|
+
LSL = 'LSL'
|
126
|
+
MYR = 'MYR'
|
127
|
+
TMT = 'TMT'
|
128
|
+
OMR = 'OMR'
|
129
|
+
BMD = 'BMD'
|
130
|
+
KRW = 'KRW'
|
131
|
+
HKD = 'HKD'
|
132
|
+
KGS = 'KGS'
|
133
|
+
BAM = 'BAM'
|
134
|
+
NGN = 'NGN'
|
135
|
+
ILS = 'ILS'
|
136
|
+
MUR = 'MUR'
|
137
|
+
RON = 'RON'
|
138
|
+
TND = 'TND'
|
139
|
+
AED = 'AED'
|
140
|
+
PAB = 'PAB'
|
141
|
+
NPR = 'NPR'
|
142
|
+
TTD = 'TTD'
|
143
|
+
RWF = 'RWF'
|
144
|
+
HTG = 'HTG'
|
145
|
+
IDR = 'IDR'
|
146
|
+
EUR = 'EUR'
|
147
|
+
KYD = 'KYD'
|
148
|
+
IRR = 'IRR'
|
149
|
+
KPW = 'KPW'
|
150
|
+
MKD = 'MKD'
|
151
|
+
SRD = 'SRD'
|
152
|
+
HNL = 'HNL'
|
153
|
+
AZN = 'AZN'
|
154
|
+
ERN = 'ERN'
|
155
|
+
CZK = 'CZK'
|
156
|
+
CVE = 'CVE'
|
157
|
+
BIF = 'BIF'
|
158
|
+
MAD = 'MAD'
|
159
|
+
RUB = 'RUB'
|
160
|
+
UAH = 'UAH'
|
161
|
+
WST = 'WST'
|
162
|
+
PLN = 'PLN'
|
163
|
+
ZAR = 'ZAR'
|
164
|
+
GEL = 'GEL'
|
165
|
+
ZMW = 'ZMW'
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Common
|
5
|
+
# @!attribute id
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute email
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute name
|
10
|
+
# @return [String]
|
11
|
+
# @!attribute tax_number
|
12
|
+
# @return [String]
|
13
|
+
# @!attribute phone
|
14
|
+
# @return [Phone]
|
15
|
+
# @!attribute default
|
16
|
+
# @return [TrueClass, FalseClass]
|
17
|
+
class CustomerRequest
|
18
|
+
attr_accessor :id,
|
19
|
+
:email,
|
20
|
+
:name,
|
21
|
+
:tax_number,
|
22
|
+
:phone,
|
23
|
+
:default
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Common
|
5
|
+
module PaymentSourceType
|
6
|
+
CARD = 'card'
|
7
|
+
ID = 'id'
|
8
|
+
NETWORK_TOKEN = 'network_token'
|
9
|
+
TOKEN = 'token'
|
10
|
+
CUSTOMER = 'customer'
|
11
|
+
D_LOCAL = 'dlocal'
|
12
|
+
KLARNA = 'klarna'
|
13
|
+
CURRENCY_ACCOUNT = 'currency_account'
|
14
|
+
BALOTO = 'baloto'
|
15
|
+
BOLETO = 'boleto'
|
16
|
+
FAWRY = 'fawry'
|
17
|
+
GIROPAY = 'giropay'
|
18
|
+
IDEAL = 'ideal'
|
19
|
+
OXXO = 'oxxo'
|
20
|
+
PAGOFACIL = 'pagofacil'
|
21
|
+
RAPIPAGO = 'rapipago'
|
22
|
+
SOFORT = 'sofort'
|
23
|
+
KNET = 'knet'
|
24
|
+
QPAY = 'qpay'
|
25
|
+
ALIPAY = 'alipay'
|
26
|
+
PAYPAL = 'paypal'
|
27
|
+
MULTIBANCO = 'multibanco'
|
28
|
+
EPS = 'eps'
|
29
|
+
POLI = 'poli'
|
30
|
+
P24 = 'p24'
|
31
|
+
BENEFITPAY = 'benefitpay'
|
32
|
+
BANCONTACT = 'bancontact'
|
33
|
+
TAMARA = 'tamara'
|
34
|
+
PROVIDER_TOKEN = 'provider_token'
|
35
|
+
BANK_ACCOUNT = 'bank_account'
|
36
|
+
WECHATPAY = 'wechatpay'
|
37
|
+
ALIPAY_HK = 'alipay_hk'
|
38
|
+
ALIPAY_CN = 'alipay_cn'
|
39
|
+
ALIPAY_PLUS = 'alipay_plus'
|
40
|
+
GCASH = 'gcash'
|
41
|
+
DANA = 'dana'
|
42
|
+
KAKAOPAY = 'kakaopay'
|
43
|
+
TRUEMONEY = 'truemoney'
|
44
|
+
TNG = 'tng'
|
45
|
+
AFTERPAY = 'afterpay'
|
46
|
+
BENEFIT = 'benefit'
|
47
|
+
MBWAY = 'mbway'
|
48
|
+
POSTFINANCE = 'postfinance'
|
49
|
+
STCPAY = 'stcpay'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Common
|
5
|
+
# @!attribute id
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute default
|
8
|
+
# @return [TrueClass, FalseClass]
|
9
|
+
class UpdateCustomerRequest
|
10
|
+
attr_accessor :id,
|
11
|
+
:default
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Customers
|
5
|
+
# @!attribute email
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute name
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute phone
|
10
|
+
# @return [CheckoutSdk::Common::Phone]
|
11
|
+
# @!attribute metadata
|
12
|
+
# @return [Hash{String => Object}]
|
13
|
+
# @!attribute default
|
14
|
+
# @return [String]
|
15
|
+
# @!attribute instruments
|
16
|
+
# @return [Array(String)]
|
17
|
+
class CustomerRequest
|
18
|
+
attr_accessor :email,
|
19
|
+
:name,
|
20
|
+
:phone,
|
21
|
+
:metadata,
|
22
|
+
:default,
|
23
|
+
:instruments
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Customers
|
5
|
+
class CustomersClient < Client
|
6
|
+
CUSTOMERS = 'customers'
|
7
|
+
private_constant :CUSTOMERS
|
8
|
+
|
9
|
+
# @param [ApiClient] api_client
|
10
|
+
# @param [CheckoutConfiguration] configuration
|
11
|
+
def initialize(api_client, configuration)
|
12
|
+
super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH
|
13
|
+
end
|
14
|
+
|
15
|
+
# @param [CustomerRequest] customer_request
|
16
|
+
def create(customer_request)
|
17
|
+
api_client.invoke_post(CUSTOMERS, sdk_authorization, customer_request)
|
18
|
+
end
|
19
|
+
|
20
|
+
# @param [String] customer_id
|
21
|
+
def get(customer_id)
|
22
|
+
api_client.invoke_get(build_path(CUSTOMERS, customer_id), sdk_authorization)
|
23
|
+
end
|
24
|
+
|
25
|
+
# @param [String] customer_id
|
26
|
+
# @param [CustomerRequest] customer_request
|
27
|
+
def update(customer_id, customer_request)
|
28
|
+
api_client.invoke_patch(build_path(CUSTOMERS, customer_id), sdk_authorization, customer_request)
|
29
|
+
end
|
30
|
+
|
31
|
+
# @param [String] customer_id
|
32
|
+
def delete(customer_id)
|
33
|
+
api_client.invoke_delete(build_path(CUSTOMERS, customer_id), sdk_authorization)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|