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,74 @@
|
|
|
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
|
+
# Cancel-specific webhook payload extension.
|
|
8
|
+
class CancelWebhookCallbackExtension < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Represents a cancellation request for a charge.
|
|
13
|
+
# @return [Cancel]
|
|
14
|
+
attr_accessor :data
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['data'] = 'data'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
data
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(data: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@data = data unless data == SKIP
|
|
40
|
+
@additional_properties = additional_properties
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Creates an instance of the object from a hash.
|
|
44
|
+
def self.from_hash(hash)
|
|
45
|
+
return nil unless hash
|
|
46
|
+
|
|
47
|
+
# Extract variables from the hash.
|
|
48
|
+
data = Cancel.from_hash(hash['data']) if hash['data']
|
|
49
|
+
|
|
50
|
+
# Create a new hash for additional properties, removing known properties.
|
|
51
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
52
|
+
|
|
53
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
54
|
+
new_hash, proc { |value| value }
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
# Create object from extracted values.
|
|
58
|
+
CancelWebhookCallbackExtension.new(data: data,
|
|
59
|
+
additional_properties: additional_properties)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Provides a human-readable string representation of the object.
|
|
63
|
+
def to_s
|
|
64
|
+
class_name = self.class.name.split('::').last
|
|
65
|
+
"<#{class_name} data: #{@data}, additional_properties: #{@additional_properties}>"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
69
|
+
def inspect
|
|
70
|
+
class_name = self.class.name.split('::').last
|
|
71
|
+
"<#{class_name} data: #{@data.inspect}, additional_properties: #{@additional_properties}>"
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
# Card-processor capabilities available for installment payments.
|
|
8
|
+
class CardProcessorInstallmentConfig < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Allows revolving payments through supported processors.
|
|
13
|
+
# @return [TrueClass | FalseClass]
|
|
14
|
+
attr_accessor :revolving
|
|
15
|
+
|
|
16
|
+
# Allows fixed-cycle installment payments through supported processors.
|
|
17
|
+
# @return [TrueClass | FalseClass]
|
|
18
|
+
attr_accessor :fixed_cycle
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['revolving'] = 'revolving'
|
|
24
|
+
@_hash['fixed_cycle'] = 'fixed_cycle'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
revolving
|
|
32
|
+
fixed_cycle
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
%w[
|
|
39
|
+
revolving
|
|
40
|
+
fixed_cycle
|
|
41
|
+
]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def initialize(revolving: SKIP, fixed_cycle: SKIP,
|
|
45
|
+
additional_properties: nil)
|
|
46
|
+
# Add additional model properties to the instance
|
|
47
|
+
additional_properties = {} if additional_properties.nil?
|
|
48
|
+
|
|
49
|
+
@revolving = revolving unless revolving == SKIP
|
|
50
|
+
@fixed_cycle = fixed_cycle unless fixed_cycle == SKIP
|
|
51
|
+
@additional_properties = additional_properties
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Creates an instance of the object from a hash.
|
|
55
|
+
def self.from_hash(hash)
|
|
56
|
+
return nil unless hash
|
|
57
|
+
|
|
58
|
+
# Extract variables from the hash.
|
|
59
|
+
revolving = hash.key?('revolving') ? hash['revolving'] : SKIP
|
|
60
|
+
fixed_cycle = hash.key?('fixed_cycle') ? hash['fixed_cycle'] : SKIP
|
|
61
|
+
|
|
62
|
+
# Create a new hash for additional properties, removing known properties.
|
|
63
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
64
|
+
|
|
65
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
66
|
+
new_hash, proc { |value| value }
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
# Create object from extracted values.
|
|
70
|
+
CardProcessorInstallmentConfig.new(revolving: revolving,
|
|
71
|
+
fixed_cycle: fixed_cycle,
|
|
72
|
+
additional_properties: additional_properties)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Provides a human-readable string representation of the object.
|
|
76
|
+
def to_s
|
|
77
|
+
class_name = self.class.name.split('::').last
|
|
78
|
+
"<#{class_name} revolving: #{@revolving}, fixed_cycle: #{@fixed_cycle},"\
|
|
79
|
+
" additional_properties: #{@additional_properties}>"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
83
|
+
def inspect
|
|
84
|
+
class_name = self.class.name.split('::').last
|
|
85
|
+
"<#{class_name} revolving: #{@revolving.inspect}, fixed_cycle: #{@fixed_cycle.inspect},"\
|
|
86
|
+
" additional_properties: #{@additional_properties}>"
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
@@ -0,0 +1,411 @@
|
|
|
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
|
+
# Charge resource returned by the payments API.
|
|
9
|
+
class Charge < 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
|
+
# Transaction token identifier.
|
|
22
|
+
# @return [UUID | String]
|
|
23
|
+
attr_accessor :transaction_token_id
|
|
24
|
+
|
|
25
|
+
# Charge Transaction Token Type schema.
|
|
26
|
+
# @return [ChargeTransactionTokenType]
|
|
27
|
+
attr_accessor :transaction_token_type
|
|
28
|
+
|
|
29
|
+
# Subscription identifier.
|
|
30
|
+
# @return [UUID | String]
|
|
31
|
+
attr_accessor :subscription_id
|
|
32
|
+
|
|
33
|
+
# Merchant-defined transaction identifier.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :merchant_transaction_id
|
|
36
|
+
|
|
37
|
+
# Requested amount in the smallest currency unit.
|
|
38
|
+
# @return [Integer]
|
|
39
|
+
attr_accessor :requested_amount
|
|
40
|
+
|
|
41
|
+
# Requested ISO-4217 currency code.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :requested_currency
|
|
44
|
+
|
|
45
|
+
# Requested amount formatted for display.
|
|
46
|
+
# @return [Float]
|
|
47
|
+
attr_accessor :requested_amount_formatted
|
|
48
|
+
|
|
49
|
+
# Charged amount in the smallest currency unit.
|
|
50
|
+
# @return [Integer]
|
|
51
|
+
attr_accessor :charged_amount
|
|
52
|
+
|
|
53
|
+
# Charged ISO-4217 currency code.
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :charged_currency
|
|
56
|
+
|
|
57
|
+
# Charged amount formatted for display.
|
|
58
|
+
# @return [Float]
|
|
59
|
+
attr_accessor :charged_amount_formatted
|
|
60
|
+
|
|
61
|
+
# Fee amount in the smallest currency unit.
|
|
62
|
+
# @return [Integer]
|
|
63
|
+
attr_accessor :fee_amount
|
|
64
|
+
|
|
65
|
+
# Fee ISO-4217 currency code.
|
|
66
|
+
# @return [String]
|
|
67
|
+
attr_accessor :fee_currency
|
|
68
|
+
|
|
69
|
+
# Fee amount formatted for display.
|
|
70
|
+
# @return [Float]
|
|
71
|
+
attr_accessor :fee_amount_formatted
|
|
72
|
+
|
|
73
|
+
# Whether only direct currency processing is allowed.
|
|
74
|
+
# @return [TrueClass | FalseClass]
|
|
75
|
+
attr_accessor :only_direct_currency
|
|
76
|
+
|
|
77
|
+
# Timestamp when capture should occur.
|
|
78
|
+
# @return [DateTime]
|
|
79
|
+
attr_accessor :capture_at
|
|
80
|
+
|
|
81
|
+
# Billing descriptor.
|
|
82
|
+
# @return [String]
|
|
83
|
+
attr_accessor :descriptor
|
|
84
|
+
|
|
85
|
+
# Billing descriptor phone number.
|
|
86
|
+
# @return [String]
|
|
87
|
+
attr_accessor :descriptor_phone_number
|
|
88
|
+
|
|
89
|
+
# Charge Status schema.
|
|
90
|
+
# @return [ChargeStatus]
|
|
91
|
+
attr_accessor :status
|
|
92
|
+
|
|
93
|
+
# Payment error details, or null if successful.
|
|
94
|
+
# @return [PaymentError]
|
|
95
|
+
attr_accessor :error
|
|
96
|
+
|
|
97
|
+
# A free-form dictionary for custom metadata.
|
|
98
|
+
# @return [GenericMetadata]
|
|
99
|
+
attr_accessor :metadata
|
|
100
|
+
|
|
101
|
+
# Charge Mode schema.
|
|
102
|
+
# @return [ChargeMode]
|
|
103
|
+
attr_accessor :mode
|
|
104
|
+
|
|
105
|
+
# Timestamp when the resource was created.
|
|
106
|
+
# @return [DateTime]
|
|
107
|
+
attr_accessor :created_on
|
|
108
|
+
|
|
109
|
+
# Merchant display name.
|
|
110
|
+
# @return [String]
|
|
111
|
+
attr_accessor :merchant_name
|
|
112
|
+
|
|
113
|
+
# Store display name.
|
|
114
|
+
# @return [String]
|
|
115
|
+
attr_accessor :store_name
|
|
116
|
+
|
|
117
|
+
# Charge Redirect schema.
|
|
118
|
+
# @return [ChargeRedirect]
|
|
119
|
+
attr_accessor :redirect
|
|
120
|
+
|
|
121
|
+
# Charge Three Ds schema.
|
|
122
|
+
# @return [ChargeThreeDs]
|
|
123
|
+
attr_accessor :three_ds
|
|
124
|
+
|
|
125
|
+
# A mapping from model property names to API property names.
|
|
126
|
+
def self.names
|
|
127
|
+
@_hash = {} if @_hash.nil?
|
|
128
|
+
@_hash['id'] = 'id'
|
|
129
|
+
@_hash['store_id'] = 'store_id'
|
|
130
|
+
@_hash['transaction_token_id'] = 'transaction_token_id'
|
|
131
|
+
@_hash['transaction_token_type'] = 'transaction_token_type'
|
|
132
|
+
@_hash['subscription_id'] = 'subscription_id'
|
|
133
|
+
@_hash['merchant_transaction_id'] = 'merchant_transaction_id'
|
|
134
|
+
@_hash['requested_amount'] = 'requested_amount'
|
|
135
|
+
@_hash['requested_currency'] = 'requested_currency'
|
|
136
|
+
@_hash['requested_amount_formatted'] = 'requested_amount_formatted'
|
|
137
|
+
@_hash['charged_amount'] = 'charged_amount'
|
|
138
|
+
@_hash['charged_currency'] = 'charged_currency'
|
|
139
|
+
@_hash['charged_amount_formatted'] = 'charged_amount_formatted'
|
|
140
|
+
@_hash['fee_amount'] = 'fee_amount'
|
|
141
|
+
@_hash['fee_currency'] = 'fee_currency'
|
|
142
|
+
@_hash['fee_amount_formatted'] = 'fee_amount_formatted'
|
|
143
|
+
@_hash['only_direct_currency'] = 'only_direct_currency'
|
|
144
|
+
@_hash['capture_at'] = 'capture_at'
|
|
145
|
+
@_hash['descriptor'] = 'descriptor'
|
|
146
|
+
@_hash['descriptor_phone_number'] = 'descriptor_phone_number'
|
|
147
|
+
@_hash['status'] = 'status'
|
|
148
|
+
@_hash['error'] = 'error'
|
|
149
|
+
@_hash['metadata'] = 'metadata'
|
|
150
|
+
@_hash['mode'] = 'mode'
|
|
151
|
+
@_hash['created_on'] = 'created_on'
|
|
152
|
+
@_hash['merchant_name'] = 'merchant_name'
|
|
153
|
+
@_hash['store_name'] = 'store_name'
|
|
154
|
+
@_hash['redirect'] = 'redirect'
|
|
155
|
+
@_hash['three_ds'] = 'three_ds'
|
|
156
|
+
@_hash
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# An array for optional fields
|
|
160
|
+
def self.optionals
|
|
161
|
+
%w[
|
|
162
|
+
id
|
|
163
|
+
store_id
|
|
164
|
+
transaction_token_id
|
|
165
|
+
transaction_token_type
|
|
166
|
+
subscription_id
|
|
167
|
+
merchant_transaction_id
|
|
168
|
+
requested_amount
|
|
169
|
+
requested_currency
|
|
170
|
+
requested_amount_formatted
|
|
171
|
+
charged_amount
|
|
172
|
+
charged_currency
|
|
173
|
+
charged_amount_formatted
|
|
174
|
+
fee_amount
|
|
175
|
+
fee_currency
|
|
176
|
+
fee_amount_formatted
|
|
177
|
+
only_direct_currency
|
|
178
|
+
capture_at
|
|
179
|
+
descriptor
|
|
180
|
+
descriptor_phone_number
|
|
181
|
+
status
|
|
182
|
+
error
|
|
183
|
+
metadata
|
|
184
|
+
mode
|
|
185
|
+
created_on
|
|
186
|
+
merchant_name
|
|
187
|
+
store_name
|
|
188
|
+
redirect
|
|
189
|
+
three_ds
|
|
190
|
+
]
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# An array for nullable fields
|
|
194
|
+
def self.nullables
|
|
195
|
+
%w[
|
|
196
|
+
subscription_id
|
|
197
|
+
merchant_transaction_id
|
|
198
|
+
charged_amount
|
|
199
|
+
charged_currency
|
|
200
|
+
charged_amount_formatted
|
|
201
|
+
fee_amount
|
|
202
|
+
fee_currency
|
|
203
|
+
fee_amount_formatted
|
|
204
|
+
capture_at
|
|
205
|
+
descriptor
|
|
206
|
+
descriptor_phone_number
|
|
207
|
+
error
|
|
208
|
+
]
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
def initialize(id: SKIP, store_id: SKIP, transaction_token_id: SKIP,
|
|
212
|
+
transaction_token_type: SKIP, subscription_id: SKIP,
|
|
213
|
+
merchant_transaction_id: SKIP, requested_amount: SKIP,
|
|
214
|
+
requested_currency: SKIP, requested_amount_formatted: SKIP,
|
|
215
|
+
charged_amount: SKIP, charged_currency: SKIP,
|
|
216
|
+
charged_amount_formatted: SKIP, fee_amount: SKIP,
|
|
217
|
+
fee_currency: SKIP, fee_amount_formatted: SKIP,
|
|
218
|
+
only_direct_currency: SKIP, capture_at: SKIP,
|
|
219
|
+
descriptor: SKIP, descriptor_phone_number: SKIP,
|
|
220
|
+
status: SKIP, error: SKIP, metadata: SKIP, mode: SKIP,
|
|
221
|
+
created_on: SKIP, merchant_name: SKIP, store_name: SKIP,
|
|
222
|
+
redirect: SKIP, three_ds: SKIP, additional_properties: nil)
|
|
223
|
+
# Add additional model properties to the instance
|
|
224
|
+
additional_properties = {} if additional_properties.nil?
|
|
225
|
+
|
|
226
|
+
@id = id unless id == SKIP
|
|
227
|
+
@store_id = store_id unless store_id == SKIP
|
|
228
|
+
@transaction_token_id = transaction_token_id unless transaction_token_id == SKIP
|
|
229
|
+
@transaction_token_type = transaction_token_type unless transaction_token_type == SKIP
|
|
230
|
+
@subscription_id = subscription_id unless subscription_id == SKIP
|
|
231
|
+
@merchant_transaction_id = merchant_transaction_id unless merchant_transaction_id == SKIP
|
|
232
|
+
@requested_amount = requested_amount unless requested_amount == SKIP
|
|
233
|
+
@requested_currency = requested_currency unless requested_currency == SKIP
|
|
234
|
+
unless requested_amount_formatted == SKIP
|
|
235
|
+
@requested_amount_formatted =
|
|
236
|
+
requested_amount_formatted
|
|
237
|
+
end
|
|
238
|
+
@charged_amount = charged_amount unless charged_amount == SKIP
|
|
239
|
+
@charged_currency = charged_currency unless charged_currency == SKIP
|
|
240
|
+
@charged_amount_formatted = charged_amount_formatted unless charged_amount_formatted == SKIP
|
|
241
|
+
@fee_amount = fee_amount unless fee_amount == SKIP
|
|
242
|
+
@fee_currency = fee_currency unless fee_currency == SKIP
|
|
243
|
+
@fee_amount_formatted = fee_amount_formatted unless fee_amount_formatted == SKIP
|
|
244
|
+
@only_direct_currency = only_direct_currency unless only_direct_currency == SKIP
|
|
245
|
+
@capture_at = capture_at unless capture_at == SKIP
|
|
246
|
+
@descriptor = descriptor unless descriptor == SKIP
|
|
247
|
+
@descriptor_phone_number = descriptor_phone_number unless descriptor_phone_number == SKIP
|
|
248
|
+
@status = status unless status == SKIP
|
|
249
|
+
@error = error unless error == SKIP
|
|
250
|
+
@metadata = metadata unless metadata == SKIP
|
|
251
|
+
@mode = mode unless mode == SKIP
|
|
252
|
+
@created_on = created_on unless created_on == SKIP
|
|
253
|
+
@merchant_name = merchant_name unless merchant_name == SKIP
|
|
254
|
+
@store_name = store_name unless store_name == SKIP
|
|
255
|
+
@redirect = redirect unless redirect == SKIP
|
|
256
|
+
@three_ds = three_ds unless three_ds == SKIP
|
|
257
|
+
@additional_properties = additional_properties
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Creates an instance of the object from a hash.
|
|
261
|
+
def self.from_hash(hash)
|
|
262
|
+
return nil unless hash
|
|
263
|
+
|
|
264
|
+
# Extract variables from the hash.
|
|
265
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
266
|
+
store_id = hash.key?('store_id') ? hash['store_id'] : SKIP
|
|
267
|
+
transaction_token_id =
|
|
268
|
+
hash.key?('transaction_token_id') ? hash['transaction_token_id'] : SKIP
|
|
269
|
+
transaction_token_type =
|
|
270
|
+
hash.key?('transaction_token_type') ? hash['transaction_token_type'] : SKIP
|
|
271
|
+
subscription_id =
|
|
272
|
+
hash.key?('subscription_id') ? hash['subscription_id'] : SKIP
|
|
273
|
+
merchant_transaction_id =
|
|
274
|
+
hash.key?('merchant_transaction_id') ? hash['merchant_transaction_id'] : SKIP
|
|
275
|
+
requested_amount =
|
|
276
|
+
hash.key?('requested_amount') ? hash['requested_amount'] : SKIP
|
|
277
|
+
requested_currency =
|
|
278
|
+
hash.key?('requested_currency') ? hash['requested_currency'] : SKIP
|
|
279
|
+
requested_amount_formatted =
|
|
280
|
+
hash.key?('requested_amount_formatted') ? hash['requested_amount_formatted'] : SKIP
|
|
281
|
+
charged_amount =
|
|
282
|
+
hash.key?('charged_amount') ? hash['charged_amount'] : SKIP
|
|
283
|
+
charged_currency =
|
|
284
|
+
hash.key?('charged_currency') ? hash['charged_currency'] : SKIP
|
|
285
|
+
charged_amount_formatted =
|
|
286
|
+
hash.key?('charged_amount_formatted') ? hash['charged_amount_formatted'] : SKIP
|
|
287
|
+
fee_amount = hash.key?('fee_amount') ? hash['fee_amount'] : SKIP
|
|
288
|
+
fee_currency = hash.key?('fee_currency') ? hash['fee_currency'] : SKIP
|
|
289
|
+
fee_amount_formatted =
|
|
290
|
+
hash.key?('fee_amount_formatted') ? hash['fee_amount_formatted'] : SKIP
|
|
291
|
+
only_direct_currency =
|
|
292
|
+
hash.key?('only_direct_currency') ? hash['only_direct_currency'] : SKIP
|
|
293
|
+
capture_at = if hash.key?('capture_at')
|
|
294
|
+
(DateTimeHelper.from_rfc3339(hash['capture_at']) if hash['capture_at'])
|
|
295
|
+
else
|
|
296
|
+
SKIP
|
|
297
|
+
end
|
|
298
|
+
descriptor = hash.key?('descriptor') ? hash['descriptor'] : SKIP
|
|
299
|
+
descriptor_phone_number =
|
|
300
|
+
hash.key?('descriptor_phone_number') ? hash['descriptor_phone_number'] : SKIP
|
|
301
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
302
|
+
error = PaymentError.from_hash(hash['error']) if hash['error']
|
|
303
|
+
metadata = GenericMetadata.from_hash(hash['metadata']) if hash['metadata']
|
|
304
|
+
mode = hash.key?('mode') ? hash['mode'] : SKIP
|
|
305
|
+
created_on = if hash.key?('created_on')
|
|
306
|
+
(DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_on'])
|
|
307
|
+
else
|
|
308
|
+
SKIP
|
|
309
|
+
end
|
|
310
|
+
merchant_name = hash.key?('merchant_name') ? hash['merchant_name'] : SKIP
|
|
311
|
+
store_name = hash.key?('store_name') ? hash['store_name'] : SKIP
|
|
312
|
+
redirect = ChargeRedirect.from_hash(hash['redirect']) if hash['redirect']
|
|
313
|
+
three_ds = ChargeThreeDs.from_hash(hash['three_ds']) if hash['three_ds']
|
|
314
|
+
|
|
315
|
+
# Create a new hash for additional properties, removing known properties.
|
|
316
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
317
|
+
|
|
318
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
319
|
+
new_hash, proc { |value| value }
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
# Create object from extracted values.
|
|
323
|
+
Charge.new(id: id,
|
|
324
|
+
store_id: store_id,
|
|
325
|
+
transaction_token_id: transaction_token_id,
|
|
326
|
+
transaction_token_type: transaction_token_type,
|
|
327
|
+
subscription_id: subscription_id,
|
|
328
|
+
merchant_transaction_id: merchant_transaction_id,
|
|
329
|
+
requested_amount: requested_amount,
|
|
330
|
+
requested_currency: requested_currency,
|
|
331
|
+
requested_amount_formatted: requested_amount_formatted,
|
|
332
|
+
charged_amount: charged_amount,
|
|
333
|
+
charged_currency: charged_currency,
|
|
334
|
+
charged_amount_formatted: charged_amount_formatted,
|
|
335
|
+
fee_amount: fee_amount,
|
|
336
|
+
fee_currency: fee_currency,
|
|
337
|
+
fee_amount_formatted: fee_amount_formatted,
|
|
338
|
+
only_direct_currency: only_direct_currency,
|
|
339
|
+
capture_at: capture_at,
|
|
340
|
+
descriptor: descriptor,
|
|
341
|
+
descriptor_phone_number: descriptor_phone_number,
|
|
342
|
+
status: status,
|
|
343
|
+
error: error,
|
|
344
|
+
metadata: metadata,
|
|
345
|
+
mode: mode,
|
|
346
|
+
created_on: created_on,
|
|
347
|
+
merchant_name: merchant_name,
|
|
348
|
+
store_name: store_name,
|
|
349
|
+
redirect: redirect,
|
|
350
|
+
three_ds: three_ds,
|
|
351
|
+
additional_properties: additional_properties)
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
def to_custom_capture_at
|
|
355
|
+
DateTimeHelper.to_rfc3339(capture_at)
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
def to_custom_created_on
|
|
359
|
+
DateTimeHelper.to_rfc3339(created_on)
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Validates an instance of the object from a given value.
|
|
363
|
+
# @param [Charge | Hash] The value against the validation is performed.
|
|
364
|
+
def self.validate(value)
|
|
365
|
+
return true if value.instance_of? self
|
|
366
|
+
|
|
367
|
+
return false unless value.instance_of? Hash
|
|
368
|
+
|
|
369
|
+
true
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Provides a human-readable string representation of the object.
|
|
373
|
+
def to_s
|
|
374
|
+
class_name = self.class.name.split('::').last
|
|
375
|
+
"<#{class_name} id: #{@id}, store_id: #{@store_id}, transaction_token_id:"\
|
|
376
|
+
" #{@transaction_token_id}, transaction_token_type: #{@transaction_token_type},"\
|
|
377
|
+
" subscription_id: #{@subscription_id}, merchant_transaction_id:"\
|
|
378
|
+
" #{@merchant_transaction_id}, requested_amount: #{@requested_amount}, requested_currency:"\
|
|
379
|
+
" #{@requested_currency}, requested_amount_formatted: #{@requested_amount_formatted},"\
|
|
380
|
+
" charged_amount: #{@charged_amount}, charged_currency: #{@charged_currency},"\
|
|
381
|
+
" charged_amount_formatted: #{@charged_amount_formatted}, fee_amount: #{@fee_amount},"\
|
|
382
|
+
" fee_currency: #{@fee_currency}, fee_amount_formatted: #{@fee_amount_formatted},"\
|
|
383
|
+
" only_direct_currency: #{@only_direct_currency}, capture_at: #{@capture_at}, descriptor:"\
|
|
384
|
+
" #{@descriptor}, descriptor_phone_number: #{@descriptor_phone_number}, status: #{@status},"\
|
|
385
|
+
" error: #{@error}, metadata: #{@metadata}, mode: #{@mode}, created_on: #{@created_on},"\
|
|
386
|
+
" merchant_name: #{@merchant_name}, store_name: #{@store_name}, redirect: #{@redirect},"\
|
|
387
|
+
" three_ds: #{@three_ds}, additional_properties: #{@additional_properties}>"
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
391
|
+
def inspect
|
|
392
|
+
class_name = self.class.name.split('::').last
|
|
393
|
+
"<#{class_name} id: #{@id.inspect}, store_id: #{@store_id.inspect}, transaction_token_id:"\
|
|
394
|
+
" #{@transaction_token_id.inspect}, transaction_token_type:"\
|
|
395
|
+
" #{@transaction_token_type.inspect}, subscription_id: #{@subscription_id.inspect},"\
|
|
396
|
+
" merchant_transaction_id: #{@merchant_transaction_id.inspect}, requested_amount:"\
|
|
397
|
+
" #{@requested_amount.inspect}, requested_currency: #{@requested_currency.inspect},"\
|
|
398
|
+
" requested_amount_formatted: #{@requested_amount_formatted.inspect}, charged_amount:"\
|
|
399
|
+
" #{@charged_amount.inspect}, charged_currency: #{@charged_currency.inspect},"\
|
|
400
|
+
" charged_amount_formatted: #{@charged_amount_formatted.inspect}, fee_amount:"\
|
|
401
|
+
" #{@fee_amount.inspect}, fee_currency: #{@fee_currency.inspect}, fee_amount_formatted:"\
|
|
402
|
+
" #{@fee_amount_formatted.inspect}, only_direct_currency: #{@only_direct_currency.inspect},"\
|
|
403
|
+
" capture_at: #{@capture_at.inspect}, descriptor: #{@descriptor.inspect},"\
|
|
404
|
+
" descriptor_phone_number: #{@descriptor_phone_number.inspect}, status: #{@status.inspect},"\
|
|
405
|
+
" error: #{@error.inspect}, metadata: #{@metadata.inspect}, mode: #{@mode.inspect},"\
|
|
406
|
+
" created_on: #{@created_on.inspect}, merchant_name: #{@merchant_name.inspect}, store_name:"\
|
|
407
|
+
" #{@store_name.inspect}, redirect: #{@redirect.inspect}, three_ds: #{@three_ds.inspect},"\
|
|
408
|
+
" additional_properties: #{@additional_properties}>"
|
|
409
|
+
end
|
|
410
|
+
end
|
|
411
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
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 capturing an authorized charge.
|
|
8
|
+
class ChargeCaptureRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The amount to capture. Must be less than or equal to the authorized
|
|
13
|
+
# amount.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :amount
|
|
16
|
+
|
|
17
|
+
# ISO-4217 currency code. Must exactly match the currency used during
|
|
18
|
+
# authorization.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :currency
|
|
21
|
+
|
|
22
|
+
# A mapping from model property names to API property names.
|
|
23
|
+
def self.names
|
|
24
|
+
@_hash = {} if @_hash.nil?
|
|
25
|
+
@_hash['amount'] = 'amount'
|
|
26
|
+
@_hash['currency'] = 'currency'
|
|
27
|
+
@_hash
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for optional fields
|
|
31
|
+
def self.optionals
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(amount:, currency:, additional_properties: nil)
|
|
41
|
+
# Add additional model properties to the instance
|
|
42
|
+
additional_properties = {} if additional_properties.nil?
|
|
43
|
+
|
|
44
|
+
@amount = amount
|
|
45
|
+
@currency = currency
|
|
46
|
+
@additional_properties = additional_properties
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Creates an instance of the object from a hash.
|
|
50
|
+
def self.from_hash(hash)
|
|
51
|
+
return nil unless hash
|
|
52
|
+
|
|
53
|
+
# Extract variables from the hash.
|
|
54
|
+
amount = hash.key?('amount') ? hash['amount'] : nil
|
|
55
|
+
currency = hash.key?('currency') ? hash['currency'] : nil
|
|
56
|
+
|
|
57
|
+
# Create a new hash for additional properties, removing known properties.
|
|
58
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
59
|
+
|
|
60
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
61
|
+
new_hash, proc { |value| value }
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
# Create object from extracted values.
|
|
65
|
+
ChargeCaptureRequest.new(amount: amount,
|
|
66
|
+
currency: currency,
|
|
67
|
+
additional_properties: additional_properties)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a human-readable string representation of the object.
|
|
71
|
+
def to_s
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} amount: #{@amount}, currency: #{@currency}, additional_properties:"\
|
|
74
|
+
" #{@additional_properties}>"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
78
|
+
def inspect
|
|
79
|
+
class_name = self.class.name.split('::').last
|
|
80
|
+
"<#{class_name} amount: #{@amount.inspect}, currency: #{@currency.inspect},"\
|
|
81
|
+
" additional_properties: #{@additional_properties}>"
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|