checkout_sdk 1.2.2 → 1.9.1
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/.overcommit.yml +30 -0
- data/.rubocop.yml +15 -1
- data/.ruby-version +1 -0
- data/Gemfile +3 -1
- data/README.md +38 -0
- data/Rakefile +2 -2
- data/lib/checkout_sdk/accounts/account_holder.rb +10 -2
- data/lib/checkout_sdk/accounts/account_holder_corporate.rb +15 -0
- data/lib/checkout_sdk/accounts/account_holder_individual.rb +18 -0
- data/lib/checkout_sdk/accounts/accounts.rb +34 -1
- data/lib/checkout_sdk/accounts/accounts_client.rb +134 -1
- data/lib/checkout_sdk/accounts/additional_document.rb +11 -0
- data/lib/checkout_sdk/accounts/additional_info.rb +17 -0
- data/lib/checkout_sdk/accounts/articles_of_association_type.rb +10 -0
- data/lib/checkout_sdk/accounts/bank_verification.rb +14 -0
- data/lib/checkout_sdk/accounts/bank_verification_type.rb +9 -0
- data/lib/checkout_sdk/accounts/company.rb +7 -1
- data/lib/checkout_sdk/accounts/contact_details.rb +4 -1
- data/lib/checkout_sdk/accounts/date_of_incorporation.rb +14 -0
- 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/financial_verification.rb +14 -0
- data/lib/checkout_sdk/accounts/financial_verification_type.rb +9 -0
- data/lib/checkout_sdk/accounts/instrument_details_ach.rb +21 -0
- data/lib/checkout_sdk/accounts/{headers.rb → invitee.rb} +3 -3
- data/lib/checkout_sdk/accounts/onboard_entity.rb +21 -4
- data/lib/checkout_sdk/accounts/onboard_sub_entity_documents.rb +31 -4
- data/lib/checkout_sdk/accounts/processing_details.rb +26 -0
- data/lib/checkout_sdk/accounts/proof_of_legality.rb +14 -0
- data/lib/checkout_sdk/accounts/proof_of_legality_type.rb +9 -0
- data/lib/checkout_sdk/accounts/proof_of_principal_address.rb +14 -0
- data/lib/checkout_sdk/accounts/proof_of_principal_address_type.rb +9 -0
- 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/schedule_frequency_daily.rb +1 -1
- data/lib/checkout_sdk/accounts/schedule_frequency_monthly.rb +1 -1
- data/lib/checkout_sdk/accounts/schedule_frequency_weekly.rb +1 -1
- data/lib/checkout_sdk/accounts/shareholder_structure.rb +14 -0
- data/lib/checkout_sdk/accounts/shareholder_structure_type.rb +9 -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 +81 -62
- data/lib/checkout_sdk/apm/ideal/ideal_client.rb +1 -1
- data/lib/checkout_sdk/apm/previous/klarna/klarna_client.rb +1 -1
- data/lib/checkout_sdk/apm/previous/sepa/sepa_client.rb +1 -1
- 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 +75 -1
- data/lib/checkout_sdk/checkout_oauth_sdk_builder.rb +12 -1
- data/lib/checkout_sdk/client.rb +2 -3
- data/lib/checkout_sdk/common/account_change_indicator_type.rb +12 -0
- data/lib/checkout_sdk/common/account_holder.rb +12 -9
- data/lib/checkout_sdk/common/account_password_change_indicator_type.rb +13 -0
- data/lib/checkout_sdk/common/account_type_card_product_type.rb +11 -0
- data/lib/checkout_sdk/common/cardholder_account_age_indicator_type.rb +13 -0
- data/lib/checkout_sdk/common/common.rb +7 -0
- data/lib/checkout_sdk/common/customer_retry.rb +11 -0
- data/lib/checkout_sdk/common/destination.rb +38 -0
- data/lib/checkout_sdk/common/headers.rb +16 -0
- data/lib/checkout_sdk/common/payment_source_type.rb +9 -0
- data/lib/checkout_sdk/common/product.rb +4 -1
- 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/customers/customers_client.rb +1 -1
- data/lib/checkout_sdk/disputes/dispute_status.rb +1 -0
- data/lib/checkout_sdk/disputes/disputes_client.rb +23 -2
- data/lib/checkout_sdk/disputes/disputes_query_filter.rb +49 -11
- data/lib/checkout_sdk/environment.rb +8 -1
- data/lib/checkout_sdk/environment_subdomain.rb +16 -12
- data/lib/checkout_sdk/error.rb +24 -8
- data/lib/checkout_sdk/financial/financial_client.rb +1 -1
- data/lib/checkout_sdk/forward/create_secret_request.rb +17 -0
- data/lib/checkout_sdk/forward/forward.rb +5 -0
- data/lib/checkout_sdk/forward/forward_client.rb +52 -0
- 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 +82 -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 +99 -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/instruments/create/instrument_bank_account.rb +1 -1
- data/lib/checkout_sdk/instruments/create/instrument_sepa.rb +1 -1
- data/lib/checkout_sdk/instruments/create/instrument_token.rb +1 -1
- data/lib/checkout_sdk/instruments/instruments_client.rb +1 -1
- data/lib/checkout_sdk/instruments/previous/instruments_client.rb +1 -1
- data/lib/checkout_sdk/instruments/update/update_instrument_bank_account.rb +1 -1
- data/lib/checkout_sdk/instruments/update/update_instrument_card.rb +1 -1
- data/lib/checkout_sdk/instruments/update/update_instrument_token.rb +1 -1
- 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/amend_dispute_request.rb +31 -0
- data/lib/checkout_sdk/issuing/cardholder_access_token_request.rb +26 -0
- data/lib/checkout_sdk/issuing/create_dispute_request.rb +27 -0
- data/lib/checkout_sdk/issuing/escalate_dispute_request.rb +23 -0
- data/lib/checkout_sdk/issuing/issuing.rb +27 -0
- data/lib/checkout_sdk/issuing/issuing_address.rb +25 -0
- data/lib/checkout_sdk/issuing/issuing_client.rb +274 -14
- data/lib/checkout_sdk/issuing/issuing_dispute_fraud_details.rb +18 -0
- data/lib/checkout_sdk/issuing/issuing_dispute_fraud_type.rb +21 -0
- 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/simulate_refund_request.rb +13 -0
- data/lib/checkout_sdk/issuing/submit_dispute_request.rb +21 -0
- data/lib/checkout_sdk/issuing/update_card_request.rb +27 -0
- data/lib/checkout_sdk/issuing/update_cardholder_request.rb +29 -0
- data/lib/checkout_sdk/issuing/update_control_profile_request.rb +13 -0
- data/lib/checkout_sdk/metadata/metadata_client.rb +1 -1
- data/lib/checkout_sdk/metadata/source/bin_metadata_source.rb +1 -1
- data/lib/checkout_sdk/metadata/source/card_metadata_source.rb +1 -1
- data/lib/checkout_sdk/metadata/source/id_metadata_source.rb +1 -1
- data/lib/checkout_sdk/metadata/source/token_metadata_source.rb +1 -1
- 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/oauth_access_token.rb +6 -1
- data/lib/checkout_sdk/oauth_scopes.rb +4 -0
- data/lib/checkout_sdk/oauth_sdk_credentials.rb +2 -1
- 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/applepay.rb +14 -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/{sessions/card.rb → card.rb} +4 -1
- data/lib/checkout_sdk/payments/contexts/payment_contexts_client.rb +1 -1
- data/lib/checkout_sdk/payments/destination/bank_account_destination.rb +1 -1
- data/lib/checkout_sdk/payments/destination/card_destination.rb +1 -1
- data/lib/checkout_sdk/payments/destination/id_destination.rb +1 -1
- data/lib/checkout_sdk/payments/destination/token_destination.rb +1 -1
- data/lib/checkout_sdk/payments/exemption.rb +2 -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/googlepay.rb +14 -0
- data/lib/checkout_sdk/payments/hosted/hosted_payment_instruction.rb +11 -0
- data/lib/checkout_sdk/payments/hosted/hosted_payments_client.rb +1 -1
- data/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +51 -23
- data/lib/checkout_sdk/payments/hosted/payment_purpose_type.rb +27 -0
- data/lib/checkout_sdk/payments/links/payment_link.rb +26 -1
- data/lib/checkout_sdk/payments/links/payments_links_client.rb +1 -1
- data/lib/checkout_sdk/payments/locale_type.rb +31 -0
- data/lib/checkout_sdk/payments/partial_authorization.rb +11 -0
- data/lib/checkout_sdk/payments/passenger.rb +20 -6
- data/lib/checkout_sdk/payments/payment_method_configuration.rb +17 -0
- data/lib/checkout_sdk/payments/payment_plan.rb +43 -0
- data/lib/checkout_sdk/payments/payment_request.rb +5 -1
- data/lib/checkout_sdk/payments/payments.rb +48 -4
- data/lib/checkout_sdk/payments/payments_client.rb +1 -1
- data/lib/checkout_sdk/payments/payments_search_request.rb +20 -0
- data/lib/checkout_sdk/payments/previous/destination/card_destination.rb +1 -1
- data/lib/checkout_sdk/payments/previous/destination/id_destination.rb +1 -1
- data/lib/checkout_sdk/payments/previous/destination/token_destination.rb +1 -1
- data/lib/checkout_sdk/payments/previous/payments_client.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/alipay_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/alma_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/bancontact_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/benefit_pay_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/boleto_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/eps_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/fawry_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/giropay_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/ideal_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/klarna_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/knet_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/multi_banco_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/oxxo_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/p24_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/pago_facil_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/paypal_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/poli_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/qpay_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/rapi_pago_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/sofort_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/card_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/customer_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/d_local_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/id_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/network_token_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/token_source.rb +1 -1
- data/lib/checkout_sdk/payments/processing_data.rb +45 -0
- data/lib/checkout_sdk/payments/processing_settings.rb +14 -1
- data/lib/checkout_sdk/payments/product.rb +14 -1
- data/lib/checkout_sdk/payments/product_item_type.rb +11 -0
- data/lib/checkout_sdk/payments/product_sub_type.rb +13 -0
- data/lib/checkout_sdk/payments/refund_order.rb +53 -0
- data/lib/checkout_sdk/payments/refund_request.rb +11 -2
- data/lib/checkout_sdk/payments/sender/corporate_sender.rb +1 -1
- data/lib/checkout_sdk/payments/sender/government_sender.rb +4 -1
- data/lib/checkout_sdk/payments/sender/individual_sender.rb +4 -1
- data/lib/checkout_sdk/payments/sender/instrument_sender.rb +1 -1
- data/lib/checkout_sdk/payments/sessions/payment_sessions_client.rb +13 -1
- data/lib/checkout_sdk/payments/sessions/payment_sessions_request.rb +11 -1
- data/lib/checkout_sdk/payments/sessions/store_payment_details_type.rb +1 -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/bacs_payment_method.rb +41 -0
- data/lib/checkout_sdk/payments/setups/blik_payment_method.rb +20 -0
- data/lib/checkout_sdk/payments/setups/card_present_payment_method.rb +35 -0
- data/lib/checkout_sdk/payments/setups/pay_by_bank_payment_method.rb +24 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_account_funding_transaction.rb +20 -0
- data/lib/checkout_sdk/payments/setups/payment_setups_client.rb +75 -0
- data/lib/checkout_sdk/payments/setups/stablecoin_payment_method.rb +16 -0
- data/lib/checkout_sdk/payments/source/apm/ach_source.rb +27 -0
- data/lib/checkout_sdk/payments/source/apm/after_pay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/alma_source.rb +1 -1
- 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/bizum_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/apm/blik_source.rb +31 -0
- data/lib/checkout_sdk/payments/source/apm/cv_connect_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/eps_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/fawry_source.rb +1 -1
- 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/illicado_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/klarna_source.rb +1 -1
- 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/octopus_source.rb +11 -0
- data/lib/checkout_sdk/payments/source/apm/p24_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/paypal_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/plaid_source.rb +17 -0
- 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/sepa_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/sequra_source.rb +15 -0
- 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/trustly_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 +5 -2
- data/lib/checkout_sdk/payments/source/currency_account_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/customer_source.rb +5 -2
- data/lib/checkout_sdk/payments/source/entity_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/id_source.rb +5 -2
- data/lib/checkout_sdk/payments/source/network_token_source.rb +8 -2
- data/lib/checkout_sdk/payments/source/provider_token_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/token_source.rb +5 -2
- data/lib/checkout_sdk/reports/reports_client.rb +1 -1
- data/lib/checkout_sdk/risk/source/card_source.rb +1 -1
- data/lib/checkout_sdk/risk/source/customer_source.rb +1 -1
- data/lib/checkout_sdk/risk/source/id_source.rb +1 -1
- data/lib/checkout_sdk/risk/source/token_source.rb +1 -1
- data/lib/checkout_sdk/sessions/authentication_method.rb +3 -3
- data/lib/checkout_sdk/sessions/authentication_type.rb +3 -3
- data/lib/checkout_sdk/sessions/card_holder_account_info.rb +39 -3
- data/lib/checkout_sdk/sessions/channel/app_session.rb +1 -1
- data/lib/checkout_sdk/sessions/channel/browser_session.rb +5 -2
- data/lib/checkout_sdk/sessions/channel/channel_data_type.rb +1 -0
- data/lib/checkout_sdk/sessions/channel/merchant_initiated_session.rb +15 -0
- data/lib/checkout_sdk/sessions/channel/request_type.rb +19 -0
- data/lib/checkout_sdk/sessions/channel/sdk_interface_type.rb +2 -2
- data/lib/checkout_sdk/sessions/completion/hosted_completion_info.rb +1 -1
- data/lib/checkout_sdk/sessions/completion/non_hosted_completion_info.rb +1 -1
- data/lib/checkout_sdk/sessions/device_information.rb +17 -0
- data/lib/checkout_sdk/sessions/initial_transaction.rb +23 -0
- data/lib/checkout_sdk/sessions/installment.rb +5 -0
- data/lib/checkout_sdk/sessions/merchant_risk_info.rb +20 -2
- data/lib/checkout_sdk/sessions/optimization.rb +19 -0
- data/lib/checkout_sdk/sessions/optimized_properties.rb +17 -0
- data/lib/checkout_sdk/sessions/pre_order_purchase_indicator_type.rb +10 -0
- data/lib/checkout_sdk/sessions/recurring.rb +5 -0
- data/lib/checkout_sdk/sessions/reorder_items_indicator_type.rb +10 -0
- data/lib/checkout_sdk/sessions/session_request.rb +26 -2
- data/lib/checkout_sdk/sessions/sessions.rb +10 -0
- data/lib/checkout_sdk/sessions/sessions_client.rb +2 -2
- data/lib/checkout_sdk/sessions/source/card_source.rb +3 -2
- data/lib/checkout_sdk/sessions/source/id_source.rb +1 -1
- data/lib/checkout_sdk/sessions/source/network_token_source.rb +1 -1
- data/lib/checkout_sdk/sessions/source/token_source.rb +1 -1
- data/lib/checkout_sdk/sessions/three_ds_method_completion_request.rb +3 -1
- data/lib/checkout_sdk/sessions/three_ds_req_auth_method.rb +16 -0
- data/lib/checkout_sdk/sessions/three_ds_requestor_authentication_info.rb +17 -0
- data/lib/checkout_sdk/sessions/transaction_type.rb +3 -3
- data/lib/checkout_sdk/sources/sepa_source_request.rb +1 -1
- data/lib/checkout_sdk/sources/sources_client.rb +1 -1
- 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/apple_pay_token_request.rb +1 -1
- data/lib/checkout_sdk/tokens/google_pay_token_request.rb +1 -1
- 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/transfers/create_transfer.rb +5 -5
- data/lib/checkout_sdk/transfers/transfer_source.rb +4 -1
- data/lib/checkout_sdk/transfers/transfers_client.rb +2 -2
- data/lib/checkout_sdk/version.rb +1 -1
- data/lib/checkout_sdk/workflows/entity_workflow_condition.rb +1 -1
- data/lib/checkout_sdk/workflows/event_workflow_condition.rb +1 -1
- data/lib/checkout_sdk/workflows/processing_channel_workflow_condition.rb +1 -1
- data/lib/checkout_sdk/workflows/webhook_workflow_action.rb +1 -1
- data/lib/checkout_sdk/workflows/workflows_client.rb +1 -1
- data/lib/checkout_sdk.rb +8 -0
- metadata +194 -19
- data/lib/checkout_sdk/payments/passenger_name.rb +0 -11
- data/lib/checkout_sdk/payments/sessions/payment_method_configuration.rb +0 -11
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'csv'
|
|
4
|
+
|
|
3
5
|
module CheckoutSdk
|
|
4
6
|
class ApiClient
|
|
5
7
|
attr_accessor :client, :multipart_client, :log
|
|
6
8
|
|
|
7
|
-
# @param [CheckoutConfiguration] configuration
|
|
8
|
-
# @param [String] uri
|
|
9
9
|
def initialize(configuration, uri)
|
|
10
10
|
@client = configuration.http_client.clone
|
|
11
11
|
@client.url_prefix = uri
|
|
@@ -14,54 +14,41 @@ module CheckoutSdk
|
|
|
14
14
|
@log = configuration.logger
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
# @param [SdkAuthorization] authorization
|
|
19
|
-
# @param [Object] params
|
|
20
|
-
def invoke_get(path,
|
|
21
|
-
authorization,
|
|
22
|
-
params = nil)
|
|
17
|
+
def invoke_get(path, authorization, params = nil)
|
|
23
18
|
invoke(:get, path, authorization, params: params)
|
|
24
19
|
end
|
|
25
20
|
|
|
26
|
-
def invoke_post(path,
|
|
27
|
-
|
|
28
|
-
request = nil,
|
|
29
|
-
idempotency_key = nil)
|
|
30
|
-
invoke(:post, path, authorization, request, idempotency_key)
|
|
21
|
+
def invoke_post(path, authorization, request = nil, idempotency_key = nil)
|
|
22
|
+
invoke(:post, path, authorization, request, idempotency_key, params: nil)
|
|
31
23
|
end
|
|
32
24
|
|
|
33
|
-
def invoke_put(path,
|
|
34
|
-
|
|
35
|
-
request)
|
|
36
|
-
invoke(:put, path, authorization, request)
|
|
25
|
+
def invoke_put(path, authorization, request, headers = nil)
|
|
26
|
+
invoke(:put, path, authorization, request, nil, params: nil, extra_headers: headers)
|
|
37
27
|
end
|
|
38
28
|
|
|
39
|
-
def invoke_patch(path,
|
|
40
|
-
|
|
41
|
-
request = nil)
|
|
42
|
-
invoke(:patch, path, authorization, request)
|
|
29
|
+
def invoke_patch(path, authorization, request = nil)
|
|
30
|
+
invoke(:patch, path, authorization, request, nil, params: nil)
|
|
43
31
|
end
|
|
44
32
|
|
|
45
|
-
def invoke_delete(path,
|
|
46
|
-
authorization)
|
|
33
|
+
def invoke_delete(path, authorization)
|
|
47
34
|
invoke(:delete, path, authorization)
|
|
48
35
|
end
|
|
49
36
|
|
|
50
|
-
def submit_file(path,
|
|
51
|
-
authorization,
|
|
52
|
-
request)
|
|
37
|
+
def submit_file(path, authorization, request)
|
|
53
38
|
upload(path, authorization, request)
|
|
54
39
|
end
|
|
55
40
|
|
|
56
41
|
private
|
|
57
42
|
|
|
58
|
-
def invoke(method, path, authorization, body = nil, idempotency_key = nil, params: nil)
|
|
43
|
+
def invoke(method, path, authorization, body = nil, idempotency_key = nil, params: nil, extra_headers: nil)
|
|
59
44
|
path = append_params(path, params) unless params.nil?
|
|
60
45
|
|
|
61
|
-
headers =
|
|
46
|
+
headers = default_headers(authorization)
|
|
62
47
|
headers[:'Content-Type'] = 'application/json'
|
|
63
48
|
headers[:'Cko-Idempotency-Key'] = idempotency_key unless idempotency_key.nil?
|
|
64
49
|
|
|
50
|
+
apply_extra_headers(headers, extra_headers)
|
|
51
|
+
|
|
65
52
|
json_body = CheckoutSdk::JsonSerializer.to_custom_hash(body).to_json
|
|
66
53
|
|
|
67
54
|
begin
|
|
@@ -71,26 +58,33 @@ module CheckoutSdk
|
|
|
71
58
|
raise CheckoutApiException, e.response
|
|
72
59
|
end
|
|
73
60
|
|
|
74
|
-
parse_response
|
|
61
|
+
parse_response(response)
|
|
75
62
|
end
|
|
76
63
|
|
|
77
|
-
def
|
|
78
|
-
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
64
|
+
def default_headers(authorization)
|
|
65
|
+
{ 'User-Agent': "checkout-sdk-ruby/#{VERSION}", Accept: 'application/json',
|
|
66
|
+
Authorization: authorization.authorization_header }
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Map a typed headers container (e.g. {CheckoutSdk::Common::Headers}) onto the underlying
|
|
70
|
+
# HTTP header hash. Each attribute that's set is emitted as the corresponding
|
|
71
|
+
# canonical HTTP header.
|
|
72
|
+
def apply_extra_headers(http_headers, extra_headers)
|
|
73
|
+
return if extra_headers.nil?
|
|
74
|
+
return unless extra_headers.respond_to?(:if_match) && extra_headers.if_match
|
|
75
|
+
|
|
76
|
+
http_headers[:'If-Match'] = extra_headers.if_match
|
|
83
77
|
end
|
|
84
78
|
|
|
85
79
|
def append_params(path, input_params)
|
|
86
80
|
raise CheckoutArgumentException, 'Query parameters were not provided' if input_params.nil?
|
|
87
81
|
|
|
88
|
-
if input_params.is_a? String
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
82
|
+
params = if input_params.is_a? String
|
|
83
|
+
input_params
|
|
84
|
+
else
|
|
85
|
+
hash = CheckoutSdk::JsonSerializer.to_custom_hash(input_params)
|
|
86
|
+
URI.encode_www_form(hash)
|
|
87
|
+
end
|
|
94
88
|
|
|
95
89
|
"#{path}?#{params}"
|
|
96
90
|
end
|
|
@@ -103,48 +97,73 @@ module CheckoutSdk
|
|
|
103
97
|
MIME::Types.type_for(file_request.file).first,
|
|
104
98
|
File.basename(file_request.file)
|
|
105
99
|
),
|
|
106
|
-
:
|
|
100
|
+
purpose: file_request.purpose
|
|
107
101
|
}
|
|
108
102
|
end
|
|
109
103
|
|
|
110
104
|
def upload(path, authorization, file_request)
|
|
111
|
-
headers =
|
|
105
|
+
headers = default_headers(authorization)
|
|
112
106
|
|
|
113
|
-
|
|
107
|
+
File.open(file_request.file) do |file|
|
|
108
|
+
form = build_multipart_request(file_request, file)
|
|
114
109
|
|
|
115
|
-
|
|
110
|
+
begin
|
|
111
|
+
@log.info "post: /#{path}"
|
|
112
|
+
response = @multipart_client.run_request(:post, path, form, headers)
|
|
113
|
+
rescue Faraday::ClientError => e
|
|
114
|
+
raise CheckoutApiException, e.response
|
|
115
|
+
end
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
@log.info "post: /#{path}"
|
|
119
|
-
response = @multipart_client.run_request(:post, path, form, headers)
|
|
120
|
-
rescue Faraday::ClientError => e
|
|
121
|
-
raise CheckoutApiException, e.response
|
|
122
|
-
ensure
|
|
123
|
-
file.close
|
|
117
|
+
parse_response(response)
|
|
124
118
|
end
|
|
125
|
-
|
|
126
|
-
parse_response response
|
|
127
119
|
end
|
|
128
120
|
|
|
129
121
|
def parse_response(response)
|
|
130
122
|
raise CheckoutApiException, response if response.status < 200 || response.status >= 400
|
|
131
123
|
|
|
132
124
|
metadata = CheckoutUtils.map_to_http_metadata(response)
|
|
133
|
-
body =
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
125
|
+
body = parse_body(response)
|
|
126
|
+
|
|
127
|
+
if body.is_a?(Array)
|
|
128
|
+
body = OpenStruct.new(items: body)
|
|
129
|
+
elsif !body.is_a?(OpenStruct)
|
|
130
|
+
body = OpenStruct.new(contents: body)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
body.http_metadata = metadata if body.is_a?(OpenStruct)
|
|
134
|
+
|
|
137
135
|
body
|
|
136
|
+
rescue JSON::ParserError => e
|
|
137
|
+
raise CheckoutApiException.new(response, "Error parsing JSON: #{e.message}")
|
|
138
|
+
rescue StandardError => e
|
|
139
|
+
@log&.error("Unexpected error occurred: #{e.message}")
|
|
140
|
+
raise
|
|
138
141
|
end
|
|
139
142
|
|
|
140
|
-
def
|
|
141
|
-
|
|
143
|
+
def parse_body(response)
|
|
144
|
+
content_type = response.headers['Content-Type']
|
|
145
|
+
return OpenStruct.new if response.body.nil? || response.body.empty?
|
|
142
146
|
|
|
143
|
-
if
|
|
144
|
-
JSON.parse(response.body
|
|
147
|
+
if content_type&.include?('application/json')
|
|
148
|
+
parsed_value = JSON.parse(response.body)
|
|
149
|
+
deep_convert_to_ostruct(parsed_value)
|
|
150
|
+
elsif content_type&.include?('text/csv')
|
|
151
|
+
csv_data = CSV.parse(response.body, headers: true)
|
|
152
|
+
OpenStruct.new(csv: csv_data)
|
|
145
153
|
else
|
|
146
154
|
OpenStruct.new(contents: response.body)
|
|
147
155
|
end
|
|
148
156
|
end
|
|
157
|
+
|
|
158
|
+
def deep_convert_to_ostruct(obj)
|
|
159
|
+
case obj
|
|
160
|
+
when Hash
|
|
161
|
+
OpenStruct.new(obj.transform_values { |value| deep_convert_to_ostruct(value) })
|
|
162
|
+
when Array
|
|
163
|
+
obj.map { |item| deep_convert_to_ostruct(item) }
|
|
164
|
+
else
|
|
165
|
+
obj
|
|
166
|
+
end
|
|
167
|
+
end
|
|
149
168
|
end
|
|
150
169
|
end
|
|
@@ -10,7 +10,7 @@ module CheckoutSdk
|
|
|
10
10
|
# @param [ApiClient] api_client
|
|
11
11
|
# @param [CheckoutConfiguration] configuration
|
|
12
12
|
def initialize(api_client, configuration)
|
|
13
|
-
super
|
|
13
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def info
|
|
@@ -13,7 +13,7 @@ module CheckoutSdk
|
|
|
13
13
|
# @param [ApiClient] api_client
|
|
14
14
|
# @param [CheckoutConfiguration] configuration
|
|
15
15
|
def initialize(api_client, configuration)
|
|
16
|
-
super
|
|
16
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
# @param credit_session_request [Hash, CreditSessionRequest]
|
|
@@ -13,7 +13,7 @@ module CheckoutSdk
|
|
|
13
13
|
# @param [ApiClient] api_client
|
|
14
14
|
# @param [CheckoutConfiguration] configuration
|
|
15
15
|
def initialize(api_client, configuration)
|
|
16
|
-
super
|
|
16
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
# @param mandate_id [String]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Balances
|
|
5
|
+
# Balance values returned per currency account (swagger schema: Balance).
|
|
6
|
+
#
|
|
7
|
+
# @!attribute pending
|
|
8
|
+
# @return [Integer] Incoming funds that will be added to Available once cleared.
|
|
9
|
+
# @!attribute available
|
|
10
|
+
# @return [Integer] Funds available for processing.
|
|
11
|
+
# @!attribute payable
|
|
12
|
+
# @return [Integer] Funds reserved from Available for outgoing transactions not yet cleared.
|
|
13
|
+
# @!attribute collateral
|
|
14
|
+
# @return [Integer] Funds held to cover potential liabilities.
|
|
15
|
+
# @!attribute operational
|
|
16
|
+
# @return [Integer] Funds held for processing Payouts and Issuing payments when Available is insufficient.
|
|
17
|
+
# @!attribute collateral_breakdown
|
|
18
|
+
# @return [CollateralBreakdown]
|
|
19
|
+
class BalanceValues
|
|
20
|
+
attr_accessor :pending,
|
|
21
|
+
:available,
|
|
22
|
+
:payable,
|
|
23
|
+
:collateral,
|
|
24
|
+
:operational,
|
|
25
|
+
:collateral_breakdown
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'checkout_sdk/balances/balances_query'
|
|
4
|
+
require 'checkout_sdk/balances/collateral_breakdown'
|
|
5
|
+
require 'checkout_sdk/balances/balance_values'
|
|
6
|
+
require 'checkout_sdk/balances/currency_account_balance'
|
|
3
7
|
require 'checkout_sdk/balances/balances_client'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Balances
|
|
5
|
+
# Query parameters accepted by GET /balances/{id}.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute query
|
|
8
|
+
# @return [String] Search expression (e.g. "currency:EUR").
|
|
9
|
+
# @!attribute with_currency_account_id
|
|
10
|
+
# @return [TrueClass, FalseClass] When true, the response includes the
|
|
11
|
+
# `currency_account_id` on each {CurrencyAccountBalance}.
|
|
12
|
+
# Serialised as `withCurrencyAccountId`.
|
|
13
|
+
# @!attribute balances_at
|
|
14
|
+
# @return [String] A UTC datetime (RFC 3339) to retrieve historical
|
|
15
|
+
# balances at a specific point in time. Must be in the past.
|
|
16
|
+
# Serialised as `balancesAt`.
|
|
17
|
+
class BalancesQuery
|
|
18
|
+
attr_accessor :query,
|
|
19
|
+
:with_currency_account_id,
|
|
20
|
+
:balances_at
|
|
21
|
+
|
|
22
|
+
# Returns the params in the camelCase form expected by the API.
|
|
23
|
+
def to_h
|
|
24
|
+
{
|
|
25
|
+
query: query,
|
|
26
|
+
withCurrencyAccountId: with_currency_account_id,
|
|
27
|
+
balancesAt: balances_at
|
|
28
|
+
}.compact
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Balances
|
|
5
|
+
# Breakdown of the funds held in the `collateral` balance.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute fixed_reserve
|
|
8
|
+
# @return [Integer] (required) The portion of the `collateral` balance held as a fixed reserve.
|
|
9
|
+
# @!attribute rolling_reserve
|
|
10
|
+
# @return [Integer] (required) The portion of the `collateral` balance held as a rolling reserve.
|
|
11
|
+
class CollateralBreakdown
|
|
12
|
+
attr_accessor :fixed_reserve,
|
|
13
|
+
:rolling_reserve
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Balances
|
|
5
|
+
# A single currency account's balance details (swagger: CurrencyAccountBalance).
|
|
6
|
+
#
|
|
7
|
+
# @!attribute currency_account_id
|
|
8
|
+
# @return [String] The unique identifier of the currency account (sub-account).
|
|
9
|
+
# Returned only when the request is made with `withCurrencyAccountId=true`.
|
|
10
|
+
# @!attribute descriptor
|
|
11
|
+
# @return [String]
|
|
12
|
+
# @!attribute holding_currency
|
|
13
|
+
# @return [String] {CheckoutSdk::Common::Currency}
|
|
14
|
+
# @!attribute balances_as_of
|
|
15
|
+
# @return [String] UTC datetime (RFC 3339) reflecting when balance values were fetched.
|
|
16
|
+
# @!attribute balances
|
|
17
|
+
# @return [BalanceValues]
|
|
18
|
+
class CurrencyAccountBalance
|
|
19
|
+
attr_accessor :currency_account_id,
|
|
20
|
+
:descriptor,
|
|
21
|
+
:holding_currency,
|
|
22
|
+
:balances_as_of,
|
|
23
|
+
:balances
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -43,6 +43,38 @@ module CheckoutSdk
|
|
|
43
43
|
# @return [CheckoutSdk::Payments::PaymentContextsClient]
|
|
44
44
|
# @!attribute payment_sessions
|
|
45
45
|
# @return [CheckoutSdk::Payments::PaymentSessionsClient]
|
|
46
|
+
# @!attribute payments_setups
|
|
47
|
+
# @return [CheckoutSdk::Payments::PaymentSetupsClient]
|
|
48
|
+
# @!attribute flow
|
|
49
|
+
# @return [CheckoutSdk::Payments::FlowClient]
|
|
50
|
+
# @!attribute forward
|
|
51
|
+
# @return [CheckoutSdk::Forward::ForwardClient]
|
|
52
|
+
# @!attribute onboarding_simulator
|
|
53
|
+
# @return [CheckoutSdk::OnboardingSimulator::OnboardingSimulatorClient]
|
|
54
|
+
# @!attribute agentic_commerce
|
|
55
|
+
# @return [CheckoutSdk::AgenticCommerce::AgenticCommerceClient]
|
|
56
|
+
# @!attribute compliance_requests
|
|
57
|
+
# @return [CheckoutSdk::ComplianceRequests::ComplianceRequestsClient]
|
|
58
|
+
# @!attribute standalone_account_updater
|
|
59
|
+
# @return [CheckoutSdk::StandaloneAccountUpdater::StandaloneAccountUpdaterClient]
|
|
60
|
+
# @!attribute network_tokens
|
|
61
|
+
# @return [CheckoutSdk::NetworkTokens::NetworkTokensClient]
|
|
62
|
+
# @!attribute payment_methods
|
|
63
|
+
# @return [CheckoutSdk::PaymentMethods::PaymentMethodsClient]
|
|
64
|
+
# @!attribute applicants
|
|
65
|
+
# @return [CheckoutSdk::Identities::Applicants::ApplicantsClient]
|
|
66
|
+
# @!attribute aml_screening
|
|
67
|
+
# @return [CheckoutSdk::Identities::AmlScreening::AmlScreeningClient]
|
|
68
|
+
# @!attribute id_document_verification
|
|
69
|
+
# @return [CheckoutSdk::Identities::IdDocumentVerification::IdDocumentVerificationClient]
|
|
70
|
+
# @!attribute identity_verification
|
|
71
|
+
# @return [CheckoutSdk::Identities::IdentityVerification::IdentityVerificationClient]
|
|
72
|
+
# @!attribute face_authentication
|
|
73
|
+
# @return [CheckoutSdk::Identities::FaceAuthentication::FaceAuthenticationClient]
|
|
74
|
+
# @!attribute apple_pay
|
|
75
|
+
# @return [CheckoutSdk::Payments::ApplePayClient]
|
|
76
|
+
# @!attribute google_pay
|
|
77
|
+
# @return [CheckoutSdk::Payments::GooglePayClient]
|
|
46
78
|
class CheckoutApi
|
|
47
79
|
attr_reader :customers,
|
|
48
80
|
:disputes,
|
|
@@ -51,6 +83,8 @@ module CheckoutSdk
|
|
|
51
83
|
:instruments,
|
|
52
84
|
:links,
|
|
53
85
|
:payments,
|
|
86
|
+
:payments_setups,
|
|
87
|
+
:flow,
|
|
54
88
|
:reports,
|
|
55
89
|
:sessions,
|
|
56
90
|
:tokens,
|
|
@@ -64,7 +98,21 @@ module CheckoutSdk
|
|
|
64
98
|
:financial,
|
|
65
99
|
:issuing,
|
|
66
100
|
:contexts,
|
|
67
|
-
:payment_sessions
|
|
101
|
+
:payment_sessions,
|
|
102
|
+
:forward,
|
|
103
|
+
:onboarding_simulator,
|
|
104
|
+
:agentic_commerce,
|
|
105
|
+
:compliance_requests,
|
|
106
|
+
:standalone_account_updater,
|
|
107
|
+
:network_tokens,
|
|
108
|
+
:payment_methods,
|
|
109
|
+
:applicants,
|
|
110
|
+
:aml_screening,
|
|
111
|
+
:id_document_verification,
|
|
112
|
+
:identity_verification,
|
|
113
|
+
:face_authentication,
|
|
114
|
+
:apple_pay,
|
|
115
|
+
:google_pay
|
|
68
116
|
|
|
69
117
|
# @param [CheckoutConfiguration] configuration
|
|
70
118
|
def initialize(configuration)
|
|
@@ -90,6 +138,26 @@ module CheckoutSdk
|
|
|
90
138
|
@issuing = CheckoutSdk::Issuing::IssuingClient.new api_client, configuration
|
|
91
139
|
@contexts = CheckoutSdk::Payments::PaymentContextsClient.new api_client, configuration
|
|
92
140
|
@payment_sessions = CheckoutSdk::Payments::PaymentSessionsClient.new api_client, configuration
|
|
141
|
+
@payments_setups = CheckoutSdk::Payments::PaymentSetupsClient.new api_client, configuration
|
|
142
|
+
@flow = CheckoutSdk::Payments::FlowClient.new api_client, configuration
|
|
143
|
+
@forward = CheckoutSdk::Forward::ForwardClient.new(api_client, configuration)
|
|
144
|
+
@onboarding_simulator = CheckoutSdk::OnboardingSimulator::OnboardingSimulatorClient.new(api_client, configuration)
|
|
145
|
+
@agentic_commerce = CheckoutSdk::AgenticCommerce::AgenticCommerceClient.new(api_client, configuration)
|
|
146
|
+
@compliance_requests = CheckoutSdk::ComplianceRequests::ComplianceRequestsClient.new(api_client, configuration)
|
|
147
|
+
@standalone_account_updater =
|
|
148
|
+
CheckoutSdk::StandaloneAccountUpdater::StandaloneAccountUpdaterClient.new(api_client, configuration)
|
|
149
|
+
@network_tokens = CheckoutSdk::NetworkTokens::NetworkTokensClient.new(api_client, configuration)
|
|
150
|
+
@payment_methods = CheckoutSdk::PaymentMethods::PaymentMethodsClient.new(api_client, configuration)
|
|
151
|
+
@applicants = CheckoutSdk::Identities::Applicants::ApplicantsClient.new(api_client, configuration)
|
|
152
|
+
@aml_screening = CheckoutSdk::Identities::AmlScreening::AmlScreeningClient.new(api_client, configuration)
|
|
153
|
+
@id_document_verification =
|
|
154
|
+
CheckoutSdk::Identities::IdDocumentVerification::IdDocumentVerificationClient.new(api_client, configuration)
|
|
155
|
+
@identity_verification =
|
|
156
|
+
CheckoutSdk::Identities::IdentityVerification::IdentityVerificationClient.new(api_client, configuration)
|
|
157
|
+
@face_authentication =
|
|
158
|
+
CheckoutSdk::Identities::FaceAuthentication::FaceAuthenticationClient.new(api_client, configuration)
|
|
159
|
+
@apple_pay = CheckoutSdk::Payments::ApplePayClient.new(api_client, configuration)
|
|
160
|
+
@google_pay = CheckoutSdk::Payments::GooglePayClient.new(api_client, configuration)
|
|
93
161
|
end
|
|
94
162
|
|
|
95
163
|
private
|
|
@@ -122,5 +190,11 @@ module CheckoutSdk
|
|
|
122
190
|
def transfers_client(configuration)
|
|
123
191
|
ApiClient.new(configuration, configuration.environment.transfers_uri)
|
|
124
192
|
end
|
|
193
|
+
|
|
194
|
+
# @param [CheckoutConfiguration] configuration
|
|
195
|
+
# @return [ApiClient]
|
|
196
|
+
def forward_client(configuration)
|
|
197
|
+
ApiClient.new(configuration, configuration.environment.forward_uri)
|
|
198
|
+
end
|
|
125
199
|
end
|
|
126
200
|
end
|
|
@@ -41,6 +41,17 @@ module CheckoutSdk
|
|
|
41
41
|
# @return [CheckoutSdk::CheckoutApi]
|
|
42
42
|
def build
|
|
43
43
|
super
|
|
44
|
+
|
|
45
|
+
# Determine authorization URI following Go logic
|
|
46
|
+
auth_uri = authorization_uri
|
|
47
|
+
if auth_uri.nil? || auth_uri.empty?
|
|
48
|
+
auth_uri = if environment_subdomain
|
|
49
|
+
environment_subdomain.authorization_uri
|
|
50
|
+
else
|
|
51
|
+
environment.authorization_uri
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
44
55
|
configuration = CheckoutConfiguration.new(
|
|
45
56
|
OAuthSdkCredentials.new(client_id,
|
|
46
57
|
client_secret,
|
|
@@ -48,7 +59,7 @@ module CheckoutSdk
|
|
|
48
59
|
http_client,
|
|
49
60
|
environment,
|
|
50
61
|
logger,
|
|
51
|
-
|
|
62
|
+
auth_uri),
|
|
52
63
|
environment,
|
|
53
64
|
http_client,
|
|
54
65
|
multipart_http_client,
|
data/lib/checkout_sdk/client.rb
CHANGED
|
@@ -11,7 +11,8 @@ module CheckoutSdk
|
|
|
11
11
|
attr_reader :api_client,
|
|
12
12
|
:authorization_type,
|
|
13
13
|
:configuration
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
protected
|
|
15
16
|
|
|
16
17
|
# @param [CheckoutSdk::ApiClient] api_client
|
|
17
18
|
# @param [CheckoutConfiguration] configuration
|
|
@@ -22,8 +23,6 @@ module CheckoutSdk
|
|
|
22
23
|
@configuration = configuration
|
|
23
24
|
end
|
|
24
25
|
|
|
25
|
-
protected
|
|
26
|
-
|
|
27
26
|
# @param [Array] args
|
|
28
27
|
def build_path(*args)
|
|
29
28
|
args.join('/')
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Common
|
|
5
|
+
class AccountChangeIndicatorType
|
|
6
|
+
THIS_TRANSACTION = 'this_transaction'
|
|
7
|
+
LESS_THAN_THIRTY_DAYS = 'less_than_thirty_days'
|
|
8
|
+
THIRTY_TO_SIXTY_DAYS = 'thirty_to_sixty_days'
|
|
9
|
+
MORE_THAN_SIXTY_DAYS = 'more_than_sixty_days'
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -4,7 +4,7 @@ module CheckoutSdk
|
|
|
4
4
|
module Common
|
|
5
5
|
# @!attribute type
|
|
6
6
|
# @return [String] {AccountHolderType}
|
|
7
|
-
# @!attribute
|
|
7
|
+
# @!attribute full_name
|
|
8
8
|
# @return [String]
|
|
9
9
|
# @!attribute first_name
|
|
10
10
|
# @return [String]
|
|
@@ -12,6 +12,10 @@ module CheckoutSdk
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
# @!attribute last_name
|
|
14
14
|
# @return [String]
|
|
15
|
+
# @!attribute email
|
|
16
|
+
# @return [String]
|
|
17
|
+
# @!attribute gender
|
|
18
|
+
# @return [String]
|
|
15
19
|
# @!attribute company_name
|
|
16
20
|
# @return [String]
|
|
17
21
|
# @!attribute tax_id
|
|
@@ -21,23 +25,23 @@ module CheckoutSdk
|
|
|
21
25
|
# @!attribute country_of_birth
|
|
22
26
|
# @return [Country]
|
|
23
27
|
# @!attribute residential_status
|
|
24
|
-
# @return [String]
|
|
28
|
+
# @return [String] {ResidentialStatusType}
|
|
25
29
|
# @!attribute billing_address
|
|
26
30
|
# @return [Address]
|
|
27
31
|
# @!attribute phone
|
|
28
32
|
# @return [Phone]
|
|
29
33
|
# @!attribute identification
|
|
30
34
|
# @return [AccountHolderIdentification]
|
|
31
|
-
# @!attribute
|
|
32
|
-
# @return [
|
|
33
|
-
# @!attribute gender
|
|
34
|
-
# @return [String]
|
|
35
|
+
# @!attribute account_name_inquiry
|
|
36
|
+
# @return [Boolean]
|
|
35
37
|
class AccountHolder
|
|
36
38
|
attr_accessor :type,
|
|
37
|
-
:
|
|
39
|
+
:full_name,
|
|
38
40
|
:first_name,
|
|
39
41
|
:middle_name,
|
|
40
42
|
:last_name,
|
|
43
|
+
:email,
|
|
44
|
+
:gender,
|
|
41
45
|
:company_name,
|
|
42
46
|
:tax_id,
|
|
43
47
|
:date_of_birth,
|
|
@@ -46,8 +50,7 @@ module CheckoutSdk
|
|
|
46
50
|
:billing_address,
|
|
47
51
|
:phone,
|
|
48
52
|
:identification,
|
|
49
|
-
:
|
|
50
|
-
:gender
|
|
53
|
+
:account_name_inquiry
|
|
51
54
|
end
|
|
52
55
|
end
|
|
53
56
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Common
|
|
5
|
+
class AccountPasswordChangeIndicatorType
|
|
6
|
+
NO_CHANGE = 'no_change'
|
|
7
|
+
THIS_TRANSACTION = 'this_transaction'
|
|
8
|
+
LESS_THAN_THIRTY_DAYS = 'less_than_thirty_days'
|
|
9
|
+
THIRTY_TO_SIXTY_DAYS = 'thirty_to_sixty_days'
|
|
10
|
+
MORE_THAN_SIXTY_DAYS = 'more_than_sixty_days'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Common
|
|
5
|
+
class CardholderAccountAgeIndicatorType
|
|
6
|
+
LESS_THAN_THIRTY_DAYS = 'less_than_thirty_days'
|
|
7
|
+
MORE_THAN_SIXTY_DAYS = 'more_than_sixty_days'
|
|
8
|
+
NO_ACCOUNT = 'no_account'
|
|
9
|
+
THIRTY_TO_SIXTY_DAYS = 'thirty_to_sixty_days'
|
|
10
|
+
THIS_TRANSACTION = 'this_transaction'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -23,3 +23,10 @@ require 'checkout_sdk/common/marketplace_data'
|
|
|
23
23
|
require 'checkout_sdk/common/shipping_info'
|
|
24
24
|
require 'checkout_sdk/common/product'
|
|
25
25
|
require 'checkout_sdk/common/date_range_query_filter'
|
|
26
|
+
require 'checkout_sdk/common/account_change_indicator_type'
|
|
27
|
+
require 'checkout_sdk/common/account_password_change_indicator_type'
|
|
28
|
+
require 'checkout_sdk/common/account_type_card_product_type'
|
|
29
|
+
require 'checkout_sdk/common/cardholder_account_age_indicator_type'
|
|
30
|
+
require 'checkout_sdk/common/customer_retry'
|
|
31
|
+
require 'checkout_sdk/common/destination'
|
|
32
|
+
require 'checkout_sdk/common/headers'
|