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'
@@ -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, :provider
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,16 +30,11 @@ module MoneyKit
34
30
  # Arbitrary strings used to describe this link.
35
31
  attr_accessor :tags
36
32
 
37
- attr_accessor :products
38
-
39
- attr_accessor :provider
40
-
41
33
  # The webhook url assigned to this link.
42
34
  attr_accessor :webhook
43
35
 
44
36
  class EnumAttributeValidator
45
- attr_reader :datatype
46
- attr_reader :allowable_values
37
+ attr_reader :datatype, :allowable_values
47
38
 
48
39
  def initialize(datatype, allowable_values)
49
40
  @allowable_values = allowable_values.map do |value|
@@ -66,16 +57,16 @@ module MoneyKit
66
57
  # Attribute mapping from ruby-style variable name to JSON key.
67
58
  def self.attribute_map
68
59
  {
69
- :'link_id' => :'link_id',
70
- :'institution_id' => :'institution_id',
71
- :'institution_name' => :'institution_name',
72
- :'state' => :'state',
73
- :'error_code' => :'error_code',
74
- :'last_synced_at' => :'last_synced_at',
75
- :'tags' => :'tags',
76
- :'products' => :'products',
77
- :'provider' => :'provider',
78
- :'webhook' => :'webhook'
60
+ 'link_id': :link_id,
61
+ 'institution_id': :institution_id,
62
+ 'institution_name': :institution_name,
63
+ 'state': :state,
64
+ 'error_code': :error_code,
65
+ 'last_synced_at': :last_synced_at,
66
+ 'tags': :tags,
67
+ 'products': :products,
68
+ 'provider': :provider,
69
+ 'webhook': :webhook
79
70
  }
80
71
  end
81
72
 
@@ -87,94 +78,77 @@ module MoneyKit
87
78
  # Attribute type mapping.
88
79
  def self.openapi_types
89
80
  {
90
- :'link_id' => :'String',
91
- :'institution_id' => :'String',
92
- :'institution_name' => :'String',
93
- :'state' => :'LinkState',
94
- :'error_code' => :'LinkError',
95
- :'last_synced_at' => :'Time',
96
- :'tags' => :'Array<String>',
97
- :'products' => :'Products',
98
- :'provider' => :'Provider',
99
- :'webhook' => :'String'
81
+ 'link_id': :String,
82
+ 'institution_id': :String,
83
+ 'institution_name': :String,
84
+ 'state': :LinkState,
85
+ 'error_code': :LinkError,
86
+ 'last_synced_at': :Time,
87
+ 'tags': :'Array<String>',
88
+ 'products': :Products,
89
+ 'provider': :Provider,
90
+ 'webhook': :String
100
91
  }
101
92
  end
102
93
 
103
94
  # List of attributes with nullable: true
104
95
  def self.openapi_nullable
105
- Set.new([
106
- :'error_code',
107
- :'last_synced_at',
108
- :'tags',
109
- :'webhook'
110
- ])
96
+ Set.new(%i[
97
+ error_code
98
+ last_synced_at
99
+ tags
100
+ webhook
101
+ ])
111
102
  end
112
103
 
113
104
  # Initializes the object
114
105
  # @param [Hash] attributes Model attributes in the form of hash
115
106
  def initialize(attributes = {})
116
- if (!attributes.is_a?(Hash))
117
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::LinkResponse` initialize method"
107
+ unless attributes.is_a?(Hash)
108
+ raise ArgumentError,
109
+ 'The input argument (attributes) must be a hash in `MoneyKit::LinkResponse` initialize method'
118
110
  end
119
111
 
120
112
  # check to see if the attribute exists and convert string to symbol for hash key
121
- attributes = attributes.each_with_object({}) { |(k, v), h|
122
- if (!self.class.attribute_map.key?(k.to_sym))
123
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::LinkResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
113
+ attributes = attributes.each_with_object({}) do |(k, v), h|
114
+ unless self.class.attribute_map.key?(k.to_sym)
115
+ raise ArgumentError,
116
+ "`#{k}` is not a valid attribute in `MoneyKit::LinkResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
124
117
  end
125
- h[k.to_sym] = v
126
- }
127
118
 
128
- if attributes.key?(:'link_id')
129
- self.link_id = attributes[:'link_id']
119
+ h[k.to_sym] = v
130
120
  end
131
121
 
132
- if attributes.key?(:'institution_id')
133
- self.institution_id = attributes[:'institution_id']
134
- end
122
+ self.link_id = attributes[:link_id] if attributes.key?(:link_id)
135
123
 
136
- if attributes.key?(:'institution_name')
137
- self.institution_name = attributes[:'institution_name']
138
- end
124
+ self.institution_id = attributes[:institution_id] if attributes.key?(:institution_id)
139
125
 
140
- if attributes.key?(:'state')
141
- self.state = attributes[:'state']
142
- end
126
+ self.institution_name = attributes[:institution_name] if attributes.key?(:institution_name)
143
127
 
144
- if attributes.key?(:'error_code')
145
- self.error_code = attributes[:'error_code']
146
- end
128
+ self.state = attributes[:state] if attributes.key?(:state)
147
129
 
148
- if attributes.key?(:'last_synced_at')
149
- self.last_synced_at = attributes[:'last_synced_at']
150
- end
130
+ self.error_code = attributes[:error_code] if attributes.key?(:error_code)
151
131
 
152
- if attributes.key?(:'tags')
153
- if (value = attributes[:'tags']).is_a?(Array)
154
- self.tags = value
155
- end
156
- end
132
+ self.last_synced_at = attributes[:last_synced_at] if attributes.key?(:last_synced_at)
157
133
 
158
- if attributes.key?(:'products')
159
- self.products = attributes[:'products']
134
+ if attributes.key?(:tags) && (value = attributes[:tags]).is_a?(Array)
135
+ self.tags = value
160
136
  end
161
137
 
162
- if attributes.key?(:'provider')
163
- self.provider = attributes[:'provider']
164
- end
138
+ self.products = attributes[:products] if attributes.key?(:products)
165
139
 
166
- if attributes.key?(:'webhook')
167
- self.webhook = attributes[:'webhook']
168
- end
140
+ self.provider = attributes[:provider] if attributes.key?(:provider)
141
+
142
+ return unless attributes.key?(:webhook)
143
+
144
+ self.webhook = attributes[:webhook]
169
145
  end
170
146
 
171
147
  # Show invalid properties with the reasons. Usually used together with valid?
172
148
  # @return Array for valid properties with the reasons
173
149
  def list_invalid_properties
174
- invalid_properties = Array.new
175
- if @link_id.nil?
176
- invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
177
- end
150
+ invalid_properties = []
151
+ invalid_properties.push('invalid value for "link_id", link_id cannot be nil.') if @link_id.nil?
178
152
 
179
153
  if @institution_id.nil?
180
154
  invalid_properties.push('invalid value for "institution_id", institution_id cannot be nil.')
@@ -184,17 +158,11 @@ module MoneyKit
184
158
  invalid_properties.push('invalid value for "institution_name", institution_name cannot be nil.')
185
159
  end
186
160
 
187
- if @state.nil?
188
- invalid_properties.push('invalid value for "state", state cannot be nil.')
189
- end
161
+ invalid_properties.push('invalid value for "state", state cannot be nil.') if @state.nil?
190
162
 
191
- if @products.nil?
192
- invalid_properties.push('invalid value for "products", products cannot be nil.')
193
- end
163
+ invalid_properties.push('invalid value for "products", products cannot be nil.') if @products.nil?
194
164
 
195
- if @provider.nil?
196
- invalid_properties.push('invalid value for "provider", provider cannot be nil.')
197
- end
165
+ invalid_properties.push('invalid value for "provider", provider cannot be nil.') if @provider.nil?
198
166
 
199
167
  invalid_properties
200
168
  end
@@ -208,36 +176,39 @@ module MoneyKit
208
176
  return false if @state.nil?
209
177
  return false if @products.nil?
210
178
  return false if @provider.nil?
179
+
211
180
  true
212
181
  end
213
182
 
214
183
  # Checks equality by comparing each attribute.
215
184
  # @param [Object] Object to be compared
216
- def ==(o)
217
- return true if self.equal?(o)
218
- self.class == o.class &&
219
- link_id == o.link_id &&
220
- institution_id == o.institution_id &&
221
- institution_name == o.institution_name &&
222
- state == o.state &&
223
- error_code == o.error_code &&
224
- last_synced_at == o.last_synced_at &&
225
- tags == o.tags &&
226
- products == o.products &&
227
- provider == o.provider &&
228
- webhook == o.webhook
185
+ def ==(other)
186
+ return true if equal?(other)
187
+
188
+ self.class == other.class &&
189
+ link_id == other.link_id &&
190
+ institution_id == other.institution_id &&
191
+ institution_name == other.institution_name &&
192
+ state == other.state &&
193
+ error_code == other.error_code &&
194
+ last_synced_at == other.last_synced_at &&
195
+ tags == other.tags &&
196
+ products == other.products &&
197
+ provider == other.provider &&
198
+ webhook == other.webhook
229
199
  end
230
200
 
231
201
  # @see the `==` method
232
202
  # @param [Object] Object to be compared
233
- def eql?(o)
234
- self == o
203
+ def eql?(other)
204
+ self == other
235
205
  end
236
206
 
237
207
  # Calculates hash code according to all attributes.
238
208
  # @return [Integer] Hash code
239
209
  def hash
240
- [link_id, institution_id, institution_name, state, error_code, last_synced_at, tags, products, provider, webhook].hash
210
+ [link_id, institution_id, institution_name, state, error_code, last_synced_at, tags, products, provider,
211
+ webhook].hash
241
212
  end
242
213
 
243
214
  # Builds the object from hash
@@ -252,18 +223,21 @@ module MoneyKit
252
223
  # @return [Object] Returns the model itself
253
224
  def build_from_hash(attributes)
254
225
  return nil unless attributes.is_a?(Hash)
226
+
255
227
  attributes = attributes.transform_keys(&:to_sym)
256
228
  self.class.openapi_types.each_pair do |key, type|
257
229
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
258
- self.send("#{key}=", nil)
230
+ send("#{key}=", nil)
259
231
  elsif type =~ /\AArray<(.*)>/i
260
232
  # check to ensure the input is an array given that the attribute
261
233
  # is documented as an array but the input is not
262
234
  if attributes[self.class.attribute_map[key]].is_a?(Array)
263
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
235
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
236
+ _deserialize(::Regexp.last_match(1), v)
237
+ end)
264
238
  end
265
239
  elsif !attributes[self.class.attribute_map[key]].nil?
266
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
240
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
267
241
  end
268
242
  end
269
243
 
@@ -330,7 +304,7 @@ module MoneyKit
330
304
  def to_hash
331
305
  hash = {}
332
306
  self.class.attribute_map.each_pair do |attr, param|
333
- value = self.send(attr)
307
+ value = send(attr)
334
308
  if value.nil?
335
309
  is_nullable = self.class.openapi_nullable.include?(attr)
336
310
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -358,7 +332,5 @@ module MoneyKit
358
332
  value
359
333
  end
360
334
  end
361
-
362
335
  end
363
-
364
336
  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,16 +16,14 @@ module MoneyKit
18
16
  # Your own unique ID for this user. Typically this will be a UUID or primary key from your application.
19
17
  attr_accessor :id
20
18
 
21
- attr_accessor :email
22
-
23
- attr_accessor :phone
19
+ attr_accessor :email, :phone
24
20
 
25
21
  # Attribute mapping from ruby-style variable name to JSON key.
26
22
  def self.attribute_map
27
23
  {
28
- :'id' => :'id',
29
- :'email' => :'email',
30
- :'phone' => :'phone'
24
+ 'id': :id,
25
+ 'email': :email,
26
+ 'phone': :phone
31
27
  }
32
28
  end
33
29
 
@@ -39,55 +35,52 @@ module MoneyKit
39
35
  # Attribute type mapping.
40
36
  def self.openapi_types
41
37
  {
42
- :'id' => :'String',
43
- :'email' => :'Email1',
44
- :'phone' => :'Phone'
38
+ 'id': :String,
39
+ 'email': :Email1,
40
+ 'phone': :Phone
45
41
  }
46
42
  end
47
43
 
48
44
  # List of attributes with nullable: true
49
45
  def self.openapi_nullable
50
- Set.new([
51
- :'email',
52
- :'phone'
53
- ])
46
+ Set.new(%i[
47
+ email
48
+ phone
49
+ ])
54
50
  end
55
51
 
56
52
  # Initializes the object
57
53
  # @param [Hash] attributes Model attributes in the form of hash
58
54
  def initialize(attributes = {})
59
- if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::LinkSessionCustomerUser` initialize method"
55
+ unless attributes.is_a?(Hash)
56
+ raise ArgumentError,
57
+ 'The input argument (attributes) must be a hash in `MoneyKit::LinkSessionCustomerUser` initialize method'
61
58
  end
62
59
 
63
60
  # check to see if the attribute exists and convert string to symbol for hash key
64
- attributes = attributes.each_with_object({}) { |(k, v), h|
65
- if (!self.class.attribute_map.key?(k.to_sym))
66
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::LinkSessionCustomerUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ attributes = attributes.each_with_object({}) do |(k, v), h|
62
+ unless self.class.attribute_map.key?(k.to_sym)
63
+ raise ArgumentError,
64
+ "`#{k}` is not a valid attribute in `MoneyKit::LinkSessionCustomerUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
65
  end
68
- h[k.to_sym] = v
69
- }
70
66
 
71
- if attributes.key?(:'id')
72
- self.id = attributes[:'id']
67
+ h[k.to_sym] = v
73
68
  end
74
69
 
75
- if attributes.key?(:'email')
76
- self.email = attributes[:'email']
77
- end
70
+ self.id = attributes[:id] if attributes.key?(:id)
78
71
 
79
- if attributes.key?(:'phone')
80
- self.phone = attributes[:'phone']
81
- end
72
+ self.email = attributes[:email] if attributes.key?(:email)
73
+
74
+ return unless attributes.key?(:phone)
75
+
76
+ self.phone = attributes[:phone]
82
77
  end
83
78
 
84
79
  # Show invalid properties with the reasons. Usually used together with valid?
85
80
  # @return Array for valid properties with the reasons
86
81
  def list_invalid_properties
87
- invalid_properties = Array.new
88
- if @id.nil?
89
- invalid_properties.push('invalid value for "id", id cannot be nil.')
90
- end
82
+ invalid_properties = []
83
+ invalid_properties.push('invalid value for "id", id cannot be nil.') if @id.nil?
91
84
 
92
85
  if @id.to_s.length > 150
93
86
  invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 150.')
@@ -98,9 +91,7 @@ module MoneyKit
98
91
  end
99
92
 
100
93
  pattern = Regexp.new(/^[a-zA-Z0-9-_]+$/)
101
- if @id !~ pattern
102
- invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
103
- end
94
+ invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.") if @id !~ pattern
104
95
 
105
96
  invalid_properties
106
97
  end
@@ -112,46 +103,44 @@ module MoneyKit
112
103
  return false if @id.to_s.length > 150
113
104
  return false if @id.to_s.length < 4
114
105
  return false if @id !~ Regexp.new(/^[a-zA-Z0-9-_]+$/)
106
+
115
107
  true
116
108
  end
117
109
 
118
110
  # Custom attribute writer method with validation
119
111
  # @param [Object] id Value to be assigned
120
112
  def id=(id)
121
- if id.nil?
122
- fail ArgumentError, 'id cannot be nil'
123
- end
113
+ raise ArgumentError, 'id cannot be nil' if id.nil?
124
114
 
125
115
  if id.to_s.length > 150
126
- fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 150.'
116
+ raise ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 150.'
127
117
  end
128
118
 
129
119
  if id.to_s.length < 4
130
- fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 4.'
120
+ raise ArgumentError, 'invalid value for "id", the character length must be great than or equal to 4.'
131
121
  end
132
122
 
133
123
  pattern = Regexp.new(/^[a-zA-Z0-9-_]+$/)
134
- if id !~ pattern
135
- fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
136
- end
124
+ raise ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}." if id !~ pattern
137
125
 
138
126
  @id = id
139
127
  end
140
128
 
141
129
  # Checks equality by comparing each attribute.
142
130
  # @param [Object] Object to be compared
143
- def ==(o)
144
- return true if self.equal?(o)
145
- self.class == o.class &&
146
- id == o.id &&
147
- email == o.email &&
148
- phone == o.phone
131
+ def ==(other)
132
+ return true if equal?(other)
133
+
134
+ self.class == other.class &&
135
+ id == other.id &&
136
+ email == other.email &&
137
+ phone == other.phone
149
138
  end
150
139
 
151
140
  # @see the `==` method
152
141
  # @param [Object] Object to be compared
153
- def eql?(o)
154
- self == o
142
+ def eql?(other)
143
+ self == other
155
144
  end
156
145
 
157
146
  # Calculates hash code according to all attributes.
@@ -172,18 +161,21 @@ module MoneyKit
172
161
  # @return [Object] Returns the model itself
173
162
  def build_from_hash(attributes)
174
163
  return nil unless attributes.is_a?(Hash)
164
+
175
165
  attributes = attributes.transform_keys(&:to_sym)
176
166
  self.class.openapi_types.each_pair do |key, type|
177
167
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
178
- self.send("#{key}=", nil)
168
+ send("#{key}=", nil)
179
169
  elsif type =~ /\AArray<(.*)>/i
180
170
  # check to ensure the input is an array given that the attribute
181
171
  # is documented as an array but the input is not
182
172
  if attributes[self.class.attribute_map[key]].is_a?(Array)
183
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
173
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
174
+ _deserialize(::Regexp.last_match(1), v)
175
+ end)
184
176
  end
185
177
  elsif !attributes[self.class.attribute_map[key]].nil?
186
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
178
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
187
179
  end
188
180
  end
189
181
 
@@ -250,7 +242,7 @@ module MoneyKit
250
242
  def to_hash
251
243
  hash = {}
252
244
  self.class.attribute_map.each_pair do |attr, param|
253
- value = self.send(attr)
245
+ value = send(attr)
254
246
  if value.nil?
255
247
  is_nullable = self.class.openapi_nullable.include?(attr)
256
248
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -278,7 +270,5 @@ module MoneyKit
278
270
  value
279
271
  end
280
272
  end
281
-
282
273
  end
283
-
284
274
  end