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
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Request body for POST /issuing/disputes/{disputeId}/amend.
|
|
6
|
+
# Submit an amendment to a dispute that is currently blocked from proceeding. Maps swagger
|
|
7
|
+
# `amend-dispute-request`. All fields are optional.
|
|
8
|
+
#
|
|
9
|
+
# @!attribute reason
|
|
10
|
+
# @return [String] The updated four-digit scheme-specific reason code. If not provided, the
|
|
11
|
+
# existing reason code is retained.
|
|
12
|
+
# @!attribute amount
|
|
13
|
+
# @return [Numeric] The updated disputed amount, in the minor unit of the transaction currency.
|
|
14
|
+
# If not provided, the existing amount is retained.
|
|
15
|
+
# @!attribute evidence
|
|
16
|
+
# @return [Array<Hash>] Evidence supporting the dispute (maps `IssuingDisputeEvidence`).
|
|
17
|
+
# @!attribute fraud_details
|
|
18
|
+
# @return [IssuingDisputeFraudDetails] Fraud-related details. Required if `reason` specifies a
|
|
19
|
+
# fraud-related dispute.
|
|
20
|
+
# @!attribute reason_change_justification
|
|
21
|
+
# @return [String] Justification for changing the reason at the escalation stage. Max 13000
|
|
22
|
+
# characters.
|
|
23
|
+
# @!attribute action_response
|
|
24
|
+
# @return [String] Free-form text explaining your choices or asking questions about the
|
|
25
|
+
# requested changes. Max 1000 characters.
|
|
26
|
+
class AmendDisputeRequest
|
|
27
|
+
attr_accessor :reason, :amount, :evidence, :fraud_details,
|
|
28
|
+
:reason_change_justification, :action_response
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
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,27 @@
|
|
|
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 fraud_details
|
|
18
|
+
# @return [IssuingDisputeFraudDetails] Fraud-related information to send with the chargeback.
|
|
19
|
+
# Required if the dispute has a fraud-related reason code.
|
|
20
|
+
# @!attribute justification
|
|
21
|
+
# @return [String]
|
|
22
|
+
class CreateDisputeRequest
|
|
23
|
+
attr_accessor :transaction_id, :reason, :evidence, :amount,
|
|
24
|
+
:presentment_message_id, :fraud_details, :justification
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
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 fraud_details
|
|
14
|
+
# @return [IssuingDisputeFraudDetails] Fraud-related details. Required if the dispute has a
|
|
15
|
+
# fraud-related reason code at the escalation stage, or after a reason-code change to a
|
|
16
|
+
# fraud code.
|
|
17
|
+
# @!attribute justification
|
|
18
|
+
# @return [String] Required.
|
|
19
|
+
class EscalateDisputeRequest
|
|
20
|
+
attr_accessor :additional_evidence, :amount, :reason_change, :fraud_details, :justification
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -1,3 +1,30 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# Authentication
|
|
4
|
+
require 'checkout_sdk/issuing/cardholder_access_token_request'
|
|
5
|
+
require 'checkout_sdk/issuing/oob_simulate_transaction_details'
|
|
6
|
+
require 'checkout_sdk/issuing/oob_authentication_request'
|
|
7
|
+
|
|
8
|
+
# Cardholders / Cards updates
|
|
9
|
+
require 'checkout_sdk/issuing/issuing_phone_number'
|
|
10
|
+
require 'checkout_sdk/issuing/issuing_address'
|
|
11
|
+
require 'checkout_sdk/issuing/update_cardholder_request'
|
|
12
|
+
require 'checkout_sdk/issuing/update_card_request'
|
|
13
|
+
|
|
14
|
+
# Simulations
|
|
15
|
+
require 'checkout_sdk/issuing/simulate_refund_request'
|
|
16
|
+
|
|
17
|
+
# Controls
|
|
18
|
+
require 'checkout_sdk/issuing/add_control_group_request'
|
|
19
|
+
require 'checkout_sdk/issuing/add_control_profile_request'
|
|
20
|
+
require 'checkout_sdk/issuing/update_control_profile_request'
|
|
21
|
+
|
|
22
|
+
# Disputes
|
|
23
|
+
require 'checkout_sdk/issuing/issuing_dispute_fraud_type'
|
|
24
|
+
require 'checkout_sdk/issuing/issuing_dispute_fraud_details'
|
|
25
|
+
require 'checkout_sdk/issuing/create_dispute_request'
|
|
26
|
+
require 'checkout_sdk/issuing/escalate_dispute_request'
|
|
27
|
+
require 'checkout_sdk/issuing/amend_dispute_request'
|
|
28
|
+
require 'checkout_sdk/issuing/submit_dispute_request'
|
|
29
|
+
|
|
3
30
|
require 'checkout_sdk/issuing/issuing_client'
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Address block used in Issuing requests (billing/residency on cardholders).
|
|
6
|
+
# Matches swagger `IssuingAddress`. `address_line1`, `city`, `zip`, `country`
|
|
7
|
+
# are required per spec; other fields are optional.
|
|
8
|
+
#
|
|
9
|
+
# @!attribute address_line1
|
|
10
|
+
# @return [String] [Required]
|
|
11
|
+
# @!attribute address_line2
|
|
12
|
+
# @return [String]
|
|
13
|
+
# @!attribute city
|
|
14
|
+
# @return [String] [Required]
|
|
15
|
+
# @!attribute state
|
|
16
|
+
# @return [String]
|
|
17
|
+
# @!attribute zip
|
|
18
|
+
# @return [String] [Required]
|
|
19
|
+
# @!attribute country
|
|
20
|
+
# @return [String] ISO-3166 alpha-2 country code. [Required]
|
|
21
|
+
class IssuingAddress
|
|
22
|
+
attr_accessor :address_line1, :address_line2, :city, :state, :zip, :country
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -12,30 +12,42 @@ module CheckoutSdk
|
|
|
12
12
|
REVOKE = 'revoke'
|
|
13
13
|
SUSPEND = 'suspend'
|
|
14
14
|
CONTROLS = 'controls'
|
|
15
|
+
CONTROL_GROUPS = 'control-groups'
|
|
16
|
+
CONTROL_PROFILES = 'control-profiles'
|
|
15
17
|
SIMULATE = 'simulate'
|
|
16
18
|
AUTHORIZATIONS = 'authorizations'
|
|
17
19
|
PRESENTMENTS = 'presentments'
|
|
18
20
|
REVERSALS = 'reversals'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
REFUNDS = 'refunds'
|
|
22
|
+
RENEW = 'renew'
|
|
23
|
+
DISPUTES = 'disputes'
|
|
24
|
+
CANCEL = 'cancel'
|
|
25
|
+
ESCALATE = 'escalate'
|
|
26
|
+
AMEND = 'amend'
|
|
27
|
+
SUBMIT = 'submit'
|
|
28
|
+
TRANSACTIONS = 'transactions'
|
|
29
|
+
DIGITAL_CARDS = 'digital-cards'
|
|
30
|
+
ADD = 'add'
|
|
31
|
+
REMOVE = 'remove'
|
|
32
|
+
ACCESS = 'access'
|
|
33
|
+
CONNECT = 'connect'
|
|
34
|
+
TOKEN = 'token'
|
|
35
|
+
OOB = 'oob'
|
|
36
|
+
AUTHENTICATION = 'authentication'
|
|
37
|
+
private_constant :ISSUING, :CARDHOLDERS, :CARDS, :THREE_DS, :ACTIVATE, :CREDENTIALS,
|
|
38
|
+
:REVOKE, :SUSPEND, :CONTROLS, :CONTROL_GROUPS, :CONTROL_PROFILES,
|
|
39
|
+
:SIMULATE, :AUTHORIZATIONS, :PRESENTMENTS, :REVERSALS, :REFUNDS,
|
|
40
|
+
:RENEW, :DISPUTES, :CANCEL, :ESCALATE, :AMEND, :SUBMIT,
|
|
41
|
+
:TRANSACTIONS, :DIGITAL_CARDS, :ADD, :REMOVE
|
|
32
42
|
|
|
33
43
|
# @param [ApiClient] api_client
|
|
34
44
|
# @param [CheckoutConfiguration] configuration
|
|
35
45
|
def initialize(api_client, configuration)
|
|
36
|
-
super
|
|
46
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
|
|
37
47
|
end
|
|
38
48
|
|
|
49
|
+
# ====== Cardholders ======
|
|
50
|
+
|
|
39
51
|
# @param [Hash] cardholder_request
|
|
40
52
|
def create_cardholder(cardholder_request)
|
|
41
53
|
api_client.invoke_post(build_path(ISSUING, CARDHOLDERS), sdk_authorization, cardholder_request)
|
|
@@ -46,11 +58,23 @@ module CheckoutSdk
|
|
|
46
58
|
api_client.invoke_get(build_path(ISSUING, CARDHOLDERS, cardholder_id), sdk_authorization)
|
|
47
59
|
end
|
|
48
60
|
|
|
61
|
+
# @param [String] cardholder_id
|
|
62
|
+
# @param [Hash, UpdateCardholderRequest] update_cardholder_request
|
|
63
|
+
def update_cardholder(cardholder_id, update_cardholder_request)
|
|
64
|
+
api_client.invoke_patch(
|
|
65
|
+
build_path(ISSUING, CARDHOLDERS, cardholder_id),
|
|
66
|
+
sdk_authorization,
|
|
67
|
+
update_cardholder_request
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
49
71
|
# @param [String] cardholder_id
|
|
50
72
|
def get_cardholder_cards(cardholder_id)
|
|
51
73
|
api_client.invoke_get(build_path(ISSUING, CARDHOLDERS, cardholder_id, CARDS), sdk_authorization)
|
|
52
74
|
end
|
|
53
75
|
|
|
76
|
+
# ====== Cards ======
|
|
77
|
+
|
|
54
78
|
# @param [Hash] card_request
|
|
55
79
|
def create_card(card_request)
|
|
56
80
|
api_client.invoke_post(build_path(ISSUING, CARDS), sdk_authorization, card_request)
|
|
@@ -61,6 +85,16 @@ module CheckoutSdk
|
|
|
61
85
|
api_client.invoke_get(build_path(ISSUING, CARDS, card_id), sdk_authorization)
|
|
62
86
|
end
|
|
63
87
|
|
|
88
|
+
# @param [String] card_id
|
|
89
|
+
# @param [Hash, UpdateCardRequest] update_card_request
|
|
90
|
+
def update_card(card_id, update_card_request)
|
|
91
|
+
api_client.invoke_patch(
|
|
92
|
+
build_path(ISSUING, CARDS, card_id),
|
|
93
|
+
sdk_authorization,
|
|
94
|
+
update_card_request
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
64
98
|
# @param [String] card_id
|
|
65
99
|
# @param [Hash] three_ds_request
|
|
66
100
|
def enroll_three_ds(card_id, three_ds_request)
|
|
@@ -101,6 +135,19 @@ module CheckoutSdk
|
|
|
101
135
|
api_client.invoke_post(build_path(ISSUING, CARDS, card_id, SUSPEND), sdk_authorization, suspend_request)
|
|
102
136
|
end
|
|
103
137
|
|
|
138
|
+
# Renew a card. POST /issuing/cards/{cardId}/renew.
|
|
139
|
+
# @param [String] card_id
|
|
140
|
+
# @param [Hash] renew_request
|
|
141
|
+
def renew_card(card_id, renew_request = nil)
|
|
142
|
+
api_client.invoke_post(
|
|
143
|
+
build_path(ISSUING, CARDS, card_id, RENEW),
|
|
144
|
+
sdk_authorization,
|
|
145
|
+
renew_request
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# ====== Controls (legacy single endpoint) ======
|
|
150
|
+
|
|
104
151
|
# @param [Hash] control_request
|
|
105
152
|
def create_control(control_request)
|
|
106
153
|
api_client.invoke_post(build_path(ISSUING, CONTROLS), sdk_authorization, control_request)
|
|
@@ -127,6 +174,187 @@ module CheckoutSdk
|
|
|
127
174
|
api_client.invoke_delete(build_path(ISSUING, CONTROLS, control_id), sdk_authorization)
|
|
128
175
|
end
|
|
129
176
|
|
|
177
|
+
# ====== Control Groups ======
|
|
178
|
+
|
|
179
|
+
# @param [Hash, AddControlGroupRequest] control_group_request
|
|
180
|
+
def create_control_group(control_group_request)
|
|
181
|
+
api_client.invoke_post(
|
|
182
|
+
build_path(ISSUING, CONTROLS, CONTROL_GROUPS),
|
|
183
|
+
sdk_authorization,
|
|
184
|
+
control_group_request
|
|
185
|
+
)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
def get_control_groups
|
|
189
|
+
api_client.invoke_get(build_path(ISSUING, CONTROLS, CONTROL_GROUPS), sdk_authorization)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# @param [String] control_group_id
|
|
193
|
+
def get_control_group(control_group_id)
|
|
194
|
+
api_client.invoke_get(
|
|
195
|
+
build_path(ISSUING, CONTROLS, CONTROL_GROUPS, control_group_id),
|
|
196
|
+
sdk_authorization
|
|
197
|
+
)
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# @param [String] control_group_id
|
|
201
|
+
def delete_control_group(control_group_id)
|
|
202
|
+
api_client.invoke_delete(
|
|
203
|
+
build_path(ISSUING, CONTROLS, CONTROL_GROUPS, control_group_id),
|
|
204
|
+
sdk_authorization
|
|
205
|
+
)
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# ====== Control Profiles ======
|
|
209
|
+
|
|
210
|
+
# @param [Hash, AddControlProfileRequest] control_profile_request
|
|
211
|
+
def create_control_profile(control_profile_request)
|
|
212
|
+
api_client.invoke_post(
|
|
213
|
+
build_path(ISSUING, CONTROLS, CONTROL_PROFILES),
|
|
214
|
+
sdk_authorization,
|
|
215
|
+
control_profile_request
|
|
216
|
+
)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
def get_control_profiles
|
|
220
|
+
api_client.invoke_get(build_path(ISSUING, CONTROLS, CONTROL_PROFILES), sdk_authorization)
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# @param [String] control_profile_id
|
|
224
|
+
def get_control_profile(control_profile_id)
|
|
225
|
+
api_client.invoke_get(
|
|
226
|
+
build_path(ISSUING, CONTROLS, CONTROL_PROFILES, control_profile_id),
|
|
227
|
+
sdk_authorization
|
|
228
|
+
)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# @param [String] control_profile_id
|
|
232
|
+
# @param [Hash, UpdateControlProfileRequest] update_control_profile_request
|
|
233
|
+
def update_control_profile(control_profile_id, update_control_profile_request)
|
|
234
|
+
api_client.invoke_patch(
|
|
235
|
+
build_path(ISSUING, CONTROLS, CONTROL_PROFILES, control_profile_id),
|
|
236
|
+
sdk_authorization,
|
|
237
|
+
update_control_profile_request
|
|
238
|
+
)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# @param [String] control_profile_id
|
|
242
|
+
def delete_control_profile(control_profile_id)
|
|
243
|
+
api_client.invoke_delete(
|
|
244
|
+
build_path(ISSUING, CONTROLS, CONTROL_PROFILES, control_profile_id),
|
|
245
|
+
sdk_authorization
|
|
246
|
+
)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# @param [String] control_profile_id
|
|
250
|
+
# @param [String] target_id
|
|
251
|
+
def add_target_to_control_profile(control_profile_id, target_id)
|
|
252
|
+
api_client.invoke_post(
|
|
253
|
+
build_path(ISSUING, CONTROLS, CONTROL_PROFILES, control_profile_id, ADD, target_id),
|
|
254
|
+
sdk_authorization
|
|
255
|
+
)
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# @param [String] control_profile_id
|
|
259
|
+
# @param [String] target_id
|
|
260
|
+
def remove_target_from_control_profile(control_profile_id, target_id)
|
|
261
|
+
api_client.invoke_post(
|
|
262
|
+
build_path(ISSUING, CONTROLS, CONTROL_PROFILES, control_profile_id, REMOVE, target_id),
|
|
263
|
+
sdk_authorization
|
|
264
|
+
)
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# ====== Issuing Disputes ======
|
|
268
|
+
|
|
269
|
+
# @param [Hash, CreateDisputeRequest] create_dispute_request
|
|
270
|
+
def create_issuing_dispute(create_dispute_request)
|
|
271
|
+
api_client.invoke_post(
|
|
272
|
+
build_path(ISSUING, DISPUTES),
|
|
273
|
+
sdk_authorization,
|
|
274
|
+
create_dispute_request
|
|
275
|
+
)
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# @param [String] dispute_id
|
|
279
|
+
def get_issuing_dispute(dispute_id)
|
|
280
|
+
api_client.invoke_get(build_path(ISSUING, DISPUTES, dispute_id), sdk_authorization)
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# @param [String] dispute_id
|
|
284
|
+
def cancel_issuing_dispute(dispute_id)
|
|
285
|
+
api_client.invoke_post(
|
|
286
|
+
build_path(ISSUING, DISPUTES, dispute_id, CANCEL),
|
|
287
|
+
sdk_authorization
|
|
288
|
+
)
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# @param [String] dispute_id
|
|
292
|
+
# @param [Hash, EscalateDisputeRequest] escalate_dispute_request
|
|
293
|
+
def escalate_issuing_dispute(dispute_id, escalate_dispute_request)
|
|
294
|
+
api_client.invoke_post(
|
|
295
|
+
build_path(ISSUING, DISPUTES, dispute_id, ESCALATE),
|
|
296
|
+
sdk_authorization,
|
|
297
|
+
escalate_dispute_request
|
|
298
|
+
)
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Submit an Issuing dispute. POST /issuing/disputes/{disputeId}/submit.
|
|
302
|
+
# @param [String] dispute_id
|
|
303
|
+
# @param [Hash, SubmitDisputeRequest] submit_dispute_request
|
|
304
|
+
# @deprecated Use {#create_issuing_dispute} to create and submit a dispute in one step, or
|
|
305
|
+
# {#amend_issuing_dispute} when the dispute status is `action_required`.
|
|
306
|
+
def submit_issuing_dispute(dispute_id, submit_dispute_request = nil)
|
|
307
|
+
api_client.invoke_post(
|
|
308
|
+
build_path(ISSUING, DISPUTES, dispute_id, SUBMIT),
|
|
309
|
+
sdk_authorization,
|
|
310
|
+
submit_dispute_request
|
|
311
|
+
)
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Amend an Issuing dispute. POST /issuing/disputes/{disputeId}/amend.
|
|
315
|
+
# Submit an amendment to a dispute that is currently blocked from proceeding. Handles both
|
|
316
|
+
# chargeback-stage and escalation-stage amendments using the same payload.
|
|
317
|
+
# @param [String] dispute_id
|
|
318
|
+
# @param [Hash, AmendDisputeRequest] amend_dispute_request
|
|
319
|
+
def amend_issuing_dispute(dispute_id, amend_dispute_request = nil)
|
|
320
|
+
api_client.invoke_post(
|
|
321
|
+
build_path(ISSUING, DISPUTES, dispute_id, AMEND),
|
|
322
|
+
sdk_authorization,
|
|
323
|
+
amend_dispute_request
|
|
324
|
+
)
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# ====== Transactions ======
|
|
328
|
+
|
|
329
|
+
# @param [Hash] transactions_query
|
|
330
|
+
def get_transactions(transactions_query = nil)
|
|
331
|
+
api_client.invoke_get(
|
|
332
|
+
build_path(ISSUING, TRANSACTIONS),
|
|
333
|
+
sdk_authorization,
|
|
334
|
+
transactions_query
|
|
335
|
+
)
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# @param [String] transaction_id
|
|
339
|
+
def get_transaction(transaction_id)
|
|
340
|
+
api_client.invoke_get(
|
|
341
|
+
build_path(ISSUING, TRANSACTIONS, transaction_id),
|
|
342
|
+
sdk_authorization
|
|
343
|
+
)
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# ====== Digital Cards ======
|
|
347
|
+
|
|
348
|
+
# @param [String] digital_card_id
|
|
349
|
+
def get_digital_card(digital_card_id)
|
|
350
|
+
api_client.invoke_get(
|
|
351
|
+
build_path(ISSUING, DIGITAL_CARDS, digital_card_id),
|
|
352
|
+
sdk_authorization
|
|
353
|
+
)
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# ====== Simulations ======
|
|
357
|
+
|
|
130
358
|
# @param [Hash] authorization_request
|
|
131
359
|
def simulate_authorization(authorization_request)
|
|
132
360
|
api_client.invoke_post(build_path(ISSUING, SIMULATE, AUTHORIZATIONS), sdk_authorization, authorization_request)
|
|
@@ -161,6 +389,38 @@ module CheckoutSdk
|
|
|
161
389
|
reversal_request
|
|
162
390
|
)
|
|
163
391
|
end
|
|
392
|
+
|
|
393
|
+
# Simulate a refund for an authorization.
|
|
394
|
+
# @param [String] transaction_id
|
|
395
|
+
# @param [Hash, SimulateRefundRequest] refund_request
|
|
396
|
+
def simulate_refund(transaction_id, refund_request)
|
|
397
|
+
api_client.invoke_post(
|
|
398
|
+
build_path(ISSUING, SIMULATE, AUTHORIZATIONS, transaction_id, REFUNDS),
|
|
399
|
+
sdk_authorization,
|
|
400
|
+
refund_request
|
|
401
|
+
)
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# Request a Cardholder access token.
|
|
405
|
+
# The api_client serializes the body as application/x-www-form-urlencoded.
|
|
406
|
+
# @param [Hash, CardholderAccessTokenRequest] cardholder_token_request
|
|
407
|
+
def request_cardholder_access_token(cardholder_token_request)
|
|
408
|
+
api_client.invoke_post(
|
|
409
|
+
build_path(ISSUING, ACCESS, CONNECT, TOKEN),
|
|
410
|
+
sdk_authorization(CheckoutSdk::AuthorizationType::OAUTH),
|
|
411
|
+
cardholder_token_request
|
|
412
|
+
)
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
# Simulate an out-of-band (OOB) authentication request.
|
|
416
|
+
# @param [Hash, OobAuthenticationRequest] oob_authentication_request
|
|
417
|
+
def simulate_oob_authentication(oob_authentication_request)
|
|
418
|
+
api_client.invoke_post(
|
|
419
|
+
build_path(ISSUING, SIMULATE, OOB, AUTHENTICATION),
|
|
420
|
+
sdk_authorization(CheckoutSdk::AuthorizationType::OAUTH),
|
|
421
|
+
oob_authentication_request
|
|
422
|
+
)
|
|
423
|
+
end
|
|
164
424
|
end
|
|
165
425
|
end
|
|
166
426
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Fraud-related information required when the dispute reason code is fraud-related.
|
|
6
|
+
# Maps swagger `IssuingDisputeFraudDetails`. Reused by create, escalate and amend dispute
|
|
7
|
+
# requests.
|
|
8
|
+
#
|
|
9
|
+
# @!attribute fraud_type
|
|
10
|
+
# @return [String] {IssuingDisputeFraudType} The type of fraud the cardholder is asserting.
|
|
11
|
+
# [Required]
|
|
12
|
+
# @!attribute description
|
|
13
|
+
# @return [String] Optional free-form description of the fraud.
|
|
14
|
+
class IssuingDisputeFraudDetails
|
|
15
|
+
attr_accessor :fraud_type, :description
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# The type of fraud the cardholder is asserting on an Issuing dispute.
|
|
6
|
+
# Maps swagger `IssuingDisputeFraudDetails.fraud_type`.
|
|
7
|
+
module IssuingDisputeFraudType
|
|
8
|
+
CARD_LOST = 'card_lost'
|
|
9
|
+
CARD_STOLEN = 'card_stolen'
|
|
10
|
+
CARD_NEVER_RECEIVED = 'card_never_received'
|
|
11
|
+
FRAUDULENT_ACCOUNT = 'fraudulent_account'
|
|
12
|
+
COUNTERFEIT_CARD = 'counterfeit_card'
|
|
13
|
+
ACCOUNT_TAKEOVER = 'account_takeover'
|
|
14
|
+
CARD_NOT_PRESENT_FRAUD = 'card_not_present_fraud'
|
|
15
|
+
MERCHANT_MISREPRESENTATION = 'merchant_misrepresentation'
|
|
16
|
+
CARDHOLDER_MANIPULATION = 'cardholder_manipulation'
|
|
17
|
+
INCORRECT_PROCESSING = 'incorrect_processing'
|
|
18
|
+
OTHER = 'other'
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Phone number block used in Issuing requests (e.g. cardholder updates).
|
|
6
|
+
# Matches swagger `IssuingPhoneNumber`.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute country_code
|
|
9
|
+
# @return [String] E.164 country dial code (e.g. "+1").
|
|
10
|
+
# @!attribute number
|
|
11
|
+
# @return [String] Local subscriber number.
|
|
12
|
+
class IssuingPhoneNumber
|
|
13
|
+
attr_accessor :country_code, :number
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Request body for POST /issuing/simulate/oob/authentication.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute card_id
|
|
8
|
+
# @return [String] The card's unique identifier (e.g. "crd_...").
|
|
9
|
+
# @!attribute transaction_details
|
|
10
|
+
# @return [OobSimulateTransactionDetails]
|
|
11
|
+
class OobAuthenticationRequest
|
|
12
|
+
attr_accessor :card_id, :transaction_details
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Details for a simulated OOB authentication transaction.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute last_four
|
|
8
|
+
# @return [String] The last four digits of the card.
|
|
9
|
+
# @!attribute merchant_name
|
|
10
|
+
# @return [String]
|
|
11
|
+
# @!attribute purchase_amount
|
|
12
|
+
# @return [Numeric]
|
|
13
|
+
# @!attribute purchase_currency
|
|
14
|
+
# @return [String] ISO currency (e.g. "GBP").
|
|
15
|
+
class OobSimulateTransactionDetails
|
|
16
|
+
attr_accessor :last_four, :merchant_name, :purchase_amount, :purchase_currency
|
|
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/simulate/authorizations/{id}/refunds.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute amount
|
|
8
|
+
# @return [Integer]
|
|
9
|
+
class SimulateRefundRequest
|
|
10
|
+
attr_accessor :amount
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Request body for POST /issuing/disputes/{disputeId}/submit. Maps swagger
|
|
6
|
+
# `submit-dispute-request`. All fields are optional.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute reason
|
|
9
|
+
# @return [String] The updated four-digit scheme-specific reason code. If not provided, the
|
|
10
|
+
# existing reason code is used.
|
|
11
|
+
# @!attribute evidence
|
|
12
|
+
# @return [Array<Hash>] Evidence for the chargeback, if updated since you created the dispute
|
|
13
|
+
# (maps `IssuingDisputeEvidence`).
|
|
14
|
+
# @!attribute amount
|
|
15
|
+
# @return [Numeric] The updated disputed amount, in the minor unit of the transaction currency.
|
|
16
|
+
# If not provided, the existing disputed amount is used.
|
|
17
|
+
class SubmitDisputeRequest
|
|
18
|
+
attr_accessor :reason, :evidence, :amount
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Issuing
|
|
5
|
+
# Request body for PATCH /issuing/cards/{cardId}.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute reference
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute metadata
|
|
10
|
+
# @return [Hash{String => String}]
|
|
11
|
+
# @!attribute expiry_month
|
|
12
|
+
# @return [Integer]
|
|
13
|
+
# @!attribute expiry_year
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
# @!attribute activation_date
|
|
16
|
+
# @return [String] ISO-8601 date scheduling the card's activation. Supported formats:
|
|
17
|
+
# date only `yyyy-mm-dd` (treated as midnight UTC) or date with round hour
|
|
18
|
+
# `yyyy-mm-ddTHH:mmZ` / `yyyy-mm-ddTHH:mm±HH:mm`. Maps swagger `IssuingActivationDate`.
|
|
19
|
+
# @!attribute revocation_date
|
|
20
|
+
# @return [String] Date for the card to be automatically revoked, in the form `yyyy-mm-dd`.
|
|
21
|
+
# Must be after the current date. Maps swagger `IssuingRevocationDate`.
|
|
22
|
+
class UpdateCardRequest
|
|
23
|
+
attr_accessor :reference, :metadata, :expiry_month, :expiry_year,
|
|
24
|
+
:activation_date, :revocation_date
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|