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,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_replaced event.
|
|
9
|
+
class TokenReplacedWebhookCallback < 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_replaced` 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_replaced'
|
|
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
|
+
TokenReplacedWebhookCallback.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 [TokenReplacedWebhookCallback | 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,181 @@
|
|
|
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 Response Bank Transfer Data schema.
|
|
8
|
+
class TokenResponseBankTransferData < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The bank brand identifier (e.g., 'aozora_bank').
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :brand
|
|
15
|
+
|
|
16
|
+
# ISO 8601 duration format (e.g., 'PT168H').
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :expiration_period
|
|
19
|
+
|
|
20
|
+
# Time shift applied to the expiration, typically pushing it to the end of
|
|
21
|
+
# the day in a specific timezone (e.g., '23:59:59+09:00').
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :expiration_time_shift
|
|
24
|
+
|
|
25
|
+
# Bank code value.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :bank_code
|
|
28
|
+
|
|
29
|
+
# Bank name value.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :bank_name
|
|
32
|
+
|
|
33
|
+
# Bank branch code.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :branch_code
|
|
36
|
+
|
|
37
|
+
# Bank branch name.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :branch_name
|
|
40
|
+
|
|
41
|
+
# Bank account number.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :account_number
|
|
44
|
+
|
|
45
|
+
# Bank account holder name.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :account_holder_name
|
|
48
|
+
|
|
49
|
+
# A mapping from model property names to API property names.
|
|
50
|
+
def self.names
|
|
51
|
+
@_hash = {} if @_hash.nil?
|
|
52
|
+
@_hash['brand'] = 'brand'
|
|
53
|
+
@_hash['expiration_period'] = 'expiration_period'
|
|
54
|
+
@_hash['expiration_time_shift'] = 'expiration_time_shift'
|
|
55
|
+
@_hash['bank_code'] = 'bank_code'
|
|
56
|
+
@_hash['bank_name'] = 'bank_name'
|
|
57
|
+
@_hash['branch_code'] = 'branch_code'
|
|
58
|
+
@_hash['branch_name'] = 'branch_name'
|
|
59
|
+
@_hash['account_number'] = 'account_number'
|
|
60
|
+
@_hash['account_holder_name'] = 'account_holder_name'
|
|
61
|
+
@_hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# An array for optional fields
|
|
65
|
+
def self.optionals
|
|
66
|
+
%w[
|
|
67
|
+
brand
|
|
68
|
+
expiration_period
|
|
69
|
+
expiration_time_shift
|
|
70
|
+
bank_code
|
|
71
|
+
bank_name
|
|
72
|
+
branch_code
|
|
73
|
+
branch_name
|
|
74
|
+
account_number
|
|
75
|
+
account_holder_name
|
|
76
|
+
]
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# An array for nullable fields
|
|
80
|
+
def self.nullables
|
|
81
|
+
%w[
|
|
82
|
+
bank_code
|
|
83
|
+
bank_name
|
|
84
|
+
branch_code
|
|
85
|
+
branch_name
|
|
86
|
+
account_number
|
|
87
|
+
account_holder_name
|
|
88
|
+
]
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def initialize(brand: SKIP, expiration_period: SKIP,
|
|
92
|
+
expiration_time_shift: SKIP, bank_code: SKIP,
|
|
93
|
+
bank_name: SKIP, branch_code: SKIP, branch_name: SKIP,
|
|
94
|
+
account_number: SKIP, account_holder_name: SKIP,
|
|
95
|
+
additional_properties: nil)
|
|
96
|
+
# Add additional model properties to the instance
|
|
97
|
+
additional_properties = {} if additional_properties.nil?
|
|
98
|
+
|
|
99
|
+
@brand = brand unless brand == SKIP
|
|
100
|
+
@expiration_period = expiration_period unless expiration_period == SKIP
|
|
101
|
+
@expiration_time_shift = expiration_time_shift unless expiration_time_shift == SKIP
|
|
102
|
+
@bank_code = bank_code unless bank_code == SKIP
|
|
103
|
+
@bank_name = bank_name unless bank_name == SKIP
|
|
104
|
+
@branch_code = branch_code unless branch_code == SKIP
|
|
105
|
+
@branch_name = branch_name unless branch_name == SKIP
|
|
106
|
+
@account_number = account_number unless account_number == SKIP
|
|
107
|
+
@account_holder_name = account_holder_name unless account_holder_name == SKIP
|
|
108
|
+
@additional_properties = additional_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Creates an instance of the object from a hash.
|
|
112
|
+
def self.from_hash(hash)
|
|
113
|
+
return nil unless hash
|
|
114
|
+
|
|
115
|
+
# Extract variables from the hash.
|
|
116
|
+
brand = hash.key?('brand') ? hash['brand'] : SKIP
|
|
117
|
+
expiration_period =
|
|
118
|
+
hash.key?('expiration_period') ? hash['expiration_period'] : SKIP
|
|
119
|
+
expiration_time_shift =
|
|
120
|
+
hash.key?('expiration_time_shift') ? hash['expiration_time_shift'] : SKIP
|
|
121
|
+
bank_code = hash.key?('bank_code') ? hash['bank_code'] : SKIP
|
|
122
|
+
bank_name = hash.key?('bank_name') ? hash['bank_name'] : SKIP
|
|
123
|
+
branch_code = hash.key?('branch_code') ? hash['branch_code'] : SKIP
|
|
124
|
+
branch_name = hash.key?('branch_name') ? hash['branch_name'] : SKIP
|
|
125
|
+
account_number =
|
|
126
|
+
hash.key?('account_number') ? hash['account_number'] : SKIP
|
|
127
|
+
account_holder_name =
|
|
128
|
+
hash.key?('account_holder_name') ? hash['account_holder_name'] : SKIP
|
|
129
|
+
|
|
130
|
+
# Create a new hash for additional properties, removing known properties.
|
|
131
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
132
|
+
|
|
133
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
134
|
+
new_hash, proc { |value| value }
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
# Create object from extracted values.
|
|
138
|
+
TokenResponseBankTransferData.new(brand: brand,
|
|
139
|
+
expiration_period: expiration_period,
|
|
140
|
+
expiration_time_shift: expiration_time_shift,
|
|
141
|
+
bank_code: bank_code,
|
|
142
|
+
bank_name: bank_name,
|
|
143
|
+
branch_code: branch_code,
|
|
144
|
+
branch_name: branch_name,
|
|
145
|
+
account_number: account_number,
|
|
146
|
+
account_holder_name: account_holder_name,
|
|
147
|
+
additional_properties: additional_properties)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Validates an instance of the object from a given value.
|
|
151
|
+
# @param [TokenResponseBankTransferData | Hash] The value against the validation is performed.
|
|
152
|
+
def self.validate(value)
|
|
153
|
+
return true if value.instance_of? self
|
|
154
|
+
|
|
155
|
+
return false unless value.instance_of? Hash
|
|
156
|
+
|
|
157
|
+
true
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Provides a human-readable string representation of the object.
|
|
161
|
+
def to_s
|
|
162
|
+
class_name = self.class.name.split('::').last
|
|
163
|
+
"<#{class_name} brand: #{@brand}, expiration_period: #{@expiration_period},"\
|
|
164
|
+
" expiration_time_shift: #{@expiration_time_shift}, bank_code: #{@bank_code}, bank_name:"\
|
|
165
|
+
" #{@bank_name}, branch_code: #{@branch_code}, branch_name: #{@branch_name}, account_number:"\
|
|
166
|
+
" #{@account_number}, account_holder_name: #{@account_holder_name}, additional_properties:"\
|
|
167
|
+
" #{@additional_properties}>"
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
171
|
+
def inspect
|
|
172
|
+
class_name = self.class.name.split('::').last
|
|
173
|
+
"<#{class_name} brand: #{@brand.inspect}, expiration_period: #{@expiration_period.inspect},"\
|
|
174
|
+
" expiration_time_shift: #{@expiration_time_shift.inspect}, bank_code:"\
|
|
175
|
+
" #{@bank_code.inspect}, bank_name: #{@bank_name.inspect}, branch_code:"\
|
|
176
|
+
" #{@branch_code.inspect}, branch_name: #{@branch_name.inspect}, account_number:"\
|
|
177
|
+
" #{@account_number.inspect}, account_holder_name: #{@account_holder_name.inspect},"\
|
|
178
|
+
" additional_properties: #{@additional_properties}>"
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
@@ -0,0 +1,129 @@
|
|
|
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 Response Card Data schema.
|
|
8
|
+
class TokenResponseCardData < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Token Response Card Data Card schema.
|
|
13
|
+
# @return [TokenResponseCardDataCard]
|
|
14
|
+
attr_accessor :card
|
|
15
|
+
|
|
16
|
+
# Token Response Card Data Billing schema.
|
|
17
|
+
# @return [TokenResponseCardDataBilling]
|
|
18
|
+
attr_accessor :billing
|
|
19
|
+
|
|
20
|
+
# Token Response Card Data Cvv Authorize schema.
|
|
21
|
+
# @return [TokenResponseCardDataCvvAuthorize]
|
|
22
|
+
attr_accessor :cvv_authorize
|
|
23
|
+
|
|
24
|
+
# Token Response Card Data Cvv Authorize Check schema.
|
|
25
|
+
# @return [TokenResponseCardDataCvvAuthorizeCheck]
|
|
26
|
+
attr_accessor :cvv_authorize_check
|
|
27
|
+
|
|
28
|
+
# Token Response Card Data Three Ds schema.
|
|
29
|
+
# @return [TokenResponseCardDataThreeDs]
|
|
30
|
+
attr_accessor :three_ds
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['card'] = 'card'
|
|
36
|
+
@_hash['billing'] = 'billing'
|
|
37
|
+
@_hash['cvv_authorize'] = 'cvv_authorize'
|
|
38
|
+
@_hash['cvv_authorize_check'] = 'cvv_authorize_check'
|
|
39
|
+
@_hash['three_ds'] = 'three_ds'
|
|
40
|
+
@_hash
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for optional fields
|
|
44
|
+
def self.optionals
|
|
45
|
+
%w[
|
|
46
|
+
card
|
|
47
|
+
billing
|
|
48
|
+
cvv_authorize
|
|
49
|
+
cvv_authorize_check
|
|
50
|
+
three_ds
|
|
51
|
+
]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for nullable fields
|
|
55
|
+
def self.nullables
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def initialize(card: SKIP, billing: SKIP, cvv_authorize: SKIP,
|
|
60
|
+
cvv_authorize_check: SKIP, three_ds: SKIP,
|
|
61
|
+
additional_properties: nil)
|
|
62
|
+
# Add additional model properties to the instance
|
|
63
|
+
additional_properties = {} if additional_properties.nil?
|
|
64
|
+
|
|
65
|
+
@card = card unless card == SKIP
|
|
66
|
+
@billing = billing unless billing == SKIP
|
|
67
|
+
@cvv_authorize = cvv_authorize unless cvv_authorize == SKIP
|
|
68
|
+
@cvv_authorize_check = cvv_authorize_check unless cvv_authorize_check == SKIP
|
|
69
|
+
@three_ds = three_ds unless three_ds == SKIP
|
|
70
|
+
@additional_properties = additional_properties
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Creates an instance of the object from a hash.
|
|
74
|
+
def self.from_hash(hash)
|
|
75
|
+
return nil unless hash
|
|
76
|
+
|
|
77
|
+
# Extract variables from the hash.
|
|
78
|
+
card = TokenResponseCardDataCard.from_hash(hash['card']) if hash['card']
|
|
79
|
+
billing = TokenResponseCardDataBilling.from_hash(hash['billing']) if hash['billing']
|
|
80
|
+
cvv_authorize = TokenResponseCardDataCvvAuthorize.from_hash(hash['cvv_authorize']) if
|
|
81
|
+
hash['cvv_authorize']
|
|
82
|
+
if hash['cvv_authorize_check']
|
|
83
|
+
cvv_authorize_check = TokenResponseCardDataCvvAuthorizeCheck.from_hash(hash['cvv_authorize_check'])
|
|
84
|
+
end
|
|
85
|
+
three_ds = TokenResponseCardDataThreeDs.from_hash(hash['three_ds']) if hash['three_ds']
|
|
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
|
+
TokenResponseCardData.new(card: card,
|
|
96
|
+
billing: billing,
|
|
97
|
+
cvv_authorize: cvv_authorize,
|
|
98
|
+
cvv_authorize_check: cvv_authorize_check,
|
|
99
|
+
three_ds: three_ds,
|
|
100
|
+
additional_properties: additional_properties)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Validates an instance of the object from a given value.
|
|
104
|
+
# @param [TokenResponseCardData | Hash] The value against the validation is performed.
|
|
105
|
+
def self.validate(value)
|
|
106
|
+
return true if value.instance_of? self
|
|
107
|
+
|
|
108
|
+
return false unless value.instance_of? Hash
|
|
109
|
+
|
|
110
|
+
true
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Provides a human-readable string representation of the object.
|
|
114
|
+
def to_s
|
|
115
|
+
class_name = self.class.name.split('::').last
|
|
116
|
+
"<#{class_name} card: #{@card}, billing: #{@billing}, cvv_authorize: #{@cvv_authorize},"\
|
|
117
|
+
" cvv_authorize_check: #{@cvv_authorize_check}, three_ds: #{@three_ds},"\
|
|
118
|
+
" additional_properties: #{@additional_properties}>"
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
122
|
+
def inspect
|
|
123
|
+
class_name = self.class.name.split('::').last
|
|
124
|
+
"<#{class_name} card: #{@card.inspect}, billing: #{@billing.inspect}, cvv_authorize:"\
|
|
125
|
+
" #{@cvv_authorize.inspect}, cvv_authorize_check: #{@cvv_authorize_check.inspect}, three_ds:"\
|
|
126
|
+
" #{@three_ds.inspect}, additional_properties: #{@additional_properties}>"
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
@@ -0,0 +1,153 @@
|
|
|
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 Response Card Data Billing schema.
|
|
8
|
+
class TokenResponseCardDataBilling < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Primary street address line.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :line1
|
|
15
|
+
|
|
16
|
+
# Secondary street address line.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :line2
|
|
19
|
+
|
|
20
|
+
# State or prefecture.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :state
|
|
23
|
+
|
|
24
|
+
# City or locality.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :city
|
|
27
|
+
|
|
28
|
+
# Country code.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :country
|
|
31
|
+
|
|
32
|
+
# Postal code.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :zip
|
|
35
|
+
|
|
36
|
+
# Token Response Phone Number schema.
|
|
37
|
+
# @return [TokenResponsePhoneNumber]
|
|
38
|
+
attr_accessor :phone_number
|
|
39
|
+
|
|
40
|
+
# A mapping from model property names to API property names.
|
|
41
|
+
def self.names
|
|
42
|
+
@_hash = {} if @_hash.nil?
|
|
43
|
+
@_hash['line1'] = 'line1'
|
|
44
|
+
@_hash['line2'] = 'line2'
|
|
45
|
+
@_hash['state'] = 'state'
|
|
46
|
+
@_hash['city'] = 'city'
|
|
47
|
+
@_hash['country'] = 'country'
|
|
48
|
+
@_hash['zip'] = 'zip'
|
|
49
|
+
@_hash['phone_number'] = 'phone_number'
|
|
50
|
+
@_hash
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for optional fields
|
|
54
|
+
def self.optionals
|
|
55
|
+
%w[
|
|
56
|
+
line1
|
|
57
|
+
line2
|
|
58
|
+
state
|
|
59
|
+
city
|
|
60
|
+
country
|
|
61
|
+
zip
|
|
62
|
+
phone_number
|
|
63
|
+
]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# An array for nullable fields
|
|
67
|
+
def self.nullables
|
|
68
|
+
%w[
|
|
69
|
+
line1
|
|
70
|
+
line2
|
|
71
|
+
state
|
|
72
|
+
city
|
|
73
|
+
country
|
|
74
|
+
zip
|
|
75
|
+
]
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def initialize(line1: SKIP, line2: SKIP, state: SKIP, city: SKIP,
|
|
79
|
+
country: SKIP, zip: SKIP, phone_number: SKIP,
|
|
80
|
+
additional_properties: nil)
|
|
81
|
+
# Add additional model properties to the instance
|
|
82
|
+
additional_properties = {} if additional_properties.nil?
|
|
83
|
+
|
|
84
|
+
@line1 = line1 unless line1 == SKIP
|
|
85
|
+
@line2 = line2 unless line2 == SKIP
|
|
86
|
+
@state = state unless state == SKIP
|
|
87
|
+
@city = city unless city == SKIP
|
|
88
|
+
@country = country unless country == SKIP
|
|
89
|
+
@zip = zip unless zip == SKIP
|
|
90
|
+
@phone_number = phone_number unless phone_number == SKIP
|
|
91
|
+
@additional_properties = additional_properties
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Creates an instance of the object from a hash.
|
|
95
|
+
def self.from_hash(hash)
|
|
96
|
+
return nil unless hash
|
|
97
|
+
|
|
98
|
+
# Extract variables from the hash.
|
|
99
|
+
line1 = hash.key?('line1') ? hash['line1'] : SKIP
|
|
100
|
+
line2 = hash.key?('line2') ? hash['line2'] : SKIP
|
|
101
|
+
state = hash.key?('state') ? hash['state'] : SKIP
|
|
102
|
+
city = hash.key?('city') ? hash['city'] : SKIP
|
|
103
|
+
country = hash.key?('country') ? hash['country'] : SKIP
|
|
104
|
+
zip = hash.key?('zip') ? hash['zip'] : SKIP
|
|
105
|
+
phone_number = TokenResponsePhoneNumber.from_hash(hash['phone_number']) if
|
|
106
|
+
hash['phone_number']
|
|
107
|
+
|
|
108
|
+
# Create a new hash for additional properties, removing known properties.
|
|
109
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
110
|
+
|
|
111
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
112
|
+
new_hash, proc { |value| value }
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
# Create object from extracted values.
|
|
116
|
+
TokenResponseCardDataBilling.new(line1: line1,
|
|
117
|
+
line2: line2,
|
|
118
|
+
state: state,
|
|
119
|
+
city: city,
|
|
120
|
+
country: country,
|
|
121
|
+
zip: zip,
|
|
122
|
+
phone_number: phone_number,
|
|
123
|
+
additional_properties: additional_properties)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Validates an instance of the object from a given value.
|
|
127
|
+
# @param [TokenResponseCardDataBilling | Hash] The value against the validation is performed.
|
|
128
|
+
def self.validate(value)
|
|
129
|
+
return true if value.instance_of? self
|
|
130
|
+
|
|
131
|
+
return false unless value.instance_of? Hash
|
|
132
|
+
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Provides a human-readable string representation of the object.
|
|
137
|
+
def to_s
|
|
138
|
+
class_name = self.class.name.split('::').last
|
|
139
|
+
"<#{class_name} line1: #{@line1}, line2: #{@line2}, state: #{@state}, city: #{@city},"\
|
|
140
|
+
" country: #{@country}, zip: #{@zip}, phone_number: #{@phone_number}, additional_properties:"\
|
|
141
|
+
" #{@additional_properties}>"
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
145
|
+
def inspect
|
|
146
|
+
class_name = self.class.name.split('::').last
|
|
147
|
+
"<#{class_name} line1: #{@line1.inspect}, line2: #{@line2.inspect}, state:"\
|
|
148
|
+
" #{@state.inspect}, city: #{@city.inspect}, country: #{@country.inspect}, zip:"\
|
|
149
|
+
" #{@zip.inspect}, phone_number: #{@phone_number.inspect}, additional_properties:"\
|
|
150
|
+
" #{@additional_properties}>"
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|