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,142 @@
|
|
|
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
|
+
# Token Create Online Data schema.
|
|
8
|
+
class TokenCreateOnlineData < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Base Online Data Brand schema.
|
|
13
|
+
# @return [BaseOnlineDataBrand]
|
|
14
|
+
attr_accessor :brand
|
|
15
|
+
|
|
16
|
+
# Base Online Data Call Method schema.
|
|
17
|
+
# @return [BaseOnlineDataCallMethod]
|
|
18
|
+
attr_accessor :call_method
|
|
19
|
+
|
|
20
|
+
# Base Online Data Os Type schema.
|
|
21
|
+
# @return [BaseOnlineDataOsType]
|
|
22
|
+
attr_accessor :os_type
|
|
23
|
+
|
|
24
|
+
# Consumer specific identifier required by some gateways for fraud
|
|
25
|
+
# prevention.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :user_identifier
|
|
28
|
+
|
|
29
|
+
# The source of the user identifier
|
|
30
|
+
# @return [BaseOnlineDataUserIdentifierSource]
|
|
31
|
+
attr_accessor :user_identifier_source
|
|
32
|
+
|
|
33
|
+
# A mapping from model property names to API property names.
|
|
34
|
+
def self.names
|
|
35
|
+
@_hash = {} if @_hash.nil?
|
|
36
|
+
@_hash['brand'] = 'brand'
|
|
37
|
+
@_hash['call_method'] = 'call_method'
|
|
38
|
+
@_hash['os_type'] = 'os_type'
|
|
39
|
+
@_hash['user_identifier'] = 'user_identifier'
|
|
40
|
+
@_hash['user_identifier_source'] = 'user_identifier_source'
|
|
41
|
+
@_hash
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# An array for optional fields
|
|
45
|
+
def self.optionals
|
|
46
|
+
%w[
|
|
47
|
+
os_type
|
|
48
|
+
user_identifier
|
|
49
|
+
user_identifier_source
|
|
50
|
+
]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for nullable fields
|
|
54
|
+
def self.nullables
|
|
55
|
+
%w[
|
|
56
|
+
os_type
|
|
57
|
+
user_identifier
|
|
58
|
+
user_identifier_source
|
|
59
|
+
]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def initialize(brand:, call_method:, os_type: SKIP, user_identifier: SKIP,
|
|
63
|
+
user_identifier_source: SKIP, additional_properties: nil)
|
|
64
|
+
# Add additional model properties to the instance
|
|
65
|
+
additional_properties = {} if additional_properties.nil?
|
|
66
|
+
|
|
67
|
+
@brand = brand
|
|
68
|
+
@call_method = call_method
|
|
69
|
+
@os_type = os_type unless os_type == SKIP
|
|
70
|
+
@user_identifier = user_identifier unless user_identifier == SKIP
|
|
71
|
+
@user_identifier_source = user_identifier_source unless user_identifier_source == SKIP
|
|
72
|
+
@additional_properties = additional_properties
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Creates an instance of the object from a hash.
|
|
76
|
+
def self.from_hash(hash)
|
|
77
|
+
return nil unless hash
|
|
78
|
+
|
|
79
|
+
# Extract variables from the hash.
|
|
80
|
+
brand = hash.key?('brand') ? hash['brand'] : nil
|
|
81
|
+
call_method = hash.key?('call_method') ? hash['call_method'] : nil
|
|
82
|
+
os_type = hash.key?('os_type') ? hash['os_type'] : SKIP
|
|
83
|
+
user_identifier =
|
|
84
|
+
hash.key?('user_identifier') ? hash['user_identifier'] : SKIP
|
|
85
|
+
user_identifier_source =
|
|
86
|
+
hash.key?('user_identifier_source') ? hash['user_identifier_source'] : SKIP
|
|
87
|
+
|
|
88
|
+
# Create a new hash for additional properties, removing known properties.
|
|
89
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
90
|
+
|
|
91
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
92
|
+
new_hash, proc { |value| value }
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
# Create object from extracted values.
|
|
96
|
+
TokenCreateOnlineData.new(brand: brand,
|
|
97
|
+
call_method: call_method,
|
|
98
|
+
os_type: os_type,
|
|
99
|
+
user_identifier: user_identifier,
|
|
100
|
+
user_identifier_source: user_identifier_source,
|
|
101
|
+
additional_properties: additional_properties)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Validates an instance of the object from a given value.
|
|
105
|
+
# @param [TokenCreateOnlineData | Hash] The value against the validation is performed.
|
|
106
|
+
def self.validate(value)
|
|
107
|
+
if value.instance_of? self
|
|
108
|
+
return (
|
|
109
|
+
APIHelper.valid_type?(value.brand,
|
|
110
|
+
->(val) { BaseOnlineDataBrand.validate(val) }) and
|
|
111
|
+
APIHelper.valid_type?(value.call_method,
|
|
112
|
+
->(val) { BaseOnlineDataCallMethod.validate(val) })
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
return false unless value.instance_of? Hash
|
|
117
|
+
|
|
118
|
+
(
|
|
119
|
+
APIHelper.valid_type?(value['brand'],
|
|
120
|
+
->(val) { BaseOnlineDataBrand.validate(val) }) and
|
|
121
|
+
APIHelper.valid_type?(value['call_method'],
|
|
122
|
+
->(val) { BaseOnlineDataCallMethod.validate(val) })
|
|
123
|
+
)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Provides a human-readable string representation of the object.
|
|
127
|
+
def to_s
|
|
128
|
+
class_name = self.class.name.split('::').last
|
|
129
|
+
"<#{class_name} brand: #{@brand}, call_method: #{@call_method}, os_type: #{@os_type},"\
|
|
130
|
+
" user_identifier: #{@user_identifier}, user_identifier_source: #{@user_identifier_source},"\
|
|
131
|
+
" additional_properties: #{@additional_properties}>"
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
135
|
+
def inspect
|
|
136
|
+
class_name = self.class.name.split('::').last
|
|
137
|
+
"<#{class_name} brand: #{@brand.inspect}, call_method: #{@call_method.inspect}, os_type:"\
|
|
138
|
+
" #{@os_type.inspect}, user_identifier: #{@user_identifier.inspect}, user_identifier_source:"\
|
|
139
|
+
" #{@user_identifier_source.inspect}, additional_properties: #{@additional_properties}>"
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
# Token Create Phone Number schema.
|
|
8
|
+
class TokenCreatePhoneNumber < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Country code as string (e.g., '1' or '81').
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :country_code
|
|
15
|
+
|
|
16
|
+
# Local phone number.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :local_number
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['country_code'] = 'country_code'
|
|
24
|
+
@_hash['local_number'] = 'local_number'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for nullable fields
|
|
34
|
+
def self.nullables
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def initialize(country_code:, local_number:, additional_properties: nil)
|
|
39
|
+
# Add additional model properties to the instance
|
|
40
|
+
additional_properties = {} if additional_properties.nil?
|
|
41
|
+
|
|
42
|
+
@country_code = country_code
|
|
43
|
+
@local_number = local_number
|
|
44
|
+
@additional_properties = additional_properties
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Creates an instance of the object from a hash.
|
|
48
|
+
def self.from_hash(hash)
|
|
49
|
+
return nil unless hash
|
|
50
|
+
|
|
51
|
+
# Extract variables from the hash.
|
|
52
|
+
country_code = hash.key?('country_code') ? hash['country_code'] : nil
|
|
53
|
+
local_number = hash.key?('local_number') ? hash['local_number'] : nil
|
|
54
|
+
|
|
55
|
+
# Create a new hash for additional properties, removing known properties.
|
|
56
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
57
|
+
|
|
58
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
59
|
+
new_hash, proc { |value| value }
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# Create object from extracted values.
|
|
63
|
+
TokenCreatePhoneNumber.new(country_code: country_code,
|
|
64
|
+
local_number: local_number,
|
|
65
|
+
additional_properties: additional_properties)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Validates an instance of the object from a given value.
|
|
69
|
+
# @param [TokenCreatePhoneNumber | Hash] The value against the validation is performed.
|
|
70
|
+
def self.validate(value)
|
|
71
|
+
if value.instance_of? self
|
|
72
|
+
return (
|
|
73
|
+
APIHelper.valid_type?(value.country_code,
|
|
74
|
+
->(val) { val.instance_of? String }) and
|
|
75
|
+
APIHelper.valid_type?(value.local_number,
|
|
76
|
+
->(val) { val.instance_of? String })
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
return false unless value.instance_of? Hash
|
|
81
|
+
|
|
82
|
+
(
|
|
83
|
+
APIHelper.valid_type?(value['country_code'],
|
|
84
|
+
->(val) { val.instance_of? String }) and
|
|
85
|
+
APIHelper.valid_type?(value['local_number'],
|
|
86
|
+
->(val) { val.instance_of? String })
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Provides a human-readable string representation of the object.
|
|
91
|
+
def to_s
|
|
92
|
+
class_name = self.class.name.split('::').last
|
|
93
|
+
"<#{class_name} country_code: #{@country_code}, local_number: #{@local_number},"\
|
|
94
|
+
" additional_properties: #{@additional_properties}>"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
98
|
+
def inspect
|
|
99
|
+
class_name = self.class.name.split('::').last
|
|
100
|
+
"<#{class_name} country_code: #{@country_code.inspect}, local_number:"\
|
|
101
|
+
" #{@local_number.inspect}, additional_properties: #{@additional_properties}>"
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module UnivapayClientSdk
|
|
8
|
+
# Webhook envelope for the token_created event.
|
|
9
|
+
class TokenCreatedWebhookCallback < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Unique ID of this webhook delivery.
|
|
14
|
+
# @return [UUID | String]
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# Event type discriminator — always `token_created` for this callback.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_reader :event
|
|
20
|
+
|
|
21
|
+
# Stored transaction token resource.
|
|
22
|
+
# @return [TransactionToken]
|
|
23
|
+
attr_accessor :data
|
|
24
|
+
|
|
25
|
+
# Timestamp when the event was fired.
|
|
26
|
+
# @return [DateTime]
|
|
27
|
+
attr_accessor :created_on
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['id'] = 'id'
|
|
33
|
+
@_hash['event'] = 'event'
|
|
34
|
+
@_hash['data'] = 'data'
|
|
35
|
+
@_hash['created_on'] = 'created_on'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
data
|
|
43
|
+
]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# An array for nullable fields
|
|
47
|
+
def self.nullables
|
|
48
|
+
[]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def initialize(id:, created_on:, data: SKIP, additional_properties: nil)
|
|
52
|
+
# Add additional model properties to the instance
|
|
53
|
+
additional_properties = {} if additional_properties.nil?
|
|
54
|
+
|
|
55
|
+
@id = id
|
|
56
|
+
@event = 'token_created'
|
|
57
|
+
@data = data unless data == SKIP
|
|
58
|
+
@created_on = created_on
|
|
59
|
+
@additional_properties = additional_properties
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Creates an instance of the object from a hash.
|
|
63
|
+
def self.from_hash(hash)
|
|
64
|
+
return nil unless hash
|
|
65
|
+
|
|
66
|
+
# Extract variables from the hash.
|
|
67
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
68
|
+
created_on = if hash.key?('created_on')
|
|
69
|
+
(DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_on'])
|
|
70
|
+
end
|
|
71
|
+
data = TransactionToken.from_hash(hash['data']) if hash['data']
|
|
72
|
+
|
|
73
|
+
# Create a new hash for additional properties, removing known properties.
|
|
74
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
75
|
+
|
|
76
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
77
|
+
new_hash, proc { |value| value }
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
# Create object from extracted values.
|
|
81
|
+
TokenCreatedWebhookCallback.new(id: id,
|
|
82
|
+
created_on: created_on,
|
|
83
|
+
data: data,
|
|
84
|
+
additional_properties: additional_properties)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def to_custom_created_on
|
|
88
|
+
DateTimeHelper.to_rfc3339(created_on)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Validates an instance of the object from a given value.
|
|
92
|
+
# @param [TokenCreatedWebhookCallback | Hash] The value against the validation is performed.
|
|
93
|
+
def self.validate(value)
|
|
94
|
+
if value.instance_of? self
|
|
95
|
+
return (
|
|
96
|
+
APIHelper.valid_type?(value.id,
|
|
97
|
+
->(val) { val.instance_of? String }) and
|
|
98
|
+
APIHelper.valid_type?(value.event,
|
|
99
|
+
->(val) { val.instance_of? String }) and
|
|
100
|
+
APIHelper.valid_type?(value.created_on,
|
|
101
|
+
->(val) { val.instance_of? DateTime })
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
return false unless value.instance_of? Hash
|
|
106
|
+
|
|
107
|
+
(
|
|
108
|
+
APIHelper.valid_type?(value['id'],
|
|
109
|
+
->(val) { val.instance_of? String }) and
|
|
110
|
+
APIHelper.valid_type?(value['event'],
|
|
111
|
+
->(val) { val.instance_of? String }) and
|
|
112
|
+
APIHelper.valid_type?(value['created_on'],
|
|
113
|
+
->(val) { val.instance_of? String })
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Provides a human-readable string representation of the object.
|
|
118
|
+
def to_s
|
|
119
|
+
class_name = self.class.name.split('::').last
|
|
120
|
+
"<#{class_name} id: #{@id}, event: #{@event}, data: #{@data}, created_on: #{@created_on},"\
|
|
121
|
+
" additional_properties: #{@additional_properties}>"
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
125
|
+
def inspect
|
|
126
|
+
class_name = self.class.name.split('::').last
|
|
127
|
+
"<#{class_name} id: #{@id.inspect}, event: #{@event.inspect}, data: #{@data.inspect},"\
|
|
128
|
+
" created_on: #{@created_on.inspect}, additional_properties: #{@additional_properties}>"
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module UnivapayClientSdk
|
|
8
|
+
# Webhook envelope for the token_cvv_auth_check_updated event.
|
|
9
|
+
class TokenCvvAuthCheckUpdatedWebhookCallback < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Unique ID of this webhook delivery.
|
|
14
|
+
# @return [UUID | String]
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# Event type discriminator — always `token_cvv_auth_check_updated` for this
|
|
18
|
+
# callback.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_reader :event
|
|
21
|
+
|
|
22
|
+
# Stored transaction token resource.
|
|
23
|
+
# @return [TransactionToken]
|
|
24
|
+
attr_accessor :data
|
|
25
|
+
|
|
26
|
+
# Timestamp when the event was fired.
|
|
27
|
+
# @return [DateTime]
|
|
28
|
+
attr_accessor :created_on
|
|
29
|
+
|
|
30
|
+
# A mapping from model property names to API property names.
|
|
31
|
+
def self.names
|
|
32
|
+
@_hash = {} if @_hash.nil?
|
|
33
|
+
@_hash['id'] = 'id'
|
|
34
|
+
@_hash['event'] = 'event'
|
|
35
|
+
@_hash['data'] = 'data'
|
|
36
|
+
@_hash['created_on'] = 'created_on'
|
|
37
|
+
@_hash
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# An array for optional fields
|
|
41
|
+
def self.optionals
|
|
42
|
+
%w[
|
|
43
|
+
data
|
|
44
|
+
]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for nullable fields
|
|
48
|
+
def self.nullables
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(id:, created_on:, data: SKIP, additional_properties: nil)
|
|
53
|
+
# Add additional model properties to the instance
|
|
54
|
+
additional_properties = {} if additional_properties.nil?
|
|
55
|
+
|
|
56
|
+
@id = id
|
|
57
|
+
@event = 'token_cvv_auth_check_updated'
|
|
58
|
+
@data = data unless data == SKIP
|
|
59
|
+
@created_on = created_on
|
|
60
|
+
@additional_properties = additional_properties
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Creates an instance of the object from a hash.
|
|
64
|
+
def self.from_hash(hash)
|
|
65
|
+
return nil unless hash
|
|
66
|
+
|
|
67
|
+
# Extract variables from the hash.
|
|
68
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
69
|
+
created_on = if hash.key?('created_on')
|
|
70
|
+
(DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_on'])
|
|
71
|
+
end
|
|
72
|
+
data = TransactionToken.from_hash(hash['data']) if hash['data']
|
|
73
|
+
|
|
74
|
+
# Create a new hash for additional properties, removing known properties.
|
|
75
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
76
|
+
|
|
77
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
78
|
+
new_hash, proc { |value| value }
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
# Create object from extracted values.
|
|
82
|
+
TokenCvvAuthCheckUpdatedWebhookCallback.new(id: id,
|
|
83
|
+
created_on: created_on,
|
|
84
|
+
data: data,
|
|
85
|
+
additional_properties: additional_properties)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def to_custom_created_on
|
|
89
|
+
DateTimeHelper.to_rfc3339(created_on)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Validates an instance of the object from a given value.
|
|
93
|
+
# @param [TokenCvvAuthCheckUpdatedWebhookCallback | Hash] The value against the validation is performed.
|
|
94
|
+
def self.validate(value)
|
|
95
|
+
if value.instance_of? self
|
|
96
|
+
return (
|
|
97
|
+
APIHelper.valid_type?(value.id,
|
|
98
|
+
->(val) { val.instance_of? String }) and
|
|
99
|
+
APIHelper.valid_type?(value.event,
|
|
100
|
+
->(val) { val.instance_of? String }) and
|
|
101
|
+
APIHelper.valid_type?(value.created_on,
|
|
102
|
+
->(val) { val.instance_of? DateTime })
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
return false unless value.instance_of? Hash
|
|
107
|
+
|
|
108
|
+
(
|
|
109
|
+
APIHelper.valid_type?(value['id'],
|
|
110
|
+
->(val) { val.instance_of? String }) and
|
|
111
|
+
APIHelper.valid_type?(value['event'],
|
|
112
|
+
->(val) { val.instance_of? String }) and
|
|
113
|
+
APIHelper.valid_type?(value['created_on'],
|
|
114
|
+
->(val) { val.instance_of? String })
|
|
115
|
+
)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Provides a human-readable string representation of the object.
|
|
119
|
+
def to_s
|
|
120
|
+
class_name = self.class.name.split('::').last
|
|
121
|
+
"<#{class_name} id: #{@id}, event: #{@event}, data: #{@data}, created_on: #{@created_on},"\
|
|
122
|
+
" additional_properties: #{@additional_properties}>"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
126
|
+
def inspect
|
|
127
|
+
class_name = self.class.name.split('::').last
|
|
128
|
+
"<#{class_name} id: #{@id.inspect}, event: #{@event.inspect}, data: #{@data.inspect},"\
|
|
129
|
+
" created_on: #{@created_on.inspect}, additional_properties: #{@additional_properties}>"
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module UnivapayClientSdk
|
|
8
|
+
# Webhook envelope for the token_cvv_auth_updated event.
|
|
9
|
+
class TokenCvvAuthUpdatedWebhookCallback < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Unique ID of this webhook delivery.
|
|
14
|
+
# @return [UUID | String]
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# Event type discriminator — always `token_cvv_auth_updated` for this
|
|
18
|
+
# callback.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_reader :event
|
|
21
|
+
|
|
22
|
+
# Stored transaction token resource.
|
|
23
|
+
# @return [TransactionToken]
|
|
24
|
+
attr_accessor :data
|
|
25
|
+
|
|
26
|
+
# Timestamp when the event was fired.
|
|
27
|
+
# @return [DateTime]
|
|
28
|
+
attr_accessor :created_on
|
|
29
|
+
|
|
30
|
+
# A mapping from model property names to API property names.
|
|
31
|
+
def self.names
|
|
32
|
+
@_hash = {} if @_hash.nil?
|
|
33
|
+
@_hash['id'] = 'id'
|
|
34
|
+
@_hash['event'] = 'event'
|
|
35
|
+
@_hash['data'] = 'data'
|
|
36
|
+
@_hash['created_on'] = 'created_on'
|
|
37
|
+
@_hash
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# An array for optional fields
|
|
41
|
+
def self.optionals
|
|
42
|
+
%w[
|
|
43
|
+
data
|
|
44
|
+
]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for nullable fields
|
|
48
|
+
def self.nullables
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(id:, created_on:, data: SKIP, additional_properties: nil)
|
|
53
|
+
# Add additional model properties to the instance
|
|
54
|
+
additional_properties = {} if additional_properties.nil?
|
|
55
|
+
|
|
56
|
+
@id = id
|
|
57
|
+
@event = 'token_cvv_auth_updated'
|
|
58
|
+
@data = data unless data == SKIP
|
|
59
|
+
@created_on = created_on
|
|
60
|
+
@additional_properties = additional_properties
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Creates an instance of the object from a hash.
|
|
64
|
+
def self.from_hash(hash)
|
|
65
|
+
return nil unless hash
|
|
66
|
+
|
|
67
|
+
# Extract variables from the hash.
|
|
68
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
69
|
+
created_on = if hash.key?('created_on')
|
|
70
|
+
(DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_on'])
|
|
71
|
+
end
|
|
72
|
+
data = TransactionToken.from_hash(hash['data']) if hash['data']
|
|
73
|
+
|
|
74
|
+
# Create a new hash for additional properties, removing known properties.
|
|
75
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
76
|
+
|
|
77
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
78
|
+
new_hash, proc { |value| value }
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
# Create object from extracted values.
|
|
82
|
+
TokenCvvAuthUpdatedWebhookCallback.new(id: id,
|
|
83
|
+
created_on: created_on,
|
|
84
|
+
data: data,
|
|
85
|
+
additional_properties: additional_properties)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def to_custom_created_on
|
|
89
|
+
DateTimeHelper.to_rfc3339(created_on)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Validates an instance of the object from a given value.
|
|
93
|
+
# @param [TokenCvvAuthUpdatedWebhookCallback | Hash] The value against the validation is performed.
|
|
94
|
+
def self.validate(value)
|
|
95
|
+
if value.instance_of? self
|
|
96
|
+
return (
|
|
97
|
+
APIHelper.valid_type?(value.id,
|
|
98
|
+
->(val) { val.instance_of? String }) and
|
|
99
|
+
APIHelper.valid_type?(value.event,
|
|
100
|
+
->(val) { val.instance_of? String }) and
|
|
101
|
+
APIHelper.valid_type?(value.created_on,
|
|
102
|
+
->(val) { val.instance_of? DateTime })
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
return false unless value.instance_of? Hash
|
|
107
|
+
|
|
108
|
+
(
|
|
109
|
+
APIHelper.valid_type?(value['id'],
|
|
110
|
+
->(val) { val.instance_of? String }) and
|
|
111
|
+
APIHelper.valid_type?(value['event'],
|
|
112
|
+
->(val) { val.instance_of? String }) and
|
|
113
|
+
APIHelper.valid_type?(value['created_on'],
|
|
114
|
+
->(val) { val.instance_of? String })
|
|
115
|
+
)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Provides a human-readable string representation of the object.
|
|
119
|
+
def to_s
|
|
120
|
+
class_name = self.class.name.split('::').last
|
|
121
|
+
"<#{class_name} id: #{@id}, event: #{@event}, data: #{@data}, created_on: #{@created_on},"\
|
|
122
|
+
" additional_properties: #{@additional_properties}>"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
126
|
+
def inspect
|
|
127
|
+
class_name = self.class.name.split('::').last
|
|
128
|
+
"<#{class_name} id: #{@id.inspect}, event: #{@event.inspect}, data: #{@data.inspect},"\
|
|
129
|
+
" created_on: #{@created_on.inspect}, additional_properties: #{@additional_properties}>"
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|