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,177 @@
|
|
|
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
|
+
# Issuer token or bank transfer instruction payload.
|
|
8
|
+
class IssuerToken < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The type of payment method for the charge.
|
|
13
|
+
# @return [IssuerTokenPaymentType]
|
|
14
|
+
attr_accessor :payment_type
|
|
15
|
+
|
|
16
|
+
# (Online) The token or payment URL provided by the payment provider for the
|
|
17
|
+
# consumer to execute.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :issuer_token
|
|
20
|
+
|
|
21
|
+
# (Online) How the client should execute the token. - `sdk` / `app`: Direct
|
|
22
|
+
# use in native app environments/SDKs. - `web`: Direct use in special
|
|
23
|
+
# extended browser environments. - `http_get` / `http_post`: Execute
|
|
24
|
+
# directly in a new browser window or iframe.
|
|
25
|
+
# @return [IssuerTokenCallMethod]
|
|
26
|
+
attr_accessor :call_method
|
|
27
|
+
|
|
28
|
+
# Key-value pairs required to complete the payment action, or null if not
|
|
29
|
+
# applicable. Used when `call_method` is `http_post`. When present, this
|
|
30
|
+
# JSON must be converted by the client to match the expected `content_type`
|
|
31
|
+
# (e.g., transformed into an `application/x-www-form-urlencoded` string)
|
|
32
|
+
# before sending the POST request.
|
|
33
|
+
# @return [IssuerTokenPayload]
|
|
34
|
+
attr_accessor :payload
|
|
35
|
+
|
|
36
|
+
# (Bank Transfer) Unique ID of the bank account issued by the connected
|
|
37
|
+
# system.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :account_id
|
|
40
|
+
|
|
41
|
+
# (Bank Transfer) Branch code.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :branch_code
|
|
44
|
+
|
|
45
|
+
# (Bank Transfer) Branch name.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :branch_name
|
|
48
|
+
|
|
49
|
+
# (Bank Transfer) Account holder name.
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :account_holder_name
|
|
52
|
+
|
|
53
|
+
# (Bank Transfer) Account number.
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :account_number
|
|
56
|
+
|
|
57
|
+
# A mapping from model property names to API property names.
|
|
58
|
+
def self.names
|
|
59
|
+
@_hash = {} if @_hash.nil?
|
|
60
|
+
@_hash['payment_type'] = 'payment_type'
|
|
61
|
+
@_hash['issuer_token'] = 'issuer_token'
|
|
62
|
+
@_hash['call_method'] = 'call_method'
|
|
63
|
+
@_hash['payload'] = 'payload'
|
|
64
|
+
@_hash['account_id'] = 'account_id'
|
|
65
|
+
@_hash['branch_code'] = 'branch_code'
|
|
66
|
+
@_hash['branch_name'] = 'branch_name'
|
|
67
|
+
@_hash['account_holder_name'] = 'account_holder_name'
|
|
68
|
+
@_hash['account_number'] = 'account_number'
|
|
69
|
+
@_hash
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# An array for optional fields
|
|
73
|
+
def self.optionals
|
|
74
|
+
%w[
|
|
75
|
+
issuer_token
|
|
76
|
+
call_method
|
|
77
|
+
payload
|
|
78
|
+
account_id
|
|
79
|
+
branch_code
|
|
80
|
+
branch_name
|
|
81
|
+
account_holder_name
|
|
82
|
+
account_number
|
|
83
|
+
]
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# An array for nullable fields
|
|
87
|
+
def self.nullables
|
|
88
|
+
%w[
|
|
89
|
+
issuer_token
|
|
90
|
+
call_method
|
|
91
|
+
payload
|
|
92
|
+
account_id
|
|
93
|
+
branch_code
|
|
94
|
+
branch_name
|
|
95
|
+
account_holder_name
|
|
96
|
+
account_number
|
|
97
|
+
]
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def initialize(payment_type:, issuer_token: SKIP, call_method: SKIP,
|
|
101
|
+
payload: SKIP, account_id: SKIP, branch_code: SKIP,
|
|
102
|
+
branch_name: SKIP, account_holder_name: SKIP,
|
|
103
|
+
account_number: SKIP, additional_properties: nil)
|
|
104
|
+
# Add additional model properties to the instance
|
|
105
|
+
additional_properties = {} if additional_properties.nil?
|
|
106
|
+
|
|
107
|
+
@payment_type = payment_type
|
|
108
|
+
@issuer_token = issuer_token unless issuer_token == SKIP
|
|
109
|
+
@call_method = call_method unless call_method == SKIP
|
|
110
|
+
@payload = payload unless payload == SKIP
|
|
111
|
+
@account_id = account_id unless account_id == SKIP
|
|
112
|
+
@branch_code = branch_code unless branch_code == SKIP
|
|
113
|
+
@branch_name = branch_name unless branch_name == SKIP
|
|
114
|
+
@account_holder_name = account_holder_name unless account_holder_name == SKIP
|
|
115
|
+
@account_number = account_number unless account_number == SKIP
|
|
116
|
+
@additional_properties = additional_properties
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Creates an instance of the object from a hash.
|
|
120
|
+
def self.from_hash(hash)
|
|
121
|
+
return nil unless hash
|
|
122
|
+
|
|
123
|
+
# Extract variables from the hash.
|
|
124
|
+
payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil
|
|
125
|
+
issuer_token = hash.key?('issuer_token') ? hash['issuer_token'] : SKIP
|
|
126
|
+
call_method = hash.key?('call_method') ? hash['call_method'] : SKIP
|
|
127
|
+
payload = IssuerTokenPayload.from_hash(hash['payload']) if hash['payload']
|
|
128
|
+
account_id = hash.key?('account_id') ? hash['account_id'] : SKIP
|
|
129
|
+
branch_code = hash.key?('branch_code') ? hash['branch_code'] : SKIP
|
|
130
|
+
branch_name = hash.key?('branch_name') ? hash['branch_name'] : SKIP
|
|
131
|
+
account_holder_name =
|
|
132
|
+
hash.key?('account_holder_name') ? hash['account_holder_name'] : SKIP
|
|
133
|
+
account_number =
|
|
134
|
+
hash.key?('account_number') ? hash['account_number'] : SKIP
|
|
135
|
+
|
|
136
|
+
# Create a new hash for additional properties, removing known properties.
|
|
137
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
138
|
+
|
|
139
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
140
|
+
new_hash, proc { |value| value }
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
# Create object from extracted values.
|
|
144
|
+
IssuerToken.new(payment_type: payment_type,
|
|
145
|
+
issuer_token: issuer_token,
|
|
146
|
+
call_method: call_method,
|
|
147
|
+
payload: payload,
|
|
148
|
+
account_id: account_id,
|
|
149
|
+
branch_code: branch_code,
|
|
150
|
+
branch_name: branch_name,
|
|
151
|
+
account_holder_name: account_holder_name,
|
|
152
|
+
account_number: account_number,
|
|
153
|
+
additional_properties: additional_properties)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Provides a human-readable string representation of the object.
|
|
157
|
+
def to_s
|
|
158
|
+
class_name = self.class.name.split('::').last
|
|
159
|
+
"<#{class_name} payment_type: #{@payment_type}, issuer_token: #{@issuer_token},"\
|
|
160
|
+
" call_method: #{@call_method}, payload: #{@payload}, account_id: #{@account_id},"\
|
|
161
|
+
" branch_code: #{@branch_code}, branch_name: #{@branch_name}, account_holder_name:"\
|
|
162
|
+
" #{@account_holder_name}, account_number: #{@account_number}, additional_properties:"\
|
|
163
|
+
" #{@additional_properties}>"
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
167
|
+
def inspect
|
|
168
|
+
class_name = self.class.name.split('::').last
|
|
169
|
+
"<#{class_name} payment_type: #{@payment_type.inspect}, issuer_token:"\
|
|
170
|
+
" #{@issuer_token.inspect}, call_method: #{@call_method.inspect}, payload:"\
|
|
171
|
+
" #{@payload.inspect}, account_id: #{@account_id.inspect}, branch_code:"\
|
|
172
|
+
" #{@branch_code.inspect}, branch_name: #{@branch_name.inspect}, account_holder_name:"\
|
|
173
|
+
" #{@account_holder_name.inspect}, account_number: #{@account_number.inspect},"\
|
|
174
|
+
" additional_properties: #{@additional_properties}>"
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
# (Online) How the client should execute the token. - `sdk` / `app`: Direct
|
|
8
|
+
# use in native app environments/SDKs. - `web`: Direct use in special extended
|
|
9
|
+
# browser environments. - `http_get` / `http_post`: Execute directly in a new
|
|
10
|
+
# browser window or iframe.
|
|
11
|
+
class IssuerTokenCallMethod
|
|
12
|
+
ISSUER_TOKEN_CALL_METHOD = [
|
|
13
|
+
# TODO: Write general description for HTTP_GET
|
|
14
|
+
HTTP_GET = 'http_get'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for HTTP_POST
|
|
17
|
+
HTTP_POST = 'http_post'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for SDK
|
|
20
|
+
SDK = 'sdk'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for WEB
|
|
23
|
+
WEB = 'web'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for APP
|
|
26
|
+
APP = 'app'.freeze
|
|
27
|
+
].freeze
|
|
28
|
+
|
|
29
|
+
def self.validate(value)
|
|
30
|
+
return false if value.nil?
|
|
31
|
+
|
|
32
|
+
ISSUER_TOKEN_CALL_METHOD.include?(value)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def self.from_value(value, default_value = HTTP_GET)
|
|
36
|
+
return default_value if value.nil?
|
|
37
|
+
|
|
38
|
+
str = value.to_s.strip
|
|
39
|
+
|
|
40
|
+
case str.downcase
|
|
41
|
+
when 'http_get' then HTTP_GET
|
|
42
|
+
when 'http_post' then HTTP_POST
|
|
43
|
+
when 'sdk' then SDK
|
|
44
|
+
when 'web' then WEB
|
|
45
|
+
when 'app' then APP
|
|
46
|
+
else
|
|
47
|
+
default_value
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
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 dictionary containing necessary key-value pairs for sending the request.
|
|
8
|
+
class IssuerTokenPayload < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Generic payload key used by most payment providers.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :request_data
|
|
15
|
+
|
|
16
|
+
# d-barai payment service code.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :s_spcd
|
|
19
|
+
|
|
20
|
+
# d-barai coupon token.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :s_cptok
|
|
23
|
+
|
|
24
|
+
# d-barai terminal key.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :s_terkn
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['request_data'] = 'request_data'
|
|
32
|
+
@_hash['s_spcd'] = 'sSpcd'
|
|
33
|
+
@_hash['s_cptok'] = 'sCptok'
|
|
34
|
+
@_hash['s_terkn'] = 'sTerkn'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
%w[
|
|
41
|
+
request_data
|
|
42
|
+
s_spcd
|
|
43
|
+
s_cptok
|
|
44
|
+
s_terkn
|
|
45
|
+
]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for nullable fields
|
|
49
|
+
def self.nullables
|
|
50
|
+
[]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def initialize(request_data: SKIP, s_spcd: SKIP, s_cptok: SKIP,
|
|
54
|
+
s_terkn: SKIP, additional_properties: nil)
|
|
55
|
+
# Add additional model properties to the instance
|
|
56
|
+
additional_properties = {} if additional_properties.nil?
|
|
57
|
+
|
|
58
|
+
@request_data = request_data unless request_data == SKIP
|
|
59
|
+
@s_spcd = s_spcd unless s_spcd == SKIP
|
|
60
|
+
@s_cptok = s_cptok unless s_cptok == SKIP
|
|
61
|
+
@s_terkn = s_terkn unless s_terkn == SKIP
|
|
62
|
+
@additional_properties = additional_properties
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Creates an instance of the object from a hash.
|
|
66
|
+
def self.from_hash(hash)
|
|
67
|
+
return nil unless hash
|
|
68
|
+
|
|
69
|
+
# Extract variables from the hash.
|
|
70
|
+
request_data = hash.key?('request_data') ? hash['request_data'] : SKIP
|
|
71
|
+
s_spcd = hash.key?('sSpcd') ? hash['sSpcd'] : SKIP
|
|
72
|
+
s_cptok = hash.key?('sCptok') ? hash['sCptok'] : SKIP
|
|
73
|
+
s_terkn = hash.key?('sTerkn') ? hash['sTerkn'] : SKIP
|
|
74
|
+
|
|
75
|
+
# Create a new hash for additional properties, removing known properties.
|
|
76
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
77
|
+
|
|
78
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
79
|
+
new_hash, proc { |value| value }
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
# Create object from extracted values.
|
|
83
|
+
IssuerTokenPayload.new(request_data: request_data,
|
|
84
|
+
s_spcd: s_spcd,
|
|
85
|
+
s_cptok: s_cptok,
|
|
86
|
+
s_terkn: s_terkn,
|
|
87
|
+
additional_properties: additional_properties)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Provides a human-readable string representation of the object.
|
|
91
|
+
def to_s
|
|
92
|
+
class_name = self.class.name.split('::').last
|
|
93
|
+
"<#{class_name} request_data: #{@request_data}, s_spcd: #{@s_spcd}, s_cptok: #{@s_cptok},"\
|
|
94
|
+
" s_terkn: #{@s_terkn}, additional_properties: #{@additional_properties}>"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
98
|
+
def inspect
|
|
99
|
+
class_name = self.class.name.split('::').last
|
|
100
|
+
"<#{class_name} request_data: #{@request_data.inspect}, s_spcd: #{@s_spcd.inspect},"\
|
|
101
|
+
" s_cptok: #{@s_cptok.inspect}, s_terkn: #{@s_terkn.inspect}, additional_properties:"\
|
|
102
|
+
" #{@additional_properties}>"
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# The type of payment method for the charge.
|
|
8
|
+
class IssuerTokenPaymentType
|
|
9
|
+
ISSUER_TOKEN_PAYMENT_TYPE = [
|
|
10
|
+
# TODO: Write general description for ONLINE
|
|
11
|
+
ONLINE = 'online'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for BANK_TRANSFER
|
|
14
|
+
BANK_TRANSFER = 'bank_transfer'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
ISSUER_TOKEN_PAYMENT_TYPE.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = ONLINE)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'online' then ONLINE
|
|
30
|
+
when 'bank_transfer' then BANK_TRANSFER
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,179 @@
|
|
|
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
|
+
# Merchant resource returned by the backend `FullMerchantWithGroupRoles`
|
|
9
|
+
# formatter for merchant-authenticated callers.
|
|
10
|
+
class Merchant < BaseModel
|
|
11
|
+
SKIP = Object.new
|
|
12
|
+
private_constant :SKIP
|
|
13
|
+
|
|
14
|
+
# Merchant identifier.
|
|
15
|
+
# @return [UUID | String]
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# Verification data identifier associated with the merchant.
|
|
19
|
+
# @return [UUID | String]
|
|
20
|
+
attr_accessor :verification_data_id
|
|
21
|
+
|
|
22
|
+
# Merchant display name.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :name
|
|
25
|
+
|
|
26
|
+
# Primary merchant email address.
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :email
|
|
29
|
+
|
|
30
|
+
# Merchant notification email address.
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :notification_email
|
|
33
|
+
|
|
34
|
+
# Merchant finance notification email address.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :finance_notification_email
|
|
37
|
+
|
|
38
|
+
# Whether the merchant has completed verification.
|
|
39
|
+
# @return [TrueClass | FalseClass]
|
|
40
|
+
attr_accessor :verified
|
|
41
|
+
|
|
42
|
+
# Merchant configuration snapshot serialized by gyron-payments-api.
|
|
43
|
+
# @return [MerchantWebhookConfiguration]
|
|
44
|
+
attr_accessor :configuration
|
|
45
|
+
|
|
46
|
+
# Timestamp when the merchant was created.
|
|
47
|
+
# @return [DateTime]
|
|
48
|
+
attr_accessor :created_on
|
|
49
|
+
|
|
50
|
+
# A mapping from model property names to API property names.
|
|
51
|
+
def self.names
|
|
52
|
+
@_hash = {} if @_hash.nil?
|
|
53
|
+
@_hash['id'] = 'id'
|
|
54
|
+
@_hash['verification_data_id'] = 'verification_data_id'
|
|
55
|
+
@_hash['name'] = 'name'
|
|
56
|
+
@_hash['email'] = 'email'
|
|
57
|
+
@_hash['notification_email'] = 'notification_email'
|
|
58
|
+
@_hash['finance_notification_email'] = 'finance_notification_email'
|
|
59
|
+
@_hash['verified'] = 'verified'
|
|
60
|
+
@_hash['configuration'] = 'configuration'
|
|
61
|
+
@_hash['created_on'] = 'created_on'
|
|
62
|
+
@_hash
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# An array for optional fields
|
|
66
|
+
def self.optionals
|
|
67
|
+
%w[
|
|
68
|
+
id
|
|
69
|
+
verification_data_id
|
|
70
|
+
name
|
|
71
|
+
email
|
|
72
|
+
notification_email
|
|
73
|
+
finance_notification_email
|
|
74
|
+
verified
|
|
75
|
+
configuration
|
|
76
|
+
created_on
|
|
77
|
+
]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# An array for nullable fields
|
|
81
|
+
def self.nullables
|
|
82
|
+
%w[
|
|
83
|
+
verification_data_id
|
|
84
|
+
notification_email
|
|
85
|
+
finance_notification_email
|
|
86
|
+
]
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def initialize(id: SKIP, verification_data_id: SKIP, name: SKIP,
|
|
90
|
+
email: SKIP, notification_email: SKIP,
|
|
91
|
+
finance_notification_email: SKIP, verified: SKIP,
|
|
92
|
+
configuration: SKIP, created_on: SKIP,
|
|
93
|
+
additional_properties: nil)
|
|
94
|
+
# Add additional model properties to the instance
|
|
95
|
+
additional_properties = {} if additional_properties.nil?
|
|
96
|
+
|
|
97
|
+
@id = id unless id == SKIP
|
|
98
|
+
@verification_data_id = verification_data_id unless verification_data_id == SKIP
|
|
99
|
+
@name = name unless name == SKIP
|
|
100
|
+
@email = email unless email == SKIP
|
|
101
|
+
@notification_email = notification_email unless notification_email == SKIP
|
|
102
|
+
unless finance_notification_email == SKIP
|
|
103
|
+
@finance_notification_email =
|
|
104
|
+
finance_notification_email
|
|
105
|
+
end
|
|
106
|
+
@verified = verified unless verified == SKIP
|
|
107
|
+
@configuration = configuration unless configuration == SKIP
|
|
108
|
+
@created_on = created_on unless created_on == SKIP
|
|
109
|
+
@additional_properties = additional_properties
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Creates an instance of the object from a hash.
|
|
113
|
+
def self.from_hash(hash)
|
|
114
|
+
return nil unless hash
|
|
115
|
+
|
|
116
|
+
# Extract variables from the hash.
|
|
117
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
118
|
+
verification_data_id =
|
|
119
|
+
hash.key?('verification_data_id') ? hash['verification_data_id'] : SKIP
|
|
120
|
+
name = hash.key?('name') ? hash['name'] : SKIP
|
|
121
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
122
|
+
notification_email =
|
|
123
|
+
hash.key?('notification_email') ? hash['notification_email'] : SKIP
|
|
124
|
+
finance_notification_email =
|
|
125
|
+
hash.key?('finance_notification_email') ? hash['finance_notification_email'] : SKIP
|
|
126
|
+
verified = hash.key?('verified') ? hash['verified'] : SKIP
|
|
127
|
+
configuration = MerchantWebhookConfiguration.from_hash(hash['configuration']) if
|
|
128
|
+
hash['configuration']
|
|
129
|
+
created_on = if hash.key?('created_on')
|
|
130
|
+
(DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_on'])
|
|
131
|
+
else
|
|
132
|
+
SKIP
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Create a new hash for additional properties, removing known properties.
|
|
136
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
137
|
+
|
|
138
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
139
|
+
new_hash, proc { |value| value }
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
# Create object from extracted values.
|
|
143
|
+
Merchant.new(id: id,
|
|
144
|
+
verification_data_id: verification_data_id,
|
|
145
|
+
name: name,
|
|
146
|
+
email: email,
|
|
147
|
+
notification_email: notification_email,
|
|
148
|
+
finance_notification_email: finance_notification_email,
|
|
149
|
+
verified: verified,
|
|
150
|
+
configuration: configuration,
|
|
151
|
+
created_on: created_on,
|
|
152
|
+
additional_properties: additional_properties)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def to_custom_created_on
|
|
156
|
+
DateTimeHelper.to_rfc3339(created_on)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Provides a human-readable string representation of the object.
|
|
160
|
+
def to_s
|
|
161
|
+
class_name = self.class.name.split('::').last
|
|
162
|
+
"<#{class_name} id: #{@id}, verification_data_id: #{@verification_data_id}, name: #{@name},"\
|
|
163
|
+
" email: #{@email}, notification_email: #{@notification_email}, finance_notification_email:"\
|
|
164
|
+
" #{@finance_notification_email}, verified: #{@verified}, configuration: #{@configuration},"\
|
|
165
|
+
" created_on: #{@created_on}, additional_properties: #{@additional_properties}>"
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
169
|
+
def inspect
|
|
170
|
+
class_name = self.class.name.split('::').last
|
|
171
|
+
"<#{class_name} id: #{@id.inspect}, verification_data_id: #{@verification_data_id.inspect},"\
|
|
172
|
+
" name: #{@name.inspect}, email: #{@email.inspect}, notification_email:"\
|
|
173
|
+
" #{@notification_email.inspect}, finance_notification_email:"\
|
|
174
|
+
" #{@finance_notification_email.inspect}, verified: #{@verified.inspect}, configuration:"\
|
|
175
|
+
" #{@configuration.inspect}, created_on: #{@created_on.inspect}, additional_properties:"\
|
|
176
|
+
" #{@additional_properties}>"
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|