factpulse 4.1.2 → 4.3.0

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 (160) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -5
  3. data/Gemfile.lock +2 -2
  4. data/docs/AFNORBasicAuthentication.md +20 -0
  5. data/docs/AFNORCallbackAuthentication.md +49 -0
  6. data/docs/AFNORCallbackHeader.md +20 -0
  7. data/docs/AFNORCallbackParameters.md +24 -0
  8. data/docs/AFNORCallbackSignature.md +20 -0
  9. data/docs/{AFNORFacilityNature.md → AFNORContainsOrStrictOperator.md} +2 -2
  10. data/docs/AFNORCoreFlowInfo.md +26 -0
  11. data/docs/{AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCode.md → AFNORDirectoryLinePayloadLegalUnitFacilityRoutingCode.md} +5 -5
  12. data/docs/AFNORDirectoryLinePayloadStatusLegalUnitFacilityRoutingCode.md +34 -0
  13. data/docs/AFNORDirectoryLineSearchPost200Response.md +1 -1
  14. data/docs/{AFNORDiffusionStatus.md → AFNORDirectoryLineStatus.md} +2 -2
  15. data/docs/AFNORError.md +4 -4
  16. data/docs/AFNORFacilityPayloadHistory.md +3 -3
  17. data/docs/AFNORFacilityPayloadIncluded.md +0 -2
  18. data/docs/AFNORFlow.md +16 -14
  19. data/docs/AFNORFlowExtension.md +26 -0
  20. data/docs/AFNORFlowInfo.md +3 -3
  21. data/docs/AFNORFlowInfoExtension.md +18 -0
  22. data/docs/AFNORFullFlowInfo.md +8 -8
  23. data/docs/AFNORFullFlowInfoExtension.md +20 -0
  24. data/docs/AFNORLegalUnitPayloadHistory.md +3 -1
  25. data/docs/AFNOROAuth2Authentication.md +22 -0
  26. data/docs/AFNORPDPPADirectoryServiceApi.md +4 -648
  27. data/docs/AFNORPDPPAFlowServiceApi.md +320 -1
  28. data/docs/AFNORRoutingCodeSearch.md +1 -1
  29. data/docs/AFNORRoutingCodeSearchFiltersRoutingCodeName.md +1 -1
  30. data/docs/AFNORRoutingCodeSearchFiltersRoutingIdentifier.md +1 -1
  31. data/docs/AFNORSearchDirectoryLine.md +2 -2
  32. data/docs/AFNORSearchDirectoryLineFiltersAddressingIdentifier.md +1 -1
  33. data/docs/AFNORSearchDirectoryLineFiltersAddressingSuffix.md +1 -1
  34. data/docs/AFNORSearchFlowFilters.md +1 -1
  35. data/docs/AFNORSearchSiren.md +1 -1
  36. data/docs/AFNORSearchSirenFiltersBusinessName.md +1 -1
  37. data/docs/AFNORSearchSirenFiltersSiren.md +1 -1
  38. data/docs/AFNORSearchSiret.md +2 -2
  39. data/docs/AFNORSearchSiretFiltersCountrySubdivision.md +1 -1
  40. data/docs/AFNORSearchSiretFiltersFacilityType.md +1 -1
  41. data/docs/AFNORSearchSiretFiltersLocality.md +1 -1
  42. data/docs/AFNORSearchSiretFiltersName.md +1 -1
  43. data/docs/AFNORSearchSiretFiltersPostalCode.md +1 -1
  44. data/docs/AFNORSearchSiretFiltersSiret.md +1 -1
  45. data/docs/AFNORSirenInstructions.md +18 -0
  46. data/docs/AFNORSiretInstructions.md +18 -0
  47. data/docs/{AFNORPlatformStatus.md → AFNORStrictOrStartWithOperator.md} +2 -2
  48. data/docs/AFNORWebhook.md +22 -0
  49. data/docs/AFNORWebhookIdParam.md +18 -0
  50. data/docs/AFNORWebhookMetadata.md +24 -0
  51. data/docs/AFNORWebhookParams.md +20 -0
  52. data/docs/AFNORWebhookPatchPayload.md +22 -0
  53. data/docs/ChorusProCredentials.md +8 -8
  54. data/docs/ChorusProDestination.md +1 -1
  55. data/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +24 -0
  56. data/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +15 -0
  57. data/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +26 -0
  58. data/docs/GetChorusProIdRequest.md +1 -1
  59. data/docs/GetInvoiceRequest.md +1 -1
  60. data/docs/GetStructureRequest.md +1 -1
  61. data/docs/InvoiceInput.md +1 -1
  62. data/docs/SearchStructureRequest.md +1 -1
  63. data/docs/SimplifiedInvoiceData.md +1 -1
  64. data/docs/SubmitInvoiceRequest.md +1 -1
  65. data/docs/ValidateCDARResponse.md +2 -2
  66. data/docs/ValidationErrorResponse.md +2 -8
  67. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +3 -621
  68. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +303 -0
  69. data/lib/factpulse/models/afnor_algorithm.rb +4 -3
  70. data/lib/factpulse/models/afnor_basic_authentication.rb +190 -0
  71. data/lib/factpulse/models/afnor_callback_authentication.rb +105 -0
  72. data/lib/factpulse/models/afnor_callback_header.rb +190 -0
  73. data/lib/factpulse/models/afnor_callback_parameters.rb +193 -0
  74. data/lib/factpulse/models/{afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.rb → afnor_callback_signature.rb} +51 -16
  75. data/lib/factpulse/models/{afnor_diffusion_status.rb → afnor_contains_or_strict_operator.rb} +6 -6
  76. data/lib/factpulse/models/{afnor_routing_code_post201_response.rb → afnor_core_flow_info.rb} +103 -61
  77. data/lib/factpulse/models/afnor_directory_line_field.rb +1 -2
  78. data/lib/factpulse/models/{afnor_directory_line_payload_history_legal_unit_facility_routing_code.rb → afnor_directory_line_payload_legal_unit_facility_routing_code.rb} +36 -14
  79. data/lib/factpulse/models/{afnor_create_directory_line_body_addressing_information.rb → afnor_directory_line_payload_status_legal_unit_facility_routing_code.rb} +105 -56
  80. data/lib/factpulse/models/afnor_directory_line_search_post200_response.rb +1 -1
  81. data/lib/factpulse/models/{afnor_platform_status.rb → afnor_directory_line_status.rb} +5 -4
  82. data/lib/factpulse/models/afnor_error.rb +30 -39
  83. data/lib/factpulse/models/afnor_facility_payload_history.rb +11 -11
  84. data/lib/factpulse/models/afnor_facility_payload_included.rb +1 -10
  85. data/lib/factpulse/models/afnor_flow.rb +218 -57
  86. data/lib/factpulse/models/{afnor_update_patch_routing_code_body.rb → afnor_flow_extension.rb} +103 -66
  87. data/lib/factpulse/models/afnor_flow_info.rb +20 -4
  88. data/lib/factpulse/models/{afnor_create_directory_line_body_period.rb → afnor_flow_info_extension.rb} +26 -31
  89. data/lib/factpulse/models/afnor_full_flow_info.rb +79 -46
  90. data/lib/factpulse/models/afnor_full_flow_info_extension.rb +202 -0
  91. data/lib/factpulse/models/afnor_legal_unit_payload_history.rb +13 -4
  92. data/lib/factpulse/models/afnor_processing_rule.rb +4 -1
  93. data/lib/factpulse/models/afnor_routing_code_field.rb +1 -2
  94. data/lib/factpulse/models/afnor_routing_code_search_filters_routing_code_name.rb +1 -1
  95. data/lib/factpulse/models/afnor_routing_code_search_filters_routing_identifier.rb +1 -1
  96. data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_identifier.rb +1 -1
  97. data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_suffix.rb +1 -1
  98. data/lib/factpulse/models/afnor_search_flow_filters.rb +1 -0
  99. data/lib/factpulse/models/afnor_search_siren_filters_business_name.rb +1 -1
  100. data/lib/factpulse/models/afnor_search_siren_filters_siren.rb +1 -1
  101. data/lib/factpulse/models/afnor_search_siret_filters_country_subdivision.rb +1 -1
  102. data/lib/factpulse/models/afnor_search_siret_filters_facility_type.rb +1 -1
  103. data/lib/factpulse/models/afnor_search_siret_filters_locality.rb +1 -1
  104. data/lib/factpulse/models/afnor_search_siret_filters_name.rb +1 -1
  105. data/lib/factpulse/models/afnor_search_siret_filters_postal_code.rb +1 -1
  106. data/lib/factpulse/models/afnor_search_siret_filters_siret.rb +1 -1
  107. data/lib/factpulse/models/afnor_siren_field.rb +2 -2
  108. data/lib/factpulse/models/{afnor_update_patch_directory_line_body.rb → afnor_siren_instructions.rb} +12 -11
  109. data/lib/factpulse/models/afnor_siret_field.rb +3 -4
  110. data/lib/factpulse/models/{afnor_create_directory_line_body.rb → afnor_siret_instructions.rb} +12 -19
  111. data/lib/factpulse/models/{afnor_facility_nature.rb → afnor_strict_or_start_with_operator.rb} +6 -6
  112. data/lib/factpulse/models/{afnor_directory_line_post201_response.rb → afnor_webhook.rb} +55 -35
  113. data/lib/factpulse/models/{afnor_webhook_callback_content.rb → afnor_webhook_id_param.rb} +10 -11
  114. data/lib/factpulse/models/{afnor_legal_unit_payload_included_no_siren.rb → afnor_webhook_metadata.rb} +56 -33
  115. data/lib/factpulse/models/afnor_webhook_params.rb +190 -0
  116. data/lib/factpulse/models/{facture_electronique_rest_api_schemas_validation_validation_error_response.rb → afnor_webhook_patch_payload.rb} +29 -30
  117. data/lib/factpulse/models/afnoro_auth2_authentication.rb +216 -0
  118. data/lib/factpulse/models/chorus_pro_credentials.rb +94 -26
  119. data/lib/factpulse/models/chorus_pro_destination.rb +1 -1
  120. data/lib/factpulse/models/facture_electronique_rest_api_schemas_cdar_validation_error_response.rb +215 -0
  121. data/lib/factpulse/models/{facture_electronique_models_invoice_type_code.rb → facture_electronique_rest_api_schemas_ereporting_invoice_type_code.rb} +9 -20
  122. data/lib/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb +191 -0
  123. data/lib/factpulse/models/get_chorus_pro_id_request.rb +1 -1
  124. data/lib/factpulse/models/get_invoice_request.rb +1 -1
  125. data/lib/factpulse/models/get_structure_request.rb +1 -1
  126. data/lib/factpulse/models/invoice_input.rb +1 -1
  127. data/lib/factpulse/models/invoice_type_code.rb +17 -6
  128. data/lib/factpulse/models/processing_rule.rb +4 -1
  129. data/lib/factpulse/models/search_structure_request.rb +1 -1
  130. data/lib/factpulse/models/simplified_invoice_data.rb +1 -1
  131. data/lib/factpulse/models/submit_invoice_request.rb +1 -1
  132. data/lib/factpulse/models/validate_cdar_response.rb +2 -2
  133. data/lib/factpulse/models/validation_error_response.rb +20 -67
  134. data/lib/factpulse/version.rb +1 -1
  135. data/lib/factpulse.rb +25 -22
  136. metadata +52 -46
  137. data/docs/AFNORAddressEdit.md +0 -30
  138. data/docs/AFNORAddressPatch.md +0 -30
  139. data/docs/AFNORAddressPut.md +0 -30
  140. data/docs/AFNORCreateDirectoryLineBody.md +0 -20
  141. data/docs/AFNORCreateDirectoryLineBodyAddressingInformation.md +0 -24
  142. data/docs/AFNORCreateDirectoryLineBodyPeriod.md +0 -20
  143. data/docs/AFNORCreateRoutingCodeBody.md +0 -32
  144. data/docs/AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCodePlatform.md +0 -20
  145. data/docs/AFNORDirectoryLinePost201Response.md +0 -22
  146. data/docs/AFNORLegalUnitPayloadIncludedNoSiren.md +0 -22
  147. data/docs/AFNORRoutingCodePost201Response.md +0 -22
  148. data/docs/AFNORUpdatePatchDirectoryLineBody.md +0 -18
  149. data/docs/AFNORUpdatePatchRoutingCodeBody.md +0 -24
  150. data/docs/AFNORUpdatePutRoutingCodeBody.md +0 -24
  151. data/docs/AFNORWebhookCallbackContent.md +0 -18
  152. data/docs/FactureElectroniqueModelsInvoiceTypeCode.md +0 -15
  153. data/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -26
  154. data/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +0 -18
  155. data/lib/factpulse/models/afnor_address_edit.rb +0 -353
  156. data/lib/factpulse/models/afnor_address_patch.rb +0 -386
  157. data/lib/factpulse/models/afnor_address_put.rb +0 -435
  158. data/lib/factpulse/models/afnor_create_routing_code_body.rb +0 -412
  159. data/lib/factpulse/models/afnor_update_put_routing_code_body.rb +0 -289
  160. data/lib/factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb +0 -259
@@ -14,9 +14,9 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Signaling of the flow: - The tracking id is an external identifier and is used to track the flow by the sender - The sha256 is the fingerprint of the attached file: - if provided in the request: it should be checked once received - if not provided in the request: it should be computed and returned in the response
17
+ # Signaling of the flow
18
18
  class AFNORFlowInfo < ApiModelBase
19
- # Unique identifier supporting UUID but not only, for flexibility purpose
19
+ # The tracking id is an external identifier and is used to track the flow by the sender
20
20
  attr_accessor :tracking_id
21
21
 
22
22
  # Name of the file
@@ -28,6 +28,7 @@ module FactPulse
28
28
 
29
29
  attr_accessor :flow_profile
30
30
 
31
+ # The sha256 is the fingerprint of the attached file: - if provided in the request: it should be checked once received - if not provided in the request: it may be computed and returned in the response
31
32
  attr_accessor :sha256
32
33
 
33
34
  class EnumAttributeValidator
@@ -92,6 +93,14 @@ module FactPulse
92
93
  ])
93
94
  end
94
95
 
96
+ # List of class defined in allOf (OpenAPI v3)
97
+ def self.openapi_all_of
98
+ [
99
+ :'AFNORCoreFlowInfo',
100
+ :'AFNORFlowInfoExtension'
101
+ ]
102
+ end
103
+
95
104
  # Initializes the object
96
105
  # @param [Hash] attributes Model attributes in the form of hash
97
106
  def initialize(attributes = {})
@@ -114,6 +123,8 @@ module FactPulse
114
123
 
115
124
  if attributes.key?(:'name')
116
125
  self.name = attributes[:'name']
126
+ else
127
+ self.name = nil
117
128
  end
118
129
 
119
130
  if attributes.key?(:'processing_rule')
@@ -144,7 +155,11 @@ module FactPulse
144
155
  invalid_properties.push('invalid value for "tracking_id", the character length must be smaller than or equal to 36.')
145
156
  end
146
157
 
147
- if !@name.nil? && @name.to_s.length > 255
158
+ if @name.nil?
159
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
160
+ end
161
+
162
+ if @name.to_s.length > 255
148
163
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
149
164
  end
150
165
 
@@ -165,7 +180,8 @@ module FactPulse
165
180
  def valid?
166
181
  warn '[DEPRECATED] the `valid?` method is obsolete'
167
182
  return false if !@tracking_id.nil? && @tracking_id.to_s.length > 36
168
- return false if !@name.nil? && @name.to_s.length > 255
183
+ return false if @name.nil?
184
+ return false if @name.to_s.length > 255
169
185
  return false if @flow_syntax.nil?
170
186
  return false if !@sha256.nil? && @sha256 !~ Regexp.new(/^[a-f0-9]{64}$/)
171
187
  true
@@ -14,18 +14,15 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- class AFNORCreateDirectoryLineBodyPeriod < ApiModelBase
18
- # Effective start date of the directory line..
19
- attr_accessor :date_from
20
-
21
- # Effective end date of the directory line.
22
- attr_accessor :date_to
17
+ # Extension to build the FlowInfo
18
+ class AFNORFlowInfoExtension < ApiModelBase
19
+ # The sha256 is the fingerprint of the attached file: - if provided in the request: it should be checked once received - if not provided in the request: it may be computed and returned in the response
20
+ attr_accessor :sha256
23
21
 
24
22
  # Attribute mapping from ruby-style variable name to JSON key.
25
23
  def self.attribute_map
26
24
  {
27
- :'date_from' => :'dateFrom',
28
- :'date_to' => :'dateTo'
25
+ :'sha256' => :'sha256'
29
26
  }
30
27
  end
31
28
 
@@ -42,8 +39,7 @@ module FactPulse
42
39
  # Attribute type mapping.
43
40
  def self.openapi_types
44
41
  {
45
- :'date_from' => :'Date',
46
- :'date_to' => :'Date'
42
+ :'sha256' => :'String'
47
43
  }
48
44
  end
49
45
 
@@ -57,26 +53,20 @@ module FactPulse
57
53
  # @param [Hash] attributes Model attributes in the form of hash
58
54
  def initialize(attributes = {})
59
55
  if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORCreateDirectoryLineBodyPeriod` initialize method"
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORFlowInfoExtension` initialize method"
61
57
  end
62
58
 
63
59
  # check to see if the attribute exists and convert string to symbol for hash key
64
60
  acceptable_attribute_map = self.class.acceptable_attribute_map
65
61
  attributes = attributes.each_with_object({}) { |(k, v), h|
66
62
  if (!acceptable_attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORCreateDirectoryLineBodyPeriod`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORFlowInfoExtension`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
64
  end
69
65
  h[k.to_sym] = v
70
66
  }
71
67
 
72
- if attributes.key?(:'date_from')
73
- self.date_from = attributes[:'date_from']
74
- else
75
- self.date_from = nil
76
- end
77
-
78
- if attributes.key?(:'date_to')
79
- self.date_to = attributes[:'date_to']
68
+ if attributes.key?(:'sha256')
69
+ self.sha256 = attributes[:'sha256']
80
70
  end
81
71
  end
82
72
 
@@ -85,8 +75,9 @@ module FactPulse
85
75
  def list_invalid_properties
86
76
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
77
  invalid_properties = Array.new
88
- if @date_from.nil?
89
- invalid_properties.push('invalid value for "date_from", date_from cannot be nil.')
78
+ pattern = Regexp.new(/^[a-f0-9]{64}$/)
79
+ if !@sha256.nil? && @sha256 !~ pattern
80
+ invalid_properties.push("invalid value for \"sha256\", must conform to the pattern #{pattern}.")
90
81
  end
91
82
 
92
83
  invalid_properties
@@ -96,18 +87,23 @@ module FactPulse
96
87
  # @return true if the model is valid
97
88
  def valid?
98
89
  warn '[DEPRECATED] the `valid?` method is obsolete'
99
- return false if @date_from.nil?
90
+ return false if !@sha256.nil? && @sha256 !~ Regexp.new(/^[a-f0-9]{64}$/)
100
91
  true
101
92
  end
102
93
 
103
94
  # Custom attribute writer method with validation
104
- # @param [Object] date_from Value to be assigned
105
- def date_from=(date_from)
106
- if date_from.nil?
107
- fail ArgumentError, 'date_from cannot be nil'
95
+ # @param [Object] sha256 Value to be assigned
96
+ def sha256=(sha256)
97
+ if sha256.nil?
98
+ fail ArgumentError, 'sha256 cannot be nil'
99
+ end
100
+
101
+ pattern = Regexp.new(/^[a-f0-9]{64}$/)
102
+ if sha256 !~ pattern
103
+ fail ArgumentError, "invalid value for \"sha256\", must conform to the pattern #{pattern}."
108
104
  end
109
105
 
110
- @date_from = date_from
106
+ @sha256 = sha256
111
107
  end
112
108
 
113
109
  # Checks equality by comparing each attribute.
@@ -115,8 +111,7 @@ module FactPulse
115
111
  def ==(o)
116
112
  return true if self.equal?(o)
117
113
  self.class == o.class &&
118
- date_from == o.date_from &&
119
- date_to == o.date_to
114
+ sha256 == o.sha256
120
115
  end
121
116
 
122
117
  # @see the `==` method
@@ -128,7 +123,7 @@ module FactPulse
128
123
  # Calculates hash code according to all attributes.
129
124
  # @return [Integer] Hash code
130
125
  def hash
131
- [date_from, date_to].hash
126
+ [sha256].hash
132
127
  end
133
128
 
134
129
  # Builds the object from hash
@@ -17,6 +17,12 @@ module FactPulse
17
17
  # Identified Flow info: flow info + id + timestamp
18
18
  class AFNORFullFlowInfo < ApiModelBase
19
19
  # Unique identifier supporting UUID but not only, for flexibility purpose
20
+ attr_accessor :flow_id
21
+
22
+ # The flow submission date and time (the date and time when the flow was created on the system) This property should be used by the API consumer as a time reference to avoid clock synchronization issues
23
+ attr_accessor :submitted_at
24
+
25
+ # The tracking id is an external identifier and is used to track the flow by the sender
20
26
  attr_accessor :tracking_id
21
27
 
22
28
  # Name of the file
@@ -28,14 +34,9 @@ module FactPulse
28
34
 
29
35
  attr_accessor :flow_profile
30
36
 
37
+ # The sha256 is the fingerprint of the attached file: - if provided in the request: it should be checked once received - if not provided in the request: it may be computed and returned in the response
31
38
  attr_accessor :sha256
32
39
 
33
- # Unique identifier supporting UUID but not only, for flexibility purpose
34
- attr_accessor :flow_id
35
-
36
- # The flow submission date and time (the date and time when the flow was created on the system) This property should be used by the API consumer as a time reference to avoid clock synchronization issues
37
- attr_accessor :submitted_at
38
-
39
40
  class EnumAttributeValidator
40
41
  attr_reader :datatype
41
42
  attr_reader :allowable_values
@@ -61,14 +62,14 @@ module FactPulse
61
62
  # Attribute mapping from ruby-style variable name to JSON key.
62
63
  def self.attribute_map
63
64
  {
65
+ :'flow_id' => :'flowId',
66
+ :'submitted_at' => :'submittedAt',
64
67
  :'tracking_id' => :'trackingId',
65
68
  :'name' => :'name',
66
69
  :'processing_rule' => :'processingRule',
67
70
  :'flow_syntax' => :'flowSyntax',
68
71
  :'flow_profile' => :'flowProfile',
69
- :'sha256' => :'sha256',
70
- :'flow_id' => :'flowId',
71
- :'submitted_at' => :'submittedAt'
72
+ :'sha256' => :'sha256'
72
73
  }
73
74
  end
74
75
 
@@ -85,14 +86,14 @@ module FactPulse
85
86
  # Attribute type mapping.
86
87
  def self.openapi_types
87
88
  {
89
+ :'flow_id' => :'String',
90
+ :'submitted_at' => :'Time',
88
91
  :'tracking_id' => :'String',
89
92
  :'name' => :'String',
90
93
  :'processing_rule' => :'AFNORProcessingRule',
91
94
  :'flow_syntax' => :'AFNORFlowSyntax',
92
95
  :'flow_profile' => :'AFNORFlowProfile',
93
- :'sha256' => :'String',
94
- :'flow_id' => :'String',
95
- :'submitted_at' => :'Time'
96
+ :'sha256' => :'String'
96
97
  }
97
98
  end
98
99
 
@@ -105,7 +106,8 @@ module FactPulse
105
106
  # List of class defined in allOf (OpenAPI v3)
106
107
  def self.openapi_all_of
107
108
  [
108
- :'AFNORFlowInfo'
109
+ :'AFNORFlowInfo',
110
+ :'AFNORFullFlowInfoExtension'
109
111
  ]
110
112
  end
111
113
 
@@ -125,12 +127,26 @@ module FactPulse
125
127
  h[k.to_sym] = v
126
128
  }
127
129
 
130
+ if attributes.key?(:'flow_id')
131
+ self.flow_id = attributes[:'flow_id']
132
+ else
133
+ self.flow_id = nil
134
+ end
135
+
136
+ if attributes.key?(:'submitted_at')
137
+ self.submitted_at = attributes[:'submitted_at']
138
+ else
139
+ self.submitted_at = nil
140
+ end
141
+
128
142
  if attributes.key?(:'tracking_id')
129
143
  self.tracking_id = attributes[:'tracking_id']
130
144
  end
131
145
 
132
146
  if attributes.key?(:'name')
133
147
  self.name = attributes[:'name']
148
+ else
149
+ self.name = nil
134
150
  end
135
151
 
136
152
  if attributes.key?(:'processing_rule')
@@ -150,14 +166,6 @@ module FactPulse
150
166
  if attributes.key?(:'sha256')
151
167
  self.sha256 = attributes[:'sha256']
152
168
  end
153
-
154
- if attributes.key?(:'flow_id')
155
- self.flow_id = attributes[:'flow_id']
156
- end
157
-
158
- if attributes.key?(:'submitted_at')
159
- self.submitted_at = attributes[:'submitted_at']
160
- end
161
169
  end
162
170
 
163
171
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -165,11 +173,27 @@ module FactPulse
165
173
  def list_invalid_properties
166
174
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
167
175
  invalid_properties = Array.new
176
+ if @flow_id.nil?
177
+ invalid_properties.push('invalid value for "flow_id", flow_id cannot be nil.')
178
+ end
179
+
180
+ if @flow_id.to_s.length > 36
181
+ invalid_properties.push('invalid value for "flow_id", the character length must be smaller than or equal to 36.')
182
+ end
183
+
184
+ if @submitted_at.nil?
185
+ invalid_properties.push('invalid value for "submitted_at", submitted_at cannot be nil.')
186
+ end
187
+
168
188
  if !@tracking_id.nil? && @tracking_id.to_s.length > 36
169
189
  invalid_properties.push('invalid value for "tracking_id", the character length must be smaller than or equal to 36.')
170
190
  end
171
191
 
172
- if !@name.nil? && @name.to_s.length > 255
192
+ if @name.nil?
193
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
194
+ end
195
+
196
+ if @name.to_s.length > 255
173
197
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
174
198
  end
175
199
 
@@ -182,10 +206,6 @@ module FactPulse
182
206
  invalid_properties.push("invalid value for \"sha256\", must conform to the pattern #{pattern}.")
183
207
  end
184
208
 
185
- if !@flow_id.nil? && @flow_id.to_s.length > 36
186
- invalid_properties.push('invalid value for "flow_id", the character length must be smaller than or equal to 36.')
187
- end
188
-
189
209
  invalid_properties
190
210
  end
191
211
 
@@ -193,14 +213,41 @@ module FactPulse
193
213
  # @return true if the model is valid
194
214
  def valid?
195
215
  warn '[DEPRECATED] the `valid?` method is obsolete'
216
+ return false if @flow_id.nil?
217
+ return false if @flow_id.to_s.length > 36
218
+ return false if @submitted_at.nil?
196
219
  return false if !@tracking_id.nil? && @tracking_id.to_s.length > 36
197
- return false if !@name.nil? && @name.to_s.length > 255
220
+ return false if @name.nil?
221
+ return false if @name.to_s.length > 255
198
222
  return false if @flow_syntax.nil?
199
223
  return false if !@sha256.nil? && @sha256 !~ Regexp.new(/^[a-f0-9]{64}$/)
200
- return false if !@flow_id.nil? && @flow_id.to_s.length > 36
201
224
  true
202
225
  end
203
226
 
227
+ # Custom attribute writer method with validation
228
+ # @param [Object] flow_id Value to be assigned
229
+ def flow_id=(flow_id)
230
+ if flow_id.nil?
231
+ fail ArgumentError, 'flow_id cannot be nil'
232
+ end
233
+
234
+ if flow_id.to_s.length > 36
235
+ fail ArgumentError, 'invalid value for "flow_id", the character length must be smaller than or equal to 36.'
236
+ end
237
+
238
+ @flow_id = flow_id
239
+ end
240
+
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] submitted_at Value to be assigned
243
+ def submitted_at=(submitted_at)
244
+ if submitted_at.nil?
245
+ fail ArgumentError, 'submitted_at cannot be nil'
246
+ end
247
+
248
+ @submitted_at = submitted_at
249
+ end
250
+
204
251
  # Custom attribute writer method with validation
205
252
  # @param [Object] tracking_id Value to be assigned
206
253
  def tracking_id=(tracking_id)
@@ -254,33 +301,19 @@ module FactPulse
254
301
  @sha256 = sha256
255
302
  end
256
303
 
257
- # Custom attribute writer method with validation
258
- # @param [Object] flow_id Value to be assigned
259
- def flow_id=(flow_id)
260
- if flow_id.nil?
261
- fail ArgumentError, 'flow_id cannot be nil'
262
- end
263
-
264
- if flow_id.to_s.length > 36
265
- fail ArgumentError, 'invalid value for "flow_id", the character length must be smaller than or equal to 36.'
266
- end
267
-
268
- @flow_id = flow_id
269
- end
270
-
271
304
  # Checks equality by comparing each attribute.
272
305
  # @param [Object] Object to be compared
273
306
  def ==(o)
274
307
  return true if self.equal?(o)
275
308
  self.class == o.class &&
309
+ flow_id == o.flow_id &&
310
+ submitted_at == o.submitted_at &&
276
311
  tracking_id == o.tracking_id &&
277
312
  name == o.name &&
278
313
  processing_rule == o.processing_rule &&
279
314
  flow_syntax == o.flow_syntax &&
280
315
  flow_profile == o.flow_profile &&
281
- sha256 == o.sha256 &&
282
- flow_id == o.flow_id &&
283
- submitted_at == o.submitted_at
316
+ sha256 == o.sha256
284
317
  end
285
318
 
286
319
  # @see the `==` method
@@ -292,7 +325,7 @@ module FactPulse
292
325
  # Calculates hash code according to all attributes.
293
326
  # @return [Integer] Hash code
294
327
  def hash
295
- [tracking_id, name, processing_rule, flow_syntax, flow_profile, sha256, flow_id, submitted_at].hash
328
+ [flow_id, submitted_at, tracking_id, name, processing_rule, flow_syntax, flow_profile, sha256].hash
296
329
  end
297
330
 
298
331
  # Builds the object from hash
@@ -0,0 +1,202 @@
1
+ =begin
2
+ #FactPulse REST API
3
+
4
+ # REST API for electronic invoicing in France: Factur-X (CII), UBL 2.1, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Invoice Generation - **Formats**: CII XML, UBL 2.1 XML, or Factur-X PDF/A-3 - **Profiles** (CII/PDF): MINIMUM, BASIC, EN16931, EXTENDED - **UBL**: Always EN16931 compliant - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT), UBL 2.1 (OASIS) - **Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Factur-X - Validation - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) ### ✍️ 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 ### 📋 Flux 6 - Invoice Lifecycle (CDAR) - **CDAR Messages**: Acknowledgements, invoice statuses - **PPF Statuses**: REFUSED (210), PAID (212) ### 📊 Flux 10 - E-Reporting - **Tax Declarations**: International B2B, B2C - **Flow Types**: 10.1 (B2B transactions), 10.2 (B2B payments), 10.3 (B2C transactions), 10.4 (B2C payments) ### 📡 AFNOR PDP/PA (XP Z12-013) - **Flow Service**: Submit and search flows to PDPs - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user ### 🏛️ Chorus Pro - **Public Sector Invoicing**: Complete API for Chorus Pro ### ⏳ Async Tasks - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **Webhooks**: Automatic notifications when tasks complete ## 🔒 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://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://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://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://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://factpulse.fr/api/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://factpulse.fr/documentation-api/
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: contact@factpulse.fr
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FactPulse
17
+ # Extension schema to build FFullFlowInfo, Flow schemas
18
+ class AFNORFullFlowInfoExtension < ApiModelBase
19
+ # Unique identifier supporting UUID but not only, for flexibility purpose
20
+ attr_accessor :flow_id
21
+
22
+ # The flow submission date and time (the date and time when the flow was created on the system) This property should be used by the API consumer as a time reference to avoid clock synchronization issues
23
+ attr_accessor :submitted_at
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'flow_id' => :'flowId',
29
+ :'submitted_at' => :'submittedAt'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'flow_id' => :'String',
47
+ :'submitted_at' => :'Time'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORFullFlowInfoExtension` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ acceptable_attribute_map = self.class.acceptable_attribute_map
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!acceptable_attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORFullFlowInfoExtension`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'flow_id')
74
+ self.flow_id = attributes[:'flow_id']
75
+ else
76
+ self.flow_id = nil
77
+ end
78
+
79
+ if attributes.key?(:'submitted_at')
80
+ self.submitted_at = attributes[:'submitted_at']
81
+ else
82
+ self.submitted_at = nil
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
90
+ invalid_properties = Array.new
91
+ if @flow_id.nil?
92
+ invalid_properties.push('invalid value for "flow_id", flow_id cannot be nil.')
93
+ end
94
+
95
+ if @flow_id.to_s.length > 36
96
+ invalid_properties.push('invalid value for "flow_id", the character length must be smaller than or equal to 36.')
97
+ end
98
+
99
+ if @submitted_at.nil?
100
+ invalid_properties.push('invalid value for "submitted_at", submitted_at cannot be nil.')
101
+ end
102
+
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ warn '[DEPRECATED] the `valid?` method is obsolete'
110
+ return false if @flow_id.nil?
111
+ return false if @flow_id.to_s.length > 36
112
+ return false if @submitted_at.nil?
113
+ true
114
+ end
115
+
116
+ # Custom attribute writer method with validation
117
+ # @param [Object] flow_id Value to be assigned
118
+ def flow_id=(flow_id)
119
+ if flow_id.nil?
120
+ fail ArgumentError, 'flow_id cannot be nil'
121
+ end
122
+
123
+ if flow_id.to_s.length > 36
124
+ fail ArgumentError, 'invalid value for "flow_id", the character length must be smaller than or equal to 36.'
125
+ end
126
+
127
+ @flow_id = flow_id
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] submitted_at Value to be assigned
132
+ def submitted_at=(submitted_at)
133
+ if submitted_at.nil?
134
+ fail ArgumentError, 'submitted_at cannot be nil'
135
+ end
136
+
137
+ @submitted_at = submitted_at
138
+ end
139
+
140
+ # Checks equality by comparing each attribute.
141
+ # @param [Object] Object to be compared
142
+ def ==(o)
143
+ return true if self.equal?(o)
144
+ self.class == o.class &&
145
+ flow_id == o.flow_id &&
146
+ submitted_at == o.submitted_at
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [flow_id, submitted_at].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ attributes = attributes.transform_keys(&:to_sym)
167
+ transformed_hash = {}
168
+ openapi_types.each_pair do |key, type|
169
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = nil
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[attribute_map[key]].is_a?(Array)
175
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
+ end
177
+ elsif !attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
+ end
180
+ end
181
+ new(transformed_hash)
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ end
201
+
202
+ end