moneykit 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +291 -0
- data/lib/moneykit/api/access_token_api.rb +224 -0
- data/lib/moneykit/api/account_numbers_api.rb +88 -0
- data/lib/moneykit/api/accounts_api.rb +301 -0
- data/lib/moneykit/api/identity_api.rb +91 -0
- data/lib/moneykit/api/institutions_api.rb +234 -0
- data/lib/moneykit/api/link_session_api.rb +164 -0
- data/lib/moneykit/api/links_api.rb +297 -0
- data/lib/moneykit/api/products_api.rb +99 -0
- data/lib/moneykit/api/transactions_api.rb +297 -0
- data/lib/moneykit/api/users_api.rb +262 -0
- data/lib/moneykit/api_client.rb +428 -0
- data/lib/moneykit/api_error.rb +58 -0
- data/lib/moneykit/configuration.rb +404 -0
- data/lib/moneykit/models/account.rb +301 -0
- data/lib/moneykit/models/account_balances.rb +279 -0
- data/lib/moneykit/models/account_group.rb +237 -0
- data/lib/moneykit/models/account_identity.rb +318 -0
- data/lib/moneykit/models/account_numbers.rb +241 -0
- data/lib/moneykit/models/account_numbers_link_product.rb +246 -0
- data/lib/moneykit/models/account_numbers_product_settings.rb +234 -0
- data/lib/moneykit/models/account_type.rb +49 -0
- data/lib/moneykit/models/account_with_account_numbers.rb +315 -0
- data/lib/moneykit/models/accounts_link_product.rb +232 -0
- data/lib/moneykit/models/ach_number.rb +251 -0
- data/lib/moneykit/models/address.rb +277 -0
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +277 -0
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +280 -0
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +277 -0
- data/lib/moneykit/models/app.rb +248 -0
- data/lib/moneykit/models/bacs_number.rb +240 -0
- data/lib/moneykit/models/balances.rb +287 -0
- data/lib/moneykit/models/basic_account_details.rb +265 -0
- data/lib/moneykit/models/country.rb +41 -0
- data/lib/moneykit/models/create_link_session_request.rb +336 -0
- data/lib/moneykit/models/create_link_session_response.rb +225 -0
- data/lib/moneykit/models/currency.rb +219 -0
- data/lib/moneykit/models/cursor.rb +229 -0
- data/lib/moneykit/models/cursor_pagination.rb +221 -0
- data/lib/moneykit/models/cursors.rb +229 -0
- data/lib/moneykit/models/customer_app.rb +241 -0
- data/lib/moneykit/models/customer_user.rb +292 -0
- data/lib/moneykit/models/eft_number.rb +255 -0
- data/lib/moneykit/models/email.rb +237 -0
- data/lib/moneykit/models/email1.rb +283 -0
- data/lib/moneykit/models/exchange_token_request.rb +225 -0
- data/lib/moneykit/models/exchange_token_response.rb +239 -0
- data/lib/moneykit/models/generate_access_token_response.rb +256 -0
- data/lib/moneykit/models/get_account_numbers_response.rb +240 -0
- data/lib/moneykit/models/get_account_response.rb +238 -0
- data/lib/moneykit/models/get_accounts_response.rb +241 -0
- data/lib/moneykit/models/get_institutions_response.rb +241 -0
- data/lib/moneykit/models/get_transactions_response.rb +303 -0
- data/lib/moneykit/models/get_user_accounts_response.rb +227 -0
- data/lib/moneykit/models/get_user_links_response.rb +227 -0
- data/lib/moneykit/models/get_user_transactions_response.rb +287 -0
- data/lib/moneykit/models/http_validation_error.rb +293 -0
- data/lib/moneykit/models/identity.rb +241 -0
- data/lib/moneykit/models/identity_link_product.rb +246 -0
- data/lib/moneykit/models/identity_product_settings.rb +234 -0
- data/lib/moneykit/models/identity_response.rb +241 -0
- data/lib/moneykit/models/institution.rb +345 -0
- data/lib/moneykit/models/institution_error_not_found_response.rb +276 -0
- data/lib/moneykit/models/institution_styling_response.rb +310 -0
- data/lib/moneykit/models/international_number.rb +240 -0
- data/lib/moneykit/models/introspect_client_response.rb +281 -0
- data/lib/moneykit/models/jwk_set.rb +227 -0
- data/lib/moneykit/models/link.rb +347 -0
- data/lib/moneykit/models/link1.rb +347 -0
- data/lib/moneykit/models/link2.rb +347 -0
- data/lib/moneykit/models/link3.rb +347 -0
- data/lib/moneykit/models/link4.rb +347 -0
- data/lib/moneykit/models/link_common.rb +339 -0
- data/lib/moneykit/models/link_error.rb +45 -0
- data/lib/moneykit/models/link_error_bad_state_response.rb +294 -0
- data/lib/moneykit/models/link_error_deleted_response.rb +277 -0
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +280 -0
- data/lib/moneykit/models/link_error_not_found_response.rb +276 -0
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +276 -0
- data/lib/moneykit/models/link_permission_scope.rb +42 -0
- data/lib/moneykit/models/link_permissions.rb +234 -0
- data/lib/moneykit/models/link_products.rb +246 -0
- data/lib/moneykit/models/link_response.rb +364 -0
- data/lib/moneykit/models/link_session_customer_user.rb +284 -0
- data/lib/moneykit/models/link_session_customer_user_email.rb +275 -0
- data/lib/moneykit/models/link_session_customer_user_phone.rb +307 -0
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +280 -0
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +280 -0
- data/lib/moneykit/models/link_session_setting_overrides.rb +268 -0
- data/lib/moneykit/models/link_state.rb +43 -0
- data/lib/moneykit/models/link_state_changed_webhook.rb +392 -0
- data/lib/moneykit/models/location_inner.rb +230 -0
- data/lib/moneykit/models/money_kit_env.rb +40 -0
- data/lib/moneykit/models/money_link_features.rb +234 -0
- data/lib/moneykit/models/moneylink_features.rb +242 -0
- data/lib/moneykit/models/numbers.rb +286 -0
- data/lib/moneykit/models/owner.rb +278 -0
- data/lib/moneykit/models/phone.rb +315 -0
- data/lib/moneykit/models/phone_number.rb +273 -0
- data/lib/moneykit/models/phone_number_type.rb +42 -0
- data/lib/moneykit/models/product.rb +42 -0
- data/lib/moneykit/models/products.rb +254 -0
- data/lib/moneykit/models/products1.rb +245 -0
- data/lib/moneykit/models/products_settings.rb +237 -0
- data/lib/moneykit/models/provider.rb +43 -0
- data/lib/moneykit/models/refresh_products_request.rb +237 -0
- data/lib/moneykit/models/requested_link_permission.rb +276 -0
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +302 -0
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +300 -0
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +302 -0
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +302 -0
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +302 -0
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +302 -0
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +300 -0
- data/lib/moneykit/models/response401_get_institution_styling_institutions_institution_id_styling_get.rb +300 -0
- data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +300 -0
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +302 -0
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +302 -0
- data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +302 -0
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +300 -0
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +300 -0
- data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +300 -0
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +300 -0
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +300 -0
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +302 -0
- data/lib/moneykit/models/response401_update_link_links_id_patch.rb +302 -0
- data/lib/moneykit/models/settings.rb +276 -0
- data/lib/moneykit/models/supported_version.rb +39 -0
- data/lib/moneykit/models/transaction.rb +369 -0
- data/lib/moneykit/models/transaction_diff.rb +261 -0
- data/lib/moneykit/models/transaction_sync_response.rb +267 -0
- data/lib/moneykit/models/transaction_type.rb +40 -0
- data/lib/moneykit/models/transaction_type_filter.rb +40 -0
- data/lib/moneykit/models/transactions.rb +253 -0
- data/lib/moneykit/models/transactions1.rb +269 -0
- data/lib/moneykit/models/transactions_link_product.rb +246 -0
- data/lib/moneykit/models/transactions_product_settings.rb +246 -0
- data/lib/moneykit/models/update_link_request.rb +258 -0
- data/lib/moneykit/models/user_accounts_out.rb +221 -0
- data/lib/moneykit/models/user_links_out.rb +221 -0
- data/lib/moneykit/models/user_transactions_paged_response.rb +221 -0
- data/lib/moneykit/models/validation_error.rb +254 -0
- data/lib/moneykit/version.rb +15 -0
- data/lib/moneykit.rb +180 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +744 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +400 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +57 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +287 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +254 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +289 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +306 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +110 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +43 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +223 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +235 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +269 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +278 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +223 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +270 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +40 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +240 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +220 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +223 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +279 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +260 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +239 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +317 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +279 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +249 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +225 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +240 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +352 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +269 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +266 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +270 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +278 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +240 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +322 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +51 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +41 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +221 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +378 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +286 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +267 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +288 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +225 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +278 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +306 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +253 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +40 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +15 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible.rb +100 -0
- data/moneykit-0.0.0.gem +0 -0
- data/moneykit.gemspec +39 -0
- metadata +309 -0
@@ -0,0 +1,255 @@
|
|
1
|
+
=begin
|
2
|
+
#Plaid Compatibility Layer
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MoneyKit::PlaidCompatible
|
17
|
+
# LinkTokenCreateResponse defines the response schema for `/link/token/create`
|
18
|
+
class LinkTokenCreateResponse
|
19
|
+
# A `link_token`, which can be supplied to Link in order to initialize it and receive a `public_token`, which can be exchanged for an `access_token`.
|
20
|
+
attr_accessor :link_token
|
21
|
+
|
22
|
+
# The expiration date for the `link_token`, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. A `link_token` created to generate a `public_token` that will be exchanged for a new `access_token` expires after 4 hours. A `link_token` created for an existing Item (such as when updating an existing `access_token` by launching Link in update mode) expires after 30 minutes.
|
23
|
+
attr_accessor :expiration
|
24
|
+
|
25
|
+
# A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
|
26
|
+
attr_accessor :request_id
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'link_token' => :'link_token',
|
32
|
+
:'expiration' => :'expiration',
|
33
|
+
:'request_id' => :'request_id'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'link_token' => :'String',
|
46
|
+
:'expiration' => :'Time',
|
47
|
+
:'request_id' => :'String'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::PlaidCompatible::LinkTokenCreateResponse` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::PlaidCompatible::LinkTokenCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'link_token')
|
73
|
+
self.link_token = attributes[:'link_token']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'expiration')
|
77
|
+
self.expiration = attributes[:'expiration']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'request_id')
|
81
|
+
self.request_id = attributes[:'request_id']
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
86
|
+
# @return Array for valid properties with the reasons
|
87
|
+
def list_invalid_properties
|
88
|
+
invalid_properties = Array.new
|
89
|
+
if @link_token.nil?
|
90
|
+
invalid_properties.push('invalid value for "link_token", link_token cannot be nil.')
|
91
|
+
end
|
92
|
+
|
93
|
+
if @expiration.nil?
|
94
|
+
invalid_properties.push('invalid value for "expiration", expiration cannot be nil.')
|
95
|
+
end
|
96
|
+
|
97
|
+
if @request_id.nil?
|
98
|
+
invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
|
99
|
+
end
|
100
|
+
|
101
|
+
invalid_properties
|
102
|
+
end
|
103
|
+
|
104
|
+
# Check to see if the all the properties in the model are valid
|
105
|
+
# @return true if the model is valid
|
106
|
+
def valid?
|
107
|
+
return false if @link_token.nil?
|
108
|
+
return false if @expiration.nil?
|
109
|
+
return false if @request_id.nil?
|
110
|
+
true
|
111
|
+
end
|
112
|
+
|
113
|
+
# Checks equality by comparing each attribute.
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def ==(o)
|
116
|
+
return true if self.equal?(o)
|
117
|
+
self.class == o.class &&
|
118
|
+
link_token == o.link_token &&
|
119
|
+
expiration == o.expiration &&
|
120
|
+
request_id == o.request_id
|
121
|
+
end
|
122
|
+
|
123
|
+
# @see the `==` method
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def eql?(o)
|
126
|
+
self == o
|
127
|
+
end
|
128
|
+
|
129
|
+
# Calculates hash code according to all attributes.
|
130
|
+
# @return [Integer] Hash code
|
131
|
+
def hash
|
132
|
+
[link_token, expiration, request_id].hash
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def self.build_from_hash(attributes)
|
139
|
+
new.build_from_hash(attributes)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Builds the object from hash
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
+
# @return [Object] Returns the model itself
|
145
|
+
def build_from_hash(attributes)
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
147
|
+
self.class.openapi_types.each_pair do |key, type|
|
148
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
149
|
+
self.send("#{key}=", nil)
|
150
|
+
elsif type =~ /\AArray<(.*)>/i
|
151
|
+
# check to ensure the input is an array given that the attribute
|
152
|
+
# is documented as an array but the input is not
|
153
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
154
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
155
|
+
end
|
156
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
157
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
self
|
162
|
+
end
|
163
|
+
|
164
|
+
# Deserializes the data based on type
|
165
|
+
# @param string type Data type
|
166
|
+
# @param string value Value to be deserialized
|
167
|
+
# @return [Object] Deserialized data
|
168
|
+
def _deserialize(type, value)
|
169
|
+
case type.to_sym
|
170
|
+
when :Time
|
171
|
+
Time.parse(value)
|
172
|
+
when :Date
|
173
|
+
Date.parse(value)
|
174
|
+
when :String
|
175
|
+
value.to_s
|
176
|
+
when :Integer
|
177
|
+
value.to_i
|
178
|
+
when :Float
|
179
|
+
value.to_f
|
180
|
+
when :Boolean
|
181
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
182
|
+
true
|
183
|
+
else
|
184
|
+
false
|
185
|
+
end
|
186
|
+
when :Object
|
187
|
+
# generic object (usually a Hash), return directly
|
188
|
+
value
|
189
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
190
|
+
inner_type = Regexp.last_match[:inner_type]
|
191
|
+
value.map { |v| _deserialize(inner_type, v) }
|
192
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
193
|
+
k_type = Regexp.last_match[:k_type]
|
194
|
+
v_type = Regexp.last_match[:v_type]
|
195
|
+
{}.tap do |hash|
|
196
|
+
value.each do |k, v|
|
197
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
else # model
|
201
|
+
# models (e.g. Pet) or oneOf
|
202
|
+
klass = MoneyKit::PlaidCompatible.const_get(type)
|
203
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
# Returns the string representation of the object
|
208
|
+
# @return [String] String presentation of the object
|
209
|
+
def to_s
|
210
|
+
to_hash.to_s
|
211
|
+
end
|
212
|
+
|
213
|
+
# to_body is an alias to to_hash (backward compatibility)
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
215
|
+
def to_body
|
216
|
+
to_hash
|
217
|
+
end
|
218
|
+
|
219
|
+
# Returns the object in the form of hash
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
221
|
+
def to_hash
|
222
|
+
hash = {}
|
223
|
+
self.class.attribute_map.each_pair do |attr, param|
|
224
|
+
value = self.send(attr)
|
225
|
+
if value.nil?
|
226
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
227
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
228
|
+
end
|
229
|
+
|
230
|
+
hash[param] = _to_hash(value)
|
231
|
+
end
|
232
|
+
hash
|
233
|
+
end
|
234
|
+
|
235
|
+
# Outputs non-array value in the form of hash
|
236
|
+
# For object, use to_hash. Otherwise, just return the value
|
237
|
+
# @param [Object] value Any valid value
|
238
|
+
# @return [Hash] Returns the value in the form of hash
|
239
|
+
def _to_hash(value)
|
240
|
+
if value.is_a?(Array)
|
241
|
+
value.compact.map { |v| _to_hash(v) }
|
242
|
+
elsif value.is_a?(Hash)
|
243
|
+
{}.tap do |hash|
|
244
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
245
|
+
end
|
246
|
+
elsif value.respond_to? :to_hash
|
247
|
+
value.to_hash
|
248
|
+
else
|
249
|
+
value
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
end
|
254
|
+
|
255
|
+
end
|
@@ -0,0 +1,266 @@
|
|
1
|
+
=begin
|
2
|
+
#Plaid Compatibility Layer
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MoneyKit::PlaidCompatible
|
17
|
+
# Identifying information for transferring money to or from a US account via ACH or wire transfer.
|
18
|
+
class NumbersACH
|
19
|
+
# The Plaid account ID associated with the account numbers
|
20
|
+
attr_accessor :account_id
|
21
|
+
|
22
|
+
# The ACH account number for the account. Note that when using OAuth with Chase Bank (`ins_56`), Chase will issue \"tokenized\" routing and account numbers, which are not the user's actual account and routing numbers. These tokenized numbers should work identically to normal account and routing numbers. The digits returned in the `mask` field will continue to reflect the actual account number, rather than the tokenized account number; for this reason, when displaying account numbers to the user to help them identify their account in your UI, always use the `mask` rather than truncating the `account` number. If a user revokes their permissions to your app, the tokenized numbers will continue to work for ACH deposits, but not withdrawals.
|
23
|
+
attr_accessor :account
|
24
|
+
|
25
|
+
# The ACH routing number for the account. If the institution is `ins_56`, this may be a tokenized routing number. For more information, see the description of the `account` field.
|
26
|
+
attr_accessor :routing
|
27
|
+
|
28
|
+
# The wire transfer routing number for the account, if available
|
29
|
+
attr_accessor :wire_routing
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'account_id' => :'account_id',
|
35
|
+
:'account' => :'account',
|
36
|
+
:'routing' => :'routing',
|
37
|
+
:'wire_routing' => :'wire_routing'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns all the JSON keys this model knows about
|
42
|
+
def self.acceptable_attributes
|
43
|
+
attribute_map.values
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'account_id' => :'String',
|
50
|
+
:'account' => :'String',
|
51
|
+
:'routing' => :'String',
|
52
|
+
:'wire_routing' => :'String'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# List of attributes with nullable: true
|
57
|
+
def self.openapi_nullable
|
58
|
+
Set.new([
|
59
|
+
:'wire_routing'
|
60
|
+
])
|
61
|
+
end
|
62
|
+
|
63
|
+
# Initializes the object
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
+
def initialize(attributes = {})
|
66
|
+
if (!attributes.is_a?(Hash))
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::PlaidCompatible::NumbersACH` initialize method"
|
68
|
+
end
|
69
|
+
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::PlaidCompatible::NumbersACH`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
74
|
+
end
|
75
|
+
h[k.to_sym] = v
|
76
|
+
}
|
77
|
+
|
78
|
+
if attributes.key?(:'account_id')
|
79
|
+
self.account_id = attributes[:'account_id']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'account')
|
83
|
+
self.account = attributes[:'account']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'routing')
|
87
|
+
self.routing = attributes[:'routing']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'wire_routing')
|
91
|
+
self.wire_routing = attributes[:'wire_routing']
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
96
|
+
# @return Array for valid properties with the reasons
|
97
|
+
def list_invalid_properties
|
98
|
+
invalid_properties = Array.new
|
99
|
+
if @account_id.nil?
|
100
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
101
|
+
end
|
102
|
+
|
103
|
+
if @account.nil?
|
104
|
+
invalid_properties.push('invalid value for "account", account cannot be nil.')
|
105
|
+
end
|
106
|
+
|
107
|
+
if @routing.nil?
|
108
|
+
invalid_properties.push('invalid value for "routing", routing cannot be nil.')
|
109
|
+
end
|
110
|
+
|
111
|
+
invalid_properties
|
112
|
+
end
|
113
|
+
|
114
|
+
# Check to see if the all the properties in the model are valid
|
115
|
+
# @return true if the model is valid
|
116
|
+
def valid?
|
117
|
+
return false if @account_id.nil?
|
118
|
+
return false if @account.nil?
|
119
|
+
return false if @routing.nil?
|
120
|
+
true
|
121
|
+
end
|
122
|
+
|
123
|
+
# Checks equality by comparing each attribute.
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def ==(o)
|
126
|
+
return true if self.equal?(o)
|
127
|
+
self.class == o.class &&
|
128
|
+
account_id == o.account_id &&
|
129
|
+
account == o.account &&
|
130
|
+
routing == o.routing &&
|
131
|
+
wire_routing == o.wire_routing
|
132
|
+
end
|
133
|
+
|
134
|
+
# @see the `==` method
|
135
|
+
# @param [Object] Object to be compared
|
136
|
+
def eql?(o)
|
137
|
+
self == o
|
138
|
+
end
|
139
|
+
|
140
|
+
# Calculates hash code according to all attributes.
|
141
|
+
# @return [Integer] Hash code
|
142
|
+
def hash
|
143
|
+
[account_id, account, routing, wire_routing].hash
|
144
|
+
end
|
145
|
+
|
146
|
+
# Builds the object from hash
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
148
|
+
# @return [Object] Returns the model itself
|
149
|
+
def self.build_from_hash(attributes)
|
150
|
+
new.build_from_hash(attributes)
|
151
|
+
end
|
152
|
+
|
153
|
+
# Builds the object from hash
|
154
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
155
|
+
# @return [Object] Returns the model itself
|
156
|
+
def build_from_hash(attributes)
|
157
|
+
return nil unless attributes.is_a?(Hash)
|
158
|
+
self.class.openapi_types.each_pair do |key, type|
|
159
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
160
|
+
self.send("#{key}=", nil)
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
162
|
+
# check to ensure the input is an array given that the attribute
|
163
|
+
# is documented as an array but the input is not
|
164
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
165
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
166
|
+
end
|
167
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
168
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
self
|
173
|
+
end
|
174
|
+
|
175
|
+
# Deserializes the data based on type
|
176
|
+
# @param string type Data type
|
177
|
+
# @param string value Value to be deserialized
|
178
|
+
# @return [Object] Deserialized data
|
179
|
+
def _deserialize(type, value)
|
180
|
+
case type.to_sym
|
181
|
+
when :Time
|
182
|
+
Time.parse(value)
|
183
|
+
when :Date
|
184
|
+
Date.parse(value)
|
185
|
+
when :String
|
186
|
+
value.to_s
|
187
|
+
when :Integer
|
188
|
+
value.to_i
|
189
|
+
when :Float
|
190
|
+
value.to_f
|
191
|
+
when :Boolean
|
192
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
193
|
+
true
|
194
|
+
else
|
195
|
+
false
|
196
|
+
end
|
197
|
+
when :Object
|
198
|
+
# generic object (usually a Hash), return directly
|
199
|
+
value
|
200
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
201
|
+
inner_type = Regexp.last_match[:inner_type]
|
202
|
+
value.map { |v| _deserialize(inner_type, v) }
|
203
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
204
|
+
k_type = Regexp.last_match[:k_type]
|
205
|
+
v_type = Regexp.last_match[:v_type]
|
206
|
+
{}.tap do |hash|
|
207
|
+
value.each do |k, v|
|
208
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
209
|
+
end
|
210
|
+
end
|
211
|
+
else # model
|
212
|
+
# models (e.g. Pet) or oneOf
|
213
|
+
klass = MoneyKit::PlaidCompatible.const_get(type)
|
214
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
# Returns the string representation of the object
|
219
|
+
# @return [String] String presentation of the object
|
220
|
+
def to_s
|
221
|
+
to_hash.to_s
|
222
|
+
end
|
223
|
+
|
224
|
+
# to_body is an alias to to_hash (backward compatibility)
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
226
|
+
def to_body
|
227
|
+
to_hash
|
228
|
+
end
|
229
|
+
|
230
|
+
# Returns the object in the form of hash
|
231
|
+
# @return [Hash] Returns the object in the form of hash
|
232
|
+
def to_hash
|
233
|
+
hash = {}
|
234
|
+
self.class.attribute_map.each_pair do |attr, param|
|
235
|
+
value = self.send(attr)
|
236
|
+
if value.nil?
|
237
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
238
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
239
|
+
end
|
240
|
+
|
241
|
+
hash[param] = _to_hash(value)
|
242
|
+
end
|
243
|
+
hash
|
244
|
+
end
|
245
|
+
|
246
|
+
# Outputs non-array value in the form of hash
|
247
|
+
# For object, use to_hash. Otherwise, just return the value
|
248
|
+
# @param [Object] value Any valid value
|
249
|
+
# @return [Hash] Returns the value in the form of hash
|
250
|
+
def _to_hash(value)
|
251
|
+
if value.is_a?(Array)
|
252
|
+
value.compact.map { |v| _to_hash(v) }
|
253
|
+
elsif value.is_a?(Hash)
|
254
|
+
{}.tap do |hash|
|
255
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
256
|
+
end
|
257
|
+
elsif value.respond_to? :to_hash
|
258
|
+
value.to_hash
|
259
|
+
else
|
260
|
+
value
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|