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,37 @@
|
|
|
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
|
+
# SubscriptionSuspendedHandler is responsible for verifying request signatures
|
|
8
|
+
# and parsing incoming subscriptionSuspended events into strongly typed objects.
|
|
9
|
+
class SubscriptionSuspendedHandler
|
|
10
|
+
include CoreLibrary
|
|
11
|
+
# Creates a new instance of the SubscriptionSuspendedHandler.
|
|
12
|
+
def initialize; end
|
|
13
|
+
|
|
14
|
+
# Parse the event.
|
|
15
|
+
#
|
|
16
|
+
# @param [Rack::Request] request The incoming HTTP request containing the event payload.
|
|
17
|
+
# @return[SubscriptionSuspendedWebhookCallback, UnknownEvent]
|
|
18
|
+
# SubscriptionSuspendedWebhookCallback for successful parsing;
|
|
19
|
+
#
|
|
20
|
+
# UnknownEvent for unknown events.
|
|
21
|
+
def parse_event(request)
|
|
22
|
+
return UnknownEvent.new(['Invalid request env.']) unless request.respond_to?(:env) && request.env.is_a?(Hash)
|
|
23
|
+
|
|
24
|
+
raw_body = RackRequestHelper.read_raw_body(request)
|
|
25
|
+
return UnknownEvent.new(['Invalid request body.']) if raw_body.nil? || raw_body.empty?
|
|
26
|
+
|
|
27
|
+
# Deserialize payload
|
|
28
|
+
begin
|
|
29
|
+
union = UnionTypeLookUp.get(:SubscriptionSuspended)
|
|
30
|
+
raw = RackRequestHelper.read_raw_body(request)
|
|
31
|
+
APIHelper.deserialize_union_type(union, raw, false, true)
|
|
32
|
+
rescue StandardError => e
|
|
33
|
+
UnknownEvent.new(['Deserialization failed.', e.message])
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
# TokenCreatedHandler is responsible for verifying request signatures
|
|
8
|
+
# and parsing incoming tokenCreated events into strongly typed objects.
|
|
9
|
+
class TokenCreatedHandler
|
|
10
|
+
include CoreLibrary
|
|
11
|
+
# Creates a new instance of the TokenCreatedHandler.
|
|
12
|
+
def initialize; end
|
|
13
|
+
|
|
14
|
+
# Parse the event.
|
|
15
|
+
#
|
|
16
|
+
# @param [Rack::Request] request The incoming HTTP request containing the event payload.
|
|
17
|
+
# @return[TokenCreatedWebhookCallback, UnknownEvent]
|
|
18
|
+
# TokenCreatedWebhookCallback for successful parsing;
|
|
19
|
+
# UnknownEvent
|
|
20
|
+
# for unknown events.
|
|
21
|
+
def parse_event(request)
|
|
22
|
+
return UnknownEvent.new(['Invalid request env.']) unless request.respond_to?(:env) && request.env.is_a?(Hash)
|
|
23
|
+
|
|
24
|
+
raw_body = RackRequestHelper.read_raw_body(request)
|
|
25
|
+
return UnknownEvent.new(['Invalid request body.']) if raw_body.nil? || raw_body.empty?
|
|
26
|
+
|
|
27
|
+
# Deserialize payload
|
|
28
|
+
begin
|
|
29
|
+
union = UnionTypeLookUp.get(:TokenCreated)
|
|
30
|
+
raw = RackRequestHelper.read_raw_body(request)
|
|
31
|
+
APIHelper.deserialize_union_type(union, raw, false, true)
|
|
32
|
+
rescue StandardError => e
|
|
33
|
+
UnknownEvent.new(['Deserialization failed.', e.message])
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
# TokenCvvAuthCheckUpdatedHandler is responsible for verifying request signatures
|
|
8
|
+
# and parsing incoming tokenCvvAuthCheckUpdated events into strongly typed objects.
|
|
9
|
+
class TokenCvvAuthCheckUpdatedHandler
|
|
10
|
+
include CoreLibrary
|
|
11
|
+
# Creates a new instance of the TokenCvvAuthCheckUpdatedHandler.
|
|
12
|
+
def initialize; end
|
|
13
|
+
|
|
14
|
+
# Parse the event.
|
|
15
|
+
#
|
|
16
|
+
# @param [Rack::Request] request The incoming HTTP request containing the event payload.
|
|
17
|
+
# @return[TokenCvvAuthCheckUpdatedWebhookCallback, UnknownEvent]
|
|
18
|
+
# TokenCvvAuthCheckUpdatedWebhookCallback for successful parsing;
|
|
19
|
+
#
|
|
20
|
+
# UnknownEvent for unknown events.
|
|
21
|
+
def parse_event(request)
|
|
22
|
+
return UnknownEvent.new(['Invalid request env.']) unless request.respond_to?(:env) && request.env.is_a?(Hash)
|
|
23
|
+
|
|
24
|
+
raw_body = RackRequestHelper.read_raw_body(request)
|
|
25
|
+
return UnknownEvent.new(['Invalid request body.']) if raw_body.nil? || raw_body.empty?
|
|
26
|
+
|
|
27
|
+
# Deserialize payload
|
|
28
|
+
begin
|
|
29
|
+
union = UnionTypeLookUp.get(:TokenCvvAuthCheckUpdated)
|
|
30
|
+
raw = RackRequestHelper.read_raw_body(request)
|
|
31
|
+
APIHelper.deserialize_union_type(union, raw, false, true)
|
|
32
|
+
rescue StandardError => e
|
|
33
|
+
UnknownEvent.new(['Deserialization failed.', e.message])
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
# TokenCvvAuthUpdatedHandler is responsible for verifying request signatures
|
|
8
|
+
# and parsing incoming tokenCvvAuthUpdated events into strongly typed objects.
|
|
9
|
+
class TokenCvvAuthUpdatedHandler
|
|
10
|
+
include CoreLibrary
|
|
11
|
+
# Creates a new instance of the TokenCvvAuthUpdatedHandler.
|
|
12
|
+
def initialize; end
|
|
13
|
+
|
|
14
|
+
# Parse the event.
|
|
15
|
+
#
|
|
16
|
+
# @param [Rack::Request] request The incoming HTTP request containing the event payload.
|
|
17
|
+
# @return[TokenCvvAuthUpdatedWebhookCallback, UnknownEvent]
|
|
18
|
+
# TokenCvvAuthUpdatedWebhookCallback for successful parsing;
|
|
19
|
+
#
|
|
20
|
+
# UnknownEvent for unknown events.
|
|
21
|
+
def parse_event(request)
|
|
22
|
+
return UnknownEvent.new(['Invalid request env.']) unless request.respond_to?(:env) && request.env.is_a?(Hash)
|
|
23
|
+
|
|
24
|
+
raw_body = RackRequestHelper.read_raw_body(request)
|
|
25
|
+
return UnknownEvent.new(['Invalid request body.']) if raw_body.nil? || raw_body.empty?
|
|
26
|
+
|
|
27
|
+
# Deserialize payload
|
|
28
|
+
begin
|
|
29
|
+
union = UnionTypeLookUp.get(:TokenCvvAuthUpdated)
|
|
30
|
+
raw = RackRequestHelper.read_raw_body(request)
|
|
31
|
+
APIHelper.deserialize_union_type(union, raw, false, true)
|
|
32
|
+
rescue StandardError => e
|
|
33
|
+
UnknownEvent.new(['Deserialization failed.', e.message])
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
# TokenReplacedHandler is responsible for verifying request signatures
|
|
8
|
+
# and parsing incoming tokenReplaced events into strongly typed objects.
|
|
9
|
+
class TokenReplacedHandler
|
|
10
|
+
include CoreLibrary
|
|
11
|
+
# Creates a new instance of the TokenReplacedHandler.
|
|
12
|
+
def initialize; end
|
|
13
|
+
|
|
14
|
+
# Parse the event.
|
|
15
|
+
#
|
|
16
|
+
# @param [Rack::Request] request The incoming HTTP request containing the event payload.
|
|
17
|
+
# @return[TokenReplacedWebhookCallback, UnknownEvent]
|
|
18
|
+
# TokenReplacedWebhookCallback for successful parsing;
|
|
19
|
+
# UnknownEvent
|
|
20
|
+
# for unknown events.
|
|
21
|
+
def parse_event(request)
|
|
22
|
+
return UnknownEvent.new(['Invalid request env.']) unless request.respond_to?(:env) && request.env.is_a?(Hash)
|
|
23
|
+
|
|
24
|
+
raw_body = RackRequestHelper.read_raw_body(request)
|
|
25
|
+
return UnknownEvent.new(['Invalid request body.']) if raw_body.nil? || raw_body.empty?
|
|
26
|
+
|
|
27
|
+
# Deserialize payload
|
|
28
|
+
begin
|
|
29
|
+
union = UnionTypeLookUp.get(:TokenReplaced)
|
|
30
|
+
raw = RackRequestHelper.read_raw_body(request)
|
|
31
|
+
APIHelper.deserialize_union_type(union, raw, false, true)
|
|
32
|
+
rescue StandardError => e
|
|
33
|
+
UnknownEvent.new(['Deserialization failed.', e.message])
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
# TokenThreeDsUpdatedHandler is responsible for verifying request signatures
|
|
8
|
+
# and parsing incoming tokenThreeDsUpdated events into strongly typed objects.
|
|
9
|
+
class TokenThreeDsUpdatedHandler
|
|
10
|
+
include CoreLibrary
|
|
11
|
+
# Creates a new instance of the TokenThreeDsUpdatedHandler.
|
|
12
|
+
def initialize; end
|
|
13
|
+
|
|
14
|
+
# Parse the event.
|
|
15
|
+
#
|
|
16
|
+
# @param [Rack::Request] request The incoming HTTP request containing the event payload.
|
|
17
|
+
# @return[TokenThreeDsUpdatedWebhookCallback, UnknownEvent]
|
|
18
|
+
# TokenThreeDsUpdatedWebhookCallback for successful parsing;
|
|
19
|
+
#
|
|
20
|
+
# UnknownEvent for unknown events.
|
|
21
|
+
def parse_event(request)
|
|
22
|
+
return UnknownEvent.new(['Invalid request env.']) unless request.respond_to?(:env) && request.env.is_a?(Hash)
|
|
23
|
+
|
|
24
|
+
raw_body = RackRequestHelper.read_raw_body(request)
|
|
25
|
+
return UnknownEvent.new(['Invalid request body.']) if raw_body.nil? || raw_body.empty?
|
|
26
|
+
|
|
27
|
+
# Deserialize payload
|
|
28
|
+
begin
|
|
29
|
+
union = UnionTypeLookUp.get(:TokenThreeDsUpdated)
|
|
30
|
+
raw = RackRequestHelper.read_raw_body(request)
|
|
31
|
+
APIHelper.deserialize_union_type(union, raw, false, true)
|
|
32
|
+
rescue StandardError => e
|
|
33
|
+
UnknownEvent.new(['Deserialization failed.', e.message])
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
# TokenUpdatedHandler is responsible for verifying request signatures
|
|
8
|
+
# and parsing incoming tokenUpdated events into strongly typed objects.
|
|
9
|
+
class TokenUpdatedHandler
|
|
10
|
+
include CoreLibrary
|
|
11
|
+
# Creates a new instance of the TokenUpdatedHandler.
|
|
12
|
+
def initialize; end
|
|
13
|
+
|
|
14
|
+
# Parse the event.
|
|
15
|
+
#
|
|
16
|
+
# @param [Rack::Request] request The incoming HTTP request containing the event payload.
|
|
17
|
+
# @return[TokenUpdatedWebhookCallback, UnknownEvent]
|
|
18
|
+
# TokenUpdatedWebhookCallback for successful parsing;
|
|
19
|
+
# UnknownEvent
|
|
20
|
+
# for unknown events.
|
|
21
|
+
def parse_event(request)
|
|
22
|
+
return UnknownEvent.new(['Invalid request env.']) unless request.respond_to?(:env) && request.env.is_a?(Hash)
|
|
23
|
+
|
|
24
|
+
raw_body = RackRequestHelper.read_raw_body(request)
|
|
25
|
+
return UnknownEvent.new(['Invalid request body.']) if raw_body.nil? || raw_body.empty?
|
|
26
|
+
|
|
27
|
+
# Deserialize payload
|
|
28
|
+
begin
|
|
29
|
+
union = UnionTypeLookUp.get(:TokenUpdated)
|
|
30
|
+
raw = RackRequestHelper.read_raw_body(request)
|
|
31
|
+
APIHelper.deserialize_union_type(union, raw, false, true)
|
|
32
|
+
rescue StandardError => e
|
|
33
|
+
UnknownEvent.new(['Deserialization failed.', e.message])
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,199 @@
|
|
|
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
|
+
# Standard API error response payload.
|
|
8
|
+
class ApiErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Always returns 'error'.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_reader :status
|
|
15
|
+
|
|
16
|
+
# API Request Error Codes.
|
|
17
|
+
# | HTTP | Error Code | Description |
|
|
18
|
+
# | :--- | :--- | :--- |
|
|
19
|
+
# | 400 | ALREADY_CAPTURED | The target charge is already captured or
|
|
20
|
+
# authorization is incomplete. |
|
|
21
|
+
# | 400 | AUTH_NOT_SUPPORTED | The configured gateway does not support
|
|
22
|
+
# authorization. |
|
|
23
|
+
# | 400 | CANCEL_NOT_ALLOWED | This payment method does not support
|
|
24
|
+
# cancellation, or the charge status cannot be canceled. |
|
|
25
|
+
# | 400 | CANNOT_CHANGE_CANCELED_SUBSCRIPTION | A canceled subscription
|
|
26
|
+
# cannot be modified. |
|
|
27
|
+
# | 400 | CANNOT_CHANGE_TOKEN | The transaction token for a subscription in
|
|
28
|
+
# this state cannot be changed. |
|
|
29
|
+
# | 400 | CANNOT_REFUND_UNSUCCESSFUL_CHARGE | Charges in a state other than
|
|
30
|
+
# 'successful' cannot be refunded. |
|
|
31
|
+
# | 400 | CAPTURE_AMOUNT_TOO_LARGE | The capture amount exceeds the
|
|
32
|
+
# authorized amount. |
|
|
33
|
+
# | 400 | CARD_BRAND_NOT_SUPPORTED | The configured gateway does not support
|
|
34
|
+
# the specified card brand. |
|
|
35
|
+
# | 400 | CARD_COUNTRY_NOT_SUPPORTED | The configured gateway does not
|
|
36
|
+
# support the specified card issuing country. |
|
|
37
|
+
# | 400 | CARD_PROCESSING_DISABLED | Card processing is disabled for this
|
|
38
|
+
# payment method. |
|
|
39
|
+
# | 400 | CHARGE_TOO_QUICK | Attempted to create multiple charges with the
|
|
40
|
+
# same amount within 30 seconds for the same card or recurring token. |
|
|
41
|
+
# | 400 | CONVENIENCE_PROCESSING_DISABLED | Konbini processing is disabled
|
|
42
|
+
# for this payment method. |
|
|
43
|
+
# | 400 | CURRENCY_MUST_MATCH_CHARGE | The refund currency must match the
|
|
44
|
+
# original charge currency. |
|
|
45
|
+
# | 400 | CVV_REQUIRED | CVV is required. |
|
|
46
|
+
# | 400 | CVV_AUTHORIZATION_NOT_COMPLETED | CVV authorization failed. |
|
|
47
|
+
# | 400 | FILE_INVALID_TYPE | The uploaded file has an incorrect MIME type.
|
|
48
|
+
# |
|
|
49
|
+
# | 400 | FILE_MAX_SIZE_EXCEEDED | The uploaded file size is too large. |
|
|
50
|
+
# | 400 | FORBIDDEN_IP | The country determined by the request's IP address
|
|
51
|
+
# is not permitted. |
|
|
52
|
+
# | 400 | INSTALLMENT_MAX_PAYOUT_PERIOD_EXCEEDED | The installment payment
|
|
53
|
+
# period exceeds the maximum allowed period. |
|
|
54
|
+
# | 400 | INSTALLMENT_PAYMENT_TYPE_NOT_ALLOWED_FOR_PLAN | The payment method
|
|
55
|
+
# is not allowed for this installment plan. |
|
|
56
|
+
# | 400 | INSTALLMENT_INVALID_CYCLES_COUNT | The number of installment
|
|
57
|
+
# cycles is unavailable. |
|
|
58
|
+
# | 400 | INSTALLMENT_INVALID_PLAN | Unsupported installment plan. |
|
|
59
|
+
# | 400 | INVALID_PLATFORM | Invalid platform specified. |
|
|
60
|
+
# | 400 | INVALID_TOKEN_TYPE | Invalid transaction token type. |
|
|
61
|
+
# | 400 | INVALID_QR_SCAN_GATEWAY | The QR code scanning gateway is not
|
|
62
|
+
# configured or not active. |
|
|
63
|
+
# | 400 | LAST_NAME_REQUIRED | A space-separated last name is required for
|
|
64
|
+
# the cardholder. |
|
|
65
|
+
# | 400 | LIVE_MODE_NOT_ENABLED_WHEN_UNVERIFIED | Account review must be
|
|
66
|
+
# completed to use live mode. |
|
|
67
|
+
# | 400 | NO_DIRECT_CURRENCY_GATEWAY | No gateway available to process the
|
|
68
|
+
# payment without currency conversion. |
|
|
69
|
+
# | 400 | NO_GATEWAYS_AVAILABLE | No available gateways found. |
|
|
70
|
+
# | 400 | NO_TEST_CARD_IN_LIVE_MODE | Test cards cannot be used in live
|
|
71
|
+
# mode. |
|
|
72
|
+
# | 400 | NON_SUBSCRIPTION_PAYMENT | Please specify a one-time token or
|
|
73
|
+
# recurring token to create a charge. |
|
|
74
|
+
# | 400 | NOT_ONE_TIME_TOKEN | Only one-time tokens are supported. |
|
|
75
|
+
# | 400 | NOT_SUBSCRIPTION_TOKEN | Please specify a subscription or
|
|
76
|
+
# recurring token. |
|
|
77
|
+
# | 400 | PARTIAL_CAPTURE_NOT_SUPPORTED | Partial capture is not supported.
|
|
78
|
+
# |
|
|
79
|
+
# | 400 | PAYMENT_EXPIRATION_EXCEEDS_PERIOD | Payment expiration date
|
|
80
|
+
# exceeds the allowed cycle. |
|
|
81
|
+
# | 400 | PROCESSING_MODE_MISMATCH | Application token and transaction token
|
|
82
|
+
# modes do not match (e.g., live vs. test). |
|
|
83
|
+
# | 400 | QR_PROCESSING_DISABLED | QR processing is disabled for this
|
|
84
|
+
# payment method. |
|
|
85
|
+
# | 400 | RECURRING_TOKEN_DISABLED | Transaction token is disabled or the
|
|
86
|
+
# account lacks permission to use recurring tokens. |
|
|
87
|
+
# | 400 | RECURRING_USAGE_LIMIT_REQUIRED | The `usage_limit` parameter is
|
|
88
|
+
# required. |
|
|
89
|
+
# | 400 | RECURRING_USAGE_REQUIRES_CVV | CVV is required for recurring
|
|
90
|
+
# usage. |
|
|
91
|
+
# | 400 | REFUND_EXCEEDS_CHARGE_AMOUNT | The refund amount exceeds the
|
|
92
|
+
# charge amount. |
|
|
93
|
+
# | 400 | REFUND_NOT_ALLOWED | The payment method does not support refunds,
|
|
94
|
+
# or the refund was declined. |
|
|
95
|
+
# | 400 | REFUND_EXCEEDS_SALES | The refund amount exceeds the merchant's
|
|
96
|
+
# available balance limit. |
|
|
97
|
+
# | 400 | REFUND_NOT_WITHIN_BOUNDS | The combined partial refund amounts
|
|
98
|
+
# exceed the total charge amount. |
|
|
99
|
+
# | 400 | RESOURCE_LIMIT_REACHED | Resource limit reached. |
|
|
100
|
+
# | 400 | SUBSCRIPTION_ALREADY_ENDED | The subscription has already ended. |
|
|
101
|
+
# | 400 | TOKEN_FOR_WRONG_STORE | The transaction token's store differs from
|
|
102
|
+
# the subscription's store. |
|
|
103
|
+
# | 400 | TRANSACTION_ALREADY_PROCESSED | Used transaction tokens cannot be
|
|
104
|
+
# specified again. |
|
|
105
|
+
# | 400 | TRANSACTION_TOKEN_EXPIRED | The transaction token has expired. |
|
|
106
|
+
# | 400 | USAGE_LIMIT_NOT_APPLICABLE | `usage_limit` cannot be specified
|
|
107
|
+
# here. |
|
|
108
|
+
# | 400 | VALIDATION_ERROR | There is a validation error in the request
|
|
109
|
+
# parameters. Check `errors` for details. |
|
|
110
|
+
# | 400 | CHARGE_AMOUNT_TOO_HIGH | The charge amount exceeds the maximum
|
|
111
|
+
# allowed limit. |
|
|
112
|
+
# | 400 | NOT_SUPPORTED_BY_PROCESSOR | The gateway does not support this
|
|
113
|
+
# request. |
|
|
114
|
+
# | 401 | AUTH_HEADER_MISSING | The `Authorization` header is missing. |
|
|
115
|
+
# | 401 | EXPIRED_LOGIN_TOKEN | The login token has expired. |
|
|
116
|
+
# | 401 | INVALID_APP_TOKEN | The specified application token is invalid. |
|
|
117
|
+
# | 401 | INVALID_CREDENTIALS | Authentication credentials are invalid. |
|
|
118
|
+
# | 401 | INVALID_DOMAIN | The requested `Origin` domain is not registered
|
|
119
|
+
# for the specified application token. |
|
|
120
|
+
# | 401 | INVALID_LOGIN_TOKEN | The login token is invalid. |
|
|
121
|
+
# | 401 | DIRECT_CARD_TOKEN_CREATION_DISABLED | Cannot send raw card data
|
|
122
|
+
# due to lack of PCI DSS compliance. |
|
|
123
|
+
# | 403 | CARD_LOCKED | This card is temporarily locked due to exceeding the
|
|
124
|
+
# failure threshold within a certain period. |
|
|
125
|
+
# | 403 | INVALID_PERMISSIONS | The application token type is incorrect or
|
|
126
|
+
# the account lacks sufficient permissions. |
|
|
127
|
+
# | 403 | INSTALLMENT_PROCESSOR_INITIAL_AMOUNTS_NOT_SUPPORTED | Initial
|
|
128
|
+
# installment amount specification is not supported by this gateway. |
|
|
129
|
+
# | 403 | OUTDATED_APP_TOKEN | Application token version is outdated. Please
|
|
130
|
+
# create a new one. |
|
|
131
|
+
# | 403 | TEST_CARD_CANNOT_BE_BANNED | Test cards cannot be banned. |
|
|
132
|
+
# | 403 | INSTALLMENTS_NOT_ENABLED | Installment payments are not enabled. |
|
|
133
|
+
# | 409 | IDEMPOTENCY_KEY_CONFLICT | The specified idempotency key has been
|
|
134
|
+
# used previously for a different request. |
|
|
135
|
+
# | 409 | NON_UNIQUE_ACTIVE_TOKEN | An active transaction token already
|
|
136
|
+
# exists. |
|
|
137
|
+
# | 409 | WEBHOOK_URL_EXISTS | The specified Webhook URL is already
|
|
138
|
+
# registered. |
|
|
139
|
+
# | 500 | COULD_NOT_REFRESH_AUTH | Failed to refresh the login token. |
|
|
140
|
+
# | 500 | DB_ERROR | Internal database error. |
|
|
141
|
+
# | 500 | FILE_UPLOAD_ERROR | File upload failed. |
|
|
142
|
+
# | 500 | IMPROPER_AUTH | Authorization state is improper. |
|
|
143
|
+
# | 500 | TIMEOUT | A timeout occurred during internal processing. |
|
|
144
|
+
# | 500 | UNABLE_TO_GET_IDEMPOTENT_RESULT | Cache found for idempotency key,
|
|
145
|
+
# but failed to retrieve the previous processing result. |
|
|
146
|
+
# | 500 | UNKNOWN_ERROR | An unexpected error occurred. |
|
|
147
|
+
# | 503 | SERVICE_UNAVAILABLE_TRY_AGAIN | Service is temporarily
|
|
148
|
+
# unavailable. Please try again later. |
|
|
149
|
+
# | 504 | NO_GATEWAY_AVAILABLE_TO_PROCESS_THE_REQUEST | This request is not
|
|
150
|
+
# supported by the connected gateway system. |
|
|
151
|
+
# @return [String]
|
|
152
|
+
attr_accessor :code
|
|
153
|
+
|
|
154
|
+
# List of detailed API errors.
|
|
155
|
+
# @return [Array[ApiErrorDetail]]
|
|
156
|
+
attr_accessor :errors
|
|
157
|
+
|
|
158
|
+
# The constructor.
|
|
159
|
+
# @param [String] reason The reason for raising an exception.
|
|
160
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
161
|
+
def initialize(reason, response)
|
|
162
|
+
super(reason, response)
|
|
163
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
164
|
+
unbox(hash)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Populates this object by extracting properties from a hash.
|
|
168
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
169
|
+
# response body.
|
|
170
|
+
def unbox(hash)
|
|
171
|
+
return nil unless hash
|
|
172
|
+
|
|
173
|
+
@code = hash.key?('code') ? hash['code'] : nil
|
|
174
|
+
# Parameter is an array, so we need to iterate through it
|
|
175
|
+
@errors = nil
|
|
176
|
+
unless hash['errors'].nil?
|
|
177
|
+
@errors = []
|
|
178
|
+
hash['errors'].each do |structure|
|
|
179
|
+
@errors << (ApiErrorDetail.from_hash(structure) if structure)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
@errors = SKIP unless hash.key?('errors')
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Provides a human-readable string representation of the object.
|
|
187
|
+
def to_s
|
|
188
|
+
class_name = self.class.name.split('::').last
|
|
189
|
+
"<#{class_name} status: #{@status}, code: #{@code}, errors: #{@errors}>"
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
193
|
+
def inspect
|
|
194
|
+
class_name = self.class.name.split('::').last
|
|
195
|
+
"<#{class_name} status: #{@status.inspect}, code: #{@code.inspect}, errors:"\
|
|
196
|
+
" #{@errors.inspect}>"
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
# Class for exceptions when there is a network error, status code error, etc.
|
|
8
|
+
class APIException < CoreLibrary::ApiException
|
|
9
|
+
# Provides a human-readable string representation of the object.
|
|
10
|
+
def to_s
|
|
11
|
+
class_name = self.class.name.split('::').last
|
|
12
|
+
"<#{class_name} status_code: #{@response_code}, reason: #{@reason}>"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
16
|
+
def inspect
|
|
17
|
+
class_name = self.class.name.split('::').last
|
|
18
|
+
"<#{class_name} status_code: #{@response_code.inspect}, reason: #{@reason.inspect}>"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
# Http response received.
|
|
8
|
+
class ApiResponse < CoreLibrary::ApiResponse
|
|
9
|
+
# The constructor
|
|
10
|
+
# @param [HttpResponse] http_response The original, raw response from the api.
|
|
11
|
+
# @param [Object] data The data field specified for the response.
|
|
12
|
+
# @param [Array<String>] errors Any errors returned by the server.
|
|
13
|
+
def initialize(http_response,
|
|
14
|
+
data: nil,
|
|
15
|
+
errors: nil)
|
|
16
|
+
super
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
# Utility class for OAuth 2 authorization and token management.
|
|
8
|
+
class Oauth2 < CoreLibrary::HeaderAuth
|
|
9
|
+
include CoreLibrary
|
|
10
|
+
# Display error message on occurrence of authentication failure.
|
|
11
|
+
# @returns [String] The oAuth error message.
|
|
12
|
+
def error_message
|
|
13
|
+
'BearerAuth: access_token is undefined.'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Initialization constructor.
|
|
17
|
+
def initialize(bearer_auth_credentials)
|
|
18
|
+
auth_params = {}
|
|
19
|
+
@_access_token = bearer_auth_credentials.access_token unless
|
|
20
|
+
bearer_auth_credentials.nil? || bearer_auth_credentials.access_token.nil?
|
|
21
|
+
auth_params[:Authorization] = "Bearer #{@_access_token}" unless @_access_token.nil?
|
|
22
|
+
|
|
23
|
+
super auth_params
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Data class for BearerAuthCredentials.
|
|
28
|
+
class BearerAuthCredentials
|
|
29
|
+
attr_reader :access_token
|
|
30
|
+
|
|
31
|
+
def initialize(access_token:)
|
|
32
|
+
raise ArgumentError, 'access_token cannot be nil' if access_token.nil?
|
|
33
|
+
|
|
34
|
+
@access_token = access_token
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def self.from_env
|
|
38
|
+
access_token = ENV['ACCESS_TOKEN']
|
|
39
|
+
all_nil = [
|
|
40
|
+
access_token
|
|
41
|
+
].all?(&:nil?)
|
|
42
|
+
return nil if all_nil
|
|
43
|
+
|
|
44
|
+
new(access_token: access_token)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def clone_with(access_token: nil)
|
|
48
|
+
access_token ||= self.access_token
|
|
49
|
+
|
|
50
|
+
BearerAuthCredentials.new(access_token: access_token)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
# HttpCallBack allows defining callables for pre and post API calls.
|
|
8
|
+
class HttpCallBack < CoreLibrary::HttpCallback
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
##
|
|
8
|
+
# ProxySettings encapsulates HTTP proxy configuration for Faraday,
|
|
9
|
+
# including optional basic authentication.
|
|
10
|
+
#
|
|
11
|
+
class ProxySettings < CoreLibrary::ProxySettings
|
|
12
|
+
def self.from_env
|
|
13
|
+
address = ENV['PROXY_ADDRESS']
|
|
14
|
+
port = ENV['PROXY_PORT']
|
|
15
|
+
username = ENV['PROXY_USERNAME']
|
|
16
|
+
password = ENV['PROXY_PASSWORD']
|
|
17
|
+
return nil if address.nil? || address.strip.empty?
|
|
18
|
+
|
|
19
|
+
new(address: address, port: port, username: username, password: password)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|