factpulse 2.0.40 → 2.0.42

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73b8f20de1bcafa931f52ff0f9e1b4f0dfdf596a59615b9041bcc4079c255a0d
4
- data.tar.gz: 070f5e5b0894a9d97eeee0b58deabf449c7b91fe2624aa6831bda10ab1b11b55
3
+ metadata.gz: 18af34c1a63d2c0885f063733c80e707620ba71f3c66715cf745f755cc75257d
4
+ data.tar.gz: 5dab848c527564367ae0edf9bc1a2528439e921a88b5b535f7f79293a47a25fe
5
5
  SHA512:
6
- metadata.gz: 7486d8af1370c51727895bfc275e3059c79e520545abc721ce3e7372ad52cb09f3bc3ffd22c6574e53ffc819a759326d557d862bd2a5010ea838181aff22e306
7
- data.tar.gz: db762185b91fe8c75244d4ef8731fbfd1c4f8f246e70203db864a09ca51aa0b48aac4d42135feaad9d141ae5ae7d134a071f530e8e239aed27bac36fa306fb77
6
+ metadata.gz: 2b7c3950599e9594d14ca5381c9fe7a9bdfc5bfdd26e290ba6c41288aebbc346eb32e2b2bd8883401e823eaecf2cb9e71dd14f80ea20ea55656a5f3ed6477df4
7
+ data.tar.gz: 3d2ca6960f92c593a6b4efce60f4e3286bd7dbc3282f91b1049a8e6987e65dd1afb86e787611ec8c7850eb1cf09b6ffe545c73c0a74be77715dfe9a4981c49c6
data/CHANGELOG.md CHANGED
@@ -7,7 +7,7 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [2.0.40] - 2025-12-10
10
+ ## [2.0.42] - 2025-12-16
11
11
 
12
12
  ### Added
13
13
  - Version initiale du SDK ruby
@@ -24,5 +24,5 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
24
24
  - Guide d'authentification JWT
25
25
  - Configuration avancée (timeout, proxy, debug)
26
26
 
27
- [Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v2.0.40...HEAD
28
- [2.0.40]: https://github.com/factpulse/sdk-ruby/releases/tag/v2.0.40
27
+ [Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v2.0.42...HEAD
28
+ [2.0.42]: https://github.com/factpulse/sdk-ruby/releases/tag/v2.0.42
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- factpulse (2.0.40)
4
+ factpulse (2.0.42)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -546,16 +546,22 @@ module FactPulse
546
546
  # =========================================================================
547
547
 
548
548
  # Valide un PDF Factur-X.
549
- def valider_pdf_facturx(pdf_path, profil: 'EN16931')
549
+ # @param pdf_path [String] Chemin vers le fichier PDF
550
+ # @param profil [String, nil] Profil Factur-X (MINIMUM, BASIC, EN16931, EXTENDED). Si nil, auto-détecté.
551
+ # @param use_verapdf [Boolean] Active la validation stricte PDF/A avec VeraPDF (défaut: false)
552
+ def valider_pdf_facturx(pdf_path, profil: nil, use_verapdf: false)
550
553
  ensure_authenticated
551
554
  uri = URI("#{@api_url}/api/v1/traitement/valider-pdf-facturx")
552
555
  pdf_content = File.binread(pdf_path)
553
556
 
554
- boundary = "----RubyFormBoundary#{SecureRandom.hex(16)}"
555
- body = build_multipart_body(boundary, [
557
+ parts = [
556
558
  { name: 'fichier_pdf', content: pdf_content, filename: File.basename(pdf_path), content_type: 'application/pdf' },
557
- { name: 'profil', content: profil }
558
- ])
559
+ { name: 'use_verapdf', content: use_verapdf.to_s }
560
+ ]
561
+ parts << { name: 'profil', content: profil } if profil
562
+
563
+ boundary = "----RubyFormBoundary#{SecureRandom.hex(16)}"
564
+ body = build_multipart_body(boundary, parts)
559
565
 
560
566
  response = http_multipart_post(uri, body, boundary)
561
567
  raise FactPulseValidationError.new("Validation error: #{response.code}") unless response.is_a?(Net::HTTPSuccess)
@@ -15,14 +15,14 @@ require 'time'
15
15
 
16
16
  module FactPulse
17
17
  class TypeDocument
18
- N380 = "380".freeze
19
- N381 = "381".freeze
20
- N384 = "384".freeze
21
- N386 = "386".freeze
22
- N389 = "389".freeze
18
+ FACTURE = "380".freeze
19
+ AVOIR = "381".freeze
20
+ FACTURE_RECTIFICATIVE = "384".freeze
21
+ ACOMPTE = "386".freeze
22
+ AUTOFACTURATION = "389".freeze
23
23
 
24
24
  def self.all_vars
25
- @all_vars ||= [N380, N381, N384, N386, N389].freeze
25
+ @all_vars ||= [FACTURE, AVOIR, FACTURE_RECTIFICATIVE, ACOMPTE, AUTOFACTURATION].freeze
26
26
  end
27
27
 
28
28
  # Builds the enum from string
@@ -11,5 +11,5 @@ Generator version: 7.18.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module FactPulse
14
- VERSION = '2.0.40'
14
+ VERSION = '2.0.42'
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factpulse
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.40
4
+ version: 2.0.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-10 00:00:00.000000000 Z
11
+ date: 2025-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus