moneykit 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +291 -0
  3. data/lib/moneykit/api/access_token_api.rb +224 -0
  4. data/lib/moneykit/api/account_numbers_api.rb +88 -0
  5. data/lib/moneykit/api/accounts_api.rb +301 -0
  6. data/lib/moneykit/api/identity_api.rb +91 -0
  7. data/lib/moneykit/api/institutions_api.rb +234 -0
  8. data/lib/moneykit/api/link_session_api.rb +164 -0
  9. data/lib/moneykit/api/links_api.rb +297 -0
  10. data/lib/moneykit/api/products_api.rb +99 -0
  11. data/lib/moneykit/api/transactions_api.rb +297 -0
  12. data/lib/moneykit/api/users_api.rb +262 -0
  13. data/lib/moneykit/api_client.rb +428 -0
  14. data/lib/moneykit/api_error.rb +58 -0
  15. data/lib/moneykit/configuration.rb +404 -0
  16. data/lib/moneykit/models/account.rb +301 -0
  17. data/lib/moneykit/models/account_balances.rb +279 -0
  18. data/lib/moneykit/models/account_group.rb +237 -0
  19. data/lib/moneykit/models/account_identity.rb +318 -0
  20. data/lib/moneykit/models/account_numbers.rb +241 -0
  21. data/lib/moneykit/models/account_numbers_link_product.rb +246 -0
  22. data/lib/moneykit/models/account_numbers_product_settings.rb +234 -0
  23. data/lib/moneykit/models/account_type.rb +49 -0
  24. data/lib/moneykit/models/account_with_account_numbers.rb +315 -0
  25. data/lib/moneykit/models/accounts_link_product.rb +232 -0
  26. data/lib/moneykit/models/ach_number.rb +251 -0
  27. data/lib/moneykit/models/address.rb +277 -0
  28. data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +277 -0
  29. data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +280 -0
  30. data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +277 -0
  31. data/lib/moneykit/models/app.rb +248 -0
  32. data/lib/moneykit/models/bacs_number.rb +240 -0
  33. data/lib/moneykit/models/balances.rb +287 -0
  34. data/lib/moneykit/models/basic_account_details.rb +265 -0
  35. data/lib/moneykit/models/country.rb +41 -0
  36. data/lib/moneykit/models/create_link_session_request.rb +336 -0
  37. data/lib/moneykit/models/create_link_session_response.rb +225 -0
  38. data/lib/moneykit/models/currency.rb +219 -0
  39. data/lib/moneykit/models/cursor.rb +229 -0
  40. data/lib/moneykit/models/cursor_pagination.rb +221 -0
  41. data/lib/moneykit/models/cursors.rb +229 -0
  42. data/lib/moneykit/models/customer_app.rb +241 -0
  43. data/lib/moneykit/models/customer_user.rb +292 -0
  44. data/lib/moneykit/models/eft_number.rb +255 -0
  45. data/lib/moneykit/models/email.rb +237 -0
  46. data/lib/moneykit/models/email1.rb +283 -0
  47. data/lib/moneykit/models/exchange_token_request.rb +225 -0
  48. data/lib/moneykit/models/exchange_token_response.rb +239 -0
  49. data/lib/moneykit/models/generate_access_token_response.rb +256 -0
  50. data/lib/moneykit/models/get_account_numbers_response.rb +240 -0
  51. data/lib/moneykit/models/get_account_response.rb +238 -0
  52. data/lib/moneykit/models/get_accounts_response.rb +241 -0
  53. data/lib/moneykit/models/get_institutions_response.rb +241 -0
  54. data/lib/moneykit/models/get_transactions_response.rb +303 -0
  55. data/lib/moneykit/models/get_user_accounts_response.rb +227 -0
  56. data/lib/moneykit/models/get_user_links_response.rb +227 -0
  57. data/lib/moneykit/models/get_user_transactions_response.rb +287 -0
  58. data/lib/moneykit/models/http_validation_error.rb +293 -0
  59. data/lib/moneykit/models/identity.rb +241 -0
  60. data/lib/moneykit/models/identity_link_product.rb +246 -0
  61. data/lib/moneykit/models/identity_product_settings.rb +234 -0
  62. data/lib/moneykit/models/identity_response.rb +241 -0
  63. data/lib/moneykit/models/institution.rb +345 -0
  64. data/lib/moneykit/models/institution_error_not_found_response.rb +276 -0
  65. data/lib/moneykit/models/institution_styling_response.rb +310 -0
  66. data/lib/moneykit/models/international_number.rb +240 -0
  67. data/lib/moneykit/models/introspect_client_response.rb +281 -0
  68. data/lib/moneykit/models/jwk_set.rb +227 -0
  69. data/lib/moneykit/models/link.rb +347 -0
  70. data/lib/moneykit/models/link1.rb +347 -0
  71. data/lib/moneykit/models/link2.rb +347 -0
  72. data/lib/moneykit/models/link3.rb +347 -0
  73. data/lib/moneykit/models/link4.rb +347 -0
  74. data/lib/moneykit/models/link_common.rb +339 -0
  75. data/lib/moneykit/models/link_error.rb +45 -0
  76. data/lib/moneykit/models/link_error_bad_state_response.rb +294 -0
  77. data/lib/moneykit/models/link_error_deleted_response.rb +277 -0
  78. data/lib/moneykit/models/link_error_forbidden_action_response.rb +280 -0
  79. data/lib/moneykit/models/link_error_not_found_response.rb +276 -0
  80. data/lib/moneykit/models/link_error_unauthorized_access_response.rb +276 -0
  81. data/lib/moneykit/models/link_permission_scope.rb +42 -0
  82. data/lib/moneykit/models/link_permissions.rb +234 -0
  83. data/lib/moneykit/models/link_products.rb +246 -0
  84. data/lib/moneykit/models/link_response.rb +364 -0
  85. data/lib/moneykit/models/link_session_customer_user.rb +284 -0
  86. data/lib/moneykit/models/link_session_customer_user_email.rb +275 -0
  87. data/lib/moneykit/models/link_session_customer_user_phone.rb +307 -0
  88. data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +280 -0
  89. data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +280 -0
  90. data/lib/moneykit/models/link_session_setting_overrides.rb +268 -0
  91. data/lib/moneykit/models/link_state.rb +43 -0
  92. data/lib/moneykit/models/link_state_changed_webhook.rb +392 -0
  93. data/lib/moneykit/models/location_inner.rb +230 -0
  94. data/lib/moneykit/models/money_kit_env.rb +40 -0
  95. data/lib/moneykit/models/money_link_features.rb +234 -0
  96. data/lib/moneykit/models/moneylink_features.rb +242 -0
  97. data/lib/moneykit/models/numbers.rb +286 -0
  98. data/lib/moneykit/models/owner.rb +278 -0
  99. data/lib/moneykit/models/phone.rb +315 -0
  100. data/lib/moneykit/models/phone_number.rb +273 -0
  101. data/lib/moneykit/models/phone_number_type.rb +42 -0
  102. data/lib/moneykit/models/product.rb +42 -0
  103. data/lib/moneykit/models/products.rb +254 -0
  104. data/lib/moneykit/models/products1.rb +245 -0
  105. data/lib/moneykit/models/products_settings.rb +237 -0
  106. data/lib/moneykit/models/provider.rb +43 -0
  107. data/lib/moneykit/models/refresh_products_request.rb +237 -0
  108. data/lib/moneykit/models/requested_link_permission.rb +276 -0
  109. data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +302 -0
  110. data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +300 -0
  111. data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +302 -0
  112. data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +302 -0
  113. data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +302 -0
  114. data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +302 -0
  115. data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +300 -0
  116. data/lib/moneykit/models/response401_get_institution_styling_institutions_institution_id_styling_get.rb +300 -0
  117. data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +300 -0
  118. data/lib/moneykit/models/response401_get_link_links_id_get.rb +302 -0
  119. data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +302 -0
  120. data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +302 -0
  121. data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +300 -0
  122. data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +300 -0
  123. data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +300 -0
  124. data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +300 -0
  125. data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +300 -0
  126. data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +302 -0
  127. data/lib/moneykit/models/response401_update_link_links_id_patch.rb +302 -0
  128. data/lib/moneykit/models/settings.rb +276 -0
  129. data/lib/moneykit/models/supported_version.rb +39 -0
  130. data/lib/moneykit/models/transaction.rb +369 -0
  131. data/lib/moneykit/models/transaction_diff.rb +261 -0
  132. data/lib/moneykit/models/transaction_sync_response.rb +267 -0
  133. data/lib/moneykit/models/transaction_type.rb +40 -0
  134. data/lib/moneykit/models/transaction_type_filter.rb +40 -0
  135. data/lib/moneykit/models/transactions.rb +253 -0
  136. data/lib/moneykit/models/transactions1.rb +269 -0
  137. data/lib/moneykit/models/transactions_link_product.rb +246 -0
  138. data/lib/moneykit/models/transactions_product_settings.rb +246 -0
  139. data/lib/moneykit/models/update_link_request.rb +258 -0
  140. data/lib/moneykit/models/user_accounts_out.rb +221 -0
  141. data/lib/moneykit/models/user_links_out.rb +221 -0
  142. data/lib/moneykit/models/user_transactions_paged_response.rb +221 -0
  143. data/lib/moneykit/models/validation_error.rb +254 -0
  144. data/lib/moneykit/version.rb +15 -0
  145. data/lib/moneykit.rb +180 -0
  146. data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +744 -0
  147. data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +400 -0
  148. data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +57 -0
  149. data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +287 -0
  150. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +254 -0
  151. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +289 -0
  152. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +306 -0
  153. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +110 -0
  154. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +43 -0
  155. data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +256 -0
  156. data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +223 -0
  157. data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +256 -0
  158. data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +235 -0
  159. data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +269 -0
  160. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +278 -0
  161. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +256 -0
  162. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +223 -0
  163. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +270 -0
  164. data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +40 -0
  165. data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +240 -0
  166. data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +220 -0
  167. data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +256 -0
  168. data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +223 -0
  169. data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +256 -0
  170. data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +279 -0
  171. data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +260 -0
  172. data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +239 -0
  173. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +317 -0
  174. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +279 -0
  175. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +247 -0
  176. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +249 -0
  177. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +247 -0
  178. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +255 -0
  179. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +247 -0
  180. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +225 -0
  181. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +232 -0
  182. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +232 -0
  183. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +240 -0
  184. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +232 -0
  185. data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +352 -0
  186. data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +269 -0
  187. data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +255 -0
  188. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +266 -0
  189. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +255 -0
  190. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +270 -0
  191. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +255 -0
  192. data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +278 -0
  193. data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +240 -0
  194. data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +255 -0
  195. data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +322 -0
  196. data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +51 -0
  197. data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +41 -0
  198. data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +221 -0
  199. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +378 -0
  200. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +286 -0
  201. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +267 -0
  202. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +288 -0
  203. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +247 -0
  204. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +225 -0
  205. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +278 -0
  206. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +232 -0
  207. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +306 -0
  208. data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +253 -0
  209. data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +40 -0
  210. data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +15 -0
  211. data/lib/plaid_compatible/money_kit_plaid_compatible.rb +100 -0
  212. data/moneykit-0.0.0.gem +0 -0
  213. data/moneykit.gemspec +39 -0
  214. metadata +309 -0
@@ -0,0 +1,392 @@
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
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MoneyKit
17
+ 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
37
+
38
+ class EnumAttributeValidator
39
+ attr_reader :datatype
40
+ attr_reader :allowable_values
41
+
42
+ def initialize(datatype, allowable_values)
43
+ @allowable_values = allowable_values.map do |value|
44
+ case datatype.to_s
45
+ when /Integer/i
46
+ value.to_i
47
+ when /Float/i
48
+ value.to_f
49
+ else
50
+ value
51
+ end
52
+ end
53
+ end
54
+
55
+ def valid?(value)
56
+ !value || allowable_values.include?(value)
57
+ end
58
+ end
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
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'
73
+ }
74
+ end
75
+
76
+ # Returns all the JSON keys this model knows about
77
+ def self.acceptable_attributes
78
+ attribute_map.values
79
+ end
80
+
81
+ # Attribute type mapping.
82
+ def self.openapi_types
83
+ {
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'
94
+ }
95
+ end
96
+
97
+ # List of attributes with nullable: true
98
+ def self.openapi_nullable
99
+ Set.new([
100
+ :'error_message'
101
+ ])
102
+ end
103
+
104
+ # Initializes the object
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ 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"
109
+ end
110
+
111
+ # 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
115
+ end
116
+ h[k.to_sym] = v
117
+ }
118
+
119
+ if attributes.key?(:'webhook_event')
120
+ self.webhook_event = attributes[:'webhook_event']
121
+ else
122
+ self.webhook_event = 'link.state_changed'
123
+ end
124
+
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
130
+
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
136
+
137
+ if attributes.key?(:'webhook_idempotency_key')
138
+ self.webhook_idempotency_key = attributes[:'webhook_idempotency_key']
139
+ end
140
+
141
+ if attributes.key?(:'webhook_timestamp')
142
+ self.webhook_timestamp = attributes[:'webhook_timestamp']
143
+ end
144
+
145
+ if attributes.key?(:'link_id')
146
+ self.link_id = attributes[:'link_id']
147
+ end
148
+
149
+ if attributes.key?(:'link_tags')
150
+ if (value = attributes[:'link_tags']).is_a?(Array)
151
+ self.link_tags = value
152
+ end
153
+ end
154
+
155
+ if attributes.key?(:'state')
156
+ self.state = attributes[:'state']
157
+ end
158
+
159
+ if attributes.key?(:'error')
160
+ self.error = attributes[:'error']
161
+ end
162
+
163
+ if attributes.key?(:'error_message')
164
+ self.error_message = attributes[:'error_message']
165
+ end
166
+ end
167
+
168
+ # Show invalid properties with the reasons. Usually used together with valid?
169
+ # @return Array for valid properties with the reasons
170
+ def list_invalid_properties
171
+ invalid_properties = Array.new
172
+ if @webhook_idempotency_key.nil?
173
+ invalid_properties.push('invalid value for "webhook_idempotency_key", webhook_idempotency_key cannot be nil.')
174
+ end
175
+
176
+ if @webhook_timestamp.nil?
177
+ invalid_properties.push('invalid value for "webhook_timestamp", webhook_timestamp cannot be nil.')
178
+ end
179
+
180
+ if @link_id.nil?
181
+ invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
182
+ end
183
+
184
+ if @link_tags.nil?
185
+ invalid_properties.push('invalid value for "link_tags", link_tags cannot be nil.')
186
+ end
187
+
188
+ if @state.nil?
189
+ invalid_properties.push('invalid value for "state", state cannot be nil.')
190
+ end
191
+
192
+ invalid_properties
193
+ end
194
+
195
+ # Check to see if the all the properties in the model are valid
196
+ # @return true if the model is valid
197
+ def valid?
198
+ webhook_event_validator = EnumAttributeValidator.new('String', ["link.state_changed"])
199
+ return false unless webhook_event_validator.valid?(@webhook_event)
200
+ webhook_major_version_validator = EnumAttributeValidator.new('Integer', [1])
201
+ return false unless webhook_major_version_validator.valid?(@webhook_major_version)
202
+ webhook_minor_version_validator = EnumAttributeValidator.new('Integer', [0])
203
+ return false unless webhook_minor_version_validator.valid?(@webhook_minor_version)
204
+ return false if @webhook_idempotency_key.nil?
205
+ return false if @webhook_timestamp.nil?
206
+ return false if @link_id.nil?
207
+ return false if @link_tags.nil?
208
+ return false if @state.nil?
209
+ true
210
+ end
211
+
212
+ # Custom attribute writer method checking allowed values (enum).
213
+ # @param [Object] webhook_event Object to be assigned
214
+ def webhook_event=(webhook_event)
215
+ validator = EnumAttributeValidator.new('String', ["link.state_changed"])
216
+ unless validator.valid?(webhook_event)
217
+ fail ArgumentError, "invalid value for \"webhook_event\", must be one of #{validator.allowable_values}."
218
+ end
219
+ @webhook_event = webhook_event
220
+ end
221
+
222
+ # Custom attribute writer method checking allowed values (enum).
223
+ # @param [Object] webhook_major_version Object to be assigned
224
+ def webhook_major_version=(webhook_major_version)
225
+ validator = EnumAttributeValidator.new('Integer', [1])
226
+ unless validator.valid?(webhook_major_version)
227
+ fail ArgumentError, "invalid value for \"webhook_major_version\", must be one of #{validator.allowable_values}."
228
+ end
229
+ @webhook_major_version = webhook_major_version
230
+ end
231
+
232
+ # Custom attribute writer method checking allowed values (enum).
233
+ # @param [Object] webhook_minor_version Object to be assigned
234
+ def webhook_minor_version=(webhook_minor_version)
235
+ validator = EnumAttributeValidator.new('Integer', [0])
236
+ unless validator.valid?(webhook_minor_version)
237
+ fail ArgumentError, "invalid value for \"webhook_minor_version\", must be one of #{validator.allowable_values}."
238
+ end
239
+ @webhook_minor_version = webhook_minor_version
240
+ end
241
+
242
+ # Checks equality by comparing each attribute.
243
+ # @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
257
+ end
258
+
259
+ # @see the `==` method
260
+ # @param [Object] Object to be compared
261
+ def eql?(o)
262
+ self == o
263
+ end
264
+
265
+ # Calculates hash code according to all attributes.
266
+ # @return [Integer] Hash code
267
+ 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
269
+ end
270
+
271
+ # Builds the object from hash
272
+ # @param [Hash] attributes Model attributes in the form of hash
273
+ # @return [Object] Returns the model itself
274
+ def self.build_from_hash(attributes)
275
+ new.build_from_hash(attributes)
276
+ end
277
+
278
+ # Builds the object from hash
279
+ # @param [Hash] attributes Model attributes in the form of hash
280
+ # @return [Object] Returns the model itself
281
+ def build_from_hash(attributes)
282
+ return nil unless attributes.is_a?(Hash)
283
+ attributes = attributes.transform_keys(&:to_sym)
284
+ self.class.openapi_types.each_pair do |key, type|
285
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
286
+ self.send("#{key}=", nil)
287
+ elsif type =~ /\AArray<(.*)>/i
288
+ # check to ensure the input is an array given that the attribute
289
+ # is documented as an array but the input is not
290
+ 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) })
292
+ end
293
+ elsif !attributes[self.class.attribute_map[key]].nil?
294
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
295
+ end
296
+ end
297
+
298
+ self
299
+ end
300
+
301
+ # Deserializes the data based on type
302
+ # @param string type Data type
303
+ # @param string value Value to be deserialized
304
+ # @return [Object] Deserialized data
305
+ def _deserialize(type, value)
306
+ case type.to_sym
307
+ when :Time
308
+ Time.parse(value)
309
+ when :Date
310
+ Date.parse(value)
311
+ when :String
312
+ value.to_s
313
+ when :Integer
314
+ value.to_i
315
+ when :Float
316
+ value.to_f
317
+ when :Boolean
318
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
319
+ true
320
+ else
321
+ false
322
+ end
323
+ when :Object
324
+ # generic object (usually a Hash), return directly
325
+ value
326
+ when /\AArray<(?<inner_type>.+)>\z/
327
+ inner_type = Regexp.last_match[:inner_type]
328
+ value.map { |v| _deserialize(inner_type, v) }
329
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
330
+ k_type = Regexp.last_match[:k_type]
331
+ v_type = Regexp.last_match[:v_type]
332
+ {}.tap do |hash|
333
+ value.each do |k, v|
334
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
335
+ end
336
+ end
337
+ else # model
338
+ # models (e.g. Pet) or oneOf
339
+ klass = MoneyKit.const_get(type)
340
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
341
+ end
342
+ end
343
+
344
+ # Returns the string representation of the object
345
+ # @return [String] String presentation of the object
346
+ def to_s
347
+ to_hash.to_s
348
+ end
349
+
350
+ # to_body is an alias to to_hash (backward compatibility)
351
+ # @return [Hash] Returns the object in the form of hash
352
+ def to_body
353
+ to_hash
354
+ end
355
+
356
+ # Returns the object in the form of hash
357
+ # @return [Hash] Returns the object in the form of hash
358
+ def to_hash
359
+ hash = {}
360
+ self.class.attribute_map.each_pair do |attr, param|
361
+ value = self.send(attr)
362
+ if value.nil?
363
+ is_nullable = self.class.openapi_nullable.include?(attr)
364
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
365
+ end
366
+
367
+ hash[param] = _to_hash(value)
368
+ end
369
+ hash
370
+ end
371
+
372
+ # Outputs non-array value in the form of hash
373
+ # For object, use to_hash. Otherwise, just return the value
374
+ # @param [Object] value Any valid value
375
+ # @return [Hash] Returns the value in the form of hash
376
+ def _to_hash(value)
377
+ if value.is_a?(Array)
378
+ value.compact.map { |v| _to_hash(v) }
379
+ elsif value.is_a?(Hash)
380
+ {}.tap do |hash|
381
+ value.each { |k, v| hash[k] = _to_hash(v) }
382
+ end
383
+ elsif value.respond_to? :to_hash
384
+ value.to_hash
385
+ else
386
+ value
387
+ end
388
+ end
389
+
390
+ end
391
+
392
+ end
@@ -0,0 +1,230 @@
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
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MoneyKit
17
+ class LocationInner
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ }
22
+ end
23
+
24
+ # Returns all the JSON keys this model knows about
25
+ def self.acceptable_attributes
26
+ attribute_map.values
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ }
33
+ end
34
+
35
+ # List of attributes with nullable: true
36
+ def self.openapi_nullable
37
+ Set.new([
38
+ ])
39
+ end
40
+
41
+ # List of class defined in anyOf (OpenAPI v3)
42
+ def self.openapi_any_of
43
+ [
44
+ :'Integer',
45
+ :'String'
46
+ ]
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ 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"
54
+ end
55
+
56
+ # 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
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ _any_of_found = false
76
+ 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
81
+ end
82
+
83
+ if !_any_of_found
84
+ return false
85
+ end
86
+
87
+ true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ self.class.openapi_types.each_pair do |key, type|
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ 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) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :Time
146
+ Time.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ # models (e.g. Pet) or oneOf
177
+ klass = MoneyKit.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end
@@ -0,0 +1,40 @@
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
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MoneyKit
17
+ class MoneyKitEnv
18
+ PRODUCTION = "production".freeze
19
+ SANDBOX = "sandbox".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [PRODUCTION, SANDBOX].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ return value if MoneyKitEnv.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #MoneyKitEnv"
38
+ end
39
+ end
40
+ end