factpulse 2.0.40 → 2.0.41
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/lib/factpulse/helpers/client.rb +11 -5
- data/lib/factpulse/models/type_document.rb +6 -6
- data/lib/factpulse/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1b1e04c0050a5cd1d4f42d4d4acb2a4e77974cd425c3b0579dafcaad62ffcee0
|
|
4
|
+
data.tar.gz: 39488c44a92eba0b04b561e3406344a951fd0c0181cac9fe0f3538b1f2b4ff97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1bc5327cf0c574d4a30353badf36c7ce839bec6140140d6f95dce67bbca226d768b73a73bfd2fe47be508002984efb89a64a152ddcd7a19716d1fcb705de4067
|
|
7
|
+
data.tar.gz: e3878b0f0ed06213bb0219b5778287f12aa195c2a5b8ee99a3b5e8036ed6d79d67d5b2404edbc2f1a0de83a9ecdbe26c5aac55dccae5d75e15f1bdf2c8b55a90
|
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.
|
|
10
|
+
## [2.0.41] - 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.
|
|
28
|
-
[2.0.
|
|
27
|
+
[Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v2.0.41...HEAD
|
|
28
|
+
[2.0.41]: https://github.com/factpulse/sdk-ruby/releases/tag/v2.0.41
|
data/Gemfile.lock
CHANGED
|
@@ -546,16 +546,22 @@ module FactPulse
|
|
|
546
546
|
# =========================================================================
|
|
547
547
|
|
|
548
548
|
# Valide un PDF Factur-X.
|
|
549
|
-
|
|
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
|
-
|
|
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: '
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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 ||= [
|
|
25
|
+
@all_vars ||= [FACTURE, AVOIR, FACTURE_RECTIFICATIVE, ACOMPTE, AUTOFACTURATION].freeze
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
# Builds the enum from string
|
data/lib/factpulse/version.rb
CHANGED
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.
|
|
4
|
+
version: 2.0.41
|
|
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-
|
|
11
|
+
date: 2025-12-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|