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,250 @@
|
|
|
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
|
+
# Stored transaction token resource.
|
|
9
|
+
class TransactionToken < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Unique identifier.
|
|
14
|
+
# @return [UUID | String]
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# Store identifier.
|
|
18
|
+
# @return [UUID | String]
|
|
19
|
+
attr_accessor :store_id
|
|
20
|
+
|
|
21
|
+
# Customer email address.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :email
|
|
24
|
+
|
|
25
|
+
# Transaction Token Payment Type schema.
|
|
26
|
+
# @return [TransactionTokenPaymentType]
|
|
27
|
+
attr_accessor :payment_type
|
|
28
|
+
|
|
29
|
+
# Whether the resource is active.
|
|
30
|
+
# @return [TrueClass | FalseClass]
|
|
31
|
+
attr_accessor :active
|
|
32
|
+
|
|
33
|
+
# Transaction Token Mode schema.
|
|
34
|
+
# @return [TransactionTokenMode]
|
|
35
|
+
attr_accessor :mode
|
|
36
|
+
|
|
37
|
+
# Transaction Token Type schema.
|
|
38
|
+
# @return [TransactionTokenType]
|
|
39
|
+
attr_accessor :type
|
|
40
|
+
|
|
41
|
+
# Usage limit applied to the token.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :usage_limit
|
|
44
|
+
|
|
45
|
+
# Whether the token has been confirmed.
|
|
46
|
+
# @return [TrueClass | FalseClass]
|
|
47
|
+
attr_accessor :confirmed
|
|
48
|
+
|
|
49
|
+
# Arbitrary key-value metadata.
|
|
50
|
+
# @return [Hash[String, Object]]
|
|
51
|
+
attr_accessor :metadata
|
|
52
|
+
|
|
53
|
+
# Timestamp when the resource was created.
|
|
54
|
+
# @return [DateTime]
|
|
55
|
+
attr_accessor :created_on
|
|
56
|
+
|
|
57
|
+
# Timestamp when the resource was last updated.
|
|
58
|
+
# @return [DateTime]
|
|
59
|
+
attr_accessor :updated_on
|
|
60
|
+
|
|
61
|
+
# Timestamp when the token was last used.
|
|
62
|
+
# @return [DateTime]
|
|
63
|
+
attr_accessor :last_used_on
|
|
64
|
+
|
|
65
|
+
# Transaction token data payload. The actual structure depends on
|
|
66
|
+
# `payment_type` — card, konbini, online (QR / 3DS), or bank transfer.
|
|
67
|
+
# @return [Object]
|
|
68
|
+
attr_accessor :data
|
|
69
|
+
|
|
70
|
+
# A mapping from model property names to API property names.
|
|
71
|
+
def self.names
|
|
72
|
+
@_hash = {} if @_hash.nil?
|
|
73
|
+
@_hash['id'] = 'id'
|
|
74
|
+
@_hash['store_id'] = 'store_id'
|
|
75
|
+
@_hash['email'] = 'email'
|
|
76
|
+
@_hash['payment_type'] = 'payment_type'
|
|
77
|
+
@_hash['active'] = 'active'
|
|
78
|
+
@_hash['mode'] = 'mode'
|
|
79
|
+
@_hash['type'] = 'type'
|
|
80
|
+
@_hash['usage_limit'] = 'usage_limit'
|
|
81
|
+
@_hash['confirmed'] = 'confirmed'
|
|
82
|
+
@_hash['metadata'] = 'metadata'
|
|
83
|
+
@_hash['created_on'] = 'created_on'
|
|
84
|
+
@_hash['updated_on'] = 'updated_on'
|
|
85
|
+
@_hash['last_used_on'] = 'last_used_on'
|
|
86
|
+
@_hash['data'] = 'data'
|
|
87
|
+
@_hash
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# An array for optional fields
|
|
91
|
+
def self.optionals
|
|
92
|
+
%w[
|
|
93
|
+
id
|
|
94
|
+
store_id
|
|
95
|
+
email
|
|
96
|
+
payment_type
|
|
97
|
+
active
|
|
98
|
+
mode
|
|
99
|
+
type
|
|
100
|
+
usage_limit
|
|
101
|
+
confirmed
|
|
102
|
+
metadata
|
|
103
|
+
created_on
|
|
104
|
+
updated_on
|
|
105
|
+
last_used_on
|
|
106
|
+
data
|
|
107
|
+
]
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# An array for nullable fields
|
|
111
|
+
def self.nullables
|
|
112
|
+
%w[
|
|
113
|
+
email
|
|
114
|
+
usage_limit
|
|
115
|
+
confirmed
|
|
116
|
+
last_used_on
|
|
117
|
+
]
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def initialize(id: SKIP, store_id: SKIP, email: SKIP, payment_type: SKIP,
|
|
121
|
+
active: SKIP, mode: SKIP, type: SKIP, usage_limit: SKIP,
|
|
122
|
+
confirmed: SKIP, metadata: SKIP, created_on: SKIP,
|
|
123
|
+
updated_on: SKIP, last_used_on: SKIP, data: SKIP,
|
|
124
|
+
additional_properties: nil)
|
|
125
|
+
# Add additional model properties to the instance
|
|
126
|
+
additional_properties = {} if additional_properties.nil?
|
|
127
|
+
|
|
128
|
+
@id = id unless id == SKIP
|
|
129
|
+
@store_id = store_id unless store_id == SKIP
|
|
130
|
+
@email = email unless email == SKIP
|
|
131
|
+
@payment_type = payment_type unless payment_type == SKIP
|
|
132
|
+
@active = active unless active == SKIP
|
|
133
|
+
@mode = mode unless mode == SKIP
|
|
134
|
+
@type = type unless type == SKIP
|
|
135
|
+
@usage_limit = usage_limit unless usage_limit == SKIP
|
|
136
|
+
@confirmed = confirmed unless confirmed == SKIP
|
|
137
|
+
@metadata = metadata unless metadata == SKIP
|
|
138
|
+
@created_on = created_on unless created_on == SKIP
|
|
139
|
+
@updated_on = updated_on unless updated_on == SKIP
|
|
140
|
+
@last_used_on = last_used_on unless last_used_on == SKIP
|
|
141
|
+
@data = data unless data == SKIP
|
|
142
|
+
@additional_properties = additional_properties
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Creates an instance of the object from a hash.
|
|
146
|
+
def self.from_hash(hash)
|
|
147
|
+
return nil unless hash
|
|
148
|
+
|
|
149
|
+
# Extract variables from the hash.
|
|
150
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
151
|
+
store_id = hash.key?('store_id') ? hash['store_id'] : SKIP
|
|
152
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
153
|
+
payment_type = hash.key?('payment_type') ? hash['payment_type'] : SKIP
|
|
154
|
+
active = hash.key?('active') ? hash['active'] : SKIP
|
|
155
|
+
mode = hash.key?('mode') ? hash['mode'] : SKIP
|
|
156
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
157
|
+
usage_limit = hash.key?('usage_limit') ? hash['usage_limit'] : SKIP
|
|
158
|
+
confirmed = hash.key?('confirmed') ? hash['confirmed'] : SKIP
|
|
159
|
+
metadata = hash.key?('metadata') ? APIHelper.deserialize_union_type(
|
|
160
|
+
UnionTypeLookUp.get(:TransactionTokenMetadataAdditionalProperties), hash['metadata']
|
|
161
|
+
) : SKIP
|
|
162
|
+
created_on = if hash.key?('created_on')
|
|
163
|
+
(DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_on'])
|
|
164
|
+
else
|
|
165
|
+
SKIP
|
|
166
|
+
end
|
|
167
|
+
updated_on = if hash.key?('updated_on')
|
|
168
|
+
(DateTimeHelper.from_rfc3339(hash['updated_on']) if hash['updated_on'])
|
|
169
|
+
else
|
|
170
|
+
SKIP
|
|
171
|
+
end
|
|
172
|
+
last_used_on = if hash.key?('last_used_on')
|
|
173
|
+
(DateTimeHelper.from_rfc3339(hash['last_used_on']) if hash['last_used_on'])
|
|
174
|
+
else
|
|
175
|
+
SKIP
|
|
176
|
+
end
|
|
177
|
+
data = hash.key?('data') ? APIHelper.deserialize_union_type(
|
|
178
|
+
UnionTypeLookUp.get(:TransactionTokenData), hash['data']
|
|
179
|
+
) : SKIP
|
|
180
|
+
|
|
181
|
+
# Create a new hash for additional properties, removing known properties.
|
|
182
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
183
|
+
|
|
184
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
185
|
+
new_hash, proc { |value| value }
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
# Create object from extracted values.
|
|
189
|
+
TransactionToken.new(id: id,
|
|
190
|
+
store_id: store_id,
|
|
191
|
+
email: email,
|
|
192
|
+
payment_type: payment_type,
|
|
193
|
+
active: active,
|
|
194
|
+
mode: mode,
|
|
195
|
+
type: type,
|
|
196
|
+
usage_limit: usage_limit,
|
|
197
|
+
confirmed: confirmed,
|
|
198
|
+
metadata: metadata,
|
|
199
|
+
created_on: created_on,
|
|
200
|
+
updated_on: updated_on,
|
|
201
|
+
last_used_on: last_used_on,
|
|
202
|
+
data: data,
|
|
203
|
+
additional_properties: additional_properties)
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
def to_custom_created_on
|
|
207
|
+
DateTimeHelper.to_rfc3339(created_on)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
def to_custom_updated_on
|
|
211
|
+
DateTimeHelper.to_rfc3339(updated_on)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
def to_custom_last_used_on
|
|
215
|
+
DateTimeHelper.to_rfc3339(last_used_on)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Validates an instance of the object from a given value.
|
|
219
|
+
# @param [TransactionToken | Hash] The value against the validation is performed.
|
|
220
|
+
def self.validate(value)
|
|
221
|
+
return true if value.instance_of? self
|
|
222
|
+
|
|
223
|
+
return false unless value.instance_of? Hash
|
|
224
|
+
|
|
225
|
+
true
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Provides a human-readable string representation of the object.
|
|
229
|
+
def to_s
|
|
230
|
+
class_name = self.class.name.split('::').last
|
|
231
|
+
"<#{class_name} id: #{@id}, store_id: #{@store_id}, email: #{@email}, payment_type:"\
|
|
232
|
+
" #{@payment_type}, active: #{@active}, mode: #{@mode}, type: #{@type}, usage_limit:"\
|
|
233
|
+
" #{@usage_limit}, confirmed: #{@confirmed}, metadata: #{@metadata}, created_on:"\
|
|
234
|
+
" #{@created_on}, updated_on: #{@updated_on}, last_used_on: #{@last_used_on}, data:"\
|
|
235
|
+
" #{@data}, additional_properties: #{@additional_properties}>"
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
239
|
+
def inspect
|
|
240
|
+
class_name = self.class.name.split('::').last
|
|
241
|
+
"<#{class_name} id: #{@id.inspect}, store_id: #{@store_id.inspect}, email:"\
|
|
242
|
+
" #{@email.inspect}, payment_type: #{@payment_type.inspect}, active: #{@active.inspect},"\
|
|
243
|
+
" mode: #{@mode.inspect}, type: #{@type.inspect}, usage_limit: #{@usage_limit.inspect},"\
|
|
244
|
+
" confirmed: #{@confirmed.inspect}, metadata: #{@metadata.inspect}, created_on:"\
|
|
245
|
+
" #{@created_on.inspect}, updated_on: #{@updated_on.inspect}, last_used_on:"\
|
|
246
|
+
" #{@last_used_on.inspect}, data: #{@data.inspect}, additional_properties:"\
|
|
247
|
+
" #{@additional_properties}>"
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
@@ -0,0 +1,161 @@
|
|
|
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
|
+
# TransactionTokenCreateRequest Model.
|
|
8
|
+
class TransactionTokenCreateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Transaction Token Create Request Payment Type schema.
|
|
13
|
+
# @return [TransactionTokenCreateRequestPaymentType]
|
|
14
|
+
attr_accessor :payment_type
|
|
15
|
+
|
|
16
|
+
# Transaction Token Create Request Type schema.
|
|
17
|
+
# @return [TransactionTokenCreateRequestType]
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
# Customer email address.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :email
|
|
23
|
+
|
|
24
|
+
# Usage limit applied to the token.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :usage_limit
|
|
27
|
+
|
|
28
|
+
# Consumer's IPv4 address. **Required** when `data.brand` is
|
|
29
|
+
# `we_chat_online` and `data.call_method` is `web` or `http_get`.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :ip_address
|
|
32
|
+
|
|
33
|
+
# A free-form dictionary for custom metadata.
|
|
34
|
+
# @return [TransactionTokenCreateRequestMetadata]
|
|
35
|
+
attr_accessor :metadata
|
|
36
|
+
|
|
37
|
+
# Transaction Token Create Request Data schema.
|
|
38
|
+
# @return [Object]
|
|
39
|
+
attr_accessor :data
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['payment_type'] = 'payment_type'
|
|
45
|
+
@_hash['type'] = 'type'
|
|
46
|
+
@_hash['email'] = 'email'
|
|
47
|
+
@_hash['usage_limit'] = 'usage_limit'
|
|
48
|
+
@_hash['ip_address'] = 'ip_address'
|
|
49
|
+
@_hash['metadata'] = 'metadata'
|
|
50
|
+
@_hash['data'] = 'data'
|
|
51
|
+
@_hash
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for optional fields
|
|
55
|
+
def self.optionals
|
|
56
|
+
%w[
|
|
57
|
+
email
|
|
58
|
+
usage_limit
|
|
59
|
+
ip_address
|
|
60
|
+
metadata
|
|
61
|
+
]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# An array for nullable fields
|
|
65
|
+
def self.nullables
|
|
66
|
+
[]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def initialize(payment_type:, type:, data:, email: SKIP, usage_limit: SKIP,
|
|
70
|
+
ip_address: SKIP, metadata: SKIP, additional_properties: nil)
|
|
71
|
+
# Add additional model properties to the instance
|
|
72
|
+
additional_properties = {} if additional_properties.nil?
|
|
73
|
+
|
|
74
|
+
@payment_type = payment_type
|
|
75
|
+
@type = type
|
|
76
|
+
@email = email unless email == SKIP
|
|
77
|
+
@usage_limit = usage_limit unless usage_limit == SKIP
|
|
78
|
+
@ip_address = ip_address unless ip_address == SKIP
|
|
79
|
+
@metadata = metadata unless metadata == SKIP
|
|
80
|
+
@data = data
|
|
81
|
+
@additional_properties = additional_properties
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Creates an instance of the object from a hash.
|
|
85
|
+
def self.from_hash(hash)
|
|
86
|
+
return nil unless hash
|
|
87
|
+
|
|
88
|
+
# Extract variables from the hash.
|
|
89
|
+
payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil
|
|
90
|
+
type = hash.key?('type') ? hash['type'] : nil
|
|
91
|
+
data = hash.key?('data') ? APIHelper.deserialize_union_type(
|
|
92
|
+
UnionTypeLookUp.get(:TransactionTokenCreateRequestData), hash['data']
|
|
93
|
+
) : nil
|
|
94
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
95
|
+
usage_limit = hash.key?('usage_limit') ? hash['usage_limit'] : SKIP
|
|
96
|
+
ip_address = hash.key?('ip_address') ? hash['ip_address'] : SKIP
|
|
97
|
+
metadata = TransactionTokenCreateRequestMetadata.from_hash(hash['metadata']) if
|
|
98
|
+
hash['metadata']
|
|
99
|
+
|
|
100
|
+
# Create a new hash for additional properties, removing known properties.
|
|
101
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
102
|
+
|
|
103
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
104
|
+
new_hash, proc { |value| value }
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
# Create object from extracted values.
|
|
108
|
+
TransactionTokenCreateRequest.new(payment_type: payment_type,
|
|
109
|
+
type: type,
|
|
110
|
+
data: data,
|
|
111
|
+
email: email,
|
|
112
|
+
usage_limit: usage_limit,
|
|
113
|
+
ip_address: ip_address,
|
|
114
|
+
metadata: metadata,
|
|
115
|
+
additional_properties: additional_properties)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Validates an instance of the object from a given value.
|
|
119
|
+
# @param [TransactionTokenCreateRequest | Hash] The value against the validation is performed.
|
|
120
|
+
def self.validate(value)
|
|
121
|
+
if value.instance_of? self
|
|
122
|
+
return (
|
|
123
|
+
APIHelper.valid_type?(value.payment_type,
|
|
124
|
+
->(val) { TransactionTokenCreateRequestPaymentType.validate(val) }) and
|
|
125
|
+
APIHelper.valid_type?(value.type,
|
|
126
|
+
->(val) { TransactionTokenCreateRequestType.validate(val) }) and
|
|
127
|
+
UnionTypeLookUp.get(:TransactionTokenCreateRequestData)
|
|
128
|
+
.validate(value.data)
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
return false unless value.instance_of? Hash
|
|
133
|
+
|
|
134
|
+
(
|
|
135
|
+
APIHelper.valid_type?(value['payment_type'],
|
|
136
|
+
->(val) { TransactionTokenCreateRequestPaymentType.validate(val) }) and
|
|
137
|
+
APIHelper.valid_type?(value['type'],
|
|
138
|
+
->(val) { TransactionTokenCreateRequestType.validate(val) }) and
|
|
139
|
+
UnionTypeLookUp.get(:TransactionTokenCreateRequestData)
|
|
140
|
+
.validate(value['data'])
|
|
141
|
+
)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Provides a human-readable string representation of the object.
|
|
145
|
+
def to_s
|
|
146
|
+
class_name = self.class.name.split('::').last
|
|
147
|
+
"<#{class_name} payment_type: #{@payment_type}, type: #{@type}, email: #{@email},"\
|
|
148
|
+
" usage_limit: #{@usage_limit}, ip_address: #{@ip_address}, metadata: #{@metadata}, data:"\
|
|
149
|
+
" #{@data}, additional_properties: #{@additional_properties}>"
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
153
|
+
def inspect
|
|
154
|
+
class_name = self.class.name.split('::').last
|
|
155
|
+
"<#{class_name} payment_type: #{@payment_type.inspect}, type: #{@type.inspect}, email:"\
|
|
156
|
+
" #{@email.inspect}, usage_limit: #{@usage_limit.inspect}, ip_address:"\
|
|
157
|
+
" #{@ip_address.inspect}, metadata: #{@metadata.inspect}, data: #{@data.inspect},"\
|
|
158
|
+
" additional_properties: #{@additional_properties}>"
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
@@ -0,0 +1,124 @@
|
|
|
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 TransactionTokenCreateRequestMetadata < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Any arbitrary value (Free format).
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :univapay_reference_id
|
|
15
|
+
|
|
16
|
+
# Customer ID.
|
|
17
|
+
# @return [UUID | String]
|
|
18
|
+
attr_accessor :univapay_customer_id
|
|
19
|
+
|
|
20
|
+
# Consumer name passed to payment processors that require it (e.g., konbini,
|
|
21
|
+
# bank transfer).
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :univapay_name
|
|
24
|
+
|
|
25
|
+
# Consumer phone number passed to payment processors that require it.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :univapay_phone_number
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['univapay_reference_id'] = 'univapay-reference-id'
|
|
33
|
+
@_hash['univapay_customer_id'] = 'univapay-customer-id'
|
|
34
|
+
@_hash['univapay_name'] = 'univapay-name'
|
|
35
|
+
@_hash['univapay_phone_number'] = 'univapay-phone-number'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
univapay_reference_id
|
|
43
|
+
univapay_customer_id
|
|
44
|
+
univapay_name
|
|
45
|
+
univapay_phone_number
|
|
46
|
+
]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for nullable fields
|
|
50
|
+
def self.nullables
|
|
51
|
+
[]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def initialize(univapay_reference_id: SKIP, univapay_customer_id: SKIP,
|
|
55
|
+
univapay_name: SKIP, univapay_phone_number: SKIP,
|
|
56
|
+
additional_properties: nil)
|
|
57
|
+
# Add additional model properties to the instance
|
|
58
|
+
additional_properties = {} if additional_properties.nil?
|
|
59
|
+
|
|
60
|
+
@univapay_reference_id = univapay_reference_id unless univapay_reference_id == SKIP
|
|
61
|
+
@univapay_customer_id = univapay_customer_id unless univapay_customer_id == SKIP
|
|
62
|
+
@univapay_name = univapay_name unless univapay_name == SKIP
|
|
63
|
+
@univapay_phone_number = univapay_phone_number unless univapay_phone_number == SKIP
|
|
64
|
+
@additional_properties = additional_properties
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Creates an instance of the object from a hash.
|
|
68
|
+
def self.from_hash(hash)
|
|
69
|
+
return nil unless hash
|
|
70
|
+
|
|
71
|
+
# Extract variables from the hash.
|
|
72
|
+
univapay_reference_id =
|
|
73
|
+
hash.key?('univapay-reference-id') ? hash['univapay-reference-id'] : SKIP
|
|
74
|
+
univapay_customer_id =
|
|
75
|
+
hash.key?('univapay-customer-id') ? hash['univapay-customer-id'] : SKIP
|
|
76
|
+
univapay_name = hash.key?('univapay-name') ? hash['univapay-name'] : SKIP
|
|
77
|
+
univapay_phone_number =
|
|
78
|
+
hash.key?('univapay-phone-number') ? hash['univapay-phone-number'] : 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 { |x|
|
|
85
|
+
APIHelper.deserialize_union_type(UnionTypeLookUp.get(:TransactionTokenCreateMetadataProps), x)
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
# Create object from extracted values.
|
|
90
|
+
TransactionTokenCreateRequestMetadata.new(univapay_reference_id: univapay_reference_id,
|
|
91
|
+
univapay_customer_id: univapay_customer_id,
|
|
92
|
+
univapay_name: univapay_name,
|
|
93
|
+
univapay_phone_number: univapay_phone_number,
|
|
94
|
+
additional_properties: additional_properties)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Validates an instance of the object from a given value.
|
|
98
|
+
# @param [TransactionTokenCreateRequestMetadata | Hash] The value against the validation is performed.
|
|
99
|
+
def self.validate(value)
|
|
100
|
+
return true if value.instance_of? self
|
|
101
|
+
|
|
102
|
+
return false unless value.instance_of? Hash
|
|
103
|
+
|
|
104
|
+
true
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Provides a human-readable string representation of the object.
|
|
108
|
+
def to_s
|
|
109
|
+
class_name = self.class.name.split('::').last
|
|
110
|
+
"<#{class_name} univapay_reference_id: #{@univapay_reference_id}, univapay_customer_id:"\
|
|
111
|
+
" #{@univapay_customer_id}, univapay_name: #{@univapay_name}, univapay_phone_number:"\
|
|
112
|
+
" #{@univapay_phone_number}, additional_properties: #{@additional_properties}>"
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
116
|
+
def inspect
|
|
117
|
+
class_name = self.class.name.split('::').last
|
|
118
|
+
"<#{class_name} univapay_reference_id: #{@univapay_reference_id.inspect},"\
|
|
119
|
+
" univapay_customer_id: #{@univapay_customer_id.inspect}, univapay_name:"\
|
|
120
|
+
" #{@univapay_name.inspect}, univapay_phone_number: #{@univapay_phone_number.inspect},"\
|
|
121
|
+
" additional_properties: #{@additional_properties}>"
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
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
|
+
# Transaction Token Create Request Payment Type schema.
|
|
8
|
+
class TransactionTokenCreateRequestPaymentType
|
|
9
|
+
TRANSACTION_TOKEN_CREATE_REQUEST_PAYMENT_TYPE = [
|
|
10
|
+
# TODO: Write general description for CARD
|
|
11
|
+
CARD = 'card'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ONLINE
|
|
14
|
+
ONLINE = 'online'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for KONBINI
|
|
17
|
+
KONBINI = 'konbini'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for BANK_TRANSFER
|
|
20
|
+
BANK_TRANSFER = 'bank_transfer'.freeze
|
|
21
|
+
].freeze
|
|
22
|
+
|
|
23
|
+
def self.validate(value)
|
|
24
|
+
return false if value.nil?
|
|
25
|
+
|
|
26
|
+
TRANSACTION_TOKEN_CREATE_REQUEST_PAYMENT_TYPE.include?(value)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = CARD)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'card' then CARD
|
|
36
|
+
when 'online' then ONLINE
|
|
37
|
+
when 'konbini' then KONBINI
|
|
38
|
+
when 'bank_transfer' then BANK_TRANSFER
|
|
39
|
+
else
|
|
40
|
+
default_value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
# Transaction Token Create Request Type schema.
|
|
8
|
+
class TransactionTokenCreateRequestType
|
|
9
|
+
TRANSACTION_TOKEN_CREATE_REQUEST_TYPE = [
|
|
10
|
+
# TODO: Write general description for ONE_TIME
|
|
11
|
+
ONE_TIME = 'one_time'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SUBSCRIPTION
|
|
14
|
+
SUBSCRIPTION = 'subscription'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for RECURRING
|
|
17
|
+
RECURRING = 'recurring'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
TRANSACTION_TOKEN_CREATE_REQUEST_TYPE.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = ONE_TIME)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'one_time' then ONE_TIME
|
|
33
|
+
when 'subscription' then SUBSCRIPTION
|
|
34
|
+
when 'recurring' then RECURRING
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|