budgea_client 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +488 -249
- data/budgea_openapi.json +22079 -0
- data/lib/budgea_client/models/bank.rb +27 -27
- data/lib/budgea_client/models/field.rb +63 -52
- data/lib/budgea_client/version.rb +1 -1
- data/pkg/budgea_client-1.1.0.gem +0 -0
- metadata +2 -1
@@ -44,38 +44,38 @@ module BudgeaClient
|
|
44
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
45
|
def self.attribute_map
|
46
46
|
{
|
47
|
-
:'id'
|
48
|
-
:'name'
|
49
|
-
:'id_weboob'
|
50
|
-
:'hidden'
|
51
|
-
:'charged'
|
52
|
-
:'code'
|
53
|
-
:'beta'
|
54
|
-
:'color'
|
55
|
-
:'slug'
|
56
|
-
:'sync_frequency'
|
47
|
+
:'id' => :'id',
|
48
|
+
:'name' => :'name',
|
49
|
+
:'id_weboob' => :'id_weboob',
|
50
|
+
:'hidden' => :'hidden',
|
51
|
+
:'charged' => :'charged',
|
52
|
+
:'code' => :'code',
|
53
|
+
:'beta' => :'beta',
|
54
|
+
:'color' => :'color',
|
55
|
+
:'slug' => :'slug',
|
56
|
+
:'sync_frequency' => :'sync_frequency',
|
57
57
|
:'months_to_fetch' => :'months_to_fetch',
|
58
|
-
:'account_types'
|
59
|
-
:'fields'
|
58
|
+
:'account_types' => :'account_types',
|
59
|
+
:'fields' => :'fields'
|
60
60
|
}
|
61
61
|
end
|
62
62
|
|
63
63
|
# Attribute type mapping.
|
64
64
|
def self.swagger_types
|
65
65
|
{
|
66
|
-
:'id'
|
67
|
-
:'name'
|
68
|
-
:'id_weboob'
|
69
|
-
:'hidden'
|
70
|
-
:'charged'
|
71
|
-
:'code'
|
72
|
-
:'beta'
|
73
|
-
:'color'
|
74
|
-
:'slug'
|
75
|
-
:'sync_frequency'
|
66
|
+
:'id' => :'Integer',
|
67
|
+
:'name' => :'String',
|
68
|
+
:'id_weboob' => :'String',
|
69
|
+
:'hidden' => :'BOOLEAN',
|
70
|
+
:'charged' => :'BOOLEAN',
|
71
|
+
:'code' => :'String',
|
72
|
+
:'beta' => :'BOOLEAN',
|
73
|
+
:'color' => :'String',
|
74
|
+
:'slug' => :'String',
|
75
|
+
:'sync_frequency' => :'Float',
|
76
76
|
:'months_to_fetch' => :'Integer',
|
77
|
-
:'account_types'
|
78
|
-
:'fields'
|
77
|
+
:'account_types' => :'Array<String>',
|
78
|
+
:'fields' => :'Array<Field>'
|
79
79
|
}
|
80
80
|
end
|
81
81
|
|
@@ -85,7 +85,7 @@ module BudgeaClient
|
|
85
85
|
return unless attributes.is_a?(Hash)
|
86
86
|
|
87
87
|
# convert string to symbol for hash key
|
88
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
89
89
|
|
90
90
|
if attributes.has_key?(:'id')
|
91
91
|
self.id = attributes[:'id']
|
@@ -231,7 +231,7 @@ module BudgeaClient
|
|
231
231
|
# check to ensure the input is an array given that the the attribute
|
232
232
|
# is documented as an array but the input is not
|
233
233
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
234
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
234
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
235
235
|
end
|
236
236
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
237
237
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -313,7 +313,7 @@ module BudgeaClient
|
|
313
313
|
# @return [Hash] Returns the value in the form of hash
|
314
314
|
def _to_hash(value)
|
315
315
|
if value.is_a?(Array)
|
316
|
-
value.compact.map{ |v| _to_hash(v) }
|
316
|
+
value.compact.map { |v| _to_hash(v) }
|
317
317
|
elsif value.is_a?(Hash)
|
318
318
|
{}.tap do |hash|
|
319
319
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -29,32 +29,36 @@ module BudgeaClient
|
|
29
29
|
# Default value of the field
|
30
30
|
attr_accessor :value
|
31
31
|
|
32
|
+
attr_accessor :values
|
33
|
+
|
32
34
|
|
33
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
36
|
def self.attribute_map
|
35
37
|
{
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
38
|
+
:'id_bank' => :'id_bank',
|
39
|
+
:'id' => :'id',
|
40
|
+
:'name' => :'name',
|
41
|
+
:'label' => :'label',
|
42
|
+
:'regex' => :'regex',
|
43
|
+
:'type' => :'type',
|
44
|
+
:'ephemeral' => :'ephemeral',
|
45
|
+
:'value' => :'value',
|
46
|
+
:'values' => :'values'
|
44
47
|
}
|
45
48
|
end
|
46
49
|
|
47
50
|
# Attribute type mapping.
|
48
51
|
def self.swagger_types
|
49
52
|
{
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
53
|
+
:'id_bank' => :'Integer',
|
54
|
+
:'id' => :'Integer',
|
55
|
+
:'name' => :'String',
|
56
|
+
:'label' => :'String',
|
57
|
+
:'regex' => :'String',
|
58
|
+
:'type' => :'String',
|
59
|
+
:'ephemeral' => :'BOOLEAN',
|
60
|
+
:'value' => :'String',
|
61
|
+
:'values' => :'Array<FieldValues>'
|
58
62
|
}
|
59
63
|
end
|
60
64
|
|
@@ -64,7 +68,7 @@ module BudgeaClient
|
|
64
68
|
return unless attributes.is_a?(Hash)
|
65
69
|
|
66
70
|
# convert string to symbol for hash key
|
67
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
68
72
|
|
69
73
|
if attributes.has_key?(:'id_bank')
|
70
74
|
self.id_bank = attributes[:'id_bank']
|
@@ -102,6 +106,12 @@ module BudgeaClient
|
|
102
106
|
self.value = attributes[:'value']
|
103
107
|
end
|
104
108
|
|
109
|
+
if attributes.has_key?(:'values')
|
110
|
+
if (value = attributes[:'values']).is_a?(Array)
|
111
|
+
self.values = value
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
105
115
|
end
|
106
116
|
|
107
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -149,7 +159,8 @@ module BudgeaClient
|
|
149
159
|
regex == o.regex &&
|
150
160
|
type == o.type &&
|
151
161
|
ephemeral == o.ephemeral &&
|
152
|
-
value == o.value
|
162
|
+
value == o.value &&
|
163
|
+
values == o.values
|
153
164
|
end
|
154
165
|
|
155
166
|
# @see the `==` method
|
@@ -161,7 +172,7 @@ module BudgeaClient
|
|
161
172
|
# Calculates hash code according to all attributes.
|
162
173
|
# @return [Fixnum] Hash code
|
163
174
|
def hash
|
164
|
-
[id_bank, id, name, label, regex, type, ephemeral, value].hash
|
175
|
+
[id_bank, id, name, label, regex, type, ephemeral, value, values].hash
|
165
176
|
end
|
166
177
|
|
167
178
|
# Builds the object from hash
|
@@ -174,7 +185,7 @@ module BudgeaClient
|
|
174
185
|
# check to ensure the input is an array given that the the attribute
|
175
186
|
# is documented as an array but the input is not
|
176
187
|
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) }
|
188
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
178
189
|
end
|
179
190
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
180
191
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -190,39 +201,39 @@ module BudgeaClient
|
|
190
201
|
# @return [Object] Deserialized data
|
191
202
|
def _deserialize(type, value)
|
192
203
|
case type.to_sym
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
end
|
209
|
-
when :Object
|
210
|
-
# generic object (usually a Hash), return directly
|
211
|
-
value
|
212
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
213
|
-
inner_type = Regexp.last_match[:inner_type]
|
214
|
-
value.map { |v| _deserialize(inner_type, v) }
|
215
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
216
|
-
k_type = Regexp.last_match[:k_type]
|
217
|
-
v_type = Regexp.last_match[:v_type]
|
218
|
-
{}.tap do |hash|
|
219
|
-
value.each do |k, v|
|
220
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
204
|
+
when :DateTime
|
205
|
+
DateTime.parse(value)
|
206
|
+
when :Date
|
207
|
+
Date.parse(value)
|
208
|
+
when :String
|
209
|
+
value.to_s
|
210
|
+
when :Integer
|
211
|
+
value.to_i
|
212
|
+
when :Float
|
213
|
+
value.to_f
|
214
|
+
when :BOOLEAN
|
215
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
216
|
+
true
|
217
|
+
else
|
218
|
+
false
|
221
219
|
end
|
222
|
-
|
223
|
-
|
220
|
+
when :Object
|
221
|
+
# generic object (usually a Hash), return directly
|
222
|
+
value
|
223
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
224
|
+
inner_type = Regexp.last_match[:inner_type]
|
225
|
+
value.map { |v| _deserialize(inner_type, v) }
|
226
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
227
|
+
k_type = Regexp.last_match[:k_type]
|
228
|
+
v_type = Regexp.last_match[:v_type]
|
229
|
+
{}.tap do |hash|
|
230
|
+
value.each do |k, v|
|
231
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
232
|
+
end
|
233
|
+
end
|
234
|
+
else # model
|
224
235
|
temp_model = BudgeaClient.const_get(type).new
|
225
|
-
|
236
|
+
temp_model.build_from_hash(value)
|
226
237
|
end
|
227
238
|
end
|
228
239
|
|
@@ -256,7 +267,7 @@ module BudgeaClient
|
|
256
267
|
# @return [Hash] Returns the value in the form of hash
|
257
268
|
def _to_hash(value)
|
258
269
|
if value.is_a?(Array)
|
259
|
-
value.compact.map{ |v| _to_hash(v) }
|
270
|
+
value.compact.map { |v| _to_hash(v) }
|
260
271
|
elsif value.is_a?(Hash)
|
261
272
|
{}.tap do |hash|
|
262
273
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
data/pkg/budgea_client-1.1.0.gem
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: budgea_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chaker Nakhli
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- README.md
|
203
203
|
- Rakefile
|
204
204
|
- budgea_client.gemspec
|
205
|
+
- budgea_openapi.json
|
205
206
|
- docs/Access.md
|
206
207
|
- docs/Account.md
|
207
208
|
- docs/AccountLog.md
|