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,166 @@
|
|
|
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
|
+
# Represents a single delivery attempt of a webhook event, including the
|
|
9
|
+
# payload sent and the delivery outcome.
|
|
10
|
+
class WebhookEvent < BaseModel
|
|
11
|
+
SKIP = Object.new
|
|
12
|
+
private_constant :SKIP
|
|
13
|
+
|
|
14
|
+
# Unique identifier for the webhook event.
|
|
15
|
+
# @return [UUID | String]
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# ID of the parent webhook.
|
|
19
|
+
# @return [UUID | String]
|
|
20
|
+
attr_accessor :webhook_id
|
|
21
|
+
|
|
22
|
+
# Event type that triggers a webhook notification.
|
|
23
|
+
# @return [WebhookTrigger]
|
|
24
|
+
attr_accessor :event
|
|
25
|
+
|
|
26
|
+
# Domain object payload for webhook deliveries. The actual structure depends
|
|
27
|
+
# on the event type — see each webhook callback schema for the specific
|
|
28
|
+
# payload shape.
|
|
29
|
+
# @return [Object]
|
|
30
|
+
attr_accessor :data
|
|
31
|
+
|
|
32
|
+
# Whether the webhook delivery was acknowledged (HTTP 2xx).
|
|
33
|
+
# @return [TrueClass | FalseClass]
|
|
34
|
+
attr_accessor :successful
|
|
35
|
+
|
|
36
|
+
# Timestamp when the webhook was dispatched.
|
|
37
|
+
# @return [DateTime]
|
|
38
|
+
attr_accessor :fired_on
|
|
39
|
+
|
|
40
|
+
# Error message if delivery failed.
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :error_message
|
|
43
|
+
|
|
44
|
+
# Timestamp when the event was created.
|
|
45
|
+
# @return [DateTime]
|
|
46
|
+
attr_accessor :created_on
|
|
47
|
+
|
|
48
|
+
# A mapping from model property names to API property names.
|
|
49
|
+
def self.names
|
|
50
|
+
@_hash = {} if @_hash.nil?
|
|
51
|
+
@_hash['id'] = 'id'
|
|
52
|
+
@_hash['webhook_id'] = 'webhook_id'
|
|
53
|
+
@_hash['event'] = 'event'
|
|
54
|
+
@_hash['data'] = 'data'
|
|
55
|
+
@_hash['successful'] = 'successful'
|
|
56
|
+
@_hash['fired_on'] = 'fired_on'
|
|
57
|
+
@_hash['error_message'] = 'error_message'
|
|
58
|
+
@_hash['created_on'] = 'created_on'
|
|
59
|
+
@_hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# An array for optional fields
|
|
63
|
+
def self.optionals
|
|
64
|
+
%w[
|
|
65
|
+
id
|
|
66
|
+
webhook_id
|
|
67
|
+
event
|
|
68
|
+
data
|
|
69
|
+
successful
|
|
70
|
+
fired_on
|
|
71
|
+
error_message
|
|
72
|
+
created_on
|
|
73
|
+
]
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# An array for nullable fields
|
|
77
|
+
def self.nullables
|
|
78
|
+
%w[
|
|
79
|
+
error_message
|
|
80
|
+
]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def initialize(id: SKIP, webhook_id: SKIP, event: SKIP, data: SKIP,
|
|
84
|
+
successful: SKIP, fired_on: SKIP, error_message: SKIP,
|
|
85
|
+
created_on: SKIP, additional_properties: nil)
|
|
86
|
+
# Add additional model properties to the instance
|
|
87
|
+
additional_properties = {} if additional_properties.nil?
|
|
88
|
+
|
|
89
|
+
@id = id unless id == SKIP
|
|
90
|
+
@webhook_id = webhook_id unless webhook_id == SKIP
|
|
91
|
+
@event = event unless event == SKIP
|
|
92
|
+
@data = data unless data == SKIP
|
|
93
|
+
@successful = successful unless successful == SKIP
|
|
94
|
+
@fired_on = fired_on unless fired_on == SKIP
|
|
95
|
+
@error_message = error_message unless error_message == SKIP
|
|
96
|
+
@created_on = created_on unless created_on == SKIP
|
|
97
|
+
@additional_properties = additional_properties
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Creates an instance of the object from a hash.
|
|
101
|
+
def self.from_hash(hash)
|
|
102
|
+
return nil unless hash
|
|
103
|
+
|
|
104
|
+
# Extract variables from the hash.
|
|
105
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
106
|
+
webhook_id = hash.key?('webhook_id') ? hash['webhook_id'] : SKIP
|
|
107
|
+
event = hash.key?('event') ? hash['event'] : SKIP
|
|
108
|
+
data = hash.key?('data') ? hash['data'] : SKIP
|
|
109
|
+
successful = hash.key?('successful') ? hash['successful'] : SKIP
|
|
110
|
+
fired_on = if hash.key?('fired_on')
|
|
111
|
+
(DateTimeHelper.from_rfc3339(hash['fired_on']) if hash['fired_on'])
|
|
112
|
+
else
|
|
113
|
+
SKIP
|
|
114
|
+
end
|
|
115
|
+
error_message = hash.key?('error_message') ? hash['error_message'] : SKIP
|
|
116
|
+
created_on = if hash.key?('created_on')
|
|
117
|
+
(DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_on'])
|
|
118
|
+
else
|
|
119
|
+
SKIP
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Create a new hash for additional properties, removing known properties.
|
|
123
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
124
|
+
|
|
125
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
126
|
+
new_hash, proc { |value| value }
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
# Create object from extracted values.
|
|
130
|
+
WebhookEvent.new(id: id,
|
|
131
|
+
webhook_id: webhook_id,
|
|
132
|
+
event: event,
|
|
133
|
+
data: data,
|
|
134
|
+
successful: successful,
|
|
135
|
+
fired_on: fired_on,
|
|
136
|
+
error_message: error_message,
|
|
137
|
+
created_on: created_on,
|
|
138
|
+
additional_properties: additional_properties)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def to_custom_fired_on
|
|
142
|
+
DateTimeHelper.to_rfc3339(fired_on)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def to_custom_created_on
|
|
146
|
+
DateTimeHelper.to_rfc3339(created_on)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Provides a human-readable string representation of the object.
|
|
150
|
+
def to_s
|
|
151
|
+
class_name = self.class.name.split('::').last
|
|
152
|
+
"<#{class_name} id: #{@id}, webhook_id: #{@webhook_id}, event: #{@event}, data: #{@data},"\
|
|
153
|
+
" successful: #{@successful}, fired_on: #{@fired_on}, error_message: #{@error_message},"\
|
|
154
|
+
" created_on: #{@created_on}, additional_properties: #{@additional_properties}>"
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
158
|
+
def inspect
|
|
159
|
+
class_name = self.class.name.split('::').last
|
|
160
|
+
"<#{class_name} id: #{@id.inspect}, webhook_id: #{@webhook_id.inspect}, event:"\
|
|
161
|
+
" #{@event.inspect}, data: #{@data.inspect}, successful: #{@successful.inspect}, fired_on:"\
|
|
162
|
+
" #{@fired_on.inspect}, error_message: #{@error_message.inspect}, created_on:"\
|
|
163
|
+
" #{@created_on.inspect}, additional_properties: #{@additional_properties}>"
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# Paginated list of webhook events.
|
|
8
|
+
class WebhookEventList < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# List of resources.
|
|
13
|
+
# @return [Array[WebhookEvent]]
|
|
14
|
+
attr_accessor :items
|
|
15
|
+
|
|
16
|
+
# Whether more results are available.
|
|
17
|
+
# @return [TrueClass | FalseClass]
|
|
18
|
+
attr_accessor :has_more
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['items'] = 'items'
|
|
24
|
+
@_hash['has_more'] = 'has_more'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
items
|
|
32
|
+
has_more
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(items: SKIP, has_more: SKIP, additional_properties: nil)
|
|
42
|
+
# Add additional model properties to the instance
|
|
43
|
+
additional_properties = {} if additional_properties.nil?
|
|
44
|
+
|
|
45
|
+
@items = items unless items == SKIP
|
|
46
|
+
@has_more = has_more unless has_more == SKIP
|
|
47
|
+
@additional_properties = additional_properties
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
# Parameter is an array, so we need to iterate through it
|
|
56
|
+
items = nil
|
|
57
|
+
unless hash['items'].nil?
|
|
58
|
+
items = []
|
|
59
|
+
hash['items'].each do |structure|
|
|
60
|
+
items << (WebhookEvent.from_hash(structure) if structure)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
items = SKIP unless hash.key?('items')
|
|
65
|
+
has_more = hash.key?('has_more') ? hash['has_more'] : SKIP
|
|
66
|
+
|
|
67
|
+
# Create a new hash for additional properties, removing known properties.
|
|
68
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
+
|
|
70
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
+
new_hash, proc { |value| value }
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Create object from extracted values.
|
|
75
|
+
WebhookEventList.new(items: items,
|
|
76
|
+
has_more: has_more,
|
|
77
|
+
additional_properties: additional_properties)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Provides a human-readable string representation of the object.
|
|
81
|
+
def to_s
|
|
82
|
+
class_name = self.class.name.split('::').last
|
|
83
|
+
"<#{class_name} items: #{@items}, has_more: #{@has_more}, additional_properties:"\
|
|
84
|
+
" #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
88
|
+
def inspect
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} items: #{@items.inspect}, has_more: #{@has_more.inspect},"\
|
|
91
|
+
" additional_properties: #{@additional_properties}>"
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# Paginated list of webhooks.
|
|
8
|
+
class WebhookList < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# List of resources.
|
|
13
|
+
# @return [Array[Webhook]]
|
|
14
|
+
attr_accessor :items
|
|
15
|
+
|
|
16
|
+
# Whether more results are available.
|
|
17
|
+
# @return [TrueClass | FalseClass]
|
|
18
|
+
attr_accessor :has_more
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['items'] = 'items'
|
|
24
|
+
@_hash['has_more'] = 'has_more'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
items
|
|
32
|
+
has_more
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(items: SKIP, has_more: SKIP, additional_properties: nil)
|
|
42
|
+
# Add additional model properties to the instance
|
|
43
|
+
additional_properties = {} if additional_properties.nil?
|
|
44
|
+
|
|
45
|
+
@items = items unless items == SKIP
|
|
46
|
+
@has_more = has_more unless has_more == SKIP
|
|
47
|
+
@additional_properties = additional_properties
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
# Parameter is an array, so we need to iterate through it
|
|
56
|
+
items = nil
|
|
57
|
+
unless hash['items'].nil?
|
|
58
|
+
items = []
|
|
59
|
+
hash['items'].each do |structure|
|
|
60
|
+
items << (Webhook.from_hash(structure) if structure)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
items = SKIP unless hash.key?('items')
|
|
65
|
+
has_more = hash.key?('has_more') ? hash['has_more'] : SKIP
|
|
66
|
+
|
|
67
|
+
# Create a new hash for additional properties, removing known properties.
|
|
68
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
+
|
|
70
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
+
new_hash, proc { |value| value }
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Create object from extracted values.
|
|
75
|
+
WebhookList.new(items: items,
|
|
76
|
+
has_more: has_more,
|
|
77
|
+
additional_properties: additional_properties)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Provides a human-readable string representation of the object.
|
|
81
|
+
def to_s
|
|
82
|
+
class_name = self.class.name.split('::').last
|
|
83
|
+
"<#{class_name} items: #{@items}, has_more: #{@has_more}, additional_properties:"\
|
|
84
|
+
" #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
88
|
+
def inspect
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} items: #{@items.inspect}, has_more: #{@has_more.inspect},"\
|
|
91
|
+
" additional_properties: #{@additional_properties}>"
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# Event type that triggers a webhook notification.
|
|
8
|
+
class WebhookTrigger
|
|
9
|
+
WEBHOOK_TRIGGER = [
|
|
10
|
+
# TODO: Write general description for TOKEN_CREATED
|
|
11
|
+
TOKEN_CREATED = 'token_created'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for TOKEN_UPDATED
|
|
14
|
+
TOKEN_UPDATED = 'token_updated'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for TOKEN_THREE_D_S_UPDATED
|
|
17
|
+
TOKEN_THREE_D_S_UPDATED = 'token_three_d_s_updated'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for TOKEN_CVV_AUTH_UPDATED
|
|
20
|
+
TOKEN_CVV_AUTH_UPDATED = 'token_cvv_auth_updated'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for TOKEN_CVV_AUTH_CHECK_UPDATED
|
|
23
|
+
TOKEN_CVV_AUTH_CHECK_UPDATED = 'token_cvv_auth_check_updated'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for TOKEN_REPLACED
|
|
26
|
+
TOKEN_REPLACED = 'token_replaced'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for CHARGE_UPDATED
|
|
29
|
+
CHARGE_UPDATED = 'charge_updated'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for CHARGE_FINISHED
|
|
32
|
+
CHARGE_FINISHED = 'charge_finished'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for REFUND_FINISHED
|
|
35
|
+
REFUND_FINISHED = 'refund_finished'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for CANCEL_FINISHED
|
|
38
|
+
CANCEL_FINISHED = 'cancel_finished'.freeze,
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for CUSTOMS_DECLARATION_FINISHED
|
|
41
|
+
CUSTOMS_DECLARATION_FINISHED = 'customs_declaration_finished'.freeze,
|
|
42
|
+
|
|
43
|
+
# TODO: Write general description for RECURRING_TOKEN_DELETED
|
|
44
|
+
RECURRING_TOKEN_DELETED = 'recurring_token_deleted'.freeze,
|
|
45
|
+
|
|
46
|
+
# TODO: Write general description for BANK_TRANSFER_STATUS_UPDATED
|
|
47
|
+
BANK_TRANSFER_STATUS_UPDATED = 'bank_transfer_status_updated'.freeze,
|
|
48
|
+
|
|
49
|
+
# TODO: Write general description for SUBSCRIPTION_CREATED
|
|
50
|
+
SUBSCRIPTION_CREATED = 'subscription_created'.freeze,
|
|
51
|
+
|
|
52
|
+
# TODO: Write general description for SUBSCRIPTION_PAYMENT
|
|
53
|
+
SUBSCRIPTION_PAYMENT = 'subscription_payment'.freeze,
|
|
54
|
+
|
|
55
|
+
# TODO: Write general description for SUBSCRIPTION_COMPLETED
|
|
56
|
+
SUBSCRIPTION_COMPLETED = 'subscription_completed'.freeze,
|
|
57
|
+
|
|
58
|
+
# TODO: Write general description for SUBSCRIPTION_FAILURE
|
|
59
|
+
SUBSCRIPTION_FAILURE = 'subscription_failure'.freeze,
|
|
60
|
+
|
|
61
|
+
# TODO: Write general description for SUBSCRIPTION_CANCELED
|
|
62
|
+
SUBSCRIPTION_CANCELED = 'subscription_canceled'.freeze,
|
|
63
|
+
|
|
64
|
+
# TODO: Write general description for SUBSCRIPTION_SUSPENDED
|
|
65
|
+
SUBSCRIPTION_SUSPENDED = 'subscription_suspended'.freeze
|
|
66
|
+
].freeze
|
|
67
|
+
|
|
68
|
+
def self.validate(value)
|
|
69
|
+
return false if value.nil?
|
|
70
|
+
|
|
71
|
+
WEBHOOK_TRIGGER.include?(value)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def self.from_value(value, default_value = TOKEN_CREATED)
|
|
75
|
+
return default_value if value.nil?
|
|
76
|
+
|
|
77
|
+
str = value.to_s.strip
|
|
78
|
+
|
|
79
|
+
case str.downcase
|
|
80
|
+
when 'token_created' then TOKEN_CREATED
|
|
81
|
+
when 'token_updated' then TOKEN_UPDATED
|
|
82
|
+
when 'token_three_d_s_updated' then TOKEN_THREE_D_S_UPDATED
|
|
83
|
+
when 'token_cvv_auth_updated' then TOKEN_CVV_AUTH_UPDATED
|
|
84
|
+
when 'token_cvv_auth_check_updated' then TOKEN_CVV_AUTH_CHECK_UPDATED
|
|
85
|
+
when 'token_replaced' then TOKEN_REPLACED
|
|
86
|
+
when 'charge_updated' then CHARGE_UPDATED
|
|
87
|
+
when 'charge_finished' then CHARGE_FINISHED
|
|
88
|
+
when 'refund_finished' then REFUND_FINISHED
|
|
89
|
+
when 'cancel_finished' then CANCEL_FINISHED
|
|
90
|
+
when 'customs_declaration_finished' then CUSTOMS_DECLARATION_FINISHED
|
|
91
|
+
when 'recurring_token_deleted' then RECURRING_TOKEN_DELETED
|
|
92
|
+
when 'bank_transfer_status_updated' then BANK_TRANSFER_STATUS_UPDATED
|
|
93
|
+
when 'subscription_created' then SUBSCRIPTION_CREATED
|
|
94
|
+
when 'subscription_payment' then SUBSCRIPTION_PAYMENT
|
|
95
|
+
when 'subscription_completed' then SUBSCRIPTION_COMPLETED
|
|
96
|
+
when 'subscription_failure' then SUBSCRIPTION_FAILURE
|
|
97
|
+
when 'subscription_canceled' then SUBSCRIPTION_CANCELED
|
|
98
|
+
when 'subscription_suspended' then SUBSCRIPTION_SUSPENDED
|
|
99
|
+
else
|
|
100
|
+
default_value
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,108 @@
|
|
|
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 body for updating a webhook. All fields are optional. Omitted fields
|
|
8
|
+
# are left unchanged.
|
|
9
|
+
class WebhookUpdateRequest < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Replace the trigger list. Must be non-empty if provided.
|
|
14
|
+
# @return [Array[WebhookTrigger]]
|
|
15
|
+
attr_accessor :triggers
|
|
16
|
+
|
|
17
|
+
# Update the webhook endpoint URL.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :url
|
|
20
|
+
|
|
21
|
+
# Update or clear the auth token. Send `null` to remove.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :auth_token
|
|
24
|
+
|
|
25
|
+
# Enable or disable the webhook.
|
|
26
|
+
# @return [TrueClass | FalseClass]
|
|
27
|
+
attr_accessor :active
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['triggers'] = 'triggers'
|
|
33
|
+
@_hash['url'] = 'url'
|
|
34
|
+
@_hash['auth_token'] = 'auth_token'
|
|
35
|
+
@_hash['active'] = 'active'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
triggers
|
|
43
|
+
url
|
|
44
|
+
auth_token
|
|
45
|
+
active
|
|
46
|
+
]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for nullable fields
|
|
50
|
+
def self.nullables
|
|
51
|
+
%w[
|
|
52
|
+
auth_token
|
|
53
|
+
]
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def initialize(triggers: SKIP, url: SKIP, auth_token: SKIP, active: SKIP,
|
|
57
|
+
additional_properties: nil)
|
|
58
|
+
# Add additional model properties to the instance
|
|
59
|
+
additional_properties = {} if additional_properties.nil?
|
|
60
|
+
|
|
61
|
+
@triggers = triggers unless triggers == SKIP
|
|
62
|
+
@url = url unless url == SKIP
|
|
63
|
+
@auth_token = auth_token unless auth_token == SKIP
|
|
64
|
+
@active = active unless active == SKIP
|
|
65
|
+
@additional_properties = additional_properties
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Creates an instance of the object from a hash.
|
|
69
|
+
def self.from_hash(hash)
|
|
70
|
+
return nil unless hash
|
|
71
|
+
|
|
72
|
+
# Extract variables from the hash.
|
|
73
|
+
triggers = hash.key?('triggers') ? hash['triggers'] : SKIP
|
|
74
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
75
|
+
auth_token = hash.key?('auth_token') ? hash['auth_token'] : SKIP
|
|
76
|
+
active = hash.key?('active') ? hash['active'] : SKIP
|
|
77
|
+
|
|
78
|
+
# Create a new hash for additional properties, removing known properties.
|
|
79
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
80
|
+
|
|
81
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
82
|
+
new_hash, proc { |value| value }
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# Create object from extracted values.
|
|
86
|
+
WebhookUpdateRequest.new(triggers: triggers,
|
|
87
|
+
url: url,
|
|
88
|
+
auth_token: auth_token,
|
|
89
|
+
active: active,
|
|
90
|
+
additional_properties: additional_properties)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Provides a human-readable string representation of the object.
|
|
94
|
+
def to_s
|
|
95
|
+
class_name = self.class.name.split('::').last
|
|
96
|
+
"<#{class_name} triggers: #{@triggers}, url: #{@url}, auth_token: #{@auth_token}, active:"\
|
|
97
|
+
" #{@active}, additional_properties: #{@additional_properties}>"
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
101
|
+
def inspect
|
|
102
|
+
class_name = self.class.name.split('::').last
|
|
103
|
+
"<#{class_name} triggers: #{@triggers.inspect}, url: #{@url.inspect}, auth_token:"\
|
|
104
|
+
" #{@auth_token.inspect}, active: #{@active.inspect}, additional_properties:"\
|
|
105
|
+
" #{@additional_properties}>"
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
# A utility that supports dateTime conversion to different formats
|
|
9
|
+
class DateTimeHelper < CoreLibrary::DateTimeHelper
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# A utility to allow users to set the content-type for files
|
|
8
|
+
class FileWrapper < CoreLibrary::FileWrapper
|
|
9
|
+
# The constructor.
|
|
10
|
+
# @param [File] file The file to be sent in the request.
|
|
11
|
+
# @param [string] content_type The content type of the provided file.
|
|
12
|
+
def initialize(file, content_type: 'application/octet-stream')
|
|
13
|
+
super
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Provides a human-readable string representation of the object.
|
|
17
|
+
def to_s
|
|
18
|
+
class_name = self.class.name.split('::').last
|
|
19
|
+
"<#{class_name} file: #{@file}, content_type: #{@content_type}>"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
23
|
+
def to_inspect
|
|
24
|
+
class_name = self.class.name.split('::').last
|
|
25
|
+
"<#{class_name} file: #{@file.inspect}, content_type: #{@content_type.inspect}>"
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|