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,19 +1,18 @@
1
- =begin
2
- #Plaid Compatibility Layer
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: 5.1.1
10
-
11
- =end
1
+ # #Plaid Compatibility Layer
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: 5.1.1
9
+ #
12
10
 
13
11
  require 'date'
14
12
  require 'time'
15
13
 
16
- module MoneyKit::PlaidCompatible
14
+ module MoneyKit
15
+ module PlaidCompatible
17
16
  # Metadata about the Item.
18
17
  class Item
19
18
  # The Plaid Item ID. The `item_id` is always unique; linking the same account at the same institution twice will result in two Items with different `item_id` values. Like all Plaid identifiers, the `item_id` is case-sensitive.
@@ -30,26 +29,26 @@ module MoneyKit::PlaidCompatible
30
29
  # A list of products available for the Item that have not yet been accessed. The contents of this array will be mutually exclusive with `billed_products`.
31
30
  attr_accessor :available_products
32
31
 
33
- # A list of products that have been billed for the Item. The contents of this array will be mutually exclusive with `available_products`. Note - `billed_products` is populated in all environments but only requests in Production are billed. Also note that products that are billed on a pay-per-call basis rather than a pay-per-Item basis, such as `balance`, will not appear here.
32
+ # A list of products that have been billed for the Item. The contents of this array will be mutually exclusive with `available_products`. Note - `billed_products` is populated in all environments but only requests in Production are billed. Also note that products that are billed on a pay-per-call basis rather than a pay-per-Item basis, such as `balance`, will not appear here.
34
33
  attr_accessor :billed_products
35
34
 
36
- # A list of authorized products for the Item.
35
+ # A list of authorized products for the Item.
37
36
  attr_accessor :products
38
37
 
39
- # Beta: A list of products that have gone through consent collection for the Item. Only present for those enabled in the beta.
38
+ # Beta: A list of products that have gone through consent collection for the Item. Only present for those enabled in the beta.
40
39
  attr_accessor :consented_products
41
40
 
42
41
  # Attribute mapping from ruby-style variable name to JSON key.
43
42
  def self.attribute_map
44
43
  {
45
- :'item_id' => :'item_id',
46
- :'institution_id' => :'institution_id',
47
- :'webhook' => :'webhook',
48
- :'error' => :'error',
49
- :'available_products' => :'available_products',
50
- :'billed_products' => :'billed_products',
51
- :'products' => :'products',
52
- :'consented_products' => :'consented_products'
44
+ 'item_id': :item_id,
45
+ 'institution_id': :institution_id,
46
+ 'webhook': :webhook,
47
+ 'error': :error,
48
+ 'available_products': :available_products,
49
+ 'billed_products': :billed_products,
50
+ 'products': :products,
51
+ 'consented_products': :consented_products
53
52
  }
54
53
  end
55
54
 
@@ -61,91 +60,77 @@ module MoneyKit::PlaidCompatible
61
60
  # Attribute type mapping.
62
61
  def self.openapi_types
63
62
  {
64
- :'item_id' => :'String',
65
- :'institution_id' => :'String',
66
- :'webhook' => :'String',
67
- :'error' => :'PlaidError',
68
- :'available_products' => :'Array<Products>',
69
- :'billed_products' => :'Array<Products>',
70
- :'products' => :'Array<Products>',
71
- :'consented_products' => :'Array<Products>'
63
+ 'item_id': :String,
64
+ 'institution_id': :String,
65
+ 'webhook': :String,
66
+ 'error': :PlaidError,
67
+ 'available_products': :'Array<Products>',
68
+ 'billed_products': :'Array<Products>',
69
+ 'products': :'Array<Products>',
70
+ 'consented_products': :'Array<Products>'
72
71
  }
73
72
  end
74
73
 
75
74
  # List of attributes with nullable: true
76
75
  def self.openapi_nullable
77
- Set.new([
78
- :'institution_id',
79
- :'webhook',
80
- :'error',
81
- :'products',
82
- :'consented_products'
83
- ])
76
+ Set.new(%i[
77
+ institution_id
78
+ webhook
79
+ error
80
+ products
81
+ consented_products
82
+ ])
84
83
  end
85
84
 
86
85
  # Initializes the object
87
86
  # @param [Hash] attributes Model attributes in the form of hash
88
87
  def initialize(attributes = {})
89
- if (!attributes.is_a?(Hash))
90
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::PlaidCompatible::Item` initialize method"
88
+ unless attributes.is_a?(Hash)
89
+ raise ArgumentError,
90
+ 'The input argument (attributes) must be a hash in `MoneyKit::PlaidCompatible::Item` initialize method'
91
91
  end
92
92
 
93
93
  # check to see if the attribute exists and convert string to symbol for hash key
94
- attributes = attributes.each_with_object({}) { |(k, v), h|
95
- if (!self.class.attribute_map.key?(k.to_sym))
96
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::PlaidCompatible::Item`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
94
+ attributes = attributes.each_with_object({}) do |(k, v), h|
95
+ unless self.class.attribute_map.key?(k.to_sym)
96
+ raise ArgumentError,
97
+ "`#{k}` is not a valid attribute in `MoneyKit::PlaidCompatible::Item`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
98
  end
98
- h[k.to_sym] = v
99
- }
100
99
 
101
- if attributes.key?(:'item_id')
102
- self.item_id = attributes[:'item_id']
100
+ h[k.to_sym] = v
103
101
  end
104
102
 
105
- if attributes.key?(:'institution_id')
106
- self.institution_id = attributes[:'institution_id']
107
- end
103
+ self.item_id = attributes[:item_id] if attributes.key?(:item_id)
108
104
 
109
- if attributes.key?(:'webhook')
110
- self.webhook = attributes[:'webhook']
111
- end
105
+ self.institution_id = attributes[:institution_id] if attributes.key?(:institution_id)
112
106
 
113
- if attributes.key?(:'error')
114
- self.error = attributes[:'error']
115
- end
107
+ self.webhook = attributes[:webhook] if attributes.key?(:webhook)
116
108
 
117
- if attributes.key?(:'available_products')
118
- if (value = attributes[:'available_products']).is_a?(Array)
119
- self.available_products = value
120
- end
121
- end
109
+ self.error = attributes[:error] if attributes.key?(:error)
122
110
 
123
- if attributes.key?(:'billed_products')
124
- if (value = attributes[:'billed_products']).is_a?(Array)
125
- self.billed_products = value
126
- end
111
+ if attributes.key?(:available_products) && (value = attributes[:available_products]).is_a?(Array)
112
+ self.available_products = value
127
113
  end
128
114
 
129
- if attributes.key?(:'products')
130
- if (value = attributes[:'products']).is_a?(Array)
131
- self.products = value
132
- end
115
+ if attributes.key?(:billed_products) && (value = attributes[:billed_products]).is_a?(Array)
116
+ self.billed_products = value
133
117
  end
134
118
 
135
- if attributes.key?(:'consented_products')
136
- if (value = attributes[:'consented_products']).is_a?(Array)
137
- self.consented_products = value
138
- end
119
+ if attributes.key?(:products) && (value = attributes[:products]).is_a?(Array)
120
+ self.products = value
139
121
  end
122
+
123
+ return unless attributes.key?(:consented_products)
124
+ return unless (value = attributes[:consented_products]).is_a?(Array)
125
+
126
+ self.consented_products = value
140
127
  end
141
128
 
142
129
  # Show invalid properties with the reasons. Usually used together with valid?
143
130
  # @return Array for valid properties with the reasons
144
131
  def list_invalid_properties
145
- invalid_properties = Array.new
146
- if @item_id.nil?
147
- invalid_properties.push('invalid value for "item_id", item_id cannot be nil.')
148
- end
132
+ invalid_properties = []
133
+ invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') if @item_id.nil?
149
134
 
150
135
  if @available_products.nil?
151
136
  invalid_properties.push('invalid value for "available_products", available_products cannot be nil.')
@@ -164,28 +149,30 @@ module MoneyKit::PlaidCompatible
164
149
  return false if @item_id.nil?
165
150
  return false if @available_products.nil?
166
151
  return false if @billed_products.nil?
152
+
167
153
  true
168
154
  end
169
155
 
170
156
  # Checks equality by comparing each attribute.
171
157
  # @param [Object] Object to be compared
172
- def ==(o)
173
- return true if self.equal?(o)
174
- self.class == o.class &&
175
- item_id == o.item_id &&
176
- institution_id == o.institution_id &&
177
- webhook == o.webhook &&
178
- error == o.error &&
179
- available_products == o.available_products &&
180
- billed_products == o.billed_products &&
181
- products == o.products &&
182
- consented_products == o.consented_products
158
+ def ==(other)
159
+ return true if equal?(other)
160
+
161
+ self.class == other.class &&
162
+ item_id == other.item_id &&
163
+ institution_id == other.institution_id &&
164
+ webhook == other.webhook &&
165
+ error == other.error &&
166
+ available_products == other.available_products &&
167
+ billed_products == other.billed_products &&
168
+ products == other.products &&
169
+ consented_products == other.consented_products
183
170
  end
184
171
 
185
172
  # @see the `==` method
186
173
  # @param [Object] Object to be compared
187
- def eql?(o)
188
- self == o
174
+ def eql?(other)
175
+ self == other
189
176
  end
190
177
 
191
178
  # Calculates hash code according to all attributes.
@@ -206,17 +193,20 @@ module MoneyKit::PlaidCompatible
206
193
  # @return [Object] Returns the model itself
207
194
  def build_from_hash(attributes)
208
195
  return nil unless attributes.is_a?(Hash)
196
+
209
197
  self.class.openapi_types.each_pair do |key, type|
210
198
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
211
- self.send("#{key}=", nil)
199
+ send("#{key}=", nil)
212
200
  elsif type =~ /\AArray<(.*)>/i
213
201
  # check to ensure the input is an array given that the attribute
214
202
  # is documented as an array but the input is not
215
203
  if attributes[self.class.attribute_map[key]].is_a?(Array)
216
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
204
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
205
+ _deserialize(::Regexp.last_match(1), v)
206
+ end)
217
207
  end
218
208
  elsif !attributes[self.class.attribute_map[key]].nil?
219
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
209
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
220
210
  end
221
211
  end
222
212
 
@@ -283,7 +273,7 @@ module MoneyKit::PlaidCompatible
283
273
  def to_hash
284
274
  hash = {}
285
275
  self.class.attribute_map.each_pair do |attr, param|
286
- value = self.send(attr)
276
+ value = send(attr)
287
277
  if value.nil?
288
278
  is_nullable = self.class.openapi_nullable.include?(attr)
289
279
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -311,7 +301,6 @@ module MoneyKit::PlaidCompatible
311
301
  value
312
302
  end
313
303
  end
314
-
315
304
  end
316
-
305
+ end
317
306
  end
@@ -1,19 +1,18 @@
1
- =begin
2
- #Plaid Compatibility Layer
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: 5.1.1
10
-
11
- =end
1
+ # #Plaid Compatibility Layer
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: 5.1.1
9
+ #
12
10
 
13
11
  require 'date'
14
12
  require 'time'
15
13
 
16
- module MoneyKit::PlaidCompatible
14
+ module MoneyKit
15
+ module PlaidCompatible
17
16
  # Fired when an error is encountered with an Item. The error can be resolved by having the user go through Link’s update mode.
18
17
  class ItemErrorWebhook
19
18
  # `ITEM`
@@ -25,18 +24,16 @@ module MoneyKit::PlaidCompatible
25
24
  # The `item_id` of the Item associated with this webhook, warning, or error
26
25
  attr_accessor :item_id
27
26
 
28
- attr_accessor :error
29
-
30
- attr_accessor :environment
27
+ attr_accessor :error, :environment
31
28
 
32
29
  # Attribute mapping from ruby-style variable name to JSON key.
33
30
  def self.attribute_map
34
31
  {
35
- :'webhook_type' => :'webhook_type',
36
- :'webhook_code' => :'webhook_code',
37
- :'item_id' => :'item_id',
38
- :'error' => :'error',
39
- :'environment' => :'environment'
32
+ 'webhook_type': :webhook_type,
33
+ 'webhook_code': :webhook_code,
34
+ 'item_id': :item_id,
35
+ 'error': :error,
36
+ 'environment': :environment
40
37
  }
41
38
  end
42
39
 
@@ -48,76 +45,63 @@ module MoneyKit::PlaidCompatible
48
45
  # Attribute type mapping.
49
46
  def self.openapi_types
50
47
  {
51
- :'webhook_type' => :'String',
52
- :'webhook_code' => :'String',
53
- :'item_id' => :'String',
54
- :'error' => :'PlaidError',
55
- :'environment' => :'WebhookEnvironmentValues'
48
+ 'webhook_type': :String,
49
+ 'webhook_code': :String,
50
+ 'item_id': :String,
51
+ 'error': :PlaidError,
52
+ 'environment': :WebhookEnvironmentValues
56
53
  }
57
54
  end
58
55
 
59
56
  # List of attributes with nullable: true
60
57
  def self.openapi_nullable
61
58
  Set.new([
62
- :'error',
63
- ])
59
+ :error
60
+ ])
64
61
  end
65
62
 
66
63
  # Initializes the object
67
64
  # @param [Hash] attributes Model attributes in the form of hash
68
65
  def initialize(attributes = {})
69
- if (!attributes.is_a?(Hash))
70
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::PlaidCompatible::ItemErrorWebhook` initialize method"
66
+ unless attributes.is_a?(Hash)
67
+ raise ArgumentError,
68
+ 'The input argument (attributes) must be a hash in `MoneyKit::PlaidCompatible::ItemErrorWebhook` initialize method'
71
69
  end
72
70
 
73
71
  # check to see if the attribute exists and convert string to symbol for hash key
74
- attributes = attributes.each_with_object({}) { |(k, v), h|
75
- if (!self.class.attribute_map.key?(k.to_sym))
76
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::PlaidCompatible::ItemErrorWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ attributes = attributes.each_with_object({}) do |(k, v), h|
73
+ unless self.class.attribute_map.key?(k.to_sym)
74
+ raise ArgumentError,
75
+ "`#{k}` is not a valid attribute in `MoneyKit::PlaidCompatible::ItemErrorWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
76
  end
78
- h[k.to_sym] = v
79
- }
80
77
 
81
- if attributes.key?(:'webhook_type')
82
- self.webhook_type = attributes[:'webhook_type']
78
+ h[k.to_sym] = v
83
79
  end
84
80
 
85
- if attributes.key?(:'webhook_code')
86
- self.webhook_code = attributes[:'webhook_code']
87
- end
81
+ self.webhook_type = attributes[:webhook_type] if attributes.key?(:webhook_type)
88
82
 
89
- if attributes.key?(:'item_id')
90
- self.item_id = attributes[:'item_id']
91
- end
83
+ self.webhook_code = attributes[:webhook_code] if attributes.key?(:webhook_code)
92
84
 
93
- if attributes.key?(:'error')
94
- self.error = attributes[:'error']
95
- end
85
+ self.item_id = attributes[:item_id] if attributes.key?(:item_id)
96
86
 
97
- if attributes.key?(:'environment')
98
- self.environment = attributes[:'environment']
99
- end
87
+ self.error = attributes[:error] if attributes.key?(:error)
88
+
89
+ return unless attributes.key?(:environment)
90
+
91
+ self.environment = attributes[:environment]
100
92
  end
101
93
 
102
94
  # Show invalid properties with the reasons. Usually used together with valid?
103
95
  # @return Array for valid properties with the reasons
104
96
  def list_invalid_properties
105
- invalid_properties = Array.new
106
- if @webhook_type.nil?
107
- invalid_properties.push('invalid value for "webhook_type", webhook_type cannot be nil.')
108
- end
97
+ invalid_properties = []
98
+ invalid_properties.push('invalid value for "webhook_type", webhook_type cannot be nil.') if @webhook_type.nil?
109
99
 
110
- if @webhook_code.nil?
111
- invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.')
112
- end
100
+ invalid_properties.push('invalid value for "webhook_code", webhook_code cannot be nil.') if @webhook_code.nil?
113
101
 
114
- if @item_id.nil?
115
- invalid_properties.push('invalid value for "item_id", item_id cannot be nil.')
116
- end
102
+ invalid_properties.push('invalid value for "item_id", item_id cannot be nil.') if @item_id.nil?
117
103
 
118
- if @environment.nil?
119
- invalid_properties.push('invalid value for "environment", environment cannot be nil.')
120
- end
104
+ invalid_properties.push('invalid value for "environment", environment cannot be nil.') if @environment.nil?
121
105
 
122
106
  invalid_properties
123
107
  end
@@ -129,25 +113,27 @@ module MoneyKit::PlaidCompatible
129
113
  return false if @webhook_code.nil?
130
114
  return false if @item_id.nil?
131
115
  return false if @environment.nil?
116
+
132
117
  true
133
118
  end
134
119
 
135
120
  # Checks equality by comparing each attribute.
136
121
  # @param [Object] Object to be compared
137
- def ==(o)
138
- return true if self.equal?(o)
139
- self.class == o.class &&
140
- webhook_type == o.webhook_type &&
141
- webhook_code == o.webhook_code &&
142
- item_id == o.item_id &&
143
- error == o.error &&
144
- environment == o.environment
122
+ def ==(other)
123
+ return true if equal?(other)
124
+
125
+ self.class == other.class &&
126
+ webhook_type == other.webhook_type &&
127
+ webhook_code == other.webhook_code &&
128
+ item_id == other.item_id &&
129
+ error == other.error &&
130
+ environment == other.environment
145
131
  end
146
132
 
147
133
  # @see the `==` method
148
134
  # @param [Object] Object to be compared
149
- def eql?(o)
150
- self == o
135
+ def eql?(other)
136
+ self == other
151
137
  end
152
138
 
153
139
  # Calculates hash code according to all attributes.
@@ -168,17 +154,20 @@ module MoneyKit::PlaidCompatible
168
154
  # @return [Object] Returns the model itself
169
155
  def build_from_hash(attributes)
170
156
  return nil unless attributes.is_a?(Hash)
157
+
171
158
  self.class.openapi_types.each_pair do |key, type|
172
159
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
173
- self.send("#{key}=", nil)
160
+ send("#{key}=", nil)
174
161
  elsif type =~ /\AArray<(.*)>/i
175
162
  # check to ensure the input is an array given that the attribute
176
163
  # is documented as an array but the input is not
177
164
  if attributes[self.class.attribute_map[key]].is_a?(Array)
178
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
165
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
166
+ _deserialize(::Regexp.last_match(1), v)
167
+ end)
179
168
  end
180
169
  elsif !attributes[self.class.attribute_map[key]].nil?
181
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
170
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
182
171
  end
183
172
  end
184
173
 
@@ -245,7 +234,7 @@ module MoneyKit::PlaidCompatible
245
234
  def to_hash
246
235
  hash = {}
247
236
  self.class.attribute_map.each_pair do |attr, param|
248
- value = self.send(attr)
237
+ value = send(attr)
249
238
  if value.nil?
250
239
  is_nullable = self.class.openapi_nullable.include?(attr)
251
240
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -273,7 +262,6 @@ module MoneyKit::PlaidCompatible
273
262
  value
274
263
  end
275
264
  end
276
-
277
265
  end
278
-
266
+ end
279
267
  end