payquicker-apimatic-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 +208 -0
- data/bin/console +15 -0
- data/lib/pay_quicker_sdk/api_helper.rb +10 -0
- data/lib/pay_quicker_sdk/client.rb +205 -0
- data/lib/pay_quicker_sdk/configuration.rb +229 -0
- data/lib/pay_quicker_sdk/controllers/agreements_controller.rb +129 -0
- data/lib/pay_quicker_sdk/controllers/balances_controller.rb +156 -0
- data/lib/pay_quicker_sdk/controllers/bank_accounts_controller.rb +587 -0
- data/lib/pay_quicker_sdk/controllers/base_controller.rb +60 -0
- data/lib/pay_quicker_sdk/controllers/client_side_controller.rb +237 -0
- data/lib/pay_quicker_sdk/controllers/compliance_controller.rb +77 -0
- data/lib/pay_quicker_sdk/controllers/documents_controller.rb +233 -0
- data/lib/pay_quicker_sdk/controllers/electronic_wallets_controller.rb +280 -0
- data/lib/pay_quicker_sdk/controllers/events_controller.rb +75 -0
- data/lib/pay_quicker_sdk/controllers/invitations_controller.rb +179 -0
- data/lib/pay_quicker_sdk/controllers/jobs_controller.rb +154 -0
- data/lib/pay_quicker_sdk/controllers/o_auth_authorization_controller.rb +43 -0
- data/lib/pay_quicker_sdk/controllers/payments_controller.rb +217 -0
- data/lib/pay_quicker_sdk/controllers/prepaid_cards_controller.rb +262 -0
- data/lib/pay_quicker_sdk/controllers/program_controller.rb +88 -0
- data/lib/pay_quicker_sdk/controllers/receipts_controller.rb +287 -0
- data/lib/pay_quicker_sdk/controllers/spendback_controller.rb +201 -0
- data/lib/pay_quicker_sdk/controllers/spendback_refunds_controller.rb +232 -0
- data/lib/pay_quicker_sdk/controllers/statements_controller.rb +197 -0
- data/lib/pay_quicker_sdk/controllers/transfers_controller.rb +259 -0
- data/lib/pay_quicker_sdk/controllers/users_controller.rb +151 -0
- data/lib/pay_quicker_sdk/controllers/webhooks_controller.rb +173 -0
- data/lib/pay_quicker_sdk/exceptions/api_error_result_exception.rb +80 -0
- data/lib/pay_quicker_sdk/exceptions/api_exception.rb +21 -0
- data/lib/pay_quicker_sdk/exceptions/o_auth_provider_exception.rb +64 -0
- data/lib/pay_quicker_sdk/http/auth/clientside.rb +53 -0
- data/lib/pay_quicker_sdk/http/auth/server.rb +156 -0
- data/lib/pay_quicker_sdk/http/http_call_back.rb +10 -0
- data/lib/pay_quicker_sdk/http/http_method_enum.rb +10 -0
- data/lib/pay_quicker_sdk/http/http_request.rb +10 -0
- data/lib/pay_quicker_sdk/http/http_response.rb +10 -0
- data/lib/pay_quicker_sdk/http/proxy_settings.rb +22 -0
- data/lib/pay_quicker_sdk/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/pay_quicker_sdk/logging/sdk_logger.rb +17 -0
- data/lib/pay_quicker_sdk/models/addresses.rb +45 -0
- data/lib/pay_quicker_sdk/models/agreement_list_result_json.rb +106 -0
- data/lib/pay_quicker_sdk/models/agreement_object.rb +120 -0
- data/lib/pay_quicker_sdk/models/agreement_result.rb +130 -0
- data/lib/pay_quicker_sdk/models/agreement_types.rb +64 -0
- data/lib/pay_quicker_sdk/models/authorization_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/authorization_object.rb +194 -0
- data/lib/pay_quicker_sdk/models/balance_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/balance_object.rb +118 -0
- data/lib/pay_quicker_sdk/models/balance_result.rb +128 -0
- data/lib/pay_quicker_sdk/models/bank_account_address.rb +132 -0
- data/lib/pay_quicker_sdk/models/bank_account_field.rb +83 -0
- data/lib/pay_quicker_sdk/models/bank_account_fields.rb +195 -0
- data/lib/pay_quicker_sdk/models/bank_account_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/bank_account_object.rb +226 -0
- data/lib/pay_quicker_sdk/models/bank_account_ownership.rb +36 -0
- data/lib/pay_quicker_sdk/models/bank_account_required_fields.rb +125 -0
- data/lib/pay_quicker_sdk/models/bank_account_requirement.rb +142 -0
- data/lib/pay_quicker_sdk/models/bank_account_requirement_format.rb +93 -0
- data/lib/pay_quicker_sdk/models/bank_account_requirement_format_legend.rb +93 -0
- data/lib/pay_quicker_sdk/models/bank_account_requirement_list_result.rb +110 -0
- data/lib/pay_quicker_sdk/models/bank_account_requirement_validator.rb +86 -0
- data/lib/pay_quicker_sdk/models/bank_account_result.rb +234 -0
- data/lib/pay_quicker_sdk/models/bank_account_statuses.rb +49 -0
- data/lib/pay_quicker_sdk/models/bank_account_types.rb +47 -0
- data/lib/pay_quicker_sdk/models/bank_types.rb +68 -0
- data/lib/pay_quicker_sdk/models/base_model.rb +122 -0
- data/lib/pay_quicker_sdk/models/business_contact_roles.rb +44 -0
- data/lib/pay_quicker_sdk/models/card_networks.rb +36 -0
- data/lib/pay_quicker_sdk/models/card_processors.rb +52 -0
- data/lib/pay_quicker_sdk/models/category_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/countries.rb +1031 -0
- data/lib/pay_quicker_sdk/models/countries_alpha_code3.rb +1028 -0
- data/lib/pay_quicker_sdk/models/create_invitation.rb +614 -0
- data/lib/pay_quicker_sdk/models/create_or_update_bank_account.rb +163 -0
- data/lib/pay_quicker_sdk/models/create_or_update_document.rb +82 -0
- data/lib/pay_quicker_sdk/models/create_or_update_document_fields.rb +81 -0
- data/lib/pay_quicker_sdk/models/create_or_update_electronic_wallet.rb +126 -0
- data/lib/pay_quicker_sdk/models/create_or_update_user.rb +614 -0
- data/lib/pay_quicker_sdk/models/create_spendback_refund_quote.rb +173 -0
- data/lib/pay_quicker_sdk/models/create_webhook_request.rb +82 -0
- data/lib/pay_quicker_sdk/models/currencies.rb +700 -0
- data/lib/pay_quicker_sdk/models/delivery_details.rb +119 -0
- data/lib/pay_quicker_sdk/models/document_details.rb +81 -0
- data/lib/pay_quicker_sdk/models/document_list_result.rb +108 -0
- data/lib/pay_quicker_sdk/models/document_object.rb +147 -0
- data/lib/pay_quicker_sdk/models/document_requirements_list_result.rb +91 -0
- data/lib/pay_quicker_sdk/models/document_result.rb +157 -0
- data/lib/pay_quicker_sdk/models/document_status_types.rb +48 -0
- data/lib/pay_quicker_sdk/models/document_types.rb +264 -0
- data/lib/pay_quicker_sdk/models/electronic_funds_transfer_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/electronic_transfer_failure_types.rb +97 -0
- data/lib/pay_quicker_sdk/models/electronic_transfer_status_types.rb +46 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_field.rb +83 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_fields.rb +41 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_object.rb +186 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_required_fields.rb +125 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_requirement.rb +166 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_requirement_format.rb +93 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_requirement_format_legend.rb +93 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_requirement_list_result.rb +110 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_requirement_validator.rb +86 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_result.rb +195 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_statuses.rb +48 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_type.rb +99 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_types.rb +368 -0
- data/lib/pay_quicker_sdk/models/event_category_types.rb +40 -0
- data/lib/pay_quicker_sdk/models/event_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/event_object.rb +191 -0
- data/lib/pay_quicker_sdk/models/event_requirement_categories.rb +56 -0
- data/lib/pay_quicker_sdk/models/event_requirements.rb +105 -0
- data/lib/pay_quicker_sdk/models/event_statuses.rb +52 -0
- data/lib/pay_quicker_sdk/models/event_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/expected_delivery_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/fee_configuration.rb +154 -0
- data/lib/pay_quicker_sdk/models/fee_distribution.rb +159 -0
- data/lib/pay_quicker_sdk/models/fee_responsibility_parties.rb +44 -0
- data/lib/pay_quicker_sdk/models/fee_responsibility_sources.rb +36 -0
- data/lib/pay_quicker_sdk/models/fee_sources.rb +40 -0
- data/lib/pay_quicker_sdk/models/fee_values.rb +36 -0
- data/lib/pay_quicker_sdk/models/fees.rb +222 -0
- data/lib/pay_quicker_sdk/models/fx_rate.rb +144 -0
- data/lib/pay_quicker_sdk/models/gateway_payment_job.rb +131 -0
- data/lib/pay_quicker_sdk/models/gateway_payment_job_quote.rb +167 -0
- data/lib/pay_quicker_sdk/models/gateway_payment_quote.rb +220 -0
- data/lib/pay_quicker_sdk/models/gateway_spendback_quote.rb +167 -0
- data/lib/pay_quicker_sdk/models/gateway_transfer_quote.rb +195 -0
- data/lib/pay_quicker_sdk/models/genders.rb +48 -0
- data/lib/pay_quicker_sdk/models/government_ids.rb +45 -0
- data/lib/pay_quicker_sdk/models/hateoas_relationship.rb +69 -0
- data/lib/pay_quicker_sdk/models/hateoas_self_ref.rb +84 -0
- data/lib/pay_quicker_sdk/models/identity_verification_providers.rb +62 -0
- data/lib/pay_quicker_sdk/models/identity_verification_result_sub_types.rb +38 -0
- data/lib/pay_quicker_sdk/models/identity_verification_result_types.rb +57 -0
- data/lib/pay_quicker_sdk/models/idv_check_list_result.rb +108 -0
- data/lib/pay_quicker_sdk/models/idv_check_object.rb +209 -0
- data/lib/pay_quicker_sdk/models/idv_check_result.rb +221 -0
- data/lib/pay_quicker_sdk/models/invitation_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/invitation_object.rb +262 -0
- data/lib/pay_quicker_sdk/models/invitation_result.rb +272 -0
- data/lib/pay_quicker_sdk/models/job_status_types.rb +68 -0
- data/lib/pay_quicker_sdk/models/job_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/languages.rb +101 -0
- data/lib/pay_quicker_sdk/models/list_metadata.rb +116 -0
- data/lib/pay_quicker_sdk/models/lock_side_types.rb +37 -0
- data/lib/pay_quicker_sdk/models/metadata.rb +72 -0
- data/lib/pay_quicker_sdk/models/metadata_items.rb +80 -0
- data/lib/pay_quicker_sdk/models/o_auth_provider_error.rb +62 -0
- data/lib/pay_quicker_sdk/models/o_auth_scope_server.rb +36 -0
- data/lib/pay_quicker_sdk/models/o_auth_token.rb +106 -0
- data/lib/pay_quicker_sdk/models/occupations.rb +100 -0
- data/lib/pay_quicker_sdk/models/operation_result.rb +72 -0
- data/lib/pay_quicker_sdk/models/order_prepaid_card.rb +97 -0
- data/lib/pay_quicker_sdk/models/payment_job_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/payment_job_object.rb +211 -0
- data/lib/pay_quicker_sdk/models/payment_job_result.rb +220 -0
- data/lib/pay_quicker_sdk/models/payment_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/payment_object.rb +263 -0
- data/lib/pay_quicker_sdk/models/payment_purposes.rb +58 -0
- data/lib/pay_quicker_sdk/models/payment_result.rb +272 -0
- data/lib/pay_quicker_sdk/models/portal_payment_job.rb +131 -0
- data/lib/pay_quicker_sdk/models/portal_payment_job_quote.rb +176 -0
- data/lib/pay_quicker_sdk/models/portal_payment_quote.rb +228 -0
- data/lib/pay_quicker_sdk/models/portal_spendback_quote.rb +177 -0
- data/lib/pay_quicker_sdk/models/portal_transfer_quote.rb +204 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_authorizations.rb +129 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_capabilities.rb +69 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_data_object.rb +136 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_data_result.rb +146 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_data_token_object.rb +134 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_data_token_result.rb +145 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_data_type.rb +36 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_image_side.rb +36 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_object.rb +243 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_pin_object.rb +108 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_pin_result.rb +121 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_pin_token_object.rb +128 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_pin_token_result.rb +139 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_replacement_reasons.rb +48 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_result.rb +254 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_statuses.rb +71 -0
- data/lib/pay_quicker_sdk/models/program_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/program_object.rb +138 -0
- data/lib/pay_quicker_sdk/models/program_result.rb +147 -0
- data/lib/pay_quicker_sdk/models/program_types.rb +44 -0
- data/lib/pay_quicker_sdk/models/receipt_descriptions.rb +84 -0
- data/lib/pay_quicker_sdk/models/receipt_details.rb +439 -0
- data/lib/pay_quicker_sdk/models/receipt_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/receipt_object.rb +241 -0
- data/lib/pay_quicker_sdk/models/receipt_result.rb +251 -0
- data/lib/pay_quicker_sdk/models/receipt_statuses.rb +76 -0
- data/lib/pay_quicker_sdk/models/replace_prepaid_card.rb +85 -0
- data/lib/pay_quicker_sdk/models/retrieve_card_data.rb +73 -0
- data/lib/pay_quicker_sdk/models/retrieve_card_pin.rb +76 -0
- data/lib/pay_quicker_sdk/models/sandbox_instance.rb +76 -0
- data/lib/pay_quicker_sdk/models/signs.rb +40 -0
- data/lib/pay_quicker_sdk/models/spendback_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/spendback_object.rb +291 -0
- data/lib/pay_quicker_sdk/models/spendback_quote_accept_result.rb +301 -0
- data/lib/pay_quicker_sdk/models/spendback_refund_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/spendback_refund_object.rb +251 -0
- data/lib/pay_quicker_sdk/models/spendback_refund_result.rb +262 -0
- data/lib/pay_quicker_sdk/models/spendback_result.rb +301 -0
- data/lib/pay_quicker_sdk/models/statement_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/statement_object.rb +183 -0
- data/lib/pay_quicker_sdk/models/statement_result.rb +192 -0
- data/lib/pay_quicker_sdk/models/tax_resident_statuses.rb +40 -0
- data/lib/pay_quicker_sdk/models/token_purposes.rb +36 -0
- data/lib/pay_quicker_sdk/models/transfer_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/transfer_method_types.rb +48 -0
- data/lib/pay_quicker_sdk/models/transfer_object.rb +309 -0
- data/lib/pay_quicker_sdk/models/transfer_result.rb +318 -0
- data/lib/pay_quicker_sdk/models/transfer_statuses.rb +76 -0
- data/lib/pay_quicker_sdk/models/transfer_types.rb +112 -0
- data/lib/pay_quicker_sdk/models/translation.rb +85 -0
- data/lib/pay_quicker_sdk/models/uat_instance.rb +48 -0
- data/lib/pay_quicker_sdk/models/update_card_pin.rb +87 -0
- data/lib/pay_quicker_sdk/models/update_prepaid_card.rb +85 -0
- data/lib/pay_quicker_sdk/models/upload_fields.rb +40 -0
- data/lib/pay_quicker_sdk/models/user_action.rb +40 -0
- data/lib/pay_quicker_sdk/models/user_doc_req_item_docs_items_metadata_items.rb +101 -0
- data/lib/pay_quicker_sdk/models/user_doc_req_item_docs_items_metadata_items_name_items.rb +83 -0
- data/lib/pay_quicker_sdk/models/user_doc_req_item_docs_items_supplemental_docs_items.rb +92 -0
- data/lib/pay_quicker_sdk/models/user_document_requirement_item.rb +105 -0
- data/lib/pay_quicker_sdk/models/user_document_requirement_item_documents_items.rb +132 -0
- data/lib/pay_quicker_sdk/models/user_event_result.rb +201 -0
- data/lib/pay_quicker_sdk/models/user_impact.rb +48 -0
- data/lib/pay_quicker_sdk/models/user_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/user_object.rb +676 -0
- data/lib/pay_quicker_sdk/models/user_result.rb +686 -0
- data/lib/pay_quicker_sdk/models/user_statuses.rb +40 -0
- data/lib/pay_quicker_sdk/models/user_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/validator_types.rb +50 -0
- data/lib/pay_quicker_sdk/models/webhook_namespaces.rb +307 -0
- data/lib/pay_quicker_sdk/models/webhook_subscription_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/webhook_subscription_object.rb +158 -0
- data/lib/pay_quicker_sdk/models/webhook_subscription_result.rb +167 -0
- data/lib/pay_quicker_sdk/models/webhook_subscription_statuses.rb +44 -0
- data/lib/pay_quicker_sdk/utilities/date_time_helper.rb +11 -0
- data/lib/pay_quicker_sdk/utilities/file_wrapper.rb +28 -0
- data/lib/pay_quicker_sdk/utilities/union_type_lookup.rb +62 -0
- data/lib/pay_quicker_sdk.rb +274 -0
- data/test/controllers/controller_test_base.rb +24 -0
- data/test/controllers/test_agreements_controller.rb +108 -0
- data/test/controllers/test_balances_controller.rb +132 -0
- data/test/controllers/test_bank_accounts_controller.rb +645 -0
- data/test/controllers/test_client_side_controller.rb +295 -0
- data/test/controllers/test_compliance_controller.rb +86 -0
- data/test/controllers/test_documents_controller.rb +212 -0
- data/test/controllers/test_electronic_wallets_controller.rb +292 -0
- data/test/controllers/test_events_controller.rb +138 -0
- data/test/controllers/test_invitations_controller.rb +162 -0
- data/test/controllers/test_jobs_controller.rb +114 -0
- data/test/controllers/test_payments_controller.rb +323 -0
- data/test/controllers/test_prepaid_cards_controller.rb +351 -0
- data/test/controllers/test_program_controller.rb +134 -0
- data/test/controllers/test_receipts_controller.rb +813 -0
- data/test/controllers/test_spendback_controller.rb +302 -0
- data/test/controllers/test_spendback_refunds_controller.rb +128 -0
- data/test/controllers/test_statements_controller.rb +192 -0
- data/test/controllers/test_transfers_controller.rb +613 -0
- data/test/controllers/test_users_controller.rb +483 -0
- data/test/controllers/test_webhooks_controller.rb +402 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +380 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# pay_quicker_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for PayQuicker by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module PayQuickerSdk
|
|
8
|
+
# transfer object
|
|
9
|
+
class TransferObject < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# [Token](#/rest/models/structures/token) representing the resource
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :token
|
|
16
|
+
|
|
17
|
+
# Reference ID in the PayQuicker Hosted Portal, if applicable.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :portal_id
|
|
20
|
+
|
|
21
|
+
# [Unique value](#/rest/models/structures/client-transfer-id) provided by
|
|
22
|
+
# the client for the transfer, utilized for reference and deduplication.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :client_transfer_id
|
|
25
|
+
|
|
26
|
+
# Time object was [created](#/rest/models/structures/created-on)
|
|
27
|
+
# @return [DateTime]
|
|
28
|
+
attr_accessor :created
|
|
29
|
+
|
|
30
|
+
# The delivery details of a Bank transfer with the minimum and maximum
|
|
31
|
+
# delivery in minutes or the expected delivery time.
|
|
32
|
+
# @return [DeliveryDetails]
|
|
33
|
+
attr_accessor :delivery_details
|
|
34
|
+
|
|
35
|
+
# Allocated money to be sent in the transaction.
|
|
36
|
+
# @return [Float]
|
|
37
|
+
attr_accessor :destination_amount
|
|
38
|
+
|
|
39
|
+
# [Currency code type](#/rest/models/structures/country) for the object
|
|
40
|
+
# @return [Currencies]
|
|
41
|
+
attr_accessor :destination_currency
|
|
42
|
+
|
|
43
|
+
# Unique identifier representing the [destination of
|
|
44
|
+
# funds](#/rest/models/structures/destination-token)
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :destination_token
|
|
47
|
+
|
|
48
|
+
# Unique identifier representing the [destination of
|
|
49
|
+
# funds](#/rest/models/structures/destination-token)
|
|
50
|
+
# @return [FeeDistribution]
|
|
51
|
+
attr_accessor :fee
|
|
52
|
+
|
|
53
|
+
# Exchange rate
|
|
54
|
+
# @return [FxRate]
|
|
55
|
+
attr_accessor :fx_rate
|
|
56
|
+
|
|
57
|
+
# Optional internal [memo](#/rest/models/structures/memo) not visible to the
|
|
58
|
+
# user
|
|
59
|
+
# @return [String]
|
|
60
|
+
attr_accessor :memo
|
|
61
|
+
|
|
62
|
+
# [Optional comments](#/rest/models/structures/notes) visible to the user
|
|
63
|
+
# @return [String]
|
|
64
|
+
attr_accessor :note
|
|
65
|
+
|
|
66
|
+
# Unique identifier representing the [source of
|
|
67
|
+
# funds](#/rest/models/structures/source-token)
|
|
68
|
+
# @return [String]
|
|
69
|
+
attr_accessor :source_token
|
|
70
|
+
|
|
71
|
+
# [Program identifier](#/rest/models/structures/program-user-id) for the
|
|
72
|
+
# user
|
|
73
|
+
# @return [String]
|
|
74
|
+
attr_accessor :program_user_id
|
|
75
|
+
|
|
76
|
+
# Contact [email address](#/rest/models/structures/email-address) for the
|
|
77
|
+
# user account for the user account
|
|
78
|
+
# @return [String]
|
|
79
|
+
attr_accessor :email
|
|
80
|
+
|
|
81
|
+
# Current status of a [transfer](#/rest/models/structures/transfer)
|
|
82
|
+
# @return [TransferStatuses]
|
|
83
|
+
attr_accessor :status
|
|
84
|
+
|
|
85
|
+
# Auto-generated unique identifier representing a receipt, prefixed with
|
|
86
|
+
# `rcpt-`.
|
|
87
|
+
# @return [String]
|
|
88
|
+
attr_accessor :receipt_token
|
|
89
|
+
|
|
90
|
+
# Type of
|
|
91
|
+
# [lockside](page:additional-api-information/transfer-lockside-types) for
|
|
92
|
+
# transfers.
|
|
93
|
+
# @return [LockSideTypes]
|
|
94
|
+
attr_accessor :transfer_lock_side
|
|
95
|
+
|
|
96
|
+
# Optional transfer methods applicable only to bank and e-wallet transfers.
|
|
97
|
+
# @return [TransferMethodTypes]
|
|
98
|
+
attr_accessor :transfer_method_type
|
|
99
|
+
|
|
100
|
+
# Optional transfer methods applicable only to bank and e-wallet transfers.
|
|
101
|
+
# @return [Array[HateoasSelfRef]]
|
|
102
|
+
attr_accessor :links
|
|
103
|
+
|
|
104
|
+
# A mapping from model property names to API property names.
|
|
105
|
+
def self.names
|
|
106
|
+
@_hash = {} if @_hash.nil?
|
|
107
|
+
@_hash['token'] = 'token'
|
|
108
|
+
@_hash['portal_id'] = 'portalId'
|
|
109
|
+
@_hash['client_transfer_id'] = 'clientTransferId'
|
|
110
|
+
@_hash['created'] = 'created'
|
|
111
|
+
@_hash['delivery_details'] = 'deliveryDetails'
|
|
112
|
+
@_hash['destination_amount'] = 'destinationAmount'
|
|
113
|
+
@_hash['destination_currency'] = 'destinationCurrency'
|
|
114
|
+
@_hash['destination_token'] = 'destinationToken'
|
|
115
|
+
@_hash['fee'] = 'fee'
|
|
116
|
+
@_hash['fx_rate'] = 'fxRate'
|
|
117
|
+
@_hash['memo'] = 'memo'
|
|
118
|
+
@_hash['note'] = 'note'
|
|
119
|
+
@_hash['source_token'] = 'sourceToken'
|
|
120
|
+
@_hash['program_user_id'] = 'programUserId'
|
|
121
|
+
@_hash['email'] = 'email'
|
|
122
|
+
@_hash['status'] = 'status'
|
|
123
|
+
@_hash['receipt_token'] = 'receiptToken'
|
|
124
|
+
@_hash['transfer_lock_side'] = 'transferLockSide'
|
|
125
|
+
@_hash['transfer_method_type'] = 'transferMethodType'
|
|
126
|
+
@_hash['links'] = 'links'
|
|
127
|
+
@_hash
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# An array for optional fields
|
|
131
|
+
def self.optionals
|
|
132
|
+
%w[
|
|
133
|
+
token
|
|
134
|
+
portal_id
|
|
135
|
+
client_transfer_id
|
|
136
|
+
created
|
|
137
|
+
delivery_details
|
|
138
|
+
destination_amount
|
|
139
|
+
destination_currency
|
|
140
|
+
destination_token
|
|
141
|
+
fee
|
|
142
|
+
fx_rate
|
|
143
|
+
memo
|
|
144
|
+
note
|
|
145
|
+
source_token
|
|
146
|
+
program_user_id
|
|
147
|
+
email
|
|
148
|
+
status
|
|
149
|
+
receipt_token
|
|
150
|
+
transfer_lock_side
|
|
151
|
+
transfer_method_type
|
|
152
|
+
links
|
|
153
|
+
]
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# An array for nullable fields
|
|
157
|
+
def self.nullables
|
|
158
|
+
[]
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def initialize(
|
|
162
|
+
token = SKIP, portal_id = SKIP, client_transfer_id = SKIP, created = SKIP,
|
|
163
|
+
delivery_details = SKIP, destination_amount = SKIP,
|
|
164
|
+
destination_currency = Currencies::USD,
|
|
165
|
+
destination_token = 'dest-631b200f-665d-4dbe-bd01-3063c9dec97d',
|
|
166
|
+
fee = SKIP, fx_rate = SKIP, memo = SKIP, note = SKIP,
|
|
167
|
+
source_token = 'acct-3908ab5a-6ce1-474d-8b80-a63a7b147860',
|
|
168
|
+
program_user_id = SKIP, email = SKIP, status = SKIP,
|
|
169
|
+
receipt_token = 'rcpt-b7fda294-8d3a-48e8-9a11-ef7be07a732c',
|
|
170
|
+
transfer_lock_side = SKIP, transfer_method_type = SKIP, links = SKIP,
|
|
171
|
+
additional_properties = {}
|
|
172
|
+
)
|
|
173
|
+
# Add additional model properties to the instance.
|
|
174
|
+
additional_properties.each do |_name, _value|
|
|
175
|
+
instance_variable_set("@#{_name}", _value)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
@token = token unless token == SKIP
|
|
179
|
+
@portal_id = portal_id unless portal_id == SKIP
|
|
180
|
+
@client_transfer_id = client_transfer_id unless client_transfer_id == SKIP
|
|
181
|
+
@created = created unless created == SKIP
|
|
182
|
+
@delivery_details = delivery_details unless delivery_details == SKIP
|
|
183
|
+
@destination_amount = destination_amount unless destination_amount == SKIP
|
|
184
|
+
@destination_currency = destination_currency unless destination_currency == SKIP
|
|
185
|
+
@destination_token = destination_token unless destination_token == SKIP
|
|
186
|
+
@fee = fee unless fee == SKIP
|
|
187
|
+
@fx_rate = fx_rate unless fx_rate == SKIP
|
|
188
|
+
@memo = memo unless memo == SKIP
|
|
189
|
+
@note = note unless note == SKIP
|
|
190
|
+
@source_token = source_token unless source_token == SKIP
|
|
191
|
+
@program_user_id = program_user_id unless program_user_id == SKIP
|
|
192
|
+
@email = email unless email == SKIP
|
|
193
|
+
@status = status unless status == SKIP
|
|
194
|
+
@receipt_token = receipt_token unless receipt_token == SKIP
|
|
195
|
+
@transfer_lock_side = transfer_lock_side unless transfer_lock_side == SKIP
|
|
196
|
+
@transfer_method_type = transfer_method_type unless transfer_method_type == SKIP
|
|
197
|
+
@links = links unless links == SKIP
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Creates an instance of the object from a hash.
|
|
201
|
+
def self.from_hash(hash)
|
|
202
|
+
return nil unless hash
|
|
203
|
+
|
|
204
|
+
# Extract variables from the hash.
|
|
205
|
+
token = hash.key?('token') ? hash['token'] : SKIP
|
|
206
|
+
portal_id = hash.key?('portalId') ? hash['portalId'] : SKIP
|
|
207
|
+
client_transfer_id =
|
|
208
|
+
hash.key?('clientTransferId') ? hash['clientTransferId'] : SKIP
|
|
209
|
+
created = if hash.key?('created')
|
|
210
|
+
(DateTimeHelper.from_rfc3339(hash['created']) if hash['created'])
|
|
211
|
+
else
|
|
212
|
+
SKIP
|
|
213
|
+
end
|
|
214
|
+
delivery_details = DeliveryDetails.from_hash(hash['deliveryDetails']) if
|
|
215
|
+
hash['deliveryDetails']
|
|
216
|
+
destination_amount =
|
|
217
|
+
hash.key?('destinationAmount') ? hash['destinationAmount'] : SKIP
|
|
218
|
+
destination_currency = hash['destinationCurrency'] ||= Currencies::USD
|
|
219
|
+
destination_token =
|
|
220
|
+
hash['destinationToken'] ||= 'dest-631b200f-665d-4dbe-bd01-3063c9dec97d'
|
|
221
|
+
fee = FeeDistribution.from_hash(hash['fee']) if hash['fee']
|
|
222
|
+
fx_rate = FxRate.from_hash(hash['fxRate']) if hash['fxRate']
|
|
223
|
+
memo = hash.key?('memo') ? hash['memo'] : SKIP
|
|
224
|
+
note = hash.key?('note') ? hash['note'] : SKIP
|
|
225
|
+
source_token =
|
|
226
|
+
hash['sourceToken'] ||= 'acct-3908ab5a-6ce1-474d-8b80-a63a7b147860'
|
|
227
|
+
program_user_id =
|
|
228
|
+
hash.key?('programUserId') ? hash['programUserId'] : SKIP
|
|
229
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
230
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
231
|
+
receipt_token =
|
|
232
|
+
hash['receiptToken'] ||= 'rcpt-b7fda294-8d3a-48e8-9a11-ef7be07a732c'
|
|
233
|
+
transfer_lock_side =
|
|
234
|
+
hash.key?('transferLockSide') ? hash['transferLockSide'] : SKIP
|
|
235
|
+
transfer_method_type =
|
|
236
|
+
hash.key?('transferMethodType') ? hash['transferMethodType'] : SKIP
|
|
237
|
+
# Parameter is an array, so we need to iterate through it
|
|
238
|
+
links = nil
|
|
239
|
+
unless hash['links'].nil?
|
|
240
|
+
links = []
|
|
241
|
+
hash['links'].each do |structure|
|
|
242
|
+
links << (HateoasSelfRef.from_hash(structure) if structure)
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
links = SKIP unless hash.key?('links')
|
|
247
|
+
|
|
248
|
+
# Clean out expected properties from Hash.
|
|
249
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
|
250
|
+
|
|
251
|
+
# Create object from extracted values.
|
|
252
|
+
TransferObject.new(token,
|
|
253
|
+
portal_id,
|
|
254
|
+
client_transfer_id,
|
|
255
|
+
created,
|
|
256
|
+
delivery_details,
|
|
257
|
+
destination_amount,
|
|
258
|
+
destination_currency,
|
|
259
|
+
destination_token,
|
|
260
|
+
fee,
|
|
261
|
+
fx_rate,
|
|
262
|
+
memo,
|
|
263
|
+
note,
|
|
264
|
+
source_token,
|
|
265
|
+
program_user_id,
|
|
266
|
+
email,
|
|
267
|
+
status,
|
|
268
|
+
receipt_token,
|
|
269
|
+
transfer_lock_side,
|
|
270
|
+
transfer_method_type,
|
|
271
|
+
links,
|
|
272
|
+
additional_properties)
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
def to_custom_created
|
|
276
|
+
DateTimeHelper.to_rfc3339(created)
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Provides a human-readable string representation of the object.
|
|
280
|
+
def to_s
|
|
281
|
+
class_name = self.class.name.split('::').last
|
|
282
|
+
"<#{class_name} token: #{@token}, portal_id: #{@portal_id}, client_transfer_id:"\
|
|
283
|
+
" #{@client_transfer_id}, created: #{@created}, delivery_details: #{@delivery_details},"\
|
|
284
|
+
" destination_amount: #{@destination_amount}, destination_currency:"\
|
|
285
|
+
" #{@destination_currency}, destination_token: #{@destination_token}, fee: #{@fee}, fx_rate:"\
|
|
286
|
+
" #{@fx_rate}, memo: #{@memo}, note: #{@note}, source_token: #{@source_token},"\
|
|
287
|
+
" program_user_id: #{@program_user_id}, email: #{@email}, status: #{@status}, receipt_token:"\
|
|
288
|
+
" #{@receipt_token}, transfer_lock_side: #{@transfer_lock_side}, transfer_method_type:"\
|
|
289
|
+
" #{@transfer_method_type}, links: #{@links}, additional_properties:"\
|
|
290
|
+
" #{get_additional_properties}>"
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
294
|
+
def inspect
|
|
295
|
+
class_name = self.class.name.split('::').last
|
|
296
|
+
"<#{class_name} token: #{@token.inspect}, portal_id: #{@portal_id.inspect},"\
|
|
297
|
+
" client_transfer_id: #{@client_transfer_id.inspect}, created: #{@created.inspect},"\
|
|
298
|
+
" delivery_details: #{@delivery_details.inspect}, destination_amount:"\
|
|
299
|
+
" #{@destination_amount.inspect}, destination_currency: #{@destination_currency.inspect},"\
|
|
300
|
+
" destination_token: #{@destination_token.inspect}, fee: #{@fee.inspect}, fx_rate:"\
|
|
301
|
+
" #{@fx_rate.inspect}, memo: #{@memo.inspect}, note: #{@note.inspect}, source_token:"\
|
|
302
|
+
" #{@source_token.inspect}, program_user_id: #{@program_user_id.inspect}, email:"\
|
|
303
|
+
" #{@email.inspect}, status: #{@status.inspect}, receipt_token: #{@receipt_token.inspect},"\
|
|
304
|
+
" transfer_lock_side: #{@transfer_lock_side.inspect}, transfer_method_type:"\
|
|
305
|
+
" #{@transfer_method_type.inspect}, links: #{@links.inspect}, additional_properties:"\
|
|
306
|
+
" #{get_additional_properties}>"
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
end
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# pay_quicker_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for PayQuicker by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module PayQuickerSdk
|
|
8
|
+
# TransferResult Model.
|
|
9
|
+
class TransferResult < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# [Token](#/rest/models/structures/token) representing the resource
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :token
|
|
16
|
+
|
|
17
|
+
# Reference ID in the PayQuicker Hosted Portal, if applicable.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :portal_id
|
|
20
|
+
|
|
21
|
+
# [Unique value](#/rest/models/structures/client-transfer-id) provided by
|
|
22
|
+
# the client for the transfer, utilized for reference and deduplication.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :client_transfer_id
|
|
25
|
+
|
|
26
|
+
# Time object was [created](#/rest/models/structures/created-on)
|
|
27
|
+
# @return [DateTime]
|
|
28
|
+
attr_accessor :created
|
|
29
|
+
|
|
30
|
+
# The delivery details of a Bank transfer with the minimum and maximum
|
|
31
|
+
# delivery in minutes or the expected delivery time.
|
|
32
|
+
# @return [DeliveryDetails]
|
|
33
|
+
attr_accessor :delivery_details
|
|
34
|
+
|
|
35
|
+
# Allocated money to be sent in the transaction.
|
|
36
|
+
# @return [Float]
|
|
37
|
+
attr_accessor :destination_amount
|
|
38
|
+
|
|
39
|
+
# [Currency code type](#/rest/models/structures/country) for the object
|
|
40
|
+
# @return [Currencies]
|
|
41
|
+
attr_accessor :destination_currency
|
|
42
|
+
|
|
43
|
+
# Unique identifier representing the [destination of
|
|
44
|
+
# funds](#/rest/models/structures/destination-token)
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :destination_token
|
|
47
|
+
|
|
48
|
+
# Unique identifier representing the [destination of
|
|
49
|
+
# funds](#/rest/models/structures/destination-token)
|
|
50
|
+
# @return [FeeDistribution]
|
|
51
|
+
attr_accessor :fee
|
|
52
|
+
|
|
53
|
+
# Exchange rate
|
|
54
|
+
# @return [FxRate]
|
|
55
|
+
attr_accessor :fx_rate
|
|
56
|
+
|
|
57
|
+
# Optional internal [memo](#/rest/models/structures/memo) not visible to the
|
|
58
|
+
# user
|
|
59
|
+
# @return [String]
|
|
60
|
+
attr_accessor :memo
|
|
61
|
+
|
|
62
|
+
# [Optional comments](#/rest/models/structures/notes) visible to the user
|
|
63
|
+
# @return [String]
|
|
64
|
+
attr_accessor :note
|
|
65
|
+
|
|
66
|
+
# Unique identifier representing the [source of
|
|
67
|
+
# funds](#/rest/models/structures/source-token)
|
|
68
|
+
# @return [String]
|
|
69
|
+
attr_accessor :source_token
|
|
70
|
+
|
|
71
|
+
# [Program identifier](#/rest/models/structures/program-user-id) for the
|
|
72
|
+
# user
|
|
73
|
+
# @return [String]
|
|
74
|
+
attr_accessor :program_user_id
|
|
75
|
+
|
|
76
|
+
# Contact [email address](#/rest/models/structures/email-address) for the
|
|
77
|
+
# user account for the user account
|
|
78
|
+
# @return [String]
|
|
79
|
+
attr_accessor :email
|
|
80
|
+
|
|
81
|
+
# Current status of a [transfer](#/rest/models/structures/transfer)
|
|
82
|
+
# @return [TransferStatuses]
|
|
83
|
+
attr_accessor :status
|
|
84
|
+
|
|
85
|
+
# Auto-generated unique identifier representing a receipt, prefixed with
|
|
86
|
+
# `rcpt-`.
|
|
87
|
+
# @return [String]
|
|
88
|
+
attr_accessor :receipt_token
|
|
89
|
+
|
|
90
|
+
# Type of
|
|
91
|
+
# [lockside](page:additional-api-information/transfer-lockside-types) for
|
|
92
|
+
# transfers.
|
|
93
|
+
# @return [LockSideTypes]
|
|
94
|
+
attr_accessor :transfer_lock_side
|
|
95
|
+
|
|
96
|
+
# Optional transfer methods applicable only to bank and e-wallet transfers.
|
|
97
|
+
# @return [TransferMethodTypes]
|
|
98
|
+
attr_accessor :transfer_method_type
|
|
99
|
+
|
|
100
|
+
# Optional transfer methods applicable only to bank and e-wallet transfers.
|
|
101
|
+
# @return [Array[HateoasSelfRef]]
|
|
102
|
+
attr_accessor :links
|
|
103
|
+
|
|
104
|
+
# Optional transfer methods applicable only to bank and e-wallet transfers.
|
|
105
|
+
# @return [MetadataItems]
|
|
106
|
+
attr_accessor :meta
|
|
107
|
+
|
|
108
|
+
# A mapping from model property names to API property names.
|
|
109
|
+
def self.names
|
|
110
|
+
@_hash = {} if @_hash.nil?
|
|
111
|
+
@_hash['token'] = 'token'
|
|
112
|
+
@_hash['portal_id'] = 'portalId'
|
|
113
|
+
@_hash['client_transfer_id'] = 'clientTransferId'
|
|
114
|
+
@_hash['created'] = 'created'
|
|
115
|
+
@_hash['delivery_details'] = 'deliveryDetails'
|
|
116
|
+
@_hash['destination_amount'] = 'destinationAmount'
|
|
117
|
+
@_hash['destination_currency'] = 'destinationCurrency'
|
|
118
|
+
@_hash['destination_token'] = 'destinationToken'
|
|
119
|
+
@_hash['fee'] = 'fee'
|
|
120
|
+
@_hash['fx_rate'] = 'fxRate'
|
|
121
|
+
@_hash['memo'] = 'memo'
|
|
122
|
+
@_hash['note'] = 'note'
|
|
123
|
+
@_hash['source_token'] = 'sourceToken'
|
|
124
|
+
@_hash['program_user_id'] = 'programUserId'
|
|
125
|
+
@_hash['email'] = 'email'
|
|
126
|
+
@_hash['status'] = 'status'
|
|
127
|
+
@_hash['receipt_token'] = 'receiptToken'
|
|
128
|
+
@_hash['transfer_lock_side'] = 'transferLockSide'
|
|
129
|
+
@_hash['transfer_method_type'] = 'transferMethodType'
|
|
130
|
+
@_hash['links'] = 'links'
|
|
131
|
+
@_hash['meta'] = 'meta'
|
|
132
|
+
@_hash
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# An array for optional fields
|
|
136
|
+
def self.optionals
|
|
137
|
+
%w[
|
|
138
|
+
token
|
|
139
|
+
portal_id
|
|
140
|
+
client_transfer_id
|
|
141
|
+
created
|
|
142
|
+
delivery_details
|
|
143
|
+
destination_amount
|
|
144
|
+
destination_currency
|
|
145
|
+
destination_token
|
|
146
|
+
fee
|
|
147
|
+
fx_rate
|
|
148
|
+
memo
|
|
149
|
+
note
|
|
150
|
+
source_token
|
|
151
|
+
program_user_id
|
|
152
|
+
email
|
|
153
|
+
status
|
|
154
|
+
receipt_token
|
|
155
|
+
transfer_lock_side
|
|
156
|
+
transfer_method_type
|
|
157
|
+
links
|
|
158
|
+
meta
|
|
159
|
+
]
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# An array for nullable fields
|
|
163
|
+
def self.nullables
|
|
164
|
+
[]
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
def initialize(
|
|
168
|
+
token = SKIP, portal_id = SKIP, client_transfer_id = SKIP, created = SKIP,
|
|
169
|
+
delivery_details = SKIP, destination_amount = SKIP,
|
|
170
|
+
destination_currency = Currencies::USD,
|
|
171
|
+
destination_token = 'dest-631b200f-665d-4dbe-bd01-3063c9dec97d',
|
|
172
|
+
fee = SKIP, fx_rate = SKIP, memo = SKIP, note = SKIP,
|
|
173
|
+
source_token = 'acct-3908ab5a-6ce1-474d-8b80-a63a7b147860',
|
|
174
|
+
program_user_id = SKIP, email = SKIP, status = SKIP,
|
|
175
|
+
receipt_token = 'rcpt-b7fda294-8d3a-48e8-9a11-ef7be07a732c',
|
|
176
|
+
transfer_lock_side = SKIP, transfer_method_type = SKIP, links = SKIP,
|
|
177
|
+
meta = SKIP, additional_properties = {}
|
|
178
|
+
)
|
|
179
|
+
# Add additional model properties to the instance.
|
|
180
|
+
additional_properties.each do |_name, _value|
|
|
181
|
+
instance_variable_set("@#{_name}", _value)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
@token = token unless token == SKIP
|
|
185
|
+
@portal_id = portal_id unless portal_id == SKIP
|
|
186
|
+
@client_transfer_id = client_transfer_id unless client_transfer_id == SKIP
|
|
187
|
+
@created = created unless created == SKIP
|
|
188
|
+
@delivery_details = delivery_details unless delivery_details == SKIP
|
|
189
|
+
@destination_amount = destination_amount unless destination_amount == SKIP
|
|
190
|
+
@destination_currency = destination_currency unless destination_currency == SKIP
|
|
191
|
+
@destination_token = destination_token unless destination_token == SKIP
|
|
192
|
+
@fee = fee unless fee == SKIP
|
|
193
|
+
@fx_rate = fx_rate unless fx_rate == SKIP
|
|
194
|
+
@memo = memo unless memo == SKIP
|
|
195
|
+
@note = note unless note == SKIP
|
|
196
|
+
@source_token = source_token unless source_token == SKIP
|
|
197
|
+
@program_user_id = program_user_id unless program_user_id == SKIP
|
|
198
|
+
@email = email unless email == SKIP
|
|
199
|
+
@status = status unless status == SKIP
|
|
200
|
+
@receipt_token = receipt_token unless receipt_token == SKIP
|
|
201
|
+
@transfer_lock_side = transfer_lock_side unless transfer_lock_side == SKIP
|
|
202
|
+
@transfer_method_type = transfer_method_type unless transfer_method_type == SKIP
|
|
203
|
+
@links = links unless links == SKIP
|
|
204
|
+
@meta = meta unless meta == SKIP
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Creates an instance of the object from a hash.
|
|
208
|
+
def self.from_hash(hash)
|
|
209
|
+
return nil unless hash
|
|
210
|
+
|
|
211
|
+
# Extract variables from the hash.
|
|
212
|
+
token = hash.key?('token') ? hash['token'] : SKIP
|
|
213
|
+
portal_id = hash.key?('portalId') ? hash['portalId'] : SKIP
|
|
214
|
+
client_transfer_id =
|
|
215
|
+
hash.key?('clientTransferId') ? hash['clientTransferId'] : SKIP
|
|
216
|
+
created = if hash.key?('created')
|
|
217
|
+
(DateTimeHelper.from_rfc3339(hash['created']) if hash['created'])
|
|
218
|
+
else
|
|
219
|
+
SKIP
|
|
220
|
+
end
|
|
221
|
+
delivery_details = DeliveryDetails.from_hash(hash['deliveryDetails']) if
|
|
222
|
+
hash['deliveryDetails']
|
|
223
|
+
destination_amount =
|
|
224
|
+
hash.key?('destinationAmount') ? hash['destinationAmount'] : SKIP
|
|
225
|
+
destination_currency = hash['destinationCurrency'] ||= Currencies::USD
|
|
226
|
+
destination_token =
|
|
227
|
+
hash['destinationToken'] ||= 'dest-631b200f-665d-4dbe-bd01-3063c9dec97d'
|
|
228
|
+
fee = FeeDistribution.from_hash(hash['fee']) if hash['fee']
|
|
229
|
+
fx_rate = FxRate.from_hash(hash['fxRate']) if hash['fxRate']
|
|
230
|
+
memo = hash.key?('memo') ? hash['memo'] : SKIP
|
|
231
|
+
note = hash.key?('note') ? hash['note'] : SKIP
|
|
232
|
+
source_token =
|
|
233
|
+
hash['sourceToken'] ||= 'acct-3908ab5a-6ce1-474d-8b80-a63a7b147860'
|
|
234
|
+
program_user_id =
|
|
235
|
+
hash.key?('programUserId') ? hash['programUserId'] : SKIP
|
|
236
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
237
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
238
|
+
receipt_token =
|
|
239
|
+
hash['receiptToken'] ||= 'rcpt-b7fda294-8d3a-48e8-9a11-ef7be07a732c'
|
|
240
|
+
transfer_lock_side =
|
|
241
|
+
hash.key?('transferLockSide') ? hash['transferLockSide'] : SKIP
|
|
242
|
+
transfer_method_type =
|
|
243
|
+
hash.key?('transferMethodType') ? hash['transferMethodType'] : SKIP
|
|
244
|
+
# Parameter is an array, so we need to iterate through it
|
|
245
|
+
links = nil
|
|
246
|
+
unless hash['links'].nil?
|
|
247
|
+
links = []
|
|
248
|
+
hash['links'].each do |structure|
|
|
249
|
+
links << (HateoasSelfRef.from_hash(structure) if structure)
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
links = SKIP unless hash.key?('links')
|
|
254
|
+
meta = MetadataItems.from_hash(hash['meta']) if hash['meta']
|
|
255
|
+
|
|
256
|
+
# Clean out expected properties from Hash.
|
|
257
|
+
additional_properties = hash.reject { |k, _| names.value?(k) }
|
|
258
|
+
|
|
259
|
+
# Create object from extracted values.
|
|
260
|
+
TransferResult.new(token,
|
|
261
|
+
portal_id,
|
|
262
|
+
client_transfer_id,
|
|
263
|
+
created,
|
|
264
|
+
delivery_details,
|
|
265
|
+
destination_amount,
|
|
266
|
+
destination_currency,
|
|
267
|
+
destination_token,
|
|
268
|
+
fee,
|
|
269
|
+
fx_rate,
|
|
270
|
+
memo,
|
|
271
|
+
note,
|
|
272
|
+
source_token,
|
|
273
|
+
program_user_id,
|
|
274
|
+
email,
|
|
275
|
+
status,
|
|
276
|
+
receipt_token,
|
|
277
|
+
transfer_lock_side,
|
|
278
|
+
transfer_method_type,
|
|
279
|
+
links,
|
|
280
|
+
meta,
|
|
281
|
+
additional_properties)
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
def to_custom_created
|
|
285
|
+
DateTimeHelper.to_rfc3339(created)
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Provides a human-readable string representation of the object.
|
|
289
|
+
def to_s
|
|
290
|
+
class_name = self.class.name.split('::').last
|
|
291
|
+
"<#{class_name} token: #{@token}, portal_id: #{@portal_id}, client_transfer_id:"\
|
|
292
|
+
" #{@client_transfer_id}, created: #{@created}, delivery_details: #{@delivery_details},"\
|
|
293
|
+
" destination_amount: #{@destination_amount}, destination_currency:"\
|
|
294
|
+
" #{@destination_currency}, destination_token: #{@destination_token}, fee: #{@fee}, fx_rate:"\
|
|
295
|
+
" #{@fx_rate}, memo: #{@memo}, note: #{@note}, source_token: #{@source_token},"\
|
|
296
|
+
" program_user_id: #{@program_user_id}, email: #{@email}, status: #{@status}, receipt_token:"\
|
|
297
|
+
" #{@receipt_token}, transfer_lock_side: #{@transfer_lock_side}, transfer_method_type:"\
|
|
298
|
+
" #{@transfer_method_type}, links: #{@links}, meta: #{@meta}, additional_properties:"\
|
|
299
|
+
" #{get_additional_properties}>"
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
303
|
+
def inspect
|
|
304
|
+
class_name = self.class.name.split('::').last
|
|
305
|
+
"<#{class_name} token: #{@token.inspect}, portal_id: #{@portal_id.inspect},"\
|
|
306
|
+
" client_transfer_id: #{@client_transfer_id.inspect}, created: #{@created.inspect},"\
|
|
307
|
+
" delivery_details: #{@delivery_details.inspect}, destination_amount:"\
|
|
308
|
+
" #{@destination_amount.inspect}, destination_currency: #{@destination_currency.inspect},"\
|
|
309
|
+
" destination_token: #{@destination_token.inspect}, fee: #{@fee.inspect}, fx_rate:"\
|
|
310
|
+
" #{@fx_rate.inspect}, memo: #{@memo.inspect}, note: #{@note.inspect}, source_token:"\
|
|
311
|
+
" #{@source_token.inspect}, program_user_id: #{@program_user_id.inspect}, email:"\
|
|
312
|
+
" #{@email.inspect}, status: #{@status.inspect}, receipt_token: #{@receipt_token.inspect},"\
|
|
313
|
+
" transfer_lock_side: #{@transfer_lock_side.inspect}, transfer_method_type:"\
|
|
314
|
+
" #{@transfer_method_type.inspect}, links: #{@links.inspect}, meta: #{@meta.inspect},"\
|
|
315
|
+
" additional_properties: #{get_additional_properties}>"
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
end
|