factpulse 3.0.5 → 3.0.6

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 (207) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -3
  3. data/Gemfile.lock +1 -1
  4. data/docs/AdditionalDocument.md +26 -0
  5. data/docs/AllowanceCharge.md +32 -0
  6. data/docs/AllowanceTotalAmount.md +15 -0
  7. data/docs/{APIProfile.md → Amount.md} +2 -2
  8. data/docs/{DocumentType.md → BaseAmount.md} +2 -2
  9. data/docs/ChargeTotalAmount.md +15 -0
  10. data/docs/Contact.md +24 -0
  11. data/docs/ConvertErrorResponse.md +26 -0
  12. data/docs/ConvertPendingInputResponse.md +32 -0
  13. data/docs/ConvertResumeRequest.md +18 -0
  14. data/docs/ConvertSuccessResponse.md +36 -0
  15. data/docs/ConvertValidationFailedResponse.md +34 -0
  16. data/docs/DeliveryParty.md +24 -0
  17. data/docs/DocumentConversionApi.md +373 -0
  18. data/docs/DocumentTypeInfo.md +22 -0
  19. data/docs/ExtractionInfo.md +24 -0
  20. data/docs/FacturXInvoice.md +29 -1
  21. data/docs/FacturXProfile.md +15 -0
  22. data/docs/FileInfo.md +20 -0
  23. data/docs/FilesInfo.md +20 -0
  24. data/docs/GrossUnitPrice.md +15 -0
  25. data/docs/IncomingInvoice.md +1 -1
  26. data/docs/InvoiceLine.md +43 -9
  27. data/docs/InvoiceProcessingApi.md +8 -8
  28. data/docs/InvoiceReferences.md +26 -6
  29. data/docs/InvoiceTotals.md +10 -2
  30. data/docs/LineTotalAmount.md +15 -0
  31. data/docs/MissingField.md +28 -0
  32. data/docs/Payee.md +5 -1
  33. data/docs/PaymentCard.md +20 -0
  34. data/docs/Percentage.md +15 -0
  35. data/docs/PostalAddress.md +5 -1
  36. data/docs/PriceAllowanceAmount.md +15 -0
  37. data/docs/PriceBasisQuantity.md +15 -0
  38. data/docs/ProcessingOptions.md +3 -3
  39. data/docs/ProductCharacteristic.md +20 -0
  40. data/docs/ProductClassification.md +22 -0
  41. data/docs/Recipient.md +7 -1
  42. data/docs/RoundingAmount.md +15 -0
  43. data/docs/Supplier.md +17 -1
  44. data/docs/TaxRepresentative.md +22 -0
  45. data/docs/VATLine.md +2 -0
  46. data/docs/VATPointDateCode.md +15 -0
  47. data/docs/ValidationInfo.md +28 -0
  48. data/docs/VatRate.md +15 -0
  49. data/factpulse.gemspec +1 -1
  50. data/lib/factpulse/api/afnorpdppa_api.rb +1 -1
  51. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +1 -1
  52. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +1 -1
  53. data/lib/factpulse/api/chorus_pro_api.rb +1 -1
  54. data/lib/factpulse/api/document_conversion_api.rb +378 -0
  55. data/lib/factpulse/api/health_api.rb +1 -1
  56. data/lib/factpulse/api/invoice_processing_api.rb +9 -9
  57. data/lib/factpulse/api/pdfxml_verification_api.rb +1 -1
  58. data/lib/factpulse/api/user_api.rb +1 -1
  59. data/lib/factpulse/api_client.rb +1 -1
  60. data/lib/factpulse/api_error.rb +1 -1
  61. data/lib/factpulse/api_model_base.rb +1 -1
  62. data/lib/factpulse/configuration.rb +1 -1
  63. data/lib/factpulse/models/acknowledgment_status.rb +1 -1
  64. data/lib/factpulse/models/additional_document.rb +206 -0
  65. data/lib/factpulse/models/afnor_credentials.rb +1 -1
  66. data/lib/factpulse/models/afnor_destination.rb +1 -1
  67. data/lib/factpulse/models/afnor_health_check_response.rb +1 -1
  68. data/lib/factpulse/models/afnor_result.rb +1 -1
  69. data/lib/factpulse/models/allowance_charge.rb +252 -0
  70. data/lib/factpulse/models/allowance_reason_code.rb +1 -1
  71. data/lib/factpulse/models/allowance_total_amount.rb +104 -0
  72. data/lib/factpulse/models/amount.rb +104 -0
  73. data/lib/factpulse/models/amount_due.rb +2 -2
  74. data/lib/factpulse/models/api_error.rb +1 -1
  75. data/lib/factpulse/models/async_task_status.rb +1 -1
  76. data/lib/factpulse/models/base_amount.rb +104 -0
  77. data/lib/factpulse/models/bounding_box_schema.rb +1 -1
  78. data/lib/factpulse/models/celery_status.rb +1 -1
  79. data/lib/factpulse/models/certificate_info_response.rb +1 -1
  80. data/lib/factpulse/models/charge_total_amount.rb +104 -0
  81. data/lib/factpulse/models/chorus_pro_destination.rb +1 -1
  82. data/lib/factpulse/models/chorus_pro_result.rb +1 -1
  83. data/lib/factpulse/models/contact.rb +179 -0
  84. data/lib/factpulse/models/convert_error_response.rb +224 -0
  85. data/lib/factpulse/models/convert_pending_input_response.rb +322 -0
  86. data/lib/factpulse/models/convert_resume_request.rb +151 -0
  87. data/lib/factpulse/models/convert_success_response.rb +360 -0
  88. data/lib/factpulse/models/convert_validation_failed_response.rb +334 -0
  89. data/lib/factpulse/models/delivery_party.rb +179 -0
  90. data/lib/factpulse/models/destination.rb +1 -1
  91. data/lib/factpulse/models/document_type_info.rb +220 -0
  92. data/lib/factpulse/models/electronic_address.rb +1 -1
  93. data/lib/factpulse/models/enriched_invoice_info.rb +1 -1
  94. data/lib/factpulse/models/error_level.rb +1 -1
  95. data/lib/factpulse/models/error_source.rb +1 -1
  96. data/lib/factpulse/models/extraction_info.rb +217 -0
  97. data/lib/factpulse/models/factur_x_invoice.rb +150 -6
  98. data/lib/factpulse/models/{api_profile.rb → factur_x_profile.rb} +4 -4
  99. data/lib/factpulse/models/factur_xpdf_info.rb +1 -1
  100. data/lib/factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb +5 -5
  101. data/lib/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb +1 -1
  102. data/lib/factpulse/models/field_status.rb +1 -1
  103. data/lib/factpulse/models/file_info.rb +161 -0
  104. data/lib/factpulse/models/files_info.rb +159 -0
  105. data/lib/factpulse/models/flow_direction.rb +1 -1
  106. data/lib/factpulse/models/flow_profile.rb +1 -1
  107. data/lib/factpulse/models/flow_summary.rb +1 -1
  108. data/lib/factpulse/models/flow_syntax.rb +1 -1
  109. data/lib/factpulse/models/flow_type.rb +1 -1
  110. data/lib/factpulse/models/generate_certificate_request.rb +6 -6
  111. data/lib/factpulse/models/generate_certificate_response.rb +1 -1
  112. data/lib/factpulse/models/get_chorus_pro_id_request.rb +2 -2
  113. data/lib/factpulse/models/get_chorus_pro_id_response.rb +1 -1
  114. data/lib/factpulse/models/get_invoice_request.rb +2 -2
  115. data/lib/factpulse/models/get_invoice_response.rb +1 -1
  116. data/lib/factpulse/models/get_structure_request.rb +3 -3
  117. data/lib/factpulse/models/get_structure_response.rb +1 -1
  118. data/lib/factpulse/models/global_allowance_amount.rb +2 -2
  119. data/lib/factpulse/models/gross_unit_price.rb +104 -0
  120. data/lib/factpulse/models/http_validation_error.rb +1 -1
  121. data/lib/factpulse/models/incoming_invoice.rb +2 -2
  122. data/lib/factpulse/models/incoming_supplier.rb +1 -1
  123. data/lib/factpulse/models/invoice_format.rb +1 -1
  124. data/lib/factpulse/models/invoice_line.rb +209 -25
  125. data/lib/factpulse/models/invoice_line_allowance_amount.rb +2 -2
  126. data/lib/factpulse/models/invoice_note.rb +1 -1
  127. data/lib/factpulse/models/invoice_references.rb +119 -16
  128. data/lib/factpulse/models/invoice_status.rb +1 -1
  129. data/lib/factpulse/models/invoice_totals.rb +52 -12
  130. data/lib/factpulse/models/invoice_totals_prepayment.rb +2 -2
  131. data/lib/factpulse/models/invoice_type_code.rb +1 -1
  132. data/lib/factpulse/models/invoicing_framework.rb +1 -1
  133. data/lib/factpulse/models/invoicing_framework_code.rb +1 -1
  134. data/lib/factpulse/models/line_net_amount.rb +2 -2
  135. data/lib/factpulse/models/line_total_amount.rb +104 -0
  136. data/lib/factpulse/models/mandatory_note_schema.rb +1 -1
  137. data/lib/factpulse/models/manual_rate.rb +2 -2
  138. data/lib/factpulse/models/manual_vat_rate.rb +2 -2
  139. data/lib/factpulse/models/missing_field.rb +269 -0
  140. data/lib/factpulse/models/operation_nature.rb +1 -1
  141. data/lib/factpulse/models/output_format.rb +1 -1
  142. data/lib/factpulse/models/page_dimensions_schema.rb +1 -1
  143. data/lib/factpulse/models/payee.rb +28 -6
  144. data/lib/factpulse/models/payment_card.rb +159 -0
  145. data/lib/factpulse/models/payment_means.rb +1 -1
  146. data/lib/factpulse/models/pdf_validation_result_api.rb +1 -1
  147. data/lib/factpulse/models/pdp_credentials.rb +6 -6
  148. data/lib/factpulse/models/percentage.rb +104 -0
  149. data/lib/factpulse/models/postal_address.rb +27 -7
  150. data/lib/factpulse/models/price_allowance_amount.rb +104 -0
  151. data/lib/factpulse/models/price_basis_quantity.rb +104 -0
  152. data/lib/factpulse/models/processing_options.rb +10 -10
  153. data/lib/factpulse/models/product_characteristic.rb +193 -0
  154. data/lib/factpulse/models/product_classification.rb +186 -0
  155. data/lib/factpulse/models/quantity.rb +2 -2
  156. data/lib/factpulse/models/recipient.rb +39 -7
  157. data/lib/factpulse/models/rounding_amount.rb +104 -0
  158. data/lib/factpulse/models/scheme_id.rb +12 -6
  159. data/lib/factpulse/models/search_flow_request.rb +8 -8
  160. data/lib/factpulse/models/search_flow_response.rb +1 -1
  161. data/lib/factpulse/models/search_services_response.rb +1 -1
  162. data/lib/factpulse/models/search_structure_request.rb +5 -5
  163. data/lib/factpulse/models/search_structure_response.rb +1 -1
  164. data/lib/factpulse/models/signature_info.rb +1 -1
  165. data/lib/factpulse/models/signature_info_api.rb +1 -1
  166. data/lib/factpulse/models/signature_parameters.rb +1 -1
  167. data/lib/factpulse/models/simplified_invoice_data.rb +1 -1
  168. data/lib/factpulse/models/structure_info.rb +1 -1
  169. data/lib/factpulse/models/structure_parameters.rb +1 -1
  170. data/lib/factpulse/models/structure_service.rb +1 -1
  171. data/lib/factpulse/models/submission_mode.rb +1 -1
  172. data/lib/factpulse/models/submit_complete_invoice_request.rb +1 -1
  173. data/lib/factpulse/models/submit_complete_invoice_response.rb +1 -1
  174. data/lib/factpulse/models/submit_flow_request.rb +7 -7
  175. data/lib/factpulse/models/submit_flow_response.rb +1 -1
  176. data/lib/factpulse/models/submit_gross_amount.rb +1 -1
  177. data/lib/factpulse/models/submit_invoice_request.rb +14 -14
  178. data/lib/factpulse/models/submit_invoice_response.rb +1 -1
  179. data/lib/factpulse/models/submit_net_amount.rb +1 -1
  180. data/lib/factpulse/models/submit_vat_amount.rb +1 -1
  181. data/lib/factpulse/models/supplementary_attachment.rb +1 -1
  182. data/lib/factpulse/models/supplier.rb +89 -7
  183. data/lib/factpulse/models/task_response.rb +1 -1
  184. data/lib/factpulse/models/tax_representative.rb +220 -0
  185. data/lib/factpulse/models/taxable_amount.rb +2 -2
  186. data/lib/factpulse/models/total_gross_amount.rb +2 -2
  187. data/lib/factpulse/models/total_net_amount.rb +2 -2
  188. data/lib/factpulse/models/total_vat_amount.rb +2 -2
  189. data/lib/factpulse/models/unit_net_price.rb +2 -2
  190. data/lib/factpulse/models/unit_of_measure.rb +1 -1
  191. data/lib/factpulse/models/validation_error.rb +1 -1
  192. data/lib/factpulse/models/validation_error_detail.rb +1 -1
  193. data/lib/factpulse/models/validation_error_loc_inner.rb +1 -1
  194. data/lib/factpulse/models/validation_error_response.rb +1 -1
  195. data/lib/factpulse/models/validation_info.rb +255 -0
  196. data/lib/factpulse/models/validation_success_response.rb +1 -1
  197. data/lib/factpulse/models/vat_accounting_code.rb +1 -1
  198. data/lib/factpulse/models/vat_amount.rb +2 -2
  199. data/lib/factpulse/models/vat_category.rb +1 -1
  200. data/lib/factpulse/models/vat_line.rb +13 -3
  201. data/lib/factpulse/models/{document_type.rb → vat_point_date_code.rb} +8 -10
  202. data/lib/factpulse/models/vat_rate.rb +104 -0
  203. data/lib/factpulse/models/verification_success_response.rb +1 -1
  204. data/lib/factpulse/models/verified_field_schema.rb +1 -1
  205. data/lib/factpulse/version.rb +2 -2
  206. data/lib/factpulse.rb +34 -3
  207. metadata +68 -6
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,18 +14,26 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Contains all invoice total amounts.
17
+ # Contains all invoice total amounts (BG-22).
18
18
  class InvoiceTotals < ApiModelBase
19
+ attr_accessor :line_total_amount
20
+
21
+ attr_accessor :allowance_total_amount
22
+
23
+ attr_accessor :charge_total_amount
24
+
19
25
  attr_accessor :total_net_amount
20
26
 
21
27
  attr_accessor :vat_amount
22
28
 
23
29
  attr_accessor :total_gross_amount
24
30
 
25
- attr_accessor :amount_due
26
-
27
31
  attr_accessor :prepayment
28
32
 
33
+ attr_accessor :rounding_amount
34
+
35
+ attr_accessor :amount_due
36
+
29
37
  attr_accessor :global_allowance_amount
30
38
 
31
39
  attr_accessor :global_allowance_reason
@@ -33,11 +41,15 @@ module FactPulse
33
41
  # Attribute mapping from ruby-style variable name to JSON key.
34
42
  def self.attribute_map
35
43
  {
44
+ :'line_total_amount' => :'line_total_amount',
45
+ :'allowance_total_amount' => :'allowance_total_amount',
46
+ :'charge_total_amount' => :'charge_total_amount',
36
47
  :'total_net_amount' => :'total_net_amount',
37
48
  :'vat_amount' => :'vat_amount',
38
49
  :'total_gross_amount' => :'total_gross_amount',
39
- :'amount_due' => :'amount_due',
40
50
  :'prepayment' => :'prepayment',
51
+ :'rounding_amount' => :'rounding_amount',
52
+ :'amount_due' => :'amount_due',
41
53
  :'global_allowance_amount' => :'globalAllowanceAmount',
42
54
  :'global_allowance_reason' => :'globalAllowanceReason'
43
55
  }
@@ -56,11 +68,15 @@ module FactPulse
56
68
  # Attribute type mapping.
57
69
  def self.openapi_types
58
70
  {
71
+ :'line_total_amount' => :'LineTotalAmount',
72
+ :'allowance_total_amount' => :'AllowanceTotalAmount',
73
+ :'charge_total_amount' => :'ChargeTotalAmount',
59
74
  :'total_net_amount' => :'TotalNetAmount',
60
75
  :'vat_amount' => :'TotalVATAmount',
61
76
  :'total_gross_amount' => :'TotalGrossAmount',
62
- :'amount_due' => :'AmountDue',
63
77
  :'prepayment' => :'InvoiceTotalsPrepayment',
78
+ :'rounding_amount' => :'RoundingAmount',
79
+ :'amount_due' => :'AmountDue',
64
80
  :'global_allowance_amount' => :'GlobalAllowanceAmount',
65
81
  :'global_allowance_reason' => :'String'
66
82
  }
@@ -69,7 +85,11 @@ module FactPulse
69
85
  # List of attributes with nullable: true
70
86
  def self.openapi_nullable
71
87
  Set.new([
88
+ :'line_total_amount',
89
+ :'allowance_total_amount',
90
+ :'charge_total_amount',
72
91
  :'prepayment',
92
+ :'rounding_amount',
73
93
  :'global_allowance_reason'
74
94
  ])
75
95
  end
@@ -90,6 +110,18 @@ module FactPulse
90
110
  h[k.to_sym] = v
91
111
  }
92
112
 
113
+ if attributes.key?(:'line_total_amount')
114
+ self.line_total_amount = attributes[:'line_total_amount']
115
+ end
116
+
117
+ if attributes.key?(:'allowance_total_amount')
118
+ self.allowance_total_amount = attributes[:'allowance_total_amount']
119
+ end
120
+
121
+ if attributes.key?(:'charge_total_amount')
122
+ self.charge_total_amount = attributes[:'charge_total_amount']
123
+ end
124
+
93
125
  if attributes.key?(:'total_net_amount')
94
126
  self.total_net_amount = attributes[:'total_net_amount']
95
127
  else
@@ -108,16 +140,20 @@ module FactPulse
108
140
  self.total_gross_amount = nil
109
141
  end
110
142
 
143
+ if attributes.key?(:'prepayment')
144
+ self.prepayment = attributes[:'prepayment']
145
+ end
146
+
147
+ if attributes.key?(:'rounding_amount')
148
+ self.rounding_amount = attributes[:'rounding_amount']
149
+ end
150
+
111
151
  if attributes.key?(:'amount_due')
112
152
  self.amount_due = attributes[:'amount_due']
113
153
  else
114
154
  self.amount_due = nil
115
155
  end
116
156
 
117
- if attributes.key?(:'prepayment')
118
- self.prepayment = attributes[:'prepayment']
119
- end
120
-
121
157
  if attributes.key?(:'global_allowance_amount')
122
158
  self.global_allowance_amount = attributes[:'global_allowance_amount']
123
159
  end
@@ -207,11 +243,15 @@ module FactPulse
207
243
  def ==(o)
208
244
  return true if self.equal?(o)
209
245
  self.class == o.class &&
246
+ line_total_amount == o.line_total_amount &&
247
+ allowance_total_amount == o.allowance_total_amount &&
248
+ charge_total_amount == o.charge_total_amount &&
210
249
  total_net_amount == o.total_net_amount &&
211
250
  vat_amount == o.vat_amount &&
212
251
  total_gross_amount == o.total_gross_amount &&
213
- amount_due == o.amount_due &&
214
252
  prepayment == o.prepayment &&
253
+ rounding_amount == o.rounding_amount &&
254
+ amount_due == o.amount_due &&
215
255
  global_allowance_amount == o.global_allowance_amount &&
216
256
  global_allowance_reason == o.global_allowance_reason
217
257
  end
@@ -225,7 +265,7 @@ module FactPulse
225
265
  # Calculates hash code according to all attributes.
226
266
  # @return [Integer] Hash code
227
267
  def hash
228
- [total_net_amount, vat_amount, total_gross_amount, amount_due, prepayment, global_allowance_amount, global_allowance_reason].hash
268
+ [line_total_amount, allowance_total_amount, charge_total_amount, total_net_amount, vat_amount, total_gross_amount, prepayment, rounding_amount, amount_due, global_allowance_amount, global_allowance_reason].hash
229
269
  end
230
270
 
231
271
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Prepayment amount. (Accepte number, string ou integer)
17
+ # Sum of amounts already paid (BT-113). Can be negative for correction invoices.
18
18
  module InvoiceTotalsPrepayment
19
19
  class << self
20
20
  # List of class defined in anyOf (OpenAPI v3)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Line net amount (quantity × unit price - allowance). (Accepte number, string ou integer)
17
+ # Invoice line net amount (BT-131). Can be negative for correction invoices.
18
18
  module LineNetAmount
19
19
  class << self
20
20
  # List of class defined in anyOf (OpenAPI v3)
@@ -0,0 +1,104 @@
1
+ =begin
2
+ #FactPulse REST API
3
+
4
+ # REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://www.factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://www.factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://www.factpulse.fr/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://www.factpulse.fr/documentation-api/
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FactPulse
17
+ # Sum of all Invoice line net amounts (BT-106).
18
+ module LineTotalAmount
19
+ class << self
20
+ # List of class defined in anyOf (OpenAPI v3)
21
+ def openapi_any_of
22
+ [
23
+ :'Float',
24
+ :'String'
25
+ ]
26
+ end
27
+
28
+ # Builds the object
29
+ # @param [Mixed] Data to be matched against the list of anyOf items
30
+ # @return [Object] Returns the model or the data itself
31
+ def build(data)
32
+ # Go through the list of anyOf items and attempt to identify the appropriate one.
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
44
+ end
45
+
46
+ openapi_any_of.include?(:AnyType) ? data : nil
47
+ end
48
+
49
+ private
50
+
51
+ SchemaMismatchError = Class.new(StandardError)
52
+
53
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
54
+ def find_and_cast_into_type(klass, data)
55
+ return if data.nil?
56
+
57
+ case klass.to_s
58
+ when 'Boolean'
59
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
60
+ when 'Float'
61
+ return data if data.instance_of?(Float)
62
+ when 'Integer'
63
+ return data if data.instance_of?(Integer)
64
+ when 'Time'
65
+ return Time.parse(data)
66
+ when 'Date'
67
+ return Date.iso8601(data)
68
+ when 'String'
69
+ return data if data.instance_of?(String)
70
+ when 'Object' # "type: object"
71
+ return data if data.instance_of?(Hash)
72
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
73
+ if data.instance_of?(Array)
74
+ sub_type = Regexp.last_match[:sub_type]
75
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
76
+ end
77
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
78
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
79
+ sub_type = Regexp.last_match[:sub_type]
80
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
81
+ end
82
+ else # model
83
+ const = FactPulse.const_get(klass)
84
+ if const
85
+ if const.respond_to?(:openapi_any_of) # nested anyOf model
86
+ model = const.build(data)
87
+ return model if model
88
+ else
89
+ # raise if data contains keys that are not known to the model
90
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
91
+ model = const.build_from_hash(data)
92
+ return model if model
93
+ end
94
+ end
95
+ end
96
+
97
+ raise # if no match by now, raise
98
+ rescue
99
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
100
+ end
101
+ end
102
+ end
103
+
104
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Manual VAT rate value. (Accepte number, string ou integer)
17
+ # VAT category rate (BT-119). (Accepte number, string ou integer)
18
18
  module ManualRate
19
19
  class << self
20
20
  # List of class defined in anyOf (OpenAPI v3)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Manual VAT rate value. (Accepte number, string ou integer)
17
+ # Line VAT rate percentage (BT-152). (Accepte number, string ou integer)
18
18
  module ManualVatRate
19
19
  class << self
20
20
  # List of class defined in anyOf (OpenAPI v3)
@@ -0,0 +1,269 @@
1
+ =begin
2
+ #FactPulse REST API
3
+
4
+ # REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://www.factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://www.factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://www.factpulse.fr/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://www.factpulse.fr/documentation-api/
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FactPulse
17
+ # Champ manquant requis pour la conformite.
18
+ class MissingField < ApiModelBase
19
+ # Nom du champ
20
+ attr_accessor :field
21
+
22
+ # Code Business Term (BT-XX)
23
+ attr_accessor :bt_code
24
+
25
+ # Description du champ
26
+ attr_accessor :description
27
+
28
+ # Profils necessitant ce champ
29
+ attr_accessor :required_for
30
+
31
+ attr_accessor :suggested_value
32
+
33
+ attr_accessor :confidence
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'field' => :'field',
39
+ :'bt_code' => :'bt_code',
40
+ :'description' => :'description',
41
+ :'required_for' => :'required_for',
42
+ :'suggested_value' => :'suggested_value',
43
+ :'confidence' => :'confidence'
44
+ }
45
+ end
46
+
47
+ # Returns attribute mapping this model knows about
48
+ def self.acceptable_attribute_map
49
+ attribute_map
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ acceptable_attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'field' => :'String',
61
+ :'bt_code' => :'String',
62
+ :'description' => :'String',
63
+ :'required_for' => :'Array<String>',
64
+ :'suggested_value' => :'String',
65
+ :'confidence' => :'Float'
66
+ }
67
+ end
68
+
69
+ # List of attributes with nullable: true
70
+ def self.openapi_nullable
71
+ Set.new([
72
+ :'suggested_value',
73
+ :'confidence'
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::MissingField` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ acceptable_attribute_map = self.class.acceptable_attribute_map
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!acceptable_attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::MissingField`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'field')
94
+ self.field = attributes[:'field']
95
+ else
96
+ self.field = nil
97
+ end
98
+
99
+ if attributes.key?(:'bt_code')
100
+ self.bt_code = attributes[:'bt_code']
101
+ else
102
+ self.bt_code = nil
103
+ end
104
+
105
+ if attributes.key?(:'description')
106
+ self.description = attributes[:'description']
107
+ else
108
+ self.description = nil
109
+ end
110
+
111
+ if attributes.key?(:'required_for')
112
+ if (value = attributes[:'required_for']).is_a?(Array)
113
+ self.required_for = value
114
+ end
115
+ else
116
+ self.required_for = nil
117
+ end
118
+
119
+ if attributes.key?(:'suggested_value')
120
+ self.suggested_value = attributes[:'suggested_value']
121
+ end
122
+
123
+ if attributes.key?(:'confidence')
124
+ self.confidence = attributes[:'confidence']
125
+ end
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properties with the reasons
130
+ def list_invalid_properties
131
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
132
+ invalid_properties = Array.new
133
+ if @field.nil?
134
+ invalid_properties.push('invalid value for "field", field cannot be nil.')
135
+ end
136
+
137
+ if @bt_code.nil?
138
+ invalid_properties.push('invalid value for "bt_code", bt_code cannot be nil.')
139
+ end
140
+
141
+ if @description.nil?
142
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
143
+ end
144
+
145
+ if @required_for.nil?
146
+ invalid_properties.push('invalid value for "required_for", required_for cannot be nil.')
147
+ end
148
+
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ warn '[DEPRECATED] the `valid?` method is obsolete'
156
+ return false if @field.nil?
157
+ return false if @bt_code.nil?
158
+ return false if @description.nil?
159
+ return false if @required_for.nil?
160
+ true
161
+ end
162
+
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] field Value to be assigned
165
+ def field=(field)
166
+ if field.nil?
167
+ fail ArgumentError, 'field cannot be nil'
168
+ end
169
+
170
+ @field = field
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] bt_code Value to be assigned
175
+ def bt_code=(bt_code)
176
+ if bt_code.nil?
177
+ fail ArgumentError, 'bt_code cannot be nil'
178
+ end
179
+
180
+ @bt_code = bt_code
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] description Value to be assigned
185
+ def description=(description)
186
+ if description.nil?
187
+ fail ArgumentError, 'description cannot be nil'
188
+ end
189
+
190
+ @description = description
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] required_for Value to be assigned
195
+ def required_for=(required_for)
196
+ if required_for.nil?
197
+ fail ArgumentError, 'required_for cannot be nil'
198
+ end
199
+
200
+ @required_for = required_for
201
+ end
202
+
203
+ # Checks equality by comparing each attribute.
204
+ # @param [Object] Object to be compared
205
+ def ==(o)
206
+ return true if self.equal?(o)
207
+ self.class == o.class &&
208
+ field == o.field &&
209
+ bt_code == o.bt_code &&
210
+ description == o.description &&
211
+ required_for == o.required_for &&
212
+ suggested_value == o.suggested_value &&
213
+ confidence == o.confidence
214
+ end
215
+
216
+ # @see the `==` method
217
+ # @param [Object] Object to be compared
218
+ def eql?(o)
219
+ self == o
220
+ end
221
+
222
+ # Calculates hash code according to all attributes.
223
+ # @return [Integer] Hash code
224
+ def hash
225
+ [field, bt_code, description, required_for, suggested_value, confidence].hash
226
+ end
227
+
228
+ # Builds the object from hash
229
+ # @param [Hash] attributes Model attributes in the form of hash
230
+ # @return [Object] Returns the model itself
231
+ def self.build_from_hash(attributes)
232
+ return nil unless attributes.is_a?(Hash)
233
+ attributes = attributes.transform_keys(&:to_sym)
234
+ transformed_hash = {}
235
+ openapi_types.each_pair do |key, type|
236
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
237
+ transformed_hash["#{key}"] = nil
238
+ elsif type =~ /\AArray<(.*)>/i
239
+ # check to ensure the input is an array given that the attribute
240
+ # is documented as an array but the input is not
241
+ if attributes[attribute_map[key]].is_a?(Array)
242
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
243
+ end
244
+ elsif !attributes[attribute_map[key]].nil?
245
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
246
+ end
247
+ end
248
+ new(transformed_hash)
249
+ end
250
+
251
+ # Returns the object in the form of hash
252
+ # @return [Hash] Returns the object in the form of hash
253
+ def to_hash
254
+ hash = {}
255
+ self.class.attribute_map.each_pair do |attr, param|
256
+ value = self.send(attr)
257
+ if value.nil?
258
+ is_nullable = self.class.openapi_nullable.include?(attr)
259
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
260
+ end
261
+
262
+ hash[param] = _to_hash(value)
263
+ end
264
+ hash
265
+ end
266
+
267
+ end
268
+
269
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.19.0-SNAPSHOT
10
10
 
11
11
  =end
12
12