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,22 +14,50 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- class AFNORRoutingCodePost201Response < ApiModelBase
18
- # Platform instance identifier in the directory
19
- attr_accessor :id_instance
17
+ # Core schema to build FlowInfo, FullFlowInfo, Flow schemas
18
+ class AFNORCoreFlowInfo < ApiModelBase
19
+ # The tracking id is an external identifier and is used to track the flow by the sender
20
+ attr_accessor :tracking_id
20
21
 
21
- # SIRET Number
22
- attr_accessor :siret
22
+ # Name of the file
23
+ attr_accessor :name
23
24
 
24
- # Routing identifier od a routing code.
25
- attr_accessor :routing_identifier
25
+ attr_accessor :processing_rule
26
+
27
+ attr_accessor :flow_syntax
28
+
29
+ attr_accessor :flow_profile
30
+
31
+ class EnumAttributeValidator
32
+ attr_reader :datatype
33
+ attr_reader :allowable_values
34
+
35
+ def initialize(datatype, allowable_values)
36
+ @allowable_values = allowable_values.map do |value|
37
+ case datatype.to_s
38
+ when /Integer/i
39
+ value.to_i
40
+ when /Float/i
41
+ value.to_f
42
+ else
43
+ value
44
+ end
45
+ end
46
+ end
47
+
48
+ def valid?(value)
49
+ !value || allowable_values.include?(value)
50
+ end
51
+ end
26
52
 
27
53
  # Attribute mapping from ruby-style variable name to JSON key.
28
54
  def self.attribute_map
29
55
  {
30
- :'id_instance' => :'idInstance',
31
- :'siret' => :'siret',
32
- :'routing_identifier' => :'routingIdentifier'
56
+ :'tracking_id' => :'trackingId',
57
+ :'name' => :'name',
58
+ :'processing_rule' => :'processingRule',
59
+ :'flow_syntax' => :'flowSyntax',
60
+ :'flow_profile' => :'flowProfile'
33
61
  }
34
62
  end
35
63
 
@@ -46,9 +74,11 @@ module FactPulse
46
74
  # Attribute type mapping.
47
75
  def self.openapi_types
48
76
  {
49
- :'id_instance' => :'Integer',
50
- :'siret' => :'String',
51
- :'routing_identifier' => :'String'
77
+ :'tracking_id' => :'String',
78
+ :'name' => :'String',
79
+ :'processing_rule' => :'AFNORProcessingRule',
80
+ :'flow_syntax' => :'AFNORFlowSyntax',
81
+ :'flow_profile' => :'AFNORFlowProfile'
52
82
  }
53
83
  end
54
84
 
@@ -62,28 +92,40 @@ module FactPulse
62
92
  # @param [Hash] attributes Model attributes in the form of hash
63
93
  def initialize(attributes = {})
64
94
  if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORRoutingCodePost201Response` initialize method"
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORCoreFlowInfo` initialize method"
66
96
  end
67
97
 
68
98
  # check to see if the attribute exists and convert string to symbol for hash key
69
99
  acceptable_attribute_map = self.class.acceptable_attribute_map
70
100
  attributes = attributes.each_with_object({}) { |(k, v), h|
71
101
  if (!acceptable_attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORRoutingCodePost201Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
102
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORCoreFlowInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
103
  end
74
104
  h[k.to_sym] = v
75
105
  }
76
106
 
77
- if attributes.key?(:'id_instance')
78
- self.id_instance = attributes[:'id_instance']
107
+ if attributes.key?(:'tracking_id')
108
+ self.tracking_id = attributes[:'tracking_id']
79
109
  end
80
110
 
81
- if attributes.key?(:'siret')
82
- self.siret = attributes[:'siret']
111
+ if attributes.key?(:'name')
112
+ self.name = attributes[:'name']
113
+ else
114
+ self.name = nil
83
115
  end
84
116
 
85
- if attributes.key?(:'routing_identifier')
86
- self.routing_identifier = attributes[:'routing_identifier']
117
+ if attributes.key?(:'processing_rule')
118
+ self.processing_rule = attributes[:'processing_rule']
119
+ end
120
+
121
+ if attributes.key?(:'flow_syntax')
122
+ self.flow_syntax = attributes[:'flow_syntax']
123
+ else
124
+ self.flow_syntax = nil
125
+ end
126
+
127
+ if attributes.key?(:'flow_profile')
128
+ self.flow_profile = attributes[:'flow_profile']
87
129
  end
88
130
  end
89
131
 
@@ -92,22 +134,20 @@ module FactPulse
92
134
  def list_invalid_properties
93
135
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
136
  invalid_properties = Array.new
95
- if !@siret.nil? && @siret.to_s.length > 14
96
- invalid_properties.push('invalid value for "siret", the character length must be smaller than or equal to 14.')
137
+ if !@tracking_id.nil? && @tracking_id.to_s.length > 36
138
+ invalid_properties.push('invalid value for "tracking_id", the character length must be smaller than or equal to 36.')
97
139
  end
98
140
 
99
- pattern = Regexp.new(/^([0-9]{14})$/)
100
- if !@siret.nil? && @siret !~ pattern
101
- invalid_properties.push("invalid value for \"siret\", must conform to the pattern #{pattern}.")
141
+ if @name.nil?
142
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
102
143
  end
103
144
 
104
- if !@routing_identifier.nil? && @routing_identifier.to_s.length > 100
105
- invalid_properties.push('invalid value for "routing_identifier", the character length must be smaller than or equal to 100.')
145
+ if @name.to_s.length > 255
146
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
106
147
  end
107
148
 
108
- pattern = Regexp.new(/^(?!\s+$)[\-_\/a-zA-Z0-9]{1,100}$/)
109
- if !@routing_identifier.nil? && @routing_identifier !~ pattern
110
- invalid_properties.push("invalid value for \"routing_identifier\", must conform to the pattern #{pattern}.")
149
+ if @flow_syntax.nil?
150
+ invalid_properties.push('invalid value for "flow_syntax", flow_syntax cannot be nil.')
111
151
  end
112
152
 
113
153
  invalid_properties
@@ -117,49 +157,49 @@ module FactPulse
117
157
  # @return true if the model is valid
118
158
  def valid?
119
159
  warn '[DEPRECATED] the `valid?` method is obsolete'
120
- return false if !@siret.nil? && @siret.to_s.length > 14
121
- return false if !@siret.nil? && @siret !~ Regexp.new(/^([0-9]{14})$/)
122
- return false if !@routing_identifier.nil? && @routing_identifier.to_s.length > 100
123
- return false if !@routing_identifier.nil? && @routing_identifier !~ Regexp.new(/^(?!\s+$)[\-_\/a-zA-Z0-9]{1,100}$/)
160
+ return false if !@tracking_id.nil? && @tracking_id.to_s.length > 36
161
+ return false if @name.nil?
162
+ return false if @name.to_s.length > 255
163
+ return false if @flow_syntax.nil?
124
164
  true
125
165
  end
126
166
 
127
167
  # Custom attribute writer method with validation
128
- # @param [Object] siret Value to be assigned
129
- def siret=(siret)
130
- if siret.nil?
131
- fail ArgumentError, 'siret cannot be nil'
168
+ # @param [Object] tracking_id Value to be assigned
169
+ def tracking_id=(tracking_id)
170
+ if tracking_id.nil?
171
+ fail ArgumentError, 'tracking_id cannot be nil'
132
172
  end
133
173
 
134
- if siret.to_s.length > 14
135
- fail ArgumentError, 'invalid value for "siret", the character length must be smaller than or equal to 14.'
174
+ if tracking_id.to_s.length > 36
175
+ fail ArgumentError, 'invalid value for "tracking_id", the character length must be smaller than or equal to 36.'
136
176
  end
137
177
 
138
- pattern = Regexp.new(/^([0-9]{14})$/)
139
- if siret !~ pattern
140
- fail ArgumentError, "invalid value for \"siret\", must conform to the pattern #{pattern}."
141
- end
142
-
143
- @siret = siret
178
+ @tracking_id = tracking_id
144
179
  end
145
180
 
146
181
  # Custom attribute writer method with validation
147
- # @param [Object] routing_identifier Value to be assigned
148
- def routing_identifier=(routing_identifier)
149
- if routing_identifier.nil?
150
- fail ArgumentError, 'routing_identifier cannot be nil'
182
+ # @param [Object] name Value to be assigned
183
+ def name=(name)
184
+ if name.nil?
185
+ fail ArgumentError, 'name cannot be nil'
151
186
  end
152
187
 
153
- if routing_identifier.to_s.length > 100
154
- fail ArgumentError, 'invalid value for "routing_identifier", the character length must be smaller than or equal to 100.'
188
+ if name.to_s.length > 255
189
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
155
190
  end
156
191
 
157
- pattern = Regexp.new(/^(?!\s+$)[\-_\/a-zA-Z0-9]{1,100}$/)
158
- if routing_identifier !~ pattern
159
- fail ArgumentError, "invalid value for \"routing_identifier\", must conform to the pattern #{pattern}."
192
+ @name = name
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] flow_syntax Value to be assigned
197
+ def flow_syntax=(flow_syntax)
198
+ if flow_syntax.nil?
199
+ fail ArgumentError, 'flow_syntax cannot be nil'
160
200
  end
161
201
 
162
- @routing_identifier = routing_identifier
202
+ @flow_syntax = flow_syntax
163
203
  end
164
204
 
165
205
  # Checks equality by comparing each attribute.
@@ -167,9 +207,11 @@ module FactPulse
167
207
  def ==(o)
168
208
  return true if self.equal?(o)
169
209
  self.class == o.class &&
170
- id_instance == o.id_instance &&
171
- siret == o.siret &&
172
- routing_identifier == o.routing_identifier
210
+ tracking_id == o.tracking_id &&
211
+ name == o.name &&
212
+ processing_rule == o.processing_rule &&
213
+ flow_syntax == o.flow_syntax &&
214
+ flow_profile == o.flow_profile
173
215
  end
174
216
 
175
217
  # @see the `==` method
@@ -181,7 +223,7 @@ module FactPulse
181
223
  # Calculates hash code according to all attributes.
182
224
  # @return [Integer] Hash code
183
225
  def hash
184
- [id_instance, siret, routing_identifier].hash
226
+ [tracking_id, name, processing_rule, flow_syntax, flow_profile].hash
185
227
  end
186
228
 
187
229
  # Builds the object from hash
@@ -20,10 +20,9 @@ module FactPulse
20
20
  SIRET = "siret".freeze
21
21
  ROUTING_IDENTIFIER = "routingIdentifier".freeze
22
22
  ADDRESSING_SUFFIX = "addressingSuffix".freeze
23
- ID_INSTANCE = "idInstance".freeze
24
23
 
25
24
  def self.all_vars
26
- @all_vars ||= [ADDRESSING_IDENTIFIER, SIREN, SIRET, ROUTING_IDENTIFIER, ADDRESSING_SUFFIX, ID_INSTANCE].freeze
25
+ @all_vars ||= [ADDRESSING_IDENTIFIER, SIREN, SIRET, ROUTING_IDENTIFIER, ADDRESSING_SUFFIX].freeze
27
26
  end
28
27
 
29
28
  # Builds the enum from string
@@ -14,10 +14,12 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- class AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCode < ApiModelBase
17
+ class AFNORDirectoryLinePayloadLegalUnitFacilityRoutingCode < ApiModelBase
18
18
  # Addressing identifier of the directory line.
19
19
  attr_accessor :addressing_identifier
20
20
 
21
+ attr_accessor :platform_type
22
+
21
23
  # SIREN number
22
24
  attr_accessor :siren
23
25
 
@@ -29,21 +31,41 @@ module FactPulse
29
31
 
30
32
  attr_accessor :routing_code
31
33
 
32
- attr_accessor :platform
33
-
34
34
  attr_accessor :legal_unit
35
35
 
36
36
  attr_accessor :facility
37
37
 
38
+ class EnumAttributeValidator
39
+ attr_reader :datatype
40
+ attr_reader :allowable_values
41
+
42
+ def initialize(datatype, allowable_values)
43
+ @allowable_values = allowable_values.map do |value|
44
+ case datatype.to_s
45
+ when /Integer/i
46
+ value.to_i
47
+ when /Float/i
48
+ value.to_f
49
+ else
50
+ value
51
+ end
52
+ end
53
+ end
54
+
55
+ def valid?(value)
56
+ !value || allowable_values.include?(value)
57
+ end
58
+ end
59
+
38
60
  # Attribute mapping from ruby-style variable name to JSON key.
39
61
  def self.attribute_map
40
62
  {
41
63
  :'addressing_identifier' => :'addressingIdentifier',
64
+ :'platform_type' => :'platformType',
42
65
  :'siren' => :'siren',
43
66
  :'siret' => :'siret',
44
67
  :'addressing_suffix' => :'addressingSuffix',
45
68
  :'routing_code' => :'routingCode',
46
- :'platform' => :'platform',
47
69
  :'legal_unit' => :'legalUnit',
48
70
  :'facility' => :'facility'
49
71
  }
@@ -63,12 +85,12 @@ module FactPulse
63
85
  def self.openapi_types
64
86
  {
65
87
  :'addressing_identifier' => :'String',
88
+ :'platform_type' => :'AFNORRecipientPlatformType',
66
89
  :'siren' => :'String',
67
90
  :'siret' => :'String',
68
91
  :'addressing_suffix' => :'String',
69
92
  :'routing_code' => :'AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCodeRoutingCode',
70
- :'platform' => :'AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCodePlatform',
71
- :'legal_unit' => :'AFNORLegalUnitPayloadIncludedNoSiren',
93
+ :'legal_unit' => :'AFNORLegalUnitPayloadIncluded',
72
94
  :'facility' => :'AFNORFacilityPayloadIncluded'
73
95
  }
74
96
  end
@@ -83,14 +105,14 @@ module FactPulse
83
105
  # @param [Hash] attributes Model attributes in the form of hash
84
106
  def initialize(attributes = {})
85
107
  if (!attributes.is_a?(Hash))
86
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCode` initialize method"
108
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORDirectoryLinePayloadLegalUnitFacilityRoutingCode` initialize method"
87
109
  end
88
110
 
89
111
  # check to see if the attribute exists and convert string to symbol for hash key
90
112
  acceptable_attribute_map = self.class.acceptable_attribute_map
91
113
  attributes = attributes.each_with_object({}) { |(k, v), h|
92
114
  if (!acceptable_attribute_map.key?(k.to_sym))
93
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
115
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORDirectoryLinePayloadLegalUnitFacilityRoutingCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
116
  end
95
117
  h[k.to_sym] = v
96
118
  }
@@ -99,6 +121,10 @@ module FactPulse
99
121
  self.addressing_identifier = attributes[:'addressing_identifier']
100
122
  end
101
123
 
124
+ if attributes.key?(:'platform_type')
125
+ self.platform_type = attributes[:'platform_type']
126
+ end
127
+
102
128
  if attributes.key?(:'siren')
103
129
  self.siren = attributes[:'siren']
104
130
  end
@@ -115,10 +141,6 @@ module FactPulse
115
141
  self.routing_code = attributes[:'routing_code']
116
142
  end
117
143
 
118
- if attributes.key?(:'platform')
119
- self.platform = attributes[:'platform']
120
- end
121
-
122
144
  if attributes.key?(:'legal_unit')
123
145
  self.legal_unit = attributes[:'legal_unit']
124
146
  end
@@ -247,11 +269,11 @@ module FactPulse
247
269
  return true if self.equal?(o)
248
270
  self.class == o.class &&
249
271
  addressing_identifier == o.addressing_identifier &&
272
+ platform_type == o.platform_type &&
250
273
  siren == o.siren &&
251
274
  siret == o.siret &&
252
275
  addressing_suffix == o.addressing_suffix &&
253
276
  routing_code == o.routing_code &&
254
- platform == o.platform &&
255
277
  legal_unit == o.legal_unit &&
256
278
  facility == o.facility
257
279
  end
@@ -265,7 +287,7 @@ module FactPulse
265
287
  # Calculates hash code according to all attributes.
266
288
  # @return [Integer] Hash code
267
289
  def hash
268
- [addressing_identifier, siren, siret, addressing_suffix, routing_code, platform, legal_unit, facility].hash
290
+ [addressing_identifier, platform_type, siren, siret, addressing_suffix, routing_code, legal_unit, facility].hash
269
291
  end
270
292
 
271
293
  # Builds the object from hash
@@ -14,26 +14,63 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- class AFNORCreateDirectoryLineBodyAddressingInformation < ApiModelBase
17
+ class AFNORDirectoryLinePayloadStatusLegalUnitFacilityRoutingCode < ApiModelBase
18
+ # Addressing identifier of the directory line.
19
+ attr_accessor :addressing_identifier
20
+
21
+ attr_accessor :platform_type
22
+
23
+ attr_accessor :directory_line_status
24
+
18
25
  # SIREN number
19
26
  attr_accessor :siren
20
27
 
21
28
  # SIRET Number
22
29
  attr_accessor :siret
23
30
 
24
- # Routing identifier od a routing code.
25
- attr_accessor :routing_identifier
26
-
27
31
  # suffix of the directory line which defines an address mesh not attached to a facility
28
32
  attr_accessor :addressing_suffix
29
33
 
34
+ attr_accessor :routing_code
35
+
36
+ attr_accessor :legal_unit
37
+
38
+ attr_accessor :facility
39
+
40
+ class EnumAttributeValidator
41
+ attr_reader :datatype
42
+ attr_reader :allowable_values
43
+
44
+ def initialize(datatype, allowable_values)
45
+ @allowable_values = allowable_values.map do |value|
46
+ case datatype.to_s
47
+ when /Integer/i
48
+ value.to_i
49
+ when /Float/i
50
+ value.to_f
51
+ else
52
+ value
53
+ end
54
+ end
55
+ end
56
+
57
+ def valid?(value)
58
+ !value || allowable_values.include?(value)
59
+ end
60
+ end
61
+
30
62
  # Attribute mapping from ruby-style variable name to JSON key.
31
63
  def self.attribute_map
32
64
  {
65
+ :'addressing_identifier' => :'addressingIdentifier',
66
+ :'platform_type' => :'platformType',
67
+ :'directory_line_status' => :'directoryLineStatus',
33
68
  :'siren' => :'siren',
34
69
  :'siret' => :'siret',
35
- :'routing_identifier' => :'routingIdentifier',
36
- :'addressing_suffix' => :'addressingSuffix'
70
+ :'addressing_suffix' => :'addressingSuffix',
71
+ :'routing_code' => :'routingCode',
72
+ :'legal_unit' => :'legalUnit',
73
+ :'facility' => :'facility'
37
74
  }
38
75
  end
39
76
 
@@ -50,10 +87,15 @@ module FactPulse
50
87
  # Attribute type mapping.
51
88
  def self.openapi_types
52
89
  {
90
+ :'addressing_identifier' => :'String',
91
+ :'platform_type' => :'AFNORRecipientPlatformType',
92
+ :'directory_line_status' => :'AFNORDirectoryLineStatus',
53
93
  :'siren' => :'String',
54
94
  :'siret' => :'String',
55
- :'routing_identifier' => :'String',
56
- :'addressing_suffix' => :'String'
95
+ :'addressing_suffix' => :'String',
96
+ :'routing_code' => :'AFNORDirectoryLinePayloadHistoryLegalUnitFacilityRoutingCodeRoutingCode',
97
+ :'legal_unit' => :'AFNORLegalUnitPayloadIncluded',
98
+ :'facility' => :'AFNORFacilityPayloadIncluded'
57
99
  }
58
100
  end
59
101
 
@@ -67,35 +109,53 @@ module FactPulse
67
109
  # @param [Hash] attributes Model attributes in the form of hash
68
110
  def initialize(attributes = {})
69
111
  if (!attributes.is_a?(Hash))
70
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORCreateDirectoryLineBodyAddressingInformation` initialize method"
112
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::AFNORDirectoryLinePayloadStatusLegalUnitFacilityRoutingCode` initialize method"
71
113
  end
72
114
 
73
115
  # check to see if the attribute exists and convert string to symbol for hash key
74
116
  acceptable_attribute_map = self.class.acceptable_attribute_map
75
117
  attributes = attributes.each_with_object({}) { |(k, v), h|
76
118
  if (!acceptable_attribute_map.key?(k.to_sym))
77
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORCreateDirectoryLineBodyAddressingInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
119
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::AFNORDirectoryLinePayloadStatusLegalUnitFacilityRoutingCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
120
  end
79
121
  h[k.to_sym] = v
80
122
  }
81
123
 
124
+ if attributes.key?(:'addressing_identifier')
125
+ self.addressing_identifier = attributes[:'addressing_identifier']
126
+ end
127
+
128
+ if attributes.key?(:'platform_type')
129
+ self.platform_type = attributes[:'platform_type']
130
+ end
131
+
132
+ if attributes.key?(:'directory_line_status')
133
+ self.directory_line_status = attributes[:'directory_line_status']
134
+ end
135
+
82
136
  if attributes.key?(:'siren')
83
137
  self.siren = attributes[:'siren']
84
- else
85
- self.siren = nil
86
138
  end
87
139
 
88
140
  if attributes.key?(:'siret')
89
141
  self.siret = attributes[:'siret']
90
142
  end
91
143
 
92
- if attributes.key?(:'routing_identifier')
93
- self.routing_identifier = attributes[:'routing_identifier']
94
- end
95
-
96
144
  if attributes.key?(:'addressing_suffix')
97
145
  self.addressing_suffix = attributes[:'addressing_suffix']
98
146
  end
147
+
148
+ if attributes.key?(:'routing_code')
149
+ self.routing_code = attributes[:'routing_code']
150
+ end
151
+
152
+ if attributes.key?(:'legal_unit')
153
+ self.legal_unit = attributes[:'legal_unit']
154
+ end
155
+
156
+ if attributes.key?(:'facility')
157
+ self.facility = attributes[:'facility']
158
+ end
99
159
  end
100
160
 
101
161
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -103,16 +163,16 @@ module FactPulse
103
163
  def list_invalid_properties
104
164
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
165
  invalid_properties = Array.new
106
- if @siren.nil?
107
- invalid_properties.push('invalid value for "siren", siren cannot be nil.')
166
+ if !@addressing_identifier.nil? && @addressing_identifier.to_s.length > 125
167
+ invalid_properties.push('invalid value for "addressing_identifier", the character length must be smaller than or equal to 125.')
108
168
  end
109
169
 
110
- if @siren.to_s.length > 9
170
+ if !@siren.nil? && @siren.to_s.length > 9
111
171
  invalid_properties.push('invalid value for "siren", the character length must be smaller than or equal to 9.')
112
172
  end
113
173
 
114
174
  pattern = Regexp.new(/^([0-9]{9})$/)
115
- if @siren !~ pattern
175
+ if !@siren.nil? && @siren !~ pattern
116
176
  invalid_properties.push("invalid value for \"siren\", must conform to the pattern #{pattern}.")
117
177
  end
118
178
 
@@ -125,15 +185,6 @@ module FactPulse
125
185
  invalid_properties.push("invalid value for \"siret\", must conform to the pattern #{pattern}.")
126
186
  end
127
187
 
128
- if !@routing_identifier.nil? && @routing_identifier.to_s.length > 100
129
- invalid_properties.push('invalid value for "routing_identifier", the character length must be smaller than or equal to 100.')
130
- end
131
-
132
- pattern = Regexp.new(/^(?!\s+$)[\-_\/a-zA-Z0-9]{1,100}$/)
133
- if !@routing_identifier.nil? && @routing_identifier !~ pattern
134
- invalid_properties.push("invalid value for \"routing_identifier\", must conform to the pattern #{pattern}.")
135
- end
136
-
137
188
  if !@addressing_suffix.nil? && @addressing_suffix.to_s.length > 100
138
189
  invalid_properties.push('invalid value for "addressing_suffix", the character length must be smaller than or equal to 100.')
139
190
  end
@@ -145,17 +196,29 @@ module FactPulse
145
196
  # @return true if the model is valid
146
197
  def valid?
147
198
  warn '[DEPRECATED] the `valid?` method is obsolete'
148
- return false if @siren.nil?
149
- return false if @siren.to_s.length > 9
150
- return false if @siren !~ Regexp.new(/^([0-9]{9})$/)
199
+ return false if !@addressing_identifier.nil? && @addressing_identifier.to_s.length > 125
200
+ return false if !@siren.nil? && @siren.to_s.length > 9
201
+ return false if !@siren.nil? && @siren !~ Regexp.new(/^([0-9]{9})$/)
151
202
  return false if !@siret.nil? && @siret.to_s.length > 14
152
203
  return false if !@siret.nil? && @siret !~ Regexp.new(/^([0-9]{14})$/)
153
- return false if !@routing_identifier.nil? && @routing_identifier.to_s.length > 100
154
- return false if !@routing_identifier.nil? && @routing_identifier !~ Regexp.new(/^(?!\s+$)[\-_\/a-zA-Z0-9]{1,100}$/)
155
204
  return false if !@addressing_suffix.nil? && @addressing_suffix.to_s.length > 100
156
205
  true
157
206
  end
158
207
 
208
+ # Custom attribute writer method with validation
209
+ # @param [Object] addressing_identifier Value to be assigned
210
+ def addressing_identifier=(addressing_identifier)
211
+ if addressing_identifier.nil?
212
+ fail ArgumentError, 'addressing_identifier cannot be nil'
213
+ end
214
+
215
+ if addressing_identifier.to_s.length > 125
216
+ fail ArgumentError, 'invalid value for "addressing_identifier", the character length must be smaller than or equal to 125.'
217
+ end
218
+
219
+ @addressing_identifier = addressing_identifier
220
+ end
221
+
159
222
  # Custom attribute writer method with validation
160
223
  # @param [Object] siren Value to be assigned
161
224
  def siren=(siren)
@@ -194,25 +257,6 @@ module FactPulse
194
257
  @siret = siret
195
258
  end
196
259
 
197
- # Custom attribute writer method with validation
198
- # @param [Object] routing_identifier Value to be assigned
199
- def routing_identifier=(routing_identifier)
200
- if routing_identifier.nil?
201
- fail ArgumentError, 'routing_identifier cannot be nil'
202
- end
203
-
204
- if routing_identifier.to_s.length > 100
205
- fail ArgumentError, 'invalid value for "routing_identifier", the character length must be smaller than or equal to 100.'
206
- end
207
-
208
- pattern = Regexp.new(/^(?!\s+$)[\-_\/a-zA-Z0-9]{1,100}$/)
209
- if routing_identifier !~ pattern
210
- fail ArgumentError, "invalid value for \"routing_identifier\", must conform to the pattern #{pattern}."
211
- end
212
-
213
- @routing_identifier = routing_identifier
214
- end
215
-
216
260
  # Custom attribute writer method with validation
217
261
  # @param [Object] addressing_suffix Value to be assigned
218
262
  def addressing_suffix=(addressing_suffix)
@@ -232,10 +276,15 @@ module FactPulse
232
276
  def ==(o)
233
277
  return true if self.equal?(o)
234
278
  self.class == o.class &&
279
+ addressing_identifier == o.addressing_identifier &&
280
+ platform_type == o.platform_type &&
281
+ directory_line_status == o.directory_line_status &&
235
282
  siren == o.siren &&
236
283
  siret == o.siret &&
237
- routing_identifier == o.routing_identifier &&
238
- addressing_suffix == o.addressing_suffix
284
+ addressing_suffix == o.addressing_suffix &&
285
+ routing_code == o.routing_code &&
286
+ legal_unit == o.legal_unit &&
287
+ facility == o.facility
239
288
  end
240
289
 
241
290
  # @see the `==` method
@@ -247,7 +296,7 @@ module FactPulse
247
296
  # Calculates hash code according to all attributes.
248
297
  # @return [Integer] Hash code
249
298
  def hash
250
- [siren, siret, routing_identifier, addressing_suffix].hash
299
+ [addressing_identifier, platform_type, directory_line_status, siren, siret, addressing_suffix, routing_code, legal_unit, facility].hash
251
300
  end
252
301
 
253
302
  # Builds the object from hash