checkout_sdk 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +15 -1
- data/lib/checkout_sdk/accounts/accounts.rb +10 -1
- data/lib/checkout_sdk/accounts/accounts_client.rb +134 -1
- data/lib/checkout_sdk/accounts/entity_files_request.rb +13 -0
- data/lib/checkout_sdk/accounts/entity_requirement_priority.rb +12 -0
- data/lib/checkout_sdk/accounts/entity_requirement_reason.rb +11 -0
- data/lib/checkout_sdk/accounts/entity_requirement_update_request.rb +22 -0
- data/lib/checkout_sdk/accounts/entity_requirement_update_status.rb +12 -0
- data/lib/checkout_sdk/accounts/onboard_entity.rb +9 -1
- data/lib/checkout_sdk/accounts/reserve_rule_create_request.rb +14 -0
- data/lib/checkout_sdk/accounts/reserve_rule_holding_duration.rb +13 -0
- data/lib/checkout_sdk/accounts/reserve_rule_update_request.rb +15 -0
- data/lib/checkout_sdk/accounts/rolling_reserve_rule.rb +15 -0
- data/lib/checkout_sdk/accounts/submitter.rb +13 -0
- data/lib/checkout_sdk/agentic_commerce/agentic_commerce.rb +8 -0
- data/lib/checkout_sdk/agentic_commerce/agentic_commerce_client.rb +31 -0
- data/lib/checkout_sdk/agentic_commerce/delegated_payment_allowance.rb +28 -0
- data/lib/checkout_sdk/agentic_commerce/delegated_payment_billing_address.rb +33 -0
- data/lib/checkout_sdk/agentic_commerce/delegated_payment_method_card.rb +64 -0
- data/lib/checkout_sdk/agentic_commerce/delegated_payment_request.rb +25 -0
- data/lib/checkout_sdk/agentic_commerce/delegated_payment_risk_signal.rb +20 -0
- data/lib/checkout_sdk/api_client.rb +25 -15
- data/lib/checkout_sdk/balances/balance_values.rb +28 -0
- data/lib/checkout_sdk/balances/balances.rb +4 -0
- data/lib/checkout_sdk/balances/balances_query.rb +32 -0
- data/lib/checkout_sdk/balances/collateral_breakdown.rb +16 -0
- data/lib/checkout_sdk/balances/currency_account_balance.rb +26 -0
- data/lib/checkout_sdk/checkout_api.rb +61 -1
- data/lib/checkout_sdk/common/common.rb +1 -0
- data/lib/checkout_sdk/common/headers.rb +16 -0
- data/lib/checkout_sdk/common/payment_source_type.rb +1 -0
- data/lib/checkout_sdk/compliance_requests/compliance_request_responded_field.rb +22 -0
- data/lib/checkout_sdk/compliance_requests/compliance_request_responded_fields.rb +15 -0
- data/lib/checkout_sdk/compliance_requests/compliance_requests.rb +6 -0
- data/lib/checkout_sdk/compliance_requests/compliance_requests_client.rb +34 -0
- data/lib/checkout_sdk/compliance_requests/compliance_response_request.rb +16 -0
- data/lib/checkout_sdk/disputes/dispute_status.rb +1 -0
- data/lib/checkout_sdk/disputes/disputes_client.rb +22 -1
- data/lib/checkout_sdk/disputes/disputes_query_filter.rb +49 -11
- data/lib/checkout_sdk/forward/create_secret_request.rb +17 -0
- data/lib/checkout_sdk/forward/forward.rb +2 -0
- data/lib/checkout_sdk/forward/forward_client.rb +27 -1
- data/lib/checkout_sdk/forward/update_secret_request.rb +15 -0
- data/lib/checkout_sdk/identities/aml_screening/aml_screening_client.rb +29 -0
- data/lib/checkout_sdk/identities/aml_screening/aml_search_parameters.rb +15 -0
- data/lib/checkout_sdk/identities/aml_screening/aml_verification_request.rb +19 -0
- data/lib/checkout_sdk/identities/applicants/applicants_client.rb +43 -0
- data/lib/checkout_sdk/identities/applicants/create_applicant_request.rb +21 -0
- data/lib/checkout_sdk/identities/applicants/update_applicant_request.rb +18 -0
- data/lib/checkout_sdk/identities/face_authentication/face_authentication_attempt_request.rb +17 -0
- data/lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb +68 -0
- data/lib/checkout_sdk/identities/face_authentication/face_authentication_request.rb +21 -0
- data/lib/checkout_sdk/identities/id_document_verification/id_document_verification_client.rb +77 -0
- data/lib/checkout_sdk/identities/id_document_verification/id_document_verification_request.rb +27 -0
- data/lib/checkout_sdk/identities/identities.rb +27 -0
- data/lib/checkout_sdk/identities/identity_verification/identity_verification_attempt_request.rb +17 -0
- data/lib/checkout_sdk/identities/identity_verification/identity_verification_client.rb +84 -0
- data/lib/checkout_sdk/identities/identity_verification/identity_verification_request.rb +21 -0
- data/lib/checkout_sdk/identities/identity_verification/idv_client_information.rb +17 -0
- data/lib/checkout_sdk/identities/identity_verification/idv_declared_data.rb +15 -0
- data/lib/checkout_sdk/instruments/base_instruments_client.rb +9 -0
- data/lib/checkout_sdk/issuing/add_control_group_request.rb +19 -0
- data/lib/checkout_sdk/issuing/add_control_profile_request.rb +13 -0
- data/lib/checkout_sdk/issuing/cardholder_access_token_request.rb +26 -0
- data/lib/checkout_sdk/issuing/create_dispute_request.rb +24 -0
- data/lib/checkout_sdk/issuing/escalate_dispute_request.rb +19 -0
- data/lib/checkout_sdk/issuing/identification_document.rb +18 -0
- data/lib/checkout_sdk/issuing/issuing.rb +25 -0
- data/lib/checkout_sdk/issuing/issuing_address.rb +25 -0
- data/lib/checkout_sdk/issuing/issuing_client.rb +266 -13
- data/lib/checkout_sdk/issuing/issuing_phone_number.rb +16 -0
- data/lib/checkout_sdk/issuing/oob_authentication_request.rb +15 -0
- data/lib/checkout_sdk/issuing/oob_simulate_transaction_details.rb +19 -0
- data/lib/checkout_sdk/issuing/schedule_revocation_request.rb +13 -0
- data/lib/checkout_sdk/issuing/simulate_refund_request.rb +13 -0
- data/lib/checkout_sdk/issuing/update_card_request.rb +19 -0
- data/lib/checkout_sdk/issuing/update_cardholder_request.rb +32 -0
- data/lib/checkout_sdk/issuing/update_control_profile_request.rb +13 -0
- data/lib/checkout_sdk/network_tokens/network_token_cryptogram_request.rb +13 -0
- data/lib/checkout_sdk/network_tokens/network_token_source_card.rb +25 -0
- data/lib/checkout_sdk/network_tokens/network_token_source_id.rb +19 -0
- data/lib/checkout_sdk/network_tokens/network_tokens.rb +7 -0
- data/lib/checkout_sdk/network_tokens/network_tokens_client.rb +51 -0
- data/lib/checkout_sdk/network_tokens/provision_network_token_request.rb +14 -0
- data/lib/checkout_sdk/onboarding_simulator/onboarding_simulator.rb +6 -0
- data/lib/checkout_sdk/onboarding_simulator/onboarding_simulator_client.rb +72 -0
- data/lib/checkout_sdk/onboarding_simulator/simulator_entity_status.rb +16 -0
- data/lib/checkout_sdk/onboarding_simulator/simulator_set_requirements_due_request.rb +14 -0
- data/lib/checkout_sdk/onboarding_simulator/simulator_set_status_request.rb +13 -0
- data/lib/checkout_sdk/payment_methods/payment_methods.rb +4 -0
- data/lib/checkout_sdk/payment_methods/payment_methods_client.rb +24 -0
- data/lib/checkout_sdk/payment_methods/payment_methods_query.rb +13 -0
- data/lib/checkout_sdk/payments/apple_pay/apple_pay_certificate_request.rb +13 -0
- data/lib/checkout_sdk/payments/apple_pay/apple_pay_client.rb +44 -0
- data/lib/checkout_sdk/payments/apple_pay/apple_pay_enrollment_request.rb +13 -0
- data/lib/checkout_sdk/payments/apple_pay/apple_pay_signing_request.rb +13 -0
- data/lib/checkout_sdk/payments/base_payments_client.rb +19 -0
- data/lib/checkout_sdk/payments/cancellation_request.rb +13 -0
- data/lib/checkout_sdk/payments/flow/flow_client.rb +59 -0
- data/lib/checkout_sdk/payments/google_pay/google_pay_client.rb +48 -0
- data/lib/checkout_sdk/payments/google_pay/google_pay_domain_request.rb +13 -0
- data/lib/checkout_sdk/payments/google_pay/google_pay_enrollment_request.rb +17 -0
- data/lib/checkout_sdk/payments/passenger.rb +20 -6
- data/lib/checkout_sdk/payments/payment_plan.rb +43 -0
- data/lib/checkout_sdk/payments/payment_request.rb +2 -1
- data/lib/checkout_sdk/payments/payments.rb +26 -1
- data/lib/checkout_sdk/payments/payments_search_request.rb +20 -0
- data/lib/checkout_sdk/payments/processing_data.rb +45 -0
- data/lib/checkout_sdk/payments/processing_settings.rb +5 -1
- data/lib/checkout_sdk/payments/sessions/payment_sessions_client.rb +12 -0
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification.rb +17 -0
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification_type.rb +15 -0
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_purpose.rb +29 -0
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_recipient.rb +26 -0
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_sender.rb +29 -0
- data/lib/checkout_sdk/payments/setups/blik_payment_method.rb +20 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_account_funding_transaction.rb +20 -0
- data/lib/checkout_sdk/payments/source/apm/blik_source.rb +31 -0
- data/lib/checkout_sdk/sessions/device_information.rb +17 -0
- data/lib/checkout_sdk/sessions/session_request.rb +2 -1
- data/lib/checkout_sdk/sessions/sessions.rb +1 -0
- data/lib/checkout_sdk/standalone_account_updater/account_updater_card.rb +17 -0
- data/lib/checkout_sdk/standalone_account_updater/account_updater_instrument.rb +13 -0
- data/lib/checkout_sdk/standalone_account_updater/account_updater_request.rb +13 -0
- data/lib/checkout_sdk/standalone_account_updater/account_updater_source_options.rb +15 -0
- data/lib/checkout_sdk/standalone_account_updater/standalone_account_updater.rb +7 -0
- data/lib/checkout_sdk/standalone_account_updater/standalone_account_updater_client.rb +29 -0
- data/lib/checkout_sdk/tokens/token_metadata_billing_address.rb +16 -0
- data/lib/checkout_sdk/tokens/token_metadata_response.rb +55 -0
- data/lib/checkout_sdk/tokens/tokens.rb +2 -0
- data/lib/checkout_sdk/tokens/tokens_client.rb +11 -0
- data/lib/checkout_sdk/version.rb +1 -1
- data/lib/checkout_sdk/workflows/workflows_client.rb +1 -1
- data/lib/checkout_sdk.rb +7 -0
- metadata +106 -4
- data/lib/checkout_sdk/accounts/headers.rb +0 -11
- data/lib/checkout_sdk/payments/passenger_name.rb +0 -11
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module AmlScreening
|
|
6
|
+
# The screening configuration to use for an AML verification.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute configuration_identifier
|
|
9
|
+
# @return [String] Your AML Screening configuration ID.
|
|
10
|
+
class AmlSearchParameters
|
|
11
|
+
attr_accessor :configuration_identifier
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module AmlScreening
|
|
6
|
+
# Request body for POST /aml-verifications.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute applicant_id
|
|
9
|
+
# @return [String] The applicant's unique identifier (e.g. "aplt_...").
|
|
10
|
+
# @!attribute search_parameters
|
|
11
|
+
# @return [AmlSearchParameters]
|
|
12
|
+
# @!attribute monitored
|
|
13
|
+
# @return [Boolean] Whether to monitor the applicant's AML status.
|
|
14
|
+
class AmlVerificationRequest
|
|
15
|
+
attr_accessor :applicant_id, :search_parameters, :monitored
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module Applicants
|
|
6
|
+
# Client for the Identities — Applicants API.
|
|
7
|
+
class ApplicantsClient < Client
|
|
8
|
+
APPLICANTS = 'applicants'
|
|
9
|
+
ANONYMIZE = 'anonymize'
|
|
10
|
+
private_constant :APPLICANTS, :ANONYMIZE
|
|
11
|
+
|
|
12
|
+
# @param [ApiClient] api_client
|
|
13
|
+
# @param [CheckoutConfiguration] configuration
|
|
14
|
+
def initialize(api_client, configuration)
|
|
15
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# @param [Hash, CreateApplicantRequest] create_applicant_request
|
|
19
|
+
def create_applicant(create_applicant_request)
|
|
20
|
+
api_client.invoke_post(APPLICANTS, sdk_authorization, create_applicant_request)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# @param [String] applicant_id
|
|
24
|
+
def get_applicant(applicant_id)
|
|
25
|
+
api_client.invoke_get(build_path(APPLICANTS, applicant_id), sdk_authorization)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# @param [String] applicant_id
|
|
29
|
+
# @param [Hash, UpdateApplicantRequest] update_applicant_request
|
|
30
|
+
def update_applicant(applicant_id, update_applicant_request)
|
|
31
|
+
api_client.invoke_patch(build_path(APPLICANTS, applicant_id),
|
|
32
|
+
sdk_authorization,
|
|
33
|
+
update_applicant_request)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @param [String] applicant_id
|
|
37
|
+
def anonymize_applicant(applicant_id)
|
|
38
|
+
api_client.invoke_post(build_path(APPLICANTS, applicant_id, ANONYMIZE), sdk_authorization)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module Applicants
|
|
6
|
+
# Request body for POST /applicants.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute external_applicant_id
|
|
9
|
+
# @return [String]
|
|
10
|
+
# @!attribute email
|
|
11
|
+
# @return [String]
|
|
12
|
+
# @!attribute external_applicant_name
|
|
13
|
+
# @return [String]
|
|
14
|
+
class CreateApplicantRequest
|
|
15
|
+
attr_accessor :external_applicant_id,
|
|
16
|
+
:email,
|
|
17
|
+
:external_applicant_name
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module Applicants
|
|
6
|
+
# Request body for PATCH /applicants/{applicant_id}.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute email
|
|
9
|
+
# @return [String]
|
|
10
|
+
# @!attribute external_applicant_name
|
|
11
|
+
# @return [String]
|
|
12
|
+
class UpdateApplicantRequest
|
|
13
|
+
attr_accessor :email,
|
|
14
|
+
:external_applicant_name
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module FaceAuthentication
|
|
6
|
+
# Request body for POST /face-authentications/{id}/attempts.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute redirect_url
|
|
9
|
+
# @return [String] URL to redirect the applicant after the attempt.
|
|
10
|
+
# @!attribute client_information
|
|
11
|
+
# @return [CheckoutSdk::Identities::IdentityVerification::IdvClientInformation]
|
|
12
|
+
class FaceAuthenticationAttemptRequest
|
|
13
|
+
attr_accessor :redirect_url, :client_information
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module FaceAuthentication
|
|
6
|
+
# Client for the Identities — Face Authentication API.
|
|
7
|
+
class FaceAuthenticationClient < Client
|
|
8
|
+
FACE_AUTHENTICATIONS = 'face-authentications'
|
|
9
|
+
ANONYMIZE = 'anonymize'
|
|
10
|
+
ATTEMPTS = 'attempts'
|
|
11
|
+
private_constant :FACE_AUTHENTICATIONS, :ANONYMIZE, :ATTEMPTS
|
|
12
|
+
|
|
13
|
+
# @param [ApiClient] api_client
|
|
14
|
+
# @param [CheckoutConfiguration] configuration
|
|
15
|
+
def initialize(api_client, configuration)
|
|
16
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# @param [Hash, FaceAuthenticationRequest] request
|
|
20
|
+
def create_face_authentication(request)
|
|
21
|
+
api_client.invoke_post(FACE_AUTHENTICATIONS, sdk_authorization, request)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# @param [String] face_authentication_id
|
|
25
|
+
def get_face_authentication(face_authentication_id)
|
|
26
|
+
api_client.invoke_get(build_path(FACE_AUTHENTICATIONS, face_authentication_id),
|
|
27
|
+
sdk_authorization)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# @param [String] face_authentication_id
|
|
31
|
+
def anonymize_face_authentication(face_authentication_id)
|
|
32
|
+
api_client.invoke_post(
|
|
33
|
+
build_path(FACE_AUTHENTICATIONS, face_authentication_id, ANONYMIZE),
|
|
34
|
+
sdk_authorization
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Create a new attempt for an existing face authentication.
|
|
39
|
+
# @param [String] face_authentication_id
|
|
40
|
+
# @param [Hash, FaceAuthenticationAttemptRequest] attempt_request
|
|
41
|
+
def create_face_authentication_attempt(face_authentication_id, attempt_request)
|
|
42
|
+
api_client.invoke_post(
|
|
43
|
+
build_path(FACE_AUTHENTICATIONS, face_authentication_id, ATTEMPTS),
|
|
44
|
+
sdk_authorization,
|
|
45
|
+
attempt_request
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# @param [String] face_authentication_id
|
|
50
|
+
def get_face_authentication_attempts(face_authentication_id)
|
|
51
|
+
api_client.invoke_get(
|
|
52
|
+
build_path(FACE_AUTHENTICATIONS, face_authentication_id, ATTEMPTS),
|
|
53
|
+
sdk_authorization
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# @param [String] face_authentication_id
|
|
58
|
+
# @param [String] attempt_id
|
|
59
|
+
def get_face_authentication_attempt(face_authentication_id, attempt_id)
|
|
60
|
+
api_client.invoke_get(
|
|
61
|
+
build_path(FACE_AUTHENTICATIONS, face_authentication_id, ATTEMPTS, attempt_id),
|
|
62
|
+
sdk_authorization
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module FaceAuthentication
|
|
6
|
+
# Request body for POST /face-authentications.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute applicant_id
|
|
9
|
+
# @return [String]
|
|
10
|
+
# @!attribute external_reference
|
|
11
|
+
# @return [String]
|
|
12
|
+
# @!attribute redirect_url
|
|
13
|
+
# @return [String]
|
|
14
|
+
class FaceAuthenticationRequest
|
|
15
|
+
attr_accessor :applicant_id,
|
|
16
|
+
:external_reference,
|
|
17
|
+
:redirect_url
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module IdDocumentVerification
|
|
6
|
+
# Client for the Identities — ID Document Verification API.
|
|
7
|
+
class IdDocumentVerificationClient < Client
|
|
8
|
+
ID_DOCUMENT_VERIFICATIONS = 'id-document-verifications'
|
|
9
|
+
ANONYMIZE = 'anonymize'
|
|
10
|
+
ATTEMPTS = 'attempts'
|
|
11
|
+
PDF_REPORT = 'pdf-report'
|
|
12
|
+
private_constant :ID_DOCUMENT_VERIFICATIONS, :ANONYMIZE, :ATTEMPTS, :PDF_REPORT
|
|
13
|
+
|
|
14
|
+
# @param [ApiClient] api_client
|
|
15
|
+
# @param [CheckoutConfiguration] configuration
|
|
16
|
+
def initialize(api_client, configuration)
|
|
17
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# @param [Hash, IdDocumentVerificationRequest] request
|
|
21
|
+
def create_id_document_verification(request)
|
|
22
|
+
api_client.invoke_post(ID_DOCUMENT_VERIFICATIONS, sdk_authorization, request)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# @param [String] id_document_verification_id
|
|
26
|
+
def get_id_document_verification(id_document_verification_id)
|
|
27
|
+
api_client.invoke_get(build_path(ID_DOCUMENT_VERIFICATIONS, id_document_verification_id),
|
|
28
|
+
sdk_authorization)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# @param [String] id_document_verification_id
|
|
32
|
+
def anonymize_id_document_verification(id_document_verification_id)
|
|
33
|
+
api_client.invoke_post(
|
|
34
|
+
build_path(ID_DOCUMENT_VERIFICATIONS, id_document_verification_id, ANONYMIZE),
|
|
35
|
+
sdk_authorization
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Create a new attempt for an existing ID document verification.
|
|
40
|
+
# @param [String] id_document_verification_id
|
|
41
|
+
# @param [Hash] attempt_request Optional body per swagger.
|
|
42
|
+
def create_id_document_verification_attempt(id_document_verification_id, attempt_request = nil)
|
|
43
|
+
api_client.invoke_post(
|
|
44
|
+
build_path(ID_DOCUMENT_VERIFICATIONS, id_document_verification_id, ATTEMPTS),
|
|
45
|
+
sdk_authorization,
|
|
46
|
+
attempt_request
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# @param [String] id_document_verification_id
|
|
51
|
+
def get_id_document_verification_attempts(id_document_verification_id)
|
|
52
|
+
api_client.invoke_get(
|
|
53
|
+
build_path(ID_DOCUMENT_VERIFICATIONS, id_document_verification_id, ATTEMPTS),
|
|
54
|
+
sdk_authorization
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# @param [String] id_document_verification_id
|
|
59
|
+
# @param [String] attempt_id
|
|
60
|
+
def get_id_document_verification_attempt(id_document_verification_id, attempt_id)
|
|
61
|
+
api_client.invoke_get(
|
|
62
|
+
build_path(ID_DOCUMENT_VERIFICATIONS, id_document_verification_id, ATTEMPTS, attempt_id),
|
|
63
|
+
sdk_authorization
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# @param [String] id_document_verification_id
|
|
68
|
+
def get_id_document_verification_pdf_report(id_document_verification_id)
|
|
69
|
+
api_client.invoke_get(
|
|
70
|
+
build_path(ID_DOCUMENT_VERIFICATIONS, id_document_verification_id, PDF_REPORT),
|
|
71
|
+
sdk_authorization
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module IdDocumentVerification
|
|
6
|
+
# Request body for POST /id-document-verifications.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute applicant_id
|
|
9
|
+
# @return [String]
|
|
10
|
+
# @!attribute external_reference
|
|
11
|
+
# @return [String]
|
|
12
|
+
# @!attribute document_type
|
|
13
|
+
# @return [String]
|
|
14
|
+
# @!attribute country
|
|
15
|
+
# @return [String]
|
|
16
|
+
# @!attribute redirect_url
|
|
17
|
+
# @return [String]
|
|
18
|
+
class IdDocumentVerificationRequest
|
|
19
|
+
attr_accessor :applicant_id,
|
|
20
|
+
:external_reference,
|
|
21
|
+
:document_type,
|
|
22
|
+
:country,
|
|
23
|
+
:redirect_url
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Applicants
|
|
4
|
+
require 'checkout_sdk/identities/applicants/create_applicant_request'
|
|
5
|
+
require 'checkout_sdk/identities/applicants/update_applicant_request'
|
|
6
|
+
require 'checkout_sdk/identities/applicants/applicants_client'
|
|
7
|
+
|
|
8
|
+
# AML Screening
|
|
9
|
+
require 'checkout_sdk/identities/aml_screening/aml_search_parameters'
|
|
10
|
+
require 'checkout_sdk/identities/aml_screening/aml_verification_request'
|
|
11
|
+
require 'checkout_sdk/identities/aml_screening/aml_screening_client'
|
|
12
|
+
|
|
13
|
+
# ID Document Verification
|
|
14
|
+
require 'checkout_sdk/identities/id_document_verification/id_document_verification_request'
|
|
15
|
+
require 'checkout_sdk/identities/id_document_verification/id_document_verification_client'
|
|
16
|
+
|
|
17
|
+
# Identity Verification
|
|
18
|
+
require 'checkout_sdk/identities/identity_verification/idv_declared_data'
|
|
19
|
+
require 'checkout_sdk/identities/identity_verification/idv_client_information'
|
|
20
|
+
require 'checkout_sdk/identities/identity_verification/identity_verification_attempt_request'
|
|
21
|
+
require 'checkout_sdk/identities/identity_verification/identity_verification_request'
|
|
22
|
+
require 'checkout_sdk/identities/identity_verification/identity_verification_client'
|
|
23
|
+
|
|
24
|
+
# Face Authentication
|
|
25
|
+
require 'checkout_sdk/identities/face_authentication/face_authentication_attempt_request'
|
|
26
|
+
require 'checkout_sdk/identities/face_authentication/face_authentication_request'
|
|
27
|
+
require 'checkout_sdk/identities/face_authentication/face_authentication_client'
|
data/lib/checkout_sdk/identities/identity_verification/identity_verification_attempt_request.rb
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module IdentityVerification
|
|
6
|
+
# Request body for POST /identity-verifications/{id}/attempts.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute redirect_url
|
|
9
|
+
# @return [String] URL to redirect the applicant after the attempt.
|
|
10
|
+
# @!attribute client_information
|
|
11
|
+
# @return [IdvClientInformation]
|
|
12
|
+
class IdentityVerificationAttemptRequest
|
|
13
|
+
attr_accessor :redirect_url, :client_information
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module IdentityVerification
|
|
6
|
+
# Client for the Identities — Identity Verification API.
|
|
7
|
+
class IdentityVerificationClient < Client
|
|
8
|
+
IDENTITY_VERIFICATIONS = 'identity-verifications'
|
|
9
|
+
CREATE_AND_OPEN_IDV = 'create-and-open-idv'
|
|
10
|
+
ANONYMIZE = 'anonymize'
|
|
11
|
+
ATTEMPTS = 'attempts'
|
|
12
|
+
PDF_REPORT = 'pdf-report'
|
|
13
|
+
private_constant :IDENTITY_VERIFICATIONS, :CREATE_AND_OPEN_IDV, :ANONYMIZE, :ATTEMPTS, :PDF_REPORT
|
|
14
|
+
|
|
15
|
+
# @param [ApiClient] api_client
|
|
16
|
+
# @param [CheckoutConfiguration] configuration
|
|
17
|
+
def initialize(api_client, configuration)
|
|
18
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Create an identity verification and immediately receive its hosted URL.
|
|
22
|
+
# @param [Hash, IdentityVerificationRequest] request
|
|
23
|
+
def create_and_open_idv(request)
|
|
24
|
+
api_client.invoke_post(CREATE_AND_OPEN_IDV, sdk_authorization, request)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @param [Hash, IdentityVerificationRequest] request
|
|
28
|
+
def create_identity_verification(request)
|
|
29
|
+
api_client.invoke_post(IDENTITY_VERIFICATIONS, sdk_authorization, request)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# @param [String] identity_verification_id
|
|
33
|
+
def get_identity_verification(identity_verification_id)
|
|
34
|
+
api_client.invoke_get(build_path(IDENTITY_VERIFICATIONS, identity_verification_id),
|
|
35
|
+
sdk_authorization)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# @param [String] identity_verification_id
|
|
39
|
+
def anonymize_identity_verification(identity_verification_id)
|
|
40
|
+
api_client.invoke_post(
|
|
41
|
+
build_path(IDENTITY_VERIFICATIONS, identity_verification_id, ANONYMIZE),
|
|
42
|
+
sdk_authorization
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Create a new attempt for an existing identity verification.
|
|
47
|
+
# @param [String] identity_verification_id
|
|
48
|
+
# @param [Hash, IdentityVerificationAttemptRequest] attempt_request
|
|
49
|
+
def create_identity_verification_attempt(identity_verification_id, attempt_request)
|
|
50
|
+
api_client.invoke_post(
|
|
51
|
+
build_path(IDENTITY_VERIFICATIONS, identity_verification_id, ATTEMPTS),
|
|
52
|
+
sdk_authorization,
|
|
53
|
+
attempt_request
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# @param [String] identity_verification_id
|
|
58
|
+
def get_identity_verification_attempts(identity_verification_id)
|
|
59
|
+
api_client.invoke_get(
|
|
60
|
+
build_path(IDENTITY_VERIFICATIONS, identity_verification_id, ATTEMPTS),
|
|
61
|
+
sdk_authorization
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# @param [String] identity_verification_id
|
|
66
|
+
# @param [String] attempt_id
|
|
67
|
+
def get_identity_verification_attempt(identity_verification_id, attempt_id)
|
|
68
|
+
api_client.invoke_get(
|
|
69
|
+
build_path(IDENTITY_VERIFICATIONS, identity_verification_id, ATTEMPTS, attempt_id),
|
|
70
|
+
sdk_authorization
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# @param [String] identity_verification_id
|
|
75
|
+
def get_identity_verification_pdf_report(identity_verification_id)
|
|
76
|
+
api_client.invoke_get(
|
|
77
|
+
build_path(IDENTITY_VERIFICATIONS, identity_verification_id, PDF_REPORT),
|
|
78
|
+
sdk_authorization
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module IdentityVerification
|
|
6
|
+
# Request body for POST /identity-verifications and POST /create-and-open-idv.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute applicant_id
|
|
9
|
+
# @return [String] The applicant's unique identifier (e.g. "aplt_...").
|
|
10
|
+
# @!attribute user_journey_id
|
|
11
|
+
# @return [String] Your configuration ID (e.g. "usj_...").
|
|
12
|
+
# @!attribute declared_data
|
|
13
|
+
# @return [IdvDeclaredData]
|
|
14
|
+
# @!attribute risk_labels
|
|
15
|
+
# @return [Array<String>]
|
|
16
|
+
class IdentityVerificationRequest
|
|
17
|
+
attr_accessor :applicant_id, :user_journey_id, :declared_data, :risk_labels
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module IdentityVerification
|
|
6
|
+
# Pre-populated client information for an identity-verification attempt.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute pre_selected_residence_country
|
|
9
|
+
# @return [String] ISO alpha-2 country code.
|
|
10
|
+
# @!attribute pre_selected_language
|
|
11
|
+
# @return [String] IETF BCP 47 language tag.
|
|
12
|
+
class IdvClientInformation
|
|
13
|
+
attr_accessor :pre_selected_residence_country, :pre_selected_language
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module IdentityVerification
|
|
6
|
+
# The personal details provided by the applicant for an identity verification.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute name
|
|
9
|
+
# @return [String] The applicant's name (max 255 characters).
|
|
10
|
+
class IdvDeclaredData
|
|
11
|
+
attr_accessor :name
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -15,6 +15,15 @@ module CheckoutSdk
|
|
|
15
15
|
def delete(instrument_id)
|
|
16
16
|
api_client.invoke_delete(build_path(INSTRUMENTS, instrument_id), sdk_authorization)
|
|
17
17
|
end
|
|
18
|
+
|
|
19
|
+
# Revoke a payment instrument. The instrument status is set to INVALID
|
|
20
|
+
# with the reason `revoked_by_merchant`. The instrument record is
|
|
21
|
+
# retained for audit purposes.
|
|
22
|
+
# @param [String] instrument_id Pattern: ^(src_)[a-z0-9]{26}$
|
|
23
|
+
def revoke(instrument_id)
|
|
24
|
+
api_client.invoke_patch(build_path(INSTRUMENTS, instrument_id, 'revoke'),
|
|
25
|
+
sdk_authorization)
|
|
26
|
+
end
|
|
18
27
|
end
|
|
19
28
|
end
|
|
20
29
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Request body for POST /issuing/controls/control-groups.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute description
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute target_id
|
|
10
|
+
# @return [String] Card / cardholder / account / profile id.
|
|
11
|
+
# @!attribute fail_if
|
|
12
|
+
# @return [String] Control-group condition (e.g. "all", "any").
|
|
13
|
+
# @!attribute controls
|
|
14
|
+
# @return [Array<Hash>] Array of card controls.
|
|
15
|
+
class AddControlGroupRequest
|
|
16
|
+
attr_accessor :description, :target_id, :fail_if, :controls
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Request body for POST /issuing/controls/control-profiles.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute name
|
|
8
|
+
# @return [String] Required.
|
|
9
|
+
class AddControlProfileRequest
|
|
10
|
+
attr_accessor :name
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Form-encoded body for POST /issuing/access/connect/token.
|
|
6
|
+
# The api_client encodes this as application/x-www-form-urlencoded.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute grant_type
|
|
9
|
+
# @return [String] Must be "client_credentials".
|
|
10
|
+
# @!attribute client_id
|
|
11
|
+
# @return [String] Access key ID.
|
|
12
|
+
# @!attribute client_secret
|
|
13
|
+
# @return [String] Access key secret.
|
|
14
|
+
# @!attribute cardholder_id
|
|
15
|
+
# @return [String] The cardholder's unique identifier (e.g. "crh_...").
|
|
16
|
+
# @!attribute single_use
|
|
17
|
+
# @return [Boolean] Whether the request is for a single-use token.
|
|
18
|
+
class CardholderAccessTokenRequest
|
|
19
|
+
attr_accessor :grant_type, :client_id, :client_secret, :cardholder_id, :single_use
|
|
20
|
+
|
|
21
|
+
def initialize
|
|
22
|
+
@grant_type = 'client_credentials'
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Request body for POST /issuing/disputes.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute transaction_id
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute reason
|
|
10
|
+
# @return [String]
|
|
11
|
+
# @!attribute evidence
|
|
12
|
+
# @return [Array<Hash>]
|
|
13
|
+
# @!attribute amount
|
|
14
|
+
# @return [Numeric]
|
|
15
|
+
# @!attribute presentment_message_id
|
|
16
|
+
# @return [String]
|
|
17
|
+
# @!attribute justification
|
|
18
|
+
# @return [String]
|
|
19
|
+
class CreateDisputeRequest
|
|
20
|
+
attr_accessor :transaction_id, :reason, :evidence, :amount,
|
|
21
|
+
:presentment_message_id, :justification
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Request body for POST /issuing/disputes/{disputeId}/escalate.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute additional_evidence
|
|
8
|
+
# @return [Array<Hash>]
|
|
9
|
+
# @!attribute amount
|
|
10
|
+
# @return [Numeric]
|
|
11
|
+
# @!attribute reason_change
|
|
12
|
+
# @return [String]
|
|
13
|
+
# @!attribute justification
|
|
14
|
+
# @return [String] Required.
|
|
15
|
+
class EscalateDisputeRequest
|
|
16
|
+
attr_accessor :additional_evidence, :amount, :reason_change, :justification
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Identification document attached to a cardholder. Matches swagger
|
|
6
|
+
# `IdentificationDocument`. `type` and `front_document_id` are required.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute type
|
|
9
|
+
# @return [String] Document type (e.g. "passport"). [Required]
|
|
10
|
+
# @!attribute front_document_id
|
|
11
|
+
# @return [String] File id of the front-side scan. [Required]
|
|
12
|
+
# @!attribute back_document_id
|
|
13
|
+
# @return [String] File id of the back-side scan (when applicable).
|
|
14
|
+
class IdentificationDocument
|
|
15
|
+
attr_accessor :type, :front_document_id, :back_document_id
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|