facturx 0.2.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -3
  3. data/DOCUMENTATION.md +271 -0
  4. data/README.md +79 -69
  5. data/lib/facturx/attach.rb +4 -20
  6. data/lib/facturx/builders/association.rb +8 -0
  7. data/lib/facturx/builders/base.rb +129 -0
  8. data/lib/facturx/builders/schema.rb +112 -0
  9. data/lib/facturx/builders.rb +25 -0
  10. data/lib/facturx/error.rb +7 -1
  11. data/lib/facturx/format.rb +85 -0
  12. data/lib/facturx/generate.rb +21 -0
  13. data/lib/facturx/pdf/composer.rb +32 -0
  14. data/lib/facturx/profile.rb +1 -1
  15. data/lib/facturx/profile_resolver.rb +40 -0
  16. data/lib/facturx/profiles.rb +1 -8
  17. data/lib/facturx/reader/semantic_mapper/line_mapping.rb +1 -1
  18. data/lib/facturx/reader/semantic_mapper/line_references.rb +19 -0
  19. data/lib/facturx/reader/semantic_mapper/payment_mapping.rb +48 -11
  20. data/lib/facturx/reader/semantic_mapper.rb +9 -0
  21. data/lib/facturx/reader/term_reader.rb +12 -4
  22. data/lib/facturx/reader.rb +3 -7
  23. data/lib/facturx/source_reader.rb +1 -1
  24. data/lib/facturx/validation.rb +61 -0
  25. data/lib/facturx/version.rb +1 -1
  26. data/lib/facturx/writer/context.rb +53 -0
  27. data/lib/facturx/writer/stage.rb +47 -0
  28. data/lib/facturx/writer/stage_support/contact_details.rb +57 -0
  29. data/lib/facturx/writer/stage_support/emission.rb +78 -0
  30. data/lib/facturx/writer/stage_support/identifiers.rb +129 -0
  31. data/lib/facturx/writer/stage_support/structure.rb +88 -0
  32. data/lib/facturx/writer/stages/document_context.rb +31 -0
  33. data/lib/facturx/writer/stages/exchanged_document.rb +32 -0
  34. data/lib/facturx/writer/stages/trade_agreement/parties.rb +105 -0
  35. data/lib/facturx/writer/stages/trade_agreement/references.rb +92 -0
  36. data/lib/facturx/writer/stages/trade_agreement.rb +45 -0
  37. data/lib/facturx/writer/stages/trade_delivery.rb +77 -0
  38. data/lib/facturx/writer/stages/trade_lines/agreement.rb +92 -0
  39. data/lib/facturx/writer/stages/trade_lines/product.rb +78 -0
  40. data/lib/facturx/writer/stages/trade_lines/quantity.rb +17 -0
  41. data/lib/facturx/writer/stages/trade_lines/settlement.rb +89 -0
  42. data/lib/facturx/writer/stages/trade_lines.rb +67 -0
  43. data/lib/facturx/writer/stages/trade_settlement/parties.rb +33 -0
  44. data/lib/facturx/writer/stages/trade_settlement/payment.rb +97 -0
  45. data/lib/facturx/writer/stages/trade_settlement/summary.rb +88 -0
  46. data/lib/facturx/writer/stages/trade_settlement/taxes.rb +121 -0
  47. data/lib/facturx/writer/stages/trade_settlement.rb +70 -0
  48. data/lib/facturx/writer/tracker.rb +131 -0
  49. data/lib/facturx/writer.rb +76 -0
  50. data/lib/facturx/xml/namespaces.rb +19 -0
  51. data/lib/facturx/xml/parser.rb +1 -1
  52. data/lib/facturx/xml/profile_detector.rb +2 -4
  53. data/lib/facturx/xml/report_builder.rb +44 -0
  54. data/lib/facturx/xml/schema_registry.rb +22 -0
  55. data/lib/facturx/xml/schema_validator.rb +7 -2
  56. data/lib/facturx/xml/validator.rb +32 -0
  57. data/lib/facturx/xml/verifier.rb +16 -11
  58. data/lib/facturx.rb +41 -4
  59. data/rbi/facturx.rbi +1755 -0
  60. metadata +44 -4
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facturx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AdVitam
@@ -43,8 +43,8 @@ dependencies:
43
43
  - - "<"
44
44
  - !ruby/object:Gem::Version
45
45
  version: '3'
46
- description: Ruby toolkit for reading and validating Factur-X XML and composing or
47
- extracting PDF/A-3 invoices.
46
+ description: Ruby toolkit for building, reading, and validating Factur-X XML and composing
47
+ or extracting PDF/A-3 invoices.
48
48
  email:
49
49
  - tech@advitam.fr
50
50
  executables: []
@@ -52,11 +52,16 @@ extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
54
  - CHANGELOG.md
55
+ - DOCUMENTATION.md
55
56
  - LICENSE.txt
56
57
  - NOTICE.md
57
58
  - README.md
58
59
  - lib/facturx.rb
59
60
  - lib/facturx/attach.rb
61
+ - lib/facturx/builders.rb
62
+ - lib/facturx/builders/association.rb
63
+ - lib/facturx/builders/base.rb
64
+ - lib/facturx/builders/schema.rb
60
65
  - lib/facturx/coerce.rb
61
66
  - lib/facturx/composers/ghostscript.rb
62
67
  - lib/facturx/composers/ghostscript/defaults.rb
@@ -68,6 +73,8 @@ files:
68
73
  - lib/facturx/document.rb
69
74
  - lib/facturx/embedding.rb
70
75
  - lib/facturx/error.rb
76
+ - lib/facturx/format.rb
77
+ - lib/facturx/generate.rb
71
78
  - lib/facturx/group.rb
72
79
  - lib/facturx/model.rb
73
80
  - lib/facturx/model/common.rb
@@ -77,12 +84,14 @@ files:
77
84
  - lib/facturx/model/payment.rb
78
85
  - lib/facturx/model/reference.rb
79
86
  - lib/facturx/model/trade.rb
87
+ - lib/facturx/pdf/composer.rb
80
88
  - lib/facturx/pdf/document.rb
81
89
  - lib/facturx/pdf/extractor.rb
82
90
  - lib/facturx/pdf/inspector.rb
83
91
  - lib/facturx/pdf/name_tree.rb
84
92
  - lib/facturx/pdf/verifier.rb
85
93
  - lib/facturx/profile.rb
94
+ - lib/facturx/profile_resolver.rb
86
95
  - lib/facturx/profiles.rb
87
96
  - lib/facturx/reader.rb
88
97
  - lib/facturx/reader/semantic_mapper.rb
@@ -90,6 +99,7 @@ files:
90
99
  - lib/facturx/reader/semantic_mapper/document_mapping.rb
91
100
  - lib/facturx/reader/semantic_mapper/helpers.rb
92
101
  - lib/facturx/reader/semantic_mapper/line_mapping.rb
102
+ - lib/facturx/reader/semantic_mapper/line_references.rb
93
103
  - lib/facturx/reader/semantic_mapper/party_mapping.rb
94
104
  - lib/facturx/reader/semantic_mapper/payment_mapping.rb
95
105
  - lib/facturx/reader/semantic_mapper/trade_mapping.rb
@@ -136,11 +146,41 @@ files:
136
146
  - lib/facturx/terms/declarations/taxes.rb
137
147
  - lib/facturx/terms/declarations/totals.rb
138
148
  - lib/facturx/terms/reference.rb
149
+ - lib/facturx/validation.rb
139
150
  - lib/facturx/version.rb
151
+ - lib/facturx/writer.rb
152
+ - lib/facturx/writer/context.rb
153
+ - lib/facturx/writer/stage.rb
154
+ - lib/facturx/writer/stage_support/contact_details.rb
155
+ - lib/facturx/writer/stage_support/emission.rb
156
+ - lib/facturx/writer/stage_support/identifiers.rb
157
+ - lib/facturx/writer/stage_support/structure.rb
158
+ - lib/facturx/writer/stages/document_context.rb
159
+ - lib/facturx/writer/stages/exchanged_document.rb
160
+ - lib/facturx/writer/stages/trade_agreement.rb
161
+ - lib/facturx/writer/stages/trade_agreement/parties.rb
162
+ - lib/facturx/writer/stages/trade_agreement/references.rb
163
+ - lib/facturx/writer/stages/trade_delivery.rb
164
+ - lib/facturx/writer/stages/trade_lines.rb
165
+ - lib/facturx/writer/stages/trade_lines/agreement.rb
166
+ - lib/facturx/writer/stages/trade_lines/product.rb
167
+ - lib/facturx/writer/stages/trade_lines/quantity.rb
168
+ - lib/facturx/writer/stages/trade_lines/settlement.rb
169
+ - lib/facturx/writer/stages/trade_settlement.rb
170
+ - lib/facturx/writer/stages/trade_settlement/parties.rb
171
+ - lib/facturx/writer/stages/trade_settlement/payment.rb
172
+ - lib/facturx/writer/stages/trade_settlement/summary.rb
173
+ - lib/facturx/writer/stages/trade_settlement/taxes.rb
174
+ - lib/facturx/writer/tracker.rb
175
+ - lib/facturx/xml/namespaces.rb
140
176
  - lib/facturx/xml/parser.rb
141
177
  - lib/facturx/xml/profile_detector.rb
178
+ - lib/facturx/xml/report_builder.rb
179
+ - lib/facturx/xml/schema_registry.rb
142
180
  - lib/facturx/xml/schema_validator.rb
181
+ - lib/facturx/xml/validator.rb
143
182
  - lib/facturx/xml/verifier.rb
183
+ - rbi/facturx.rbi
144
184
  homepage: https://github.com/AdVitam/facturx
145
185
  licenses:
146
186
  - MIT
@@ -167,5 +207,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
207
  requirements: []
168
208
  rubygems_version: 4.0.16
169
209
  specification_version: 4
170
- summary: Read, validate, compose, and extract Factur-X invoices
210
+ summary: Build, read, validate, compose, and extract Factur-X invoices
171
211
  test_files: []