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'
@@ -25,9 +23,7 @@ module MoneyKit
25
23
  # The institution name this link is connected to.
26
24
  attr_accessor :institution_name
27
25
 
28
- attr_accessor :state
29
-
30
- attr_accessor :error_code
26
+ attr_accessor :state, :error_code, :products
31
27
 
32
28
  # An ISO-8601 timestamp indicating the last time that the account was updated.
33
29
  attr_accessor :last_synced_at
@@ -35,11 +31,8 @@ module MoneyKit
35
31
  # Arbitrary strings used to describe this link.
36
32
  attr_accessor :tags
37
33
 
38
- attr_accessor :products
39
-
40
34
  class EnumAttributeValidator
41
- attr_reader :datatype
42
- attr_reader :allowable_values
35
+ attr_reader :datatype, :allowable_values
43
36
 
44
37
  def initialize(datatype, allowable_values)
45
38
  @allowable_values = allowable_values.map do |value|
@@ -62,14 +55,14 @@ module MoneyKit
62
55
  # Attribute mapping from ruby-style variable name to JSON key.
63
56
  def self.attribute_map
64
57
  {
65
- :'link_id' => :'link_id',
66
- :'institution_id' => :'institution_id',
67
- :'institution_name' => :'institution_name',
68
- :'state' => :'state',
69
- :'error_code' => :'error_code',
70
- :'last_synced_at' => :'last_synced_at',
71
- :'tags' => :'tags',
72
- :'products' => :'products'
58
+ 'link_id': :link_id,
59
+ 'institution_id': :institution_id,
60
+ 'institution_name': :institution_name,
61
+ 'state': :state,
62
+ 'error_code': :error_code,
63
+ 'last_synced_at': :last_synced_at,
64
+ 'tags': :tags,
65
+ 'products': :products
73
66
  }
74
67
  end
75
68
 
@@ -81,90 +74,76 @@ module MoneyKit
81
74
  # Attribute type mapping.
82
75
  def self.openapi_types
83
76
  {
84
- :'link_id' => :'String',
85
- :'institution_id' => :'String',
86
- :'institution_name' => :'String',
87
- :'state' => :'LinkState',
88
- :'error_code' => :'LinkError',
89
- :'last_synced_at' => :'Time',
90
- :'tags' => :'Array<String>',
91
- :'products' => :'Products'
77
+ 'link_id': :String,
78
+ 'institution_id': :String,
79
+ 'institution_name': :String,
80
+ 'state': :LinkState,
81
+ 'error_code': :LinkError,
82
+ 'last_synced_at': :Time,
83
+ 'tags': :'Array<String>',
84
+ 'products': :Products
92
85
  }
93
86
  end
94
87
 
95
88
  # List of attributes with nullable: true
96
89
  def self.openapi_nullable
97
- Set.new([
98
- :'error_code',
99
- :'last_synced_at',
100
- :'tags',
101
- ])
90
+ Set.new(%i[
91
+ error_code
92
+ last_synced_at
93
+ tags
94
+ ])
102
95
  end
103
96
 
104
97
  # List of class defined in allOf (OpenAPI v3)
105
98
  def self.openapi_all_of
106
99
  [
107
- :'LinkCommon'
100
+ :LinkCommon
108
101
  ]
109
102
  end
110
103
 
111
104
  # Initializes the object
112
105
  # @param [Hash] attributes Model attributes in the form of hash
113
106
  def initialize(attributes = {})
114
- if (!attributes.is_a?(Hash))
115
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::Link4` initialize method"
107
+ unless attributes.is_a?(Hash)
108
+ raise ArgumentError, 'The input argument (attributes) must be a hash in `MoneyKit::Link4` initialize method'
116
109
  end
117
110
 
118
111
  # check to see if the attribute exists and convert string to symbol for hash key
119
- attributes = attributes.each_with_object({}) { |(k, v), h|
120
- if (!self.class.attribute_map.key?(k.to_sym))
121
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::Link4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
112
+ attributes = attributes.each_with_object({}) do |(k, v), h|
113
+ unless self.class.attribute_map.key?(k.to_sym)
114
+ raise ArgumentError,
115
+ "`#{k}` is not a valid attribute in `MoneyKit::Link4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
122
116
  end
123
- h[k.to_sym] = v
124
- }
125
117
 
126
- if attributes.key?(:'link_id')
127
- self.link_id = attributes[:'link_id']
118
+ h[k.to_sym] = v
128
119
  end
129
120
 
130
- if attributes.key?(:'institution_id')
131
- self.institution_id = attributes[:'institution_id']
132
- end
121
+ self.link_id = attributes[:link_id] if attributes.key?(:link_id)
133
122
 
134
- if attributes.key?(:'institution_name')
135
- self.institution_name = attributes[:'institution_name']
136
- end
123
+ self.institution_id = attributes[:institution_id] if attributes.key?(:institution_id)
137
124
 
138
- if attributes.key?(:'state')
139
- self.state = attributes[:'state']
140
- end
125
+ self.institution_name = attributes[:institution_name] if attributes.key?(:institution_name)
141
126
 
142
- if attributes.key?(:'error_code')
143
- self.error_code = attributes[:'error_code']
144
- end
127
+ self.state = attributes[:state] if attributes.key?(:state)
145
128
 
146
- if attributes.key?(:'last_synced_at')
147
- self.last_synced_at = attributes[:'last_synced_at']
148
- end
129
+ self.error_code = attributes[:error_code] if attributes.key?(:error_code)
149
130
 
150
- if attributes.key?(:'tags')
151
- if (value = attributes[:'tags']).is_a?(Array)
152
- self.tags = value
153
- end
154
- end
131
+ self.last_synced_at = attributes[:last_synced_at] if attributes.key?(:last_synced_at)
155
132
 
156
- if attributes.key?(:'products')
157
- self.products = attributes[:'products']
133
+ if attributes.key?(:tags) && (value = attributes[:tags]).is_a?(Array)
134
+ self.tags = value
158
135
  end
136
+
137
+ return unless attributes.key?(:products)
138
+
139
+ self.products = attributes[:products]
159
140
  end
160
141
 
161
142
  # Show invalid properties with the reasons. Usually used together with valid?
162
143
  # @return Array for valid properties with the reasons
163
144
  def list_invalid_properties
164
- invalid_properties = Array.new
165
- if @link_id.nil?
166
- invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
167
- end
145
+ invalid_properties = []
146
+ invalid_properties.push('invalid value for "link_id", link_id cannot be nil.') if @link_id.nil?
168
147
 
169
148
  if @institution_id.nil?
170
149
  invalid_properties.push('invalid value for "institution_id", institution_id cannot be nil.')
@@ -174,13 +153,9 @@ module MoneyKit
174
153
  invalid_properties.push('invalid value for "institution_name", institution_name cannot be nil.')
175
154
  end
176
155
 
177
- if @state.nil?
178
- invalid_properties.push('invalid value for "state", state cannot be nil.')
179
- end
156
+ invalid_properties.push('invalid value for "state", state cannot be nil.') if @state.nil?
180
157
 
181
- if @products.nil?
182
- invalid_properties.push('invalid value for "products", products cannot be nil.')
183
- end
158
+ invalid_properties.push('invalid value for "products", products cannot be nil.') if @products.nil?
184
159
 
185
160
  invalid_properties
186
161
  end
@@ -193,28 +168,30 @@ module MoneyKit
193
168
  return false if @institution_name.nil?
194
169
  return false if @state.nil?
195
170
  return false if @products.nil?
171
+
196
172
  true
197
173
  end
198
174
 
199
175
  # Checks equality by comparing each attribute.
200
176
  # @param [Object] Object to be compared
201
- def ==(o)
202
- return true if self.equal?(o)
203
- self.class == o.class &&
204
- link_id == o.link_id &&
205
- institution_id == o.institution_id &&
206
- institution_name == o.institution_name &&
207
- state == o.state &&
208
- error_code == o.error_code &&
209
- last_synced_at == o.last_synced_at &&
210
- tags == o.tags &&
211
- products == o.products
177
+ def ==(other)
178
+ return true if equal?(other)
179
+
180
+ self.class == other.class &&
181
+ link_id == other.link_id &&
182
+ institution_id == other.institution_id &&
183
+ institution_name == other.institution_name &&
184
+ state == other.state &&
185
+ error_code == other.error_code &&
186
+ last_synced_at == other.last_synced_at &&
187
+ tags == other.tags &&
188
+ products == other.products
212
189
  end
213
190
 
214
191
  # @see the `==` method
215
192
  # @param [Object] Object to be compared
216
- def eql?(o)
217
- self == o
193
+ def eql?(other)
194
+ self == other
218
195
  end
219
196
 
220
197
  # Calculates hash code according to all attributes.
@@ -235,18 +212,21 @@ module MoneyKit
235
212
  # @return [Object] Returns the model itself
236
213
  def build_from_hash(attributes)
237
214
  return nil unless attributes.is_a?(Hash)
215
+
238
216
  attributes = attributes.transform_keys(&:to_sym)
239
217
  self.class.openapi_types.each_pair do |key, type|
240
218
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
241
- self.send("#{key}=", nil)
219
+ send("#{key}=", nil)
242
220
  elsif type =~ /\AArray<(.*)>/i
243
221
  # check to ensure the input is an array given that the attribute
244
222
  # is documented as an array but the input is not
245
223
  if attributes[self.class.attribute_map[key]].is_a?(Array)
246
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
224
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
225
+ _deserialize(::Regexp.last_match(1), v)
226
+ end)
247
227
  end
248
228
  elsif !attributes[self.class.attribute_map[key]].nil?
249
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
229
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
250
230
  end
251
231
  end
252
232
 
@@ -313,7 +293,7 @@ module MoneyKit
313
293
  def to_hash
314
294
  hash = {}
315
295
  self.class.attribute_map.each_pair do |attr, param|
316
- value = self.send(attr)
296
+ value = send(attr)
317
297
  if value.nil?
318
298
  is_nullable = self.class.openapi_nullable.include?(attr)
319
299
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -341,7 +321,5 @@ module MoneyKit
341
321
  value
342
322
  end
343
323
  end
344
-
345
324
  end
346
-
347
325
  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,9 +22,7 @@ module MoneyKit
24
22
  # The institution name this link is connected to.
25
23
  attr_accessor :institution_name
26
24
 
27
- attr_accessor :state
28
-
29
- attr_accessor :error_code
25
+ attr_accessor :state, :error_code, :products
30
26
 
31
27
  # An ISO-8601 timestamp indicating the last time that the account was updated.
32
28
  attr_accessor :last_synced_at
@@ -34,11 +30,8 @@ module MoneyKit
34
30
  # Arbitrary strings used to describe this link.
35
31
  attr_accessor :tags
36
32
 
37
- attr_accessor :products
38
-
39
33
  class EnumAttributeValidator
40
- attr_reader :datatype
41
- attr_reader :allowable_values
34
+ attr_reader :datatype, :allowable_values
42
35
 
43
36
  def initialize(datatype, allowable_values)
44
37
  @allowable_values = allowable_values.map do |value|
@@ -61,14 +54,14 @@ module MoneyKit
61
54
  # Attribute mapping from ruby-style variable name to JSON key.
62
55
  def self.attribute_map
63
56
  {
64
- :'link_id' => :'link_id',
65
- :'institution_id' => :'institution_id',
66
- :'institution_name' => :'institution_name',
67
- :'state' => :'state',
68
- :'error_code' => :'error_code',
69
- :'last_synced_at' => :'last_synced_at',
70
- :'tags' => :'tags',
71
- :'products' => :'products'
57
+ 'link_id': :link_id,
58
+ 'institution_id': :institution_id,
59
+ 'institution_name': :institution_name,
60
+ 'state': :state,
61
+ 'error_code': :error_code,
62
+ 'last_synced_at': :last_synced_at,
63
+ 'tags': :tags,
64
+ 'products': :products
72
65
  }
73
66
  end
74
67
 
@@ -80,83 +73,70 @@ module MoneyKit
80
73
  # Attribute type mapping.
81
74
  def self.openapi_types
82
75
  {
83
- :'link_id' => :'String',
84
- :'institution_id' => :'String',
85
- :'institution_name' => :'String',
86
- :'state' => :'LinkState',
87
- :'error_code' => :'LinkError',
88
- :'last_synced_at' => :'Time',
89
- :'tags' => :'Array<String>',
90
- :'products' => :'Products'
76
+ 'link_id': :String,
77
+ 'institution_id': :String,
78
+ 'institution_name': :String,
79
+ 'state': :LinkState,
80
+ 'error_code': :LinkError,
81
+ 'last_synced_at': :Time,
82
+ 'tags': :'Array<String>',
83
+ 'products': :Products
91
84
  }
92
85
  end
93
86
 
94
87
  # List of attributes with nullable: true
95
88
  def self.openapi_nullable
96
- Set.new([
97
- :'error_code',
98
- :'last_synced_at',
99
- :'tags',
100
- ])
89
+ Set.new(%i[
90
+ error_code
91
+ last_synced_at
92
+ tags
93
+ ])
101
94
  end
102
95
 
103
96
  # Initializes the object
104
97
  # @param [Hash] attributes Model attributes in the form of hash
105
98
  def initialize(attributes = {})
106
- if (!attributes.is_a?(Hash))
107
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::LinkCommon` initialize method"
99
+ unless attributes.is_a?(Hash)
100
+ raise ArgumentError,
101
+ 'The input argument (attributes) must be a hash in `MoneyKit::LinkCommon` initialize method'
108
102
  end
109
103
 
110
104
  # check to see if the attribute exists and convert string to symbol for hash key
111
- attributes = attributes.each_with_object({}) { |(k, v), h|
112
- if (!self.class.attribute_map.key?(k.to_sym))
113
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::LinkCommon`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
105
+ attributes = attributes.each_with_object({}) do |(k, v), h|
106
+ unless self.class.attribute_map.key?(k.to_sym)
107
+ raise ArgumentError,
108
+ "`#{k}` is not a valid attribute in `MoneyKit::LinkCommon`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
114
109
  end
115
- h[k.to_sym] = v
116
- }
117
110
 
118
- if attributes.key?(:'link_id')
119
- self.link_id = attributes[:'link_id']
111
+ h[k.to_sym] = v
120
112
  end
121
113
 
122
- if attributes.key?(:'institution_id')
123
- self.institution_id = attributes[:'institution_id']
124
- end
114
+ self.link_id = attributes[:link_id] if attributes.key?(:link_id)
125
115
 
126
- if attributes.key?(:'institution_name')
127
- self.institution_name = attributes[:'institution_name']
128
- end
116
+ self.institution_id = attributes[:institution_id] if attributes.key?(:institution_id)
129
117
 
130
- if attributes.key?(:'state')
131
- self.state = attributes[:'state']
132
- end
118
+ self.institution_name = attributes[:institution_name] if attributes.key?(:institution_name)
133
119
 
134
- if attributes.key?(:'error_code')
135
- self.error_code = attributes[:'error_code']
136
- end
120
+ self.state = attributes[:state] if attributes.key?(:state)
137
121
 
138
- if attributes.key?(:'last_synced_at')
139
- self.last_synced_at = attributes[:'last_synced_at']
140
- end
122
+ self.error_code = attributes[:error_code] if attributes.key?(:error_code)
141
123
 
142
- if attributes.key?(:'tags')
143
- if (value = attributes[:'tags']).is_a?(Array)
144
- self.tags = value
145
- end
146
- end
124
+ self.last_synced_at = attributes[:last_synced_at] if attributes.key?(:last_synced_at)
147
125
 
148
- if attributes.key?(:'products')
149
- self.products = attributes[:'products']
126
+ if attributes.key?(:tags) && (value = attributes[:tags]).is_a?(Array)
127
+ self.tags = value
150
128
  end
129
+
130
+ return unless attributes.key?(:products)
131
+
132
+ self.products = attributes[:products]
151
133
  end
152
134
 
153
135
  # Show invalid properties with the reasons. Usually used together with valid?
154
136
  # @return Array for valid properties with the reasons
155
137
  def list_invalid_properties
156
- invalid_properties = Array.new
157
- if @link_id.nil?
158
- invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
159
- end
138
+ invalid_properties = []
139
+ invalid_properties.push('invalid value for "link_id", link_id cannot be nil.') if @link_id.nil?
160
140
 
161
141
  if @institution_id.nil?
162
142
  invalid_properties.push('invalid value for "institution_id", institution_id cannot be nil.')
@@ -166,13 +146,9 @@ module MoneyKit
166
146
  invalid_properties.push('invalid value for "institution_name", institution_name cannot be nil.')
167
147
  end
168
148
 
169
- if @state.nil?
170
- invalid_properties.push('invalid value for "state", state cannot be nil.')
171
- end
149
+ invalid_properties.push('invalid value for "state", state cannot be nil.') if @state.nil?
172
150
 
173
- if @products.nil?
174
- invalid_properties.push('invalid value for "products", products cannot be nil.')
175
- end
151
+ invalid_properties.push('invalid value for "products", products cannot be nil.') if @products.nil?
176
152
 
177
153
  invalid_properties
178
154
  end
@@ -185,28 +161,30 @@ module MoneyKit
185
161
  return false if @institution_name.nil?
186
162
  return false if @state.nil?
187
163
  return false if @products.nil?
164
+
188
165
  true
189
166
  end
190
167
 
191
168
  # Checks equality by comparing each attribute.
192
169
  # @param [Object] Object to be compared
193
- def ==(o)
194
- return true if self.equal?(o)
195
- self.class == o.class &&
196
- link_id == o.link_id &&
197
- institution_id == o.institution_id &&
198
- institution_name == o.institution_name &&
199
- state == o.state &&
200
- error_code == o.error_code &&
201
- last_synced_at == o.last_synced_at &&
202
- tags == o.tags &&
203
- products == o.products
170
+ def ==(other)
171
+ return true if equal?(other)
172
+
173
+ self.class == other.class &&
174
+ link_id == other.link_id &&
175
+ institution_id == other.institution_id &&
176
+ institution_name == other.institution_name &&
177
+ state == other.state &&
178
+ error_code == other.error_code &&
179
+ last_synced_at == other.last_synced_at &&
180
+ tags == other.tags &&
181
+ products == other.products
204
182
  end
205
183
 
206
184
  # @see the `==` method
207
185
  # @param [Object] Object to be compared
208
- def eql?(o)
209
- self == o
186
+ def eql?(other)
187
+ self == other
210
188
  end
211
189
 
212
190
  # Calculates hash code according to all attributes.
@@ -227,18 +205,21 @@ module MoneyKit
227
205
  # @return [Object] Returns the model itself
228
206
  def build_from_hash(attributes)
229
207
  return nil unless attributes.is_a?(Hash)
208
+
230
209
  attributes = attributes.transform_keys(&:to_sym)
231
210
  self.class.openapi_types.each_pair do |key, type|
232
211
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
233
- self.send("#{key}=", nil)
212
+ send("#{key}=", nil)
234
213
  elsif type =~ /\AArray<(.*)>/i
235
214
  # check to ensure the input is an array given that the attribute
236
215
  # is documented as an array but the input is not
237
216
  if attributes[self.class.attribute_map[key]].is_a?(Array)
238
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
217
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
218
+ _deserialize(::Regexp.last_match(1), v)
219
+ end)
239
220
  end
240
221
  elsif !attributes[self.class.attribute_map[key]].nil?
241
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
222
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
242
223
  end
243
224
  end
244
225
 
@@ -305,7 +286,7 @@ module MoneyKit
305
286
  def to_hash
306
287
  hash = {}
307
288
  self.class.attribute_map.each_pair do |attr, param|
308
- value = self.send(attr)
289
+ value = send(attr)
309
290
  if value.nil?
310
291
  is_nullable = self.class.openapi_nullable.include?(attr)
311
292
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -333,7 +314,5 @@ module MoneyKit
333
314
  value
334
315
  end
335
316
  end
336
-
337
317
  end
338
-
339
318
  end
@@ -1,30 +1,29 @@
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'
15
13
 
16
14
  module MoneyKit
17
15
  class LinkError
18
- SYSTEM_ERROR = "system_error".freeze
19
- PROVIDER_ERROR = "provider_error".freeze
20
- INSTITUTION_ERROR = "institution_error".freeze
21
- USER_ERROR = "user_error".freeze
22
- AUTH_EXPIRED = "auth_expired".freeze
23
- INCOMPLETE = "incomplete".freeze
24
- PAYMENT_ERROR = "payment_error".freeze
16
+ SYSTEM_ERROR = 'system_error'.freeze
17
+ PROVIDER_ERROR = 'provider_error'.freeze
18
+ INSTITUTION_ERROR = 'institution_error'.freeze
19
+ USER_ERROR = 'user_error'.freeze
20
+ AUTH_EXPIRED = 'auth_expired'.freeze
21
+ INCOMPLETE = 'incomplete'.freeze
22
+ PAYMENT_ERROR = 'payment_error'.freeze
25
23
 
26
24
  def self.all_vars
27
- @all_vars ||= [SYSTEM_ERROR, PROVIDER_ERROR, INSTITUTION_ERROR, USER_ERROR, AUTH_EXPIRED, INCOMPLETE, PAYMENT_ERROR].freeze
25
+ @all_vars ||= [SYSTEM_ERROR, PROVIDER_ERROR, INSTITUTION_ERROR, USER_ERROR, AUTH_EXPIRED, INCOMPLETE,
26
+ PAYMENT_ERROR].freeze
28
27
  end
29
28
 
30
29
  # Builds the enum from string
@@ -39,6 +38,7 @@ module MoneyKit
39
38
  # @return [String] The enum value
40
39
  def build_from_hash(value)
41
40
  return value if LinkError.all_vars.include?(value)
41
+
42
42
  raise "Invalid ENUM value #{value} for class #LinkError"
43
43
  end
44
44
  end