checkout_sdk 1.0.0.beta.0 → 1.0.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/README.md +57 -0
- data/lib/checkout_sdk/abstract_checkout_sdk_builder.rb +25 -4
- data/lib/checkout_sdk/accounts/account_holder.rb +35 -0
- data/lib/checkout_sdk/accounts/accounts.rb +30 -0
- data/lib/checkout_sdk/accounts/accounts_client.rb +65 -0
- data/lib/checkout_sdk/accounts/business_type.rb +15 -0
- data/lib/checkout_sdk/accounts/company.rb +35 -0
- data/lib/checkout_sdk/accounts/contact_details.rb +14 -0
- data/lib/checkout_sdk/accounts/date_of_birth.rb +17 -0
- data/lib/checkout_sdk/accounts/document.rb +17 -0
- data/lib/checkout_sdk/accounts/document_type.rb +14 -0
- data/lib/checkout_sdk/accounts/entity_document.rb +14 -0
- data/lib/checkout_sdk/accounts/entity_email_addresses.rb +11 -0
- data/lib/checkout_sdk/accounts/entity_financial_details.rb +20 -0
- data/lib/checkout_sdk/accounts/entity_financial_documents.rb +14 -0
- data/lib/checkout_sdk/accounts/file_request.rb +8 -0
- data/lib/checkout_sdk/accounts/identification.rb +14 -0
- data/lib/checkout_sdk/accounts/individual.rb +38 -0
- data/lib/checkout_sdk/accounts/instrument_document.rb +14 -0
- data/lib/checkout_sdk/accounts/onboard_entity.rb +23 -0
- data/lib/checkout_sdk/accounts/payment_instrument.rb +50 -0
- data/lib/checkout_sdk/accounts/phone.rb +11 -0
- data/lib/checkout_sdk/accounts/place_of_birth.rb +11 -0
- data/lib/checkout_sdk/accounts/profile.rb +17 -0
- data/lib/checkout_sdk/accounts/representative.rb +35 -0
- data/lib/checkout_sdk/accounts/schedule_frequency_daily.rb +11 -0
- data/lib/checkout_sdk/accounts/schedule_frequency_monthly.rb +15 -0
- data/lib/checkout_sdk/accounts/schedule_frequency_type.rb +11 -0
- data/lib/checkout_sdk/accounts/schedule_frequency_weekly.rb +15 -0
- data/lib/checkout_sdk/accounts/schedule_request.rb +19 -0
- data/lib/checkout_sdk/accounts/update_schedule.rb +17 -0
- data/lib/checkout_sdk/api_client.rb +17 -22
- data/lib/checkout_sdk/apm/apm.rb +0 -1
- data/lib/checkout_sdk/apm/previous/klarna/credit_session_request.rb +19 -21
- data/lib/checkout_sdk/apm/previous/klarna/klarna.rb +13 -15
- data/lib/checkout_sdk/apm/previous/klarna/klarna_client.rb +43 -45
- data/lib/checkout_sdk/apm/previous/klarna/klarna_product.rb +19 -21
- data/lib/checkout_sdk/apm/previous/klarna/order_capture_request.rb +24 -26
- data/lib/checkout_sdk/apm/previous/sepa/sepa_client.rb +25 -27
- data/lib/checkout_sdk/checkout_api.rb +28 -2
- data/lib/checkout_sdk/checkout_configuration.rb +6 -4
- data/lib/checkout_sdk/checkout_oauth_sdk_builder.rb +3 -1
- data/lib/checkout_sdk/checkout_static_keys_sdk_builder.rb +2 -1
- data/lib/checkout_sdk/checkout_utils.rb +28 -4
- data/lib/checkout_sdk/common/account_holder.rb +4 -1
- data/lib/checkout_sdk/common/common.rb +3 -1
- data/lib/checkout_sdk/common/file_request.rb +5 -2
- data/lib/checkout_sdk/common/marketplace_data.rb +14 -0
- data/lib/checkout_sdk/common/payment_source_type.rb +1 -0
- data/lib/checkout_sdk/common/product.rb +17 -0
- data/lib/checkout_sdk/common/shipping_info.rb +29 -0
- data/lib/checkout_sdk/customers/customer_request.rb +2 -2
- data/lib/checkout_sdk/disputes/disputes_client.rb +5 -0
- data/lib/checkout_sdk/disputes/disputes_query_filter.rb +3 -3
- data/lib/checkout_sdk/instruments/base_instruments_client.rb +20 -0
- data/lib/checkout_sdk/instruments/{update/update_instrument_request.rb → create/instrument.rb} +3 -1
- data/lib/checkout_sdk/instruments/create/{instrument_bank_account_request.rb → instrument_bank_account.rb} +1 -1
- data/lib/checkout_sdk/instruments/create/{instrument_token_request.rb → instrument_token.rb} +1 -1
- data/lib/checkout_sdk/instruments/instruments.rb +14 -7
- data/lib/checkout_sdk/instruments/instruments_client.rb +4 -15
- data/lib/checkout_sdk/instruments/previous/create/instrument.rb +26 -0
- data/lib/checkout_sdk/instruments/previous/instruments_client.rb +28 -0
- data/lib/checkout_sdk/instruments/previous/update/update_instrument.rb +25 -0
- data/lib/checkout_sdk/instruments/{create/instrument_request.rb → update/update_instrument.rb} +3 -1
- data/lib/checkout_sdk/instruments/update/{update_instrument_bank_account_request.rb → update_instrument_bank_account.rb} +1 -1
- data/lib/checkout_sdk/instruments/update/{update_instrument_card_request.rb → update_instrument_card.rb} +1 -1
- data/lib/checkout_sdk/instruments/update/{update_instrument_token_request.rb → update_instrument_token.rb} +1 -1
- data/lib/checkout_sdk/oauth_scopes.rb +2 -0
- data/lib/checkout_sdk/oauth_sdk_credentials.rb +5 -13
- data/lib/checkout_sdk/payments/base_payments_client.rb +46 -0
- data/lib/checkout_sdk/payments/billing_information.rb +14 -0
- data/lib/checkout_sdk/payments/billing_plan.rb +17 -0
- data/lib/checkout_sdk/payments/billing_plan_type.rb +14 -0
- data/lib/checkout_sdk/payments/capture_request.rb +4 -0
- data/lib/checkout_sdk/payments/destination/destination.rb +1 -1
- data/lib/checkout_sdk/payments/hosted/hosted_payments_client.rb +25 -0
- data/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +87 -0
- data/lib/checkout_sdk/payments/links/payment_link.rb +84 -0
- data/lib/checkout_sdk/payments/links/payments_links_client.rb +25 -0
- data/lib/checkout_sdk/payments/payment_request.rb +5 -1
- data/lib/checkout_sdk/payments/payment_type.rb +0 -1
- data/lib/checkout_sdk/payments/payments.rb +92 -23
- data/lib/checkout_sdk/payments/payments_client.rb +1 -36
- data/lib/checkout_sdk/payments/payments_query_filter.rb +17 -0
- data/lib/checkout_sdk/payments/payout_request.rb +1 -1
- data/lib/checkout_sdk/payments/previous/capture_request.rb +19 -0
- data/lib/checkout_sdk/payments/previous/destination/card_destination.rb +38 -0
- data/lib/checkout_sdk/payments/previous/destination/destination.rb +21 -0
- data/lib/checkout_sdk/payments/previous/destination/id_destination.rb +23 -0
- data/lib/checkout_sdk/payments/previous/destination/token_destination.rb +29 -0
- data/lib/checkout_sdk/payments/previous/fund_transfer_type.rb +17 -0
- data/lib/checkout_sdk/payments/previous/payment_request.rb +73 -0
- data/lib/checkout_sdk/payments/previous/payments_client.rb +43 -0
- data/lib/checkout_sdk/payments/previous/payout_request.rb +70 -0
- data/lib/checkout_sdk/payments/previous/source/apm/alipay_source.rb +13 -0
- data/lib/checkout_sdk/payments/previous/source/apm/alma_source.rb +23 -0
- data/lib/checkout_sdk/payments/previous/source/apm/bancontact_source.rb +26 -0
- data/lib/checkout_sdk/payments/previous/source/apm/benefit_pay_source.rb +17 -0
- data/lib/checkout_sdk/payments/previous/source/apm/boleto_source.rb +26 -0
- data/lib/checkout_sdk/payments/previous/source/apm/eps_source.rb +20 -0
- data/lib/checkout_sdk/payments/previous/source/apm/fawry_source.rb +47 -0
- data/lib/checkout_sdk/payments/previous/source/apm/giropay_source.rb +32 -0
- data/lib/checkout_sdk/payments/previous/source/apm/ideal_source.rb +23 -0
- data/lib/checkout_sdk/payments/previous/source/apm/integration_type.rb +12 -0
- data/lib/checkout_sdk/payments/previous/source/apm/klarna_source.rb +56 -0
- data/lib/checkout_sdk/payments/previous/source/apm/knet_source.rb +38 -0
- data/lib/checkout_sdk/payments/previous/source/apm/multi_banco_source.rb +23 -0
- data/lib/checkout_sdk/payments/previous/source/apm/oxxo_source.rb +26 -0
- data/lib/checkout_sdk/payments/previous/source/apm/p24_source.rb +26 -0
- data/lib/checkout_sdk/payments/previous/source/apm/pago_facil_source.rb +26 -0
- data/lib/checkout_sdk/payments/previous/source/apm/paypal_source.rb +26 -0
- data/lib/checkout_sdk/payments/previous/source/apm/poli_source.rb +13 -0
- data/lib/checkout_sdk/payments/previous/source/apm/qpay_source.rb +26 -0
- data/lib/checkout_sdk/payments/previous/source/apm/rapi_pago_source.rb +26 -0
- data/lib/checkout_sdk/payments/previous/source/apm/sofort_source.rb +20 -0
- data/lib/checkout_sdk/payments/previous/source/card_source.rb +41 -0
- data/lib/checkout_sdk/payments/previous/source/customer_source.rb +17 -0
- data/lib/checkout_sdk/payments/previous/source/d_local_source.rb +41 -0
- data/lib/checkout_sdk/payments/previous/source/id_source.rb +20 -0
- data/lib/checkout_sdk/payments/previous/source/network_token_source.rb +47 -0
- data/lib/checkout_sdk/payments/previous/source/payment_source.rb +21 -0
- data/lib/checkout_sdk/payments/previous/source/token_source.rb +26 -0
- data/lib/checkout_sdk/payments/processing_settings.rb +15 -0
- data/lib/checkout_sdk/payments/sender/corporate_sender.rb +1 -1
- data/lib/checkout_sdk/payments/sender/government_sender.rb +1 -1
- data/lib/checkout_sdk/payments/sender/individual_sender.rb +1 -1
- data/lib/checkout_sdk/payments/sender/sender.rb +2 -2
- data/lib/checkout_sdk/payments/source/apm/after_pay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/alipay_plus_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/alma_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/apm/bancontact_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/benefit_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/eps_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/fawry_product.rb +20 -0
- data/lib/checkout_sdk/payments/source/apm/fawry_source.rb +30 -0
- data/lib/checkout_sdk/payments/source/apm/giropay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/ideal_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/klarna_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/apm/knet_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/mbway_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/multi_banco_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/p24_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/paypal_source.rb +5 -1
- data/lib/checkout_sdk/payments/source/apm/post_finance_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/qpay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/sofort_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/stcpay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/tamara_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/we_chat_pay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/bank_account_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/card_source.rb +3 -3
- data/lib/checkout_sdk/payments/source/currency_account_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/customer_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/id_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/network_token_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/{payment_request_source.rb → payment_source.rb} +2 -1
- data/lib/checkout_sdk/payments/source/{payout_request_source.rb → payout_source.rb} +3 -3
- data/lib/checkout_sdk/payments/source/provider_token_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/token_source.rb +1 -1
- data/lib/checkout_sdk/payments/three_ds_request.rb +7 -1
- data/lib/checkout_sdk/previous/checkout_api.rb +37 -5
- data/lib/checkout_sdk/previous/checkout_previous_static_keys_sdk_builder.rb +2 -1
- data/lib/checkout_sdk/reports/reports.rb +4 -0
- data/lib/checkout_sdk/reports/reports_client.rb +26 -0
- data/lib/checkout_sdk/reports/reports_query.rb +23 -0
- data/lib/checkout_sdk/sources/mandate_type.rb +12 -0
- data/lib/checkout_sdk/sources/sepa_source_request.rb +20 -0
- data/lib/checkout_sdk/sources/source_data.rb +28 -0
- data/lib/checkout_sdk/sources/source_request.rb +30 -0
- data/lib/checkout_sdk/sources/source_type.rb +11 -0
- data/lib/checkout_sdk/sources/sources.rb +9 -0
- data/lib/checkout_sdk/sources/sources_client.rb +23 -0
- data/lib/checkout_sdk/tokens/card_token_request.rb +2 -2
- data/lib/checkout_sdk/tokens/wallet_token_request.rb +1 -1
- data/lib/checkout_sdk/version.rb +1 -1
- data/lib/checkout_sdk/workflows/create_workflow.rb +20 -0
- data/lib/checkout_sdk/workflows/entity_workflow_condition.rb +15 -0
- data/lib/checkout_sdk/workflows/event_workflow_condition.rb +15 -0
- data/lib/checkout_sdk/workflows/patch_workflow.rb +14 -0
- data/lib/checkout_sdk/workflows/processing_channel_workflow_condition.rb +15 -0
- data/lib/checkout_sdk/workflows/reflow.rb +11 -0
- data/lib/checkout_sdk/workflows/reflow_by_events.rb +11 -0
- data/lib/checkout_sdk/workflows/reflow_by_subjects.rb +11 -0
- data/lib/checkout_sdk/workflows/webhook_signature.rb +14 -0
- data/lib/checkout_sdk/workflows/webhook_workflow_action.rb +21 -0
- data/lib/checkout_sdk/workflows/workflow_action.rb +19 -0
- data/lib/checkout_sdk/workflows/workflow_action_type.rb +9 -0
- data/lib/checkout_sdk/workflows/workflow_condition.rb +19 -0
- data/lib/checkout_sdk/workflows/workflow_condition_type.rb +11 -0
- data/lib/checkout_sdk/workflows/workflows.rb +18 -0
- data/lib/checkout_sdk/workflows/workflows_client.rb +115 -0
- data/lib/checkout_sdk.rb +6 -0
- metadata +124 -13
- data/lib/checkout_sdk/apm/previous/klarna/klarna_shipping_info.rb +0 -33
- data/lib/checkout_sdk/common/abstract_file_request.rb +0 -11
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute source
|
7
|
+
# @return [PaymentSource]
|
8
|
+
# @!attribute amount
|
9
|
+
# @return [Integer]
|
10
|
+
# @!attribute currency
|
11
|
+
# @return [String] {CheckoutSdk::Common::Currency}
|
12
|
+
# @!attribute payment_type
|
13
|
+
# @return [String] {CheckoutSdk::Payments::PaymentType}
|
14
|
+
# @!attribute merchant_initiated
|
15
|
+
# @return [TrueClass, FalseClass]
|
16
|
+
# @!attribute reference
|
17
|
+
# @return [String]
|
18
|
+
# @!attribute description
|
19
|
+
# @return [String]
|
20
|
+
# @!attribute capture
|
21
|
+
# @return [TrueClass, FalseClass]
|
22
|
+
# @!attribute capture_on
|
23
|
+
# @return [Time]
|
24
|
+
# @!attribute customer
|
25
|
+
# @return [CheckoutSdk::Common::CustomerRequest]
|
26
|
+
# @!attribute billing_descriptor
|
27
|
+
# @return [CheckoutSdk::Payments::BillingDescriptor]
|
28
|
+
# @!attribute shipping
|
29
|
+
# @return [CheckoutSdk::Payments::ShippingDetails]
|
30
|
+
# @!attribute three_ds
|
31
|
+
# @return [CheckoutSdk::Payments::ThreeDSRequest]
|
32
|
+
# @!attribute previous_payment_id
|
33
|
+
# @return [String]
|
34
|
+
# @!attribute risk
|
35
|
+
# @return [CheckoutSdk::Payments::RiskRequest]
|
36
|
+
# @!attribute success_url
|
37
|
+
# @return [String]
|
38
|
+
# @!attribute failure_url
|
39
|
+
# @return [String]
|
40
|
+
# @!attribute payment_ip
|
41
|
+
# @return [String]
|
42
|
+
# @!attribute recipient
|
43
|
+
# @return [CheckoutSdk::Payments::PaymentRecipient]
|
44
|
+
# @!attribute processing
|
45
|
+
# @return [CheckoutSdk::Payments::ProcessingSettings]
|
46
|
+
# @!attribute metadata
|
47
|
+
# @return [Hash{String => Object}]
|
48
|
+
class PaymentRequest
|
49
|
+
attr_accessor :source,
|
50
|
+
:amount,
|
51
|
+
:currency,
|
52
|
+
:payment_type,
|
53
|
+
:merchant_initiated,
|
54
|
+
:reference,
|
55
|
+
:description,
|
56
|
+
:capture,
|
57
|
+
:capture_on,
|
58
|
+
:customer,
|
59
|
+
:billing_descriptor,
|
60
|
+
:shipping,
|
61
|
+
:three_ds,
|
62
|
+
:previous_payment_id,
|
63
|
+
:risk,
|
64
|
+
:success_url,
|
65
|
+
:failure_url,
|
66
|
+
:payment_ip,
|
67
|
+
:recipient,
|
68
|
+
:processing,
|
69
|
+
:metadata
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
class PaymentsClient < CheckoutSdk::Payments::BasePaymentsClient
|
7
|
+
# @param [ApiClient] api_client
|
8
|
+
# @param [CheckoutConfiguration] configuration
|
9
|
+
def initialize(api_client, configuration)
|
10
|
+
super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH
|
11
|
+
end
|
12
|
+
|
13
|
+
# @param [PaymentRequest] payment_request
|
14
|
+
# @param [String, nil] idempotency_key
|
15
|
+
def request_payment(payment_request, idempotency_key = nil)
|
16
|
+
api_client.invoke_post(PAYMENTS_PATH,
|
17
|
+
sdk_authorization,
|
18
|
+
payment_request,
|
19
|
+
idempotency_key)
|
20
|
+
end
|
21
|
+
|
22
|
+
# @param [PayoutRequest] payout_request
|
23
|
+
# @param [String, nil] idempotency_key
|
24
|
+
def request_payout(payout_request, idempotency_key = nil)
|
25
|
+
api_client.invoke_post(PAYMENTS_PATH,
|
26
|
+
sdk_authorization,
|
27
|
+
payout_request,
|
28
|
+
idempotency_key)
|
29
|
+
end
|
30
|
+
|
31
|
+
# @param [String] payment_id
|
32
|
+
# @param [CaptureRequest] capture_request
|
33
|
+
# @param [String, nil] idempotency_key
|
34
|
+
def capture_payment(payment_id, capture_request = nil, idempotency_key = nil)
|
35
|
+
api_client.invoke_post(build_path(PAYMENTS_PATH, payment_id, 'captures'),
|
36
|
+
sdk_authorization,
|
37
|
+
capture_request,
|
38
|
+
idempotency_key)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute destination
|
7
|
+
# @return [Destination]
|
8
|
+
# @!attribute amount
|
9
|
+
# @return [Integer]
|
10
|
+
# @!attribute fund_transfer_type
|
11
|
+
# @return [String] {FundTransferType}
|
12
|
+
# @!attribute currency
|
13
|
+
# @return [String] {CheckoutSdk::Common::Currency}
|
14
|
+
# @!attribute payment_type
|
15
|
+
# @return [String] {CheckoutSdk::Payments::PaymentType}
|
16
|
+
# @!attribute reference
|
17
|
+
# @return [String]
|
18
|
+
# @!attribute description
|
19
|
+
# @return [String]
|
20
|
+
# @!attribute capture
|
21
|
+
# @return [TrueClass, FalseClass]
|
22
|
+
# @!attribute capture_on
|
23
|
+
# @return [Time]
|
24
|
+
# @!attribute customer
|
25
|
+
# @return [CheckoutSdk::Common::CustomerRequest]
|
26
|
+
# @!attribute billing_descriptor
|
27
|
+
# @return [CheckoutSdk::Payments::BillingDescriptor]
|
28
|
+
# @!attribute shipping
|
29
|
+
# @return [CheckoutSdk::Payments::ShippingDetails]
|
30
|
+
# @!attribute previous_payment_id
|
31
|
+
# @return [String]
|
32
|
+
# @!attribute risk
|
33
|
+
# @return [CheckoutSdk::Payments::RiskRequest]
|
34
|
+
# @!attribute success_url
|
35
|
+
# @return [String]
|
36
|
+
# @!attribute failure_url
|
37
|
+
# @return [String]
|
38
|
+
# @!attribute payment_ip
|
39
|
+
# @return [String]
|
40
|
+
# @!attribute recipient
|
41
|
+
# @return [CheckoutSdk::Payments::PaymentRecipient]
|
42
|
+
# @!attribute processing
|
43
|
+
# @return [Hash{String => Object}]
|
44
|
+
# @!attribute metadata
|
45
|
+
# @return [Hash{String => Object}]
|
46
|
+
class PayoutRequest
|
47
|
+
attr_accessor :destination,
|
48
|
+
:amount,
|
49
|
+
:fund_transfer_type,
|
50
|
+
:currency,
|
51
|
+
:payment_type,
|
52
|
+
:reference,
|
53
|
+
:description,
|
54
|
+
:capture,
|
55
|
+
:capture_on,
|
56
|
+
:customer,
|
57
|
+
:billing_descriptor,
|
58
|
+
:shipping,
|
59
|
+
:previous_payment_id,
|
60
|
+
:risk,
|
61
|
+
:success_url,
|
62
|
+
:failure_url,
|
63
|
+
:payment_ip,
|
64
|
+
:recipient,
|
65
|
+
:metadata,
|
66
|
+
:processing
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute billing_address
|
7
|
+
# @return [CheckoutSdk::Common::Address]
|
8
|
+
# @!attribute account_holder_name
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute billing_descriptor
|
11
|
+
# @return [String]
|
12
|
+
# @!attribute language
|
13
|
+
# @return [String]
|
14
|
+
class AlmaSource < PaymentSource
|
15
|
+
attr_accessor :billing_address
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
super CheckoutSdk::Common::PaymentSourceType::ALMA
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute payment_country
|
7
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
8
|
+
# @!attribute account_holder_name
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute billing_descriptor
|
11
|
+
# @return [String]
|
12
|
+
# @!attribute language
|
13
|
+
# @return [String]
|
14
|
+
class BancontactSource < PaymentSource
|
15
|
+
attr_accessor :payment_country,
|
16
|
+
:account_holder_name,
|
17
|
+
:billing_descriptor,
|
18
|
+
:language
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
super CheckoutSdk::Common::PaymentSourceType::BANCONTACT
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute integration_type
|
7
|
+
# @return [String] {IntegrationType}
|
8
|
+
class BenefitPaySource < PaymentSource
|
9
|
+
attr_accessor :integration_type
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
super CheckoutSdk::Common::PaymentSourceType::BENEFITPAY
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute integration_type
|
7
|
+
# @return [String] {IntegrationType}
|
8
|
+
# @!attribute country
|
9
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
10
|
+
# @!attribute description
|
11
|
+
# @return [String]
|
12
|
+
# @!attribute payer
|
13
|
+
# @return [CheckoutSdk::Payments::Payer]
|
14
|
+
class BoletoSource < PaymentSource
|
15
|
+
attr_accessor :integration_type,
|
16
|
+
:country,
|
17
|
+
:description,
|
18
|
+
:payer
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
super CheckoutSdk::Common::PaymentSourceType::BOLETO
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute purpose
|
7
|
+
# @return [String]
|
8
|
+
# @!attribute bic
|
9
|
+
# @return [String]
|
10
|
+
class EPSSource < PaymentSource
|
11
|
+
attr_accessor :purpose,
|
12
|
+
:bic
|
13
|
+
|
14
|
+
def initialize
|
15
|
+
super CheckoutSdk::Common::PaymentSourceType::EPS
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute description
|
7
|
+
# @return [String]
|
8
|
+
# @!attribute customer_profile_id
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute customer_email
|
11
|
+
# @return [String]
|
12
|
+
# @!attribute customer_mobile
|
13
|
+
# @return [String]
|
14
|
+
# @!attribute expires_on
|
15
|
+
# @return [Time]
|
16
|
+
# @!attribute products
|
17
|
+
# @return [Array(FawryProduct)]
|
18
|
+
class FawrySource < PaymentSource
|
19
|
+
attr_accessor :description,
|
20
|
+
:customer_profile_id,
|
21
|
+
:customer_email,
|
22
|
+
:customer_mobile,
|
23
|
+
:expires_on,
|
24
|
+
:products
|
25
|
+
|
26
|
+
def initialize
|
27
|
+
super CheckoutSdk::Common::PaymentSourceType::FAWRY
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# @!attribute product_id
|
32
|
+
# @return [String]
|
33
|
+
# @!attribute quantity
|
34
|
+
# @return [Integer]
|
35
|
+
# @!attribute price
|
36
|
+
# @return [Integer]
|
37
|
+
# @!attribute description
|
38
|
+
# @return [String]
|
39
|
+
class FawryProduct
|
40
|
+
attr_accessor :product_id,
|
41
|
+
:quantity,
|
42
|
+
:price,
|
43
|
+
:description
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute purpose
|
7
|
+
# @return [String]
|
8
|
+
# @!attribute bic
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute info_fieldss
|
11
|
+
# @return [InfoFields]
|
12
|
+
class GiropaySource < PaymentSource
|
13
|
+
attr_accessor :purpose,
|
14
|
+
:bic,
|
15
|
+
:info_fields
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
super CheckoutSdk::Common::PaymentSourceType::GIROPAY
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# @!attribute label
|
23
|
+
# @return [String]
|
24
|
+
# @!attribute text
|
25
|
+
# @return [String]
|
26
|
+
class InfoFields
|
27
|
+
attr_accessor :label,
|
28
|
+
:text
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute bic
|
7
|
+
# @return [String]
|
8
|
+
# @!attribute description
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute language
|
11
|
+
# @return [String]
|
12
|
+
class IdealSource < PaymentSource
|
13
|
+
attr_accessor :bic,
|
14
|
+
:description,
|
15
|
+
:language
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
super CheckoutSdk::Common::PaymentSourceType::IDEAL
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute authorization_token
|
7
|
+
# @return [String]
|
8
|
+
# @!attribute locale
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute purchase_country
|
11
|
+
# @return [CheckoutSdk::Common::Country]
|
12
|
+
# @!attribute auto_capture
|
13
|
+
# @return [TrueClass, FalseClass]
|
14
|
+
# @!attribute billing_address
|
15
|
+
# @return [Hash(String=>Object)]
|
16
|
+
# @!attribute shipping_address
|
17
|
+
# @return [Hash(String=>Object)]
|
18
|
+
# @!attribute tax_amount
|
19
|
+
# @return [Integer]
|
20
|
+
# @!attribute products
|
21
|
+
# @return [Array(Hash(String=>Object))]
|
22
|
+
# @!attribute customer
|
23
|
+
# @return [Hash(String=>Object)]
|
24
|
+
# @!attribute merchant_reference1
|
25
|
+
# @return [String]
|
26
|
+
# @!attribute merchant_reference2
|
27
|
+
# @return [String]
|
28
|
+
# @!attribute merchant_data
|
29
|
+
# @return [String]
|
30
|
+
# @!attribute attachment
|
31
|
+
# @return [Hash(String=>String)]
|
32
|
+
# @!attribute custom_payment_method_ids
|
33
|
+
# @return [Array(Hash(String=>String))]
|
34
|
+
class KlarnaSource < PaymentSource
|
35
|
+
attr_accessor :authorization_token,
|
36
|
+
:locale,
|
37
|
+
:purchase_country,
|
38
|
+
:auto_capture,
|
39
|
+
:billing_address,
|
40
|
+
:shipping_address,
|
41
|
+
:tax_amount,
|
42
|
+
:products,
|
43
|
+
:customer,
|
44
|
+
:merchant_reference1,
|
45
|
+
:merchant_reference2,
|
46
|
+
:merchant_data,
|
47
|
+
:attachment,
|
48
|
+
:custom_payment_method_ids
|
49
|
+
|
50
|
+
def initialize
|
51
|
+
super CheckoutSdk::Common::PaymentSourceType::KLARNA
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute language
|
7
|
+
# @return [String]
|
8
|
+
# @!attribute user_defined_field1
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute user_defined_field2
|
11
|
+
# @return [String]
|
12
|
+
# @!attribute user_defined_field3
|
13
|
+
# @return [String]
|
14
|
+
# @!attribute user_defined_field4
|
15
|
+
# @return [String]
|
16
|
+
# @!attribute user_defined_field5
|
17
|
+
# @return [String]
|
18
|
+
# @!attribute card_token
|
19
|
+
# @return [String]
|
20
|
+
# @!attribute ptlf
|
21
|
+
# @return [String]
|
22
|
+
class KnetSource < PaymentSource
|
23
|
+
attr_accessor :language,
|
24
|
+
:user_defined_field1,
|
25
|
+
:user_defined_field2,
|
26
|
+
:user_defined_field3,
|
27
|
+
:user_defined_field4,
|
28
|
+
:user_defined_field5,
|
29
|
+
:card_token,
|
30
|
+
:ptlf
|
31
|
+
|
32
|
+
def initialize
|
33
|
+
super CheckoutSdk::Common::PaymentSourceType::KNET
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute payment_country
|
7
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
8
|
+
# @!attribute account_holder_name
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute billing_descriptor
|
11
|
+
# @return [String]
|
12
|
+
class MultiBancoSource < PaymentSource
|
13
|
+
attr_accessor :payment_country,
|
14
|
+
:account_holder_name,
|
15
|
+
:billing_descriptor
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
super CheckoutSdk::Common::PaymentSourceType::MULTIBANCO
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute integration_type
|
7
|
+
# @return [String] {IntegrationType}
|
8
|
+
# @!attribute country
|
9
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
10
|
+
# @!attribute description
|
11
|
+
# @return [String]
|
12
|
+
# @!attribute payer
|
13
|
+
# @return [CheckoutSdk::Payments::Payer]
|
14
|
+
class OxxoSource < PaymentSource
|
15
|
+
attr_accessor :integration_type,
|
16
|
+
:country,
|
17
|
+
:description,
|
18
|
+
:payer
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
super CheckoutSdk::Common::PaymentSourceType::OXXO
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute payment_country
|
7
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
8
|
+
# @!attribute account_holder_name
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute account_holder_email
|
11
|
+
# @return [String]
|
12
|
+
# @!attribute billing_descriptor
|
13
|
+
# @return [String]
|
14
|
+
class P24Source < PaymentSource
|
15
|
+
attr_accessor :payment_country,
|
16
|
+
:account_holder_name,
|
17
|
+
:account_holder_email,
|
18
|
+
:billing_descriptor
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
super CheckoutSdk::Common::PaymentSourceType::P24
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute integration_type
|
7
|
+
# @return [String] {IntegrationType}
|
8
|
+
# @!attribute country
|
9
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
10
|
+
# @!attribute description
|
11
|
+
# @return [String]
|
12
|
+
# @!attribute payer
|
13
|
+
# @return [CheckoutSdk::Payments::Payer]
|
14
|
+
class PagoFacilSource < PaymentSource
|
15
|
+
attr_accessor :integration_type,
|
16
|
+
:country,
|
17
|
+
:description,
|
18
|
+
:payer
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
super CheckoutSdk::Common::PaymentSourceType::PAGOFACIL
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Payments
|
6
|
+
# @!attribute invoice_number
|
7
|
+
# @return [String]
|
8
|
+
# @!attribute recipient_name
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute logo_url
|
11
|
+
# @return [String]
|
12
|
+
# @!attribute stc
|
13
|
+
# @return [Hash(String=>String)]
|
14
|
+
class PayPalSource < PaymentSource
|
15
|
+
attr_accessor :invoice_number,
|
16
|
+
:recipient_name,
|
17
|
+
:logo_url,
|
18
|
+
:stc
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
super CheckoutSdk::Common::PaymentSourceType::PAYPAL
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|