moneykit 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/docs/AccessTokenApi.md +10 -22
- data/docs/AccountNumbersApi.md +4 -8
- data/docs/AccountNumbersLinkProduct.md +4 -0
- data/docs/AccountNumbersProductSettings.md +1 -3
- data/docs/AccountsApi.md +10 -22
- data/docs/AccountsLinkProduct.md +5 -1
- data/docs/Body.md +1 -1
- data/docs/GetHoldingsResponse.md +24 -0
- data/docs/GetInvestmentTransactionsResponse.md +30 -0
- data/docs/HoldingResponse.md +30 -0
- data/docs/IdentityApi.md +1 -3
- data/docs/IdentityLinkProduct.md +4 -0
- data/docs/IdentityProductSettings.md +1 -3
- data/docs/InstitutionsApi.md +5 -11
- data/docs/InvestmentTransactionResponse.md +40 -0
- data/docs/InvestmentsApi.md +163 -0
- data/docs/InvestmentsLinkProduct.md +26 -0
- data/docs/InvestmentsProductSettings.md +1 -3
- data/docs/LinkCommon.md +1 -1
- data/docs/LinkError.md +15 -0
- data/docs/LinkProductFailureReasons.md +15 -0
- data/docs/LinkProducts.md +3 -1
- data/docs/LinkResponse.md +1 -1
- data/docs/LinkSessionApi.md +8 -16
- data/docs/LinkStateChangedWebhook.md +1 -1
- data/docs/LinksApi.md +20 -40
- data/docs/MoneyKitConnectFeatures.md +1 -1
- data/docs/ProductsApi.md +4 -8
- data/docs/Response401GetHoldingsLinksIdInvestmentsHoldingsGet.md +22 -0
- data/docs/Response401GetInvestmentTransactionsLinksIdInvestmentsTransactionsGet.md +22 -0
- data/docs/Response401GetTransactions.md +22 -0
- data/docs/Response401GetUserTransactions.md +22 -0
- data/docs/ResponseHandleLinkWebhookEventRequestBodyWebhookPost.md +1 -1
- data/docs/SecurityResponse.md +34 -0
- data/docs/TransactionSyncResponse.md +1 -1
- data/docs/TransactionsApi.md +5 -11
- data/docs/TransactionsLinkProduct.md +4 -0
- data/docs/TransactionsProductSettings.md +0 -2
- data/docs/UsersApi.md +6 -14
- data/docs/WebhooksApi.md +4 -8
- data/lib/moneykit/api/access_token_api.rb +1 -10
- data/lib/moneykit/api/account_numbers_api.rb +1 -4
- data/lib/moneykit/api/accounts_api.rb +1 -13
- data/lib/moneykit/api/identity_api.rb +1 -4
- data/lib/moneykit/api/institutions_api.rb +1 -7
- data/lib/moneykit/api/investments_api.rb +178 -0
- data/lib/moneykit/api/link_session_api.rb +1 -7
- data/lib/moneykit/api/links_api.rb +1 -16
- data/lib/moneykit/api/products_api.rb +1 -4
- data/lib/moneykit/api/transactions_api.rb +5 -14
- data/lib/moneykit/api/users_api.rb +1 -10
- data/lib/moneykit/api/webhooks_api.rb +1 -4
- data/lib/moneykit/api_client.rb +1 -1
- data/lib/moneykit/api_error.rb +1 -1
- data/lib/moneykit/configuration.rb +1 -1
- data/lib/moneykit/models/account.rb +1 -1
- data/lib/moneykit/models/account_balances.rb +1 -1
- data/lib/moneykit/models/account_group.rb +1 -1
- data/lib/moneykit/models/account_identity.rb +1 -1
- data/lib/moneykit/models/account_numbers.rb +1 -1
- data/lib/moneykit/models/account_numbers_link_product.rb +43 -2
- data/lib/moneykit/models/account_numbers_product_settings.rb +5 -36
- data/lib/moneykit/models/account_with_account_numbers.rb +1 -1
- data/lib/moneykit/models/accounts_link_product.rb +46 -5
- data/lib/moneykit/models/ach_number.rb +1 -1
- data/lib/moneykit/models/address.rb +1 -1
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +1 -1
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +1 -1
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +1 -1
- data/lib/moneykit/models/bacs_number.rb +1 -1
- data/lib/moneykit/models/basic_account_details.rb +1 -1
- data/lib/moneykit/models/body.rb +1 -1
- data/lib/moneykit/models/country.rb +1 -1
- data/lib/moneykit/models/create_link_session_request.rb +1 -1
- data/lib/moneykit/models/create_link_session_response.rb +1 -1
- data/lib/moneykit/models/currency.rb +1 -1
- data/lib/moneykit/models/cursor_pagination.rb +1 -1
- data/lib/moneykit/models/customer_app.rb +1 -1
- data/lib/moneykit/models/eft_number.rb +1 -1
- data/lib/moneykit/models/email.rb +1 -1
- data/lib/moneykit/models/exchange_token_request.rb +1 -1
- data/lib/moneykit/models/exchange_token_response.rb +1 -1
- data/lib/moneykit/models/generate_access_token_response.rb +1 -1
- data/lib/moneykit/models/get_account_numbers_response.rb +1 -1
- data/lib/moneykit/models/get_account_response.rb +1 -1
- data/lib/moneykit/models/get_accounts_response.rb +1 -1
- data/lib/moneykit/models/get_holdings_response.rb +273 -0
- data/lib/moneykit/models/get_institutions_response.rb +1 -1
- data/lib/moneykit/models/get_investment_transactions_response.rb +324 -0
- data/lib/moneykit/models/get_transactions_response.rb +1 -1
- data/lib/moneykit/models/get_user_accounts_response.rb +1 -1
- data/lib/moneykit/models/get_user_links_response.rb +1 -1
- data/lib/moneykit/models/get_user_transactions_response.rb +1 -1
- data/lib/moneykit/models/holding_response.rb +294 -0
- data/lib/moneykit/models/http_validation_error.rb +1 -1
- data/lib/moneykit/models/identity_link_product.rb +43 -2
- data/lib/moneykit/models/identity_product_settings.rb +5 -36
- data/lib/moneykit/models/identity_response.rb +1 -1
- data/lib/moneykit/models/institution.rb +1 -1
- data/lib/moneykit/models/institution_error_not_found_response.rb +1 -1
- data/lib/moneykit/models/international_number.rb +1 -1
- data/lib/moneykit/models/introspect_client_response.rb +1 -1
- data/lib/moneykit/models/investment_transaction_response.rb +365 -0
- data/lib/moneykit/models/investments_link_product.rb +280 -0
- data/lib/moneykit/models/investments_product_settings.rb +5 -36
- data/lib/moneykit/models/jwk_set.rb +1 -1
- data/lib/moneykit/models/link_common.rb +2 -2
- data/lib/moneykit/models/link_error.rb +44 -0
- data/lib/moneykit/models/link_error_bad_config_response.rb +1 -1
- data/lib/moneykit/models/link_error_bad_state_response.rb +1 -1
- data/lib/moneykit/models/link_error_deleted_response.rb +1 -1
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +1 -1
- data/lib/moneykit/models/link_error_not_found_response.rb +1 -1
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +1 -1
- data/lib/moneykit/models/link_permission_scope.rb +1 -1
- data/lib/moneykit/models/link_permissions.rb +1 -1
- data/lib/moneykit/models/link_product_failure_reasons.rb +44 -0
- data/lib/moneykit/models/link_product_refresh_webhook.rb +1 -1
- data/lib/moneykit/models/link_product_state.rb +1 -1
- data/lib/moneykit/models/link_products.rb +14 -5
- data/lib/moneykit/models/link_response.rb +2 -2
- data/lib/moneykit/models/link_session_customer_user.rb +1 -1
- data/lib/moneykit/models/link_session_customer_user_email.rb +1 -1
- data/lib/moneykit/models/link_session_customer_user_phone.rb +1 -1
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +1 -1
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +1 -1
- data/lib/moneykit/models/link_session_setting_overrides.rb +1 -1
- data/lib/moneykit/models/link_state.rb +1 -1
- data/lib/moneykit/models/link_state_changed_webhook.rb +2 -2
- data/lib/moneykit/models/money_kit_connect_features.rb +2 -2
- data/lib/moneykit/models/owner.rb +1 -1
- data/lib/moneykit/models/phone_number.rb +1 -1
- data/lib/moneykit/models/phone_number_type.rb +1 -1
- data/lib/moneykit/models/product.rb +1 -1
- data/lib/moneykit/models/products_settings.rb +1 -1
- data/lib/moneykit/models/provider.rb +1 -1
- data/lib/moneykit/models/refresh_products_request.rb +1 -1
- data/lib/moneykit/models/requested_link_permission.rb +1 -1
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +1 -1
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +1 -1
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +1 -1
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +1 -1
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +1 -1
- data/lib/moneykit/models/response401_get_holdings_links_id_investments_holdings_get.rb +104 -0
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +1 -1
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +1 -1
- data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +1 -1
- data/lib/moneykit/models/response401_get_investment_transactions_links_id_investments_transactions_get.rb +104 -0
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +1 -1
- data/lib/moneykit/models/response401_get_transactions.rb +104 -0
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +1 -1
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +1 -1
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +1 -1
- data/lib/moneykit/models/response401_get_user_transactions.rb +103 -0
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +1 -1
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +1 -1
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +1 -1
- data/lib/moneykit/models/response401_reset_login_links_id_reset_post.rb +1 -1
- data/lib/moneykit/models/response401_trigger_test_link_webhook_event_webhooks_test_link_id_post.rb +1 -1
- data/lib/moneykit/models/response401_update_link_links_id_patch.rb +1 -1
- data/lib/moneykit/models/response_handle_link_webhook_event_request_body_webhook_post.rb +1 -1
- data/lib/moneykit/models/security_response.rb +321 -0
- data/lib/moneykit/models/transaction.rb +1 -1
- data/lib/moneykit/models/transaction_diff.rb +1 -1
- data/lib/moneykit/models/transaction_sync_response.rb +2 -2
- data/lib/moneykit/models/transaction_type.rb +1 -1
- data/lib/moneykit/models/transaction_type_filter.rb +1 -1
- data/lib/moneykit/models/transaction_updates_available_webhook.rb +1 -1
- data/lib/moneykit/models/transactions_link_product.rb +43 -2
- data/lib/moneykit/models/transactions_product_settings.rb +2 -33
- data/lib/moneykit/models/update_link_request.rb +1 -1
- data/lib/moneykit/models/validation_error.rb +1 -1
- data/lib/moneykit/models/validation_error_location_inner.rb +1 -1
- data/lib/moneykit/models/webhook_link_test_event.rb +1 -1
- data/lib/moneykit/models/webhook_test_link_request.rb +1 -1
- data/lib/moneykit/models/webhook_test_link_response.rb +1 -1
- data/lib/moneykit/version.rb +2 -2
- data/lib/moneykit.rb +14 -4
- data/moneykit.gemspec +1 -1
- data/spec/api/investments_api_spec.rb +65 -0
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/get_holdings_response_spec.rb +54 -0
- data/spec/models/get_investment_transactions_response_spec.rb +72 -0
- data/spec/models/holding_response_spec.rb +72 -0
- data/spec/models/investment_transaction_response_spec.rb +102 -0
- data/spec/models/investments_link_product_spec.rb +60 -0
- data/spec/models/link_error_spec.rb +30 -0
- data/spec/models/link_product_failure_reasons_spec.rb +30 -0
- data/spec/models/response401_get_holdings_links_id_investments_holdings_get_spec.rb +21 -0
- data/spec/models/response401_get_investment_transactions_links_id_investments_transactions_get_spec.rb +21 -0
- data/spec/models/response401_get_transactions_spec.rb +21 -0
- data/spec/models/response401_get_user_transactions_spec.rb +21 -0
- data/spec/models/security_response_spec.rb +84 -0
- data/spec/spec_helper.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.1.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.1.0/gem_make.out +5 -5
- metadata +54 -2
@@ -0,0 +1,321 @@
|
|
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: 2023-02-18
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MoneyKit
|
17
|
+
class SecurityResponse
|
18
|
+
# A unique MoneyKit ID for this security.
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# A user-facing name for this security.
|
22
|
+
attr_accessor :name
|
23
|
+
|
24
|
+
# The type of this security. Will be one of: <p>`cash`: Cash, currency, and money market funds <p>`crypto`: Digital or virtual currencies <p>`derivative`: Options, warrants, and other derivative instruments <p>`equity`: Equities (stocks) <p>`etf`: Exchange-traded investment funds <p>`bond`: Bonds and certificates of deposit (CDs) <p>`loan`: Loans and loan receivables <p>`fund`: Open- and closed-end vehicles pooling funds of multiple investors <p>`unknown`: Indicates the type is unknown or does not fit into any other category
|
25
|
+
attr_accessor :type
|
26
|
+
|
27
|
+
# The ISO-4217 code for the currency in which this security is priced.
|
28
|
+
attr_accessor :currency
|
29
|
+
|
30
|
+
# The security's public trading symbol, if available.
|
31
|
+
attr_accessor :ticker
|
32
|
+
|
33
|
+
# The ISO 6166 globally unique ID for this security, if available.
|
34
|
+
attr_accessor :isin
|
35
|
+
|
36
|
+
# The security's SEDOL ID from the London Stock Exchange, if available.
|
37
|
+
attr_accessor :sedol
|
38
|
+
|
39
|
+
# The price of the security at the close of the previous trading session, given in pricing currency.
|
40
|
+
attr_accessor :close_price
|
41
|
+
|
42
|
+
# The date for which `close_price` is given.
|
43
|
+
attr_accessor :close_date
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
:'id' => :'id',
|
49
|
+
:'name' => :'name',
|
50
|
+
:'type' => :'type',
|
51
|
+
:'currency' => :'currency',
|
52
|
+
:'ticker' => :'ticker',
|
53
|
+
:'isin' => :'isin',
|
54
|
+
:'sedol' => :'sedol',
|
55
|
+
:'close_price' => :'close_price',
|
56
|
+
:'close_date' => :'close_date'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Returns all the JSON keys this model knows about
|
61
|
+
def self.acceptable_attributes
|
62
|
+
attribute_map.values
|
63
|
+
end
|
64
|
+
|
65
|
+
# Attribute type mapping.
|
66
|
+
def self.openapi_types
|
67
|
+
{
|
68
|
+
:'id' => :'String',
|
69
|
+
:'name' => :'String',
|
70
|
+
:'type' => :'String',
|
71
|
+
:'currency' => :'String',
|
72
|
+
:'ticker' => :'String',
|
73
|
+
:'isin' => :'String',
|
74
|
+
:'sedol' => :'String',
|
75
|
+
:'close_price' => :'String',
|
76
|
+
:'close_date' => :'Date'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# List of attributes with nullable: true
|
81
|
+
def self.openapi_nullable
|
82
|
+
Set.new([
|
83
|
+
])
|
84
|
+
end
|
85
|
+
|
86
|
+
# Initializes the object
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
88
|
+
def initialize(attributes = {})
|
89
|
+
if (!attributes.is_a?(Hash))
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::SecurityResponse` initialize method"
|
91
|
+
end
|
92
|
+
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
94
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
95
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
96
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::SecurityResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
97
|
+
end
|
98
|
+
h[k.to_sym] = v
|
99
|
+
}
|
100
|
+
|
101
|
+
if attributes.key?(:'id')
|
102
|
+
self.id = attributes[:'id']
|
103
|
+
else
|
104
|
+
self.id = nil
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'name')
|
108
|
+
self.name = attributes[:'name']
|
109
|
+
else
|
110
|
+
self.name = nil
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'type')
|
114
|
+
self.type = attributes[:'type']
|
115
|
+
else
|
116
|
+
self.type = nil
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'currency')
|
120
|
+
self.currency = attributes[:'currency']
|
121
|
+
else
|
122
|
+
self.currency = nil
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'ticker')
|
126
|
+
self.ticker = attributes[:'ticker']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'isin')
|
130
|
+
self.isin = attributes[:'isin']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'sedol')
|
134
|
+
self.sedol = attributes[:'sedol']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'close_price')
|
138
|
+
self.close_price = attributes[:'close_price']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'close_date')
|
142
|
+
self.close_date = attributes[:'close_date']
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
147
|
+
# @return Array for valid properties with the reasons
|
148
|
+
def list_invalid_properties
|
149
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
150
|
+
invalid_properties = Array.new
|
151
|
+
if @id.nil?
|
152
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
153
|
+
end
|
154
|
+
|
155
|
+
if @name.nil?
|
156
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
157
|
+
end
|
158
|
+
|
159
|
+
if @type.nil?
|
160
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
161
|
+
end
|
162
|
+
|
163
|
+
if @currency.nil?
|
164
|
+
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
|
165
|
+
end
|
166
|
+
|
167
|
+
invalid_properties
|
168
|
+
end
|
169
|
+
|
170
|
+
# Check to see if the all the properties in the model are valid
|
171
|
+
# @return true if the model is valid
|
172
|
+
def valid?
|
173
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
174
|
+
return false if @id.nil?
|
175
|
+
return false if @name.nil?
|
176
|
+
return false if @type.nil?
|
177
|
+
return false if @currency.nil?
|
178
|
+
true
|
179
|
+
end
|
180
|
+
|
181
|
+
# Checks equality by comparing each attribute.
|
182
|
+
# @param [Object] Object to be compared
|
183
|
+
def ==(o)
|
184
|
+
return true if self.equal?(o)
|
185
|
+
self.class == o.class &&
|
186
|
+
id == o.id &&
|
187
|
+
name == o.name &&
|
188
|
+
type == o.type &&
|
189
|
+
currency == o.currency &&
|
190
|
+
ticker == o.ticker &&
|
191
|
+
isin == o.isin &&
|
192
|
+
sedol == o.sedol &&
|
193
|
+
close_price == o.close_price &&
|
194
|
+
close_date == o.close_date
|
195
|
+
end
|
196
|
+
|
197
|
+
# @see the `==` method
|
198
|
+
# @param [Object] Object to be compared
|
199
|
+
def eql?(o)
|
200
|
+
self == o
|
201
|
+
end
|
202
|
+
|
203
|
+
# Calculates hash code according to all attributes.
|
204
|
+
# @return [Integer] Hash code
|
205
|
+
def hash
|
206
|
+
[id, name, type, currency, ticker, isin, sedol, close_price, close_date].hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Builds the object from hash
|
210
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
211
|
+
# @return [Object] Returns the model itself
|
212
|
+
def self.build_from_hash(attributes)
|
213
|
+
return nil unless attributes.is_a?(Hash)
|
214
|
+
attributes = attributes.transform_keys(&:to_sym)
|
215
|
+
transformed_hash = {}
|
216
|
+
openapi_types.each_pair do |key, type|
|
217
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
218
|
+
transformed_hash["#{key}"] = nil
|
219
|
+
elsif type =~ /\AArray<(.*)>/i
|
220
|
+
# check to ensure the input is an array given that the attribute
|
221
|
+
# is documented as an array but the input is not
|
222
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
223
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
224
|
+
end
|
225
|
+
elsif !attributes[attribute_map[key]].nil?
|
226
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
227
|
+
end
|
228
|
+
end
|
229
|
+
new(transformed_hash)
|
230
|
+
end
|
231
|
+
|
232
|
+
# Deserializes the data based on type
|
233
|
+
# @param string type Data type
|
234
|
+
# @param string value Value to be deserialized
|
235
|
+
# @return [Object] Deserialized data
|
236
|
+
def self._deserialize(type, value)
|
237
|
+
case type.to_sym
|
238
|
+
when :Time
|
239
|
+
Time.parse(value)
|
240
|
+
when :Date
|
241
|
+
Date.parse(value)
|
242
|
+
when :String
|
243
|
+
value.to_s
|
244
|
+
when :Integer
|
245
|
+
value.to_i
|
246
|
+
when :Float
|
247
|
+
value.to_f
|
248
|
+
when :Boolean
|
249
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
250
|
+
true
|
251
|
+
else
|
252
|
+
false
|
253
|
+
end
|
254
|
+
when :Object
|
255
|
+
# generic object (usually a Hash), return directly
|
256
|
+
value
|
257
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
258
|
+
inner_type = Regexp.last_match[:inner_type]
|
259
|
+
value.map { |v| _deserialize(inner_type, v) }
|
260
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
261
|
+
k_type = Regexp.last_match[:k_type]
|
262
|
+
v_type = Regexp.last_match[:v_type]
|
263
|
+
{}.tap do |hash|
|
264
|
+
value.each do |k, v|
|
265
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
266
|
+
end
|
267
|
+
end
|
268
|
+
else # model
|
269
|
+
# models (e.g. Pet) or oneOf
|
270
|
+
klass = MoneyKit.const_get(type)
|
271
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
# Returns the string representation of the object
|
276
|
+
# @return [String] String presentation of the object
|
277
|
+
def to_s
|
278
|
+
to_hash.to_s
|
279
|
+
end
|
280
|
+
|
281
|
+
# to_body is an alias to to_hash (backward compatibility)
|
282
|
+
# @return [Hash] Returns the object in the form of hash
|
283
|
+
def to_body
|
284
|
+
to_hash
|
285
|
+
end
|
286
|
+
|
287
|
+
# Returns the object in the form of hash
|
288
|
+
# @return [Hash] Returns the object in the form of hash
|
289
|
+
def to_hash
|
290
|
+
hash = {}
|
291
|
+
self.class.attribute_map.each_pair do |attr, param|
|
292
|
+
value = self.send(attr)
|
293
|
+
if value.nil?
|
294
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
295
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
296
|
+
end
|
297
|
+
|
298
|
+
hash[param] = _to_hash(value)
|
299
|
+
end
|
300
|
+
hash
|
301
|
+
end
|
302
|
+
|
303
|
+
# Outputs non-array value in the form of hash
|
304
|
+
# For object, use to_hash. Otherwise, just return the value
|
305
|
+
# @param [Object] value Any valid value
|
306
|
+
# @return [Hash] Returns the value in the form of hash
|
307
|
+
def _to_hash(value)
|
308
|
+
if value.is_a?(Array)
|
309
|
+
value.compact.map { |v| _to_hash(v) }
|
310
|
+
elsif value.is_a?(Hash)
|
311
|
+
{}.tap do |hash|
|
312
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
313
|
+
end
|
314
|
+
elsif value.respond_to? :to_hash
|
315
|
+
value.to_hash
|
316
|
+
else
|
317
|
+
value
|
318
|
+
end
|
319
|
+
end
|
320
|
+
end
|
321
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -19,7 +19,7 @@ module MoneyKit
|
|
19
19
|
|
20
20
|
attr_accessor :cursor
|
21
21
|
|
22
|
-
# This condition indicates the presence of transaction updates exceeding the requested count. If true, additional updates
|
22
|
+
# This condition indicates the presence of transaction updates exceeding the requested count. If true, additional updates MUST be retrieved by making an additional request with cursor set to `cursor.next`.
|
23
23
|
attr_accessor :has_more
|
24
24
|
|
25
25
|
attr_accessor :link
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -21,13 +21,42 @@ module MoneyKit
|
|
21
21
|
# An ISO-8601 timestamp indicating the last time that the product was attempted.
|
22
22
|
attr_accessor :last_attempted_at
|
23
23
|
|
24
|
+
attr_accessor :error_code
|
25
|
+
|
26
|
+
# The error message, if the last attempt to refresh the product failed.
|
27
|
+
attr_accessor :error_message
|
28
|
+
|
24
29
|
attr_accessor :settings
|
25
30
|
|
31
|
+
class EnumAttributeValidator
|
32
|
+
attr_reader :datatype
|
33
|
+
attr_reader :allowable_values
|
34
|
+
|
35
|
+
def initialize(datatype, allowable_values)
|
36
|
+
@allowable_values = allowable_values.map do |value|
|
37
|
+
case datatype.to_s
|
38
|
+
when /Integer/i
|
39
|
+
value.to_i
|
40
|
+
when /Float/i
|
41
|
+
value.to_f
|
42
|
+
else
|
43
|
+
value
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def valid?(value)
|
49
|
+
!value || allowable_values.include?(value)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
26
53
|
# Attribute mapping from ruby-style variable name to JSON key.
|
27
54
|
def self.attribute_map
|
28
55
|
{
|
29
56
|
:'refreshed_at' => :'refreshed_at',
|
30
57
|
:'last_attempted_at' => :'last_attempted_at',
|
58
|
+
:'error_code' => :'error_code',
|
59
|
+
:'error_message' => :'error_message',
|
31
60
|
:'settings' => :'settings'
|
32
61
|
}
|
33
62
|
end
|
@@ -42,6 +71,8 @@ module MoneyKit
|
|
42
71
|
{
|
43
72
|
:'refreshed_at' => :'Time',
|
44
73
|
:'last_attempted_at' => :'Time',
|
74
|
+
:'error_code' => :'LinkProductFailureReasons',
|
75
|
+
:'error_message' => :'String',
|
45
76
|
:'settings' => :'TransactionsProductSettings'
|
46
77
|
}
|
47
78
|
end
|
@@ -75,6 +106,14 @@ module MoneyKit
|
|
75
106
|
self.last_attempted_at = attributes[:'last_attempted_at']
|
76
107
|
end
|
77
108
|
|
109
|
+
if attributes.key?(:'error_code')
|
110
|
+
self.error_code = attributes[:'error_code']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'error_message')
|
114
|
+
self.error_message = attributes[:'error_message']
|
115
|
+
end
|
116
|
+
|
78
117
|
if attributes.key?(:'settings')
|
79
118
|
self.settings = attributes[:'settings']
|
80
119
|
else
|
@@ -109,6 +148,8 @@ module MoneyKit
|
|
109
148
|
self.class == o.class &&
|
110
149
|
refreshed_at == o.refreshed_at &&
|
111
150
|
last_attempted_at == o.last_attempted_at &&
|
151
|
+
error_code == o.error_code &&
|
152
|
+
error_message == o.error_message &&
|
112
153
|
settings == o.settings
|
113
154
|
end
|
114
155
|
|
@@ -121,7 +162,7 @@ module MoneyKit
|
|
121
162
|
# Calculates hash code according to all attributes.
|
122
163
|
# @return [Integer] Hash code
|
123
164
|
def hash
|
124
|
-
[refreshed_at, last_attempted_at, settings].hash
|
165
|
+
[refreshed_at, last_attempted_at, error_code, error_message, settings].hash
|
125
166
|
end
|
126
167
|
|
127
168
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -21,39 +21,14 @@ module MoneyKit
|
|
21
21
|
# If true, the data will be available as soon as possible after linking, even if `required` is false. If false, the data will be available after the first manual data refresh.
|
22
22
|
attr_accessor :prefetch
|
23
23
|
|
24
|
-
attr_accessor :product
|
25
|
-
|
26
24
|
# If true, MoneyKit will attempt to fetch as much transaction history as possible. Not all institutions supply the same extent of transaction history. Generally, however, at least the past 30 days of transactions are available.
|
27
25
|
attr_accessor :extend_history
|
28
26
|
|
29
|
-
class EnumAttributeValidator
|
30
|
-
attr_reader :datatype
|
31
|
-
attr_reader :allowable_values
|
32
|
-
|
33
|
-
def initialize(datatype, allowable_values)
|
34
|
-
@allowable_values = allowable_values.map do |value|
|
35
|
-
case datatype.to_s
|
36
|
-
when /Integer/i
|
37
|
-
value.to_i
|
38
|
-
when /Float/i
|
39
|
-
value.to_f
|
40
|
-
else
|
41
|
-
value
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def valid?(value)
|
47
|
-
!value || allowable_values.include?(value)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
52
28
|
def self.attribute_map
|
53
29
|
{
|
54
30
|
:'required' => :'required',
|
55
31
|
:'prefetch' => :'prefetch',
|
56
|
-
:'product' => :'product',
|
57
32
|
:'extend_history' => :'extend_history'
|
58
33
|
}
|
59
34
|
end
|
@@ -68,7 +43,6 @@ module MoneyKit
|
|
68
43
|
{
|
69
44
|
:'required' => :'Boolean',
|
70
45
|
:'prefetch' => :'Boolean',
|
71
|
-
:'product' => :'Product',
|
72
46
|
:'extend_history' => :'Boolean'
|
73
47
|
}
|
74
48
|
end
|
@@ -106,10 +80,6 @@ module MoneyKit
|
|
106
80
|
self.prefetch = false
|
107
81
|
end
|
108
82
|
|
109
|
-
if attributes.key?(:'product')
|
110
|
-
self.product = attributes[:'product']
|
111
|
-
end
|
112
|
-
|
113
83
|
if attributes.key?(:'extend_history')
|
114
84
|
self.extend_history = attributes[:'extend_history']
|
115
85
|
else
|
@@ -139,7 +109,6 @@ module MoneyKit
|
|
139
109
|
self.class == o.class &&
|
140
110
|
required == o.required &&
|
141
111
|
prefetch == o.prefetch &&
|
142
|
-
product == o.product &&
|
143
112
|
extend_history == o.extend_history
|
144
113
|
end
|
145
114
|
|
@@ -152,7 +121,7 @@ module MoneyKit
|
|
152
121
|
# Calculates hash code according to all attributes.
|
153
122
|
# @return [Integer] Hash code
|
154
123
|
def hash
|
155
|
-
[required, prefetch,
|
124
|
+
[required, prefetch, extend_history].hash
|
156
125
|
end
|
157
126
|
|
158
127
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
data/lib/moneykit/version.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0
|
@@ -11,5 +11,5 @@ OpenAPI Generator version: 7.1.0
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module MoneyKit
|
14
|
-
VERSION = '0.1.
|
14
|
+
VERSION = '0.1.3'
|
15
15
|
end
|