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,347 @@
|
|
1
|
+
=begin
|
2
|
+
#MoneyKit API
|
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: 6.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MoneyKit
|
17
|
+
# The link that these transactions belong to.
|
18
|
+
class Link4
|
19
|
+
# The unique ID for this link.
|
20
|
+
attr_accessor :link_id
|
21
|
+
|
22
|
+
# The unique ID for the institution this link is connected to.
|
23
|
+
attr_accessor :institution_id
|
24
|
+
|
25
|
+
# The institution name this link is connected to.
|
26
|
+
attr_accessor :institution_name
|
27
|
+
|
28
|
+
attr_accessor :state
|
29
|
+
|
30
|
+
attr_accessor :error_code
|
31
|
+
|
32
|
+
# An ISO-8601 timestamp indicating the last time that the account was updated.
|
33
|
+
attr_accessor :last_synced_at
|
34
|
+
|
35
|
+
# Arbitrary strings used to describe this link.
|
36
|
+
attr_accessor :tags
|
37
|
+
|
38
|
+
attr_accessor :products
|
39
|
+
|
40
|
+
class EnumAttributeValidator
|
41
|
+
attr_reader :datatype
|
42
|
+
attr_reader :allowable_values
|
43
|
+
|
44
|
+
def initialize(datatype, allowable_values)
|
45
|
+
@allowable_values = allowable_values.map do |value|
|
46
|
+
case datatype.to_s
|
47
|
+
when /Integer/i
|
48
|
+
value.to_i
|
49
|
+
when /Float/i
|
50
|
+
value.to_f
|
51
|
+
else
|
52
|
+
value
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def valid?(value)
|
58
|
+
!value || allowable_values.include?(value)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
63
|
+
def self.attribute_map
|
64
|
+
{
|
65
|
+
:'link_id' => :'link_id',
|
66
|
+
:'institution_id' => :'institution_id',
|
67
|
+
:'institution_name' => :'institution_name',
|
68
|
+
:'state' => :'state',
|
69
|
+
:'error_code' => :'error_code',
|
70
|
+
:'last_synced_at' => :'last_synced_at',
|
71
|
+
:'tags' => :'tags',
|
72
|
+
:'products' => :'products'
|
73
|
+
}
|
74
|
+
end
|
75
|
+
|
76
|
+
# Returns all the JSON keys this model knows about
|
77
|
+
def self.acceptable_attributes
|
78
|
+
attribute_map.values
|
79
|
+
end
|
80
|
+
|
81
|
+
# Attribute type mapping.
|
82
|
+
def self.openapi_types
|
83
|
+
{
|
84
|
+
:'link_id' => :'String',
|
85
|
+
:'institution_id' => :'String',
|
86
|
+
:'institution_name' => :'String',
|
87
|
+
:'state' => :'LinkState',
|
88
|
+
:'error_code' => :'LinkError',
|
89
|
+
:'last_synced_at' => :'Time',
|
90
|
+
:'tags' => :'Array<String>',
|
91
|
+
:'products' => :'Products'
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
# List of attributes with nullable: true
|
96
|
+
def self.openapi_nullable
|
97
|
+
Set.new([
|
98
|
+
:'error_code',
|
99
|
+
:'last_synced_at',
|
100
|
+
:'tags',
|
101
|
+
])
|
102
|
+
end
|
103
|
+
|
104
|
+
# List of class defined in allOf (OpenAPI v3)
|
105
|
+
def self.openapi_all_of
|
106
|
+
[
|
107
|
+
:'LinkCommon'
|
108
|
+
]
|
109
|
+
end
|
110
|
+
|
111
|
+
# Initializes the object
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
def initialize(attributes = {})
|
114
|
+
if (!attributes.is_a?(Hash))
|
115
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::Link4` initialize method"
|
116
|
+
end
|
117
|
+
|
118
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
119
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
120
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
121
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::Link4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
122
|
+
end
|
123
|
+
h[k.to_sym] = v
|
124
|
+
}
|
125
|
+
|
126
|
+
if attributes.key?(:'link_id')
|
127
|
+
self.link_id = attributes[:'link_id']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'institution_id')
|
131
|
+
self.institution_id = attributes[:'institution_id']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'institution_name')
|
135
|
+
self.institution_name = attributes[:'institution_name']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.key?(:'state')
|
139
|
+
self.state = attributes[:'state']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.key?(:'error_code')
|
143
|
+
self.error_code = attributes[:'error_code']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.key?(:'last_synced_at')
|
147
|
+
self.last_synced_at = attributes[:'last_synced_at']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.key?(:'tags')
|
151
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
152
|
+
self.tags = value
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'products')
|
157
|
+
self.products = attributes[:'products']
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
162
|
+
# @return Array for valid properties with the reasons
|
163
|
+
def list_invalid_properties
|
164
|
+
invalid_properties = Array.new
|
165
|
+
if @link_id.nil?
|
166
|
+
invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
|
167
|
+
end
|
168
|
+
|
169
|
+
if @institution_id.nil?
|
170
|
+
invalid_properties.push('invalid value for "institution_id", institution_id cannot be nil.')
|
171
|
+
end
|
172
|
+
|
173
|
+
if @institution_name.nil?
|
174
|
+
invalid_properties.push('invalid value for "institution_name", institution_name cannot be nil.')
|
175
|
+
end
|
176
|
+
|
177
|
+
if @state.nil?
|
178
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
179
|
+
end
|
180
|
+
|
181
|
+
if @products.nil?
|
182
|
+
invalid_properties.push('invalid value for "products", products cannot be nil.')
|
183
|
+
end
|
184
|
+
|
185
|
+
invalid_properties
|
186
|
+
end
|
187
|
+
|
188
|
+
# Check to see if the all the properties in the model are valid
|
189
|
+
# @return true if the model is valid
|
190
|
+
def valid?
|
191
|
+
return false if @link_id.nil?
|
192
|
+
return false if @institution_id.nil?
|
193
|
+
return false if @institution_name.nil?
|
194
|
+
return false if @state.nil?
|
195
|
+
return false if @products.nil?
|
196
|
+
true
|
197
|
+
end
|
198
|
+
|
199
|
+
# Checks equality by comparing each attribute.
|
200
|
+
# @param [Object] Object to be compared
|
201
|
+
def ==(o)
|
202
|
+
return true if self.equal?(o)
|
203
|
+
self.class == o.class &&
|
204
|
+
link_id == o.link_id &&
|
205
|
+
institution_id == o.institution_id &&
|
206
|
+
institution_name == o.institution_name &&
|
207
|
+
state == o.state &&
|
208
|
+
error_code == o.error_code &&
|
209
|
+
last_synced_at == o.last_synced_at &&
|
210
|
+
tags == o.tags &&
|
211
|
+
products == o.products
|
212
|
+
end
|
213
|
+
|
214
|
+
# @see the `==` method
|
215
|
+
# @param [Object] Object to be compared
|
216
|
+
def eql?(o)
|
217
|
+
self == o
|
218
|
+
end
|
219
|
+
|
220
|
+
# Calculates hash code according to all attributes.
|
221
|
+
# @return [Integer] Hash code
|
222
|
+
def hash
|
223
|
+
[link_id, institution_id, institution_name, state, error_code, last_synced_at, tags, products].hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Builds the object from hash
|
227
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
228
|
+
# @return [Object] Returns the model itself
|
229
|
+
def self.build_from_hash(attributes)
|
230
|
+
new.build_from_hash(attributes)
|
231
|
+
end
|
232
|
+
|
233
|
+
# Builds the object from hash
|
234
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
235
|
+
# @return [Object] Returns the model itself
|
236
|
+
def build_from_hash(attributes)
|
237
|
+
return nil unless attributes.is_a?(Hash)
|
238
|
+
attributes = attributes.transform_keys(&:to_sym)
|
239
|
+
self.class.openapi_types.each_pair do |key, type|
|
240
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
241
|
+
self.send("#{key}=", nil)
|
242
|
+
elsif type =~ /\AArray<(.*)>/i
|
243
|
+
# check to ensure the input is an array given that the attribute
|
244
|
+
# is documented as an array but the input is not
|
245
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
246
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
247
|
+
end
|
248
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
249
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
self
|
254
|
+
end
|
255
|
+
|
256
|
+
# Deserializes the data based on type
|
257
|
+
# @param string type Data type
|
258
|
+
# @param string value Value to be deserialized
|
259
|
+
# @return [Object] Deserialized data
|
260
|
+
def _deserialize(type, value)
|
261
|
+
case type.to_sym
|
262
|
+
when :Time
|
263
|
+
Time.parse(value)
|
264
|
+
when :Date
|
265
|
+
Date.parse(value)
|
266
|
+
when :String
|
267
|
+
value.to_s
|
268
|
+
when :Integer
|
269
|
+
value.to_i
|
270
|
+
when :Float
|
271
|
+
value.to_f
|
272
|
+
when :Boolean
|
273
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
274
|
+
true
|
275
|
+
else
|
276
|
+
false
|
277
|
+
end
|
278
|
+
when :Object
|
279
|
+
# generic object (usually a Hash), return directly
|
280
|
+
value
|
281
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
282
|
+
inner_type = Regexp.last_match[:inner_type]
|
283
|
+
value.map { |v| _deserialize(inner_type, v) }
|
284
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
285
|
+
k_type = Regexp.last_match[:k_type]
|
286
|
+
v_type = Regexp.last_match[:v_type]
|
287
|
+
{}.tap do |hash|
|
288
|
+
value.each do |k, v|
|
289
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
290
|
+
end
|
291
|
+
end
|
292
|
+
else # model
|
293
|
+
# models (e.g. Pet) or oneOf
|
294
|
+
klass = MoneyKit.const_get(type)
|
295
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
299
|
+
# Returns the string representation of the object
|
300
|
+
# @return [String] String presentation of the object
|
301
|
+
def to_s
|
302
|
+
to_hash.to_s
|
303
|
+
end
|
304
|
+
|
305
|
+
# to_body is an alias to to_hash (backward compatibility)
|
306
|
+
# @return [Hash] Returns the object in the form of hash
|
307
|
+
def to_body
|
308
|
+
to_hash
|
309
|
+
end
|
310
|
+
|
311
|
+
# Returns the object in the form of hash
|
312
|
+
# @return [Hash] Returns the object in the form of hash
|
313
|
+
def to_hash
|
314
|
+
hash = {}
|
315
|
+
self.class.attribute_map.each_pair do |attr, param|
|
316
|
+
value = self.send(attr)
|
317
|
+
if value.nil?
|
318
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
319
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
320
|
+
end
|
321
|
+
|
322
|
+
hash[param] = _to_hash(value)
|
323
|
+
end
|
324
|
+
hash
|
325
|
+
end
|
326
|
+
|
327
|
+
# Outputs non-array value in the form of hash
|
328
|
+
# For object, use to_hash. Otherwise, just return the value
|
329
|
+
# @param [Object] value Any valid value
|
330
|
+
# @return [Hash] Returns the value in the form of hash
|
331
|
+
def _to_hash(value)
|
332
|
+
if value.is_a?(Array)
|
333
|
+
value.compact.map { |v| _to_hash(v) }
|
334
|
+
elsif value.is_a?(Hash)
|
335
|
+
{}.tap do |hash|
|
336
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
337
|
+
end
|
338
|
+
elsif value.respond_to? :to_hash
|
339
|
+
value.to_hash
|
340
|
+
else
|
341
|
+
value
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
end
|
346
|
+
|
347
|
+
end
|
@@ -0,0 +1,339 @@
|
|
1
|
+
=begin
|
2
|
+
#MoneyKit API
|
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: 6.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MoneyKit
|
17
|
+
class LinkCommon
|
18
|
+
# The unique ID for this link.
|
19
|
+
attr_accessor :link_id
|
20
|
+
|
21
|
+
# The unique ID for the institution this link is connected to.
|
22
|
+
attr_accessor :institution_id
|
23
|
+
|
24
|
+
# The institution name this link is connected to.
|
25
|
+
attr_accessor :institution_name
|
26
|
+
|
27
|
+
attr_accessor :state
|
28
|
+
|
29
|
+
attr_accessor :error_code
|
30
|
+
|
31
|
+
# An ISO-8601 timestamp indicating the last time that the account was updated.
|
32
|
+
attr_accessor :last_synced_at
|
33
|
+
|
34
|
+
# Arbitrary strings used to describe this link.
|
35
|
+
attr_accessor :tags
|
36
|
+
|
37
|
+
attr_accessor :products
|
38
|
+
|
39
|
+
class EnumAttributeValidator
|
40
|
+
attr_reader :datatype
|
41
|
+
attr_reader :allowable_values
|
42
|
+
|
43
|
+
def initialize(datatype, allowable_values)
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
45
|
+
case datatype.to_s
|
46
|
+
when /Integer/i
|
47
|
+
value.to_i
|
48
|
+
when /Float/i
|
49
|
+
value.to_f
|
50
|
+
else
|
51
|
+
value
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def valid?(value)
|
57
|
+
!value || allowable_values.include?(value)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
62
|
+
def self.attribute_map
|
63
|
+
{
|
64
|
+
:'link_id' => :'link_id',
|
65
|
+
:'institution_id' => :'institution_id',
|
66
|
+
:'institution_name' => :'institution_name',
|
67
|
+
:'state' => :'state',
|
68
|
+
:'error_code' => :'error_code',
|
69
|
+
:'last_synced_at' => :'last_synced_at',
|
70
|
+
:'tags' => :'tags',
|
71
|
+
:'products' => :'products'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Returns all the JSON keys this model knows about
|
76
|
+
def self.acceptable_attributes
|
77
|
+
attribute_map.values
|
78
|
+
end
|
79
|
+
|
80
|
+
# Attribute type mapping.
|
81
|
+
def self.openapi_types
|
82
|
+
{
|
83
|
+
:'link_id' => :'String',
|
84
|
+
:'institution_id' => :'String',
|
85
|
+
:'institution_name' => :'String',
|
86
|
+
:'state' => :'LinkState',
|
87
|
+
:'error_code' => :'LinkError',
|
88
|
+
:'last_synced_at' => :'Time',
|
89
|
+
:'tags' => :'Array<String>',
|
90
|
+
:'products' => :'Products'
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
94
|
+
# List of attributes with nullable: true
|
95
|
+
def self.openapi_nullable
|
96
|
+
Set.new([
|
97
|
+
:'error_code',
|
98
|
+
:'last_synced_at',
|
99
|
+
:'tags',
|
100
|
+
])
|
101
|
+
end
|
102
|
+
|
103
|
+
# Initializes the object
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
+
def initialize(attributes = {})
|
106
|
+
if (!attributes.is_a?(Hash))
|
107
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::LinkCommon` initialize method"
|
108
|
+
end
|
109
|
+
|
110
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
111
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
112
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
113
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::LinkCommon`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
114
|
+
end
|
115
|
+
h[k.to_sym] = v
|
116
|
+
}
|
117
|
+
|
118
|
+
if attributes.key?(:'link_id')
|
119
|
+
self.link_id = attributes[:'link_id']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'institution_id')
|
123
|
+
self.institution_id = attributes[:'institution_id']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'institution_name')
|
127
|
+
self.institution_name = attributes[:'institution_name']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'state')
|
131
|
+
self.state = attributes[:'state']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'error_code')
|
135
|
+
self.error_code = attributes[:'error_code']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.key?(:'last_synced_at')
|
139
|
+
self.last_synced_at = attributes[:'last_synced_at']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.key?(:'tags')
|
143
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
144
|
+
self.tags = value
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'products')
|
149
|
+
self.products = attributes[:'products']
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
154
|
+
# @return Array for valid properties with the reasons
|
155
|
+
def list_invalid_properties
|
156
|
+
invalid_properties = Array.new
|
157
|
+
if @link_id.nil?
|
158
|
+
invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
|
159
|
+
end
|
160
|
+
|
161
|
+
if @institution_id.nil?
|
162
|
+
invalid_properties.push('invalid value for "institution_id", institution_id cannot be nil.')
|
163
|
+
end
|
164
|
+
|
165
|
+
if @institution_name.nil?
|
166
|
+
invalid_properties.push('invalid value for "institution_name", institution_name cannot be nil.')
|
167
|
+
end
|
168
|
+
|
169
|
+
if @state.nil?
|
170
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
171
|
+
end
|
172
|
+
|
173
|
+
if @products.nil?
|
174
|
+
invalid_properties.push('invalid value for "products", products cannot be nil.')
|
175
|
+
end
|
176
|
+
|
177
|
+
invalid_properties
|
178
|
+
end
|
179
|
+
|
180
|
+
# Check to see if the all the properties in the model are valid
|
181
|
+
# @return true if the model is valid
|
182
|
+
def valid?
|
183
|
+
return false if @link_id.nil?
|
184
|
+
return false if @institution_id.nil?
|
185
|
+
return false if @institution_name.nil?
|
186
|
+
return false if @state.nil?
|
187
|
+
return false if @products.nil?
|
188
|
+
true
|
189
|
+
end
|
190
|
+
|
191
|
+
# Checks equality by comparing each attribute.
|
192
|
+
# @param [Object] Object to be compared
|
193
|
+
def ==(o)
|
194
|
+
return true if self.equal?(o)
|
195
|
+
self.class == o.class &&
|
196
|
+
link_id == o.link_id &&
|
197
|
+
institution_id == o.institution_id &&
|
198
|
+
institution_name == o.institution_name &&
|
199
|
+
state == o.state &&
|
200
|
+
error_code == o.error_code &&
|
201
|
+
last_synced_at == o.last_synced_at &&
|
202
|
+
tags == o.tags &&
|
203
|
+
products == o.products
|
204
|
+
end
|
205
|
+
|
206
|
+
# @see the `==` method
|
207
|
+
# @param [Object] Object to be compared
|
208
|
+
def eql?(o)
|
209
|
+
self == o
|
210
|
+
end
|
211
|
+
|
212
|
+
# Calculates hash code according to all attributes.
|
213
|
+
# @return [Integer] Hash code
|
214
|
+
def hash
|
215
|
+
[link_id, institution_id, institution_name, state, error_code, last_synced_at, tags, products].hash
|
216
|
+
end
|
217
|
+
|
218
|
+
# Builds the object from hash
|
219
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
220
|
+
# @return [Object] Returns the model itself
|
221
|
+
def self.build_from_hash(attributes)
|
222
|
+
new.build_from_hash(attributes)
|
223
|
+
end
|
224
|
+
|
225
|
+
# Builds the object from hash
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
227
|
+
# @return [Object] Returns the model itself
|
228
|
+
def build_from_hash(attributes)
|
229
|
+
return nil unless attributes.is_a?(Hash)
|
230
|
+
attributes = attributes.transform_keys(&:to_sym)
|
231
|
+
self.class.openapi_types.each_pair do |key, type|
|
232
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
233
|
+
self.send("#{key}=", nil)
|
234
|
+
elsif type =~ /\AArray<(.*)>/i
|
235
|
+
# check to ensure the input is an array given that the attribute
|
236
|
+
# is documented as an array but the input is not
|
237
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
238
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
239
|
+
end
|
240
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
241
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
self
|
246
|
+
end
|
247
|
+
|
248
|
+
# Deserializes the data based on type
|
249
|
+
# @param string type Data type
|
250
|
+
# @param string value Value to be deserialized
|
251
|
+
# @return [Object] Deserialized data
|
252
|
+
def _deserialize(type, value)
|
253
|
+
case type.to_sym
|
254
|
+
when :Time
|
255
|
+
Time.parse(value)
|
256
|
+
when :Date
|
257
|
+
Date.parse(value)
|
258
|
+
when :String
|
259
|
+
value.to_s
|
260
|
+
when :Integer
|
261
|
+
value.to_i
|
262
|
+
when :Float
|
263
|
+
value.to_f
|
264
|
+
when :Boolean
|
265
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
266
|
+
true
|
267
|
+
else
|
268
|
+
false
|
269
|
+
end
|
270
|
+
when :Object
|
271
|
+
# generic object (usually a Hash), return directly
|
272
|
+
value
|
273
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
274
|
+
inner_type = Regexp.last_match[:inner_type]
|
275
|
+
value.map { |v| _deserialize(inner_type, v) }
|
276
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
277
|
+
k_type = Regexp.last_match[:k_type]
|
278
|
+
v_type = Regexp.last_match[:v_type]
|
279
|
+
{}.tap do |hash|
|
280
|
+
value.each do |k, v|
|
281
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
282
|
+
end
|
283
|
+
end
|
284
|
+
else # model
|
285
|
+
# models (e.g. Pet) or oneOf
|
286
|
+
klass = MoneyKit.const_get(type)
|
287
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
# Returns the string representation of the object
|
292
|
+
# @return [String] String presentation of the object
|
293
|
+
def to_s
|
294
|
+
to_hash.to_s
|
295
|
+
end
|
296
|
+
|
297
|
+
# to_body is an alias to to_hash (backward compatibility)
|
298
|
+
# @return [Hash] Returns the object in the form of hash
|
299
|
+
def to_body
|
300
|
+
to_hash
|
301
|
+
end
|
302
|
+
|
303
|
+
# Returns the object in the form of hash
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
305
|
+
def to_hash
|
306
|
+
hash = {}
|
307
|
+
self.class.attribute_map.each_pair do |attr, param|
|
308
|
+
value = self.send(attr)
|
309
|
+
if value.nil?
|
310
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
311
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
312
|
+
end
|
313
|
+
|
314
|
+
hash[param] = _to_hash(value)
|
315
|
+
end
|
316
|
+
hash
|
317
|
+
end
|
318
|
+
|
319
|
+
# Outputs non-array value in the form of hash
|
320
|
+
# For object, use to_hash. Otherwise, just return the value
|
321
|
+
# @param [Object] value Any valid value
|
322
|
+
# @return [Hash] Returns the value in the form of hash
|
323
|
+
def _to_hash(value)
|
324
|
+
if value.is_a?(Array)
|
325
|
+
value.compact.map { |v| _to_hash(v) }
|
326
|
+
elsif value.is_a?(Hash)
|
327
|
+
{}.tap do |hash|
|
328
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
329
|
+
end
|
330
|
+
elsif value.respond_to? :to_hash
|
331
|
+
value.to_hash
|
332
|
+
else
|
333
|
+
value
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
end
|
338
|
+
|
339
|
+
end
|