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,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
|
+
# Paginated list of transaction tokens.
|
|
8
|
+
class TransactionTokenList < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# List of resources.
|
|
13
|
+
# @return [Array[TransactionTokenListItem]]
|
|
14
|
+
attr_accessor :items
|
|
15
|
+
|
|
16
|
+
# Whether more results are available.
|
|
17
|
+
# @return [TrueClass | FalseClass]
|
|
18
|
+
attr_accessor :has_more
|
|
19
|
+
|
|
20
|
+
# Total number of matching resources.
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :total_hits
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['items'] = 'items'
|
|
28
|
+
@_hash['has_more'] = 'has_more'
|
|
29
|
+
@_hash['total_hits'] = 'total_hits'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
items
|
|
37
|
+
has_more
|
|
38
|
+
total_hits
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(items: SKIP, has_more: SKIP, total_hits: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@items = items unless items == SKIP
|
|
53
|
+
@has_more = has_more unless has_more == SKIP
|
|
54
|
+
@total_hits = total_hits unless total_hits == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
# Parameter is an array, so we need to iterate through it
|
|
64
|
+
items = nil
|
|
65
|
+
unless hash['items'].nil?
|
|
66
|
+
items = []
|
|
67
|
+
hash['items'].each do |structure|
|
|
68
|
+
items << (TransactionTokenListItem.from_hash(structure) if structure)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
items = SKIP unless hash.key?('items')
|
|
73
|
+
has_more = hash.key?('has_more') ? hash['has_more'] : SKIP
|
|
74
|
+
total_hits = hash.key?('total_hits') ? hash['total_hits'] : SKIP
|
|
75
|
+
|
|
76
|
+
# Create a new hash for additional properties, removing known properties.
|
|
77
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
78
|
+
|
|
79
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
80
|
+
new_hash, proc { |value| value }
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
# Create object from extracted values.
|
|
84
|
+
TransactionTokenList.new(items: items,
|
|
85
|
+
has_more: has_more,
|
|
86
|
+
total_hits: total_hits,
|
|
87
|
+
additional_properties: additional_properties)
|
|
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} items: #{@items}, has_more: #{@has_more}, total_hits: #{@total_hits},"\
|
|
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} items: #{@items.inspect}, has_more: #{@has_more.inspect}, total_hits:"\
|
|
101
|
+
" #{@total_hits.inspect}, additional_properties: #{@additional_properties}>"
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
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
|
+
# Transaction token entry returned in list responses.
|
|
9
|
+
class TransactionTokenListItem < 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
|
+
# Merchant display name.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :merchant_name
|
|
24
|
+
|
|
25
|
+
# Store display name.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :store_name
|
|
28
|
+
|
|
29
|
+
# Customer email address.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :email
|
|
32
|
+
|
|
33
|
+
# Payment method type.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :payment_type
|
|
36
|
+
|
|
37
|
+
# Whether the resource is active.
|
|
38
|
+
# @return [TrueClass | FalseClass]
|
|
39
|
+
attr_accessor :active
|
|
40
|
+
|
|
41
|
+
# Processing mode for the resource.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :mode
|
|
44
|
+
|
|
45
|
+
# Type of the resource.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :type
|
|
48
|
+
|
|
49
|
+
# Timestamp when the resource was created.
|
|
50
|
+
# @return [DateTime]
|
|
51
|
+
attr_accessor :created_on
|
|
52
|
+
|
|
53
|
+
# Timestamp when the resource was last updated.
|
|
54
|
+
# @return [DateTime]
|
|
55
|
+
attr_accessor :updated_on
|
|
56
|
+
|
|
57
|
+
# Transaction Token List Item User Data schema.
|
|
58
|
+
# @return [TransactionTokenListItemUserData]
|
|
59
|
+
attr_accessor :user_data
|
|
60
|
+
|
|
61
|
+
# A mapping from model property names to API property names.
|
|
62
|
+
def self.names
|
|
63
|
+
@_hash = {} if @_hash.nil?
|
|
64
|
+
@_hash['id'] = 'id'
|
|
65
|
+
@_hash['store_id'] = 'store_id'
|
|
66
|
+
@_hash['merchant_name'] = 'merchant_name'
|
|
67
|
+
@_hash['store_name'] = 'store_name'
|
|
68
|
+
@_hash['email'] = 'email'
|
|
69
|
+
@_hash['payment_type'] = 'payment_type'
|
|
70
|
+
@_hash['active'] = 'active'
|
|
71
|
+
@_hash['mode'] = 'mode'
|
|
72
|
+
@_hash['type'] = 'type'
|
|
73
|
+
@_hash['created_on'] = 'created_on'
|
|
74
|
+
@_hash['updated_on'] = 'updated_on'
|
|
75
|
+
@_hash['user_data'] = 'user_data'
|
|
76
|
+
@_hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# An array for optional fields
|
|
80
|
+
def self.optionals
|
|
81
|
+
%w[
|
|
82
|
+
id
|
|
83
|
+
store_id
|
|
84
|
+
merchant_name
|
|
85
|
+
store_name
|
|
86
|
+
email
|
|
87
|
+
payment_type
|
|
88
|
+
active
|
|
89
|
+
mode
|
|
90
|
+
type
|
|
91
|
+
created_on
|
|
92
|
+
updated_on
|
|
93
|
+
user_data
|
|
94
|
+
]
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# An array for nullable fields
|
|
98
|
+
def self.nullables
|
|
99
|
+
[]
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def initialize(id: SKIP, store_id: SKIP, merchant_name: SKIP,
|
|
103
|
+
store_name: SKIP, email: SKIP, payment_type: SKIP,
|
|
104
|
+
active: SKIP, mode: SKIP, type: SKIP, created_on: SKIP,
|
|
105
|
+
updated_on: SKIP, user_data: SKIP,
|
|
106
|
+
additional_properties: nil)
|
|
107
|
+
# Add additional model properties to the instance
|
|
108
|
+
additional_properties = {} if additional_properties.nil?
|
|
109
|
+
|
|
110
|
+
@id = id unless id == SKIP
|
|
111
|
+
@store_id = store_id unless store_id == SKIP
|
|
112
|
+
@merchant_name = merchant_name unless merchant_name == SKIP
|
|
113
|
+
@store_name = store_name unless store_name == SKIP
|
|
114
|
+
@email = email unless email == SKIP
|
|
115
|
+
@payment_type = payment_type unless payment_type == SKIP
|
|
116
|
+
@active = active unless active == SKIP
|
|
117
|
+
@mode = mode unless mode == SKIP
|
|
118
|
+
@type = type unless type == SKIP
|
|
119
|
+
@created_on = created_on unless created_on == SKIP
|
|
120
|
+
@updated_on = updated_on unless updated_on == SKIP
|
|
121
|
+
@user_data = user_data unless user_data == SKIP
|
|
122
|
+
@additional_properties = additional_properties
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Creates an instance of the object from a hash.
|
|
126
|
+
def self.from_hash(hash)
|
|
127
|
+
return nil unless hash
|
|
128
|
+
|
|
129
|
+
# Extract variables from the hash.
|
|
130
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
131
|
+
store_id = hash.key?('store_id') ? hash['store_id'] : SKIP
|
|
132
|
+
merchant_name = hash.key?('merchant_name') ? hash['merchant_name'] : SKIP
|
|
133
|
+
store_name = hash.key?('store_name') ? hash['store_name'] : SKIP
|
|
134
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
135
|
+
payment_type = hash.key?('payment_type') ? hash['payment_type'] : SKIP
|
|
136
|
+
active = hash.key?('active') ? hash['active'] : SKIP
|
|
137
|
+
mode = hash.key?('mode') ? hash['mode'] : SKIP
|
|
138
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
139
|
+
created_on = if hash.key?('created_on')
|
|
140
|
+
(DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_on'])
|
|
141
|
+
else
|
|
142
|
+
SKIP
|
|
143
|
+
end
|
|
144
|
+
updated_on = if hash.key?('updated_on')
|
|
145
|
+
(DateTimeHelper.from_rfc3339(hash['updated_on']) if hash['updated_on'])
|
|
146
|
+
else
|
|
147
|
+
SKIP
|
|
148
|
+
end
|
|
149
|
+
user_data = TransactionTokenListItemUserData.from_hash(hash['user_data']) if
|
|
150
|
+
hash['user_data']
|
|
151
|
+
|
|
152
|
+
# Create a new hash for additional properties, removing known properties.
|
|
153
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
154
|
+
|
|
155
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
156
|
+
new_hash, proc { |value| value }
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
# Create object from extracted values.
|
|
160
|
+
TransactionTokenListItem.new(id: id,
|
|
161
|
+
store_id: store_id,
|
|
162
|
+
merchant_name: merchant_name,
|
|
163
|
+
store_name: store_name,
|
|
164
|
+
email: email,
|
|
165
|
+
payment_type: payment_type,
|
|
166
|
+
active: active,
|
|
167
|
+
mode: mode,
|
|
168
|
+
type: type,
|
|
169
|
+
created_on: created_on,
|
|
170
|
+
updated_on: updated_on,
|
|
171
|
+
user_data: user_data,
|
|
172
|
+
additional_properties: additional_properties)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
def to_custom_created_on
|
|
176
|
+
DateTimeHelper.to_rfc3339(created_on)
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
def to_custom_updated_on
|
|
180
|
+
DateTimeHelper.to_rfc3339(updated_on)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Provides a human-readable string representation of the object.
|
|
184
|
+
def to_s
|
|
185
|
+
class_name = self.class.name.split('::').last
|
|
186
|
+
"<#{class_name} id: #{@id}, store_id: #{@store_id}, merchant_name: #{@merchant_name},"\
|
|
187
|
+
" store_name: #{@store_name}, email: #{@email}, payment_type: #{@payment_type}, active:"\
|
|
188
|
+
" #{@active}, mode: #{@mode}, type: #{@type}, created_on: #{@created_on}, updated_on:"\
|
|
189
|
+
" #{@updated_on}, user_data: #{@user_data}, additional_properties:"\
|
|
190
|
+
" #{@additional_properties}>"
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
194
|
+
def inspect
|
|
195
|
+
class_name = self.class.name.split('::').last
|
|
196
|
+
"<#{class_name} id: #{@id.inspect}, store_id: #{@store_id.inspect}, merchant_name:"\
|
|
197
|
+
" #{@merchant_name.inspect}, store_name: #{@store_name.inspect}, email: #{@email.inspect},"\
|
|
198
|
+
" payment_type: #{@payment_type.inspect}, active: #{@active.inspect}, mode:"\
|
|
199
|
+
" #{@mode.inspect}, type: #{@type.inspect}, created_on: #{@created_on.inspect}, updated_on:"\
|
|
200
|
+
" #{@updated_on.inspect}, user_data: #{@user_data.inspect}, additional_properties:"\
|
|
201
|
+
" #{@additional_properties}>"
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
|
@@ -0,0 +1,96 @@
|
|
|
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 List Item User Data schema.
|
|
8
|
+
class TransactionTokenListItemUserData < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Cardholder name value.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :cardholder_name
|
|
15
|
+
|
|
16
|
+
# Customer email address.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :email
|
|
19
|
+
|
|
20
|
+
# Brand or network name.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :brand
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['cardholder_name'] = 'cardholder_name'
|
|
28
|
+
@_hash['email'] = 'email'
|
|
29
|
+
@_hash['brand'] = 'brand'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
cardholder_name
|
|
37
|
+
email
|
|
38
|
+
brand
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(cardholder_name: SKIP, email: SKIP, brand: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@cardholder_name = cardholder_name unless cardholder_name == SKIP
|
|
53
|
+
@email = email unless email == SKIP
|
|
54
|
+
@brand = brand unless brand == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
cardholder_name =
|
|
64
|
+
hash.key?('cardholder_name') ? hash['cardholder_name'] : SKIP
|
|
65
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
66
|
+
brand = hash.key?('brand') ? hash['brand'] : SKIP
|
|
67
|
+
|
|
68
|
+
# Create a new hash for additional properties, removing known properties.
|
|
69
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
70
|
+
|
|
71
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
72
|
+
new_hash, proc { |value| value }
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# Create object from extracted values.
|
|
76
|
+
TransactionTokenListItemUserData.new(cardholder_name: cardholder_name,
|
|
77
|
+
email: email,
|
|
78
|
+
brand: brand,
|
|
79
|
+
additional_properties: additional_properties)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Provides a human-readable string representation of the object.
|
|
83
|
+
def to_s
|
|
84
|
+
class_name = self.class.name.split('::').last
|
|
85
|
+
"<#{class_name} cardholder_name: #{@cardholder_name}, email: #{@email}, brand: #{@brand},"\
|
|
86
|
+
" additional_properties: #{@additional_properties}>"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
90
|
+
def inspect
|
|
91
|
+
class_name = self.class.name.split('::').last
|
|
92
|
+
"<#{class_name} cardholder_name: #{@cardholder_name.inspect}, email: #{@email.inspect},"\
|
|
93
|
+
" brand: #{@brand.inspect}, additional_properties: #{@additional_properties}>"
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# Transaction Token Mode schema.
|
|
8
|
+
class TransactionTokenMode
|
|
9
|
+
TRANSACTION_TOKEN_MODE = [
|
|
10
|
+
# TODO: Write general description for LIVE
|
|
11
|
+
LIVE = 'live'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for TEST
|
|
14
|
+
TEST = 'test'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
TRANSACTION_TOKEN_MODE.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = LIVE)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'live' then LIVE
|
|
30
|
+
when 'test' then TEST
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
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 Payment Type schema.
|
|
8
|
+
class TransactionTokenPaymentType
|
|
9
|
+
TRANSACTION_TOKEN_PAYMENT_TYPE = [
|
|
10
|
+
# TODO: Write general description for CARD
|
|
11
|
+
CARD = 'card'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for PAIDY
|
|
14
|
+
PAIDY = 'paidy'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for ONLINE
|
|
17
|
+
ONLINE = 'online'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for KONBINI
|
|
20
|
+
KONBINI = 'konbini'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for BANK_TRANSFER
|
|
23
|
+
BANK_TRANSFER = 'bank_transfer'.freeze
|
|
24
|
+
].freeze
|
|
25
|
+
|
|
26
|
+
def self.validate(value)
|
|
27
|
+
return false if value.nil?
|
|
28
|
+
|
|
29
|
+
TRANSACTION_TOKEN_PAYMENT_TYPE.include?(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.from_value(value, default_value = CARD)
|
|
33
|
+
return default_value if value.nil?
|
|
34
|
+
|
|
35
|
+
str = value.to_s.strip
|
|
36
|
+
|
|
37
|
+
case str.downcase
|
|
38
|
+
when 'card' then CARD
|
|
39
|
+
when 'paidy' then PAIDY
|
|
40
|
+
when 'online' then ONLINE
|
|
41
|
+
when 'konbini' then KONBINI
|
|
42
|
+
when 'bank_transfer' then BANK_TRANSFER
|
|
43
|
+
else
|
|
44
|
+
default_value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
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 Type schema.
|
|
8
|
+
class TransactionTokenType
|
|
9
|
+
TRANSACTION_TOKEN_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_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
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
# Request payload for updating a transaction token.
|
|
8
|
+
class TransactionTokenUpdateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Customer email address.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :email
|
|
15
|
+
|
|
16
|
+
# A free-form dictionary for custom metadata.
|
|
17
|
+
# @return [GenericMetadata]
|
|
18
|
+
attr_accessor :metadata
|
|
19
|
+
|
|
20
|
+
# Transaction Token Update Request Data schema.
|
|
21
|
+
# @return [TransactionTokenUpdateRequestData]
|
|
22
|
+
attr_accessor :data
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['email'] = 'email'
|
|
28
|
+
@_hash['metadata'] = 'metadata'
|
|
29
|
+
@_hash['data'] = 'data'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
email
|
|
37
|
+
metadata
|
|
38
|
+
data
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(email: SKIP, metadata: SKIP, data: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@email = email unless email == SKIP
|
|
53
|
+
@metadata = metadata unless metadata == SKIP
|
|
54
|
+
@data = data unless data == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
64
|
+
metadata = GenericMetadata.from_hash(hash['metadata']) if hash['metadata']
|
|
65
|
+
data = TransactionTokenUpdateRequestData.from_hash(hash['data']) if hash['data']
|
|
66
|
+
|
|
67
|
+
# Create a new hash for additional properties, removing known properties.
|
|
68
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
+
|
|
70
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
+
new_hash, proc { |value| value }
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Create object from extracted values.
|
|
75
|
+
TransactionTokenUpdateRequest.new(email: email,
|
|
76
|
+
metadata: metadata,
|
|
77
|
+
data: data,
|
|
78
|
+
additional_properties: additional_properties)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Provides a human-readable string representation of the object.
|
|
82
|
+
def to_s
|
|
83
|
+
class_name = self.class.name.split('::').last
|
|
84
|
+
"<#{class_name} email: #{@email}, metadata: #{@metadata}, data: #{@data},"\
|
|
85
|
+
" additional_properties: #{@additional_properties}>"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
89
|
+
def inspect
|
|
90
|
+
class_name = self.class.name.split('::').last
|
|
91
|
+
"<#{class_name} email: #{@email.inspect}, metadata: #{@metadata.inspect}, data:"\
|
|
92
|
+
" #{@data.inspect}, additional_properties: #{@additional_properties}>"
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|