checkout_sdk 0.3.0 → 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
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute type
|
6
|
+
# @return [String] {SenderType}
|
7
|
+
# @!attribute reference
|
8
|
+
# @return [String]
|
9
|
+
class Sender
|
10
|
+
attr_accessor :type,
|
11
|
+
:reference
|
12
|
+
|
13
|
+
protected
|
14
|
+
|
15
|
+
# @abstract
|
16
|
+
# @param [String] type {SenderType}
|
17
|
+
def initialize(type)
|
18
|
+
@type = type
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
module SourceOfFunds
|
6
|
+
CREDIT = 'credit'
|
7
|
+
DEBIT = 'debit'
|
8
|
+
PREPAID = 'prepaid'
|
9
|
+
DEPOSIT_ACCOUNT = 'deposit_account'
|
10
|
+
MOBILE_MONEY_ACCOUNT = 'mobile_money_account'
|
11
|
+
CASH = 'cash'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute number
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute issue_date
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute issuing_carrier_code
|
10
|
+
# @return [String]
|
11
|
+
# @!attribute travel_agency_name
|
12
|
+
# @return [String]
|
13
|
+
# @!attribute travel_agency_code
|
14
|
+
# @return [String]
|
15
|
+
class Ticket
|
16
|
+
attr_accessor :number,
|
17
|
+
:issue_date,
|
18
|
+
:issuing_carrier_code,
|
19
|
+
:travel_agency_name,
|
20
|
+
:travel_agency_code
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute address
|
6
|
+
# @return [CheckoutSdk::Common::Address]
|
7
|
+
# @!attribute phone
|
8
|
+
# @return [CheckoutSdk::Common::Phone]
|
9
|
+
# @!attribute from_address_zip
|
10
|
+
# @return [String]
|
11
|
+
class ShippingDetails
|
12
|
+
attr_accessor :address,
|
13
|
+
:phone,
|
14
|
+
:from_address_zip
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute account_holder
|
6
|
+
# @return [CheckoutSdk::Common::AccountHolder]
|
7
|
+
class AfterPaySource < PaymentRequestSource
|
8
|
+
attr_accessor :account_holder
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Common::PaymentSourceType::AFTERPAY
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
class AlipayPlusSource < PaymentRequestSource
|
6
|
+
# @return [AlipayPlusSource] of type {CheckoutSdk::Common::PaymentSourceType::ALIPAY_PLUS}
|
7
|
+
def self.alipay_plus_source
|
8
|
+
AlipayPlusSource.new CheckoutSdk::Common::PaymentSourceType::ALIPAY_PLUS
|
9
|
+
end
|
10
|
+
|
11
|
+
# @return [AlipayPlusSource] of type {CheckoutSdk::Common::PaymentSourceType::ALIPAY_CN}
|
12
|
+
def self.alipay_plus_cn_source
|
13
|
+
AlipayPlusSource.new CheckoutSdk::Common::PaymentSourceType::ALIPAY_CN
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [AlipayPlusSource] of type {CheckoutSdk::Common::PaymentSourceType::GCASH}
|
17
|
+
def self.alipay_plus_gcash_source
|
18
|
+
AlipayPlusSource.new CheckoutSdk::Common::PaymentSourceType::GCASH
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [AlipayPlusSource] of type {CheckoutSdk::Common::PaymentSourceType::ALIPAY_HK}
|
22
|
+
def self.alipay_plus_hk_source
|
23
|
+
AlipayPlusSource.new CheckoutSdk::Common::PaymentSourceType::ALIPAY_HK
|
24
|
+
end
|
25
|
+
|
26
|
+
# @return [AlipayPlusSource] of type {CheckoutSdk::Common::PaymentSourceType::DANA}
|
27
|
+
def self.alipay_plus_dana_source
|
28
|
+
AlipayPlusSource.new CheckoutSdk::Common::PaymentSourceType::DANA
|
29
|
+
end
|
30
|
+
|
31
|
+
# @return [AlipayPlusSource] of type {CheckoutSdk::Common::PaymentSourceType::KAKAOPAY}
|
32
|
+
def self.alipay_plus_kakao_pay_source
|
33
|
+
AlipayPlusSource.new CheckoutSdk::Common::PaymentSourceType::KAKAOPAY
|
34
|
+
end
|
35
|
+
|
36
|
+
# @return [AlipayPlusSource] of type {CheckoutSdk::Common::PaymentSourceType::TRUEMONEY}
|
37
|
+
def self.alipay_plus_true_money_source
|
38
|
+
AlipayPlusSource.new CheckoutSdk::Common::PaymentSourceType::TRUEMONEY
|
39
|
+
end
|
40
|
+
|
41
|
+
# @return [AlipayPlusSource] of type {CheckoutSdk::Common::PaymentSourceType::TNG}
|
42
|
+
def self.alipay_plus_tng_source
|
43
|
+
AlipayPlusSource.new CheckoutSdk::Common::PaymentSourceType::TNG
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute payment_country
|
6
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
7
|
+
# @!attribute account_holder_name
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute billing_descriptor
|
10
|
+
# @return [String]
|
11
|
+
# @!attribute language
|
12
|
+
# @return [String]
|
13
|
+
class BancontactSource < PaymentRequestSource
|
14
|
+
attr_accessor :payment_country,
|
15
|
+
:account_holder_name,
|
16
|
+
:billing_descriptor,
|
17
|
+
:language
|
18
|
+
|
19
|
+
def initialize
|
20
|
+
super CheckoutSdk::Common::PaymentSourceType::BANCONTACT
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute purpose
|
6
|
+
# @return [String]
|
7
|
+
class EPSSource < PaymentRequestSource
|
8
|
+
attr_accessor :purpose
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Common::PaymentSourceType::EPS
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute purpose
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute info_fields
|
8
|
+
# @return [Array(InfoFields)]
|
9
|
+
class GiropaySource < PaymentRequestSource
|
10
|
+
attr_accessor :purpose,
|
11
|
+
:info_fields
|
12
|
+
|
13
|
+
def initialize
|
14
|
+
super CheckoutSdk::Common::PaymentSourceType::GIROPAY
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# @!attribute label
|
19
|
+
# @return [String]
|
20
|
+
# @!attribute text
|
21
|
+
# @return [String]
|
22
|
+
class InfoFields
|
23
|
+
attr_accessor :label,
|
24
|
+
:text
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute bic
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute description
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute language
|
10
|
+
# @return [String]
|
11
|
+
class IdealSource < PaymentRequestSource
|
12
|
+
attr_accessor :bic,
|
13
|
+
:description,
|
14
|
+
:language
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
super CheckoutSdk::Common::PaymentSourceType::IDEAL
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute language
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute user_defined_field1
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute user_defined_field2
|
10
|
+
# @return [String]
|
11
|
+
# @!attribute user_defined_field3
|
12
|
+
# @return [String]
|
13
|
+
# @!attribute user_defined_field4
|
14
|
+
# @return [String]
|
15
|
+
# @!attribute user_defined_field5
|
16
|
+
# @return [String]
|
17
|
+
# @!attribute card_token
|
18
|
+
# @return [String]
|
19
|
+
# @!attribute ptlf
|
20
|
+
# @return [String]
|
21
|
+
class KnetSource < PaymentRequestSource
|
22
|
+
attr_accessor :language,
|
23
|
+
:user_defined_field1,
|
24
|
+
:user_defined_field2,
|
25
|
+
:user_defined_field3,
|
26
|
+
:user_defined_field4,
|
27
|
+
:user_defined_field5,
|
28
|
+
:card_token,
|
29
|
+
:ptlf
|
30
|
+
|
31
|
+
def initialize
|
32
|
+
super CheckoutSdk::Common::PaymentSourceType::KNET
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute payment_country
|
6
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
7
|
+
# @!attribute account_holder_name
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute billing_descriptor
|
10
|
+
# @return [String]
|
11
|
+
class MultiBancoSource < PaymentRequestSource
|
12
|
+
attr_accessor :payment_country,
|
13
|
+
:account_holder_name,
|
14
|
+
:billing_descriptor
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
super CheckoutSdk::Common::PaymentSourceType::MULTIBANCO
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute payment_country
|
6
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
7
|
+
# @!attribute account_holder_name
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute account_holder_email
|
10
|
+
# @return [String]
|
11
|
+
# @!attribute billing_descriptor
|
12
|
+
# @return [String]
|
13
|
+
class P24Source < PaymentRequestSource
|
14
|
+
attr_accessor :payment_country,
|
15
|
+
:account_holder_name,
|
16
|
+
:account_holder_email,
|
17
|
+
:billing_descriptor
|
18
|
+
|
19
|
+
def initialize
|
20
|
+
super CheckoutSdk::Common::PaymentSourceType::P24
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute payment_country
|
6
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
7
|
+
# @!attribute account_holder_name
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute billing_descriptor
|
10
|
+
# @return [String]
|
11
|
+
class PostFinanceSource < PaymentRequestSource
|
12
|
+
attr_accessor :payment_country,
|
13
|
+
:account_holder_name,
|
14
|
+
:billing_descriptor
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
super CheckoutSdk::Common::PaymentSourceType::POSTFINANCE
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute quantity
|
6
|
+
# @return [Integer]
|
7
|
+
# @!attribute description
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute language
|
10
|
+
# @return [String]
|
11
|
+
# @!attribute national_id
|
12
|
+
# @return [String]
|
13
|
+
class QPaySource < PaymentRequestSource
|
14
|
+
attr_accessor :quantity,
|
15
|
+
:description,
|
16
|
+
:language,
|
17
|
+
:national_id
|
18
|
+
|
19
|
+
def initialize
|
20
|
+
super CheckoutSdk::Common::PaymentSourceType::QPAY
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute countryCode
|
6
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
7
|
+
# @!attribute languageCode
|
8
|
+
# @return [String]
|
9
|
+
class SofortSource < PaymentRequestSource
|
10
|
+
attr_accessor :countryCode,
|
11
|
+
:languageCode
|
12
|
+
|
13
|
+
def initialize
|
14
|
+
super CheckoutSdk::Common::PaymentSourceType::SOFORT
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute billing_address
|
6
|
+
# @return [CheckoutSdk::Common::Address]
|
7
|
+
class TamaraSource < PaymentRequestSource
|
8
|
+
attr_accessor :billing_address
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Common::PaymentSourceType::TAMARA
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute billing_address
|
6
|
+
# @return [CheckoutSdk::Common::Address]
|
7
|
+
class WeChatPaySource < PaymentRequestSource
|
8
|
+
attr_accessor :billing_address
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Common::PaymentSourceType::WECHATPAY
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute payment_method
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute account_type
|
8
|
+
# @return [String] {CheckoutSdk::Common::AccountType}
|
9
|
+
# @!attribute country
|
10
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
11
|
+
# @!attribute account_number
|
12
|
+
# @return [String]
|
13
|
+
# @!attribute bank_code
|
14
|
+
# @return [String]
|
15
|
+
# @!attribute account_holder
|
16
|
+
# @return [CheckoutSdk::Common::AccountHolder]
|
17
|
+
class BankAccountSource < PaymentRequestSource
|
18
|
+
attr_accessor :payment_method,
|
19
|
+
:account_type,
|
20
|
+
:country,
|
21
|
+
:account_number,
|
22
|
+
:bank_code,
|
23
|
+
:account_holder
|
24
|
+
|
25
|
+
def initialize
|
26
|
+
super CheckoutSdk::Common::PaymentSourceType::BANK_ACCOUNT
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute number
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute expiry_month
|
8
|
+
# @return [Integer]
|
9
|
+
# @!attribute expiry_year
|
10
|
+
# @return [Integer]
|
11
|
+
# @!attribute name
|
12
|
+
# @return [String]
|
13
|
+
# @!attribute cvv
|
14
|
+
# @return [String]
|
15
|
+
# @!attribute stored
|
16
|
+
# @return [TrueClass, FalseClass]
|
17
|
+
# @!attribute store_for_future_use
|
18
|
+
# @return [TrueClass, FalseClass]
|
19
|
+
# @!attribute billing_address
|
20
|
+
# @return [String] {CheckoutSdk::Common::Address}
|
21
|
+
# @!attribute phone
|
22
|
+
# @return [String] {CheckoutSdk::Common::Phone}
|
23
|
+
class CardSource < PaymentRequestSource
|
24
|
+
attr_accessor :number,
|
25
|
+
:expiry_month,
|
26
|
+
:expiry_year,
|
27
|
+
:name,
|
28
|
+
:cvv,
|
29
|
+
:stored,
|
30
|
+
:store_for_future_use,
|
31
|
+
:billing_address,
|
32
|
+
:phone
|
33
|
+
|
34
|
+
def initialize
|
35
|
+
super CheckoutSdk::Common::PaymentSourceType::CARD
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute id
|
6
|
+
# @return [String]
|
7
|
+
class CurrencyAccountSource < PayoutRequestSource
|
8
|
+
attr_accessor :id
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super PayoutSourceType::CURRENCY_ACCOUNT
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute id
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute cvv
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute payment_method
|
10
|
+
# @return [String]
|
11
|
+
class IdSource < PaymentRequestSource
|
12
|
+
attr_accessor :id,
|
13
|
+
:cvv,
|
14
|
+
:payment_method
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
super CheckoutSdk::Common::PaymentSourceType::ID
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute token
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute expiry_month
|
8
|
+
# @return [Integer]
|
9
|
+
# @!attribute expiry_year
|
10
|
+
# @return [Integer]
|
11
|
+
# @!attribute token_type
|
12
|
+
# @return [String] {NetworkTokenType}
|
13
|
+
# @!attribute cryptogram
|
14
|
+
# @return [String]
|
15
|
+
# @!attribute eci
|
16
|
+
# @return [String]
|
17
|
+
# @!attribute stored
|
18
|
+
# @return [TrueClass, FalseClass]
|
19
|
+
# @!attribute name
|
20
|
+
# @return [String]
|
21
|
+
# @!attribute cvv
|
22
|
+
# @return [String]
|
23
|
+
# @!attribute billing_address
|
24
|
+
# @return [CheckoutSdk::Common::Address]
|
25
|
+
# @!attribute phone
|
26
|
+
# @return [CheckoutSdk::Common::Phone]
|
27
|
+
class NetworkTokenSource < PaymentRequestSource
|
28
|
+
attr_accessor :token,
|
29
|
+
:expiry_month,
|
30
|
+
:expiry_year,
|
31
|
+
:token_type,
|
32
|
+
:cryptogram,
|
33
|
+
:eci,
|
34
|
+
:stored,
|
35
|
+
:name,
|
36
|
+
:cvv,
|
37
|
+
:billing_address,
|
38
|
+
:phone
|
39
|
+
|
40
|
+
def initialize
|
41
|
+
super CheckoutSdk::Common::PaymentSourceType::NETWORK_TOKEN
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|