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,134 @@
|
|
|
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 subscription.
|
|
8
|
+
class SubscriptionUpdateRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Transaction token ID used for the subscription. Can be changed to update
|
|
13
|
+
# the payment method (e.g., when a card expires). Allowed only when the
|
|
14
|
+
# status is `unconfirmed`, `unpaid`, `current`, or `suspended`.
|
|
15
|
+
# @return [UUID | String]
|
|
16
|
+
attr_accessor :transaction_token_id
|
|
17
|
+
|
|
18
|
+
# The recurring charge amount (applied to the cycle after the next one).
|
|
19
|
+
# Not available for limited-cycle subscriptions. To change the immediate
|
|
20
|
+
# next payment amount, update `next_payment.amount` instead.
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :amount
|
|
23
|
+
|
|
24
|
+
# A free-form dictionary for custom metadata.
|
|
25
|
+
# @return [GenericMetadata]
|
|
26
|
+
attr_accessor :metadata
|
|
27
|
+
|
|
28
|
+
# Update the subscription status. `suspended`: Pause the subscription.
|
|
29
|
+
# `unpaid`: Resume a suspended subscription.
|
|
30
|
+
# @return [SubscriptionUpdateStatus]
|
|
31
|
+
attr_accessor :status
|
|
32
|
+
|
|
33
|
+
# Schedule settings that can be updated on a subscription.
|
|
34
|
+
# @return [SubscriptionUpdateScheduleSettings]
|
|
35
|
+
attr_accessor :schedule_settings
|
|
36
|
+
|
|
37
|
+
# Fields that can be updated on the next scheduled payment.
|
|
38
|
+
# @return [SubscriptionUpdateNextPayment]
|
|
39
|
+
attr_accessor :next_payment
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['transaction_token_id'] = 'transaction_token_id'
|
|
45
|
+
@_hash['amount'] = 'amount'
|
|
46
|
+
@_hash['metadata'] = 'metadata'
|
|
47
|
+
@_hash['status'] = 'status'
|
|
48
|
+
@_hash['schedule_settings'] = 'schedule_settings'
|
|
49
|
+
@_hash['next_payment'] = 'next_payment'
|
|
50
|
+
@_hash
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for optional fields
|
|
54
|
+
def self.optionals
|
|
55
|
+
%w[
|
|
56
|
+
transaction_token_id
|
|
57
|
+
amount
|
|
58
|
+
metadata
|
|
59
|
+
status
|
|
60
|
+
schedule_settings
|
|
61
|
+
next_payment
|
|
62
|
+
]
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# An array for nullable fields
|
|
66
|
+
def self.nullables
|
|
67
|
+
[]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def initialize(transaction_token_id: SKIP, amount: SKIP, metadata: SKIP,
|
|
71
|
+
status: SKIP, schedule_settings: SKIP, next_payment: SKIP,
|
|
72
|
+
additional_properties: nil)
|
|
73
|
+
# Add additional model properties to the instance
|
|
74
|
+
additional_properties = {} if additional_properties.nil?
|
|
75
|
+
|
|
76
|
+
@transaction_token_id = transaction_token_id unless transaction_token_id == SKIP
|
|
77
|
+
@amount = amount unless amount == SKIP
|
|
78
|
+
@metadata = metadata unless metadata == SKIP
|
|
79
|
+
@status = status unless status == SKIP
|
|
80
|
+
@schedule_settings = schedule_settings unless schedule_settings == SKIP
|
|
81
|
+
@next_payment = next_payment unless next_payment == SKIP
|
|
82
|
+
@additional_properties = additional_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Creates an instance of the object from a hash.
|
|
86
|
+
def self.from_hash(hash)
|
|
87
|
+
return nil unless hash
|
|
88
|
+
|
|
89
|
+
# Extract variables from the hash.
|
|
90
|
+
transaction_token_id =
|
|
91
|
+
hash.key?('transaction_token_id') ? hash['transaction_token_id'] : SKIP
|
|
92
|
+
amount = hash.key?('amount') ? hash['amount'] : SKIP
|
|
93
|
+
metadata = GenericMetadata.from_hash(hash['metadata']) if hash['metadata']
|
|
94
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
95
|
+
schedule_settings = SubscriptionUpdateScheduleSettings.from_hash(hash['schedule_settings']) if
|
|
96
|
+
hash['schedule_settings']
|
|
97
|
+
next_payment = SubscriptionUpdateNextPayment.from_hash(hash['next_payment']) if
|
|
98
|
+
hash['next_payment']
|
|
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
|
+
SubscriptionUpdateRequest.new(transaction_token_id: transaction_token_id,
|
|
109
|
+
amount: amount,
|
|
110
|
+
metadata: metadata,
|
|
111
|
+
status: status,
|
|
112
|
+
schedule_settings: schedule_settings,
|
|
113
|
+
next_payment: next_payment,
|
|
114
|
+
additional_properties: additional_properties)
|
|
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} transaction_token_id: #{@transaction_token_id}, amount: #{@amount},"\
|
|
121
|
+
" metadata: #{@metadata}, status: #{@status}, schedule_settings: #{@schedule_settings},"\
|
|
122
|
+
" next_payment: #{@next_payment}, additional_properties: #{@additional_properties}>"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
126
|
+
def inspect
|
|
127
|
+
class_name = self.class.name.split('::').last
|
|
128
|
+
"<#{class_name} transaction_token_id: #{@transaction_token_id.inspect}, amount:"\
|
|
129
|
+
" #{@amount.inspect}, metadata: #{@metadata.inspect}, status: #{@status.inspect},"\
|
|
130
|
+
" schedule_settings: #{@schedule_settings.inspect}, next_payment: #{@next_payment.inspect},"\
|
|
131
|
+
" additional_properties: #{@additional_properties}>"
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
# Schedule settings that can be updated on a subscription.
|
|
9
|
+
class SubscriptionUpdateScheduleSettings < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Subscription Termination Mode schema.
|
|
14
|
+
# @return [SubscriptionTerminationMode]
|
|
15
|
+
attr_accessor :termination_mode
|
|
16
|
+
|
|
17
|
+
# Subscription start date. Used to change the first actual charge date for
|
|
18
|
+
# subscriptions that initially only registered a payment method.
|
|
19
|
+
# @return [DateTime]
|
|
20
|
+
attr_accessor :start_on
|
|
21
|
+
|
|
22
|
+
# ISO-8601 Duration for retry interval if payment fails (e.g., P3D for 3
|
|
23
|
+
# days, PT48H for 48 hours).
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :retry_interval
|
|
26
|
+
|
|
27
|
+
# A mapping from model property names to API property names.
|
|
28
|
+
def self.names
|
|
29
|
+
@_hash = {} if @_hash.nil?
|
|
30
|
+
@_hash['termination_mode'] = 'termination_mode'
|
|
31
|
+
@_hash['start_on'] = 'start_on'
|
|
32
|
+
@_hash['retry_interval'] = 'retry_interval'
|
|
33
|
+
@_hash
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for optional fields
|
|
37
|
+
def self.optionals
|
|
38
|
+
%w[
|
|
39
|
+
termination_mode
|
|
40
|
+
start_on
|
|
41
|
+
retry_interval
|
|
42
|
+
]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# An array for nullable fields
|
|
46
|
+
def self.nullables
|
|
47
|
+
[]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def initialize(termination_mode: SubscriptionTerminationMode::IMMEDIATE,
|
|
51
|
+
start_on: SKIP, retry_interval: SKIP,
|
|
52
|
+
additional_properties: nil)
|
|
53
|
+
# Add additional model properties to the instance
|
|
54
|
+
additional_properties = {} if additional_properties.nil?
|
|
55
|
+
|
|
56
|
+
@termination_mode = termination_mode unless termination_mode == SKIP
|
|
57
|
+
@start_on = start_on unless start_on == SKIP
|
|
58
|
+
@retry_interval = retry_interval unless retry_interval == SKIP
|
|
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
|
+
termination_mode =
|
|
68
|
+
hash['termination_mode'] ||= SubscriptionTerminationMode::IMMEDIATE
|
|
69
|
+
start_on = if hash.key?('start_on')
|
|
70
|
+
(DateTimeHelper.from_rfc3339(hash['start_on']) if hash['start_on'])
|
|
71
|
+
else
|
|
72
|
+
SKIP
|
|
73
|
+
end
|
|
74
|
+
retry_interval =
|
|
75
|
+
hash.key?('retry_interval') ? hash['retry_interval'] : SKIP
|
|
76
|
+
|
|
77
|
+
# Create a new hash for additional properties, removing known properties.
|
|
78
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
79
|
+
|
|
80
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
81
|
+
new_hash, proc { |value| value }
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Create object from extracted values.
|
|
85
|
+
SubscriptionUpdateScheduleSettings.new(termination_mode: termination_mode,
|
|
86
|
+
start_on: start_on,
|
|
87
|
+
retry_interval: retry_interval,
|
|
88
|
+
additional_properties: additional_properties)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def to_custom_start_on
|
|
92
|
+
DateTimeHelper.to_rfc3339(start_on)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Provides a human-readable string representation of the object.
|
|
96
|
+
def to_s
|
|
97
|
+
class_name = self.class.name.split('::').last
|
|
98
|
+
"<#{class_name} termination_mode: #{@termination_mode}, start_on: #{@start_on},"\
|
|
99
|
+
" retry_interval: #{@retry_interval}, additional_properties: #{@additional_properties}>"
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
103
|
+
def inspect
|
|
104
|
+
class_name = self.class.name.split('::').last
|
|
105
|
+
"<#{class_name} termination_mode: #{@termination_mode.inspect}, start_on:"\
|
|
106
|
+
" #{@start_on.inspect}, retry_interval: #{@retry_interval.inspect}, additional_properties:"\
|
|
107
|
+
" #{@additional_properties}>"
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
# Update the subscription status. `suspended`: Pause the subscription.
|
|
8
|
+
# `unpaid`: Resume a suspended subscription.
|
|
9
|
+
class SubscriptionUpdateStatus
|
|
10
|
+
SUBSCRIPTION_UPDATE_STATUS = [
|
|
11
|
+
# TODO: Write general description for SUSPENDED
|
|
12
|
+
SUSPENDED = 'suspended'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for UNPAID
|
|
15
|
+
UNPAID = 'unpaid'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
SUBSCRIPTION_UPDATE_STATUS.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = SUSPENDED)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'suspended' then SUSPENDED
|
|
31
|
+
when 'unpaid' then UNPAID
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
# Customer-facing payment method summary data.
|
|
8
|
+
class SubscriptionUserData < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Type of the resource.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :type
|
|
15
|
+
|
|
16
|
+
# Cardholder name value.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :cardholder_name
|
|
19
|
+
|
|
20
|
+
# Customer email address.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :email
|
|
23
|
+
|
|
24
|
+
# Brand or network name.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :brand
|
|
27
|
+
|
|
28
|
+
# Gateway identifier.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :gateway
|
|
31
|
+
|
|
32
|
+
# Service provider identifier.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :service_provider
|
|
35
|
+
|
|
36
|
+
# A mapping from model property names to API property names.
|
|
37
|
+
def self.names
|
|
38
|
+
@_hash = {} if @_hash.nil?
|
|
39
|
+
@_hash['type'] = 'type'
|
|
40
|
+
@_hash['cardholder_name'] = 'cardholder_name'
|
|
41
|
+
@_hash['email'] = 'email'
|
|
42
|
+
@_hash['brand'] = 'brand'
|
|
43
|
+
@_hash['gateway'] = 'gateway'
|
|
44
|
+
@_hash['service_provider'] = 'service_provider'
|
|
45
|
+
@_hash
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for optional fields
|
|
49
|
+
def self.optionals
|
|
50
|
+
%w[
|
|
51
|
+
type
|
|
52
|
+
cardholder_name
|
|
53
|
+
email
|
|
54
|
+
brand
|
|
55
|
+
gateway
|
|
56
|
+
service_provider
|
|
57
|
+
]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# An array for nullable fields
|
|
61
|
+
def self.nullables
|
|
62
|
+
%w[
|
|
63
|
+
cardholder_name
|
|
64
|
+
email
|
|
65
|
+
brand
|
|
66
|
+
gateway
|
|
67
|
+
service_provider
|
|
68
|
+
]
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def initialize(type: SKIP, cardholder_name: SKIP, email: SKIP, brand: SKIP,
|
|
72
|
+
gateway: SKIP, service_provider: SKIP,
|
|
73
|
+
additional_properties: nil)
|
|
74
|
+
# Add additional model properties to the instance
|
|
75
|
+
additional_properties = {} if additional_properties.nil?
|
|
76
|
+
|
|
77
|
+
@type = type unless type == SKIP
|
|
78
|
+
@cardholder_name = cardholder_name unless cardholder_name == SKIP
|
|
79
|
+
@email = email unless email == SKIP
|
|
80
|
+
@brand = brand unless brand == SKIP
|
|
81
|
+
@gateway = gateway unless gateway == SKIP
|
|
82
|
+
@service_provider = service_provider unless service_provider == SKIP
|
|
83
|
+
@additional_properties = additional_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Creates an instance of the object from a hash.
|
|
87
|
+
def self.from_hash(hash)
|
|
88
|
+
return nil unless hash
|
|
89
|
+
|
|
90
|
+
# Extract variables from the hash.
|
|
91
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
92
|
+
cardholder_name =
|
|
93
|
+
hash.key?('cardholder_name') ? hash['cardholder_name'] : SKIP
|
|
94
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
95
|
+
brand = hash.key?('brand') ? hash['brand'] : SKIP
|
|
96
|
+
gateway = hash.key?('gateway') ? hash['gateway'] : SKIP
|
|
97
|
+
service_provider =
|
|
98
|
+
hash.key?('service_provider') ? hash['service_provider'] : SKIP
|
|
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
|
+
SubscriptionUserData.new(type: type,
|
|
109
|
+
cardholder_name: cardholder_name,
|
|
110
|
+
email: email,
|
|
111
|
+
brand: brand,
|
|
112
|
+
gateway: gateway,
|
|
113
|
+
service_provider: service_provider,
|
|
114
|
+
additional_properties: additional_properties)
|
|
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} type: #{@type}, cardholder_name: #{@cardholder_name}, email: #{@email},"\
|
|
121
|
+
" brand: #{@brand}, gateway: #{@gateway}, service_provider: #{@service_provider},"\
|
|
122
|
+
" additional_properties: #{@additional_properties}>"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
126
|
+
def inspect
|
|
127
|
+
class_name = self.class.name.split('::').last
|
|
128
|
+
"<#{class_name} type: #{@type.inspect}, cardholder_name: #{@cardholder_name.inspect},"\
|
|
129
|
+
" email: #{@email.inspect}, brand: #{@brand.inspect}, gateway: #{@gateway.inspect},"\
|
|
130
|
+
" service_provider: #{@service_provider.inspect}, additional_properties:"\
|
|
131
|
+
" #{@additional_properties}>"
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
# Schedule-related settings.
|
|
8
|
+
class SuspendScheduleSettings < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Subscription Termination Mode schema.
|
|
13
|
+
# @return [SubscriptionTerminationMode]
|
|
14
|
+
attr_accessor :termination_mode
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['termination_mode'] = 'termination_mode'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
termination_mode
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(termination_mode: SubscriptionTerminationMode::IMMEDIATE,
|
|
36
|
+
additional_properties: nil)
|
|
37
|
+
# Add additional model properties to the instance
|
|
38
|
+
additional_properties = {} if additional_properties.nil?
|
|
39
|
+
|
|
40
|
+
@termination_mode = termination_mode unless termination_mode == SKIP
|
|
41
|
+
@additional_properties = additional_properties
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Creates an instance of the object from a hash.
|
|
45
|
+
def self.from_hash(hash)
|
|
46
|
+
return nil unless hash
|
|
47
|
+
|
|
48
|
+
# Extract variables from the hash.
|
|
49
|
+
termination_mode =
|
|
50
|
+
hash['termination_mode'] ||= SubscriptionTerminationMode::IMMEDIATE
|
|
51
|
+
|
|
52
|
+
# Create a new hash for additional properties, removing known properties.
|
|
53
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
54
|
+
|
|
55
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
56
|
+
new_hash, proc { |value| value }
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# Create object from extracted values.
|
|
60
|
+
SuspendScheduleSettings.new(termination_mode: termination_mode,
|
|
61
|
+
additional_properties: additional_properties)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Provides a human-readable string representation of the object.
|
|
65
|
+
def to_s
|
|
66
|
+
class_name = self.class.name.split('::').last
|
|
67
|
+
"<#{class_name} termination_mode: #{@termination_mode}, additional_properties:"\
|
|
68
|
+
" #{@additional_properties}>"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
72
|
+
def inspect
|
|
73
|
+
class_name = self.class.name.split('::').last
|
|
74
|
+
"<#{class_name} termination_mode: #{@termination_mode.inspect}, additional_properties:"\
|
|
75
|
+
" #{@additional_properties}>"
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
# 3-D Secure issuer token payload.
|
|
8
|
+
class ThreeDsIssuerToken < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Only 'card' is supported for 3-D Secure issuer tokens.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_reader :payment_type
|
|
15
|
+
|
|
16
|
+
# The 3-D Secure authentication URL to which the client must send the
|
|
17
|
+
# request.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :issuer_token
|
|
20
|
+
|
|
21
|
+
# Execution method. Currently, only 'http_post' is supported.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_reader :call_method
|
|
24
|
+
|
|
25
|
+
# Key-value pairs required to complete the payment action, or null if not
|
|
26
|
+
# applicable. Used when `call_method` is `http_post`. When present, this
|
|
27
|
+
# JSON must be converted by the client to match the expected `content_type`
|
|
28
|
+
# (e.g., transformed into an `application/x-www-form-urlencoded` string)
|
|
29
|
+
# before sending the POST request.
|
|
30
|
+
# @return [IssuerTokenPayload]
|
|
31
|
+
attr_accessor :payload
|
|
32
|
+
|
|
33
|
+
# The expected content type of the payload required by the card issuer's
|
|
34
|
+
# endpoint (e.g., 'application/x-www-form-urlencoded; charset=UTF-8').
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :content_type
|
|
37
|
+
|
|
38
|
+
# A mapping from model property names to API property names.
|
|
39
|
+
def self.names
|
|
40
|
+
@_hash = {} if @_hash.nil?
|
|
41
|
+
@_hash['payment_type'] = 'payment_type'
|
|
42
|
+
@_hash['issuer_token'] = 'issuer_token'
|
|
43
|
+
@_hash['call_method'] = 'call_method'
|
|
44
|
+
@_hash['payload'] = 'payload'
|
|
45
|
+
@_hash['content_type'] = 'content_type'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
%w[
|
|
52
|
+
payload
|
|
53
|
+
]
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# An array for nullable fields
|
|
57
|
+
def self.nullables
|
|
58
|
+
%w[
|
|
59
|
+
payload
|
|
60
|
+
]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def initialize(issuer_token:, content_type:, payload: SKIP,
|
|
64
|
+
additional_properties: nil)
|
|
65
|
+
# Add additional model properties to the instance
|
|
66
|
+
additional_properties = {} if additional_properties.nil?
|
|
67
|
+
|
|
68
|
+
@payment_type = 'card'
|
|
69
|
+
@issuer_token = issuer_token
|
|
70
|
+
@call_method = 'http_post'
|
|
71
|
+
@payload = payload unless payload == SKIP
|
|
72
|
+
@content_type = content_type
|
|
73
|
+
@additional_properties = additional_properties
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Creates an instance of the object from a hash.
|
|
77
|
+
def self.from_hash(hash)
|
|
78
|
+
return nil unless hash
|
|
79
|
+
|
|
80
|
+
# Extract variables from the hash.
|
|
81
|
+
issuer_token = hash.key?('issuer_token') ? hash['issuer_token'] : nil
|
|
82
|
+
content_type = hash.key?('content_type') ? hash['content_type'] : nil
|
|
83
|
+
payload = IssuerTokenPayload.from_hash(hash['payload']) if hash['payload']
|
|
84
|
+
|
|
85
|
+
# Create a new hash for additional properties, removing known properties.
|
|
86
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
87
|
+
|
|
88
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
89
|
+
new_hash, proc { |value| value }
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# Create object from extracted values.
|
|
93
|
+
ThreeDsIssuerToken.new(issuer_token: issuer_token,
|
|
94
|
+
content_type: content_type,
|
|
95
|
+
payload: payload,
|
|
96
|
+
additional_properties: additional_properties)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Provides a human-readable string representation of the object.
|
|
100
|
+
def to_s
|
|
101
|
+
class_name = self.class.name.split('::').last
|
|
102
|
+
"<#{class_name} payment_type: #{@payment_type}, issuer_token: #{@issuer_token},"\
|
|
103
|
+
" call_method: #{@call_method}, payload: #{@payload}, content_type: #{@content_type},"\
|
|
104
|
+
" additional_properties: #{@additional_properties}>"
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
108
|
+
def inspect
|
|
109
|
+
class_name = self.class.name.split('::').last
|
|
110
|
+
"<#{class_name} payment_type: #{@payment_type.inspect}, issuer_token:"\
|
|
111
|
+
" #{@issuer_token.inspect}, call_method: #{@call_method.inspect}, payload:"\
|
|
112
|
+
" #{@payload.inspect}, content_type: #{@content_type.inspect}, additional_properties:"\
|
|
113
|
+
" #{@additional_properties}>"
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
# Execution method. Currently, only 'http_post' is supported.
|
|
8
|
+
class ThreeDsIssuerTokenCallMethod
|
|
9
|
+
THREE_DS_ISSUER_TOKEN_CALL_METHOD = [
|
|
10
|
+
# TODO: Write general description for HTTP_POST
|
|
11
|
+
HTTP_POST = 'http_post'.freeze
|
|
12
|
+
].freeze
|
|
13
|
+
|
|
14
|
+
def self.validate(value)
|
|
15
|
+
return false if value.nil?
|
|
16
|
+
|
|
17
|
+
THREE_DS_ISSUER_TOKEN_CALL_METHOD.include?(value)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.from_value(value, default_value = HTTP_POST)
|
|
21
|
+
return default_value if value.nil?
|
|
22
|
+
|
|
23
|
+
default_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
# Only 'card' is supported for 3-D Secure issuer tokens.
|
|
8
|
+
class ThreeDsIssuerTokenPaymentType
|
|
9
|
+
THREE_DS_ISSUER_TOKEN_PAYMENT_TYPE = [
|
|
10
|
+
# TODO: Write general description for CARD
|
|
11
|
+
CARD = 'card'.freeze
|
|
12
|
+
].freeze
|
|
13
|
+
|
|
14
|
+
def self.validate(value)
|
|
15
|
+
return false if value.nil?
|
|
16
|
+
|
|
17
|
+
THREE_DS_ISSUER_TOKEN_PAYMENT_TYPE.include?(value)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.from_value(value, default_value = CARD)
|
|
21
|
+
return default_value if value.nil?
|
|
22
|
+
|
|
23
|
+
default_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|