factpulse 2.0.33 → 2.0.35

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: 59aeaf7bb6cd32262fb563a2a5e3e71e5331b3eb5f369cbf6c76dab7f0128f8e
4
- data.tar.gz: 817acd1f30b4eff2ad1844a93179f38435596c32302841c36403ecd2135121cb
3
+ metadata.gz: 06a73a52e699e6c3d620f218c681ed6d23b67ab5294a7ea1b80178073b21429f
4
+ data.tar.gz: dddd83a74e6d2432ce32254a0aa2f379797bac4e063b7e8cf00a25ea57ec358e
5
5
  SHA512:
6
- metadata.gz: b56cc5d189ca2040ddadcb244aaaddadfe3993b6c3e4ac9762a36c9e73ef7adae55127a9736094ad1eef216251633f147cf117d9ab513f0abb44049e657ff257
7
- data.tar.gz: 3ff321596052a323c28d3024e24cdab4d23c0790f56db71ba1289420fae7dff8ee04a0b4ede7d03979fa84f2a78b5dd359b17482bcf43eb8643a8d7588dbf1ce
6
+ metadata.gz: a87ce7d106b99dc59c3005ea49033138c56488aa904f0b2ca9105b177471ad35e8e0fc64f3fa96e9e4943be5d656592cdae3d3fa368e2e134c252aa07b94fd15
7
+ data.tar.gz: 1c969bbd50d5ae0df86858396dd5089545633985aecd9fdbb9078f9a3dd432908ff485f270f2640fd6bbe437085759bcc85aae5a9503615427198cee241ebf5f
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.33] - 2025-11-29
10
+ ## [2.0.35] - 2025-12-04
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.33...HEAD
28
- [2.0.33]: https://github.com/factpulse/sdk-ruby/releases/tag/v2.0.33
27
+ [Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v2.0.35...HEAD
28
+ [2.0.35]: https://github.com/factpulse/sdk-ruby/releases/tag/v2.0.35
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- factpulse (2.0.33)
4
+ factpulse (2.0.35)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -55,7 +55,7 @@ GEM
55
55
  ruby-progressbar (~> 1.7)
56
56
  unicode-display_width (>= 1.4.0, < 1.6)
57
57
  ruby-progressbar (1.13.0)
58
- stringio (3.1.8)
58
+ stringio (3.1.9)
59
59
  typhoeus (1.5.0)
60
60
  ethon (>= 0.9.0, < 0.16.0)
61
61
  unicode-display_width (1.5.0)
data/docs/Note.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **subject_code** | **String** | | [optional] |
8
- | **content** | **String** | | |
7
+ | **code_sujet** | **String** | | [optional] |
8
+ | **contenu** | **String** | | |
9
9
 
10
10
  ## Example
11
11
 
@@ -13,8 +13,8 @@
13
13
  require 'factpulse'
14
14
 
15
15
  instance = FactPulse::Note.new(
16
- subject_code: null,
17
- content: null
16
+ code_sujet: null,
17
+ contenu: null
18
18
  )
19
19
  ```
20
20
 
@@ -364,6 +364,9 @@ module FactPulse
364
364
  # Télécharge un flux entrant depuis la PDP AFNOR et extrait les métadonnées
365
365
  # de la facture vers un format JSON unifié. Supporte Factur-X, CII et UBL.
366
366
  #
367
+ # Note: Cet endpoint utilise l'authentification JWT FactPulse (pas OAuth AFNOR).
368
+ # Le serveur FactPulse se charge d'appeler la PDP avec les credentials stockés.
369
+ #
367
370
  # @param flow_id [String] Identifiant du flux (UUID)
368
371
  # @param include_document [Boolean] Si true, inclut le document en base64
369
372
  # @return [Hash] Métadonnées de la facture (fournisseur, montants, dates, etc.)
@@ -373,9 +376,20 @@ module FactPulse
373
376
  # puts "Fournisseur: #{facture['fournisseur']['nom']}"
374
377
  # puts "Montant TTC: #{facture['montant_ttc']} #{facture['devise']}"
375
378
  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
+ ensure_authenticated
380
+ uri = URI("#{@api_url}/api/v1/afnor/flux-entrants/#{flow_id}")
381
+ uri.query = "include_document=true" if include_document
382
+
383
+ http = Net::HTTP.new(uri.host, uri.port)
384
+ http.use_ssl = uri.scheme == 'https'
385
+ http.read_timeout = 60
386
+
387
+ request = Net::HTTP::Get.new(uri)
388
+ request['Authorization'] = "Bearer #{@access_token}"
389
+
390
+ response = http.request(request)
391
+ raise FactPulseValidationError.new("Erreur flux entrant: #{response.code}") unless response.is_a?(Net::HTTPSuccess)
392
+ JSON.parse(response.body) rescue {}
379
393
  end
380
394
 
381
395
  # Vérifie la disponibilité du Flow Service AFNOR.
@@ -16,15 +16,15 @@ require 'time'
16
16
  module FactPulse
17
17
  # Note de facture (IncludedNote en Factur-X). Les notes obligatoires pour BR-FR-05 sont : - PMT : Indemnité forfaitaire pour frais de recouvrement - PMD : Pénalités de retard - AAB : Escompte pour paiement anticipé
18
18
  class Note < ApiModelBase
19
- attr_accessor :subject_code
19
+ attr_accessor :code_sujet
20
20
 
21
- attr_accessor :content
21
+ attr_accessor :contenu
22
22
 
23
23
  # Attribute mapping from ruby-style variable name to JSON key.
24
24
  def self.attribute_map
25
25
  {
26
- :'subject_code' => :'subjectCode',
27
- :'content' => :'content'
26
+ :'code_sujet' => :'codeSujet',
27
+ :'contenu' => :'contenu'
28
28
  }
29
29
  end
30
30
 
@@ -41,15 +41,15 @@ module FactPulse
41
41
  # Attribute type mapping.
42
42
  def self.openapi_types
43
43
  {
44
- :'subject_code' => :'String',
45
- :'content' => :'String'
44
+ :'code_sujet' => :'String',
45
+ :'contenu' => :'String'
46
46
  }
47
47
  end
48
48
 
49
49
  # List of attributes with nullable: true
50
50
  def self.openapi_nullable
51
51
  Set.new([
52
- :'subject_code',
52
+ :'code_sujet',
53
53
  ])
54
54
  end
55
55
 
@@ -69,14 +69,14 @@ module FactPulse
69
69
  h[k.to_sym] = v
70
70
  }
71
71
 
72
- if attributes.key?(:'subject_code')
73
- self.subject_code = attributes[:'subject_code']
72
+ if attributes.key?(:'code_sujet')
73
+ self.code_sujet = attributes[:'code_sujet']
74
74
  end
75
75
 
76
- if attributes.key?(:'content')
77
- self.content = attributes[:'content']
76
+ if attributes.key?(:'contenu')
77
+ self.contenu = attributes[:'contenu']
78
78
  else
79
- self.content = nil
79
+ self.contenu = nil
80
80
  end
81
81
  end
82
82
 
@@ -85,8 +85,8 @@ module FactPulse
85
85
  def list_invalid_properties
86
86
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
87
  invalid_properties = Array.new
88
- if @content.nil?
89
- invalid_properties.push('invalid value for "content", content cannot be nil.')
88
+ if @contenu.nil?
89
+ invalid_properties.push('invalid value for "contenu", contenu cannot be nil.')
90
90
  end
91
91
 
92
92
  invalid_properties
@@ -96,18 +96,18 @@ module FactPulse
96
96
  # @return true if the model is valid
97
97
  def valid?
98
98
  warn '[DEPRECATED] the `valid?` method is obsolete'
99
- return false if @content.nil?
99
+ return false if @contenu.nil?
100
100
  true
101
101
  end
102
102
 
103
103
  # Custom attribute writer method with validation
104
- # @param [Object] content Value to be assigned
105
- def content=(content)
106
- if content.nil?
107
- fail ArgumentError, 'content cannot be nil'
104
+ # @param [Object] contenu Value to be assigned
105
+ def contenu=(contenu)
106
+ if contenu.nil?
107
+ fail ArgumentError, 'contenu cannot be nil'
108
108
  end
109
109
 
110
- @content = content
110
+ @contenu = contenu
111
111
  end
112
112
 
113
113
  # Checks equality by comparing each attribute.
@@ -115,8 +115,8 @@ module FactPulse
115
115
  def ==(o)
116
116
  return true if self.equal?(o)
117
117
  self.class == o.class &&
118
- subject_code == o.subject_code &&
119
- content == o.content
118
+ code_sujet == o.code_sujet &&
119
+ contenu == o.contenu
120
120
  end
121
121
 
122
122
  # @see the `==` method
@@ -128,7 +128,7 @@ module FactPulse
128
128
  # Calculates hash code according to all attributes.
129
129
  # @return [Integer] Hash code
130
130
  def hash
131
- [subject_code, content].hash
131
+ [code_sujet, contenu].hash
132
132
  end
133
133
 
134
134
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.18.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module FactPulse
14
- VERSION = '2.0.33'
14
+ VERSION = '2.0.35'
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.33
4
+ version: 2.0.35
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-11-29 00:00:00.000000000 Z
11
+ date: 2025-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus