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,43 +1,23 @@
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 LinkStateChangedWebhook
18
- attr_accessor :webhook_event
19
-
20
- attr_accessor :webhook_major_version
21
-
22
- attr_accessor :webhook_minor_version
23
-
24
- attr_accessor :webhook_idempotency_key
25
-
26
- attr_accessor :webhook_timestamp
27
-
28
- attr_accessor :link_id
29
-
30
- attr_accessor :link_tags
31
-
32
- attr_accessor :state
33
-
34
- attr_accessor :error
35
-
36
- attr_accessor :error_message
16
+ attr_accessor :webhook_event, :webhook_major_version, :webhook_minor_version, :webhook_idempotency_key,
17
+ :webhook_timestamp, :link_id, :link_tags, :state, :error, :error_message
37
18
 
38
19
  class EnumAttributeValidator
39
- attr_reader :datatype
40
- attr_reader :allowable_values
20
+ attr_reader :datatype, :allowable_values
41
21
 
42
22
  def initialize(datatype, allowable_values)
43
23
  @allowable_values = allowable_values.map do |value|
@@ -60,16 +40,16 @@ module MoneyKit
60
40
  # Attribute mapping from ruby-style variable name to JSON key.
61
41
  def self.attribute_map
62
42
  {
63
- :'webhook_event' => :'webhook_event',
64
- :'webhook_major_version' => :'webhook_major_version',
65
- :'webhook_minor_version' => :'webhook_minor_version',
66
- :'webhook_idempotency_key' => :'webhook_idempotency_key',
67
- :'webhook_timestamp' => :'webhook_timestamp',
68
- :'link_id' => :'link_id',
69
- :'link_tags' => :'link_tags',
70
- :'state' => :'state',
71
- :'error' => :'error',
72
- :'error_message' => :'error_message'
43
+ 'webhook_event': :webhook_event,
44
+ 'webhook_major_version': :webhook_major_version,
45
+ 'webhook_minor_version': :webhook_minor_version,
46
+ 'webhook_idempotency_key': :webhook_idempotency_key,
47
+ 'webhook_timestamp': :webhook_timestamp,
48
+ 'link_id': :link_id,
49
+ 'link_tags': :link_tags,
50
+ 'state': :state,
51
+ 'error': :error,
52
+ 'error_message': :error_message
73
53
  }
74
54
  end
75
55
 
@@ -81,94 +61,85 @@ module MoneyKit
81
61
  # Attribute type mapping.
82
62
  def self.openapi_types
83
63
  {
84
- :'webhook_event' => :'String',
85
- :'webhook_major_version' => :'Integer',
86
- :'webhook_minor_version' => :'Integer',
87
- :'webhook_idempotency_key' => :'String',
88
- :'webhook_timestamp' => :'Time',
89
- :'link_id' => :'String',
90
- :'link_tags' => :'Array<String>',
91
- :'state' => :'LinkState',
92
- :'error' => :'LinkError',
93
- :'error_message' => :'String'
64
+ 'webhook_event': :String,
65
+ 'webhook_major_version': :Integer,
66
+ 'webhook_minor_version': :Integer,
67
+ 'webhook_idempotency_key': :String,
68
+ 'webhook_timestamp': :Time,
69
+ 'link_id': :String,
70
+ 'link_tags': :'Array<String>',
71
+ 'state': :LinkState,
72
+ 'error': :LinkError,
73
+ 'error_message': :String
94
74
  }
95
75
  end
96
76
 
97
77
  # List of attributes with nullable: true
98
78
  def self.openapi_nullable
99
79
  Set.new([
100
- :'error_message'
101
- ])
80
+ :error_message
81
+ ])
102
82
  end
103
83
 
104
84
  # Initializes the object
105
85
  # @param [Hash] attributes Model attributes in the form of hash
106
86
  def initialize(attributes = {})
107
- if (!attributes.is_a?(Hash))
108
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::LinkStateChangedWebhook` initialize method"
87
+ unless attributes.is_a?(Hash)
88
+ raise ArgumentError,
89
+ 'The input argument (attributes) must be a hash in `MoneyKit::LinkStateChangedWebhook` initialize method'
109
90
  end
110
91
 
111
92
  # check to see if the attribute exists and convert string to symbol for hash key
112
- attributes = attributes.each_with_object({}) { |(k, v), h|
113
- if (!self.class.attribute_map.key?(k.to_sym))
114
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::LinkStateChangedWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
93
+ attributes = attributes.each_with_object({}) do |(k, v), h|
94
+ unless self.class.attribute_map.key?(k.to_sym)
95
+ raise ArgumentError,
96
+ "`#{k}` is not a valid attribute in `MoneyKit::LinkStateChangedWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
115
97
  end
116
- h[k.to_sym] = v
117
- }
118
98
 
119
- if attributes.key?(:'webhook_event')
120
- self.webhook_event = attributes[:'webhook_event']
121
- else
122
- self.webhook_event = 'link.state_changed'
99
+ h[k.to_sym] = v
123
100
  end
124
101
 
125
- if attributes.key?(:'webhook_major_version')
126
- self.webhook_major_version = attributes[:'webhook_major_version']
127
- else
128
- self.webhook_major_version = WEBHOOK_MAJOR_VERSION::N1
129
- end
102
+ self.webhook_event = if attributes.key?(:webhook_event)
103
+ attributes[:webhook_event]
104
+ else
105
+ 'link.state_changed'
106
+ end
130
107
 
131
- if attributes.key?(:'webhook_minor_version')
132
- self.webhook_minor_version = attributes[:'webhook_minor_version']
133
- else
134
- self.webhook_minor_version = WEBHOOK_MINOR_VERSION::N0
135
- end
108
+ self.webhook_major_version = if attributes.key?(:webhook_major_version)
109
+ attributes[:webhook_major_version]
110
+ else
111
+ WEBHOOK_MAJOR_VERSION::N1
112
+ end
136
113
 
137
- if attributes.key?(:'webhook_idempotency_key')
138
- self.webhook_idempotency_key = attributes[:'webhook_idempotency_key']
139
- end
114
+ self.webhook_minor_version = if attributes.key?(:webhook_minor_version)
115
+ attributes[:webhook_minor_version]
116
+ else
117
+ WEBHOOK_MINOR_VERSION::N0
118
+ end
140
119
 
141
- if attributes.key?(:'webhook_timestamp')
142
- self.webhook_timestamp = attributes[:'webhook_timestamp']
143
- end
120
+ self.webhook_idempotency_key = attributes[:webhook_idempotency_key] if attributes.key?(:webhook_idempotency_key)
144
121
 
145
- if attributes.key?(:'link_id')
146
- self.link_id = attributes[:'link_id']
147
- end
122
+ self.webhook_timestamp = attributes[:webhook_timestamp] if attributes.key?(:webhook_timestamp)
148
123
 
149
- if attributes.key?(:'link_tags')
150
- if (value = attributes[:'link_tags']).is_a?(Array)
151
- self.link_tags = value
152
- end
153
- end
124
+ self.link_id = attributes[:link_id] if attributes.key?(:link_id)
154
125
 
155
- if attributes.key?(:'state')
156
- self.state = attributes[:'state']
126
+ if attributes.key?(:link_tags) && (value = attributes[:link_tags]).is_a?(Array)
127
+ self.link_tags = value
157
128
  end
158
129
 
159
- if attributes.key?(:'error')
160
- self.error = attributes[:'error']
161
- end
130
+ self.state = attributes[:state] if attributes.key?(:state)
162
131
 
163
- if attributes.key?(:'error_message')
164
- self.error_message = attributes[:'error_message']
165
- end
132
+ self.error = attributes[:error] if attributes.key?(:error)
133
+
134
+ return unless attributes.key?(:error_message)
135
+
136
+ self.error_message = attributes[:error_message]
166
137
  end
167
138
 
168
139
  # Show invalid properties with the reasons. Usually used together with valid?
169
140
  # @return Array for valid properties with the reasons
170
141
  def list_invalid_properties
171
- invalid_properties = Array.new
142
+ invalid_properties = []
172
143
  if @webhook_idempotency_key.nil?
173
144
  invalid_properties.push('invalid value for "webhook_idempotency_key", webhook_idempotency_key cannot be nil.')
174
145
  end
@@ -177,17 +148,11 @@ module MoneyKit
177
148
  invalid_properties.push('invalid value for "webhook_timestamp", webhook_timestamp cannot be nil.')
178
149
  end
179
150
 
180
- if @link_id.nil?
181
- invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
182
- end
151
+ invalid_properties.push('invalid value for "link_id", link_id cannot be nil.') if @link_id.nil?
183
152
 
184
- if @link_tags.nil?
185
- invalid_properties.push('invalid value for "link_tags", link_tags cannot be nil.')
186
- end
153
+ invalid_properties.push('invalid value for "link_tags", link_tags cannot be nil.') if @link_tags.nil?
187
154
 
188
- if @state.nil?
189
- invalid_properties.push('invalid value for "state", state cannot be nil.')
190
- end
155
+ invalid_properties.push('invalid value for "state", state cannot be nil.') if @state.nil?
191
156
 
192
157
  invalid_properties
193
158
  end
@@ -195,10 +160,12 @@ module MoneyKit
195
160
  # Check to see if the all the properties in the model are valid
196
161
  # @return true if the model is valid
197
162
  def valid?
198
- webhook_event_validator = EnumAttributeValidator.new('String', ["link.state_changed"])
163
+ webhook_event_validator = EnumAttributeValidator.new('String', ['link.state_changed'])
199
164
  return false unless webhook_event_validator.valid?(@webhook_event)
165
+
200
166
  webhook_major_version_validator = EnumAttributeValidator.new('Integer', [1])
201
167
  return false unless webhook_major_version_validator.valid?(@webhook_major_version)
168
+
202
169
  webhook_minor_version_validator = EnumAttributeValidator.new('Integer', [0])
203
170
  return false unless webhook_minor_version_validator.valid?(@webhook_minor_version)
204
171
  return false if @webhook_idempotency_key.nil?
@@ -206,16 +173,18 @@ module MoneyKit
206
173
  return false if @link_id.nil?
207
174
  return false if @link_tags.nil?
208
175
  return false if @state.nil?
176
+
209
177
  true
210
178
  end
211
179
 
212
180
  # Custom attribute writer method checking allowed values (enum).
213
181
  # @param [Object] webhook_event Object to be assigned
214
182
  def webhook_event=(webhook_event)
215
- validator = EnumAttributeValidator.new('String', ["link.state_changed"])
183
+ validator = EnumAttributeValidator.new('String', ['link.state_changed'])
216
184
  unless validator.valid?(webhook_event)
217
- fail ArgumentError, "invalid value for \"webhook_event\", must be one of #{validator.allowable_values}."
185
+ raise ArgumentError, "invalid value for \"webhook_event\", must be one of #{validator.allowable_values}."
218
186
  end
187
+
219
188
  @webhook_event = webhook_event
220
189
  end
221
190
 
@@ -224,8 +193,10 @@ module MoneyKit
224
193
  def webhook_major_version=(webhook_major_version)
225
194
  validator = EnumAttributeValidator.new('Integer', [1])
226
195
  unless validator.valid?(webhook_major_version)
227
- fail ArgumentError, "invalid value for \"webhook_major_version\", must be one of #{validator.allowable_values}."
196
+ raise ArgumentError,
197
+ "invalid value for \"webhook_major_version\", must be one of #{validator.allowable_values}."
228
198
  end
199
+
229
200
  @webhook_major_version = webhook_major_version
230
201
  end
231
202
 
@@ -234,38 +205,42 @@ module MoneyKit
234
205
  def webhook_minor_version=(webhook_minor_version)
235
206
  validator = EnumAttributeValidator.new('Integer', [0])
236
207
  unless validator.valid?(webhook_minor_version)
237
- fail ArgumentError, "invalid value for \"webhook_minor_version\", must be one of #{validator.allowable_values}."
208
+ raise ArgumentError,
209
+ "invalid value for \"webhook_minor_version\", must be one of #{validator.allowable_values}."
238
210
  end
211
+
239
212
  @webhook_minor_version = webhook_minor_version
240
213
  end
241
214
 
242
215
  # Checks equality by comparing each attribute.
243
216
  # @param [Object] Object to be compared
244
- def ==(o)
245
- return true if self.equal?(o)
246
- self.class == o.class &&
247
- webhook_event == o.webhook_event &&
248
- webhook_major_version == o.webhook_major_version &&
249
- webhook_minor_version == o.webhook_minor_version &&
250
- webhook_idempotency_key == o.webhook_idempotency_key &&
251
- webhook_timestamp == o.webhook_timestamp &&
252
- link_id == o.link_id &&
253
- link_tags == o.link_tags &&
254
- state == o.state &&
255
- error == o.error &&
256
- error_message == o.error_message
217
+ def ==(other)
218
+ return true if equal?(other)
219
+
220
+ self.class == other.class &&
221
+ webhook_event == other.webhook_event &&
222
+ webhook_major_version == other.webhook_major_version &&
223
+ webhook_minor_version == other.webhook_minor_version &&
224
+ webhook_idempotency_key == other.webhook_idempotency_key &&
225
+ webhook_timestamp == other.webhook_timestamp &&
226
+ link_id == other.link_id &&
227
+ link_tags == other.link_tags &&
228
+ state == other.state &&
229
+ error == other.error &&
230
+ error_message == other.error_message
257
231
  end
258
232
 
259
233
  # @see the `==` method
260
234
  # @param [Object] Object to be compared
261
- def eql?(o)
262
- self == o
235
+ def eql?(other)
236
+ self == other
263
237
  end
264
238
 
265
239
  # Calculates hash code according to all attributes.
266
240
  # @return [Integer] Hash code
267
241
  def hash
268
- [webhook_event, webhook_major_version, webhook_minor_version, webhook_idempotency_key, webhook_timestamp, link_id, link_tags, state, error, error_message].hash
242
+ [webhook_event, webhook_major_version, webhook_minor_version, webhook_idempotency_key, webhook_timestamp,
243
+ link_id, link_tags, state, error, error_message].hash
269
244
  end
270
245
 
271
246
  # Builds the object from hash
@@ -280,18 +255,21 @@ module MoneyKit
280
255
  # @return [Object] Returns the model itself
281
256
  def build_from_hash(attributes)
282
257
  return nil unless attributes.is_a?(Hash)
258
+
283
259
  attributes = attributes.transform_keys(&:to_sym)
284
260
  self.class.openapi_types.each_pair do |key, type|
285
261
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
286
- self.send("#{key}=", nil)
262
+ send("#{key}=", nil)
287
263
  elsif type =~ /\AArray<(.*)>/i
288
264
  # check to ensure the input is an array given that the attribute
289
265
  # is documented as an array but the input is not
290
266
  if attributes[self.class.attribute_map[key]].is_a?(Array)
291
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
267
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
268
+ _deserialize(::Regexp.last_match(1), v)
269
+ end)
292
270
  end
293
271
  elsif !attributes[self.class.attribute_map[key]].nil?
294
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
272
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
295
273
  end
296
274
  end
297
275
 
@@ -358,7 +336,7 @@ module MoneyKit
358
336
  def to_hash
359
337
  hash = {}
360
338
  self.class.attribute_map.each_pair do |attr, param|
361
- value = self.send(attr)
339
+ value = send(attr)
362
340
  if value.nil?
363
341
  is_nullable = self.class.openapi_nullable.include?(attr)
364
342
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -386,7 +364,5 @@ module MoneyKit
386
364
  value
387
365
  end
388
366
  end
389
-
390
367
  end
391
-
392
368
  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'
@@ -17,8 +15,7 @@ module MoneyKit
17
15
  class LocationInner
18
16
  # Attribute mapping from ruby-style variable name to JSON key.
19
17
  def self.attribute_map
20
- {
21
- }
18
+ {}
22
19
  end
23
20
 
24
21
  # Returns all the JSON keys this model knows about
@@ -28,45 +25,45 @@ module MoneyKit
28
25
 
29
26
  # Attribute type mapping.
30
27
  def self.openapi_types
31
- {
32
- }
28
+ {}
33
29
  end
34
30
 
35
31
  # List of attributes with nullable: true
36
32
  def self.openapi_nullable
37
- Set.new([
38
- ])
33
+ Set.new([])
39
34
  end
40
35
 
41
36
  # List of class defined in anyOf (OpenAPI v3)
42
37
  def self.openapi_any_of
43
- [
44
- :'Integer',
45
- :'String'
38
+ %i[
39
+ Integer
40
+ String
46
41
  ]
47
42
  end
48
43
 
49
44
  # Initializes the object
50
45
  # @param [Hash] attributes Model attributes in the form of hash
51
46
  def initialize(attributes = {})
52
- if (!attributes.is_a?(Hash))
53
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::LocationInner` initialize method"
47
+ unless attributes.is_a?(Hash)
48
+ raise ArgumentError,
49
+ 'The input argument (attributes) must be a hash in `MoneyKit::LocationInner` initialize method'
54
50
  end
55
51
 
56
52
  # check to see if the attribute exists and convert string to symbol for hash key
57
- attributes = attributes.each_with_object({}) { |(k, v), h|
58
- if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::LocationInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
53
+ attributes = attributes.each_with_object({}) do |(k, v), h|
54
+ unless self.class.attribute_map.key?(k.to_sym)
55
+ raise ArgumentError,
56
+ "`#{k}` is not a valid attribute in `MoneyKit::LocationInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
57
  end
58
+
61
59
  h[k.to_sym] = v
62
- }
60
+ end
63
61
  end
64
62
 
65
63
  # Show invalid properties with the reasons. Usually used together with valid?
66
64
  # @return Array for valid properties with the reasons
67
65
  def list_invalid_properties
68
- invalid_properties = Array.new
69
- invalid_properties
66
+ []
70
67
  end
71
68
 
72
69
  # Check to see if the all the properties in the model are valid
@@ -74,30 +71,27 @@ module MoneyKit
74
71
  def valid?
75
72
  _any_of_found = false
76
73
  self.class.openapi_any_of.each do |_class|
77
- _any_of = MoneyKit.const_get(_class).build_from_hash(self.to_hash)
78
- if _any_of.valid?
79
- _any_of_found = true
80
- end
74
+ _any_of = MoneyKit.const_get(_class).build_from_hash(to_hash)
75
+ _any_of_found = true if _any_of.valid?
81
76
  end
82
77
 
83
- if !_any_of_found
84
- return false
85
- end
78
+ return false unless _any_of_found
86
79
 
87
80
  true
88
81
  end
89
82
 
90
83
  # Checks equality by comparing each attribute.
91
84
  # @param [Object] Object to be compared
92
- def ==(o)
93
- return true if self.equal?(o)
94
- self.class == o.class
85
+ def ==(other)
86
+ return true if equal?(other)
87
+
88
+ self.class == other.class
95
89
  end
96
90
 
97
91
  # @see the `==` method
98
92
  # @param [Object] Object to be compared
99
- def eql?(o)
100
- self == o
93
+ def eql?(other)
94
+ self == other
101
95
  end
102
96
 
103
97
  # Calculates hash code according to all attributes.
@@ -118,18 +112,21 @@ module MoneyKit
118
112
  # @return [Object] Returns the model itself
119
113
  def build_from_hash(attributes)
120
114
  return nil unless attributes.is_a?(Hash)
115
+
121
116
  attributes = attributes.transform_keys(&:to_sym)
122
117
  self.class.openapi_types.each_pair do |key, type|
123
118
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
- self.send("#{key}=", nil)
119
+ send("#{key}=", nil)
125
120
  elsif type =~ /\AArray<(.*)>/i
126
121
  # check to ensure the input is an array given that the attribute
127
122
  # is documented as an array but the input is not
128
123
  if attributes[self.class.attribute_map[key]].is_a?(Array)
129
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
125
+ _deserialize(::Regexp.last_match(1), v)
126
+ end)
130
127
  end
131
128
  elsif !attributes[self.class.attribute_map[key]].nil?
132
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
130
  end
134
131
  end
135
132
 
@@ -196,7 +193,7 @@ module MoneyKit
196
193
  def to_hash
197
194
  hash = {}
198
195
  self.class.attribute_map.each_pair do |attr, param|
199
- value = self.send(attr)
196
+ value = send(attr)
200
197
  if value.nil?
201
198
  is_nullable = self.class.openapi_nullable.include?(attr)
202
199
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -224,7 +221,5 @@ module MoneyKit
224
221
  value
225
222
  end
226
223
  end
227
-
228
224
  end
229
-
230
225
  end
@@ -1,22 +1,20 @@
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 MoneyKitEnv
18
- PRODUCTION = "production".freeze
19
- SANDBOX = "sandbox".freeze
16
+ PRODUCTION = 'production'.freeze
17
+ SANDBOX = 'sandbox'.freeze
20
18
 
21
19
  def self.all_vars
22
20
  @all_vars ||= [PRODUCTION, SANDBOX].freeze
@@ -34,6 +32,7 @@ module MoneyKit
34
32
  # @return [String] The enum value
35
33
  def build_from_hash(value)
36
34
  return value if MoneyKitEnv.all_vars.include?(value)
35
+
37
36
  raise "Invalid ENUM value #{value} for class #MoneyKitEnv"
38
37
  end
39
38
  end