factpulse 2.0.6 → 2.0.9
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -3
- data/Gemfile.lock +1 -1
- data/docs/Destinataire.md +4 -0
- data/docs/FactureFacturX.md +2 -0
- data/docs/Fournisseur.md +2 -0
- data/docs/LigneDePoste.md +6 -6
- data/docs/LigneDeTVA.md +6 -6
- data/docs/MontantTotal.md +12 -12
- data/docs/Note.md +20 -0
- data/lib/factpulse/models/destinataire.rb +21 -1
- data/lib/factpulse/models/facture_factur_x.rb +12 -1
- data/lib/factpulse/models/fournisseur.rb +11 -1
- data/lib/factpulse/models/ligne_de_poste.rb +61 -4
- data/lib/factpulse/models/ligne_de_tva.rb +49 -3
- data/lib/factpulse/models/montant_ht_total.rb +0 -1
- data/lib/factpulse/models/montant_total.rb +94 -7
- data/lib/factpulse/models/montant_ttc_total.rb +0 -1
- data/lib/factpulse/models/{ligne_de_poste_montant_remise_ht.rb → note.rb} +145 -74
- data/lib/factpulse/version.rb +1 -1
- data/lib/factpulse.rb +1 -10
- metadata +3 -21
- data/docs/LigneDePosteMontantRemiseHt.md +0 -15
- data/docs/LigneDePosteTauxTvaManuel.md +0 -15
- data/docs/MontantAPayer.md +0 -15
- data/docs/MontantBaseHt.md +0 -15
- data/docs/MontantRemiseGlobaleTtc.md +0 -15
- data/docs/MontantTotalAcompte.md +0 -15
- data/docs/MontantTotalLigneHt.md +0 -15
- data/docs/MontantTvaLigne.md +0 -15
- data/docs/MontantTvaTotal.md +0 -15
- data/docs/Tauxmanuel.md +0 -15
- data/lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb +0 -104
- data/lib/factpulse/models/montant_a_payer.rb +0 -104
- data/lib/factpulse/models/montant_base_ht.rb +0 -104
- data/lib/factpulse/models/montant_remise_globale_ttc.rb +0 -104
- data/lib/factpulse/models/montant_total_acompte.rb +0 -104
- data/lib/factpulse/models/montant_total_ligne_ht.rb +0 -104
- data/lib/factpulse/models/montant_tva_ligne.rb +0 -104
- data/lib/factpulse/models/montant_tva_total.rb +0 -104
- data/lib/factpulse/models/tauxmanuel.rb +0 -104
|
@@ -16,16 +16,22 @@ require 'time'
|
|
|
16
16
|
module FactPulse
|
|
17
17
|
# Contient tous les montants totaux de la facture.
|
|
18
18
|
class MontantTotal < ApiModelBase
|
|
19
|
+
# Montant total HT.
|
|
19
20
|
attr_accessor :montant_ht_total
|
|
20
21
|
|
|
22
|
+
# Montant total de la TVA.
|
|
21
23
|
attr_accessor :montant_tva
|
|
22
24
|
|
|
25
|
+
# Montant total TTC.
|
|
23
26
|
attr_accessor :montant_ttc_total
|
|
24
27
|
|
|
28
|
+
# Montant à payer.
|
|
25
29
|
attr_accessor :montant_a_payer
|
|
26
30
|
|
|
31
|
+
# Acompte versé.
|
|
27
32
|
attr_accessor :acompte
|
|
28
33
|
|
|
34
|
+
# Montant de la remise globale TTC.
|
|
29
35
|
attr_accessor :montant_remise_globale_ttc
|
|
30
36
|
|
|
31
37
|
attr_accessor :motif_remise_globale_ttc
|
|
@@ -56,12 +62,12 @@ module FactPulse
|
|
|
56
62
|
# Attribute type mapping.
|
|
57
63
|
def self.openapi_types
|
|
58
64
|
{
|
|
59
|
-
:'montant_ht_total' => :'
|
|
60
|
-
:'montant_tva' => :'
|
|
61
|
-
:'montant_ttc_total' => :'
|
|
62
|
-
:'montant_a_payer' => :'
|
|
63
|
-
:'acompte' => :'
|
|
64
|
-
:'montant_remise_globale_ttc' => :'
|
|
65
|
+
:'montant_ht_total' => :'Float',
|
|
66
|
+
:'montant_tva' => :'Float',
|
|
67
|
+
:'montant_ttc_total' => :'Float',
|
|
68
|
+
:'montant_a_payer' => :'Float',
|
|
69
|
+
:'acompte' => :'Float',
|
|
70
|
+
:'montant_remise_globale_ttc' => :'Float',
|
|
65
71
|
:'motif_remise_globale_ttc' => :'String'
|
|
66
72
|
}
|
|
67
73
|
end
|
|
@@ -70,7 +76,6 @@ module FactPulse
|
|
|
70
76
|
def self.openapi_nullable
|
|
71
77
|
Set.new([
|
|
72
78
|
:'acompte',
|
|
73
|
-
:'montant_remise_globale_ttc',
|
|
74
79
|
:'motif_remise_globale_ttc'
|
|
75
80
|
])
|
|
76
81
|
end
|
|
@@ -137,18 +142,48 @@ module FactPulse
|
|
|
137
142
|
invalid_properties.push('invalid value for "montant_ht_total", montant_ht_total cannot be nil.')
|
|
138
143
|
end
|
|
139
144
|
|
|
145
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
146
|
+
if @montant_ht_total !~ pattern
|
|
147
|
+
invalid_properties.push("invalid value for \"montant_ht_total\", must conform to the pattern #{pattern}.")
|
|
148
|
+
end
|
|
149
|
+
|
|
140
150
|
if @montant_tva.nil?
|
|
141
151
|
invalid_properties.push('invalid value for "montant_tva", montant_tva cannot be nil.')
|
|
142
152
|
end
|
|
143
153
|
|
|
154
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
155
|
+
if @montant_tva !~ pattern
|
|
156
|
+
invalid_properties.push("invalid value for \"montant_tva\", must conform to the pattern #{pattern}.")
|
|
157
|
+
end
|
|
158
|
+
|
|
144
159
|
if @montant_ttc_total.nil?
|
|
145
160
|
invalid_properties.push('invalid value for "montant_ttc_total", montant_ttc_total cannot be nil.')
|
|
146
161
|
end
|
|
147
162
|
|
|
163
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
164
|
+
if @montant_ttc_total !~ pattern
|
|
165
|
+
invalid_properties.push("invalid value for \"montant_ttc_total\", must conform to the pattern #{pattern}.")
|
|
166
|
+
end
|
|
167
|
+
|
|
148
168
|
if @montant_a_payer.nil?
|
|
149
169
|
invalid_properties.push('invalid value for "montant_a_payer", montant_a_payer cannot be nil.')
|
|
150
170
|
end
|
|
151
171
|
|
|
172
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
173
|
+
if @montant_a_payer !~ pattern
|
|
174
|
+
invalid_properties.push("invalid value for \"montant_a_payer\", must conform to the pattern #{pattern}.")
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
178
|
+
if !@acompte.nil? && @acompte !~ pattern
|
|
179
|
+
invalid_properties.push("invalid value for \"acompte\", must conform to the pattern #{pattern}.")
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
183
|
+
if !@montant_remise_globale_ttc.nil? && @montant_remise_globale_ttc !~ pattern
|
|
184
|
+
invalid_properties.push("invalid value for \"montant_remise_globale_ttc\", must conform to the pattern #{pattern}.")
|
|
185
|
+
end
|
|
186
|
+
|
|
152
187
|
invalid_properties
|
|
153
188
|
end
|
|
154
189
|
|
|
@@ -157,9 +192,15 @@ module FactPulse
|
|
|
157
192
|
def valid?
|
|
158
193
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
159
194
|
return false if @montant_ht_total.nil?
|
|
195
|
+
return false if @montant_ht_total !~ Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
160
196
|
return false if @montant_tva.nil?
|
|
197
|
+
return false if @montant_tva !~ Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
161
198
|
return false if @montant_ttc_total.nil?
|
|
199
|
+
return false if @montant_ttc_total !~ Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
162
200
|
return false if @montant_a_payer.nil?
|
|
201
|
+
return false if @montant_a_payer !~ Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
202
|
+
return false if !@acompte.nil? && @acompte !~ Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
203
|
+
return false if !@montant_remise_globale_ttc.nil? && @montant_remise_globale_ttc !~ Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
163
204
|
true
|
|
164
205
|
end
|
|
165
206
|
|
|
@@ -170,6 +211,11 @@ module FactPulse
|
|
|
170
211
|
fail ArgumentError, 'montant_ht_total cannot be nil'
|
|
171
212
|
end
|
|
172
213
|
|
|
214
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
215
|
+
if montant_ht_total !~ pattern
|
|
216
|
+
fail ArgumentError, "invalid value for \"montant_ht_total\", must conform to the pattern #{pattern}."
|
|
217
|
+
end
|
|
218
|
+
|
|
173
219
|
@montant_ht_total = montant_ht_total
|
|
174
220
|
end
|
|
175
221
|
|
|
@@ -180,6 +226,11 @@ module FactPulse
|
|
|
180
226
|
fail ArgumentError, 'montant_tva cannot be nil'
|
|
181
227
|
end
|
|
182
228
|
|
|
229
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
230
|
+
if montant_tva !~ pattern
|
|
231
|
+
fail ArgumentError, "invalid value for \"montant_tva\", must conform to the pattern #{pattern}."
|
|
232
|
+
end
|
|
233
|
+
|
|
183
234
|
@montant_tva = montant_tva
|
|
184
235
|
end
|
|
185
236
|
|
|
@@ -190,6 +241,11 @@ module FactPulse
|
|
|
190
241
|
fail ArgumentError, 'montant_ttc_total cannot be nil'
|
|
191
242
|
end
|
|
192
243
|
|
|
244
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
245
|
+
if montant_ttc_total !~ pattern
|
|
246
|
+
fail ArgumentError, "invalid value for \"montant_ttc_total\", must conform to the pattern #{pattern}."
|
|
247
|
+
end
|
|
248
|
+
|
|
193
249
|
@montant_ttc_total = montant_ttc_total
|
|
194
250
|
end
|
|
195
251
|
|
|
@@ -200,9 +256,40 @@ module FactPulse
|
|
|
200
256
|
fail ArgumentError, 'montant_a_payer cannot be nil'
|
|
201
257
|
end
|
|
202
258
|
|
|
259
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
260
|
+
if montant_a_payer !~ pattern
|
|
261
|
+
fail ArgumentError, "invalid value for \"montant_a_payer\", must conform to the pattern #{pattern}."
|
|
262
|
+
end
|
|
263
|
+
|
|
203
264
|
@montant_a_payer = montant_a_payer
|
|
204
265
|
end
|
|
205
266
|
|
|
267
|
+
# Custom attribute writer method with validation
|
|
268
|
+
# @param [Object] acompte Value to be assigned
|
|
269
|
+
def acompte=(acompte)
|
|
270
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
271
|
+
if !acompte.nil? && acompte !~ pattern
|
|
272
|
+
fail ArgumentError, "invalid value for \"acompte\", must conform to the pattern #{pattern}."
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
@acompte = acompte
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Custom attribute writer method with validation
|
|
279
|
+
# @param [Object] montant_remise_globale_ttc Value to be assigned
|
|
280
|
+
def montant_remise_globale_ttc=(montant_remise_globale_ttc)
|
|
281
|
+
if montant_remise_globale_ttc.nil?
|
|
282
|
+
fail ArgumentError, 'montant_remise_globale_ttc cannot be nil'
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
pattern = Regexp.new(/^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,13}0*$)\d{0,8}\.\d{0,4}0*$)/)
|
|
286
|
+
if montant_remise_globale_ttc !~ pattern
|
|
287
|
+
fail ArgumentError, "invalid value for \"montant_remise_globale_ttc\", must conform to the pattern #{pattern}."
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
@montant_remise_globale_ttc = montant_remise_globale_ttc
|
|
291
|
+
end
|
|
292
|
+
|
|
206
293
|
# Checks equality by comparing each attribute.
|
|
207
294
|
# @param [Object] Object to be compared
|
|
208
295
|
def ==(o)
|
|
@@ -14,91 +14,162 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module FactPulse
|
|
17
|
-
#
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
# Note de facture (IncludedNote en Factur-X). Les notes obligatoires pour BR-FR-05 sont : - PMT : Indemnité forfaitaire pour frais de recouvrement - PMD : Pénalités de retard - AAB : Escompte pour paiement anticipé
|
|
18
|
+
class Note < ApiModelBase
|
|
19
|
+
attr_accessor :subject_code
|
|
20
|
+
|
|
21
|
+
attr_accessor :content
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'subject_code' => :'subjectCode',
|
|
27
|
+
:'content' => :'content'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'subject_code' => :'String',
|
|
45
|
+
:'content' => :'String'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
:'subject_code',
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::Note` initialize method"
|
|
26
61
|
end
|
|
27
62
|
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
# Note:
|
|
34
|
-
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
35
|
-
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
36
|
-
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
37
|
-
# - TODO: logging when debugging is set.
|
|
38
|
-
openapi_any_of.each do |klass|
|
|
39
|
-
begin
|
|
40
|
-
next if klass == :AnyType # "nullable: true"
|
|
41
|
-
return find_and_cast_into_type(klass, data)
|
|
42
|
-
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
43
|
-
end
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::Note`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
44
68
|
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
45
71
|
|
|
46
|
-
|
|
72
|
+
if attributes.key?(:'subject_code')
|
|
73
|
+
self.subject_code = attributes[:'subject_code']
|
|
47
74
|
end
|
|
48
75
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
76
|
+
if attributes.key?(:'content')
|
|
77
|
+
self.content = attributes[:'content']
|
|
78
|
+
else
|
|
79
|
+
self.content = nil
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if @content.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "content", content cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
99
|
+
return false if @content.nil?
|
|
100
|
+
true
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Custom attribute writer method with validation
|
|
104
|
+
# @param [Object] content Value to be assigned
|
|
105
|
+
def content=(content)
|
|
106
|
+
if content.nil?
|
|
107
|
+
fail ArgumentError, 'content cannot be nil'
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
@content = content
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Checks equality by comparing each attribute.
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def ==(o)
|
|
116
|
+
return true if self.equal?(o)
|
|
117
|
+
self.class == o.class &&
|
|
118
|
+
subject_code == o.subject_code &&
|
|
119
|
+
content == o.content
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @see the `==` method
|
|
123
|
+
# @param [Object] Object to be compared
|
|
124
|
+
def eql?(o)
|
|
125
|
+
self == o
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Calculates hash code according to all attributes.
|
|
129
|
+
# @return [Integer] Hash code
|
|
130
|
+
def hash
|
|
131
|
+
[subject_code, content].hash
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Builds the object from hash
|
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
136
|
+
# @return [Object] Returns the model itself
|
|
137
|
+
def self.build_from_hash(attributes)
|
|
138
|
+
return nil unless attributes.is_a?(Hash)
|
|
139
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
140
|
+
transformed_hash = {}
|
|
141
|
+
openapi_types.each_pair do |key, type|
|
|
142
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
143
|
+
transformed_hash["#{key}"] = nil
|
|
144
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
145
|
+
# check to ensure the input is an array given that the attribute
|
|
146
|
+
# is documented as an array but the input is not
|
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
148
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
94
149
|
end
|
|
150
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
151
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
new(transformed_hash)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Returns the object in the form of hash
|
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
|
159
|
+
def to_hash
|
|
160
|
+
hash = {}
|
|
161
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
162
|
+
value = self.send(attr)
|
|
163
|
+
if value.nil?
|
|
164
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
165
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
95
166
|
end
|
|
96
167
|
|
|
97
|
-
|
|
98
|
-
rescue
|
|
99
|
-
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
168
|
+
hash[param] = _to_hash(value)
|
|
100
169
|
end
|
|
170
|
+
hash
|
|
101
171
|
end
|
|
172
|
+
|
|
102
173
|
end
|
|
103
174
|
|
|
104
175
|
end
|
data/lib/factpulse/version.rb
CHANGED
data/lib/factpulse.rb
CHANGED
|
@@ -58,26 +58,18 @@ require 'factpulse/models/generate_certificate_response'
|
|
|
58
58
|
require 'factpulse/models/http_validation_error'
|
|
59
59
|
require 'factpulse/models/information_signature_api'
|
|
60
60
|
require 'factpulse/models/ligne_de_poste'
|
|
61
|
-
require 'factpulse/models/ligne_de_poste_montant_remise_ht'
|
|
62
|
-
require 'factpulse/models/ligne_de_poste_taux_tva_manuel'
|
|
63
61
|
require 'factpulse/models/ligne_de_tva'
|
|
64
62
|
require 'factpulse/models/mode_depot'
|
|
65
63
|
require 'factpulse/models/mode_paiement'
|
|
66
|
-
require 'factpulse/models/montant_a_payer'
|
|
67
|
-
require 'factpulse/models/montant_base_ht'
|
|
68
64
|
require 'factpulse/models/montant_ht_total'
|
|
69
65
|
require 'factpulse/models/montant_ht_total1'
|
|
70
|
-
require 'factpulse/models/montant_remise_globale_ttc'
|
|
71
66
|
require 'factpulse/models/montant_total'
|
|
72
|
-
require 'factpulse/models/montant_total_acompte'
|
|
73
|
-
require 'factpulse/models/montant_total_ligne_ht'
|
|
74
67
|
require 'factpulse/models/montant_ttc_total'
|
|
75
68
|
require 'factpulse/models/montant_ttc_total1'
|
|
76
69
|
require 'factpulse/models/montant_tva'
|
|
77
70
|
require 'factpulse/models/montant_tva1'
|
|
78
|
-
require 'factpulse/models/montant_tva_ligne'
|
|
79
|
-
require 'factpulse/models/montant_tva_total'
|
|
80
71
|
require 'factpulse/models/montant_unitaire_ht'
|
|
72
|
+
require 'factpulse/models/note'
|
|
81
73
|
require 'factpulse/models/obtenir_id_chorus_pro_request'
|
|
82
74
|
require 'factpulse/models/obtenir_id_chorus_pro_response'
|
|
83
75
|
require 'factpulse/models/options_processing'
|
|
@@ -109,7 +101,6 @@ require 'factpulse/models/statut_celery'
|
|
|
109
101
|
require 'factpulse/models/statut_facture'
|
|
110
102
|
require 'factpulse/models/statut_tache'
|
|
111
103
|
require 'factpulse/models/structure_info'
|
|
112
|
-
require 'factpulse/models/tauxmanuel'
|
|
113
104
|
require 'factpulse/models/type_facture'
|
|
114
105
|
require 'factpulse/models/type_tva'
|
|
115
106
|
require 'factpulse/models/unite'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: factpulse
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -166,26 +166,18 @@ files:
|
|
|
166
166
|
- docs/HTTPValidationError.md
|
|
167
167
|
- docs/InformationSignatureAPI.md
|
|
168
168
|
- docs/LigneDePoste.md
|
|
169
|
-
- docs/LigneDePosteMontantRemiseHt.md
|
|
170
|
-
- docs/LigneDePosteTauxTvaManuel.md
|
|
171
169
|
- docs/LigneDeTVA.md
|
|
172
170
|
- docs/ModeDepot.md
|
|
173
171
|
- docs/ModePaiement.md
|
|
174
|
-
- docs/MontantAPayer.md
|
|
175
|
-
- docs/MontantBaseHt.md
|
|
176
172
|
- docs/MontantHtTotal.md
|
|
177
173
|
- docs/MontantHtTotal1.md
|
|
178
|
-
- docs/MontantRemiseGlobaleTtc.md
|
|
179
174
|
- docs/MontantTotal.md
|
|
180
|
-
- docs/MontantTotalAcompte.md
|
|
181
|
-
- docs/MontantTotalLigneHt.md
|
|
182
175
|
- docs/MontantTtcTotal.md
|
|
183
176
|
- docs/MontantTtcTotal1.md
|
|
184
177
|
- docs/MontantTva.md
|
|
185
178
|
- docs/MontantTva1.md
|
|
186
|
-
- docs/MontantTvaLigne.md
|
|
187
|
-
- docs/MontantTvaTotal.md
|
|
188
179
|
- docs/MontantUnitaireHt.md
|
|
180
|
+
- docs/Note.md
|
|
189
181
|
- docs/ObtenirIdChorusProRequest.md
|
|
190
182
|
- docs/ObtenirIdChorusProResponse.md
|
|
191
183
|
- docs/OptionsProcessing.md
|
|
@@ -218,7 +210,6 @@ files:
|
|
|
218
210
|
- docs/StatutFacture.md
|
|
219
211
|
- docs/StatutTache.md
|
|
220
212
|
- docs/StructureInfo.md
|
|
221
|
-
- docs/Tauxmanuel.md
|
|
222
213
|
- docs/TraitementFactureApi.md
|
|
223
214
|
- docs/TypeFacture.md
|
|
224
215
|
- docs/TypeTVA.md
|
|
@@ -281,26 +272,18 @@ files:
|
|
|
281
272
|
- lib/factpulse/models/http_validation_error.rb
|
|
282
273
|
- lib/factpulse/models/information_signature_api.rb
|
|
283
274
|
- lib/factpulse/models/ligne_de_poste.rb
|
|
284
|
-
- lib/factpulse/models/ligne_de_poste_montant_remise_ht.rb
|
|
285
|
-
- lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb
|
|
286
275
|
- lib/factpulse/models/ligne_de_tva.rb
|
|
287
276
|
- lib/factpulse/models/mode_depot.rb
|
|
288
277
|
- lib/factpulse/models/mode_paiement.rb
|
|
289
|
-
- lib/factpulse/models/montant_a_payer.rb
|
|
290
|
-
- lib/factpulse/models/montant_base_ht.rb
|
|
291
278
|
- lib/factpulse/models/montant_ht_total.rb
|
|
292
279
|
- lib/factpulse/models/montant_ht_total1.rb
|
|
293
|
-
- lib/factpulse/models/montant_remise_globale_ttc.rb
|
|
294
280
|
- lib/factpulse/models/montant_total.rb
|
|
295
|
-
- lib/factpulse/models/montant_total_acompte.rb
|
|
296
|
-
- lib/factpulse/models/montant_total_ligne_ht.rb
|
|
297
281
|
- lib/factpulse/models/montant_ttc_total.rb
|
|
298
282
|
- lib/factpulse/models/montant_ttc_total1.rb
|
|
299
283
|
- lib/factpulse/models/montant_tva.rb
|
|
300
284
|
- lib/factpulse/models/montant_tva1.rb
|
|
301
|
-
- lib/factpulse/models/montant_tva_ligne.rb
|
|
302
|
-
- lib/factpulse/models/montant_tva_total.rb
|
|
303
285
|
- lib/factpulse/models/montant_unitaire_ht.rb
|
|
286
|
+
- lib/factpulse/models/note.rb
|
|
304
287
|
- lib/factpulse/models/obtenir_id_chorus_pro_request.rb
|
|
305
288
|
- lib/factpulse/models/obtenir_id_chorus_pro_response.rb
|
|
306
289
|
- lib/factpulse/models/options_processing.rb
|
|
@@ -332,7 +315,6 @@ files:
|
|
|
332
315
|
- lib/factpulse/models/statut_facture.rb
|
|
333
316
|
- lib/factpulse/models/statut_tache.rb
|
|
334
317
|
- lib/factpulse/models/structure_info.rb
|
|
335
|
-
- lib/factpulse/models/tauxmanuel.rb
|
|
336
318
|
- lib/factpulse/models/type_facture.rb
|
|
337
319
|
- lib/factpulse/models/type_tva.rb
|
|
338
320
|
- lib/factpulse/models/unite.rb
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# FactPulse::LigneDePosteMontantRemiseHt
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
|
|
8
|
-
## Example
|
|
9
|
-
|
|
10
|
-
```ruby
|
|
11
|
-
require 'factpulse'
|
|
12
|
-
|
|
13
|
-
instance = FactPulse::LigneDePosteMontantRemiseHt.new()
|
|
14
|
-
```
|
|
15
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# FactPulse::LigneDePosteTauxTvaManuel
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
|
|
8
|
-
## Example
|
|
9
|
-
|
|
10
|
-
```ruby
|
|
11
|
-
require 'factpulse'
|
|
12
|
-
|
|
13
|
-
instance = FactPulse::LigneDePosteTauxTvaManuel.new()
|
|
14
|
-
```
|
|
15
|
-
|
data/docs/MontantAPayer.md
DELETED
data/docs/MontantBaseHt.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# FactPulse::MontantRemiseGlobaleTtc
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
|
|
8
|
-
## Example
|
|
9
|
-
|
|
10
|
-
```ruby
|
|
11
|
-
require 'factpulse'
|
|
12
|
-
|
|
13
|
-
instance = FactPulse::MontantRemiseGlobaleTtc.new()
|
|
14
|
-
```
|
|
15
|
-
|
data/docs/MontantTotalAcompte.md
DELETED
data/docs/MontantTotalLigneHt.md
DELETED