moneykit 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
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'
@@ -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, :numbers
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,13 +24,8 @@ 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
- attr_accessor :numbers
32
-
33
27
  class EnumAttributeValidator
34
- attr_reader :datatype
35
- attr_reader :allowable_values
28
+ attr_reader :datatype, :allowable_values
36
29
 
37
30
  def initialize(datatype, allowable_values)
38
31
  @allowable_values = allowable_values.map do |value|
@@ -55,12 +48,12 @@ module MoneyKit
55
48
  # Attribute mapping from ruby-style variable name to JSON key.
56
49
  def self.attribute_map
57
50
  {
58
- :'account_id' => :'account_id',
59
- :'account_type' => :'account_type',
60
- :'name' => :'name',
61
- :'account_mask' => :'account_mask',
62
- :'balances' => :'balances',
63
- :'numbers' => :'numbers'
51
+ 'account_id': :account_id,
52
+ 'account_type': :account_type,
53
+ 'name': :name,
54
+ 'account_mask': :account_mask,
55
+ 'balances': :balances,
56
+ 'numbers': :numbers
64
57
  }
65
58
  end
66
59
 
@@ -72,85 +65,68 @@ module MoneyKit
72
65
  # Attribute type mapping.
73
66
  def self.openapi_types
74
67
  {
75
- :'account_id' => :'String',
76
- :'account_type' => :'AccountType',
77
- :'name' => :'String',
78
- :'account_mask' => :'String',
79
- :'balances' => :'Balances',
80
- :'numbers' => :'Numbers'
68
+ 'account_id': :String,
69
+ 'account_type': :AccountType,
70
+ 'name': :String,
71
+ 'account_mask': :String,
72
+ 'balances': :Balances,
73
+ 'numbers': :Numbers
81
74
  }
82
75
  end
83
76
 
84
77
  # List of attributes with nullable: true
85
78
  def self.openapi_nullable
86
79
  Set.new([
87
- :'account_mask',
88
- ])
80
+ :account_mask
81
+ ])
89
82
  end
90
83
 
91
84
  # Initializes the object
92
85
  # @param [Hash] attributes Model attributes in the form of hash
93
86
  def initialize(attributes = {})
94
- if (!attributes.is_a?(Hash))
95
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::AccountWithAccountNumbers` initialize method"
87
+ unless attributes.is_a?(Hash)
88
+ raise ArgumentError,
89
+ 'The input argument (attributes) must be a hash in `MoneyKit::AccountWithAccountNumbers` initialize method'
96
90
  end
97
91
 
98
92
  # check to see if the attribute exists and convert string to symbol for hash key
99
- attributes = attributes.each_with_object({}) { |(k, v), h|
100
- if (!self.class.attribute_map.key?(k.to_sym))
101
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::AccountWithAccountNumbers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
93
+ attributes = attributes.each_with_object({}) do |(k, v), h|
94
+ unless self.class.attribute_map.key?(k.to_sym)
95
+ raise ArgumentError,
96
+ "`#{k}` is not a valid attribute in `MoneyKit::AccountWithAccountNumbers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
102
97
  end
103
- h[k.to_sym] = v
104
- }
105
98
 
106
- if attributes.key?(:'account_id')
107
- self.account_id = attributes[:'account_id']
99
+ h[k.to_sym] = v
108
100
  end
109
101
 
110
- if attributes.key?(:'account_type')
111
- self.account_type = attributes[:'account_type']
112
- end
102
+ self.account_id = attributes[:account_id] if attributes.key?(:account_id)
113
103
 
114
- if attributes.key?(:'name')
115
- self.name = attributes[:'name']
116
- end
104
+ self.account_type = attributes[:account_type] if attributes.key?(:account_type)
117
105
 
118
- if attributes.key?(:'account_mask')
119
- self.account_mask = attributes[:'account_mask']
120
- end
106
+ self.name = attributes[:name] if attributes.key?(:name)
121
107
 
122
- if attributes.key?(:'balances')
123
- self.balances = attributes[:'balances']
124
- end
108
+ self.account_mask = attributes[:account_mask] if attributes.key?(:account_mask)
125
109
 
126
- if attributes.key?(:'numbers')
127
- self.numbers = attributes[:'numbers']
128
- end
110
+ self.balances = attributes[:balances] if attributes.key?(:balances)
111
+
112
+ return unless attributes.key?(:numbers)
113
+
114
+ self.numbers = attributes[:numbers]
129
115
  end
130
116
 
131
117
  # Show invalid properties with the reasons. Usually used together with valid?
132
118
  # @return Array for valid properties with the reasons
133
119
  def list_invalid_properties
134
- invalid_properties = Array.new
135
- if @account_id.nil?
136
- invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
137
- end
120
+ invalid_properties = []
121
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') if @account_id.nil?
138
122
 
139
- if @account_type.nil?
140
- invalid_properties.push('invalid value for "account_type", account_type cannot be nil.')
141
- end
123
+ invalid_properties.push('invalid value for "account_type", account_type cannot be nil.') if @account_type.nil?
142
124
 
143
- if @name.nil?
144
- invalid_properties.push('invalid value for "name", name cannot be nil.')
145
- end
125
+ invalid_properties.push('invalid value for "name", name cannot be nil.') if @name.nil?
146
126
 
147
- if @balances.nil?
148
- invalid_properties.push('invalid value for "balances", balances cannot be nil.')
149
- end
127
+ invalid_properties.push('invalid value for "balances", balances cannot be nil.') if @balances.nil?
150
128
 
151
- if @numbers.nil?
152
- invalid_properties.push('invalid value for "numbers", numbers cannot be nil.')
153
- end
129
+ invalid_properties.push('invalid value for "numbers", numbers cannot be nil.') if @numbers.nil?
154
130
 
155
131
  invalid_properties
156
132
  end
@@ -163,26 +139,28 @@ module MoneyKit
163
139
  return false if @name.nil?
164
140
  return false if @balances.nil?
165
141
  return false if @numbers.nil?
142
+
166
143
  true
167
144
  end
168
145
 
169
146
  # Checks equality by comparing each attribute.
170
147
  # @param [Object] Object to be compared
171
- def ==(o)
172
- return true if self.equal?(o)
173
- self.class == o.class &&
174
- account_id == o.account_id &&
175
- account_type == o.account_type &&
176
- name == o.name &&
177
- account_mask == o.account_mask &&
178
- balances == o.balances &&
179
- numbers == o.numbers
148
+ def ==(other)
149
+ return true if equal?(other)
150
+
151
+ self.class == other.class &&
152
+ account_id == other.account_id &&
153
+ account_type == other.account_type &&
154
+ name == other.name &&
155
+ account_mask == other.account_mask &&
156
+ balances == other.balances &&
157
+ numbers == other.numbers
180
158
  end
181
159
 
182
160
  # @see the `==` method
183
161
  # @param [Object] Object to be compared
184
- def eql?(o)
185
- self == o
162
+ def eql?(other)
163
+ self == other
186
164
  end
187
165
 
188
166
  # Calculates hash code according to all attributes.
@@ -203,18 +181,21 @@ module MoneyKit
203
181
  # @return [Object] Returns the model itself
204
182
  def build_from_hash(attributes)
205
183
  return nil unless attributes.is_a?(Hash)
184
+
206
185
  attributes = attributes.transform_keys(&:to_sym)
207
186
  self.class.openapi_types.each_pair do |key, type|
208
187
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
209
- self.send("#{key}=", nil)
188
+ send("#{key}=", nil)
210
189
  elsif type =~ /\AArray<(.*)>/i
211
190
  # check to ensure the input is an array given that the attribute
212
191
  # is documented as an array but the input is not
213
192
  if attributes[self.class.attribute_map[key]].is_a?(Array)
214
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
193
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
194
+ _deserialize(::Regexp.last_match(1), v)
195
+ end)
215
196
  end
216
197
  elsif !attributes[self.class.attribute_map[key]].nil?
217
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
198
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
218
199
  end
219
200
  end
220
201
 
@@ -281,7 +262,7 @@ module MoneyKit
281
262
  def to_hash
282
263
  hash = {}
283
264
  self.class.attribute_map.each_pair do |attr, param|
284
- value = self.send(attr)
265
+ value = send(attr)
285
266
  if value.nil?
286
267
  is_nullable = self.class.openapi_nullable.include?(attr)
287
268
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -309,7 +290,5 @@ module MoneyKit
309
290
  value
310
291
  end
311
292
  end
312
-
313
293
  end
314
-
315
294
  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
- :'refreshed_at' => :'refreshed_at',
28
- :'last_attempted_at' => :'last_attempted_at'
25
+ 'refreshed_at': :refreshed_at,
26
+ 'last_attempted_at': :last_attempted_at
29
27
  }
30
28
  end
31
29
 
@@ -37,48 +35,48 @@ module MoneyKit
37
35
  # Attribute type mapping.
38
36
  def self.openapi_types
39
37
  {
40
- :'refreshed_at' => :'Time',
41
- :'last_attempted_at' => :'Time'
38
+ 'refreshed_at': :Time,
39
+ 'last_attempted_at': :Time
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
- :'refreshed_at',
49
- :'last_attempted_at'
50
- ])
45
+ Set.new(%i[
46
+ refreshed_at
47
+ last_attempted_at
48
+ ])
51
49
  end
52
50
 
53
51
  # Initializes the object
54
52
  # @param [Hash] attributes Model attributes in the form of hash
55
53
  def initialize(attributes = {})
56
- if (!attributes.is_a?(Hash))
57
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::AccountsLinkProduct` initialize method"
54
+ unless attributes.is_a?(Hash)
55
+ raise ArgumentError,
56
+ 'The input argument (attributes) must be a hash in `MoneyKit::AccountsLinkProduct` initialize method'
58
57
  end
59
58
 
60
59
  # check to see if the attribute exists and convert string to symbol for hash key
61
- attributes = attributes.each_with_object({}) { |(k, v), h|
62
- if (!self.class.attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::AccountsLinkProduct`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ attributes = attributes.each_with_object({}) do |(k, v), h|
61
+ unless self.class.attribute_map.key?(k.to_sym)
62
+ raise ArgumentError,
63
+ "`#{k}` is not a valid attribute in `MoneyKit::AccountsLinkProduct`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
64
  end
65
- h[k.to_sym] = v
66
- }
67
65
 
68
- if attributes.key?(:'refreshed_at')
69
- self.refreshed_at = attributes[:'refreshed_at']
66
+ h[k.to_sym] = v
70
67
  end
71
68
 
72
- if attributes.key?(:'last_attempted_at')
73
- self.last_attempted_at = attributes[:'last_attempted_at']
74
- end
69
+ self.refreshed_at = attributes[:refreshed_at] if attributes.key?(:refreshed_at)
70
+
71
+ return unless attributes.key?(:last_attempted_at)
72
+
73
+ self.last_attempted_at = attributes[:last_attempted_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
- invalid_properties
79
+ []
82
80
  end
83
81
 
84
82
  # Check to see if the all the properties in the model are valid
@@ -89,17 +87,18 @@ module MoneyKit
89
87
 
90
88
  # Checks equality by comparing each attribute.
91
89
  # @param [Object] Object to be compared
92
- def ==(o)
93
- return true if self.equal?(o)
94
- self.class == o.class &&
95
- refreshed_at == o.refreshed_at &&
96
- last_attempted_at == o.last_attempted_at
90
+ def ==(other)
91
+ return true if equal?(other)
92
+
93
+ self.class == other.class &&
94
+ refreshed_at == other.refreshed_at &&
95
+ last_attempted_at == other.last_attempted_at
97
96
  end
98
97
 
99
98
  # @see the `==` method
100
99
  # @param [Object] Object to be compared
101
- def eql?(o)
102
- self == o
100
+ def eql?(other)
101
+ self == other
103
102
  end
104
103
 
105
104
  # Calculates hash code according to all attributes.
@@ -120,18 +119,21 @@ module MoneyKit
120
119
  # @return [Object] Returns the model itself
121
120
  def build_from_hash(attributes)
122
121
  return nil unless attributes.is_a?(Hash)
122
+
123
123
  attributes = attributes.transform_keys(&:to_sym)
124
124
  self.class.openapi_types.each_pair do |key, type|
125
125
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
126
- self.send("#{key}=", nil)
126
+ send("#{key}=", nil)
127
127
  elsif type =~ /\AArray<(.*)>/i
128
128
  # check to ensure the input is an array given that the attribute
129
129
  # is documented as an array but the input is not
130
130
  if attributes[self.class.attribute_map[key]].is_a?(Array)
131
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
131
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
132
+ _deserialize(::Regexp.last_match(1), v)
133
+ end)
132
134
  end
133
135
  elsif !attributes[self.class.attribute_map[key]].nil?
134
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
137
  end
136
138
  end
137
139
 
@@ -198,7 +200,7 @@ module MoneyKit
198
200
  def to_hash
199
201
  hash = {}
200
202
  self.class.attribute_map.each_pair do |attr, param|
201
- value = self.send(attr)
203
+ value = send(attr)
202
204
  if value.nil?
203
205
  is_nullable = self.class.openapi_nullable.include?(attr)
204
206
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -226,7 +228,5 @@ module MoneyKit
226
228
  value
227
229
  end
228
230
  end
229
-
230
231
  end
231
-
232
232
  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'
@@ -27,9 +25,9 @@ module MoneyKit
27
25
  # Attribute mapping from ruby-style variable name to JSON key.
28
26
  def self.attribute_map
29
27
  {
30
- :'account_number' => :'account_number',
31
- :'routing_number' => :'routing_number',
32
- :'wire_routing_number' => :'wire_routing_number'
28
+ 'account_number': :account_number,
29
+ 'routing_number': :routing_number,
30
+ 'wire_routing_number': :wire_routing_number
33
31
  }
34
32
  end
35
33
 
@@ -41,51 +39,49 @@ module MoneyKit
41
39
  # Attribute type mapping.
42
40
  def self.openapi_types
43
41
  {
44
- :'account_number' => :'String',
45
- :'routing_number' => :'String',
46
- :'wire_routing_number' => :'String'
42
+ 'account_number': :String,
43
+ 'routing_number': :String,
44
+ 'wire_routing_number': :String
47
45
  }
48
46
  end
49
47
 
50
48
  # List of attributes with nullable: true
51
49
  def self.openapi_nullable
52
50
  Set.new([
53
- :'wire_routing_number'
54
- ])
51
+ :wire_routing_number
52
+ ])
55
53
  end
56
54
 
57
55
  # Initializes the object
58
56
  # @param [Hash] attributes Model attributes in the form of hash
59
57
  def initialize(attributes = {})
60
- if (!attributes.is_a?(Hash))
61
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::AchNumber` initialize method"
58
+ unless attributes.is_a?(Hash)
59
+ raise ArgumentError, 'The input argument (attributes) must be a hash in `MoneyKit::AchNumber` initialize method'
62
60
  end
63
61
 
64
62
  # 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::AchNumber`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ attributes = attributes.each_with_object({}) do |(k, v), h|
64
+ unless self.class.attribute_map.key?(k.to_sym)
65
+ raise ArgumentError,
66
+ "`#{k}` is not a valid attribute in `MoneyKit::AchNumber`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
67
  end
69
- h[k.to_sym] = v
70
- }
71
68
 
72
- if attributes.key?(:'account_number')
73
- self.account_number = attributes[:'account_number']
69
+ h[k.to_sym] = v
74
70
  end
75
71
 
76
- if attributes.key?(:'routing_number')
77
- self.routing_number = attributes[:'routing_number']
78
- end
72
+ self.account_number = attributes[:account_number] if attributes.key?(:account_number)
79
73
 
80
- if attributes.key?(:'wire_routing_number')
81
- self.wire_routing_number = attributes[:'wire_routing_number']
82
- end
74
+ self.routing_number = attributes[:routing_number] if attributes.key?(:routing_number)
75
+
76
+ return unless attributes.key?(:wire_routing_number)
77
+
78
+ self.wire_routing_number = attributes[:wire_routing_number]
83
79
  end
84
80
 
85
81
  # Show invalid properties with the reasons. Usually used together with valid?
86
82
  # @return Array for valid properties with the reasons
87
83
  def list_invalid_properties
88
- invalid_properties = Array.new
84
+ invalid_properties = []
89
85
  if @account_number.nil?
90
86
  invalid_properties.push('invalid value for "account_number", account_number cannot be nil.')
91
87
  end
@@ -102,23 +98,25 @@ module MoneyKit
102
98
  def valid?
103
99
  return false if @account_number.nil?
104
100
  return false if @routing_number.nil?
101
+
105
102
  true
106
103
  end
107
104
 
108
105
  # Checks equality by comparing each attribute.
109
106
  # @param [Object] Object to be compared
110
- def ==(o)
111
- return true if self.equal?(o)
112
- self.class == o.class &&
113
- account_number == o.account_number &&
114
- routing_number == o.routing_number &&
115
- wire_routing_number == o.wire_routing_number
107
+ def ==(other)
108
+ return true if equal?(other)
109
+
110
+ self.class == other.class &&
111
+ account_number == other.account_number &&
112
+ routing_number == other.routing_number &&
113
+ wire_routing_number == other.wire_routing_number
116
114
  end
117
115
 
118
116
  # @see the `==` method
119
117
  # @param [Object] Object to be compared
120
- def eql?(o)
121
- self == o
118
+ def eql?(other)
119
+ self == other
122
120
  end
123
121
 
124
122
  # Calculates hash code according to all attributes.
@@ -139,18 +137,21 @@ module MoneyKit
139
137
  # @return [Object] Returns the model itself
140
138
  def build_from_hash(attributes)
141
139
  return nil unless attributes.is_a?(Hash)
140
+
142
141
  attributes = attributes.transform_keys(&:to_sym)
143
142
  self.class.openapi_types.each_pair do |key, type|
144
143
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
145
- self.send("#{key}=", nil)
144
+ send("#{key}=", nil)
146
145
  elsif type =~ /\AArray<(.*)>/i
147
146
  # check to ensure the input is an array given that the attribute
148
147
  # is documented as an array but the input is not
149
148
  if attributes[self.class.attribute_map[key]].is_a?(Array)
150
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
149
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
150
+ _deserialize(::Regexp.last_match(1), v)
151
+ end)
151
152
  end
152
153
  elsif !attributes[self.class.attribute_map[key]].nil?
153
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
155
  end
155
156
  end
156
157
 
@@ -217,7 +218,7 @@ module MoneyKit
217
218
  def to_hash
218
219
  hash = {}
219
220
  self.class.attribute_map.each_pair do |attr, param|
220
- value = self.send(attr)
221
+ value = send(attr)
221
222
  if value.nil?
222
223
  is_nullable = self.class.openapi_nullable.include?(attr)
223
224
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -245,7 +246,5 @@ module MoneyKit
245
246
  value
246
247
  end
247
248
  end
248
-
249
249
  end
250
-
251
250
  end