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,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'
@@ -30,10 +28,10 @@ module MoneyKit
30
28
  # Attribute mapping from ruby-style variable name to JSON key.
31
29
  def self.attribute_map
32
30
  {
33
- :'names' => :'names',
34
- :'addresses' => :'addresses',
35
- :'phone_numbers' => :'phone_numbers',
36
- :'emails' => :'emails'
31
+ 'names': :names,
32
+ 'addresses': :addresses,
33
+ 'phone_numbers': :phone_numbers,
34
+ 'emails': :emails
37
35
  }
38
36
  end
39
37
 
@@ -45,78 +43,64 @@ module MoneyKit
45
43
  # Attribute type mapping.
46
44
  def self.openapi_types
47
45
  {
48
- :'names' => :'Array<String>',
49
- :'addresses' => :'Array<Address>',
50
- :'phone_numbers' => :'Array<PhoneNumber>',
51
- :'emails' => :'Array<Email>'
46
+ 'names': :'Array<String>',
47
+ 'addresses': :'Array<Address>',
48
+ 'phone_numbers': :'Array<PhoneNumber>',
49
+ 'emails': :'Array<Email>'
52
50
  }
53
51
  end
54
52
 
55
53
  # List of attributes with nullable: true
56
54
  def self.openapi_nullable
57
- Set.new([
58
- ])
55
+ Set.new([])
59
56
  end
60
57
 
61
58
  # Initializes the object
62
59
  # @param [Hash] attributes Model attributes in the form of hash
63
60
  def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::Owner` initialize method"
61
+ unless attributes.is_a?(Hash)
62
+ raise ArgumentError, 'The input argument (attributes) must be a hash in `MoneyKit::Owner` initialize method'
66
63
  end
67
64
 
68
65
  # check to see if the attribute exists and convert string to symbol for hash key
69
- attributes = attributes.each_with_object({}) { |(k, v), h|
70
- if (!self.class.attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::Owner`. 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::Owner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
70
  end
73
- h[k.to_sym] = v
74
- }
75
71
 
76
- if attributes.key?(:'names')
77
- if (value = attributes[:'names']).is_a?(Array)
78
- self.names = value
79
- end
72
+ h[k.to_sym] = v
80
73
  end
81
74
 
82
- if attributes.key?(:'addresses')
83
- if (value = attributes[:'addresses']).is_a?(Array)
84
- self.addresses = value
85
- end
75
+ if attributes.key?(:names) && (value = attributes[:names]).is_a?(Array)
76
+ self.names = value
86
77
  end
87
78
 
88
- if attributes.key?(:'phone_numbers')
89
- if (value = attributes[:'phone_numbers']).is_a?(Array)
90
- self.phone_numbers = value
91
- end
79
+ if attributes.key?(:addresses) && (value = attributes[:addresses]).is_a?(Array)
80
+ self.addresses = value
92
81
  end
93
82
 
94
- if attributes.key?(:'emails')
95
- if (value = attributes[:'emails']).is_a?(Array)
96
- self.emails = value
97
- end
83
+ if attributes.key?(:phone_numbers) && (value = attributes[:phone_numbers]).is_a?(Array)
84
+ self.phone_numbers = value
98
85
  end
86
+
87
+ return unless attributes.key?(:emails)
88
+ return unless (value = attributes[:emails]).is_a?(Array)
89
+
90
+ self.emails = value
99
91
  end
100
92
 
101
93
  # Show invalid properties with the reasons. Usually used together with valid?
102
94
  # @return Array for valid properties with the reasons
103
95
  def list_invalid_properties
104
- invalid_properties = Array.new
105
- if @names.nil?
106
- invalid_properties.push('invalid value for "names", names cannot be nil.')
107
- end
96
+ invalid_properties = []
97
+ invalid_properties.push('invalid value for "names", names cannot be nil.') if @names.nil?
108
98
 
109
- if @addresses.nil?
110
- invalid_properties.push('invalid value for "addresses", addresses cannot be nil.')
111
- end
99
+ invalid_properties.push('invalid value for "addresses", addresses cannot be nil.') if @addresses.nil?
112
100
 
113
- if @phone_numbers.nil?
114
- invalid_properties.push('invalid value for "phone_numbers", phone_numbers cannot be nil.')
115
- end
101
+ invalid_properties.push('invalid value for "phone_numbers", phone_numbers cannot be nil.') if @phone_numbers.nil?
116
102
 
117
- if @emails.nil?
118
- invalid_properties.push('invalid value for "emails", emails cannot be nil.')
119
- end
103
+ invalid_properties.push('invalid value for "emails", emails cannot be nil.') if @emails.nil?
120
104
 
121
105
  invalid_properties
122
106
  end
@@ -128,24 +112,26 @@ module MoneyKit
128
112
  return false if @addresses.nil?
129
113
  return false if @phone_numbers.nil?
130
114
  return false if @emails.nil?
115
+
131
116
  true
132
117
  end
133
118
 
134
119
  # Checks equality by comparing each attribute.
135
120
  # @param [Object] Object to be compared
136
- def ==(o)
137
- return true if self.equal?(o)
138
- self.class == o.class &&
139
- names == o.names &&
140
- addresses == o.addresses &&
141
- phone_numbers == o.phone_numbers &&
142
- emails == o.emails
121
+ def ==(other)
122
+ return true if equal?(other)
123
+
124
+ self.class == other.class &&
125
+ names == other.names &&
126
+ addresses == other.addresses &&
127
+ phone_numbers == other.phone_numbers &&
128
+ emails == other.emails
143
129
  end
144
130
 
145
131
  # @see the `==` method
146
132
  # @param [Object] Object to be compared
147
- def eql?(o)
148
- self == o
133
+ def eql?(other)
134
+ self == other
149
135
  end
150
136
 
151
137
  # Calculates hash code according to all attributes.
@@ -166,18 +152,21 @@ module MoneyKit
166
152
  # @return [Object] Returns the model itself
167
153
  def build_from_hash(attributes)
168
154
  return nil unless attributes.is_a?(Hash)
155
+
169
156
  attributes = attributes.transform_keys(&:to_sym)
170
157
  self.class.openapi_types.each_pair do |key, type|
171
158
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
172
- self.send("#{key}=", nil)
159
+ send("#{key}=", nil)
173
160
  elsif type =~ /\AArray<(.*)>/i
174
161
  # check to ensure the input is an array given that the attribute
175
162
  # is documented as an array but the input is not
176
163
  if attributes[self.class.attribute_map[key]].is_a?(Array)
177
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
164
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
165
+ _deserialize(::Regexp.last_match(1), v)
166
+ end)
178
167
  end
179
168
  elsif !attributes[self.class.attribute_map[key]].nil?
180
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
169
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
181
170
  end
182
171
  end
183
172
 
@@ -244,7 +233,7 @@ module MoneyKit
244
233
  def to_hash
245
234
  hash = {}
246
235
  self.class.attribute_map.each_pair do |attr, param|
247
- value = self.send(attr)
236
+ value = send(attr)
248
237
  if value.nil?
249
238
  is_nullable = self.class.openapi_nullable.include?(attr)
250
239
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -272,7 +261,5 @@ module MoneyKit
272
261
  value
273
262
  end
274
263
  end
275
-
276
264
  end
277
-
278
265
  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'
@@ -25,8 +23,7 @@ module MoneyKit
25
23
  attr_accessor :customer_verified_at
26
24
 
27
25
  class EnumAttributeValidator
28
- attr_reader :datatype
29
- attr_reader :allowable_values
26
+ attr_reader :datatype, :allowable_values
30
27
 
31
28
  def initialize(datatype, allowable_values)
32
29
  @allowable_values = allowable_values.map do |value|
@@ -49,9 +46,9 @@ module MoneyKit
49
46
  # Attribute mapping from ruby-style variable name to JSON key.
50
47
  def self.attribute_map
51
48
  {
52
- :'number' => :'number',
53
- :'country' => :'country',
54
- :'customer_verified_at' => :'customer_verified_at'
49
+ 'number': :number,
50
+ 'country': :country,
51
+ 'customer_verified_at': :customer_verified_at
55
52
  }
56
53
  end
57
54
 
@@ -63,62 +60,58 @@ module MoneyKit
63
60
  # Attribute type mapping.
64
61
  def self.openapi_types
65
62
  {
66
- :'number' => :'String',
67
- :'country' => :'Country',
68
- :'customer_verified_at' => :'Time'
63
+ 'number': :String,
64
+ 'country': :Country,
65
+ 'customer_verified_at': :Time
69
66
  }
70
67
  end
71
68
 
72
69
  # List of attributes with nullable: true
73
70
  def self.openapi_nullable
74
- Set.new([
75
- :'country',
76
- :'customer_verified_at'
77
- ])
71
+ Set.new(%i[
72
+ country
73
+ customer_verified_at
74
+ ])
78
75
  end
79
76
 
80
77
  # List of class defined in allOf (OpenAPI v3)
81
78
  def self.openapi_all_of
82
79
  [
83
- :'LinkSessionCustomerUserPhone'
80
+ :LinkSessionCustomerUserPhone
84
81
  ]
85
82
  end
86
83
 
87
84
  # Initializes the object
88
85
  # @param [Hash] attributes Model attributes in the form of hash
89
86
  def initialize(attributes = {})
90
- if (!attributes.is_a?(Hash))
91
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::Phone` initialize method"
87
+ unless attributes.is_a?(Hash)
88
+ raise ArgumentError, 'The input argument (attributes) must be a hash in `MoneyKit::Phone` initialize method'
92
89
  end
93
90
 
94
91
  # check to see if the attribute exists and convert string to symbol for hash key
95
- attributes = attributes.each_with_object({}) { |(k, v), h|
96
- if (!self.class.attribute_map.key?(k.to_sym))
97
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::Phone`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ attributes = attributes.each_with_object({}) do |(k, v), h|
93
+ unless self.class.attribute_map.key?(k.to_sym)
94
+ raise ArgumentError,
95
+ "`#{k}` is not a valid attribute in `MoneyKit::Phone`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
98
96
  end
99
- h[k.to_sym] = v
100
- }
101
97
 
102
- if attributes.key?(:'number')
103
- self.number = attributes[:'number']
98
+ h[k.to_sym] = v
104
99
  end
105
100
 
106
- if attributes.key?(:'country')
107
- self.country = attributes[:'country']
108
- end
101
+ self.number = attributes[:number] if attributes.key?(:number)
109
102
 
110
- if attributes.key?(:'customer_verified_at')
111
- self.customer_verified_at = attributes[:'customer_verified_at']
112
- end
103
+ self.country = attributes[:country] if attributes.key?(:country)
104
+
105
+ return unless attributes.key?(:customer_verified_at)
106
+
107
+ self.customer_verified_at = attributes[:customer_verified_at]
113
108
  end
114
109
 
115
110
  # Show invalid properties with the reasons. Usually used together with valid?
116
111
  # @return Array for valid properties with the reasons
117
112
  def list_invalid_properties
118
- invalid_properties = Array.new
119
- if @number.nil?
120
- invalid_properties.push('invalid value for "number", number cannot be nil.')
121
- end
113
+ invalid_properties = []
114
+ invalid_properties.push('invalid value for "number", number cannot be nil.') if @number.nil?
122
115
 
123
116
  if @number.to_s.length > 250
124
117
  invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 250.')
@@ -128,7 +121,7 @@ module MoneyKit
128
121
  invalid_properties.push('invalid value for "number", the character length must be great than or equal to 4.')
129
122
  end
130
123
 
131
- pattern = Regexp.new(/^\+?[ 0-9()\.#]+$/)
124
+ pattern = Regexp.new(/^\+?[ 0-9().#]+$/)
132
125
  if @number !~ pattern
133
126
  invalid_properties.push("invalid value for \"number\", must conform to the pattern #{pattern}.")
134
127
  end
@@ -142,47 +135,45 @@ module MoneyKit
142
135
  return false if @number.nil?
143
136
  return false if @number.to_s.length > 250
144
137
  return false if @number.to_s.length < 4
145
- return false if @number !~ Regexp.new(/^\+?[ 0-9()\.#]+$/)
138
+ return false if @number !~ Regexp.new(/^\+?[ 0-9().#]+$/)
139
+
146
140
  true
147
141
  end
148
142
 
149
143
  # Custom attribute writer method with validation
150
144
  # @param [Object] number Value to be assigned
151
145
  def number=(number)
152
- if number.nil?
153
- fail ArgumentError, 'number cannot be nil'
154
- end
146
+ raise ArgumentError, 'number cannot be nil' if number.nil?
155
147
 
156
148
  if number.to_s.length > 250
157
- fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 250.'
149
+ raise ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 250.'
158
150
  end
159
151
 
160
152
  if number.to_s.length < 4
161
- fail ArgumentError, 'invalid value for "number", the character length must be great than or equal to 4.'
153
+ raise ArgumentError, 'invalid value for "number", the character length must be great than or equal to 4.'
162
154
  end
163
155
 
164
- pattern = Regexp.new(/^\+?[ 0-9()\.#]+$/)
165
- if number !~ pattern
166
- fail ArgumentError, "invalid value for \"number\", must conform to the pattern #{pattern}."
167
- end
156
+ pattern = Regexp.new(/^\+?[ 0-9().#]+$/)
157
+ raise ArgumentError, "invalid value for \"number\", must conform to the pattern #{pattern}." if number !~ pattern
168
158
 
169
159
  @number = number
170
160
  end
171
161
 
172
162
  # Checks equality by comparing each attribute.
173
163
  # @param [Object] Object to be compared
174
- def ==(o)
175
- return true if self.equal?(o)
176
- self.class == o.class &&
177
- number == o.number &&
178
- country == o.country &&
179
- customer_verified_at == o.customer_verified_at
164
+ def ==(other)
165
+ return true if equal?(other)
166
+
167
+ self.class == other.class &&
168
+ number == other.number &&
169
+ country == other.country &&
170
+ customer_verified_at == other.customer_verified_at
180
171
  end
181
172
 
182
173
  # @see the `==` method
183
174
  # @param [Object] Object to be compared
184
- def eql?(o)
185
- self == o
175
+ def eql?(other)
176
+ self == other
186
177
  end
187
178
 
188
179
  # Calculates hash code according to all attributes.
@@ -203,18 +194,21 @@ module MoneyKit
203
194
  # @return [Object] Returns the model itself
204
195
  def build_from_hash(attributes)
205
196
  return nil unless attributes.is_a?(Hash)
197
+
206
198
  attributes = attributes.transform_keys(&:to_sym)
207
199
  self.class.openapi_types.each_pair do |key, type|
208
200
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
209
- self.send("#{key}=", nil)
201
+ send("#{key}=", nil)
210
202
  elsif type =~ /\AArray<(.*)>/i
211
203
  # check to ensure the input is an array given that the attribute
212
204
  # is documented as an array but the input is not
213
205
  if attributes[self.class.attribute_map[key]].is_a?(Array)
214
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
206
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
207
+ _deserialize(::Regexp.last_match(1), v)
208
+ end)
215
209
  end
216
210
  elsif !attributes[self.class.attribute_map[key]].nil?
217
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
211
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
218
212
  end
219
213
  end
220
214
 
@@ -281,7 +275,7 @@ module MoneyKit
281
275
  def to_hash
282
276
  hash = {}
283
277
  self.class.attribute_map.each_pair do |attr, param|
284
- value = self.send(attr)
278
+ value = send(attr)
285
279
  if value.nil?
286
280
  is_nullable = self.class.openapi_nullable.include?(attr)
287
281
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -309,7 +303,5 @@ module MoneyKit
309
303
  value
310
304
  end
311
305
  end
312
-
313
306
  end
314
-
315
307
  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'
@@ -24,8 +22,7 @@ module MoneyKit
24
22
  attr_accessor :type
25
23
 
26
24
  class EnumAttributeValidator
27
- attr_reader :datatype
28
- attr_reader :allowable_values
25
+ attr_reader :datatype, :allowable_values
29
26
 
30
27
  def initialize(datatype, allowable_values)
31
28
  @allowable_values = allowable_values.map do |value|
@@ -48,9 +45,9 @@ module MoneyKit
48
45
  # Attribute mapping from ruby-style variable name to JSON key.
49
46
  def self.attribute_map
50
47
  {
51
- :'number' => :'number',
52
- :'primary' => :'primary',
53
- :'type' => :'type'
48
+ 'number': :number,
49
+ 'primary': :primary,
50
+ 'type': :type
54
51
  }
55
52
  end
56
53
 
@@ -62,59 +59,55 @@ module MoneyKit
62
59
  # Attribute type mapping.
63
60
  def self.openapi_types
64
61
  {
65
- :'number' => :'String',
66
- :'primary' => :'Boolean',
67
- :'type' => :'PhoneNumberType'
62
+ 'number': :String,
63
+ 'primary': :Boolean,
64
+ 'type': :PhoneNumberType
68
65
  }
69
66
  end
70
67
 
71
68
  # List of attributes with nullable: true
72
69
  def self.openapi_nullable
73
- Set.new([
74
- ])
70
+ Set.new([])
75
71
  end
76
72
 
77
73
  # Initializes the object
78
74
  # @param [Hash] attributes Model attributes in the form of hash
79
75
  def initialize(attributes = {})
80
- if (!attributes.is_a?(Hash))
81
- fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::PhoneNumber` initialize method"
76
+ unless attributes.is_a?(Hash)
77
+ raise ArgumentError,
78
+ 'The input argument (attributes) must be a hash in `MoneyKit::PhoneNumber` initialize method'
82
79
  end
83
80
 
84
81
  # check to see if the attribute exists and convert string to symbol for hash key
85
- attributes = attributes.each_with_object({}) { |(k, v), h|
86
- if (!self.class.attribute_map.key?(k.to_sym))
87
- fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::PhoneNumber`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ attributes = attributes.each_with_object({}) do |(k, v), h|
83
+ unless self.class.attribute_map.key?(k.to_sym)
84
+ raise ArgumentError,
85
+ "`#{k}` is not a valid attribute in `MoneyKit::PhoneNumber`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
86
  end
89
- h[k.to_sym] = v
90
- }
91
87
 
92
- if attributes.key?(:'number')
93
- self.number = attributes[:'number']
88
+ h[k.to_sym] = v
94
89
  end
95
90
 
96
- if attributes.key?(:'primary')
97
- self.primary = attributes[:'primary']
98
- else
99
- self.primary = false
100
- end
91
+ self.number = attributes[:number] if attributes.key?(:number)
101
92
 
102
- if attributes.key?(:'type')
103
- self.type = attributes[:'type']
104
- end
93
+ self.primary = if attributes.key?(:primary)
94
+ attributes[:primary]
95
+ else
96
+ false
97
+ end
98
+
99
+ return unless attributes.key?(:type)
100
+
101
+ self.type = attributes[:type]
105
102
  end
106
103
 
107
104
  # Show invalid properties with the reasons. Usually used together with valid?
108
105
  # @return Array for valid properties with the reasons
109
106
  def list_invalid_properties
110
- invalid_properties = Array.new
111
- if @number.nil?
112
- invalid_properties.push('invalid value for "number", number cannot be nil.')
113
- end
107
+ invalid_properties = []
108
+ invalid_properties.push('invalid value for "number", number cannot be nil.') if @number.nil?
114
109
 
115
- if @type.nil?
116
- invalid_properties.push('invalid value for "type", type cannot be nil.')
117
- end
110
+ invalid_properties.push('invalid value for "type", type cannot be nil.') if @type.nil?
118
111
 
119
112
  invalid_properties
120
113
  end
@@ -124,23 +117,25 @@ module MoneyKit
124
117
  def valid?
125
118
  return false if @number.nil?
126
119
  return false if @type.nil?
120
+
127
121
  true
128
122
  end
129
123
 
130
124
  # Checks equality by comparing each attribute.
131
125
  # @param [Object] Object to be compared
132
- def ==(o)
133
- return true if self.equal?(o)
134
- self.class == o.class &&
135
- number == o.number &&
136
- primary == o.primary &&
137
- type == o.type
126
+ def ==(other)
127
+ return true if equal?(other)
128
+
129
+ self.class == other.class &&
130
+ number == other.number &&
131
+ primary == other.primary &&
132
+ type == other.type
138
133
  end
139
134
 
140
135
  # @see the `==` method
141
136
  # @param [Object] Object to be compared
142
- def eql?(o)
143
- self == o
137
+ def eql?(other)
138
+ self == other
144
139
  end
145
140
 
146
141
  # Calculates hash code according to all attributes.
@@ -161,18 +156,21 @@ module MoneyKit
161
156
  # @return [Object] Returns the model itself
162
157
  def build_from_hash(attributes)
163
158
  return nil unless attributes.is_a?(Hash)
159
+
164
160
  attributes = attributes.transform_keys(&:to_sym)
165
161
  self.class.openapi_types.each_pair do |key, type|
166
162
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
167
- self.send("#{key}=", nil)
163
+ send("#{key}=", nil)
168
164
  elsif type =~ /\AArray<(.*)>/i
169
165
  # check to ensure the input is an array given that the attribute
170
166
  # is documented as an array but the input is not
171
167
  if attributes[self.class.attribute_map[key]].is_a?(Array)
172
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
168
+ send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
169
+ _deserialize(::Regexp.last_match(1), v)
170
+ end)
173
171
  end
174
172
  elsif !attributes[self.class.attribute_map[key]].nil?
175
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
173
+ send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
176
174
  end
177
175
  end
178
176
 
@@ -239,7 +237,7 @@ module MoneyKit
239
237
  def to_hash
240
238
  hash = {}
241
239
  self.class.attribute_map.each_pair do |attr, param|
242
- value = self.send(attr)
240
+ value = send(attr)
243
241
  if value.nil?
244
242
  is_nullable = self.class.openapi_nullable.include?(attr)
245
243
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
@@ -267,7 +265,5 @@ module MoneyKit
267
265
  value
268
266
  end
269
267
  end
270
-
271
268
  end
272
-
273
269
  end