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,127 @@
|
|
|
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
|
+
# Error payload returned when customs declaration processing fails.
|
|
8
|
+
class CustomsDeclarationWebhookError < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Backend customs declaration error code.
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :code
|
|
15
|
+
|
|
16
|
+
# Human-readable backend error name.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :message
|
|
19
|
+
|
|
20
|
+
# Optional backend-provided detail string.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :details
|
|
23
|
+
|
|
24
|
+
# Additional nested error records returned by the backend.
|
|
25
|
+
# @return [Array[CustomsDeclarationWebhookOtherError]]
|
|
26
|
+
attr_accessor :others
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['code'] = 'code'
|
|
32
|
+
@_hash['message'] = 'message'
|
|
33
|
+
@_hash['details'] = 'details'
|
|
34
|
+
@_hash['others'] = 'others'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
%w[
|
|
41
|
+
code
|
|
42
|
+
message
|
|
43
|
+
details
|
|
44
|
+
others
|
|
45
|
+
]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for nullable fields
|
|
49
|
+
def self.nullables
|
|
50
|
+
%w[
|
|
51
|
+
details
|
|
52
|
+
others
|
|
53
|
+
]
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def initialize(code: SKIP, message: SKIP, details: SKIP, others: SKIP,
|
|
57
|
+
additional_properties: nil)
|
|
58
|
+
# Add additional model properties to the instance
|
|
59
|
+
additional_properties = {} if additional_properties.nil?
|
|
60
|
+
|
|
61
|
+
@code = code unless code == SKIP
|
|
62
|
+
@message = message unless message == SKIP
|
|
63
|
+
@details = details unless details == SKIP
|
|
64
|
+
@others = others unless others == SKIP
|
|
65
|
+
@additional_properties = additional_properties
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Creates an instance of the object from a hash.
|
|
69
|
+
def self.from_hash(hash)
|
|
70
|
+
return nil unless hash
|
|
71
|
+
|
|
72
|
+
# Extract variables from the hash.
|
|
73
|
+
code = hash.key?('code') ? hash['code'] : SKIP
|
|
74
|
+
message = hash.key?('message') ? hash['message'] : SKIP
|
|
75
|
+
details = hash.key?('details') ? hash['details'] : SKIP
|
|
76
|
+
# Parameter is an array, so we need to iterate through it
|
|
77
|
+
others = nil
|
|
78
|
+
unless hash['others'].nil?
|
|
79
|
+
others = []
|
|
80
|
+
hash['others'].each do |structure|
|
|
81
|
+
others << (CustomsDeclarationWebhookOtherError.from_hash(structure) if structure)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
others = SKIP unless hash.key?('others')
|
|
86
|
+
|
|
87
|
+
# Create a new hash for additional properties, removing known properties.
|
|
88
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
89
|
+
|
|
90
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
91
|
+
new_hash, proc { |value| value }
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
# Create object from extracted values.
|
|
95
|
+
CustomsDeclarationWebhookError.new(code: code,
|
|
96
|
+
message: message,
|
|
97
|
+
details: details,
|
|
98
|
+
others: others,
|
|
99
|
+
additional_properties: additional_properties)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Validates an instance of the object from a given value.
|
|
103
|
+
# @param [CustomsDeclarationWebhookError | Hash] The value against the validation is performed.
|
|
104
|
+
def self.validate(value)
|
|
105
|
+
return true if value.instance_of? self
|
|
106
|
+
|
|
107
|
+
return false unless value.instance_of? Hash
|
|
108
|
+
|
|
109
|
+
true
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Provides a human-readable string representation of the object.
|
|
113
|
+
def to_s
|
|
114
|
+
class_name = self.class.name.split('::').last
|
|
115
|
+
"<#{class_name} code: #{@code}, message: #{@message}, details: #{@details}, others:"\
|
|
116
|
+
" #{@others}, additional_properties: #{@additional_properties}>"
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
120
|
+
def inspect
|
|
121
|
+
class_name = self.class.name.split('::').last
|
|
122
|
+
"<#{class_name} code: #{@code.inspect}, message: #{@message.inspect}, details:"\
|
|
123
|
+
" #{@details.inspect}, others: #{@others.inspect}, additional_properties:"\
|
|
124
|
+
" #{@additional_properties}>"
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
# Nested customs-processing error entry returned in `others`.
|
|
8
|
+
class CustomsDeclarationWebhookOtherError < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Backend other-error type.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :type
|
|
15
|
+
|
|
16
|
+
# Gateway credentials involved in the error when applicable.
|
|
17
|
+
# @return [UUID | String]
|
|
18
|
+
attr_accessor :credentials_id
|
|
19
|
+
|
|
20
|
+
# Additional reason values for `not_selected_reasons`.
|
|
21
|
+
# @return [Array[String]]
|
|
22
|
+
attr_accessor :message
|
|
23
|
+
|
|
24
|
+
# Related item name for `related_item`.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :item_name
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['type'] = 'type'
|
|
32
|
+
@_hash['credentials_id'] = 'credentials_id'
|
|
33
|
+
@_hash['message'] = 'message'
|
|
34
|
+
@_hash['item_name'] = 'item_name'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
%w[
|
|
41
|
+
type
|
|
42
|
+
credentials_id
|
|
43
|
+
message
|
|
44
|
+
item_name
|
|
45
|
+
]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for nullable fields
|
|
49
|
+
def self.nullables
|
|
50
|
+
%w[
|
|
51
|
+
credentials_id
|
|
52
|
+
message
|
|
53
|
+
item_name
|
|
54
|
+
]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def initialize(type: SKIP, credentials_id: SKIP, message: SKIP,
|
|
58
|
+
item_name: SKIP, additional_properties: nil)
|
|
59
|
+
# Add additional model properties to the instance
|
|
60
|
+
additional_properties = {} if additional_properties.nil?
|
|
61
|
+
|
|
62
|
+
@type = type unless type == SKIP
|
|
63
|
+
@credentials_id = credentials_id unless credentials_id == SKIP
|
|
64
|
+
@message = message unless message == SKIP
|
|
65
|
+
@item_name = item_name unless item_name == SKIP
|
|
66
|
+
@additional_properties = additional_properties
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Creates an instance of the object from a hash.
|
|
70
|
+
def self.from_hash(hash)
|
|
71
|
+
return nil unless hash
|
|
72
|
+
|
|
73
|
+
# Extract variables from the hash.
|
|
74
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
75
|
+
credentials_id =
|
|
76
|
+
hash.key?('credentials_id') ? hash['credentials_id'] : SKIP
|
|
77
|
+
message = hash.key?('message') ? hash['message'] : SKIP
|
|
78
|
+
item_name = hash.key?('item_name') ? hash['item_name'] : SKIP
|
|
79
|
+
|
|
80
|
+
# Create a new hash for additional properties, removing known properties.
|
|
81
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
82
|
+
|
|
83
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
84
|
+
new_hash, proc { |value| value }
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Create object from extracted values.
|
|
88
|
+
CustomsDeclarationWebhookOtherError.new(type: type,
|
|
89
|
+
credentials_id: credentials_id,
|
|
90
|
+
message: message,
|
|
91
|
+
item_name: item_name,
|
|
92
|
+
additional_properties: additional_properties)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Validates an instance of the object from a given value.
|
|
96
|
+
# @param [CustomsDeclarationWebhookOtherError | Hash] The value against the validation is performed.
|
|
97
|
+
def self.validate(value)
|
|
98
|
+
return true if value.instance_of? self
|
|
99
|
+
|
|
100
|
+
return false unless value.instance_of? Hash
|
|
101
|
+
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Provides a human-readable string representation of the object.
|
|
106
|
+
def to_s
|
|
107
|
+
class_name = self.class.name.split('::').last
|
|
108
|
+
"<#{class_name} type: #{@type}, credentials_id: #{@credentials_id}, message: #{@message},"\
|
|
109
|
+
" item_name: #{@item_name}, additional_properties: #{@additional_properties}>"
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
113
|
+
def inspect
|
|
114
|
+
class_name = self.class.name.split('::').last
|
|
115
|
+
"<#{class_name} type: #{@type.inspect}, credentials_id: #{@credentials_id.inspect},"\
|
|
116
|
+
" message: #{@message.inspect}, item_name: #{@item_name.inspect}, additional_properties:"\
|
|
117
|
+
" #{@additional_properties}>"
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
@@ -0,0 +1,125 @@
|
|
|
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
|
+
# Result payload returned by the customs declaration formatter.
|
|
8
|
+
class CustomsDeclarationWebhookResult < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Customs authority that approved the declaration.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :approving_authority
|
|
15
|
+
|
|
16
|
+
# Gateway trade identifier.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :trade_id
|
|
19
|
+
|
|
20
|
+
# Gateway transaction identifier for customs.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :transaction_id
|
|
23
|
+
|
|
24
|
+
# Gateway charge transaction identifier linked to the declaration.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :charge_transaction_id
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['approving_authority'] = 'approving_authority'
|
|
32
|
+
@_hash['trade_id'] = 'trade_id'
|
|
33
|
+
@_hash['transaction_id'] = 'transaction_id'
|
|
34
|
+
@_hash['charge_transaction_id'] = 'charge_transaction_id'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
%w[
|
|
41
|
+
approving_authority
|
|
42
|
+
trade_id
|
|
43
|
+
transaction_id
|
|
44
|
+
charge_transaction_id
|
|
45
|
+
]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for nullable fields
|
|
49
|
+
def self.nullables
|
|
50
|
+
%w[
|
|
51
|
+
approving_authority
|
|
52
|
+
trade_id
|
|
53
|
+
transaction_id
|
|
54
|
+
charge_transaction_id
|
|
55
|
+
]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def initialize(approving_authority: SKIP, trade_id: SKIP,
|
|
59
|
+
transaction_id: SKIP, charge_transaction_id: SKIP,
|
|
60
|
+
additional_properties: nil)
|
|
61
|
+
# Add additional model properties to the instance
|
|
62
|
+
additional_properties = {} if additional_properties.nil?
|
|
63
|
+
|
|
64
|
+
@approving_authority = approving_authority unless approving_authority == SKIP
|
|
65
|
+
@trade_id = trade_id unless trade_id == SKIP
|
|
66
|
+
@transaction_id = transaction_id unless transaction_id == SKIP
|
|
67
|
+
@charge_transaction_id = charge_transaction_id unless charge_transaction_id == SKIP
|
|
68
|
+
@additional_properties = additional_properties
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Creates an instance of the object from a hash.
|
|
72
|
+
def self.from_hash(hash)
|
|
73
|
+
return nil unless hash
|
|
74
|
+
|
|
75
|
+
# Extract variables from the hash.
|
|
76
|
+
approving_authority =
|
|
77
|
+
hash.key?('approving_authority') ? hash['approving_authority'] : SKIP
|
|
78
|
+
trade_id = hash.key?('trade_id') ? hash['trade_id'] : SKIP
|
|
79
|
+
transaction_id =
|
|
80
|
+
hash.key?('transaction_id') ? hash['transaction_id'] : SKIP
|
|
81
|
+
charge_transaction_id =
|
|
82
|
+
hash.key?('charge_transaction_id') ? hash['charge_transaction_id'] : SKIP
|
|
83
|
+
|
|
84
|
+
# Create a new hash for additional properties, removing known properties.
|
|
85
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
86
|
+
|
|
87
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
88
|
+
new_hash, proc { |value| value }
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
# Create object from extracted values.
|
|
92
|
+
CustomsDeclarationWebhookResult.new(approving_authority: approving_authority,
|
|
93
|
+
trade_id: trade_id,
|
|
94
|
+
transaction_id: transaction_id,
|
|
95
|
+
charge_transaction_id: charge_transaction_id,
|
|
96
|
+
additional_properties: additional_properties)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Validates an instance of the object from a given value.
|
|
100
|
+
# @param [CustomsDeclarationWebhookResult | Hash] The value against the validation is performed.
|
|
101
|
+
def self.validate(value)
|
|
102
|
+
return true if value.instance_of? self
|
|
103
|
+
|
|
104
|
+
return false unless value.instance_of? Hash
|
|
105
|
+
|
|
106
|
+
true
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Provides a human-readable string representation of the object.
|
|
110
|
+
def to_s
|
|
111
|
+
class_name = self.class.name.split('::').last
|
|
112
|
+
"<#{class_name} approving_authority: #{@approving_authority}, trade_id: #{@trade_id},"\
|
|
113
|
+
" transaction_id: #{@transaction_id}, charge_transaction_id: #{@charge_transaction_id},"\
|
|
114
|
+
" additional_properties: #{@additional_properties}>"
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
118
|
+
def inspect
|
|
119
|
+
class_name = self.class.name.split('::').last
|
|
120
|
+
"<#{class_name} approving_authority: #{@approving_authority.inspect}, trade_id:"\
|
|
121
|
+
" #{@trade_id.inspect}, transaction_id: #{@transaction_id.inspect}, charge_transaction_id:"\
|
|
122
|
+
" #{@charge_transaction_id.inspect}, additional_properties: #{@additional_properties}>"
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
# Customs declaration status returned by the backend.
|
|
8
|
+
class CustomsDeclarationWebhookStatus
|
|
9
|
+
CUSTOMS_DECLARATION_WEBHOOK_STATUS = [
|
|
10
|
+
# TODO: Write general description for PENDING
|
|
11
|
+
PENDING = 'pending'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SUCCESSFUL
|
|
14
|
+
SUCCESSFUL = 'successful'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for FAILED
|
|
17
|
+
FAILED = 'failed'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for ERROR
|
|
20
|
+
ERROR = 'error'.freeze
|
|
21
|
+
].freeze
|
|
22
|
+
|
|
23
|
+
def self.validate(value)
|
|
24
|
+
return false if value.nil?
|
|
25
|
+
|
|
26
|
+
CUSTOMS_DECLARATION_WEBHOOK_STATUS.include?(value)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = PENDING)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'pending' then PENDING
|
|
36
|
+
when 'successful' then SUCCESSFUL
|
|
37
|
+
when 'failed' then FAILED
|
|
38
|
+
when 'error' then ERROR
|
|
39
|
+
else
|
|
40
|
+
default_value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
# A free-form dictionary for custom metadata.
|
|
8
|
+
class GenericMetadata < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Example of a custom metadata key.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :order_id
|
|
15
|
+
|
|
16
|
+
# Consumer name passed to payment processors that require it (e.g., konbini,
|
|
17
|
+
# bank transfer).
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :univapay_name
|
|
20
|
+
|
|
21
|
+
# Consumer phone number passed to payment processors that require it.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :univapay_phone_number
|
|
24
|
+
|
|
25
|
+
# A mapping from model property names to API property names.
|
|
26
|
+
def self.names
|
|
27
|
+
@_hash = {} if @_hash.nil?
|
|
28
|
+
@_hash['order_id'] = 'order_id'
|
|
29
|
+
@_hash['univapay_name'] = 'univapay-name'
|
|
30
|
+
@_hash['univapay_phone_number'] = 'univapay-phone-number'
|
|
31
|
+
@_hash
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# An array for optional fields
|
|
35
|
+
def self.optionals
|
|
36
|
+
%w[
|
|
37
|
+
order_id
|
|
38
|
+
univapay_name
|
|
39
|
+
univapay_phone_number
|
|
40
|
+
]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for nullable fields
|
|
44
|
+
def self.nullables
|
|
45
|
+
[]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def initialize(order_id: SKIP, univapay_name: SKIP,
|
|
49
|
+
univapay_phone_number: SKIP, additional_properties: nil)
|
|
50
|
+
# Add additional model properties to the instance
|
|
51
|
+
additional_properties = {} if additional_properties.nil?
|
|
52
|
+
|
|
53
|
+
@order_id = order_id unless order_id == SKIP
|
|
54
|
+
@univapay_name = univapay_name unless univapay_name == SKIP
|
|
55
|
+
@univapay_phone_number = univapay_phone_number unless univapay_phone_number == SKIP
|
|
56
|
+
@additional_properties = additional_properties
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Creates an instance of the object from a hash.
|
|
60
|
+
def self.from_hash(hash)
|
|
61
|
+
return nil unless hash
|
|
62
|
+
|
|
63
|
+
# Extract variables from the hash.
|
|
64
|
+
order_id = hash.key?('order_id') ? hash['order_id'] : SKIP
|
|
65
|
+
univapay_name = hash.key?('univapay-name') ? hash['univapay-name'] : SKIP
|
|
66
|
+
univapay_phone_number =
|
|
67
|
+
hash.key?('univapay-phone-number') ? hash['univapay-phone-number'] : SKIP
|
|
68
|
+
|
|
69
|
+
# Create a new hash for additional properties, removing known properties.
|
|
70
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
71
|
+
|
|
72
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
73
|
+
new_hash, proc { |x|
|
|
74
|
+
APIHelper.deserialize_union_type(UnionTypeLookUp.get(:GenericMetadataValue), x)
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
# Create object from extracted values.
|
|
79
|
+
GenericMetadata.new(order_id: order_id,
|
|
80
|
+
univapay_name: univapay_name,
|
|
81
|
+
univapay_phone_number: univapay_phone_number,
|
|
82
|
+
additional_properties: additional_properties)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Validates an instance of the object from a given value.
|
|
86
|
+
# @param [GenericMetadata | Hash] The value against the validation is performed.
|
|
87
|
+
def self.validate(value)
|
|
88
|
+
return true if value.instance_of? self
|
|
89
|
+
|
|
90
|
+
return false unless value.instance_of? Hash
|
|
91
|
+
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Provides a human-readable string representation of the object.
|
|
96
|
+
def to_s
|
|
97
|
+
class_name = self.class.name.split('::').last
|
|
98
|
+
"<#{class_name} order_id: #{@order_id}, univapay_name: #{@univapay_name},"\
|
|
99
|
+
" univapay_phone_number: #{@univapay_phone_number}, additional_properties:"\
|
|
100
|
+
" #{@additional_properties}>"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
104
|
+
def inspect
|
|
105
|
+
class_name = self.class.name.split('::').last
|
|
106
|
+
"<#{class_name} order_id: #{@order_id.inspect}, univapay_name: #{@univapay_name.inspect},"\
|
|
107
|
+
" univapay_phone_number: #{@univapay_phone_number.inspect}, additional_properties:"\
|
|
108
|
+
" #{@additional_properties}>"
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
# Required if plan_type is fixed_cycles.
|
|
8
|
+
class InstallmentFixedCycles
|
|
9
|
+
INSTALLMENT_FIXED_CYCLES = [
|
|
10
|
+
# 3 cycles
|
|
11
|
+
CYCLES_3 = 3,
|
|
12
|
+
|
|
13
|
+
# 5 cycles
|
|
14
|
+
CYCLES_5 = 5,
|
|
15
|
+
|
|
16
|
+
# 6 cycles
|
|
17
|
+
CYCLES_6 = 6,
|
|
18
|
+
|
|
19
|
+
# 10 cycles
|
|
20
|
+
CYCLES_10 = 10,
|
|
21
|
+
|
|
22
|
+
# 12 cycles
|
|
23
|
+
CYCLES_12 = 12,
|
|
24
|
+
|
|
25
|
+
# 15 cycles
|
|
26
|
+
CYCLES_15 = 15,
|
|
27
|
+
|
|
28
|
+
# 18 cycles
|
|
29
|
+
CYCLES_18 = 18,
|
|
30
|
+
|
|
31
|
+
# 20 cycles
|
|
32
|
+
CYCLES_20 = 20,
|
|
33
|
+
|
|
34
|
+
# 24 cycles
|
|
35
|
+
CYCLES_24 = 24
|
|
36
|
+
].freeze
|
|
37
|
+
|
|
38
|
+
def self.validate(value)
|
|
39
|
+
return false if value.nil?
|
|
40
|
+
|
|
41
|
+
INSTALLMENT_FIXED_CYCLES.include?(value)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.from_value(value, default_value = CYCLES_3)
|
|
45
|
+
return default_value if value.nil?
|
|
46
|
+
|
|
47
|
+
str = value.to_s.strip
|
|
48
|
+
if str.match?(/\A\d+\z/)
|
|
49
|
+
num = str.to_i
|
|
50
|
+
return num if INSTALLMENT_FIXED_CYCLES.include?(num)
|
|
51
|
+
|
|
52
|
+
return default_value
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
case str.downcase
|
|
56
|
+
when 'cycles_3' then CYCLES_3
|
|
57
|
+
when 'cycles_5' then CYCLES_5
|
|
58
|
+
when 'cycles_6' then CYCLES_6
|
|
59
|
+
when 'cycles_10' then CYCLES_10
|
|
60
|
+
when 'cycles_12' then CYCLES_12
|
|
61
|
+
when 'cycles_15' then CYCLES_15
|
|
62
|
+
when 'cycles_18' then CYCLES_18
|
|
63
|
+
when 'cycles_20' then CYCLES_20
|
|
64
|
+
when 'cycles_24' then CYCLES_24
|
|
65
|
+
else
|
|
66
|
+
default_value
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
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 InstallmentPlanType
|
|
9
|
+
INSTALLMENT_PLAN_TYPE = [
|
|
10
|
+
# TODO: Write general description for REVOLVING
|
|
11
|
+
REVOLVING = 'revolving'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for FIXED_CYCLES
|
|
14
|
+
FIXED_CYCLES = 'fixed_cycles'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
INSTALLMENT_PLAN_TYPE.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = REVOLVING)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'revolving' then REVOLVING
|
|
30
|
+
when 'fixed_cycles' then FIXED_CYCLES
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|