moneykit 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/lib/moneykit/api/access_token_api.rb +53 -55
  3. data/lib/moneykit/api/account_numbers_api.rb +24 -24
  4. data/lib/moneykit/api/accounts_api.rb +86 -80
  5. data/lib/moneykit/api/identity_api.rb +29 -28
  6. data/lib/moneykit/api/institutions_api.rb +50 -48
  7. data/lib/moneykit/api/link_session_api.rb +47 -50
  8. data/lib/moneykit/api/links_api.rb +74 -81
  9. data/lib/moneykit/api/products_api.rb +31 -33
  10. data/lib/moneykit/api/transactions_api.rb +112 -87
  11. data/lib/moneykit/api/users_api.rb +96 -79
  12. data/lib/moneykit/api_client.rb +64 -71
  13. data/lib/moneykit/api_error.rb +14 -16
  14. data/lib/moneykit/configuration.rb +42 -45
  15. data/lib/moneykit/models/account.rb +62 -78
  16. data/lib/moneykit/models/account_balances.rb +58 -63
  17. data/lib/moneykit/models/account_group.rb +47 -47
  18. data/lib/moneykit/models/account_identity.rb +69 -89
  19. data/lib/moneykit/models/account_numbers.rb +50 -49
  20. data/lib/moneykit/models/account_numbers_link_product.rb +52 -54
  21. data/lib/moneykit/models/account_numbers_product_settings.rb +49 -48
  22. data/lib/moneykit/models/account_type.rb +23 -23
  23. data/lib/moneykit/models/account_with_account_numbers.rb +68 -89
  24. data/lib/moneykit/models/accounts_link_product.rb +46 -46
  25. data/lib/moneykit/models/ach_number.rb +48 -49
  26. data/lib/moneykit/models/address.rb +66 -75
  27. data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +63 -62
  28. data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +60 -62
  29. data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +63 -62
  30. data/lib/moneykit/models/app.rb +46 -50
  31. data/lib/moneykit/models/bacs_number.rb +45 -46
  32. data/lib/moneykit/models/balances.rb +58 -64
  33. data/lib/moneykit/models/basic_account_details.rb +55 -61
  34. data/lib/moneykit/models/country.rb +13 -14
  35. data/lib/moneykit/models/create_link_session_request.rb +83 -96
  36. data/lib/moneykit/models/create_link_session_response.rb +40 -37
  37. data/lib/moneykit/models/currency.rb +193 -193
  38. data/lib/moneykit/models/cursor.rb +40 -39
  39. data/lib/moneykit/models/cursor_pagination.rb +40 -38
  40. data/lib/moneykit/models/cursors.rb +40 -39
  41. data/lib/moneykit/models/customer_app.rb +46 -49
  42. data/lib/moneykit/models/customer_user.rb +59 -69
  43. data/lib/moneykit/models/eft_number.rb +48 -52
  44. data/lib/moneykit/models/email.rb +46 -48
  45. data/lib/moneykit/models/email1.rb +50 -53
  46. data/lib/moneykit/models/exchange_token_request.rb +40 -37
  47. data/lib/moneykit/models/exchange_token_response.rb +46 -49
  48. data/lib/moneykit/models/generate_access_token_response.rb +51 -58
  49. data/lib/moneykit/models/get_account_numbers_response.rb +48 -53
  50. data/lib/moneykit/models/get_account_response.rb +47 -52
  51. data/lib/moneykit/models/get_accounts_response.rb +47 -50
  52. data/lib/moneykit/models/get_institutions_response.rb +47 -50
  53. data/lib/moneykit/models/get_transactions_response.rb +68 -87
  54. data/lib/moneykit/models/get_user_accounts_response.rb +42 -42
  55. data/lib/moneykit/models/get_user_links_response.rb +42 -42
  56. data/lib/moneykit/models/get_user_transactions_response.rb +64 -82
  57. data/lib/moneykit/models/http_validation_error.rb +68 -71
  58. data/lib/moneykit/models/identity.rb +49 -49
  59. data/lib/moneykit/models/identity_link_product.rb +52 -54
  60. data/lib/moneykit/models/identity_product_settings.rb +49 -48
  61. data/lib/moneykit/models/identity_response.rb +47 -50
  62. data/lib/moneykit/models/institution.rb +77 -96
  63. data/lib/moneykit/models/institution_error_not_found_response.rb +63 -64
  64. data/lib/moneykit/models/institution_styling_response.rb +77 -93
  65. data/lib/moneykit/models/international_number.rb +46 -49
  66. data/lib/moneykit/models/introspect_client_response.rb +61 -73
  67. data/lib/moneykit/models/jwk_set.rb +41 -42
  68. data/lib/moneykit/models/link.rb +78 -100
  69. data/lib/moneykit/models/link1.rb +78 -100
  70. data/lib/moneykit/models/link2.rb +78 -100
  71. data/lib/moneykit/models/link3.rb +78 -100
  72. data/lib/moneykit/models/link4.rb +78 -100
  73. data/lib/moneykit/models/link_common.rb +78 -99
  74. data/lib/moneykit/models/link_error.rb +19 -19
  75. data/lib/moneykit/models/link_error_bad_state_response.rb +64 -72
  76. data/lib/moneykit/models/link_error_deleted_response.rb +63 -64
  77. data/lib/moneykit/models/link_error_forbidden_action_response.rb +60 -62
  78. data/lib/moneykit/models/link_error_not_found_response.rb +63 -64
  79. data/lib/moneykit/models/link_error_unauthorized_access_response.rb +63 -64
  80. data/lib/moneykit/models/link_permission_scope.rb +14 -15
  81. data/lib/moneykit/models/link_permissions.rb +43 -43
  82. data/lib/moneykit/models/link_products.rb +52 -63
  83. data/lib/moneykit/models/link_response.rb +90 -118
  84. data/lib/moneykit/models/link_session_customer_user.rb +58 -68
  85. data/lib/moneykit/models/link_session_customer_user_email.rb +50 -52
  86. data/lib/moneykit/models/link_session_customer_user_phone.rb +60 -67
  87. data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +60 -62
  88. data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +60 -62
  89. data/lib/moneykit/models/link_session_setting_overrides.rb +61 -72
  90. data/lib/moneykit/models/link_state.rb +15 -16
  91. data/lib/moneykit/models/link_state_changed_webhook.rb +110 -134
  92. data/lib/moneykit/models/location_inner.rb +41 -46
  93. data/lib/moneykit/models/money_kit_env.rb +12 -13
  94. data/lib/moneykit/models/money_link_features.rb +49 -48
  95. data/lib/moneykit/models/moneylink_features.rb +50 -49
  96. data/lib/moneykit/models/numbers.rb +60 -73
  97. data/lib/moneykit/models/owner.rb +59 -72
  98. data/lib/moneykit/models/phone.rb +60 -68
  99. data/lib/moneykit/models/phone_number.rb +55 -59
  100. data/lib/moneykit/models/phone_number_type.rb +14 -15
  101. data/lib/moneykit/models/product.rb +14 -15
  102. data/lib/moneykit/models/products.rb +52 -64
  103. data/lib/moneykit/models/products1.rb +48 -56
  104. data/lib/moneykit/models/products_settings.rb +48 -55
  105. data/lib/moneykit/models/provider.rb +15 -16
  106. data/lib/moneykit/models/refresh_products_request.rb +43 -45
  107. data/lib/moneykit/models/requested_link_permission.rb +52 -60
  108. data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +71 -77
  109. data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +66 -72
  110. data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +71 -77
  111. data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +71 -77
  112. data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +71 -77
  113. data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +71 -77
  114. data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +66 -72
  115. data/lib/moneykit/models/response401_get_institution_styling_institutions_institution_id_styling_get.rb +66 -72
  116. data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +66 -72
  117. data/lib/moneykit/models/response401_get_link_links_id_get.rb +71 -77
  118. data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +71 -77
  119. data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +71 -77
  120. data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +66 -72
  121. data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +66 -72
  122. data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +66 -72
  123. data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +66 -72
  124. data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +66 -72
  125. data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +71 -77
  126. data/lib/moneykit/models/response401_update_link_links_id_patch.rb +71 -77
  127. data/lib/moneykit/models/settings.rb +61 -73
  128. data/lib/moneykit/models/supported_version.rb +11 -12
  129. data/lib/moneykit/models/transaction.rb +87 -114
  130. data/lib/moneykit/models/transaction_diff.rb +54 -62
  131. data/lib/moneykit/models/transaction_sync_response.rb +57 -72
  132. data/lib/moneykit/models/transaction_type.rb +12 -13
  133. data/lib/moneykit/models/transaction_type_filter.rb +12 -13
  134. data/lib/moneykit/models/transactions.rb +58 -57
  135. data/lib/moneykit/models/transactions1.rb +55 -63
  136. data/lib/moneykit/models/transactions_link_product.rb +52 -54
  137. data/lib/moneykit/models/transactions_product_settings.rb +57 -56
  138. data/lib/moneykit/models/update_link_request.rb +53 -52
  139. data/lib/moneykit/models/user_accounts_out.rb +40 -40
  140. data/lib/moneykit/models/user_links_out.rb +40 -40
  141. data/lib/moneykit/models/user_transactions_paged_response.rb +40 -40
  142. data/lib/moneykit/models/validation_error.rb +53 -64
  143. data/lib/moneykit/version.rb +10 -12
  144. data/lib/moneykit.rb +9 -11
  145. data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +203 -207
  146. data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +75 -76
  147. data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +19 -19
  148. data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +38 -40
  149. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +59 -61
  150. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +71 -87
  151. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +77 -98
  152. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +85 -86
  153. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +18 -19
  154. data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +59 -61
  155. data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +44 -41
  156. data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +55 -60
  157. data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +49 -47
  158. data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +65 -69
  159. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +63 -73
  160. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +59 -61
  161. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +44 -41
  162. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +61 -72
  163. data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +15 -16
  164. data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +49 -50
  165. data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +43 -41
  166. data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +59 -61
  167. data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +44 -41
  168. data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +55 -60
  169. data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +65 -71
  170. data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +60 -61
  171. data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +49 -50
  172. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +85 -96
  173. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +65 -77
  174. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +55 -55
  175. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +55 -59
  176. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +55 -55
  177. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +54 -59
  178. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +55 -55
  179. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +44 -41
  180. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +49 -47
  181. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +50 -48
  182. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +55 -59
  183. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +49 -47
  184. data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +100 -121
  185. data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +66 -66
  186. data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +54 -59
  187. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +59 -65
  188. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +54 -59
  189. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +59 -68
  190. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +54 -59
  191. data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +63 -73
  192. data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +49 -50
  193. data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +54 -59
  194. data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +88 -103
  195. data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +26 -27
  196. data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +16 -17
  197. data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +43 -39
  198. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +107 -134
  199. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +69 -79
  200. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +66 -68
  201. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +65 -76
  202. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +55 -55
  203. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +44 -41
  204. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +69 -75
  205. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +50 -46
  206. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +72 -89
  207. data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +56 -65
  208. data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +15 -16
  209. data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +13 -13
  210. data/lib/plaid_compatible/money_kit_plaid_compatible.rb +12 -12
  211. data/moneykit.gemspec +21 -25
  212. metadata +1 -1
@@ -1,14 +1,12 @@
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
1
+ # #MoneyKit API
2
+ #
3
+ # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #
5
+ # The version of the OpenAPI document: 0.1.0
6
+ #
7
+ # Generated by: https://openapi-generator.tech
8
+ # OpenAPI Generator version: 6.5.0
9
+ #
12
10
 
13
11
  require 'date'
14
12
  require 'time'
@@ -23,8 +21,8 @@ module MoneyKit
23
21
  # Attribute mapping from ruby-style variable name to JSON key.
24
22
  def self.attribute_map
25
23
  {
26
- :'accounts' => :'accounts',
27
- :'last_synced_at' => :'last_synced_at'
24
+ 'accounts': :accounts,
25
+ 'last_synced_at': :last_synced_at
28
26
  }
29
27
  end
30
28
 
@@ -36,51 +34,50 @@ module MoneyKit
36
34
  # Attribute type mapping.
37
35
  def self.openapi_types
38
36
  {
39
- :'accounts' => :'Array<Account>',
40
- :'last_synced_at' => :'Time'
37
+ 'accounts': :'Array<Account>',
38
+ 'last_synced_at': :Time
41
39
  }
42
40
  end
43
41
 
44
42
  # List of attributes with nullable: true
45
43
  def self.openapi_nullable
46
44
  Set.new([
47
- :'last_synced_at'
48
- ])
45
+ :last_synced_at
46
+ ])
49
47
  end
50
48
 
51
49
  # Initializes the object
52
50
  # @param [Hash] attributes Model attributes in the form of hash
53
51
  def initialize(attributes = {})
54
- if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::AccountGroup` initialize method"
52
+ unless attributes.is_a?(Hash)
53
+ raise ArgumentError,
54
+ 'The input argument (attributes) must be a hash in `MoneyKit::AccountGroup` initialize method'
56
55
  end
57
56
 
58
57
  # check to see if the attribute exists and convert string to symbol for hash key
59
- attributes = attributes.each_with_object({}) { |(k, v), h|
60
- if (!self.class.attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::AccountGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ attributes = attributes.each_with_object({}) do |(k, v), h|
59
+ unless self.class.attribute_map.key?(k.to_sym)
60
+ raise ArgumentError,
61
+ "`#{k}` is not a valid attribute in `MoneyKit::AccountGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
62
  end
63
- h[k.to_sym] = v
64
- }
65
63
 
66
- if attributes.key?(:'accounts')
67
- if (value = attributes[:'accounts']).is_a?(Array)
68
- self.accounts = value
69
- end
64
+ h[k.to_sym] = v
70
65
  end
71
66
 
72
- if attributes.key?(:'last_synced_at')
73
- self.last_synced_at = attributes[:'last_synced_at']
67
+ if attributes.key?(:accounts) && (value = attributes[:accounts]).is_a?(Array)
68
+ self.accounts = value
74
69
  end
70
+
71
+ return unless attributes.key?(:last_synced_at)
72
+
73
+ self.last_synced_at = attributes[:last_synced_at]
75
74
  end
76
75
 
77
76
  # Show invalid properties with the reasons. Usually used together with valid?
78
77
  # @return Array for valid properties with the reasons
79
78
  def list_invalid_properties
80
- invalid_properties = Array.new
81
- if @accounts.nil?
82
- invalid_properties.push('invalid value for "accounts", accounts cannot be nil.')
83
- end
79
+ invalid_properties = []
80
+ invalid_properties.push('invalid value for "accounts", accounts cannot be nil.') if @accounts.nil?
84
81
 
85
82
  invalid_properties
86
83
  end
@@ -89,22 +86,24 @@ module MoneyKit
89
86
  # @return true if the model is valid
90
87
  def valid?
91
88
  return false if @accounts.nil?
89
+
92
90
  true
93
91
  end
94
92
 
95
93
  # Checks equality by comparing each attribute.
96
94
  # @param [Object] Object to be compared
97
- def ==(o)
98
- return true if self.equal?(o)
99
- self.class == o.class &&
100
- accounts == o.accounts &&
101
- last_synced_at == o.last_synced_at
95
+ def ==(other)
96
+ return true if equal?(other)
97
+
98
+ self.class == other.class &&
99
+ accounts == other.accounts &&
100
+ last_synced_at == other.last_synced_at
102
101
  end
103
102
 
104
103
  # @see the `==` method
105
104
  # @param [Object] Object to be compared
106
- def eql?(o)
107
- self == o
105
+ def eql?(other)
106
+ self == other
108
107
  end
109
108
 
110
109
  # Calculates hash code according to all attributes.
@@ -125,18 +124,21 @@ module MoneyKit
125
124
  # @return [Object] Returns the model itself
126
125
  def build_from_hash(attributes)
127
126
  return nil unless attributes.is_a?(Hash)
127
+
128
128
  attributes = attributes.transform_keys(&:to_sym)
129
129
  self.class.openapi_types.each_pair do |key, type|
130
130
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
- self.send("#{key}=", nil)
131
+ send("#{key}=", nil)
132
132
  elsif type =~ /\AArray<(.*)>/i
133
133
  # check to ensure the input is an array given that the attribute
134
134
  # is documented as an array but the input is not
135
135
  if attributes[self.class.attribute_map[key]].is_a?(Array)
136
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
136
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
137
+ _deserialize(::Regexp.last_match(1), v)
138
+ end)
137
139
  end
138
140
  elsif !attributes[self.class.attribute_map[key]].nil?
139
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
142
  end
141
143
  end
142
144
 
@@ -203,7 +205,7 @@ module MoneyKit
203
205
  def to_hash
204
206
  hash = {}
205
207
  self.class.attribute_map.each_pair do |attr, param|
206
- value = self.send(attr)
208
+ value = send(attr)
207
209
  if value.nil?
208
210
  is_nullable = self.class.openapi_nullable.include?(attr)
209
211
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -231,7 +233,5 @@ module MoneyKit
231
233
  value
232
234
  end
233
235
  end
234
-
235
236
  end
236
-
237
237
  end
@@ -1,14 +1,12 @@
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
1
+ # #MoneyKit API
2
+ #
3
+ # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #
5
+ # The version of the OpenAPI document: 0.1.0
6
+ #
7
+ # Generated by: https://openapi-generator.tech
8
+ # OpenAPI Generator version: 6.5.0
9
+ #
12
10
 
13
11
  require 'date'
14
12
  require 'time'
@@ -18,7 +16,7 @@ module MoneyKit
18
16
  # MoneyKit's unique ID for the account. <p>The `account_id` is distinct from the institution's account number. For accounts that may change account numbers from time to time, such as credit cards, MoneyKit attempts to keep the `account_id` constant. However, if MoneyKit can't reconcile the new account data with the old data, the `account_id` may change.
19
17
  attr_accessor :account_id
20
18
 
21
- attr_accessor :account_type
19
+ attr_accessor :account_type, :balances
22
20
 
23
21
  # The account name, according to the institution. Note that some institutions allow the end user to nickname the account; in such cases this field may be the name assigned by the user
24
22
  attr_accessor :name
@@ -26,14 +24,11 @@ module MoneyKit
26
24
  # The last four characters (usually digits) of the account number. Note that this mask may be non-unique between accounts.
27
25
  attr_accessor :account_mask
28
26
 
29
- attr_accessor :balances
30
-
31
27
  # A list of owners associated with the account.
32
28
  attr_accessor :owners
33
29
 
34
30
  class EnumAttributeValidator
35
- attr_reader :datatype
36
- attr_reader :allowable_values
31
+ attr_reader :datatype, :allowable_values
37
32
 
38
33
  def initialize(datatype, allowable_values)
39
34
  @allowable_values = allowable_values.map do |value|
@@ -56,12 +51,12 @@ module MoneyKit
56
51
  # Attribute mapping from ruby-style variable name to JSON key.
57
52
  def self.attribute_map
58
53
  {
59
- :'account_id' => :'account_id',
60
- :'account_type' => :'account_type',
61
- :'name' => :'name',
62
- :'account_mask' => :'account_mask',
63
- :'balances' => :'balances',
64
- :'owners' => :'owners'
54
+ 'account_id': :account_id,
55
+ 'account_type': :account_type,
56
+ 'name': :name,
57
+ 'account_mask': :account_mask,
58
+ 'balances': :balances,
59
+ 'owners': :owners
65
60
  }
66
61
  end
67
62
 
@@ -73,87 +68,69 @@ module MoneyKit
73
68
  # Attribute type mapping.
74
69
  def self.openapi_types
75
70
  {
76
- :'account_id' => :'String',
77
- :'account_type' => :'AccountType',
78
- :'name' => :'String',
79
- :'account_mask' => :'String',
80
- :'balances' => :'Balances',
81
- :'owners' => :'Array<Owner>'
71
+ 'account_id': :String,
72
+ 'account_type': :AccountType,
73
+ 'name': :String,
74
+ 'account_mask': :String,
75
+ 'balances': :Balances,
76
+ 'owners': :'Array<Owner>'
82
77
  }
83
78
  end
84
79
 
85
80
  # List of attributes with nullable: true
86
81
  def self.openapi_nullable
87
82
  Set.new([
88
- :'account_mask',
89
- ])
83
+ :account_mask
84
+ ])
90
85
  end
91
86
 
92
87
  # Initializes the object
93
88
  # @param [Hash] attributes Model attributes in the form of hash
94
89
  def initialize(attributes = {})
95
- if (!attributes.is_a?(Hash))
96
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::AccountIdentity` initialize method"
90
+ unless attributes.is_a?(Hash)
91
+ raise ArgumentError,
92
+ 'The input argument (attributes) must be a hash in `MoneyKit::AccountIdentity` initialize method'
97
93
  end
98
94
 
99
95
  # check to see if the attribute exists and convert string to symbol for hash key
100
- attributes = attributes.each_with_object({}) { |(k, v), h|
101
- if (!self.class.attribute_map.key?(k.to_sym))
102
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::AccountIdentity`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ attributes = attributes.each_with_object({}) do |(k, v), h|
97
+ unless self.class.attribute_map.key?(k.to_sym)
98
+ raise ArgumentError,
99
+ "`#{k}` is not a valid attribute in `MoneyKit::AccountIdentity`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
103
100
  end
104
- h[k.to_sym] = v
105
- }
106
101
 
107
- if attributes.key?(:'account_id')
108
- self.account_id = attributes[:'account_id']
102
+ h[k.to_sym] = v
109
103
  end
110
104
 
111
- if attributes.key?(:'account_type')
112
- self.account_type = attributes[:'account_type']
113
- end
105
+ self.account_id = attributes[:account_id] if attributes.key?(:account_id)
114
106
 
115
- if attributes.key?(:'name')
116
- self.name = attributes[:'name']
117
- end
107
+ self.account_type = attributes[:account_type] if attributes.key?(:account_type)
118
108
 
119
- if attributes.key?(:'account_mask')
120
- self.account_mask = attributes[:'account_mask']
121
- end
109
+ self.name = attributes[:name] if attributes.key?(:name)
122
110
 
123
- if attributes.key?(:'balances')
124
- self.balances = attributes[:'balances']
125
- end
111
+ self.account_mask = attributes[:account_mask] if attributes.key?(:account_mask)
126
112
 
127
- if attributes.key?(:'owners')
128
- if (value = attributes[:'owners']).is_a?(Array)
129
- self.owners = value
130
- end
131
- end
113
+ self.balances = attributes[:balances] if attributes.key?(:balances)
114
+
115
+ return unless attributes.key?(:owners)
116
+ return unless (value = attributes[:owners]).is_a?(Array)
117
+
118
+ self.owners = value
132
119
  end
133
120
 
134
121
  # Show invalid properties with the reasons. Usually used together with valid?
135
122
  # @return Array for valid properties with the reasons
136
123
  def list_invalid_properties
137
- invalid_properties = Array.new
138
- if @account_id.nil?
139
- invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
140
- end
124
+ invalid_properties = []
125
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') if @account_id.nil?
141
126
 
142
- if @account_type.nil?
143
- invalid_properties.push('invalid value for "account_type", account_type cannot be nil.')
144
- end
127
+ invalid_properties.push('invalid value for "account_type", account_type cannot be nil.') if @account_type.nil?
145
128
 
146
- if @name.nil?
147
- invalid_properties.push('invalid value for "name", name cannot be nil.')
148
- end
129
+ invalid_properties.push('invalid value for "name", name cannot be nil.') if @name.nil?
149
130
 
150
- if @balances.nil?
151
- invalid_properties.push('invalid value for "balances", balances cannot be nil.')
152
- end
131
+ invalid_properties.push('invalid value for "balances", balances cannot be nil.') if @balances.nil?
153
132
 
154
- if @owners.nil?
155
- invalid_properties.push('invalid value for "owners", owners cannot be nil.')
156
- end
133
+ invalid_properties.push('invalid value for "owners", owners cannot be nil.') if @owners.nil?
157
134
 
158
135
  invalid_properties
159
136
  end
@@ -166,26 +143,28 @@ module MoneyKit
166
143
  return false if @name.nil?
167
144
  return false if @balances.nil?
168
145
  return false if @owners.nil?
146
+
169
147
  true
170
148
  end
171
149
 
172
150
  # Checks equality by comparing each attribute.
173
151
  # @param [Object] Object to be compared
174
- def ==(o)
175
- return true if self.equal?(o)
176
- self.class == o.class &&
177
- account_id == o.account_id &&
178
- account_type == o.account_type &&
179
- name == o.name &&
180
- account_mask == o.account_mask &&
181
- balances == o.balances &&
182
- owners == o.owners
152
+ def ==(other)
153
+ return true if equal?(other)
154
+
155
+ self.class == other.class &&
156
+ account_id == other.account_id &&
157
+ account_type == other.account_type &&
158
+ name == other.name &&
159
+ account_mask == other.account_mask &&
160
+ balances == other.balances &&
161
+ owners == other.owners
183
162
  end
184
163
 
185
164
  # @see the `==` method
186
165
  # @param [Object] Object to be compared
187
- def eql?(o)
188
- self == o
166
+ def eql?(other)
167
+ self == other
189
168
  end
190
169
 
191
170
  # Calculates hash code according to all attributes.
@@ -206,18 +185,21 @@ module MoneyKit
206
185
  # @return [Object] Returns the model itself
207
186
  def build_from_hash(attributes)
208
187
  return nil unless attributes.is_a?(Hash)
188
+
209
189
  attributes = attributes.transform_keys(&:to_sym)
210
190
  self.class.openapi_types.each_pair do |key, type|
211
191
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
212
- self.send("#{key}=", nil)
192
+ send("#{key}=", nil)
213
193
  elsif type =~ /\AArray<(.*)>/i
214
194
  # check to ensure the input is an array given that the attribute
215
195
  # is documented as an array but the input is not
216
196
  if attributes[self.class.attribute_map[key]].is_a?(Array)
217
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
197
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
198
+ _deserialize(::Regexp.last_match(1), v)
199
+ end)
218
200
  end
219
201
  elsif !attributes[self.class.attribute_map[key]].nil?
220
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
202
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
221
203
  end
222
204
  end
223
205
 
@@ -284,7 +266,7 @@ module MoneyKit
284
266
  def to_hash
285
267
  hash = {}
286
268
  self.class.attribute_map.each_pair do |attr, param|
287
- value = self.send(attr)
269
+ value = send(attr)
288
270
  if value.nil?
289
271
  is_nullable = self.class.openapi_nullable.include?(attr)
290
272
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -312,7 +294,5 @@ module MoneyKit
312
294
  value
313
295
  end
314
296
  end
315
-
316
297
  end
317
-
318
298
  end
@@ -1,14 +1,12 @@
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
1
+ # #MoneyKit API
2
+ #
3
+ # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #
5
+ # The version of the OpenAPI document: 0.1.0
6
+ #
7
+ # Generated by: https://openapi-generator.tech
8
+ # OpenAPI Generator version: 6.5.0
9
+ #
12
10
 
13
11
  require 'date'
14
12
  require 'time'
@@ -24,8 +22,8 @@ module MoneyKit
24
22
  # Attribute mapping from ruby-style variable name to JSON key.
25
23
  def self.attribute_map
26
24
  {
27
- :'required' => :'required',
28
- :'prefetch' => :'prefetch'
25
+ 'required': :required,
26
+ 'prefetch': :prefetch
29
27
  }
30
28
  end
31
29
 
@@ -37,57 +35,58 @@ module MoneyKit
37
35
  # Attribute type mapping.
38
36
  def self.openapi_types
39
37
  {
40
- :'required' => :'Boolean',
41
- :'prefetch' => :'Boolean'
38
+ 'required': :Boolean,
39
+ 'prefetch': :Boolean
42
40
  }
43
41
  end
44
42
 
45
43
  # List of attributes with nullable: true
46
44
  def self.openapi_nullable
47
- Set.new([
48
- ])
45
+ Set.new([])
49
46
  end
50
47
 
51
48
  # List of class defined in allOf (OpenAPI v3)
52
49
  def self.openapi_all_of
53
50
  [
54
- :'AccountNumbersProductSettings'
51
+ :AccountNumbersProductSettings
55
52
  ]
56
53
  end
57
54
 
58
55
  # Initializes the object
59
56
  # @param [Hash] attributes Model attributes in the form of hash
60
57
  def initialize(attributes = {})
61
- if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::AccountNumbers` initialize method"
58
+ unless attributes.is_a?(Hash)
59
+ raise ArgumentError,
60
+ 'The input argument (attributes) must be a hash in `MoneyKit::AccountNumbers` initialize method'
63
61
  end
64
62
 
65
63
  # check to see if the attribute exists and convert string to symbol for hash key
66
- attributes = attributes.each_with_object({}) { |(k, v), h|
67
- if (!self.class.attribute_map.key?(k.to_sym))
68
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::AccountNumbers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ attributes = attributes.each_with_object({}) do |(k, v), h|
65
+ unless self.class.attribute_map.key?(k.to_sym)
66
+ raise ArgumentError,
67
+ "`#{k}` is not a valid attribute in `MoneyKit::AccountNumbers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
68
  end
70
- h[k.to_sym] = v
71
- }
72
69
 
73
- if attributes.key?(:'required')
74
- self.required = attributes[:'required']
75
- else
76
- self.required = false
70
+ h[k.to_sym] = v
77
71
  end
78
72
 
79
- if attributes.key?(:'prefetch')
80
- self.prefetch = attributes[:'prefetch']
81
- else
82
- self.prefetch = false
83
- end
73
+ self.required = if attributes.key?(:required)
74
+ attributes[:required]
75
+ else
76
+ false
77
+ end
78
+
79
+ self.prefetch = if attributes.key?(:prefetch)
80
+ attributes[:prefetch]
81
+ else
82
+ false
83
+ end
84
84
  end
85
85
 
86
86
  # Show invalid properties with the reasons. Usually used together with valid?
87
87
  # @return Array for valid properties with the reasons
88
88
  def list_invalid_properties
89
- invalid_properties = Array.new
90
- invalid_properties
89
+ []
91
90
  end
92
91
 
93
92
  # Check to see if the all the properties in the model are valid
@@ -98,17 +97,18 @@ module MoneyKit
98
97
 
99
98
  # Checks equality by comparing each attribute.
100
99
  # @param [Object] Object to be compared
101
- def ==(o)
102
- return true if self.equal?(o)
103
- self.class == o.class &&
104
- required == o.required &&
105
- prefetch == o.prefetch
100
+ def ==(other)
101
+ return true if equal?(other)
102
+
103
+ self.class == other.class &&
104
+ required == other.required &&
105
+ prefetch == other.prefetch
106
106
  end
107
107
 
108
108
  # @see the `==` method
109
109
  # @param [Object] Object to be compared
110
- def eql?(o)
111
- self == o
110
+ def eql?(other)
111
+ self == other
112
112
  end
113
113
 
114
114
  # Calculates hash code according to all attributes.
@@ -129,18 +129,21 @@ module MoneyKit
129
129
  # @return [Object] Returns the model itself
130
130
  def build_from_hash(attributes)
131
131
  return nil unless attributes.is_a?(Hash)
132
+
132
133
  attributes = attributes.transform_keys(&:to_sym)
133
134
  self.class.openapi_types.each_pair do |key, type|
134
135
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
135
- self.send("#{key}=", nil)
136
+ send("#{key}=", nil)
136
137
  elsif type =~ /\AArray<(.*)>/i
137
138
  # check to ensure the input is an array given that the attribute
138
139
  # is documented as an array but the input is not
139
140
  if attributes[self.class.attribute_map[key]].is_a?(Array)
140
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
142
+ _deserialize(::Regexp.last_match(1), v)
143
+ end)
141
144
  end
142
145
  elsif !attributes[self.class.attribute_map[key]].nil?
143
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
147
  end
145
148
  end
146
149
 
@@ -207,7 +210,7 @@ module MoneyKit
207
210
  def to_hash
208
211
  hash = {}
209
212
  self.class.attribute_map.each_pair do |attr, param|
210
- value = self.send(attr)
213
+ value = send(attr)
211
214
  if value.nil?
212
215
  is_nullable = self.class.openapi_nullable.include?(attr)
213
216
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -235,7 +238,5 @@ module MoneyKit
235
238
  value
236
239
  end
237
240
  end
238
-
239
241
  end
240
-
241
242
  end