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
@@ -17,10 +17,10 @@ module CheckoutSdk
|
|
17
17
|
# @!attribute store_for_future_use
|
18
18
|
# @return [TrueClass, FalseClass]
|
19
19
|
# @!attribute billing_address
|
20
|
-
# @return [
|
20
|
+
# @return [CheckoutSdk::Common::Address]
|
21
21
|
# @!attribute phone
|
22
|
-
# @return [
|
23
|
-
class CardSource <
|
22
|
+
# @return [CheckoutSdk::Common::Phone]
|
23
|
+
class CardSource < PaymentSource
|
24
24
|
attr_accessor :number,
|
25
25
|
:expiry_month,
|
26
26
|
:expiry_year,
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute id
|
6
|
+
# @return [String]
|
7
|
+
class CustomerSource < PaymentSource
|
8
|
+
attr_accessor :id
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Common::PaymentSourceType::CUSTOMER
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -24,7 +24,7 @@ module CheckoutSdk
|
|
24
24
|
# @return [CheckoutSdk::Common::Address]
|
25
25
|
# @!attribute phone
|
26
26
|
# @return [CheckoutSdk::Common::Phone]
|
27
|
-
class NetworkTokenSource <
|
27
|
+
class NetworkTokenSource < PaymentSource
|
28
28
|
attr_accessor :token,
|
29
29
|
:expiry_month,
|
30
30
|
:expiry_year,
|
@@ -4,11 +4,12 @@ module CheckoutSdk
|
|
4
4
|
module Payments
|
5
5
|
# @!attribute type
|
6
6
|
# @return [String] {CheckoutSdk::Common::PaymentSourceType}
|
7
|
-
class
|
7
|
+
class PaymentSource
|
8
8
|
attr_reader :type
|
9
9
|
|
10
10
|
protected
|
11
11
|
|
12
|
+
# @abstract
|
12
13
|
# @param [String] type {CheckoutSdk::Common::PaymentSourceType}
|
13
14
|
def initialize(type)
|
14
15
|
@type = type
|
@@ -8,7 +8,7 @@ module CheckoutSdk
|
|
8
8
|
# @return [String]
|
9
9
|
# @!attribute account_holder
|
10
10
|
# @return [CheckoutSdk::Common::AccountHolder]
|
11
|
-
class ProviderTokenSource <
|
11
|
+
class ProviderTokenSource < PaymentSource
|
12
12
|
attr_accessor :payment_method,
|
13
13
|
:token,
|
14
14
|
:account_holder
|
@@ -10,7 +10,7 @@ module CheckoutSdk
|
|
10
10
|
# @return [CheckoutSdk::Common::Phone]
|
11
11
|
# @!attribute store_for_future_use
|
12
12
|
# @return [TrueClass, FalseClass]
|
13
|
-
class TokenSource <
|
13
|
+
class TokenSource < PaymentSource
|
14
14
|
attr_accessor :token,
|
15
15
|
:billing_address,
|
16
16
|
:phone,
|
@@ -18,6 +18,8 @@ module CheckoutSdk
|
|
18
18
|
# @return [String] {Exemption}
|
19
19
|
# @!attribute challenge_indicator
|
20
20
|
# @return [String] {ChallengeIndicator}
|
21
|
+
# @!attribute allow_upgrade
|
22
|
+
# @return [TrueClass, FalseClass]
|
21
23
|
# @!attribute status
|
22
24
|
# @return [String]
|
23
25
|
# @!attribute authentication_date
|
@@ -34,6 +36,8 @@ module CheckoutSdk
|
|
34
36
|
# @return [String]
|
35
37
|
# @!attribute cryptogram_algorithm
|
36
38
|
# @return [String]
|
39
|
+
# @!attribute authentication_id
|
40
|
+
# @return [String]
|
37
41
|
class ThreeDSRequest
|
38
42
|
attr_accessor :enabled,
|
39
43
|
:attempt_n3d,
|
@@ -43,6 +47,7 @@ module CheckoutSdk
|
|
43
47
|
:version,
|
44
48
|
:exemption,
|
45
49
|
:challenge_indicator,
|
50
|
+
:allow_upgrade,
|
46
51
|
:status,
|
47
52
|
:authentication_date,
|
48
53
|
:authentication_amount,
|
@@ -50,7 +55,8 @@ module CheckoutSdk
|
|
50
55
|
:status_reason_code,
|
51
56
|
:challenge_cancel_reason,
|
52
57
|
:score,
|
53
|
-
:cryptogram_algorithm
|
58
|
+
:cryptogram_algorithm,
|
59
|
+
:authentication_id
|
54
60
|
end
|
55
61
|
end
|
56
62
|
end
|
@@ -2,19 +2,51 @@
|
|
2
2
|
|
3
3
|
module CheckoutSdk
|
4
4
|
module Previous
|
5
|
+
# @!attribute customers
|
6
|
+
# @return [CheckoutSdk::Customers::CustomerClient]
|
7
|
+
# @!attribute disputes
|
8
|
+
# @return [CheckoutSdk::Disputes::DisputesClient]
|
9
|
+
# @!attribute payments
|
10
|
+
# @return [CheckoutSdk::Payments::HostedPaymentsClient]
|
11
|
+
# @!attribute instruments
|
12
|
+
# @return [CheckoutSdk::Previous::Instruments::InstrumentsClient]
|
13
|
+
# @!attribute links
|
14
|
+
# @return [CheckoutSdk::Payments::PaymentsLinksClient]
|
15
|
+
# @!attribute payments
|
16
|
+
# @return [CheckoutSdk::Payments::PaymentsClient]
|
17
|
+
# @!attribute sources
|
18
|
+
# @return [CheckoutSdk::Previous::Sources::SourcesClient]
|
19
|
+
# @!attribute tokens
|
20
|
+
# @return [CheckoutSdk::Tokens::TokensClient]
|
5
21
|
# @!attribute klarna
|
6
|
-
# @return [CheckoutSdk::Previous::Apm::
|
22
|
+
# @return [CheckoutSdk::Previous::Apm::KlarnaClient]
|
7
23
|
# @!attribute sepa
|
8
|
-
# @return [CheckoutSdk::Previous::Apm::
|
24
|
+
# @return [CheckoutSdk::Previous::Apm::SepaClient]
|
9
25
|
class CheckoutApi
|
10
|
-
attr_reader :
|
26
|
+
attr_reader :customers,
|
27
|
+
:disputes,
|
28
|
+
:hosted,
|
29
|
+
:instruments,
|
30
|
+
:links,
|
31
|
+
:payments,
|
32
|
+
:sources,
|
33
|
+
:tokens,
|
34
|
+
:klarna,
|
11
35
|
:sepa
|
12
36
|
|
13
37
|
# @param [CheckoutConfiguration] configuration
|
14
38
|
def initialize(configuration)
|
15
39
|
api_client = base_api_client configuration
|
16
|
-
@
|
17
|
-
@
|
40
|
+
@customers = CheckoutSdk::Customers::CustomersClient.new api_client, configuration
|
41
|
+
@disputes = CheckoutSdk::Disputes::DisputesClient.new api_client, configuration
|
42
|
+
@hosted = CheckoutSdk::Payments::HostedPaymentsClient.new api_client, configuration
|
43
|
+
@instruments = CheckoutSdk::Previous::Instruments::InstrumentsClient.new api_client, configuration
|
44
|
+
@links = CheckoutSdk::Payments::PaymentsLinksClient.new api_client, configuration
|
45
|
+
@payments = CheckoutSdk::Previous::Payments::PaymentsClient.new api_client, configuration
|
46
|
+
@sources = CheckoutSdk::Previous::Sources::SourcesClient.new api_client, configuration
|
47
|
+
@tokens = CheckoutSdk::Tokens::TokensClient.new api_client, configuration
|
48
|
+
@klarna = CheckoutSdk::Previous::Apm::KlarnaClient.new api_client, configuration
|
49
|
+
@sepa = CheckoutSdk::Previous::Apm::SepaClient.new api_client, configuration
|
18
50
|
end
|
19
51
|
|
20
52
|
private
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Reports
|
5
|
+
class ReportsClient < Client
|
6
|
+
REPORTS = 'reports'
|
7
|
+
FILES = 'files'
|
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 [ReportsQuery] query_filter
|
16
|
+
def get_all_reports(query_filter)
|
17
|
+
api_client.invoke_get(REPORTS, sdk_authorization, query_filter)
|
18
|
+
end
|
19
|
+
|
20
|
+
# @param [String] report_id
|
21
|
+
def get_report_details(report_id)
|
22
|
+
api_client.invoke_get(build_path(REPORTS, report_id), sdk_authorization)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Reports
|
5
|
+
# @!attribute created_after
|
6
|
+
# @return [DateTime]
|
7
|
+
# @!attribute created_before
|
8
|
+
# @return [DateTime]
|
9
|
+
# @!attribute entity_id
|
10
|
+
# @return [String]
|
11
|
+
# @!attribute limit
|
12
|
+
# @return [Integer]
|
13
|
+
# @!attribute pagination_token
|
14
|
+
# @return [String]
|
15
|
+
class ReportsQuery
|
16
|
+
attr_accessor :created_after,
|
17
|
+
:created_before,
|
18
|
+
:entity_id,
|
19
|
+
:limit,
|
20
|
+
:pagination_token
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Sources
|
6
|
+
# @!attribute billing_address
|
7
|
+
# @return [CheckoutSdk::Common::Address]
|
8
|
+
# @!attribute source_data
|
9
|
+
# @return [SourceData]
|
10
|
+
class SepaSourceRequest < SourceRequest
|
11
|
+
attr_accessor :billing_address,
|
12
|
+
:source_data
|
13
|
+
|
14
|
+
def initialize
|
15
|
+
super CheckoutSdk::Previous::Sources::SourceType::SEPA
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Sources
|
6
|
+
# @!attribute first_name
|
7
|
+
# @return [String]
|
8
|
+
# @!attribute last_name
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute account_iban
|
11
|
+
# @return [String]
|
12
|
+
# @!attribute bic
|
13
|
+
# @return [String]
|
14
|
+
# @!attribute billing_descriptor
|
15
|
+
# @return [String]
|
16
|
+
# @!attribute mandate_type
|
17
|
+
# @return [SourceData]
|
18
|
+
class SourceData
|
19
|
+
attr_accessor :first_name,
|
20
|
+
:last_name,
|
21
|
+
:account_iban,
|
22
|
+
:bic,
|
23
|
+
:billing_descriptor,
|
24
|
+
:mandate_type
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Sources
|
6
|
+
# @!attribute type
|
7
|
+
# @return [String] {SourceType}
|
8
|
+
# @!attribute reference
|
9
|
+
# @return [String]
|
10
|
+
# @!attribute phone
|
11
|
+
# @return [CheckoutSdk::Common::Phone]
|
12
|
+
# @!attribute customer
|
13
|
+
# @return [CheckoutSdk::Common::CustomerRequest]
|
14
|
+
class SourceRequest
|
15
|
+
attr_reader :type
|
16
|
+
attr_accessor :reference,
|
17
|
+
:phone,
|
18
|
+
:customer
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
# @abstract
|
23
|
+
# @param [String] {SourceType}
|
24
|
+
def initialize(type)
|
25
|
+
@type = type
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'checkout_sdk/sources/source_type'
|
4
|
+
require 'checkout_sdk/sources/mandate_type'
|
5
|
+
require 'checkout_sdk/sources/source_data'
|
6
|
+
require 'checkout_sdk/sources/source_request'
|
7
|
+
require 'checkout_sdk/sources/sepa_source_request'
|
8
|
+
|
9
|
+
require 'checkout_sdk/sources/sources_client'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Previous
|
5
|
+
module Sources
|
6
|
+
class SourcesClient < Client
|
7
|
+
SOURCES = 'sources'
|
8
|
+
private_constant :SOURCES
|
9
|
+
|
10
|
+
# @param [ApiClient] api_client
|
11
|
+
# @param [CheckoutConfiguration] configuration
|
12
|
+
def initialize(api_client, configuration)
|
13
|
+
super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY
|
14
|
+
end
|
15
|
+
|
16
|
+
# @param [SepaSourceRequest] sepa_source_request
|
17
|
+
def create_sepa_source(sepa_source_request)
|
18
|
+
api_client.invoke_post(SOURCES, sdk_authorization, sepa_source_request)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -15,9 +15,9 @@ module CheckoutSdk
|
|
15
15
|
# @!attribute cvv
|
16
16
|
# @return [String]
|
17
17
|
# @!attribute billing_address
|
18
|
-
# @return [
|
18
|
+
# @return [CheckoutSdk::Common::Address]
|
19
19
|
# @!attribute phone
|
20
|
-
# @return [
|
20
|
+
# @return [CheckoutSdk::Common::Phone]
|
21
21
|
class CardTokenRequest
|
22
22
|
attr_accessor :type,
|
23
23
|
:number,
|
data/lib/checkout_sdk/version.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Workflows
|
5
|
+
# @!attribute name
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute active
|
8
|
+
# @return [TrueClass, FalseClass]
|
9
|
+
# @!attribute conditions
|
10
|
+
# @return [Array(WorkflowCondition)]
|
11
|
+
# @!attribute actions
|
12
|
+
# @return [Array(WorkflowAction)]
|
13
|
+
class CreateWorkflow
|
14
|
+
attr_accessor :name,
|
15
|
+
:active,
|
16
|
+
:conditions,
|
17
|
+
:actions
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Workflows
|
5
|
+
# @!attribute entities
|
6
|
+
# @return [Array(String)]
|
7
|
+
class EntityWorkflowCondition < WorkflowCondition
|
8
|
+
attr_accessor :entities
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Workflows::WorkflowConditionType::ENTITY
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Workflows
|
5
|
+
# @!attribute events
|
6
|
+
# @return [Hash(String=>Array(String))]
|
7
|
+
class EventWorkflowCondition < WorkflowCondition
|
8
|
+
attr_accessor :events
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Workflows::WorkflowConditionType::EVENT
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Workflows
|
5
|
+
# @!attribute processing_channels
|
6
|
+
# @return [Array(String)]
|
7
|
+
class ProcessingChannelWorkflowCondition < WorkflowCondition
|
8
|
+
attr_accessor :processing_channels
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Workflows::WorkflowConditionType::PROCESSING_CHANNEL
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Workflows
|
5
|
+
# @!attribute url
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute headers
|
8
|
+
# @return [Hash{String => String}]
|
9
|
+
# @!attribute signature
|
10
|
+
# @return [WebhookSignature]
|
11
|
+
class WebhookWorkflowAction < WorkflowAction
|
12
|
+
attr_accessor :url,
|
13
|
+
:headers,
|
14
|
+
:signature
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
super CheckoutSdk::Workflows::WorkflowActionType::WEBHOOK
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Workflows
|
5
|
+
# @!attribute type
|
6
|
+
# @return [String] {WorkflowActionType}
|
7
|
+
class WorkflowAction
|
8
|
+
attr_reader :type
|
9
|
+
|
10
|
+
protected
|
11
|
+
|
12
|
+
# @abstract
|
13
|
+
# @param [String] {WorkflowActionType}
|
14
|
+
def initialize(type)
|
15
|
+
@type = type
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Workflows
|
5
|
+
# @!attribute type
|
6
|
+
# @return [String] {WorkflowConditionType}
|
7
|
+
class WorkflowCondition
|
8
|
+
attr_reader :type
|
9
|
+
|
10
|
+
protected
|
11
|
+
|
12
|
+
# @abstract
|
13
|
+
# @param [String] {WorkflowConditionType}
|
14
|
+
def initialize(type)
|
15
|
+
@type = type
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|