budgea_client 1.4.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/README.md +67 -725
  4. data/budgea_client.gemspec +15 -3
  5. data/budgea_openapi.json +2011 -524
  6. data/docs/Account.md +3 -1
  7. data/docs/AccountLog.md +2 -2
  8. data/docs/AdministrationApi.md +354 -34
  9. data/docs/AuthenticationApi.md +264 -18
  10. data/docs/BankCategory.md +1 -1
  11. data/docs/BanksApi.md +939 -550
  12. data/docs/Certificate.md +12 -0
  13. data/docs/Client.md +5 -2
  14. data/docs/Connection.md +1 -1
  15. data/docs/ConnectionLog.md +3 -2
  16. data/docs/ConnectionsApi.md +162 -103
  17. data/docs/Connector.md +21 -0
  18. data/docs/ConnectorCategory.md +9 -0
  19. data/docs/ConnectorLogo.md +1 -1
  20. data/docs/Currency.md +4 -0
  21. data/docs/DocumentsApi.md +350 -350
  22. data/docs/Field.md +3 -2
  23. data/docs/InlineResponse20010.md +1 -1
  24. data/docs/InlineResponse20011.md +1 -1
  25. data/docs/InlineResponse20012.md +1 -1
  26. data/docs/InlineResponse20013.md +1 -1
  27. data/docs/InlineResponse20014.md +1 -1
  28. data/docs/InlineResponse20015.md +1 -1
  29. data/docs/InlineResponse20016.md +1 -1
  30. data/docs/InlineResponse20017.md +1 -1
  31. data/docs/InlineResponse20018.md +1 -1
  32. data/docs/InlineResponse20019.md +1 -1
  33. data/docs/InlineResponse20020.md +1 -1
  34. data/docs/InlineResponse20021.md +1 -1
  35. data/docs/InlineResponse20022.md +1 -1
  36. data/docs/InlineResponse20023.md +1 -1
  37. data/docs/InlineResponse20024.md +1 -1
  38. data/docs/InlineResponse20025.md +1 -1
  39. data/docs/InlineResponse20026.md +1 -1
  40. data/docs/InlineResponse20027.md +1 -1
  41. data/docs/InlineResponse20028.md +1 -1
  42. data/docs/InlineResponse20029.md +1 -1
  43. data/docs/InlineResponse2003.md +2 -3
  44. data/docs/InlineResponse20030.md +1 -1
  45. data/docs/InlineResponse20031.md +1 -1
  46. data/docs/InlineResponse20032.md +1 -1
  47. data/docs/InlineResponse20033.md +1 -1
  48. data/docs/InlineResponse20034.md +8 -0
  49. data/docs/InlineResponse20035.md +8 -0
  50. data/docs/InlineResponse20036.md +8 -0
  51. data/docs/InlineResponse2004.md +0 -2
  52. data/docs/InlineResponse2005.md +5 -2
  53. data/docs/InlineResponse2006.md +2 -3
  54. data/docs/InlineResponse2007.md +3 -1
  55. data/docs/InlineResponse2008.md +1 -1
  56. data/docs/InlineResponse2009.md +1 -1
  57. data/docs/OCRApi.md +5 -5
  58. data/docs/OIDCApi.md +5 -5
  59. data/docs/PFMApi.md +122 -122
  60. data/docs/Pocket.md +1 -1
  61. data/docs/Profile.md +1 -1
  62. data/docs/Project.md +1 -1
  63. data/docs/ProvidersApi.md +602 -604
  64. data/docs/Recipient.md +3 -0
  65. data/docs/RecipientLog.md +14 -0
  66. data/docs/RecipientsApi.md +28 -20
  67. data/docs/Subscription.md +2 -1
  68. data/docs/TermsApi.md +13 -15
  69. data/docs/Transaction.md +8 -3
  70. data/docs/Transfer.md +1 -0
  71. data/docs/TransferLog.md +14 -0
  72. data/docs/TransfersApi.md +165 -141
  73. data/docs/UserAlert.md +2 -2
  74. data/docs/UsersManagementApi.md +24 -24
  75. data/docs/WealthApi.md +54 -54
  76. data/docs/WebhookLog.md +15 -0
  77. data/lib/budgea_client.rb +27 -3
  78. data/lib/budgea_client/api/administration_api.rb +425 -106
  79. data/lib/budgea_client/api/authentication_api.rb +287 -46
  80. data/lib/budgea_client/api/banks_api.rb +1271 -974
  81. data/lib/budgea_client/api/connections_api.rb +207 -156
  82. data/lib/budgea_client/api/documents_api.rb +627 -693
  83. data/lib/budgea_client/api/ocr_api.rb +24 -16
  84. data/lib/budgea_client/api/oidc_api.rb +23 -16
  85. data/lib/budgea_client/api/pfm_api.rb +219 -248
  86. data/lib/budgea_client/api/providers_api.rb +998 -1099
  87. data/lib/budgea_client/api/recipients_api.rb +52 -34
  88. data/lib/budgea_client/api/terms_api.rb +34 -31
  89. data/lib/budgea_client/api/transfers_api.rb +245 -239
  90. data/lib/budgea_client/api/users_management_api.rb +56 -58
  91. data/lib/budgea_client/api/wealth_api.rb +81 -85
  92. data/lib/budgea_client/api_client.rb +20 -11
  93. data/lib/budgea_client/api_error.rb +11 -1
  94. data/lib/budgea_client/configuration.rb +12 -2
  95. data/lib/budgea_client/models/access.rb +18 -13
  96. data/lib/budgea_client/models/account.rb +44 -23
  97. data/lib/budgea_client/models/account_log.rb +33 -28
  98. data/lib/budgea_client/models/account_type.rb +22 -17
  99. data/lib/budgea_client/models/alert.rb +21 -16
  100. data/lib/budgea_client/models/bank.rb +21 -16
  101. data/lib/budgea_client/models/bank_category.rb +19 -14
  102. data/lib/budgea_client/models/category.rb +22 -17
  103. data/lib/budgea_client/models/certificate.rb +244 -0
  104. data/lib/budgea_client/models/client.rb +53 -20
  105. data/lib/budgea_client/models/connection.rb +29 -24
  106. data/lib/budgea_client/models/connection_log.rb +39 -24
  107. data/lib/budgea_client/models/connector.rb +345 -0
  108. data/lib/budgea_client/models/connector_category.rb +206 -0
  109. data/lib/budgea_client/models/connector_logo.rb +29 -24
  110. data/lib/budgea_client/models/currency.rb +63 -16
  111. data/lib/budgea_client/models/device.rb +23 -18
  112. data/lib/budgea_client/models/document.rb +21 -16
  113. data/lib/budgea_client/models/document_type.rb +19 -14
  114. data/lib/budgea_client/models/field.rb +44 -27
  115. data/lib/budgea_client/models/field_value.rb +18 -13
  116. data/lib/budgea_client/models/file.rb +20 -15
  117. data/lib/budgea_client/models/group.rb +17 -12
  118. data/lib/budgea_client/models/hash_table.rb +20 -15
  119. data/lib/budgea_client/models/inline_response_200.rb +17 -12
  120. data/lib/budgea_client/models/inline_response_200_1.rb +18 -13
  121. data/lib/budgea_client/models/inline_response_200_10.rb +27 -22
  122. data/lib/budgea_client/models/inline_response_200_11.rb +27 -22
  123. data/lib/budgea_client/models/inline_response_200_12.rb +27 -22
  124. data/lib/budgea_client/models/inline_response_200_13.rb +27 -22
  125. data/lib/budgea_client/models/inline_response_200_14.rb +27 -22
  126. data/lib/budgea_client/models/inline_response_200_15.rb +27 -22
  127. data/lib/budgea_client/models/inline_response_200_16.rb +27 -22
  128. data/lib/budgea_client/models/inline_response_200_17.rb +27 -22
  129. data/lib/budgea_client/models/inline_response_200_18.rb +27 -22
  130. data/lib/budgea_client/models/inline_response_200_19.rb +27 -22
  131. data/lib/budgea_client/models/inline_response_200_2.rb +18 -13
  132. data/lib/budgea_client/models/inline_response_200_20.rb +27 -22
  133. data/lib/budgea_client/models/inline_response_200_21.rb +27 -22
  134. data/lib/budgea_client/models/inline_response_200_22.rb +27 -22
  135. data/lib/budgea_client/models/inline_response_200_23.rb +27 -22
  136. data/lib/budgea_client/models/inline_response_200_24.rb +27 -22
  137. data/lib/budgea_client/models/inline_response_200_25.rb +27 -22
  138. data/lib/budgea_client/models/inline_response_200_26.rb +27 -22
  139. data/lib/budgea_client/models/inline_response_200_27.rb +27 -22
  140. data/lib/budgea_client/models/inline_response_200_28.rb +27 -22
  141. data/lib/budgea_client/models/inline_response_200_29.rb +27 -22
  142. data/lib/budgea_client/models/inline_response_200_3.rb +37 -47
  143. data/lib/budgea_client/models/inline_response_200_30.rb +27 -22
  144. data/lib/budgea_client/models/inline_response_200_31.rb +27 -22
  145. data/lib/budgea_client/models/inline_response_200_32.rb +27 -22
  146. data/lib/budgea_client/models/inline_response_200_33.rb +27 -22
  147. data/lib/budgea_client/models/inline_response_200_34.rb +190 -0
  148. data/lib/budgea_client/models/inline_response_200_35.rb +190 -0
  149. data/lib/budgea_client/models/inline_response_200_36.rb +190 -0
  150. data/lib/budgea_client/models/inline_response_200_4.rb +20 -40
  151. data/lib/budgea_client/models/inline_response_200_5.rb +75 -30
  152. data/lib/budgea_client/models/inline_response_200_6.rb +37 -47
  153. data/lib/budgea_client/models/inline_response_200_7.rb +55 -21
  154. data/lib/budgea_client/models/inline_response_200_8.rb +27 -22
  155. data/lib/budgea_client/models/inline_response_200_9.rb +27 -22
  156. data/lib/budgea_client/models/investment.rb +20 -15
  157. data/lib/budgea_client/models/investment_value.rb +20 -15
  158. data/lib/budgea_client/models/invite.rb +18 -13
  159. data/lib/budgea_client/models/locked_user.rb +18 -13
  160. data/lib/budgea_client/models/oidc_whitelist.rb +18 -13
  161. data/lib/budgea_client/models/pocket.rb +22 -17
  162. data/lib/budgea_client/models/profile.rb +26 -20
  163. data/lib/budgea_client/models/project.rb +26 -21
  164. data/lib/budgea_client/models/project_type.rb +18 -13
  165. data/lib/budgea_client/models/recipient.rb +52 -17
  166. data/lib/budgea_client/models/recipient_log.rb +254 -0
  167. data/lib/budgea_client/models/security.rb +18 -13
  168. data/lib/budgea_client/models/subscription.rb +31 -21
  169. data/lib/budgea_client/models/terms_of_service.rb +19 -14
  170. data/lib/budgea_client/models/transaction.rb +83 -33
  171. data/lib/budgea_client/models/transaction_information.rb +19 -14
  172. data/lib/budgea_client/models/transactions_cluster.rb +21 -16
  173. data/lib/budgea_client/models/transfer.rb +32 -16
  174. data/lib/budgea_client/models/transfer_log.rb +254 -0
  175. data/lib/budgea_client/models/user.rb +22 -16
  176. data/lib/budgea_client/models/user_alert.rb +22 -16
  177. data/lib/budgea_client/models/webhook.rb +19 -14
  178. data/lib/budgea_client/models/webhook_log.rb +264 -0
  179. data/lib/budgea_client/version.rb +12 -2
  180. data/original_budgea_openapi.json +23188 -0
  181. data/spec/models/certificate_spec.rb +65 -0
  182. data/spec/models/connector_category_spec.rb +47 -0
  183. data/spec/models/connector_spec.rb +119 -0
  184. data/spec/models/inline_response_200_34_spec.rb +41 -0
  185. data/spec/models/inline_response_200_35_spec.rb +41 -0
  186. data/spec/models/inline_response_200_36_spec.rb +41 -0
  187. data/spec/models/recipient_log_spec.rb +77 -0
  188. data/spec/models/transfer_log_spec.rb +77 -0
  189. data/spec/models/webhook_log_spec.rb +83 -0
  190. metadata +52 -18
  191. data/pkg/budgea_client-1.3.9.gem +0 -0
  192. data/pkg/budgea_client-1.4.2.gem +0 -0
  193. data/pkg/budgea_client-1.4.3.gem +0 -0
@@ -0,0 +1,206 @@
1
+ =begin
2
+ #Budgea API Documentation
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module BudgeaClient
16
+ class ConnectorCategory
17
+ # ID of the bank category
18
+ attr_accessor :id
19
+
20
+ # Name of the category
21
+ attr_accessor :name
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'id' => :'id',
27
+ :'name' => :'name'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'id' => :'Integer',
35
+ :'name' => :'String'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'id')
48
+ self.id = attributes[:'id']
49
+ end
50
+
51
+ if attributes.has_key?(:'name')
52
+ self.name = attributes[:'name']
53
+ else
54
+ self.name = 'false'
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ if @id.nil?
63
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
64
+ end
65
+
66
+ if @name.nil?
67
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
68
+ end
69
+
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ return false if @id.nil?
77
+ return false if @name.nil?
78
+ true
79
+ end
80
+
81
+ # Checks equality by comparing each attribute.
82
+ # @param [Object] Object to be compared
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ id == o.id &&
87
+ name == o.name
88
+ end
89
+
90
+ # @see the `==` method
91
+ # @param [Object] Object to be compared
92
+ def eql?(o)
93
+ self == o
94
+ end
95
+
96
+ # Calculates hash code according to all attributes.
97
+ # @return [Fixnum] Hash code
98
+ def hash
99
+ [id, name].hash
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ self.class.swagger_types.each_pair do |key, type|
108
+ if type =~ /\AArray<(.*)>/i
109
+ # check to ensure the input is an array given that the the attribute
110
+ # is documented as an array but the input is not
111
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
112
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
113
+ end
114
+ elsif !attributes[self.class.attribute_map[key]].nil?
115
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
117
+ end
118
+
119
+ self
120
+ end
121
+
122
+ # Deserializes the data based on type
123
+ # @param string type Data type
124
+ # @param string value Value to be deserialized
125
+ # @return [Object] Deserialized data
126
+ def _deserialize(type, value)
127
+ case type.to_sym
128
+ when :DateTime
129
+ DateTime.parse(value)
130
+ when :Date
131
+ Date.parse(value)
132
+ when :String
133
+ value.to_s
134
+ when :Integer
135
+ value.to_i
136
+ when :Float
137
+ value.to_f
138
+ when :BOOLEAN
139
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
140
+ true
141
+ else
142
+ false
143
+ end
144
+ when :Object
145
+ # generic object (usually a Hash), return directly
146
+ value
147
+ when /\AArray<(?<inner_type>.+)>\z/
148
+ inner_type = Regexp.last_match[:inner_type]
149
+ value.map { |v| _deserialize(inner_type, v) }
150
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
151
+ k_type = Regexp.last_match[:k_type]
152
+ v_type = Regexp.last_match[:v_type]
153
+ {}.tap do |hash|
154
+ value.each do |k, v|
155
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
156
+ end
157
+ end
158
+ else # model
159
+ temp_model = BudgeaClient.const_get(type).new
160
+ temp_model.build_from_hash(value)
161
+ end
162
+ end
163
+
164
+ # Returns the string representation of the object
165
+ # @return [String] String presentation of the object
166
+ def to_s
167
+ to_hash.to_s
168
+ end
169
+
170
+ # to_body is an alias to to_hash (backward compatibility)
171
+ # @return [Hash] Returns the object in the form of hash
172
+ def to_body
173
+ to_hash
174
+ end
175
+
176
+ # Returns the object in the form of hash
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_hash
179
+ hash = {}
180
+ self.class.attribute_map.each_pair do |attr, param|
181
+ value = self.send(attr)
182
+ next if value.nil?
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ # Outputs non-array value in the form of hash
189
+ # For object, use to_hash. Otherwise, just return the value
190
+ # @param [Object] value Any valid value
191
+ # @return [Hash] Returns the value in the form of hash
192
+ def _to_hash(value)
193
+ if value.is_a?(Array)
194
+ value.compact.map { |v| _to_hash(v) }
195
+ elsif value.is_a?(Hash)
196
+ {}.tap do |hash|
197
+ value.each { |k, v| hash[k] = _to_hash(v) }
198
+ end
199
+ elsif value.respond_to? :to_hash
200
+ value.to_hash
201
+ else
202
+ value
203
+ end
204
+ end
205
+ end
206
+ end
@@ -1,14 +1,23 @@
1
- # frozen_string_literal: true
1
+ =begin
2
+ #Budgea API Documentation
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.1
10
+
11
+ =end
2
12
 
3
13
  require 'date'
4
14
 
5
15
  module BudgeaClient
6
-
7
16
  class ConnectorLogo
8
17
  attr_accessor :id
9
18
 
10
- # ID of the bank
11
- attr_accessor :id_bank
19
+ # ID of the connector
20
+ attr_accessor :id_connector
12
21
 
13
22
  # Id of the Bank/Provider Logo
14
23
  attr_accessor :id_file
@@ -16,12 +25,11 @@ module BudgeaClient
16
25
  # Logo's type
17
26
  attr_accessor :type
18
27
 
19
-
20
28
  # Attribute mapping from ruby-style variable name to JSON key.
21
29
  def self.attribute_map
22
30
  {
23
31
  :'id' => :'id',
24
- :'id_bank' => :'id_bank',
32
+ :'id_connector' => :'id_connector',
25
33
  :'id_file' => :'id_file',
26
34
  :'type' => :'type'
27
35
  }
@@ -31,7 +39,7 @@ module BudgeaClient
31
39
  def self.swagger_types
32
40
  {
33
41
  :'id' => :'Integer',
34
- :'id_bank' => :'Integer',
42
+ :'id_connector' => :'Integer',
35
43
  :'id_file' => :'Integer',
36
44
  :'type' => :'String'
37
45
  }
@@ -43,14 +51,14 @@ module BudgeaClient
43
51
  return unless attributes.is_a?(Hash)
44
52
 
45
53
  # convert string to symbol for hash key
46
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
54
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
55
 
48
56
  if attributes.has_key?(:'id')
49
57
  self.id = attributes[:'id']
50
58
  end
51
59
 
52
- if attributes.has_key?(:'id_bank')
53
- self.id_bank = attributes[:'id_bank']
60
+ if attributes.has_key?(:'id_connector')
61
+ self.id_connector = attributes[:'id_connector']
54
62
  end
55
63
 
56
64
  if attributes.has_key?(:'id_file')
@@ -60,7 +68,6 @@ module BudgeaClient
60
68
  if attributes.has_key?(:'type')
61
69
  self.type = attributes[:'type']
62
70
  end
63
-
64
71
  end
65
72
 
66
73
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -68,27 +75,27 @@ module BudgeaClient
68
75
  def list_invalid_properties
69
76
  invalid_properties = Array.new
70
77
  if @id.nil?
71
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
78
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
72
79
  end
73
80
 
74
- if @id_bank.nil?
75
- invalid_properties.push("invalid value for 'id_bank', id_bank cannot be nil.")
81
+ if @id_connector.nil?
82
+ invalid_properties.push('invalid value for "id_connector", id_connector cannot be nil.')
76
83
  end
77
84
 
78
85
  if @id_file.nil?
79
- invalid_properties.push("invalid value for 'id_file', id_file cannot be nil.")
86
+ invalid_properties.push('invalid value for "id_file", id_file cannot be nil.')
80
87
  end
81
88
 
82
- return invalid_properties
89
+ invalid_properties
83
90
  end
84
91
 
85
92
  # Check to see if the all the properties in the model are valid
86
93
  # @return true if the model is valid
87
94
  def valid?
88
95
  return false if @id.nil?
89
- return false if @id_bank.nil?
96
+ return false if @id_connector.nil?
90
97
  return false if @id_file.nil?
91
- return true
98
+ true
92
99
  end
93
100
 
94
101
  # Checks equality by comparing each attribute.
@@ -97,7 +104,7 @@ module BudgeaClient
97
104
  return true if self.equal?(o)
98
105
  self.class == o.class &&
99
106
  id == o.id &&
100
- id_bank == o.id_bank &&
107
+ id_connector == o.id_connector &&
101
108
  id_file == o.id_file &&
102
109
  type == o.type
103
110
  end
@@ -111,7 +118,7 @@ module BudgeaClient
111
118
  # Calculates hash code according to all attributes.
112
119
  # @return [Fixnum] Hash code
113
120
  def hash
114
- [id, id_bank, id_file, type].hash
121
+ [id, id_connector, id_file, type].hash
115
122
  end
116
123
 
117
124
  # Builds the object from hash
@@ -124,7 +131,7 @@ module BudgeaClient
124
131
  # check to ensure the input is an array given that the the attribute
125
132
  # is documented as an array but the input is not
126
133
  if attributes[self.class.attribute_map[key]].is_a?(Array)
127
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
134
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
135
  end
129
136
  elsif !attributes[self.class.attribute_map[key]].nil?
130
137
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -206,7 +213,7 @@ module BudgeaClient
206
213
  # @return [Hash] Returns the value in the form of hash
207
214
  def _to_hash(value)
208
215
  if value.is_a?(Array)
209
- value.compact.map{ |v| _to_hash(v) }
216
+ value.compact.map { |v| _to_hash(v) }
210
217
  elsif value.is_a?(Hash)
211
218
  {}.tap do |hash|
212
219
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -217,7 +224,5 @@ module BudgeaClient
217
224
  value
218
225
  end
219
226
  end
220
-
221
227
  end
222
-
223
228
  end
@@ -1,9 +1,18 @@
1
- # frozen_string_literal: true
1
+ =begin
2
+ #Budgea API Documentation
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.1
10
+
11
+ =end
2
12
 
3
13
  require 'date'
4
14
 
5
15
  module BudgeaClient
6
-
7
16
  class Currency
8
17
  # ISO 4217 code used as ID
9
18
  attr_accessor :id
@@ -14,13 +23,28 @@ module BudgeaClient
14
23
  # Amount is prefixed or not by the currency
15
24
  attr_accessor :prefix
16
25
 
26
+ # It is a crypto currency or not
27
+ attr_accessor :crypto
28
+
29
+ # Numbers of significant digits
30
+ attr_accessor :precision
31
+
32
+ # Market Capitalization in EUR
33
+ attr_accessor :marketcap
34
+
35
+ # Time and date of Market Cap (for cryptos)
36
+ attr_accessor :datetime
17
37
 
18
38
  # Attribute mapping from ruby-style variable name to JSON key.
19
39
  def self.attribute_map
20
40
  {
21
41
  :'id' => :'id',
22
42
  :'symbol' => :'symbol',
23
- :'prefix' => :'prefix'
43
+ :'prefix' => :'prefix',
44
+ :'crypto' => :'crypto',
45
+ :'precision' => :'precision',
46
+ :'marketcap' => :'marketcap',
47
+ :'datetime' => :'datetime'
24
48
  }
25
49
  end
26
50
 
@@ -29,7 +53,11 @@ module BudgeaClient
29
53
  {
30
54
  :'id' => :'String',
31
55
  :'symbol' => :'String',
32
- :'prefix' => :'BOOLEAN'
56
+ :'prefix' => :'BOOLEAN',
57
+ :'crypto' => :'BOOLEAN',
58
+ :'precision' => :'Integer',
59
+ :'marketcap' => :'Float',
60
+ :'datetime' => :'DateTime'
33
61
  }
34
62
  end
35
63
 
@@ -39,7 +67,7 @@ module BudgeaClient
39
67
  return unless attributes.is_a?(Hash)
40
68
 
41
69
  # convert string to symbol for hash key
42
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
70
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
43
71
 
44
72
  if attributes.has_key?(:'id')
45
73
  self.id = attributes[:'id']
@@ -55,6 +83,23 @@ module BudgeaClient
55
83
  self.prefix = false
56
84
  end
57
85
 
86
+ if attributes.has_key?(:'crypto')
87
+ self.crypto = attributes[:'crypto']
88
+ else
89
+ self.crypto = false
90
+ end
91
+
92
+ if attributes.has_key?(:'precision')
93
+ self.precision = attributes[:'precision']
94
+ end
95
+
96
+ if attributes.has_key?(:'marketcap')
97
+ self.marketcap = attributes[:'marketcap']
98
+ end
99
+
100
+ if attributes.has_key?(:'datetime')
101
+ self.datetime = attributes[:'datetime']
102
+ end
58
103
  end
59
104
 
60
105
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -62,18 +107,18 @@ module BudgeaClient
62
107
  def list_invalid_properties
63
108
  invalid_properties = Array.new
64
109
  if @id.nil?
65
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
110
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
66
111
  end
67
112
 
68
113
  if @symbol.nil?
69
- invalid_properties.push("invalid value for 'symbol', symbol cannot be nil.")
114
+ invalid_properties.push('invalid value for "symbol", symbol cannot be nil.')
70
115
  end
71
116
 
72
117
  if @prefix.nil?
73
- invalid_properties.push("invalid value for 'prefix', prefix cannot be nil.")
118
+ invalid_properties.push('invalid value for "prefix", prefix cannot be nil.')
74
119
  end
75
120
 
76
- return invalid_properties
121
+ invalid_properties
77
122
  end
78
123
 
79
124
  # Check to see if the all the properties in the model are valid
@@ -82,7 +127,7 @@ module BudgeaClient
82
127
  return false if @id.nil?
83
128
  return false if @symbol.nil?
84
129
  return false if @prefix.nil?
85
- return true
130
+ true
86
131
  end
87
132
 
88
133
  # Checks equality by comparing each attribute.
@@ -92,7 +137,11 @@ module BudgeaClient
92
137
  self.class == o.class &&
93
138
  id == o.id &&
94
139
  symbol == o.symbol &&
95
- prefix == o.prefix
140
+ prefix == o.prefix &&
141
+ crypto == o.crypto &&
142
+ precision == o.precision &&
143
+ marketcap == o.marketcap &&
144
+ datetime == o.datetime
96
145
  end
97
146
 
98
147
  # @see the `==` method
@@ -104,7 +153,7 @@ module BudgeaClient
104
153
  # Calculates hash code according to all attributes.
105
154
  # @return [Fixnum] Hash code
106
155
  def hash
107
- [id, symbol, prefix].hash
156
+ [id, symbol, prefix, crypto, precision, marketcap, datetime].hash
108
157
  end
109
158
 
110
159
  # Builds the object from hash
@@ -117,7 +166,7 @@ module BudgeaClient
117
166
  # check to ensure the input is an array given that the the attribute
118
167
  # is documented as an array but the input is not
119
168
  if attributes[self.class.attribute_map[key]].is_a?(Array)
120
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
169
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
170
  end
122
171
  elsif !attributes[self.class.attribute_map[key]].nil?
123
172
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -199,7 +248,7 @@ module BudgeaClient
199
248
  # @return [Hash] Returns the value in the form of hash
200
249
  def _to_hash(value)
201
250
  if value.is_a?(Array)
202
- value.compact.map{ |v| _to_hash(v) }
251
+ value.compact.map { |v| _to_hash(v) }
203
252
  elsif value.is_a?(Hash)
204
253
  {}.tap do |hash|
205
254
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -210,7 +259,5 @@ module BudgeaClient
210
259
  value
211
260
  end
212
261
  end
213
-
214
262
  end
215
-
216
263
  end