facturx 0.1.0 → 1.0.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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -2
  3. data/NOTICE.md +2 -0
  4. data/README.md +62 -4
  5. data/lib/facturx/builders/association.rb +8 -0
  6. data/lib/facturx/builders/base.rb +129 -0
  7. data/lib/facturx/builders/schema.rb +112 -0
  8. data/lib/facturx/builders.rb +25 -0
  9. data/lib/facturx/coerce.rb +74 -0
  10. data/lib/facturx/conformance.rb +163 -0
  11. data/lib/facturx/diagnostic.rb +20 -0
  12. data/lib/facturx/document.rb +45 -0
  13. data/lib/facturx/error.rb +3 -0
  14. data/lib/facturx/format.rb +85 -0
  15. data/lib/facturx/generate.rb +21 -0
  16. data/lib/facturx/group.rb +5 -0
  17. data/lib/facturx/model/common.rb +8 -0
  18. data/lib/facturx/model/immutable.rb +75 -0
  19. data/lib/facturx/model/line.rb +14 -0
  20. data/lib/facturx/model/party.rb +10 -0
  21. data/lib/facturx/model/payment.rb +9 -0
  22. data/lib/facturx/model/reference.rb +7 -0
  23. data/lib/facturx/model/trade.rb +9 -0
  24. data/lib/facturx/model.rb +9 -0
  25. data/lib/facturx/pdf/extractor.rb +7 -4
  26. data/lib/facturx/profile_resolver.rb +40 -0
  27. data/lib/facturx/reader/semantic_mapper/delivery_mapping.rb +43 -0
  28. data/lib/facturx/reader/semantic_mapper/document_mapping.rb +109 -0
  29. data/lib/facturx/reader/semantic_mapper/helpers.rb +114 -0
  30. data/lib/facturx/reader/semantic_mapper/line_mapping.rb +120 -0
  31. data/lib/facturx/reader/semantic_mapper/line_references.rb +19 -0
  32. data/lib/facturx/reader/semantic_mapper/party_mapping.rb +90 -0
  33. data/lib/facturx/reader/semantic_mapper/payment_mapping.rb +108 -0
  34. data/lib/facturx/reader/semantic_mapper/trade_mapping.rb +83 -0
  35. data/lib/facturx/reader/semantic_mapper.rb +76 -0
  36. data/lib/facturx/reader/term_reader/coercion.rb +69 -0
  37. data/lib/facturx/reader/term_reader/unmapped.rb +37 -0
  38. data/lib/facturx/reader/term_reader.rb +132 -0
  39. data/lib/facturx/reader.rb +97 -0
  40. data/lib/facturx/reading.rb +23 -0
  41. data/lib/facturx/source_reader.rb +30 -0
  42. data/lib/facturx/term.rb +5 -0
  43. data/lib/facturx/terms/declaration.rb +20 -0
  44. data/lib/facturx/terms/declarations/adjustments.rb +230 -0
  45. data/lib/facturx/terms/declarations/delivery.rb +83 -0
  46. data/lib/facturx/terms/declarations/document.rb +223 -0
  47. data/lib/facturx/terms/declarations/groups.rb +356 -0
  48. data/lib/facturx/terms/declarations/lines.rb +166 -0
  49. data/lib/facturx/terms/declarations/parties.rb +609 -0
  50. data/lib/facturx/terms/declarations/payment.rb +106 -0
  51. data/lib/facturx/terms/declarations/products.rb +103 -0
  52. data/lib/facturx/terms/declarations/references.rb +72 -0
  53. data/lib/facturx/terms/declarations/taxes.rb +92 -0
  54. data/lib/facturx/terms/declarations/totals.rb +107 -0
  55. data/lib/facturx/terms/reference.rb +21 -0
  56. data/lib/facturx/terms.rb +109 -0
  57. data/lib/facturx/version.rb +1 -1
  58. data/lib/facturx/writer/context.rb +53 -0
  59. data/lib/facturx/writer/stage.rb +47 -0
  60. data/lib/facturx/writer/stage_support/contact_details.rb +57 -0
  61. data/lib/facturx/writer/stage_support/emission.rb +78 -0
  62. data/lib/facturx/writer/stage_support/identifiers.rb +129 -0
  63. data/lib/facturx/writer/stage_support/structure.rb +88 -0
  64. data/lib/facturx/writer/stages/document_context.rb +31 -0
  65. data/lib/facturx/writer/stages/exchanged_document.rb +32 -0
  66. data/lib/facturx/writer/stages/trade_agreement/parties.rb +105 -0
  67. data/lib/facturx/writer/stages/trade_agreement/references.rb +92 -0
  68. data/lib/facturx/writer/stages/trade_agreement.rb +45 -0
  69. data/lib/facturx/writer/stages/trade_delivery.rb +77 -0
  70. data/lib/facturx/writer/stages/trade_lines/agreement.rb +92 -0
  71. data/lib/facturx/writer/stages/trade_lines/product.rb +78 -0
  72. data/lib/facturx/writer/stages/trade_lines/quantity.rb +17 -0
  73. data/lib/facturx/writer/stages/trade_lines/settlement.rb +89 -0
  74. data/lib/facturx/writer/stages/trade_lines.rb +67 -0
  75. data/lib/facturx/writer/stages/trade_settlement/parties.rb +33 -0
  76. data/lib/facturx/writer/stages/trade_settlement/payment.rb +97 -0
  77. data/lib/facturx/writer/stages/trade_settlement/summary.rb +88 -0
  78. data/lib/facturx/writer/stages/trade_settlement/taxes.rb +121 -0
  79. data/lib/facturx/writer/stages/trade_settlement.rb +70 -0
  80. data/lib/facturx/writer.rb +68 -0
  81. data/lib/facturx/xml/namespaces.rb +19 -0
  82. data/lib/facturx/xml/profile_detector.rb +2 -4
  83. data/lib/facturx.rb +42 -0
  84. data/rbi/facturx.rbi +1090 -0
  85. metadata +79 -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.1.0
4
+ version: 1.0.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 validating Factur-X XML and composing or extracting
47
- 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: []
@@ -57,21 +57,55 @@ files:
57
57
  - README.md
58
58
  - lib/facturx.rb
59
59
  - lib/facturx/attach.rb
60
+ - lib/facturx/builders.rb
61
+ - lib/facturx/builders/association.rb
62
+ - lib/facturx/builders/base.rb
63
+ - lib/facturx/builders/schema.rb
64
+ - lib/facturx/coerce.rb
60
65
  - lib/facturx/composers/ghostscript.rb
61
66
  - lib/facturx/composers/ghostscript/defaults.rb
62
67
  - lib/facturx/composers/ghostscript/locator.rb
63
68
  - lib/facturx/composers/ghostscript/output_capture.rb
64
69
  - lib/facturx/composers/ghostscript/runner.rb
65
70
  - lib/facturx/composers/ghostscript/version_probe.rb
71
+ - lib/facturx/conformance.rb
72
+ - lib/facturx/diagnostic.rb
73
+ - lib/facturx/document.rb
66
74
  - lib/facturx/embedding.rb
67
75
  - lib/facturx/error.rb
76
+ - lib/facturx/format.rb
77
+ - lib/facturx/generate.rb
78
+ - lib/facturx/group.rb
79
+ - lib/facturx/model.rb
80
+ - lib/facturx/model/common.rb
81
+ - lib/facturx/model/immutable.rb
82
+ - lib/facturx/model/line.rb
83
+ - lib/facturx/model/party.rb
84
+ - lib/facturx/model/payment.rb
85
+ - lib/facturx/model/reference.rb
86
+ - lib/facturx/model/trade.rb
68
87
  - lib/facturx/pdf/document.rb
69
88
  - lib/facturx/pdf/extractor.rb
70
89
  - lib/facturx/pdf/inspector.rb
71
90
  - lib/facturx/pdf/name_tree.rb
72
91
  - lib/facturx/pdf/verifier.rb
73
92
  - lib/facturx/profile.rb
93
+ - lib/facturx/profile_resolver.rb
74
94
  - lib/facturx/profiles.rb
95
+ - lib/facturx/reader.rb
96
+ - lib/facturx/reader/semantic_mapper.rb
97
+ - lib/facturx/reader/semantic_mapper/delivery_mapping.rb
98
+ - lib/facturx/reader/semantic_mapper/document_mapping.rb
99
+ - lib/facturx/reader/semantic_mapper/helpers.rb
100
+ - lib/facturx/reader/semantic_mapper/line_mapping.rb
101
+ - lib/facturx/reader/semantic_mapper/line_references.rb
102
+ - lib/facturx/reader/semantic_mapper/party_mapping.rb
103
+ - lib/facturx/reader/semantic_mapper/payment_mapping.rb
104
+ - lib/facturx/reader/semantic_mapper/trade_mapping.rb
105
+ - lib/facturx/reader/term_reader.rb
106
+ - lib/facturx/reader/term_reader/coercion.rb
107
+ - lib/facturx/reader/term_reader/unmapped.rb
108
+ - lib/facturx/reading.rb
75
109
  - lib/facturx/schema/1.09.2/basic-wl/Factur-X_1.09.2_BASICWL.xsd
76
110
  - lib/facturx/schema/1.09.2/basic-wl/Factur-X_1.09.2_BASICWL_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd
77
111
  - lib/facturx/schema/1.09.2/basic-wl/Factur-X_1.09.2_BASICWL_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd
@@ -95,11 +129,52 @@ files:
95
129
  - lib/facturx/schema/LICENSE-APACHE-2.0.txt
96
130
  - lib/facturx/schema/NOTICE.md
97
131
  - lib/facturx/schema/SHA256SUMS
132
+ - lib/facturx/source_reader.rb
133
+ - lib/facturx/term.rb
134
+ - lib/facturx/terms.rb
135
+ - lib/facturx/terms/declaration.rb
136
+ - lib/facturx/terms/declarations/adjustments.rb
137
+ - lib/facturx/terms/declarations/delivery.rb
138
+ - lib/facturx/terms/declarations/document.rb
139
+ - lib/facturx/terms/declarations/groups.rb
140
+ - lib/facturx/terms/declarations/lines.rb
141
+ - lib/facturx/terms/declarations/parties.rb
142
+ - lib/facturx/terms/declarations/payment.rb
143
+ - lib/facturx/terms/declarations/products.rb
144
+ - lib/facturx/terms/declarations/references.rb
145
+ - lib/facturx/terms/declarations/taxes.rb
146
+ - lib/facturx/terms/declarations/totals.rb
147
+ - lib/facturx/terms/reference.rb
98
148
  - lib/facturx/version.rb
149
+ - lib/facturx/writer.rb
150
+ - lib/facturx/writer/context.rb
151
+ - lib/facturx/writer/stage.rb
152
+ - lib/facturx/writer/stage_support/contact_details.rb
153
+ - lib/facturx/writer/stage_support/emission.rb
154
+ - lib/facturx/writer/stage_support/identifiers.rb
155
+ - lib/facturx/writer/stage_support/structure.rb
156
+ - lib/facturx/writer/stages/document_context.rb
157
+ - lib/facturx/writer/stages/exchanged_document.rb
158
+ - lib/facturx/writer/stages/trade_agreement.rb
159
+ - lib/facturx/writer/stages/trade_agreement/parties.rb
160
+ - lib/facturx/writer/stages/trade_agreement/references.rb
161
+ - lib/facturx/writer/stages/trade_delivery.rb
162
+ - lib/facturx/writer/stages/trade_lines.rb
163
+ - lib/facturx/writer/stages/trade_lines/agreement.rb
164
+ - lib/facturx/writer/stages/trade_lines/product.rb
165
+ - lib/facturx/writer/stages/trade_lines/quantity.rb
166
+ - lib/facturx/writer/stages/trade_lines/settlement.rb
167
+ - lib/facturx/writer/stages/trade_settlement.rb
168
+ - lib/facturx/writer/stages/trade_settlement/parties.rb
169
+ - lib/facturx/writer/stages/trade_settlement/payment.rb
170
+ - lib/facturx/writer/stages/trade_settlement/summary.rb
171
+ - lib/facturx/writer/stages/trade_settlement/taxes.rb
172
+ - lib/facturx/xml/namespaces.rb
99
173
  - lib/facturx/xml/parser.rb
100
174
  - lib/facturx/xml/profile_detector.rb
101
175
  - lib/facturx/xml/schema_validator.rb
102
176
  - lib/facturx/xml/verifier.rb
177
+ - rbi/facturx.rbi
103
178
  homepage: https://github.com/AdVitam/facturx
104
179
  licenses:
105
180
  - MIT
@@ -126,5 +201,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
201
  requirements: []
127
202
  rubygems_version: 4.0.16
128
203
  specification_version: 4
129
- summary: Validate, compose, and extract Factur-X invoices
204
+ summary: Build, read, validate, compose, and extract Factur-X invoices
130
205
  test_files: []