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,14 +14,13 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- #
18
- class AFNORWebhookCallbackContent < ApiModelBase
19
- attr_accessor :flow_info
17
+ class AFNORWebhookIdParam < ApiModelBase
18
+ attr_accessor :webhook_id
20
19
 
21
20
  # Attribute mapping from ruby-style variable name to JSON key.
22
21
  def self.attribute_map
23
22
  {
24
- :'flow_info' => :'flowInfo'
23
+ :'webhook_id' => :'webhookId'
25
24
  }
26
25
  end
27
26
 
@@ -38,7 +37,7 @@ module FactPulse
38
37
  # Attribute type mapping.
39
38
  def self.openapi_types
40
39
  {
41
- :'flow_info' => :'AFNORFlow'
40
+ :'webhook_id' => :'String'
42
41
  }
43
42
  end
44
43
 
@@ -52,20 +51,20 @@ module FactPulse
52
51
  # @param [Hash] attributes Model attributes in the form of hash
53
52
  def initialize(attributes = {})
54
53
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORWebhookCallbackContent` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORWebhookIdParam` initialize method"
56
55
  end
57
56
 
58
57
  # check to see if the attribute exists and convert string to symbol for hash key
59
58
  acceptable_attribute_map = self.class.acceptable_attribute_map
60
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
60
  if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORWebhookCallbackContent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORWebhookIdParam`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
62
  end
64
63
  h[k.to_sym] = v
65
64
  }
66
65
 
67
- if attributes.key?(:'flow_info')
68
- self.flow_info = attributes[:'flow_info']
66
+ if attributes.key?(:'webhook_id')
67
+ self.webhook_id = attributes[:'webhook_id']
69
68
  end
70
69
  end
71
70
 
@@ -89,7 +88,7 @@ module FactPulse
89
88
  def ==(o)
90
89
  return true if self.equal?(o)
91
90
  self.class == o.class &&
92
- flow_info == o.flow_info
91
+ webhook_id == o.webhook_id
93
92
  end
94
93
 
95
94
  # @see the `==` method
@@ -101,7 +100,7 @@ module FactPulse
101
100
  # Calculates hash code according to all attributes.
102
101
  # @return [Integer] Hash code
103
102
  def hash
104
- [flow_info].hash
103
+ [webhook_id].hash
105
104
  end
106
105
 
107
106
  # Builds the object from hash
@@ -14,13 +14,14 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- class AFNORLegalUnitPayloadIncludedNoSiren < ApiModelBase
18
- # Business name
19
- attr_accessor :business_name
17
+ class AFNORWebhookMetadata < ApiModelBase
18
+ attr_accessor :processing_rule
20
19
 
21
- attr_accessor :entity_type
20
+ attr_accessor :flow_type
22
21
 
23
- attr_accessor :administrative_status
22
+ attr_accessor :flow_direction
23
+
24
+ attr_accessor :ack_status
24
25
 
25
26
  class EnumAttributeValidator
26
27
  attr_reader :datatype
@@ -47,9 +48,10 @@ module FactPulse
47
48
  # Attribute mapping from ruby-style variable name to JSON key.
48
49
  def self.attribute_map
49
50
  {
50
- :'business_name' => :'businessName',
51
- :'entity_type' => :'entityType',
52
- :'administrative_status' => :'administrativeStatus'
51
+ :'processing_rule' => :'processingRule',
52
+ :'flow_type' => :'flowType',
53
+ :'flow_direction' => :'flowDirection',
54
+ :'ack_status' => :'ackStatus'
53
55
  }
54
56
  end
55
57
 
@@ -66,9 +68,10 @@ module FactPulse
66
68
  # Attribute type mapping.
67
69
  def self.openapi_types
68
70
  {
69
- :'business_name' => :'String',
70
- :'entity_type' => :'AFNOREntityType',
71
- :'administrative_status' => :'AFNORLegalUnitAdministrativeStatus'
71
+ :'processing_rule' => :'AFNORProcessingRule',
72
+ :'flow_type' => :'AFNORFlowType',
73
+ :'flow_direction' => :'AFNORFlowDirection',
74
+ :'ack_status' => :'AFNORFlowAckStatus'
72
75
  }
73
76
  end
74
77
 
@@ -82,28 +85,36 @@ module FactPulse
82
85
  # @param [Hash] attributes Model attributes in the form of hash
83
86
  def initialize(attributes = {})
84
87
  if (!attributes.is_a?(Hash))
85
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORLegalUnitPayloadIncludedNoSiren` initialize method"
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORWebhookMetadata` initialize method"
86
89
  end
87
90
 
88
91
  # check to see if the attribute exists and convert string to symbol for hash key
89
92
  acceptable_attribute_map = self.class.acceptable_attribute_map
90
93
  attributes = attributes.each_with_object({}) { |(k, v), h|
91
94
  if (!acceptable_attribute_map.key?(k.to_sym))
92
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORLegalUnitPayloadIncludedNoSiren`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORWebhookMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
96
  end
94
97
  h[k.to_sym] = v
95
98
  }
96
99
 
97
- if attributes.key?(:'business_name')
98
- self.business_name = attributes[:'business_name']
100
+ if attributes.key?(:'processing_rule')
101
+ self.processing_rule = attributes[:'processing_rule']
102
+ end
103
+
104
+ if attributes.key?(:'flow_type')
105
+ self.flow_type = attributes[:'flow_type']
106
+ else
107
+ self.flow_type = nil
99
108
  end
100
109
 
101
- if attributes.key?(:'entity_type')
102
- self.entity_type = attributes[:'entity_type']
110
+ if attributes.key?(:'flow_direction')
111
+ self.flow_direction = attributes[:'flow_direction']
112
+ else
113
+ self.flow_direction = nil
103
114
  end
104
115
 
105
- if attributes.key?(:'administrative_status')
106
- self.administrative_status = attributes[:'administrative_status']
116
+ if attributes.key?(:'ack_status')
117
+ self.ack_status = attributes[:'ack_status']
107
118
  end
108
119
  end
109
120
 
@@ -112,8 +123,12 @@ module FactPulse
112
123
  def list_invalid_properties
113
124
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
125
  invalid_properties = Array.new
115
- if !@business_name.nil? && @business_name.to_s.length > 150
116
- invalid_properties.push('invalid value for "business_name", the character length must be smaller than or equal to 150.')
126
+ if @flow_type.nil?
127
+ invalid_properties.push('invalid value for "flow_type", flow_type cannot be nil.')
128
+ end
129
+
130
+ if @flow_direction.nil?
131
+ invalid_properties.push('invalid value for "flow_direction", flow_direction cannot be nil.')
117
132
  end
118
133
 
119
134
  invalid_properties
@@ -123,22 +138,29 @@ module FactPulse
123
138
  # @return true if the model is valid
124
139
  def valid?
125
140
  warn '[DEPRECATED] the `valid?` method is obsolete'
126
- return false if !@business_name.nil? && @business_name.to_s.length > 150
141
+ return false if @flow_type.nil?
142
+ return false if @flow_direction.nil?
127
143
  true
128
144
  end
129
145
 
130
146
  # Custom attribute writer method with validation
131
- # @param [Object] business_name Value to be assigned
132
- def business_name=(business_name)
133
- if business_name.nil?
134
- fail ArgumentError, 'business_name cannot be nil'
147
+ # @param [Object] flow_type Value to be assigned
148
+ def flow_type=(flow_type)
149
+ if flow_type.nil?
150
+ fail ArgumentError, 'flow_type cannot be nil'
135
151
  end
136
152
 
137
- if business_name.to_s.length > 150
138
- fail ArgumentError, 'invalid value for "business_name", the character length must be smaller than or equal to 150.'
153
+ @flow_type = flow_type
154
+ end
155
+
156
+ # Custom attribute writer method with validation
157
+ # @param [Object] flow_direction Value to be assigned
158
+ def flow_direction=(flow_direction)
159
+ if flow_direction.nil?
160
+ fail ArgumentError, 'flow_direction cannot be nil'
139
161
  end
140
162
 
141
- @business_name = business_name
163
+ @flow_direction = flow_direction
142
164
  end
143
165
 
144
166
  # Checks equality by comparing each attribute.
@@ -146,9 +168,10 @@ module FactPulse
146
168
  def ==(o)
147
169
  return true if self.equal?(o)
148
170
  self.class == o.class &&
149
- business_name == o.business_name &&
150
- entity_type == o.entity_type &&
151
- administrative_status == o.administrative_status
171
+ processing_rule == o.processing_rule &&
172
+ flow_type == o.flow_type &&
173
+ flow_direction == o.flow_direction &&
174
+ ack_status == o.ack_status
152
175
  end
153
176
 
154
177
  # @see the `==` method
@@ -160,7 +183,7 @@ module FactPulse
160
183
  # Calculates hash code according to all attributes.
161
184
  # @return [Integer] Hash code
162
185
  def hash
163
- [business_name, entity_type, administrative_status].hash
186
+ [processing_rule, flow_type, flow_direction, ack_status].hash
164
187
  end
165
188
 
166
189
  # Builds the object from hash
@@ -0,0 +1,190 @@
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
+ class AFNORWebhookParams < ApiModelBase
18
+ attr_accessor :callback
19
+
20
+ attr_accessor :metadata
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'callback' => :'callback',
26
+ :'metadata' => :'metadata'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'callback' => :'AFNORCallbackParameters',
44
+ :'metadata' => :'AFNORWebhookMetadata'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORWebhookParams` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORWebhookParams`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'callback')
71
+ self.callback = attributes[:'callback']
72
+ else
73
+ self.callback = nil
74
+ end
75
+
76
+ if attributes.key?(:'metadata')
77
+ self.metadata = attributes[:'metadata']
78
+ else
79
+ self.metadata = nil
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ if @callback.nil?
89
+ invalid_properties.push('invalid value for "callback", callback cannot be nil.')
90
+ end
91
+
92
+ if @metadata.nil?
93
+ invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
94
+ end
95
+
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ return false if @callback.nil?
104
+ return false if @metadata.nil?
105
+ true
106
+ end
107
+
108
+ # Custom attribute writer method with validation
109
+ # @param [Object] callback Value to be assigned
110
+ def callback=(callback)
111
+ if callback.nil?
112
+ fail ArgumentError, 'callback cannot be nil'
113
+ end
114
+
115
+ @callback = callback
116
+ end
117
+
118
+ # Custom attribute writer method with validation
119
+ # @param [Object] metadata Value to be assigned
120
+ def metadata=(metadata)
121
+ if metadata.nil?
122
+ fail ArgumentError, 'metadata cannot be nil'
123
+ end
124
+
125
+ @metadata = metadata
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ callback == o.callback &&
134
+ metadata == o.metadata
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [callback, metadata].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ transformed_hash = {}
156
+ openapi_types.each_pair do |key, type|
157
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = nil
159
+ elsif type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[attribute_map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
+ end
165
+ elsif !attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
+ end
168
+ end
169
+ new(transformed_hash)
170
+ end
171
+
172
+ # Returns the object in the form of hash
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_hash
175
+ hash = {}
176
+ self.class.attribute_map.each_pair do |attr, param|
177
+ value = self.send(attr)
178
+ if value.nil?
179
+ is_nullable = self.class.openapi_nullable.include?(attr)
180
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
+ end
182
+
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ end
189
+
190
+ end
@@ -14,15 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Response for validation errors.
18
- class FactureElectroniqueRestApiSchemasValidationValidationErrorResponse < ApiModelBase
19
- # List of detected validation errors.
20
- attr_accessor :detail
17
+ class AFNORWebhookPatchPayload < ApiModelBase
18
+ attr_accessor :headers
19
+
20
+ attr_accessor :authentication
21
+
22
+ attr_accessor :signature
21
23
 
22
24
  # Attribute mapping from ruby-style variable name to JSON key.
23
25
  def self.attribute_map
24
26
  {
25
- :'detail' => :'detail'
27
+ :'headers' => :'headers',
28
+ :'authentication' => :'authentication',
29
+ :'signature' => :'signature'
26
30
  }
27
31
  end
28
32
 
@@ -39,7 +43,9 @@ module FactPulse
39
43
  # Attribute type mapping.
40
44
  def self.openapi_types
41
45
  {
42
- :'detail' => :'Array<String>'
46
+ :'headers' => :'Array<AFNORCallbackHeader>',
47
+ :'authentication' => :'AFNORCallbackAuthentication',
48
+ :'signature' => :'AFNORCallbackSignature'
43
49
  }
44
50
  end
45
51
 
@@ -53,24 +59,30 @@ module FactPulse
53
59
  # @param [Hash] attributes Model attributes in the form of hash
54
60
  def initialize(attributes = {})
55
61
  if (!attributes.is_a?(Hash))
56
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::FactureElectroniqueRestApiSchemasValidationValidationErrorResponse` initialize method"
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORWebhookPatchPayload` initialize method"
57
63
  end
58
64
 
59
65
  # check to see if the attribute exists and convert string to symbol for hash key
60
66
  acceptable_attribute_map = self.class.acceptable_attribute_map
61
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
62
68
  if (!acceptable_attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::FactureElectroniqueRestApiSchemasValidationValidationErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORWebhookPatchPayload`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
70
  end
65
71
  h[k.to_sym] = v
66
72
  }
67
73
 
68
- if attributes.key?(:'detail')
69
- if (value = attributes[:'detail']).is_a?(Array)
70
- self.detail = value
74
+ if attributes.key?(:'headers')
75
+ if (value = attributes[:'headers']).is_a?(Array)
76
+ self.headers = value
71
77
  end
72
- else
73
- self.detail = nil
78
+ end
79
+
80
+ if attributes.key?(:'authentication')
81
+ self.authentication = attributes[:'authentication']
82
+ end
83
+
84
+ if attributes.key?(:'signature')
85
+ self.signature = attributes[:'signature']
74
86
  end
75
87
  end
76
88
 
@@ -79,10 +91,6 @@ module FactPulse
79
91
  def list_invalid_properties
80
92
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
81
93
  invalid_properties = Array.new
82
- if @detail.nil?
83
- invalid_properties.push('invalid value for "detail", detail cannot be nil.')
84
- end
85
-
86
94
  invalid_properties
87
95
  end
88
96
 
@@ -90,26 +98,17 @@ module FactPulse
90
98
  # @return true if the model is valid
91
99
  def valid?
92
100
  warn '[DEPRECATED] the `valid?` method is obsolete'
93
- return false if @detail.nil?
94
101
  true
95
102
  end
96
103
 
97
- # Custom attribute writer method with validation
98
- # @param [Object] detail Value to be assigned
99
- def detail=(detail)
100
- if detail.nil?
101
- fail ArgumentError, 'detail cannot be nil'
102
- end
103
-
104
- @detail = detail
105
- end
106
-
107
104
  # Checks equality by comparing each attribute.
108
105
  # @param [Object] Object to be compared
109
106
  def ==(o)
110
107
  return true if self.equal?(o)
111
108
  self.class == o.class &&
112
- detail == o.detail
109
+ headers == o.headers &&
110
+ authentication == o.authentication &&
111
+ signature == o.signature
113
112
  end
114
113
 
115
114
  # @see the `==` method
@@ -121,7 +120,7 @@ module FactPulse
121
120
  # Calculates hash code according to all attributes.
122
121
  # @return [Integer] Hash code
123
122
  def hash
124
- [detail].hash
123
+ [headers, authentication, signature].hash
125
124
  end
126
125
 
127
126
  # Builds the object from hash