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