factpulse 2.0.32 → 2.0.33
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 +18 -0
- data/lib/factpulse/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 59aeaf7bb6cd32262fb563a2a5e3e71e5331b3eb5f369cbf6c76dab7f0128f8e
|
|
4
|
+
data.tar.gz: 817acd1f30b4eff2ad1844a93179f38435596c32302841c36403ecd2135121cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b56cc5d189ca2040ddadcb244aaaddadfe3993b6c3e4ac9762a36c9e73ef7adae55127a9736094ad1eef216251633f147cf117d9ab513f0abb44049e657ff257
|
|
7
|
+
data.tar.gz: 3ff321596052a323c28d3024e24cdab4d23c0790f56db71ba1289420fae7dff8ee04a0b4ede7d03979fa84f2a78b5dd359b17482bcf43eb8643a8d7588dbf1ce
|
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.33] - 2025-11-29
|
|
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.33...HEAD
|
|
28
|
+
[2.0.33]: https://github.com/factpulse/sdk-ruby/releases/tag/v2.0.33
|
data/Gemfile.lock
CHANGED
|
@@ -360,6 +360,24 @@ module FactPulse
|
|
|
360
360
|
result['_raw'] || ''
|
|
361
361
|
end
|
|
362
362
|
|
|
363
|
+
# Récupère les métadonnées JSON d'un flux entrant (facture fournisseur).
|
|
364
|
+
# Télécharge un flux entrant depuis la PDP AFNOR et extrait les métadonnées
|
|
365
|
+
# de la facture vers un format JSON unifié. Supporte Factur-X, CII et UBL.
|
|
366
|
+
#
|
|
367
|
+
# @param flow_id [String] Identifiant du flux (UUID)
|
|
368
|
+
# @param include_document [Boolean] Si true, inclut le document en base64
|
|
369
|
+
# @return [Hash] Métadonnées de la facture (fournisseur, montants, dates, etc.)
|
|
370
|
+
#
|
|
371
|
+
# @example
|
|
372
|
+
# facture = client.obtenir_facture_entrante_afnor("550e8400-...")
|
|
373
|
+
# puts "Fournisseur: #{facture['fournisseur']['nom']}"
|
|
374
|
+
# puts "Montant TTC: #{facture['montant_ttc']} #{facture['devise']}"
|
|
375
|
+
def obtenir_facture_entrante_afnor(flow_id, include_document: false)
|
|
376
|
+
endpoint = "/flux-entrants/#{flow_id}"
|
|
377
|
+
endpoint += "?include_document=true" if include_document
|
|
378
|
+
make_afnor_request('GET', endpoint)
|
|
379
|
+
end
|
|
380
|
+
|
|
363
381
|
# Vérifie la disponibilité du Flow Service AFNOR.
|
|
364
382
|
def healthcheck_afnor
|
|
365
383
|
make_afnor_request('GET', '/flow/v1/healthcheck')
|
data/lib/factpulse/version.rb
CHANGED