univapay-apimatic-sdk 0.0.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 +7 -0
- data/LICENSE +28 -0
- data/README.md +224 -0
- data/bin/console +15 -0
- data/lib/univapay_client_sdk/api_helper.rb +10 -0
- data/lib/univapay_client_sdk/apis/base_api.rb +67 -0
- data/lib/univapay_client_sdk/apis/cancels_api.rb +293 -0
- data/lib/univapay_client_sdk/apis/charges_api.rb +903 -0
- data/lib/univapay_client_sdk/apis/merchants_api.rb +57 -0
- data/lib/univapay_client_sdk/apis/refunds_api.rb +298 -0
- data/lib/univapay_client_sdk/apis/stores_api.rb +126 -0
- data/lib/univapay_client_sdk/apis/subscriptions_api.rb +1014 -0
- data/lib/univapay_client_sdk/apis/transaction_tokens_api.rb +455 -0
- data/lib/univapay_client_sdk/apis/webhooks_api.rb +463 -0
- data/lib/univapay_client_sdk/client.rb +116 -0
- data/lib/univapay_client_sdk/configuration.rb +178 -0
- data/lib/univapay_client_sdk/events/unknown_event.rb +32 -0
- data/lib/univapay_client_sdk/events/webhooks/bank_transfer_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/cancel_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/charge_finished_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/charge_updated_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/customs_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/recurring_token_deleted_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/refund_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/subscription_canceled_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/subscription_completed_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/subscription_created_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/subscription_failure_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/subscription_payment_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/subscription_suspended_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/token_created_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/token_cvv_auth_check_updated_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/token_cvv_auth_updated_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/token_replaced_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/token_three_ds_updated_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/token_updated_handler.rb +37 -0
- data/lib/univapay_client_sdk/exceptions/api_error_exception.rb +199 -0
- data/lib/univapay_client_sdk/exceptions/api_exception.rb +21 -0
- data/lib/univapay_client_sdk/http/api_response.rb +19 -0
- data/lib/univapay_client_sdk/http/auth/oauth_2.rb +53 -0
- data/lib/univapay_client_sdk/http/http_call_back.rb +10 -0
- data/lib/univapay_client_sdk/http/http_method_enum.rb +10 -0
- data/lib/univapay_client_sdk/http/http_request.rb +10 -0
- data/lib/univapay_client_sdk/http/http_response.rb +10 -0
- data/lib/univapay_client_sdk/http/proxy_settings.rb +22 -0
- data/lib/univapay_client_sdk/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/univapay_client_sdk/logging/sdk_logger.rb +17 -0
- data/lib/univapay_client_sdk/models/api_error_detail.rb +87 -0
- data/lib/univapay_client_sdk/models/api_error_status.rb +26 -0
- data/lib/univapay_client_sdk/models/bank_transfer_event.rb +27 -0
- data/lib/univapay_client_sdk/models/bank_transfer_ledger.rb +199 -0
- data/lib/univapay_client_sdk/models/bank_transfer_ledger_bank_ledger_type.rb +36 -0
- data/lib/univapay_client_sdk/models/bank_transfer_ledger_list.rb +104 -0
- data/lib/univapay_client_sdk/models/bank_transfer_ledger_mode.rb +36 -0
- data/lib/univapay_client_sdk/models/bank_transfer_payment_status.rb +44 -0
- data/lib/univapay_client_sdk/models/bank_transfer_status_data.rb +229 -0
- data/lib/univapay_client_sdk/models/bank_transfer_status_webhook_callback.rb +134 -0
- data/lib/univapay_client_sdk/models/bank_transfer_status_webhook_callback_extension.rb +75 -0
- data/lib/univapay_client_sdk/models/base_bank_transfer_data.rb +100 -0
- data/lib/univapay_client_sdk/models/base_konbini_data.rb +99 -0
- data/lib/univapay_client_sdk/models/base_konbini_data_convenience_store.rb +60 -0
- data/lib/univapay_client_sdk/models/base_model.rb +110 -0
- data/lib/univapay_client_sdk/models/base_online_data.rb +123 -0
- data/lib/univapay_client_sdk/models/base_online_data_brand.rb +48 -0
- data/lib/univapay_client_sdk/models/base_online_data_call_method.rb +52 -0
- data/lib/univapay_client_sdk/models/base_online_data_os_type.rb +36 -0
- data/lib/univapay_client_sdk/models/base_online_data_user_identifier_source.rb +36 -0
- data/lib/univapay_client_sdk/models/cancel.rb +183 -0
- data/lib/univapay_client_sdk/models/cancel_create_request.rb +77 -0
- data/lib/univapay_client_sdk/models/cancel_event.rb +26 -0
- data/lib/univapay_client_sdk/models/cancel_list.rb +94 -0
- data/lib/univapay_client_sdk/models/cancel_status.rb +44 -0
- data/lib/univapay_client_sdk/models/cancel_update_request.rb +76 -0
- data/lib/univapay_client_sdk/models/cancel_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/cancel_webhook_callback_extension.rb +74 -0
- data/lib/univapay_client_sdk/models/card_processor_installment_config.rb +89 -0
- data/lib/univapay_client_sdk/models/charge.rb +411 -0
- data/lib/univapay_client_sdk/models/charge_capture_request.rb +84 -0
- data/lib/univapay_client_sdk/models/charge_create_request.rb +179 -0
- data/lib/univapay_client_sdk/models/charge_create_request_client_metadata.rb +76 -0
- data/lib/univapay_client_sdk/models/charge_create_request_redirect.rb +75 -0
- data/lib/univapay_client_sdk/models/charge_create_request_three_ds.rb +88 -0
- data/lib/univapay_client_sdk/models/charge_create_request_three_ds_mode.rb +44 -0
- data/lib/univapay_client_sdk/models/charge_finished_webhook_callback.rb +131 -0
- data/lib/univapay_client_sdk/models/charge_list.rb +104 -0
- data/lib/univapay_client_sdk/models/charge_mode.rb +36 -0
- data/lib/univapay_client_sdk/models/charge_redirect.rb +96 -0
- data/lib/univapay_client_sdk/models/charge_status.rb +56 -0
- data/lib/univapay_client_sdk/models/charge_three_ds.rb +97 -0
- data/lib/univapay_client_sdk/models/charge_transaction_token_type.rb +40 -0
- data/lib/univapay_client_sdk/models/charge_update_request.rb +75 -0
- data/lib/univapay_client_sdk/models/charge_updated_webhook_callback.rb +131 -0
- data/lib/univapay_client_sdk/models/cursor_direction_query.rb +36 -0
- data/lib/univapay_client_sdk/models/customs_declaration_create_request.rb +106 -0
- data/lib/univapay_client_sdk/models/customs_declaration_event.rb +27 -0
- data/lib/univapay_client_sdk/models/customs_declaration_patch_request.rb +77 -0
- data/lib/univapay_client_sdk/models/customs_declaration_webhook_callback.rb +135 -0
- data/lib/univapay_client_sdk/models/customs_declaration_webhook_callback_extension.rb +76 -0
- data/lib/univapay_client_sdk/models/customs_declaration_webhook_data.rb +232 -0
- data/lib/univapay_client_sdk/models/customs_declaration_webhook_declaration.rb +121 -0
- data/lib/univapay_client_sdk/models/customs_declaration_webhook_error.rb +127 -0
- data/lib/univapay_client_sdk/models/customs_declaration_webhook_other_error.rb +120 -0
- data/lib/univapay_client_sdk/models/customs_declaration_webhook_result.rb +125 -0
- data/lib/univapay_client_sdk/models/customs_declaration_webhook_status.rb +44 -0
- data/lib/univapay_client_sdk/models/generic_metadata.rb +111 -0
- data/lib/univapay_client_sdk/models/installment_fixed_cycles.rb +70 -0
- data/lib/univapay_client_sdk/models/installment_plan_type.rb +36 -0
- data/lib/univapay_client_sdk/models/issuer_token.rb +177 -0
- data/lib/univapay_client_sdk/models/issuer_token_call_method.rb +51 -0
- data/lib/univapay_client_sdk/models/issuer_token_payload.rb +105 -0
- data/lib/univapay_client_sdk/models/issuer_token_payment_type.rb +36 -0
- data/lib/univapay_client_sdk/models/merchant.rb +179 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_bank_transfer_configuration.rb +342 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_card_brand_percent_fees.rb +167 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_card_configuration.rb +301 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_checkout_configuration.rb +87 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_checkout_toggle.rb +77 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_configuration.rb +505 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_convenience_configuration.rb +88 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_customer_management_configuration.rb +99 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_installment_plan_configuration.rb +139 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_limit_charge_by_card_configuration.rb +88 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_limit_refund_by_sales_configuration.rb +100 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_money_amount.rb +85 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_online_configuration.rb +77 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_paidy_configuration.rb +77 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_qr_merchant_configuration.rb +77 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_qr_scan_configuration.rb +93 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_recurring_cvv_confirmation_config.rb +97 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_recurring_token_configuration.rb +109 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb +234 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_subscription_configuration.rb +138 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_subscription_plan_configuration.rb +138 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_transfer_schedule_configuration.rb +159 -0
- data/lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb +349 -0
- data/lib/univapay_client_sdk/models/mode_query.rb +36 -0
- data/lib/univapay_client_sdk/models/payment_error.rb +178 -0
- data/lib/univapay_client_sdk/models/plan_settings_type.rb +36 -0
- data/lib/univapay_client_sdk/models/recurring_token_deleted_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/refund.rb +240 -0
- data/lib/univapay_client_sdk/models/refund_create_request.rb +118 -0
- data/lib/univapay_client_sdk/models/refund_event.rb +26 -0
- data/lib/univapay_client_sdk/models/refund_list.rb +104 -0
- data/lib/univapay_client_sdk/models/refund_reason_request.rb +42 -0
- data/lib/univapay_client_sdk/models/refund_reason_response.rb +62 -0
- data/lib/univapay_client_sdk/models/refund_status.rb +47 -0
- data/lib/univapay_client_sdk/models/refund_update_request.rb +99 -0
- data/lib/univapay_client_sdk/models/refund_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/refund_webhook_callback_extension.rb +74 -0
- data/lib/univapay_client_sdk/models/restrict_ip_after_failed_charge_config.rb +99 -0
- data/lib/univapay_client_sdk/models/store.rb +119 -0
- data/lib/univapay_client_sdk/models/store_list.rb +104 -0
- data/lib/univapay_client_sdk/models/store_list_item.rb +114 -0
- data/lib/univapay_client_sdk/models/subscription.rb +310 -0
- data/lib/univapay_client_sdk/models/subscription_canceled_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/subscription_completed_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/subscription_create_request.rb +216 -0
- data/lib/univapay_client_sdk/models/subscription_created_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/subscription_failure_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/subscription_installment_plan.rb +86 -0
- data/lib/univapay_client_sdk/models/subscription_list.rb +104 -0
- data/lib/univapay_client_sdk/models/subscription_list_item.rb +352 -0
- data/lib/univapay_client_sdk/models/subscription_next_payment.rb +222 -0
- data/lib/univapay_client_sdk/models/subscription_patch_payment_request.rb +117 -0
- data/lib/univapay_client_sdk/models/subscription_patch_token_request.rb +79 -0
- data/lib/univapay_client_sdk/models/subscription_payment.rb +185 -0
- data/lib/univapay_client_sdk/models/subscription_payment_list.rb +94 -0
- data/lib/univapay_client_sdk/models/subscription_payment_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/subscription_period.rb +56 -0
- data/lib/univapay_client_sdk/models/subscription_plan_settings.rb +98 -0
- data/lib/univapay_client_sdk/models/subscription_schedule_settings.rb +132 -0
- data/lib/univapay_client_sdk/models/subscription_status.rb +56 -0
- data/lib/univapay_client_sdk/models/subscription_suspend_request.rb +79 -0
- data/lib/univapay_client_sdk/models/subscription_suspended_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/subscription_terminate_with_status.rb +36 -0
- data/lib/univapay_client_sdk/models/subscription_termination_mode.rb +36 -0
- data/lib/univapay_client_sdk/models/subscription_update_next_payment.rb +104 -0
- data/lib/univapay_client_sdk/models/subscription_update_request.rb +134 -0
- data/lib/univapay_client_sdk/models/subscription_update_schedule_settings.rb +110 -0
- data/lib/univapay_client_sdk/models/subscription_update_status.rb +37 -0
- data/lib/univapay_client_sdk/models/subscription_user_data.rb +134 -0
- data/lib/univapay_client_sdk/models/suspend_schedule_settings.rb +78 -0
- data/lib/univapay_client_sdk/models/three_ds_issuer_token.rb +116 -0
- data/lib/univapay_client_sdk/models/three_ds_issuer_token_call_method.rb +26 -0
- data/lib/univapay_client_sdk/models/three_ds_issuer_token_payment_type.rb +26 -0
- data/lib/univapay_client_sdk/models/token_create_bank_transfer_data.rb +122 -0
- data/lib/univapay_client_sdk/models/token_create_card_data.rb +231 -0
- data/lib/univapay_client_sdk/models/token_create_card_data_cvv_authorize.rb +95 -0
- data/lib/univapay_client_sdk/models/token_create_card_data_three_ds.rb +97 -0
- data/lib/univapay_client_sdk/models/token_create_konbini_data.rb +147 -0
- data/lib/univapay_client_sdk/models/token_create_online_data.rb +142 -0
- data/lib/univapay_client_sdk/models/token_create_phone_number.rb +104 -0
- data/lib/univapay_client_sdk/models/token_created_webhook_callback.rb +131 -0
- data/lib/univapay_client_sdk/models/token_cvv_auth_check_updated_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/token_cvv_auth_updated_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/token_replaced_webhook_callback.rb +131 -0
- data/lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb +181 -0
- data/lib/univapay_client_sdk/models/token_response_card_data.rb +129 -0
- data/lib/univapay_client_sdk/models/token_response_card_data_billing.rb +153 -0
- data/lib/univapay_client_sdk/models/token_response_card_data_card.rb +187 -0
- data/lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb +132 -0
- data/lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize_check.rb +118 -0
- data/lib/univapay_client_sdk/models/token_response_card_data_three_ds.rb +142 -0
- data/lib/univapay_client_sdk/models/token_response_card_data_three_ds_status.rb +48 -0
- data/lib/univapay_client_sdk/models/token_response_konbini_data.rb +135 -0
- data/lib/univapay_client_sdk/models/token_response_online_data.rb +158 -0
- data/lib/univapay_client_sdk/models/token_response_phone_number.rb +96 -0
- data/lib/univapay_client_sdk/models/token_three_ds_updated_webhook_callback.rb +132 -0
- data/lib/univapay_client_sdk/models/token_updated_webhook_callback.rb +131 -0
- data/lib/univapay_client_sdk/models/transaction_token.rb +250 -0
- data/lib/univapay_client_sdk/models/transaction_token_create_request.rb +161 -0
- data/lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb +124 -0
- data/lib/univapay_client_sdk/models/transaction_token_create_request_payment_type.rb +44 -0
- data/lib/univapay_client_sdk/models/transaction_token_create_request_type.rb +40 -0
- data/lib/univapay_client_sdk/models/transaction_token_list.rb +104 -0
- data/lib/univapay_client_sdk/models/transaction_token_list_item.rb +204 -0
- data/lib/univapay_client_sdk/models/transaction_token_list_item_user_data.rb +96 -0
- data/lib/univapay_client_sdk/models/transaction_token_mode.rb +36 -0
- data/lib/univapay_client_sdk/models/transaction_token_payment_type.rb +48 -0
- data/lib/univapay_client_sdk/models/transaction_token_type.rb +40 -0
- data/lib/univapay_client_sdk/models/transaction_token_update_request.rb +95 -0
- data/lib/univapay_client_sdk/models/transaction_token_update_request_data.rb +184 -0
- data/lib/univapay_client_sdk/models/transaction_token_update_request_data_phone_number.rb +86 -0
- data/lib/univapay_client_sdk/models/webhook.rb +191 -0
- data/lib/univapay_client_sdk/models/webhook_callback_envelope.rb +98 -0
- data/lib/univapay_client_sdk/models/webhook_create_request.rb +97 -0
- data/lib/univapay_client_sdk/models/webhook_event.rb +166 -0
- data/lib/univapay_client_sdk/models/webhook_event_list.rb +94 -0
- data/lib/univapay_client_sdk/models/webhook_list.rb +94 -0
- data/lib/univapay_client_sdk/models/webhook_trigger.rb +104 -0
- data/lib/univapay_client_sdk/models/webhook_update_request.rb +108 -0
- data/lib/univapay_client_sdk/utilities/date_time_helper.rb +11 -0
- data/lib/univapay_client_sdk/utilities/file_wrapper.rb +28 -0
- data/lib/univapay_client_sdk/utilities/union_type_lookup.rb +242 -0
- data/lib/univapay_client_sdk.rb +322 -0
- data/test/apis/api_test_base.rb +23 -0
- data/test/apis/test_cancels_api.rb +162 -0
- data/test/apis/test_charges_api.rb +564 -0
- data/test/apis/test_merchants_api.rb +50 -0
- data/test/apis/test_refunds_api.rb +172 -0
- data/test/apis/test_stores_api.rb +86 -0
- data/test/apis/test_subscriptions_api.rb +579 -0
- data/test/apis/test_transaction_tokens_api.rb +305 -0
- data/test/apis/test_webhooks_api.rb +245 -0
- data/test/events/webhooks/test_bank_transfer_handler.rb +95 -0
- data/test/events/webhooks/test_cancel_handler.rb +90 -0
- data/test/events/webhooks/test_charge_finished_handler.rb +95 -0
- data/test/events/webhooks/test_charge_updated_handler.rb +95 -0
- data/test/events/webhooks/test_customs_handler.rb +100 -0
- data/test/events/webhooks/test_recurring_token_deleted_handler.rb +92 -0
- data/test/events/webhooks/test_refund_handler.rb +95 -0
- data/test/events/webhooks/test_subscription_canceled_handler.rb +101 -0
- data/test/events/webhooks/test_subscription_completed_handler.rb +101 -0
- data/test/events/webhooks/test_subscription_created_handler.rb +101 -0
- data/test/events/webhooks/test_subscription_failure_handler.rb +101 -0
- data/test/events/webhooks/test_subscription_payment_handler.rb +101 -0
- data/test/events/webhooks/test_subscription_suspended_handler.rb +101 -0
- data/test/events/webhooks/test_token_created_handler.rb +92 -0
- data/test/events/webhooks/test_token_cvv_auth_check_updated_handler.rb +92 -0
- data/test/events/webhooks/test_token_cvv_auth_updated_handler.rb +92 -0
- data/test/events/webhooks/test_token_replaced_handler.rb +92 -0
- data/test/events/webhooks/test_token_three_ds_updated_handler.rb +92 -0
- data/test/events/webhooks/test_token_updated_handler.rb +92 -0
- data/test/framework_integrations/rails_app_test_helper.rb +14 -0
- data/test/framework_integrations/webhooks/apps/hanami_charge_updated_app.rb +61 -0
- data/test/framework_integrations/webhooks/apps/rails_charge_updated_app.rb +24 -0
- data/test/framework_integrations/webhooks/apps/sinatra_charge_updated_app.rb +27 -0
- data/test/framework_integrations/webhooks/test/test_hanami_charge_updated_app.rb +57 -0
- data/test/framework_integrations/webhooks/test/test_rails_charge_updated_app.rb +57 -0
- data/test/framework_integrations/webhooks/test/test_sinatra_charge_updated_app.rb +58 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +397 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# Merchant transaction notification settings.
|
|
8
|
+
class MerchantWebhookUserTransactionsConfiguration < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Enables merchant transaction notifications.
|
|
13
|
+
# @return [TrueClass | FalseClass]
|
|
14
|
+
attr_accessor :enabled
|
|
15
|
+
|
|
16
|
+
# Sends transaction notifications to the customer.
|
|
17
|
+
# @return [TrueClass | FalseClass]
|
|
18
|
+
attr_accessor :notify_customer
|
|
19
|
+
|
|
20
|
+
# Sends notifications for test-mode events.
|
|
21
|
+
# @return [TrueClass | FalseClass]
|
|
22
|
+
attr_accessor :notify_on_test
|
|
23
|
+
|
|
24
|
+
# Sends notifications when a recurring token is created.
|
|
25
|
+
# @return [TrueClass | FalseClass]
|
|
26
|
+
attr_accessor :notify_on_recurring_token_creation
|
|
27
|
+
|
|
28
|
+
# Sends notifications when recurring-token CVV confirmation fails.
|
|
29
|
+
# @return [TrueClass | FalseClass]
|
|
30
|
+
attr_accessor :notify_on_recurring_token_cvv_failed
|
|
31
|
+
|
|
32
|
+
# Sends notifications after repeated webhook delivery failures.
|
|
33
|
+
# @return [TrueClass | FalseClass]
|
|
34
|
+
attr_accessor :notify_on_webhook_failure
|
|
35
|
+
|
|
36
|
+
# Sends notifications when webhook delivery is disabled.
|
|
37
|
+
# @return [TrueClass | FalseClass]
|
|
38
|
+
attr_accessor :notify_on_webhook_disabled
|
|
39
|
+
|
|
40
|
+
# Sends merchant notifications for failed transactions.
|
|
41
|
+
# @return [TrueClass | FalseClass]
|
|
42
|
+
attr_accessor :notify_user_on_failed_transactions
|
|
43
|
+
|
|
44
|
+
# Sends customer notifications for failed transactions.
|
|
45
|
+
# @return [TrueClass | FalseClass]
|
|
46
|
+
attr_accessor :notify_customer_on_failed_transactions
|
|
47
|
+
|
|
48
|
+
# Sends merchant notifications with convenience-store payment instructions.
|
|
49
|
+
# @return [TrueClass | FalseClass]
|
|
50
|
+
attr_accessor :notify_user_on_convenience_instructions
|
|
51
|
+
|
|
52
|
+
# Sends notifications for subscription lifecycle events.
|
|
53
|
+
# @return [TrueClass | FalseClass]
|
|
54
|
+
attr_accessor :notify_on_subscriptions
|
|
55
|
+
|
|
56
|
+
# Sends notifications for authorization-only charges.
|
|
57
|
+
# @return [TrueClass | FalseClass]
|
|
58
|
+
attr_accessor :notify_on_authorizations
|
|
59
|
+
|
|
60
|
+
# Sends notifications for CVV authorization events.
|
|
61
|
+
# @return [TrueClass | FalseClass]
|
|
62
|
+
attr_accessor :notify_on_cvv_authorizations
|
|
63
|
+
|
|
64
|
+
# Sends notifications when charges are canceled.
|
|
65
|
+
# @return [TrueClass | FalseClass]
|
|
66
|
+
attr_accessor :notify_on_cancels
|
|
67
|
+
|
|
68
|
+
# Includes customer self-service links in supported notifications.
|
|
69
|
+
# @return [TrueClass | FalseClass]
|
|
70
|
+
attr_accessor :customer_refer_link_enabled
|
|
71
|
+
|
|
72
|
+
# Sends notifications when convenience payments expire.
|
|
73
|
+
# @return [TrueClass | FalseClass]
|
|
74
|
+
attr_accessor :notify_on_convenience_expiry
|
|
75
|
+
|
|
76
|
+
# Sends notifications when recurring tokens are created through 3-D Secure.
|
|
77
|
+
# @return [TrueClass | FalseClass]
|
|
78
|
+
attr_accessor :notify_on_recurring_token_creation_with_three_ds
|
|
79
|
+
|
|
80
|
+
# Sends notifications for chargeback events.
|
|
81
|
+
# @return [TrueClass | FalseClass]
|
|
82
|
+
attr_accessor :notify_on_chargebacks
|
|
83
|
+
|
|
84
|
+
# A mapping from model property names to API property names.
|
|
85
|
+
def self.names
|
|
86
|
+
@_hash = {} if @_hash.nil?
|
|
87
|
+
@_hash['enabled'] = 'enabled'
|
|
88
|
+
@_hash['notify_customer'] = 'notify_customer'
|
|
89
|
+
@_hash['notify_on_test'] = 'notify_on_test'
|
|
90
|
+
@_hash['notify_on_recurring_token_creation'] =
|
|
91
|
+
'notify_on_recurring_token_creation'
|
|
92
|
+
@_hash['notify_on_recurring_token_cvv_failed'] =
|
|
93
|
+
'notify_on_recurring_token_cvv_failed'
|
|
94
|
+
@_hash['notify_on_webhook_failure'] = 'notify_on_webhook_failure'
|
|
95
|
+
@_hash['notify_on_webhook_disabled'] = 'notify_on_webhook_disabled'
|
|
96
|
+
@_hash['notify_user_on_failed_transactions'] =
|
|
97
|
+
'notify_user_on_failed_transactions'
|
|
98
|
+
@_hash['notify_customer_on_failed_transactions'] =
|
|
99
|
+
'notify_customer_on_failed_transactions'
|
|
100
|
+
@_hash['notify_user_on_convenience_instructions'] =
|
|
101
|
+
'notify_user_on_convenience_instructions'
|
|
102
|
+
@_hash['notify_on_subscriptions'] = 'notify_on_subscriptions'
|
|
103
|
+
@_hash['notify_on_authorizations'] = 'notify_on_authorizations'
|
|
104
|
+
@_hash['notify_on_cvv_authorizations'] = 'notify_on_cvv_authorizations'
|
|
105
|
+
@_hash['notify_on_cancels'] = 'notify_on_cancels'
|
|
106
|
+
@_hash['customer_refer_link_enabled'] = 'customer_refer_link_enabled'
|
|
107
|
+
@_hash['notify_on_convenience_expiry'] = 'notify_on_convenience_expiry'
|
|
108
|
+
@_hash['notify_on_recurring_token_creation_with_three_ds'] =
|
|
109
|
+
'notify_on_recurring_token_creation_with_three_ds'
|
|
110
|
+
@_hash['notify_on_chargebacks'] = 'notify_on_chargebacks'
|
|
111
|
+
@_hash
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# An array for optional fields
|
|
115
|
+
def self.optionals
|
|
116
|
+
%w[
|
|
117
|
+
enabled
|
|
118
|
+
notify_customer
|
|
119
|
+
notify_on_test
|
|
120
|
+
notify_on_recurring_token_creation
|
|
121
|
+
notify_on_recurring_token_cvv_failed
|
|
122
|
+
notify_on_webhook_failure
|
|
123
|
+
notify_on_webhook_disabled
|
|
124
|
+
notify_user_on_failed_transactions
|
|
125
|
+
notify_customer_on_failed_transactions
|
|
126
|
+
notify_user_on_convenience_instructions
|
|
127
|
+
notify_on_subscriptions
|
|
128
|
+
notify_on_authorizations
|
|
129
|
+
notify_on_cvv_authorizations
|
|
130
|
+
notify_on_cancels
|
|
131
|
+
customer_refer_link_enabled
|
|
132
|
+
notify_on_convenience_expiry
|
|
133
|
+
notify_on_recurring_token_creation_with_three_ds
|
|
134
|
+
notify_on_chargebacks
|
|
135
|
+
]
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# An array for nullable fields
|
|
139
|
+
def self.nullables
|
|
140
|
+
%w[
|
|
141
|
+
enabled
|
|
142
|
+
notify_customer
|
|
143
|
+
notify_on_test
|
|
144
|
+
notify_on_recurring_token_creation
|
|
145
|
+
notify_on_recurring_token_cvv_failed
|
|
146
|
+
notify_on_webhook_failure
|
|
147
|
+
notify_on_webhook_disabled
|
|
148
|
+
notify_user_on_failed_transactions
|
|
149
|
+
notify_customer_on_failed_transactions
|
|
150
|
+
notify_user_on_convenience_instructions
|
|
151
|
+
notify_on_subscriptions
|
|
152
|
+
notify_on_authorizations
|
|
153
|
+
notify_on_cvv_authorizations
|
|
154
|
+
notify_on_cancels
|
|
155
|
+
customer_refer_link_enabled
|
|
156
|
+
notify_on_convenience_expiry
|
|
157
|
+
notify_on_recurring_token_creation_with_three_ds
|
|
158
|
+
notify_on_chargebacks
|
|
159
|
+
]
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def initialize(enabled: SKIP, notify_customer: SKIP, notify_on_test: SKIP,
|
|
163
|
+
notify_on_recurring_token_creation: SKIP,
|
|
164
|
+
notify_on_recurring_token_cvv_failed: SKIP,
|
|
165
|
+
notify_on_webhook_failure: SKIP,
|
|
166
|
+
notify_on_webhook_disabled: SKIP,
|
|
167
|
+
notify_user_on_failed_transactions: SKIP,
|
|
168
|
+
notify_customer_on_failed_transactions: SKIP,
|
|
169
|
+
notify_user_on_convenience_instructions: SKIP,
|
|
170
|
+
notify_on_subscriptions: SKIP,
|
|
171
|
+
notify_on_authorizations: SKIP,
|
|
172
|
+
notify_on_cvv_authorizations: SKIP, notify_on_cancels: SKIP,
|
|
173
|
+
customer_refer_link_enabled: SKIP,
|
|
174
|
+
notify_on_convenience_expiry: SKIP,
|
|
175
|
+
notify_on_recurring_token_creation_with_three_ds: SKIP,
|
|
176
|
+
notify_on_chargebacks: SKIP, additional_properties: nil)
|
|
177
|
+
# Add additional model properties to the instance
|
|
178
|
+
additional_properties = {} if additional_properties.nil?
|
|
179
|
+
|
|
180
|
+
@enabled = enabled unless enabled == SKIP
|
|
181
|
+
@notify_customer = notify_customer unless notify_customer == SKIP
|
|
182
|
+
@notify_on_test = notify_on_test unless notify_on_test == SKIP
|
|
183
|
+
unless notify_on_recurring_token_creation == SKIP
|
|
184
|
+
@notify_on_recurring_token_creation =
|
|
185
|
+
notify_on_recurring_token_creation
|
|
186
|
+
end
|
|
187
|
+
unless notify_on_recurring_token_cvv_failed == SKIP
|
|
188
|
+
@notify_on_recurring_token_cvv_failed =
|
|
189
|
+
notify_on_recurring_token_cvv_failed
|
|
190
|
+
end
|
|
191
|
+
unless notify_on_webhook_failure == SKIP
|
|
192
|
+
@notify_on_webhook_failure =
|
|
193
|
+
notify_on_webhook_failure
|
|
194
|
+
end
|
|
195
|
+
unless notify_on_webhook_disabled == SKIP
|
|
196
|
+
@notify_on_webhook_disabled =
|
|
197
|
+
notify_on_webhook_disabled
|
|
198
|
+
end
|
|
199
|
+
unless notify_user_on_failed_transactions == SKIP
|
|
200
|
+
@notify_user_on_failed_transactions =
|
|
201
|
+
notify_user_on_failed_transactions
|
|
202
|
+
end
|
|
203
|
+
unless notify_customer_on_failed_transactions == SKIP
|
|
204
|
+
@notify_customer_on_failed_transactions =
|
|
205
|
+
notify_customer_on_failed_transactions
|
|
206
|
+
end
|
|
207
|
+
unless notify_user_on_convenience_instructions == SKIP
|
|
208
|
+
@notify_user_on_convenience_instructions =
|
|
209
|
+
notify_user_on_convenience_instructions
|
|
210
|
+
end
|
|
211
|
+
@notify_on_subscriptions = notify_on_subscriptions unless notify_on_subscriptions == SKIP
|
|
212
|
+
@notify_on_authorizations = notify_on_authorizations unless notify_on_authorizations == SKIP
|
|
213
|
+
unless notify_on_cvv_authorizations == SKIP
|
|
214
|
+
@notify_on_cvv_authorizations =
|
|
215
|
+
notify_on_cvv_authorizations
|
|
216
|
+
end
|
|
217
|
+
@notify_on_cancels = notify_on_cancels unless notify_on_cancels == SKIP
|
|
218
|
+
unless customer_refer_link_enabled == SKIP
|
|
219
|
+
@customer_refer_link_enabled =
|
|
220
|
+
customer_refer_link_enabled
|
|
221
|
+
end
|
|
222
|
+
unless notify_on_convenience_expiry == SKIP
|
|
223
|
+
@notify_on_convenience_expiry =
|
|
224
|
+
notify_on_convenience_expiry
|
|
225
|
+
end
|
|
226
|
+
unless notify_on_recurring_token_creation_with_three_ds == SKIP
|
|
227
|
+
@notify_on_recurring_token_creation_with_three_ds =
|
|
228
|
+
notify_on_recurring_token_creation_with_three_ds
|
|
229
|
+
end
|
|
230
|
+
@notify_on_chargebacks = notify_on_chargebacks unless notify_on_chargebacks == SKIP
|
|
231
|
+
@additional_properties = additional_properties
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Creates an instance of the object from a hash.
|
|
235
|
+
def self.from_hash(hash)
|
|
236
|
+
return nil unless hash
|
|
237
|
+
|
|
238
|
+
# Extract variables from the hash.
|
|
239
|
+
enabled = hash.key?('enabled') ? hash['enabled'] : SKIP
|
|
240
|
+
notify_customer =
|
|
241
|
+
hash.key?('notify_customer') ? hash['notify_customer'] : SKIP
|
|
242
|
+
notify_on_test =
|
|
243
|
+
hash.key?('notify_on_test') ? hash['notify_on_test'] : SKIP
|
|
244
|
+
notify_on_recurring_token_creation =
|
|
245
|
+
hash.key?('notify_on_recurring_token_creation') ? hash['notify_on_recurring_token_creation'] : SKIP
|
|
246
|
+
notify_on_recurring_token_cvv_failed =
|
|
247
|
+
hash.key?('notify_on_recurring_token_cvv_failed') ? hash['notify_on_recurring_token_cvv_failed'] : SKIP
|
|
248
|
+
notify_on_webhook_failure =
|
|
249
|
+
hash.key?('notify_on_webhook_failure') ? hash['notify_on_webhook_failure'] : SKIP
|
|
250
|
+
notify_on_webhook_disabled =
|
|
251
|
+
hash.key?('notify_on_webhook_disabled') ? hash['notify_on_webhook_disabled'] : SKIP
|
|
252
|
+
notify_user_on_failed_transactions =
|
|
253
|
+
hash.key?('notify_user_on_failed_transactions') ? hash['notify_user_on_failed_transactions'] : SKIP
|
|
254
|
+
notify_customer_on_failed_transactions =
|
|
255
|
+
hash.key?('notify_customer_on_failed_transactions') ? hash['notify_customer_on_failed_transactions'] : SKIP
|
|
256
|
+
notify_user_on_convenience_instructions =
|
|
257
|
+
hash.key?('notify_user_on_convenience_instructions') ? hash['notify_user_on_convenience_instructions'] : SKIP
|
|
258
|
+
notify_on_subscriptions =
|
|
259
|
+
hash.key?('notify_on_subscriptions') ? hash['notify_on_subscriptions'] : SKIP
|
|
260
|
+
notify_on_authorizations =
|
|
261
|
+
hash.key?('notify_on_authorizations') ? hash['notify_on_authorizations'] : SKIP
|
|
262
|
+
notify_on_cvv_authorizations =
|
|
263
|
+
hash.key?('notify_on_cvv_authorizations') ? hash['notify_on_cvv_authorizations'] : SKIP
|
|
264
|
+
notify_on_cancels =
|
|
265
|
+
hash.key?('notify_on_cancels') ? hash['notify_on_cancels'] : SKIP
|
|
266
|
+
customer_refer_link_enabled =
|
|
267
|
+
hash.key?('customer_refer_link_enabled') ? hash['customer_refer_link_enabled'] : SKIP
|
|
268
|
+
notify_on_convenience_expiry =
|
|
269
|
+
hash.key?('notify_on_convenience_expiry') ? hash['notify_on_convenience_expiry'] : SKIP
|
|
270
|
+
notify_on_recurring_token_creation_with_three_ds =
|
|
271
|
+
hash.key?('notify_on_recurring_token_creation_with_three_ds') ? hash['notify_on_recurring_token_creation_with_three_ds'] : SKIP
|
|
272
|
+
notify_on_chargebacks =
|
|
273
|
+
hash.key?('notify_on_chargebacks') ? hash['notify_on_chargebacks'] : SKIP
|
|
274
|
+
|
|
275
|
+
# Create a new hash for additional properties, removing known properties.
|
|
276
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
277
|
+
|
|
278
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
279
|
+
new_hash, proc { |value| value }
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
# Create object from extracted values.
|
|
283
|
+
MerchantWebhookUserTransactionsConfiguration.new(enabled: enabled,
|
|
284
|
+
notify_customer: notify_customer,
|
|
285
|
+
notify_on_test: notify_on_test,
|
|
286
|
+
notify_on_recurring_token_creation: notify_on_recurring_token_creation,
|
|
287
|
+
notify_on_recurring_token_cvv_failed: notify_on_recurring_token_cvv_failed,
|
|
288
|
+
notify_on_webhook_failure: notify_on_webhook_failure,
|
|
289
|
+
notify_on_webhook_disabled: notify_on_webhook_disabled,
|
|
290
|
+
notify_user_on_failed_transactions: notify_user_on_failed_transactions,
|
|
291
|
+
notify_customer_on_failed_transactions: notify_customer_on_failed_transactions,
|
|
292
|
+
notify_user_on_convenience_instructions: notify_user_on_convenience_instructions,
|
|
293
|
+
notify_on_subscriptions: notify_on_subscriptions,
|
|
294
|
+
notify_on_authorizations: notify_on_authorizations,
|
|
295
|
+
notify_on_cvv_authorizations: notify_on_cvv_authorizations,
|
|
296
|
+
notify_on_cancels: notify_on_cancels,
|
|
297
|
+
customer_refer_link_enabled: customer_refer_link_enabled,
|
|
298
|
+
notify_on_convenience_expiry: notify_on_convenience_expiry,
|
|
299
|
+
notify_on_recurring_token_creation_with_three_ds: notify_on_recurring_token_creation_with_three_ds,
|
|
300
|
+
notify_on_chargebacks: notify_on_chargebacks,
|
|
301
|
+
additional_properties: additional_properties)
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Provides a human-readable string representation of the object.
|
|
305
|
+
def to_s
|
|
306
|
+
class_name = self.class.name.split('::').last
|
|
307
|
+
"<#{class_name} enabled: #{@enabled}, notify_customer: #{@notify_customer}, notify_on_test:"\
|
|
308
|
+
" #{@notify_on_test}, notify_on_recurring_token_creation:"\
|
|
309
|
+
" #{@notify_on_recurring_token_creation}, notify_on_recurring_token_cvv_failed:"\
|
|
310
|
+
" #{@notify_on_recurring_token_cvv_failed}, notify_on_webhook_failure:"\
|
|
311
|
+
" #{@notify_on_webhook_failure}, notify_on_webhook_disabled: #{@notify_on_webhook_disabled},"\
|
|
312
|
+
" notify_user_on_failed_transactions: #{@notify_user_on_failed_transactions},"\
|
|
313
|
+
" notify_customer_on_failed_transactions: #{@notify_customer_on_failed_transactions},"\
|
|
314
|
+
" notify_user_on_convenience_instructions: #{@notify_user_on_convenience_instructions},"\
|
|
315
|
+
" notify_on_subscriptions: #{@notify_on_subscriptions}, notify_on_authorizations:"\
|
|
316
|
+
" #{@notify_on_authorizations}, notify_on_cvv_authorizations:"\
|
|
317
|
+
" #{@notify_on_cvv_authorizations}, notify_on_cancels: #{@notify_on_cancels},"\
|
|
318
|
+
" customer_refer_link_enabled: #{@customer_refer_link_enabled},"\
|
|
319
|
+
" notify_on_convenience_expiry: #{@notify_on_convenience_expiry},"\
|
|
320
|
+
' notify_on_recurring_token_creation_with_three_ds:'\
|
|
321
|
+
" #{@notify_on_recurring_token_creation_with_three_ds}, notify_on_chargebacks:"\
|
|
322
|
+
" #{@notify_on_chargebacks}, additional_properties: #{@additional_properties}>"
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
326
|
+
def inspect
|
|
327
|
+
class_name = self.class.name.split('::').last
|
|
328
|
+
"<#{class_name} enabled: #{@enabled.inspect}, notify_customer: #{@notify_customer.inspect},"\
|
|
329
|
+
" notify_on_test: #{@notify_on_test.inspect}, notify_on_recurring_token_creation:"\
|
|
330
|
+
" #{@notify_on_recurring_token_creation.inspect}, notify_on_recurring_token_cvv_failed:"\
|
|
331
|
+
" #{@notify_on_recurring_token_cvv_failed.inspect}, notify_on_webhook_failure:"\
|
|
332
|
+
" #{@notify_on_webhook_failure.inspect}, notify_on_webhook_disabled:"\
|
|
333
|
+
" #{@notify_on_webhook_disabled.inspect}, notify_user_on_failed_transactions:"\
|
|
334
|
+
" #{@notify_user_on_failed_transactions.inspect}, notify_customer_on_failed_transactions:"\
|
|
335
|
+
" #{@notify_customer_on_failed_transactions.inspect},"\
|
|
336
|
+
' notify_user_on_convenience_instructions:'\
|
|
337
|
+
" #{@notify_user_on_convenience_instructions.inspect}, notify_on_subscriptions:"\
|
|
338
|
+
" #{@notify_on_subscriptions.inspect}, notify_on_authorizations:"\
|
|
339
|
+
" #{@notify_on_authorizations.inspect}, notify_on_cvv_authorizations:"\
|
|
340
|
+
" #{@notify_on_cvv_authorizations.inspect}, notify_on_cancels:"\
|
|
341
|
+
" #{@notify_on_cancels.inspect}, customer_refer_link_enabled:"\
|
|
342
|
+
" #{@customer_refer_link_enabled.inspect}, notify_on_convenience_expiry:"\
|
|
343
|
+
" #{@notify_on_convenience_expiry.inspect},"\
|
|
344
|
+
' notify_on_recurring_token_creation_with_three_ds:'\
|
|
345
|
+
" #{@notify_on_recurring_token_creation_with_three_ds.inspect}, notify_on_chargebacks:"\
|
|
346
|
+
" #{@notify_on_chargebacks.inspect}, additional_properties: #{@additional_properties}>"
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# Mode Query schema.
|
|
8
|
+
class ModeQuery
|
|
9
|
+
MODE_QUERY = [
|
|
10
|
+
# TODO: Write general description for LIVE
|
|
11
|
+
LIVE = 'live'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for TEST
|
|
14
|
+
TEST = 'test'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
MODE_QUERY.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = LIVE)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'live' then LIVE
|
|
30
|
+
when 'test' then TEST
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# Payment errors that occur during resource processing (like Charges or
|
|
8
|
+
# Refunds). The HTTP status will return success (2xx), but the resource
|
|
9
|
+
# `status` will be `failed`, and this object will be populated.
|
|
10
|
+
class PaymentError < BaseModel
|
|
11
|
+
SKIP = Object.new
|
|
12
|
+
private_constant :SKIP
|
|
13
|
+
|
|
14
|
+
# Payment Error Codes.
|
|
15
|
+
# | Code | Description |
|
|
16
|
+
# | :--- | :--- |
|
|
17
|
+
# | 301 | Card number error. |
|
|
18
|
+
# | 302 | Invalid expiration month. |
|
|
19
|
+
# | 303 | Invalid expiration year. |
|
|
20
|
+
# | 304 | Card expired. |
|
|
21
|
+
# | 305 | Security code (CVV) error. |
|
|
22
|
+
# | 306 | Card declined (authorization screening error). |
|
|
23
|
+
# | 307 | Invalid card. |
|
|
24
|
+
# | 308 | This card has not been approved by the card company. |
|
|
25
|
+
# | 309 | General error occurred. Detailed information can be confirmed in
|
|
26
|
+
# the dashboard. |
|
|
27
|
+
# | 310 | Invalid consumer data (invalid request data). |
|
|
28
|
+
# | 311 | Too many charges on the same card in a short period. Please wait
|
|
29
|
+
# and try again. |
|
|
30
|
+
# | 312 | This charge cannot be canceled. |
|
|
31
|
+
# | 313 | Authorization expired (during charge capture). |
|
|
32
|
+
# | 314 | This card has been reported stolen or invalidated by the issuer. |
|
|
33
|
+
# | 315 | Please contact the card issuer. |
|
|
34
|
+
# | 316 | Cardholder's last name is required. |
|
|
35
|
+
# | 317 | Partial capture is not supported. |
|
|
36
|
+
# | 318 | Partial refund is not supported. |
|
|
37
|
+
# | 319 | Suspected fraud (security restriction). |
|
|
38
|
+
# | 320 | An error occurred in the bank's system. |
|
|
39
|
+
# | 321 | Dynamic descriptor is not supported. |
|
|
40
|
+
# | 322 | Barcode/QR code is invalid. |
|
|
41
|
+
# | 323 | Barcode/QR code has expired. |
|
|
42
|
+
# | 324 | This barcode/QR code has already been processed. |
|
|
43
|
+
# | 325 | This barcode/QR code is currently being processed. |
|
|
44
|
+
# | 326 | Rejected due to a high-risk profile. |
|
|
45
|
+
# | 327 | Payment deadline (5-minute timeout) has expired. |
|
|
46
|
+
# | 328 | Recovery failed. Manual intervention is required. |
|
|
47
|
+
# | 329 | Refund failed. |
|
|
48
|
+
# | 330 | Insufficient funds. |
|
|
49
|
+
# | 331 | Metadata field value is invalid or missing. |
|
|
50
|
+
# | 332 | Cross-border transaction not permitted: missing ID. |
|
|
51
|
+
# | 333 | Cross-border transaction not permitted: missing phone number. |
|
|
52
|
+
# | 334 | Cross-border transaction not permitted: unauthorized payment
|
|
53
|
+
# method. |
|
|
54
|
+
# | 335 | Cross-border transaction not permitted: missing name. |
|
|
55
|
+
# | 336 | Exceeded the payment limit for this payment method. |
|
|
56
|
+
# | 337 | Exceeded the payment limit for this merchant. |
|
|
57
|
+
# | 338 | Payment information not found. |
|
|
58
|
+
# | 339 | Duplicate payment information. |
|
|
59
|
+
# | 340 | This consumer's retail QR account was rejected by the gateway. |
|
|
60
|
+
# | 341 | This merchant lacks the necessary information for this gateway. |
|
|
61
|
+
# | 342 | Cross-border transaction not permitted: unauthorized currency. |
|
|
62
|
+
# | 343 | Payment could not be processed due to a server error at the
|
|
63
|
+
# gateway. |
|
|
64
|
+
# | 344 | The selected payment method is temporarily unavailable from the
|
|
65
|
+
# gateway. |
|
|
66
|
+
# | 345 | The payment has already been canceled. |
|
|
67
|
+
# | 346 | Payment processing timed out due to system delay and was canceled.
|
|
68
|
+
# |
|
|
69
|
+
# | 351 | Invalid transaction. |
|
|
70
|
+
# | 355 | The card does not support the specified payment division (e.g.,
|
|
71
|
+
# installments). |
|
|
72
|
+
# | 356 | The card is not registered for 3D Secure. |
|
|
73
|
+
# | 358 | 3D Secure authentication failed (consumer reason, e.g., wrong
|
|
74
|
+
# password). |
|
|
75
|
+
# | 359 | 3D Secure authentication failed (card company reason). |
|
|
76
|
+
# | 500 | A pre-processing error occurred during the request execution. |
|
|
77
|
+
# | 501 | An internal error occurred. Please contact support. |
|
|
78
|
+
# | 502 | The request timed out waiting for a response. |
|
|
79
|
+
# | 601 | A system-released error occurred in this service. Check details. |
|
|
80
|
+
# | 602 | The payment processor rejected the submitted request. Check
|
|
81
|
+
# details. |
|
|
82
|
+
# | 603 | The submitted customer identity verification was rejected by
|
|
83
|
+
# customs. |
|
|
84
|
+
# | 604 | The required customer ID information was not submitted by the
|
|
85
|
+
# merchant. |
|
|
86
|
+
# @return [Integer]
|
|
87
|
+
attr_accessor :code
|
|
88
|
+
|
|
89
|
+
# A brief message detailing why the payment failed.
|
|
90
|
+
# @return [String]
|
|
91
|
+
attr_accessor :message
|
|
92
|
+
|
|
93
|
+
# Further specific details regarding the payment failure, if available.
|
|
94
|
+
# @return [String]
|
|
95
|
+
attr_accessor :detail
|
|
96
|
+
|
|
97
|
+
# A mapping from model property names to API property names.
|
|
98
|
+
def self.names
|
|
99
|
+
@_hash = {} if @_hash.nil?
|
|
100
|
+
@_hash['code'] = 'code'
|
|
101
|
+
@_hash['message'] = 'message'
|
|
102
|
+
@_hash['detail'] = 'detail'
|
|
103
|
+
@_hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# An array for optional fields
|
|
107
|
+
def self.optionals
|
|
108
|
+
%w[
|
|
109
|
+
code
|
|
110
|
+
message
|
|
111
|
+
detail
|
|
112
|
+
]
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# An array for nullable fields
|
|
116
|
+
def self.nullables
|
|
117
|
+
[]
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def initialize(code: SKIP, message: SKIP, detail: SKIP,
|
|
121
|
+
additional_properties: nil)
|
|
122
|
+
# Add additional model properties to the instance
|
|
123
|
+
additional_properties = {} if additional_properties.nil?
|
|
124
|
+
|
|
125
|
+
@code = code unless code == SKIP
|
|
126
|
+
@message = message unless message == SKIP
|
|
127
|
+
@detail = detail unless detail == SKIP
|
|
128
|
+
@additional_properties = additional_properties
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Creates an instance of the object from a hash.
|
|
132
|
+
def self.from_hash(hash)
|
|
133
|
+
return nil unless hash
|
|
134
|
+
|
|
135
|
+
# Extract variables from the hash.
|
|
136
|
+
code = hash.key?('code') ? hash['code'] : SKIP
|
|
137
|
+
message = hash.key?('message') ? hash['message'] : SKIP
|
|
138
|
+
detail = hash.key?('detail') ? hash['detail'] : SKIP
|
|
139
|
+
|
|
140
|
+
# Create a new hash for additional properties, removing known properties.
|
|
141
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
142
|
+
|
|
143
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
144
|
+
new_hash, proc { |value| value }
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
# Create object from extracted values.
|
|
148
|
+
PaymentError.new(code: code,
|
|
149
|
+
message: message,
|
|
150
|
+
detail: detail,
|
|
151
|
+
additional_properties: additional_properties)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Validates an instance of the object from a given value.
|
|
155
|
+
# @param [PaymentError | Hash] The value against the validation is performed.
|
|
156
|
+
def self.validate(value)
|
|
157
|
+
return true if value.instance_of? self
|
|
158
|
+
|
|
159
|
+
return false unless value.instance_of? Hash
|
|
160
|
+
|
|
161
|
+
true
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Provides a human-readable string representation of the object.
|
|
165
|
+
def to_s
|
|
166
|
+
class_name = self.class.name.split('::').last
|
|
167
|
+
"<#{class_name} code: #{@code}, message: #{@message}, detail: #{@detail},"\
|
|
168
|
+
" additional_properties: #{@additional_properties}>"
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
172
|
+
def inspect
|
|
173
|
+
class_name = self.class.name.split('::').last
|
|
174
|
+
"<#{class_name} code: #{@code.inspect}, message: #{@message.inspect}, detail:"\
|
|
175
|
+
" #{@detail.inspect}, additional_properties: #{@additional_properties}>"
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# Plan type selector.
|
|
8
|
+
class PlanSettingsType
|
|
9
|
+
PLAN_SETTINGS_TYPE = [
|
|
10
|
+
# TODO: Write general description for FIXED_CYCLES
|
|
11
|
+
FIXED_CYCLES = 'fixed_cycles'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for FIXED_CYCLE_AMOUNT
|
|
14
|
+
FIXED_CYCLE_AMOUNT = 'fixed_cycle_amount'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
PLAN_SETTINGS_TYPE.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = FIXED_CYCLES)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'fixed_cycles' then FIXED_CYCLES
|
|
30
|
+
when 'fixed_cycle_amount' then FIXED_CYCLE_AMOUNT
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|