moneykit 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/lib/moneykit/api/access_token_api.rb +53 -55
  3. data/lib/moneykit/api/account_numbers_api.rb +24 -24
  4. data/lib/moneykit/api/accounts_api.rb +86 -80
  5. data/lib/moneykit/api/identity_api.rb +29 -28
  6. data/lib/moneykit/api/institutions_api.rb +50 -48
  7. data/lib/moneykit/api/link_session_api.rb +47 -50
  8. data/lib/moneykit/api/links_api.rb +74 -81
  9. data/lib/moneykit/api/products_api.rb +31 -33
  10. data/lib/moneykit/api/transactions_api.rb +112 -87
  11. data/lib/moneykit/api/users_api.rb +96 -79
  12. data/lib/moneykit/api_client.rb +64 -71
  13. data/lib/moneykit/api_error.rb +14 -16
  14. data/lib/moneykit/configuration.rb +42 -45
  15. data/lib/moneykit/models/account.rb +62 -78
  16. data/lib/moneykit/models/account_balances.rb +58 -63
  17. data/lib/moneykit/models/account_group.rb +47 -47
  18. data/lib/moneykit/models/account_identity.rb +69 -89
  19. data/lib/moneykit/models/account_numbers.rb +50 -49
  20. data/lib/moneykit/models/account_numbers_link_product.rb +52 -54
  21. data/lib/moneykit/models/account_numbers_product_settings.rb +49 -48
  22. data/lib/moneykit/models/account_type.rb +23 -23
  23. data/lib/moneykit/models/account_with_account_numbers.rb +68 -89
  24. data/lib/moneykit/models/accounts_link_product.rb +46 -46
  25. data/lib/moneykit/models/ach_number.rb +48 -49
  26. data/lib/moneykit/models/address.rb +66 -75
  27. data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +63 -62
  28. data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +60 -62
  29. data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +63 -62
  30. data/lib/moneykit/models/app.rb +46 -50
  31. data/lib/moneykit/models/bacs_number.rb +45 -46
  32. data/lib/moneykit/models/balances.rb +58 -64
  33. data/lib/moneykit/models/basic_account_details.rb +55 -61
  34. data/lib/moneykit/models/country.rb +13 -14
  35. data/lib/moneykit/models/create_link_session_request.rb +83 -96
  36. data/lib/moneykit/models/create_link_session_response.rb +40 -37
  37. data/lib/moneykit/models/currency.rb +193 -193
  38. data/lib/moneykit/models/cursor.rb +40 -39
  39. data/lib/moneykit/models/cursor_pagination.rb +40 -38
  40. data/lib/moneykit/models/cursors.rb +40 -39
  41. data/lib/moneykit/models/customer_app.rb +46 -49
  42. data/lib/moneykit/models/customer_user.rb +59 -69
  43. data/lib/moneykit/models/eft_number.rb +48 -52
  44. data/lib/moneykit/models/email.rb +46 -48
  45. data/lib/moneykit/models/email1.rb +50 -53
  46. data/lib/moneykit/models/exchange_token_request.rb +40 -37
  47. data/lib/moneykit/models/exchange_token_response.rb +46 -49
  48. data/lib/moneykit/models/generate_access_token_response.rb +51 -58
  49. data/lib/moneykit/models/get_account_numbers_response.rb +48 -53
  50. data/lib/moneykit/models/get_account_response.rb +47 -52
  51. data/lib/moneykit/models/get_accounts_response.rb +47 -50
  52. data/lib/moneykit/models/get_institutions_response.rb +47 -50
  53. data/lib/moneykit/models/get_transactions_response.rb +68 -87
  54. data/lib/moneykit/models/get_user_accounts_response.rb +42 -42
  55. data/lib/moneykit/models/get_user_links_response.rb +42 -42
  56. data/lib/moneykit/models/get_user_transactions_response.rb +64 -82
  57. data/lib/moneykit/models/http_validation_error.rb +68 -71
  58. data/lib/moneykit/models/identity.rb +49 -49
  59. data/lib/moneykit/models/identity_link_product.rb +52 -54
  60. data/lib/moneykit/models/identity_product_settings.rb +49 -48
  61. data/lib/moneykit/models/identity_response.rb +47 -50
  62. data/lib/moneykit/models/institution.rb +77 -96
  63. data/lib/moneykit/models/institution_error_not_found_response.rb +63 -64
  64. data/lib/moneykit/models/institution_styling_response.rb +77 -93
  65. data/lib/moneykit/models/international_number.rb +46 -49
  66. data/lib/moneykit/models/introspect_client_response.rb +61 -73
  67. data/lib/moneykit/models/jwk_set.rb +41 -42
  68. data/lib/moneykit/models/link.rb +78 -100
  69. data/lib/moneykit/models/link1.rb +78 -100
  70. data/lib/moneykit/models/link2.rb +78 -100
  71. data/lib/moneykit/models/link3.rb +78 -100
  72. data/lib/moneykit/models/link4.rb +78 -100
  73. data/lib/moneykit/models/link_common.rb +78 -99
  74. data/lib/moneykit/models/link_error.rb +19 -19
  75. data/lib/moneykit/models/link_error_bad_state_response.rb +64 -72
  76. data/lib/moneykit/models/link_error_deleted_response.rb +63 -64
  77. data/lib/moneykit/models/link_error_forbidden_action_response.rb +60 -62
  78. data/lib/moneykit/models/link_error_not_found_response.rb +63 -64
  79. data/lib/moneykit/models/link_error_unauthorized_access_response.rb +63 -64
  80. data/lib/moneykit/models/link_permission_scope.rb +14 -15
  81. data/lib/moneykit/models/link_permissions.rb +43 -43
  82. data/lib/moneykit/models/link_products.rb +52 -63
  83. data/lib/moneykit/models/link_response.rb +90 -118
  84. data/lib/moneykit/models/link_session_customer_user.rb +58 -68
  85. data/lib/moneykit/models/link_session_customer_user_email.rb +50 -52
  86. data/lib/moneykit/models/link_session_customer_user_phone.rb +60 -67
  87. data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +60 -62
  88. data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +60 -62
  89. data/lib/moneykit/models/link_session_setting_overrides.rb +61 -72
  90. data/lib/moneykit/models/link_state.rb +15 -16
  91. data/lib/moneykit/models/link_state_changed_webhook.rb +110 -134
  92. data/lib/moneykit/models/location_inner.rb +41 -46
  93. data/lib/moneykit/models/money_kit_env.rb +12 -13
  94. data/lib/moneykit/models/money_link_features.rb +49 -48
  95. data/lib/moneykit/models/moneylink_features.rb +50 -49
  96. data/lib/moneykit/models/numbers.rb +60 -73
  97. data/lib/moneykit/models/owner.rb +59 -72
  98. data/lib/moneykit/models/phone.rb +60 -68
  99. data/lib/moneykit/models/phone_number.rb +55 -59
  100. data/lib/moneykit/models/phone_number_type.rb +14 -15
  101. data/lib/moneykit/models/product.rb +14 -15
  102. data/lib/moneykit/models/products.rb +52 -64
  103. data/lib/moneykit/models/products1.rb +48 -56
  104. data/lib/moneykit/models/products_settings.rb +48 -55
  105. data/lib/moneykit/models/provider.rb +15 -16
  106. data/lib/moneykit/models/refresh_products_request.rb +43 -45
  107. data/lib/moneykit/models/requested_link_permission.rb +52 -60
  108. data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +71 -77
  109. data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +66 -72
  110. data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +71 -77
  111. data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +71 -77
  112. data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +71 -77
  113. data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +71 -77
  114. data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +66 -72
  115. data/lib/moneykit/models/response401_get_institution_styling_institutions_institution_id_styling_get.rb +66 -72
  116. data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +66 -72
  117. data/lib/moneykit/models/response401_get_link_links_id_get.rb +71 -77
  118. data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +71 -77
  119. data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +71 -77
  120. data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +66 -72
  121. data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +66 -72
  122. data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +66 -72
  123. data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +66 -72
  124. data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +66 -72
  125. data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +71 -77
  126. data/lib/moneykit/models/response401_update_link_links_id_patch.rb +71 -77
  127. data/lib/moneykit/models/settings.rb +61 -73
  128. data/lib/moneykit/models/supported_version.rb +11 -12
  129. data/lib/moneykit/models/transaction.rb +87 -114
  130. data/lib/moneykit/models/transaction_diff.rb +54 -62
  131. data/lib/moneykit/models/transaction_sync_response.rb +57 -72
  132. data/lib/moneykit/models/transaction_type.rb +12 -13
  133. data/lib/moneykit/models/transaction_type_filter.rb +12 -13
  134. data/lib/moneykit/models/transactions.rb +58 -57
  135. data/lib/moneykit/models/transactions1.rb +55 -63
  136. data/lib/moneykit/models/transactions_link_product.rb +52 -54
  137. data/lib/moneykit/models/transactions_product_settings.rb +57 -56
  138. data/lib/moneykit/models/update_link_request.rb +53 -52
  139. data/lib/moneykit/models/user_accounts_out.rb +40 -40
  140. data/lib/moneykit/models/user_links_out.rb +40 -40
  141. data/lib/moneykit/models/user_transactions_paged_response.rb +40 -40
  142. data/lib/moneykit/models/validation_error.rb +53 -64
  143. data/lib/moneykit/version.rb +10 -12
  144. data/lib/moneykit.rb +9 -11
  145. data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +203 -207
  146. data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +75 -76
  147. data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +19 -19
  148. data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +38 -40
  149. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +59 -61
  150. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +71 -87
  151. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +77 -98
  152. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +85 -86
  153. data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +18 -19
  154. data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +59 -61
  155. data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +44 -41
  156. data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +55 -60
  157. data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +49 -47
  158. data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +65 -69
  159. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +63 -73
  160. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +59 -61
  161. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +44 -41
  162. data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +61 -72
  163. data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +15 -16
  164. data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +49 -50
  165. data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +43 -41
  166. data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +59 -61
  167. data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +44 -41
  168. data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +55 -60
  169. data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +65 -71
  170. data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +60 -61
  171. data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +49 -50
  172. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +85 -96
  173. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +65 -77
  174. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +55 -55
  175. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +55 -59
  176. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +55 -55
  177. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +54 -59
  178. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +55 -55
  179. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +44 -41
  180. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +49 -47
  181. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +50 -48
  182. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +55 -59
  183. data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +49 -47
  184. data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +100 -121
  185. data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +66 -66
  186. data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +54 -59
  187. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +59 -65
  188. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +54 -59
  189. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +59 -68
  190. data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +54 -59
  191. data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +63 -73
  192. data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +49 -50
  193. data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +54 -59
  194. data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +88 -103
  195. data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +26 -27
  196. data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +16 -17
  197. data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +43 -39
  198. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +107 -134
  199. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +69 -79
  200. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +66 -68
  201. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +65 -76
  202. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +55 -55
  203. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +44 -41
  204. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +69 -75
  205. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +50 -46
  206. data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +72 -89
  207. data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +56 -65
  208. data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +15 -16
  209. data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +13 -13
  210. data/lib/plaid_compatible/money_kit_plaid_compatible.rb +12 -12
  211. data/moneykit.gemspec +21 -25
  212. metadata +1 -1
@@ -1,14 +1,12 @@
1
- =begin
2
- #MoneyKit API
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: 0.1.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.5.0
10
-
11
- =end
1
+ # #MoneyKit API
2
+ #
3
+ # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #
5
+ # The version of the OpenAPI document: 0.1.0
6
+ #
7
+ # Generated by: https://openapi-generator.tech
8
+ # OpenAPI Generator version: 6.5.0
9
+ #
12
10
 
13
11
  require 'date'
14
12
  require 'time'
@@ -25,8 +23,8 @@ module MoneyKit
25
23
  # Attribute mapping from ruby-style variable name to JSON key.
26
24
  def self.attribute_map
27
25
  {
28
- :'address' => :'address',
29
- :'customer_verified_at' => :'customer_verified_at'
26
+ 'address': :address,
27
+ 'customer_verified_at': :customer_verified_at
30
28
  }
31
29
  end
32
30
 
@@ -38,56 +36,54 @@ module MoneyKit
38
36
  # Attribute type mapping.
39
37
  def self.openapi_types
40
38
  {
41
- :'address' => :'String',
42
- :'customer_verified_at' => :'Time'
39
+ 'address': :String,
40
+ 'customer_verified_at': :Time
43
41
  }
44
42
  end
45
43
 
46
44
  # List of attributes with nullable: true
47
45
  def self.openapi_nullable
48
46
  Set.new([
49
- :'customer_verified_at'
50
- ])
47
+ :customer_verified_at
48
+ ])
51
49
  end
52
50
 
53
51
  # List of class defined in allOf (OpenAPI v3)
54
52
  def self.openapi_all_of
55
53
  [
56
- :'LinkSessionCustomerUserEmail'
54
+ :LinkSessionCustomerUserEmail
57
55
  ]
58
56
  end
59
57
 
60
58
  # Initializes the object
61
59
  # @param [Hash] attributes Model attributes in the form of hash
62
60
  def initialize(attributes = {})
63
- if (!attributes.is_a?(Hash))
64
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::Email1` initialize method"
61
+ unless attributes.is_a?(Hash)
62
+ raise ArgumentError, 'The input argument (attributes) must be a hash in `MoneyKit::Email1` initialize method'
65
63
  end
66
64
 
67
65
  # check to see if the attribute exists and convert string to symbol for hash key
68
- attributes = attributes.each_with_object({}) { |(k, v), h|
69
- if (!self.class.attribute_map.key?(k.to_sym))
70
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::Email1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ attributes = attributes.each_with_object({}) do |(k, v), h|
67
+ unless self.class.attribute_map.key?(k.to_sym)
68
+ raise ArgumentError,
69
+ "`#{k}` is not a valid attribute in `MoneyKit::Email1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
70
  end
72
- h[k.to_sym] = v
73
- }
74
71
 
75
- if attributes.key?(:'address')
76
- self.address = attributes[:'address']
72
+ h[k.to_sym] = v
77
73
  end
78
74
 
79
- if attributes.key?(:'customer_verified_at')
80
- self.customer_verified_at = attributes[:'customer_verified_at']
81
- end
75
+ self.address = attributes[:address] if attributes.key?(:address)
76
+
77
+ return unless attributes.key?(:customer_verified_at)
78
+
79
+ self.customer_verified_at = attributes[:customer_verified_at]
82
80
  end
83
81
 
84
82
  # Show invalid properties with the reasons. Usually used together with valid?
85
83
  # @return Array for valid properties with the reasons
86
84
  def list_invalid_properties
87
- invalid_properties = Array.new
88
- if @address.nil?
89
- invalid_properties.push('invalid value for "address", address cannot be nil.')
90
- end
85
+ invalid_properties = []
86
+ invalid_properties.push('invalid value for "address", address cannot be nil.') if @address.nil?
91
87
 
92
88
  if @address.to_s.length > 254
93
89
  invalid_properties.push('invalid value for "address", the character length must be smaller than or equal to 254.')
@@ -112,27 +108,26 @@ module MoneyKit
112
108
  return false if @address.to_s.length > 254
113
109
  return false if @address.to_s.length < 4
114
110
  return false if @address !~ Regexp.new(/[^@]+@[^@]+\.[^@]+/)
111
+
115
112
  true
116
113
  end
117
114
 
118
115
  # Custom attribute writer method with validation
119
116
  # @param [Object] address Value to be assigned
120
117
  def address=(address)
121
- if address.nil?
122
- fail ArgumentError, 'address cannot be nil'
123
- end
118
+ raise ArgumentError, 'address cannot be nil' if address.nil?
124
119
 
125
120
  if address.to_s.length > 254
126
- fail ArgumentError, 'invalid value for "address", the character length must be smaller than or equal to 254.'
121
+ raise ArgumentError, 'invalid value for "address", the character length must be smaller than or equal to 254.'
127
122
  end
128
123
 
129
124
  if address.to_s.length < 4
130
- fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 4.'
125
+ raise ArgumentError, 'invalid value for "address", the character length must be great than or equal to 4.'
131
126
  end
132
127
 
133
128
  pattern = Regexp.new(/[^@]+@[^@]+\.[^@]+/)
134
129
  if address !~ pattern
135
- fail ArgumentError, "invalid value for \"address\", must conform to the pattern #{pattern}."
130
+ raise ArgumentError, "invalid value for \"address\", must conform to the pattern #{pattern}."
136
131
  end
137
132
 
138
133
  @address = address
@@ -140,17 +135,18 @@ module MoneyKit
140
135
 
141
136
  # Checks equality by comparing each attribute.
142
137
  # @param [Object] Object to be compared
143
- def ==(o)
144
- return true if self.equal?(o)
145
- self.class == o.class &&
146
- address == o.address &&
147
- customer_verified_at == o.customer_verified_at
138
+ def ==(other)
139
+ return true if equal?(other)
140
+
141
+ self.class == other.class &&
142
+ address == other.address &&
143
+ customer_verified_at == other.customer_verified_at
148
144
  end
149
145
 
150
146
  # @see the `==` method
151
147
  # @param [Object] Object to be compared
152
- def eql?(o)
153
- self == o
148
+ def eql?(other)
149
+ self == other
154
150
  end
155
151
 
156
152
  # Calculates hash code according to all attributes.
@@ -171,18 +167,21 @@ module MoneyKit
171
167
  # @return [Object] Returns the model itself
172
168
  def build_from_hash(attributes)
173
169
  return nil unless attributes.is_a?(Hash)
170
+
174
171
  attributes = attributes.transform_keys(&:to_sym)
175
172
  self.class.openapi_types.each_pair do |key, type|
176
173
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
177
- self.send("#{key}=", nil)
174
+ send("#{key}=", nil)
178
175
  elsif type =~ /\AArray<(.*)>/i
179
176
  # check to ensure the input is an array given that the attribute
180
177
  # is documented as an array but the input is not
181
178
  if attributes[self.class.attribute_map[key]].is_a?(Array)
182
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
179
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
180
+ _deserialize(::Regexp.last_match(1), v)
181
+ end)
183
182
  end
184
183
  elsif !attributes[self.class.attribute_map[key]].nil?
185
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
184
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
186
185
  end
187
186
  end
188
187
 
@@ -249,7 +248,7 @@ module MoneyKit
249
248
  def to_hash
250
249
  hash = {}
251
250
  self.class.attribute_map.each_pair do |attr, param|
252
- value = self.send(attr)
251
+ value = send(attr)
253
252
  if value.nil?
254
253
  is_nullable = self.class.openapi_nullable.include?(attr)
255
254
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -277,7 +276,5 @@ module MoneyKit
277
276
  value
278
277
  end
279
278
  end
280
-
281
279
  end
282
-
283
280
  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'
@@ -21,7 +19,7 @@ module MoneyKit
21
19
  # Attribute mapping from ruby-style variable name to JSON key.
22
20
  def self.attribute_map
23
21
  {
24
- :'exchangeable_token' => :'exchangeable_token'
22
+ 'exchangeable_token': :exchangeable_token
25
23
  }
26
24
  end
27
25
 
@@ -33,40 +31,42 @@ module MoneyKit
33
31
  # Attribute type mapping.
34
32
  def self.openapi_types
35
33
  {
36
- :'exchangeable_token' => :'String'
34
+ 'exchangeable_token': :String
37
35
  }
38
36
  end
39
37
 
40
38
  # List of attributes with nullable: true
41
39
  def self.openapi_nullable
42
- Set.new([
43
- ])
40
+ Set.new([])
44
41
  end
45
42
 
46
43
  # Initializes the object
47
44
  # @param [Hash] attributes Model attributes in the form of hash
48
45
  def initialize(attributes = {})
49
- if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::ExchangeTokenRequest` initialize method"
46
+ unless attributes.is_a?(Hash)
47
+ raise ArgumentError,
48
+ 'The input argument (attributes) must be a hash in `MoneyKit::ExchangeTokenRequest` initialize method'
51
49
  end
52
50
 
53
51
  # check to see if the attribute exists and convert string to symbol for hash key
54
- attributes = attributes.each_with_object({}) { |(k, v), h|
55
- if (!self.class.attribute_map.key?(k.to_sym))
56
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::ExchangeTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
52
+ attributes = attributes.each_with_object({}) do |(k, v), h|
53
+ unless self.class.attribute_map.key?(k.to_sym)
54
+ raise ArgumentError,
55
+ "`#{k}` is not a valid attribute in `MoneyKit::ExchangeTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
56
  end
58
- h[k.to_sym] = v
59
- }
60
57
 
61
- if attributes.key?(:'exchangeable_token')
62
- self.exchangeable_token = attributes[:'exchangeable_token']
58
+ h[k.to_sym] = v
63
59
  end
60
+
61
+ return unless attributes.key?(:exchangeable_token)
62
+
63
+ self.exchangeable_token = attributes[:exchangeable_token]
64
64
  end
65
65
 
66
66
  # Show invalid properties with the reasons. Usually used together with valid?
67
67
  # @return Array for valid properties with the reasons
68
68
  def list_invalid_properties
69
- invalid_properties = Array.new
69
+ invalid_properties = []
70
70
  if @exchangeable_token.nil?
71
71
  invalid_properties.push('invalid value for "exchangeable_token", exchangeable_token cannot be nil.')
72
72
  end
@@ -78,21 +78,23 @@ module MoneyKit
78
78
  # @return true if the model is valid
79
79
  def valid?
80
80
  return false if @exchangeable_token.nil?
81
+
81
82
  true
82
83
  end
83
84
 
84
85
  # Checks equality by comparing each attribute.
85
86
  # @param [Object] Object to be compared
86
- def ==(o)
87
- return true if self.equal?(o)
88
- self.class == o.class &&
89
- exchangeable_token == o.exchangeable_token
87
+ def ==(other)
88
+ return true if equal?(other)
89
+
90
+ self.class == other.class &&
91
+ exchangeable_token == other.exchangeable_token
90
92
  end
91
93
 
92
94
  # @see the `==` method
93
95
  # @param [Object] Object to be compared
94
- def eql?(o)
95
- self == o
96
+ def eql?(other)
97
+ self == other
96
98
  end
97
99
 
98
100
  # Calculates hash code according to all attributes.
@@ -113,18 +115,21 @@ module MoneyKit
113
115
  # @return [Object] Returns the model itself
114
116
  def build_from_hash(attributes)
115
117
  return nil unless attributes.is_a?(Hash)
118
+
116
119
  attributes = attributes.transform_keys(&:to_sym)
117
120
  self.class.openapi_types.each_pair do |key, type|
118
121
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
- self.send("#{key}=", nil)
122
+ send("#{key}=", nil)
120
123
  elsif type =~ /\AArray<(.*)>/i
121
124
  # check to ensure the input is an array given that the attribute
122
125
  # is documented as an array but the input is not
123
126
  if attributes[self.class.attribute_map[key]].is_a?(Array)
124
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
128
+ _deserialize(::Regexp.last_match(1), v)
129
+ end)
125
130
  end
126
131
  elsif !attributes[self.class.attribute_map[key]].nil?
127
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
133
  end
129
134
  end
130
135
 
@@ -191,7 +196,7 @@ module MoneyKit
191
196
  def to_hash
192
197
  hash = {}
193
198
  self.class.attribute_map.each_pair do |attr, param|
194
- value = self.send(attr)
199
+ value = send(attr)
195
200
  if value.nil?
196
201
  is_nullable = self.class.openapi_nullable.include?(attr)
197
202
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -219,7 +224,5 @@ module MoneyKit
219
224
  value
220
225
  end
221
226
  end
222
-
223
227
  end
224
-
225
228
  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'
@@ -23,8 +21,8 @@ module MoneyKit
23
21
  # Attribute mapping from ruby-style variable name to JSON key.
24
22
  def self.attribute_map
25
23
  {
26
- :'link_id' => :'link_id',
27
- :'link' => :'link'
24
+ 'link_id': :link_id,
25
+ 'link': :link
28
26
  }
29
27
  end
30
28
 
@@ -36,52 +34,48 @@ module MoneyKit
36
34
  # Attribute type mapping.
37
35
  def self.openapi_types
38
36
  {
39
- :'link_id' => :'String',
40
- :'link' => :'Link'
37
+ 'link_id': :String,
38
+ 'link': :Link
41
39
  }
42
40
  end
43
41
 
44
42
  # List of attributes with nullable: true
45
43
  def self.openapi_nullable
46
- Set.new([
47
- ])
44
+ Set.new([])
48
45
  end
49
46
 
50
47
  # Initializes the object
51
48
  # @param [Hash] attributes Model attributes in the form of hash
52
49
  def initialize(attributes = {})
53
- if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::ExchangeTokenResponse` initialize method"
50
+ unless attributes.is_a?(Hash)
51
+ raise ArgumentError,
52
+ 'The input argument (attributes) must be a hash in `MoneyKit::ExchangeTokenResponse` initialize method'
55
53
  end
56
54
 
57
55
  # check to see if the attribute exists and convert string to symbol for hash key
58
- attributes = attributes.each_with_object({}) { |(k, v), h|
59
- if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::ExchangeTokenResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ attributes = attributes.each_with_object({}) do |(k, v), h|
57
+ unless self.class.attribute_map.key?(k.to_sym)
58
+ raise ArgumentError,
59
+ "`#{k}` is not a valid attribute in `MoneyKit::ExchangeTokenResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
60
  end
62
- h[k.to_sym] = v
63
- }
64
61
 
65
- if attributes.key?(:'link_id')
66
- self.link_id = attributes[:'link_id']
62
+ h[k.to_sym] = v
67
63
  end
68
64
 
69
- if attributes.key?(:'link')
70
- self.link = attributes[:'link']
71
- end
65
+ self.link_id = attributes[:link_id] if attributes.key?(:link_id)
66
+
67
+ return unless attributes.key?(:link)
68
+
69
+ self.link = attributes[:link]
72
70
  end
73
71
 
74
72
  # Show invalid properties with the reasons. Usually used together with valid?
75
73
  # @return Array for valid properties with the reasons
76
74
  def list_invalid_properties
77
- invalid_properties = Array.new
78
- if @link_id.nil?
79
- invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
80
- end
75
+ invalid_properties = []
76
+ invalid_properties.push('invalid value for "link_id", link_id cannot be nil.') if @link_id.nil?
81
77
 
82
- if @link.nil?
83
- invalid_properties.push('invalid value for "link", link cannot be nil.')
84
- end
78
+ invalid_properties.push('invalid value for "link", link cannot be nil.') if @link.nil?
85
79
 
86
80
  invalid_properties
87
81
  end
@@ -91,22 +85,24 @@ module MoneyKit
91
85
  def valid?
92
86
  return false if @link_id.nil?
93
87
  return false if @link.nil?
88
+
94
89
  true
95
90
  end
96
91
 
97
92
  # Checks equality by comparing each attribute.
98
93
  # @param [Object] Object to be compared
99
- def ==(o)
100
- return true if self.equal?(o)
101
- self.class == o.class &&
102
- link_id == o.link_id &&
103
- link == o.link
94
+ def ==(other)
95
+ return true if equal?(other)
96
+
97
+ self.class == other.class &&
98
+ link_id == other.link_id &&
99
+ link == other.link
104
100
  end
105
101
 
106
102
  # @see the `==` method
107
103
  # @param [Object] Object to be compared
108
- def eql?(o)
109
- self == o
104
+ def eql?(other)
105
+ self == other
110
106
  end
111
107
 
112
108
  # Calculates hash code according to all attributes.
@@ -127,18 +123,21 @@ module MoneyKit
127
123
  # @return [Object] Returns the model itself
128
124
  def build_from_hash(attributes)
129
125
  return nil unless attributes.is_a?(Hash)
126
+
130
127
  attributes = attributes.transform_keys(&:to_sym)
131
128
  self.class.openapi_types.each_pair do |key, type|
132
129
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
133
- self.send("#{key}=", nil)
130
+ send("#{key}=", nil)
134
131
  elsif type =~ /\AArray<(.*)>/i
135
132
  # check to ensure the input is an array given that the attribute
136
133
  # is documented as an array but the input is not
137
134
  if attributes[self.class.attribute_map[key]].is_a?(Array)
138
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
135
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
136
+ _deserialize(::Regexp.last_match(1), v)
137
+ end)
139
138
  end
140
139
  elsif !attributes[self.class.attribute_map[key]].nil?
141
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
142
141
  end
143
142
  end
144
143
 
@@ -205,7 +204,7 @@ module MoneyKit
205
204
  def to_hash
206
205
  hash = {}
207
206
  self.class.attribute_map.each_pair do |attr, param|
208
- value = self.send(attr)
207
+ value = send(attr)
209
208
  if value.nil?
210
209
  is_nullable = self.class.openapi_nullable.include?(attr)
211
210
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -233,7 +232,5 @@ module MoneyKit
233
232
  value
234
233
  end
235
234
  end
236
-
237
235
  end
238
-
239
236
  end