univapay-client-sdk 1.0.0
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 +212 -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 +909 -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 +128 -0
- data/lib/univapay_client_sdk/configuration.rb +179 -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_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/customs_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/refund_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/subscription_handler.rb +37 -0
- data/lib/univapay_client_sdk/events/webhooks/token_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/extensions.rb +127 -0
- data/lib/univapay_client_sdk/http/api_response.rb +19 -0
- data/lib/univapay_client_sdk/http/auth/oauth_2.rb +58 -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_event.rb +36 -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_webhook_event.rb +138 -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/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_create_request.rb +216 -0
- data/lib/univapay_client_sdk/models/subscription_event.rb +54 -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_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_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/subscription_webhook_event.rb +143 -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 +230 -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 +146 -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_event.rb +59 -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_webhook_event.rb +144 -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 +182 -0
- data/lib/univapay_client_sdk.rb +285 -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 +565 -0
- data/test/apis/test_error_messages.rb +38 -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_handler.rb +138 -0
- data/test/events/webhooks/test_customs_handler.rb +100 -0
- data/test/events/webhooks/test_refund_handler.rb +95 -0
- data/test/events/webhooks/test_subscription_handler.rb +346 -0
- data/test/events/webhooks/test_token_handler.rb +332 -0
- data/test/framework_integrations/rails_app_test_helper.rb +14 -0
- data/test/framework_integrations/webhooks/apps/hanami_charge_app.rb +61 -0
- data/test/framework_integrations/webhooks/apps/rails_charge_app.rb +24 -0
- data/test/framework_integrations/webhooks/apps/sinatra_charge_app.rb +27 -0
- data/test/framework_integrations/webhooks/test/test_hanami_charge_app.rb +57 -0
- data/test/framework_integrations/webhooks/test/test_rails_charge_app.rb +57 -0
- data/test/framework_integrations/webhooks/test/test_sinatra_charge_app.rb +58 -0
- data/test/http_response_catcher.rb +32 -0
- metadata +366 -0
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
# Token Response Bank Transfer Data schema.
|
|
8
|
+
class TokenResponseBankTransferData < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The bank brand identifier (e.g., 'aozora_bank').
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :brand
|
|
15
|
+
|
|
16
|
+
# ISO 8601 duration format (e.g., 'PT168H').
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :expiration_period
|
|
19
|
+
|
|
20
|
+
# Time shift applied to the expiration, typically pushing it to the end of
|
|
21
|
+
# the day in a specific timezone (e.g., '23:59:59+09:00').
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :expiration_time_shift
|
|
24
|
+
|
|
25
|
+
# Bank code value.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :bank_code
|
|
28
|
+
|
|
29
|
+
# Bank name value.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :bank_name
|
|
32
|
+
|
|
33
|
+
# Bank branch code.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :branch_code
|
|
36
|
+
|
|
37
|
+
# Bank branch name.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :branch_name
|
|
40
|
+
|
|
41
|
+
# Bank account number.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :account_number
|
|
44
|
+
|
|
45
|
+
# Bank account holder name.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :account_holder_name
|
|
48
|
+
|
|
49
|
+
# A mapping from model property names to API property names.
|
|
50
|
+
def self.names
|
|
51
|
+
@_hash = {} if @_hash.nil?
|
|
52
|
+
@_hash['brand'] = 'brand'
|
|
53
|
+
@_hash['expiration_period'] = 'expiration_period'
|
|
54
|
+
@_hash['expiration_time_shift'] = 'expiration_time_shift'
|
|
55
|
+
@_hash['bank_code'] = 'bank_code'
|
|
56
|
+
@_hash['bank_name'] = 'bank_name'
|
|
57
|
+
@_hash['branch_code'] = 'branch_code'
|
|
58
|
+
@_hash['branch_name'] = 'branch_name'
|
|
59
|
+
@_hash['account_number'] = 'account_number'
|
|
60
|
+
@_hash['account_holder_name'] = 'account_holder_name'
|
|
61
|
+
@_hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# An array for optional fields
|
|
65
|
+
def self.optionals
|
|
66
|
+
%w[
|
|
67
|
+
brand
|
|
68
|
+
expiration_period
|
|
69
|
+
expiration_time_shift
|
|
70
|
+
bank_code
|
|
71
|
+
bank_name
|
|
72
|
+
branch_code
|
|
73
|
+
branch_name
|
|
74
|
+
account_number
|
|
75
|
+
account_holder_name
|
|
76
|
+
]
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# An array for nullable fields
|
|
80
|
+
def self.nullables
|
|
81
|
+
%w[
|
|
82
|
+
bank_code
|
|
83
|
+
bank_name
|
|
84
|
+
branch_code
|
|
85
|
+
branch_name
|
|
86
|
+
account_number
|
|
87
|
+
account_holder_name
|
|
88
|
+
]
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def initialize(brand: SKIP, expiration_period: SKIP,
|
|
92
|
+
expiration_time_shift: SKIP, bank_code: SKIP,
|
|
93
|
+
bank_name: SKIP, branch_code: SKIP, branch_name: SKIP,
|
|
94
|
+
account_number: SKIP, account_holder_name: SKIP,
|
|
95
|
+
additional_properties: nil)
|
|
96
|
+
# Add additional model properties to the instance
|
|
97
|
+
additional_properties = {} if additional_properties.nil?
|
|
98
|
+
|
|
99
|
+
@brand = brand unless brand == SKIP
|
|
100
|
+
@expiration_period = expiration_period unless expiration_period == SKIP
|
|
101
|
+
@expiration_time_shift = expiration_time_shift unless expiration_time_shift == SKIP
|
|
102
|
+
@bank_code = bank_code unless bank_code == SKIP
|
|
103
|
+
@bank_name = bank_name unless bank_name == SKIP
|
|
104
|
+
@branch_code = branch_code unless branch_code == SKIP
|
|
105
|
+
@branch_name = branch_name unless branch_name == SKIP
|
|
106
|
+
@account_number = account_number unless account_number == SKIP
|
|
107
|
+
@account_holder_name = account_holder_name unless account_holder_name == SKIP
|
|
108
|
+
@additional_properties = additional_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Creates an instance of the object from a hash.
|
|
112
|
+
def self.from_hash(hash)
|
|
113
|
+
return nil unless hash
|
|
114
|
+
|
|
115
|
+
# Extract variables from the hash.
|
|
116
|
+
brand = hash.key?('brand') ? hash['brand'] : SKIP
|
|
117
|
+
expiration_period =
|
|
118
|
+
hash.key?('expiration_period') ? hash['expiration_period'] : SKIP
|
|
119
|
+
expiration_time_shift =
|
|
120
|
+
hash.key?('expiration_time_shift') ? hash['expiration_time_shift'] : SKIP
|
|
121
|
+
bank_code = hash.key?('bank_code') ? hash['bank_code'] : SKIP
|
|
122
|
+
bank_name = hash.key?('bank_name') ? hash['bank_name'] : SKIP
|
|
123
|
+
branch_code = hash.key?('branch_code') ? hash['branch_code'] : SKIP
|
|
124
|
+
branch_name = hash.key?('branch_name') ? hash['branch_name'] : SKIP
|
|
125
|
+
account_number =
|
|
126
|
+
hash.key?('account_number') ? hash['account_number'] : SKIP
|
|
127
|
+
account_holder_name =
|
|
128
|
+
hash.key?('account_holder_name') ? hash['account_holder_name'] : SKIP
|
|
129
|
+
|
|
130
|
+
# Create a new hash for additional properties, removing known properties.
|
|
131
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
132
|
+
|
|
133
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
134
|
+
new_hash, proc { |value| value }
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
# Create object from extracted values.
|
|
138
|
+
TokenResponseBankTransferData.new(brand: brand,
|
|
139
|
+
expiration_period: expiration_period,
|
|
140
|
+
expiration_time_shift: expiration_time_shift,
|
|
141
|
+
bank_code: bank_code,
|
|
142
|
+
bank_name: bank_name,
|
|
143
|
+
branch_code: branch_code,
|
|
144
|
+
branch_name: branch_name,
|
|
145
|
+
account_number: account_number,
|
|
146
|
+
account_holder_name: account_holder_name,
|
|
147
|
+
additional_properties: additional_properties)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Validates an instance of the object from a given value.
|
|
151
|
+
# @param [TokenResponseBankTransferData | Hash] The value against the validation is performed.
|
|
152
|
+
def self.validate(value)
|
|
153
|
+
return true if value.instance_of? self
|
|
154
|
+
|
|
155
|
+
return false unless value.instance_of? Hash
|
|
156
|
+
|
|
157
|
+
true
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Provides a human-readable string representation of the object.
|
|
161
|
+
def to_s
|
|
162
|
+
class_name = self.class.name.split('::').last
|
|
163
|
+
"<#{class_name} brand: #{@brand}, expiration_period: #{@expiration_period},"\
|
|
164
|
+
" expiration_time_shift: #{@expiration_time_shift}, bank_code: #{@bank_code}, bank_name:"\
|
|
165
|
+
" #{@bank_name}, branch_code: #{@branch_code}, branch_name: #{@branch_name}, account_number:"\
|
|
166
|
+
" #{@account_number}, account_holder_name: #{@account_holder_name}, additional_properties:"\
|
|
167
|
+
" #{@additional_properties}>"
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
171
|
+
def inspect
|
|
172
|
+
class_name = self.class.name.split('::').last
|
|
173
|
+
"<#{class_name} brand: #{@brand.inspect}, expiration_period: #{@expiration_period.inspect},"\
|
|
174
|
+
" expiration_time_shift: #{@expiration_time_shift.inspect}, bank_code:"\
|
|
175
|
+
" #{@bank_code.inspect}, bank_name: #{@bank_name.inspect}, branch_code:"\
|
|
176
|
+
" #{@branch_code.inspect}, branch_name: #{@branch_name.inspect}, account_number:"\
|
|
177
|
+
" #{@account_number.inspect}, account_holder_name: #{@account_holder_name.inspect},"\
|
|
178
|
+
" additional_properties: #{@additional_properties}>"
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
# Token Response Card Data schema.
|
|
8
|
+
class TokenResponseCardData < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Token Response Card Data Card schema.
|
|
13
|
+
# @return [TokenResponseCardDataCard]
|
|
14
|
+
attr_accessor :card
|
|
15
|
+
|
|
16
|
+
# Token Response Card Data Billing schema.
|
|
17
|
+
# @return [TokenResponseCardDataBilling]
|
|
18
|
+
attr_accessor :billing
|
|
19
|
+
|
|
20
|
+
# Token Response Card Data Cvv Authorize schema.
|
|
21
|
+
# @return [TokenResponseCardDataCvvAuthorize]
|
|
22
|
+
attr_accessor :cvv_authorize
|
|
23
|
+
|
|
24
|
+
# Token Response Card Data Cvv Authorize Check schema.
|
|
25
|
+
# @return [TokenResponseCardDataCvvAuthorizeCheck]
|
|
26
|
+
attr_accessor :cvv_authorize_check
|
|
27
|
+
|
|
28
|
+
# Token Response Card Data Three Ds schema.
|
|
29
|
+
# @return [TokenResponseCardDataThreeDs]
|
|
30
|
+
attr_accessor :three_ds
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['card'] = 'card'
|
|
36
|
+
@_hash['billing'] = 'billing'
|
|
37
|
+
@_hash['cvv_authorize'] = 'cvv_authorize'
|
|
38
|
+
@_hash['cvv_authorize_check'] = 'cvv_authorize_check'
|
|
39
|
+
@_hash['three_ds'] = 'three_ds'
|
|
40
|
+
@_hash
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for optional fields
|
|
44
|
+
def self.optionals
|
|
45
|
+
%w[
|
|
46
|
+
card
|
|
47
|
+
billing
|
|
48
|
+
cvv_authorize
|
|
49
|
+
cvv_authorize_check
|
|
50
|
+
three_ds
|
|
51
|
+
]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for nullable fields
|
|
55
|
+
def self.nullables
|
|
56
|
+
[]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def initialize(card: SKIP, billing: SKIP, cvv_authorize: SKIP,
|
|
60
|
+
cvv_authorize_check: SKIP, three_ds: SKIP,
|
|
61
|
+
additional_properties: nil)
|
|
62
|
+
# Add additional model properties to the instance
|
|
63
|
+
additional_properties = {} if additional_properties.nil?
|
|
64
|
+
|
|
65
|
+
@card = card unless card == SKIP
|
|
66
|
+
@billing = billing unless billing == SKIP
|
|
67
|
+
@cvv_authorize = cvv_authorize unless cvv_authorize == SKIP
|
|
68
|
+
@cvv_authorize_check = cvv_authorize_check unless cvv_authorize_check == SKIP
|
|
69
|
+
@three_ds = three_ds unless three_ds == SKIP
|
|
70
|
+
@additional_properties = additional_properties
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Creates an instance of the object from a hash.
|
|
74
|
+
def self.from_hash(hash)
|
|
75
|
+
return nil unless hash
|
|
76
|
+
|
|
77
|
+
# Extract variables from the hash.
|
|
78
|
+
card = TokenResponseCardDataCard.from_hash(hash['card']) if hash['card']
|
|
79
|
+
billing = TokenResponseCardDataBilling.from_hash(hash['billing']) if hash['billing']
|
|
80
|
+
cvv_authorize = TokenResponseCardDataCvvAuthorize.from_hash(hash['cvv_authorize']) if
|
|
81
|
+
hash['cvv_authorize']
|
|
82
|
+
if hash['cvv_authorize_check']
|
|
83
|
+
cvv_authorize_check = TokenResponseCardDataCvvAuthorizeCheck.from_hash(hash['cvv_authorize_check'])
|
|
84
|
+
end
|
|
85
|
+
three_ds = TokenResponseCardDataThreeDs.from_hash(hash['three_ds']) if hash['three_ds']
|
|
86
|
+
|
|
87
|
+
# Create a new hash for additional properties, removing known properties.
|
|
88
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
89
|
+
|
|
90
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
91
|
+
new_hash, proc { |value| value }
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
# Create object from extracted values.
|
|
95
|
+
TokenResponseCardData.new(card: card,
|
|
96
|
+
billing: billing,
|
|
97
|
+
cvv_authorize: cvv_authorize,
|
|
98
|
+
cvv_authorize_check: cvv_authorize_check,
|
|
99
|
+
three_ds: three_ds,
|
|
100
|
+
additional_properties: additional_properties)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Validates an instance of the object from a given value.
|
|
104
|
+
# @param [TokenResponseCardData | Hash] The value against the validation is performed.
|
|
105
|
+
def self.validate(value)
|
|
106
|
+
return true if value.instance_of? self
|
|
107
|
+
|
|
108
|
+
return false unless value.instance_of? Hash
|
|
109
|
+
|
|
110
|
+
true
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Provides a human-readable string representation of the object.
|
|
114
|
+
def to_s
|
|
115
|
+
class_name = self.class.name.split('::').last
|
|
116
|
+
"<#{class_name} card: #{@card}, billing: #{@billing}, cvv_authorize: #{@cvv_authorize},"\
|
|
117
|
+
" cvv_authorize_check: #{@cvv_authorize_check}, three_ds: #{@three_ds},"\
|
|
118
|
+
" additional_properties: #{@additional_properties}>"
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
122
|
+
def inspect
|
|
123
|
+
class_name = self.class.name.split('::').last
|
|
124
|
+
"<#{class_name} card: #{@card.inspect}, billing: #{@billing.inspect}, cvv_authorize:"\
|
|
125
|
+
" #{@cvv_authorize.inspect}, cvv_authorize_check: #{@cvv_authorize_check.inspect}, three_ds:"\
|
|
126
|
+
" #{@three_ds.inspect}, additional_properties: #{@additional_properties}>"
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
@@ -0,0 +1,153 @@
|
|
|
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
|
+
# Token Response Card Data Billing schema.
|
|
8
|
+
class TokenResponseCardDataBilling < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Primary street address line.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :line1
|
|
15
|
+
|
|
16
|
+
# Secondary street address line.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :line2
|
|
19
|
+
|
|
20
|
+
# State or prefecture.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :state
|
|
23
|
+
|
|
24
|
+
# City or locality.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :city
|
|
27
|
+
|
|
28
|
+
# Country code.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :country
|
|
31
|
+
|
|
32
|
+
# Postal code.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :zip
|
|
35
|
+
|
|
36
|
+
# Token Response Phone Number schema.
|
|
37
|
+
# @return [TokenResponsePhoneNumber]
|
|
38
|
+
attr_accessor :phone_number
|
|
39
|
+
|
|
40
|
+
# A mapping from model property names to API property names.
|
|
41
|
+
def self.names
|
|
42
|
+
@_hash = {} if @_hash.nil?
|
|
43
|
+
@_hash['line1'] = 'line1'
|
|
44
|
+
@_hash['line2'] = 'line2'
|
|
45
|
+
@_hash['state'] = 'state'
|
|
46
|
+
@_hash['city'] = 'city'
|
|
47
|
+
@_hash['country'] = 'country'
|
|
48
|
+
@_hash['zip'] = 'zip'
|
|
49
|
+
@_hash['phone_number'] = 'phone_number'
|
|
50
|
+
@_hash
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for optional fields
|
|
54
|
+
def self.optionals
|
|
55
|
+
%w[
|
|
56
|
+
line1
|
|
57
|
+
line2
|
|
58
|
+
state
|
|
59
|
+
city
|
|
60
|
+
country
|
|
61
|
+
zip
|
|
62
|
+
phone_number
|
|
63
|
+
]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# An array for nullable fields
|
|
67
|
+
def self.nullables
|
|
68
|
+
%w[
|
|
69
|
+
line1
|
|
70
|
+
line2
|
|
71
|
+
state
|
|
72
|
+
city
|
|
73
|
+
country
|
|
74
|
+
zip
|
|
75
|
+
]
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def initialize(line1: SKIP, line2: SKIP, state: SKIP, city: SKIP,
|
|
79
|
+
country: SKIP, zip: SKIP, phone_number: SKIP,
|
|
80
|
+
additional_properties: nil)
|
|
81
|
+
# Add additional model properties to the instance
|
|
82
|
+
additional_properties = {} if additional_properties.nil?
|
|
83
|
+
|
|
84
|
+
@line1 = line1 unless line1 == SKIP
|
|
85
|
+
@line2 = line2 unless line2 == SKIP
|
|
86
|
+
@state = state unless state == SKIP
|
|
87
|
+
@city = city unless city == SKIP
|
|
88
|
+
@country = country unless country == SKIP
|
|
89
|
+
@zip = zip unless zip == SKIP
|
|
90
|
+
@phone_number = phone_number unless phone_number == SKIP
|
|
91
|
+
@additional_properties = additional_properties
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Creates an instance of the object from a hash.
|
|
95
|
+
def self.from_hash(hash)
|
|
96
|
+
return nil unless hash
|
|
97
|
+
|
|
98
|
+
# Extract variables from the hash.
|
|
99
|
+
line1 = hash.key?('line1') ? hash['line1'] : SKIP
|
|
100
|
+
line2 = hash.key?('line2') ? hash['line2'] : SKIP
|
|
101
|
+
state = hash.key?('state') ? hash['state'] : SKIP
|
|
102
|
+
city = hash.key?('city') ? hash['city'] : SKIP
|
|
103
|
+
country = hash.key?('country') ? hash['country'] : SKIP
|
|
104
|
+
zip = hash.key?('zip') ? hash['zip'] : SKIP
|
|
105
|
+
phone_number = TokenResponsePhoneNumber.from_hash(hash['phone_number']) if
|
|
106
|
+
hash['phone_number']
|
|
107
|
+
|
|
108
|
+
# Create a new hash for additional properties, removing known properties.
|
|
109
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
110
|
+
|
|
111
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
112
|
+
new_hash, proc { |value| value }
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
# Create object from extracted values.
|
|
116
|
+
TokenResponseCardDataBilling.new(line1: line1,
|
|
117
|
+
line2: line2,
|
|
118
|
+
state: state,
|
|
119
|
+
city: city,
|
|
120
|
+
country: country,
|
|
121
|
+
zip: zip,
|
|
122
|
+
phone_number: phone_number,
|
|
123
|
+
additional_properties: additional_properties)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Validates an instance of the object from a given value.
|
|
127
|
+
# @param [TokenResponseCardDataBilling | Hash] The value against the validation is performed.
|
|
128
|
+
def self.validate(value)
|
|
129
|
+
return true if value.instance_of? self
|
|
130
|
+
|
|
131
|
+
return false unless value.instance_of? Hash
|
|
132
|
+
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Provides a human-readable string representation of the object.
|
|
137
|
+
def to_s
|
|
138
|
+
class_name = self.class.name.split('::').last
|
|
139
|
+
"<#{class_name} line1: #{@line1}, line2: #{@line2}, state: #{@state}, city: #{@city},"\
|
|
140
|
+
" country: #{@country}, zip: #{@zip}, phone_number: #{@phone_number}, additional_properties:"\
|
|
141
|
+
" #{@additional_properties}>"
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
145
|
+
def inspect
|
|
146
|
+
class_name = self.class.name.split('::').last
|
|
147
|
+
"<#{class_name} line1: #{@line1.inspect}, line2: #{@line2.inspect}, state:"\
|
|
148
|
+
" #{@state.inspect}, city: #{@city.inspect}, country: #{@country.inspect}, zip:"\
|
|
149
|
+
" #{@zip.inspect}, phone_number: #{@phone_number.inspect}, additional_properties:"\
|
|
150
|
+
" #{@additional_properties}>"
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
@@ -0,0 +1,187 @@
|
|
|
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
|
+
# Token Response Card Data Card schema.
|
|
8
|
+
class TokenResponseCardDataCard < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Cardholder name.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :cardholder
|
|
15
|
+
|
|
16
|
+
# Card expiration month.
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
attr_accessor :exp_month
|
|
19
|
+
|
|
20
|
+
# Card expiration year.
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :exp_year
|
|
23
|
+
|
|
24
|
+
# Card bin value.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :card_bin
|
|
27
|
+
|
|
28
|
+
# Last four value.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :last_four
|
|
31
|
+
|
|
32
|
+
# Brand or network name.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :brand
|
|
35
|
+
|
|
36
|
+
# Card type value.
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :card_type
|
|
39
|
+
|
|
40
|
+
# Country code.
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :country
|
|
43
|
+
|
|
44
|
+
# Category value.
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :category
|
|
47
|
+
|
|
48
|
+
# Issuer value.
|
|
49
|
+
# @return [String]
|
|
50
|
+
attr_accessor :issuer
|
|
51
|
+
|
|
52
|
+
# Sub brand value.
|
|
53
|
+
# @return [String]
|
|
54
|
+
attr_accessor :sub_brand
|
|
55
|
+
|
|
56
|
+
# A mapping from model property names to API property names.
|
|
57
|
+
def self.names
|
|
58
|
+
@_hash = {} if @_hash.nil?
|
|
59
|
+
@_hash['cardholder'] = 'cardholder'
|
|
60
|
+
@_hash['exp_month'] = 'exp_month'
|
|
61
|
+
@_hash['exp_year'] = 'exp_year'
|
|
62
|
+
@_hash['card_bin'] = 'card_bin'
|
|
63
|
+
@_hash['last_four'] = 'last_four'
|
|
64
|
+
@_hash['brand'] = 'brand'
|
|
65
|
+
@_hash['card_type'] = 'card_type'
|
|
66
|
+
@_hash['country'] = 'country'
|
|
67
|
+
@_hash['category'] = 'category'
|
|
68
|
+
@_hash['issuer'] = 'issuer'
|
|
69
|
+
@_hash['sub_brand'] = 'sub_brand'
|
|
70
|
+
@_hash
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# An array for optional fields
|
|
74
|
+
def self.optionals
|
|
75
|
+
%w[
|
|
76
|
+
cardholder
|
|
77
|
+
exp_month
|
|
78
|
+
exp_year
|
|
79
|
+
card_bin
|
|
80
|
+
last_four
|
|
81
|
+
brand
|
|
82
|
+
card_type
|
|
83
|
+
country
|
|
84
|
+
category
|
|
85
|
+
issuer
|
|
86
|
+
sub_brand
|
|
87
|
+
]
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# An array for nullable fields
|
|
91
|
+
def self.nullables
|
|
92
|
+
%w[
|
|
93
|
+
category
|
|
94
|
+
issuer
|
|
95
|
+
]
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def initialize(cardholder: SKIP, exp_month: SKIP, exp_year: SKIP,
|
|
99
|
+
card_bin: SKIP, last_four: SKIP, brand: SKIP,
|
|
100
|
+
card_type: SKIP, country: SKIP, category: SKIP, issuer: SKIP,
|
|
101
|
+
sub_brand: SKIP, additional_properties: nil)
|
|
102
|
+
# Add additional model properties to the instance
|
|
103
|
+
additional_properties = {} if additional_properties.nil?
|
|
104
|
+
|
|
105
|
+
@cardholder = cardholder unless cardholder == SKIP
|
|
106
|
+
@exp_month = exp_month unless exp_month == SKIP
|
|
107
|
+
@exp_year = exp_year unless exp_year == SKIP
|
|
108
|
+
@card_bin = card_bin unless card_bin == SKIP
|
|
109
|
+
@last_four = last_four unless last_four == SKIP
|
|
110
|
+
@brand = brand unless brand == SKIP
|
|
111
|
+
@card_type = card_type unless card_type == SKIP
|
|
112
|
+
@country = country unless country == SKIP
|
|
113
|
+
@category = category unless category == SKIP
|
|
114
|
+
@issuer = issuer unless issuer == SKIP
|
|
115
|
+
@sub_brand = sub_brand unless sub_brand == 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
|
+
cardholder = hash.key?('cardholder') ? hash['cardholder'] : SKIP
|
|
125
|
+
exp_month = hash.key?('exp_month') ? hash['exp_month'] : SKIP
|
|
126
|
+
exp_year = hash.key?('exp_year') ? hash['exp_year'] : SKIP
|
|
127
|
+
card_bin = hash.key?('card_bin') ? hash['card_bin'] : SKIP
|
|
128
|
+
last_four = hash.key?('last_four') ? hash['last_four'] : SKIP
|
|
129
|
+
brand = hash.key?('brand') ? hash['brand'] : SKIP
|
|
130
|
+
card_type = hash.key?('card_type') ? hash['card_type'] : SKIP
|
|
131
|
+
country = hash.key?('country') ? hash['country'] : SKIP
|
|
132
|
+
category = hash.key?('category') ? hash['category'] : SKIP
|
|
133
|
+
issuer = hash.key?('issuer') ? hash['issuer'] : SKIP
|
|
134
|
+
sub_brand = hash.key?('sub_brand') ? hash['sub_brand'] : 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
|
+
TokenResponseCardDataCard.new(cardholder: cardholder,
|
|
145
|
+
exp_month: exp_month,
|
|
146
|
+
exp_year: exp_year,
|
|
147
|
+
card_bin: card_bin,
|
|
148
|
+
last_four: last_four,
|
|
149
|
+
brand: brand,
|
|
150
|
+
card_type: card_type,
|
|
151
|
+
country: country,
|
|
152
|
+
category: category,
|
|
153
|
+
issuer: issuer,
|
|
154
|
+
sub_brand: sub_brand,
|
|
155
|
+
additional_properties: additional_properties)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Validates an instance of the object from a given value.
|
|
159
|
+
# @param [TokenResponseCardDataCard | Hash] The value against the validation is performed.
|
|
160
|
+
def self.validate(value)
|
|
161
|
+
return true if value.instance_of? self
|
|
162
|
+
|
|
163
|
+
return false unless value.instance_of? Hash
|
|
164
|
+
|
|
165
|
+
true
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Provides a human-readable string representation of the object.
|
|
169
|
+
def to_s
|
|
170
|
+
class_name = self.class.name.split('::').last
|
|
171
|
+
"<#{class_name} cardholder: #{@cardholder}, exp_month: #{@exp_month}, exp_year:"\
|
|
172
|
+
" #{@exp_year}, card_bin: #{@card_bin}, last_four: #{@last_four}, brand: #{@brand},"\
|
|
173
|
+
" card_type: #{@card_type}, country: #{@country}, category: #{@category}, issuer:"\
|
|
174
|
+
" #{@issuer}, sub_brand: #{@sub_brand}, additional_properties: #{@additional_properties}>"
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
178
|
+
def inspect
|
|
179
|
+
class_name = self.class.name.split('::').last
|
|
180
|
+
"<#{class_name} cardholder: #{@cardholder.inspect}, exp_month: #{@exp_month.inspect},"\
|
|
181
|
+
" exp_year: #{@exp_year.inspect}, card_bin: #{@card_bin.inspect}, last_four:"\
|
|
182
|
+
" #{@last_four.inspect}, brand: #{@brand.inspect}, card_type: #{@card_type.inspect},"\
|
|
183
|
+
" country: #{@country.inspect}, category: #{@category.inspect}, issuer: #{@issuer.inspect},"\
|
|
184
|
+
" sub_brand: #{@sub_brand.inspect}, additional_properties: #{@additional_properties}>"
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|