factpulse 3.0.37 → 4.0.1

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 (370) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -12
  3. data/Gemfile.lock +1 -1
  4. data/README.md +136 -138
  5. data/docs/AllowanceCharge.md +1 -1
  6. data/docs/Amount2.md +15 -0
  7. data/docs/CDARCycleDeVieApi.md +154 -30
  8. data/docs/ChorusProCredentials.md +8 -8
  9. data/docs/ChorusProDestination.md +1 -1
  10. data/docs/ClientActivateResponse.md +22 -0
  11. data/docs/ClientCreateRequest.md +22 -0
  12. data/docs/ClientDetail.md +38 -0
  13. data/docs/ClientListResponse.md +24 -0
  14. data/docs/ClientManagementApi.md +575 -0
  15. data/docs/ClientSummary.md +38 -0
  16. data/docs/ClientUpdateRequest.md +22 -0
  17. data/docs/DownloadsApi.md +0 -144
  18. data/docs/EncaisseeRequest.md +36 -0
  19. data/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +24 -0
  20. data/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +26 -0
  21. data/docs/GetChorusProIdRequest.md +1 -1
  22. data/docs/GetInvoiceRequest.md +1 -1
  23. data/docs/GetStructureRequest.md +1 -1
  24. data/docs/PDPConfigResponse.md +44 -0
  25. data/docs/PDPConfigUpdateRequest.md +28 -0
  26. data/docs/PaymentAmountByRate.md +1 -1
  27. data/docs/Recipient.md +1 -1
  28. data/docs/RefuseeRequest.md +36 -0
  29. data/docs/SearchStructureRequest.md +1 -1
  30. data/docs/SecretStatus.md +20 -0
  31. data/docs/SimplifiedCDARResponse.md +26 -0
  32. data/docs/SubmitCDARRequest.md +9 -1
  33. data/docs/SubmitCDARXMLRequest.md +9 -1
  34. data/docs/SubmitCompleteInvoiceResponse.md +2 -2
  35. data/docs/SubmitInvoiceRequest.md +1 -1
  36. data/docs/Supplier.md +1 -1
  37. data/docs/ValidateCDARResponse.md +2 -2
  38. data/docs/ValidationErrorResponse.md +2 -8
  39. data/factpulse.gemspec +1 -1
  40. data/lib/factpulse/api/afnorpdppa_api.rb +1 -1
  41. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +1 -1
  42. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +1 -1
  43. data/lib/factpulse/api/cdar_cycle_de_vie_api.rb +159 -49
  44. data/lib/factpulse/api/chorus_pro_api.rb +1 -1
  45. data/lib/factpulse/api/client_management_api.rb +565 -0
  46. data/lib/factpulse/api/document_conversion_api.rb +1 -1
  47. data/lib/factpulse/api/downloads_api.rb +1 -130
  48. data/lib/factpulse/api/e_reporting_api.rb +1 -1
  49. data/lib/factpulse/api/health_api.rb +1 -1
  50. data/lib/factpulse/api/invoice_processing_api.rb +1 -1
  51. data/lib/factpulse/api/pdfxml_verification_api.rb +1 -1
  52. data/lib/factpulse/api/user_api.rb +1 -1
  53. data/lib/factpulse/api_client.rb +1 -1
  54. data/lib/factpulse/api_error.rb +1 -1
  55. data/lib/factpulse/api_model_base.rb +1 -1
  56. data/lib/factpulse/configuration.rb +1 -1
  57. data/lib/factpulse/helpers/client.rb +199 -754
  58. data/lib/factpulse/helpers/exceptions.rb +38 -14
  59. data/lib/factpulse/helpers/helpers.rb +8 -7
  60. data/lib/factpulse/models/acknowledgment_status.rb +1 -1
  61. data/lib/factpulse/models/action_code_info.rb +1 -1
  62. data/lib/factpulse/models/action_codes_response.rb +1 -1
  63. data/lib/factpulse/models/additional_document.rb +1 -1
  64. data/lib/factpulse/models/afnor_acknowledgement.rb +1 -1
  65. data/lib/factpulse/models/afnor_acknowledgement_detail.rb +1 -1
  66. data/lib/factpulse/models/afnor_address_edit.rb +1 -1
  67. data/lib/factpulse/models/afnor_address_patch.rb +1 -1
  68. data/lib/factpulse/models/afnor_address_put.rb +1 -1
  69. data/lib/factpulse/models/afnor_address_read.rb +1 -1
  70. data/lib/factpulse/models/afnor_algorithm.rb +1 -1
  71. data/lib/factpulse/models/afnor_contains_operator.rb +1 -1
  72. data/lib/factpulse/models/afnor_create_directory_line_body.rb +1 -1
  73. data/lib/factpulse/models/afnor_create_directory_line_body_addressing_information.rb +1 -1
  74. data/lib/factpulse/models/afnor_create_directory_line_body_period.rb +1 -1
  75. data/lib/factpulse/models/afnor_create_routing_code_body.rb +1 -1
  76. data/lib/factpulse/models/afnor_credentials.rb +1 -1
  77. data/lib/factpulse/models/afnor_destination.rb +1 -1
  78. data/lib/factpulse/models/afnor_diffusion_status.rb +1 -1
  79. data/lib/factpulse/models/afnor_directory_line_field.rb +1 -1
  80. data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code.rb +1 -1
  81. data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.rb +1 -1
  82. data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_routing_code.rb +1 -1
  83. data/lib/factpulse/models/afnor_directory_line_post201_response.rb +1 -1
  84. data/lib/factpulse/models/afnor_directory_line_search_post200_response.rb +1 -1
  85. data/lib/factpulse/models/afnor_entity_type.rb +1 -1
  86. data/lib/factpulse/models/afnor_error.rb +1 -1
  87. data/lib/factpulse/models/afnor_facility_administrative_status.rb +1 -1
  88. data/lib/factpulse/models/afnor_facility_nature.rb +1 -1
  89. data/lib/factpulse/models/afnor_facility_payload_history.rb +1 -1
  90. data/lib/factpulse/models/afnor_facility_payload_history_ule_b2g_additional_data.rb +1 -1
  91. data/lib/factpulse/models/afnor_facility_payload_included.rb +1 -1
  92. data/lib/factpulse/models/afnor_facility_type.rb +1 -1
  93. data/lib/factpulse/models/afnor_flow.rb +1 -1
  94. data/lib/factpulse/models/afnor_flow_ack_status.rb +1 -1
  95. data/lib/factpulse/models/afnor_flow_direction.rb +1 -1
  96. data/lib/factpulse/models/afnor_flow_info.rb +1 -1
  97. data/lib/factpulse/models/afnor_flow_profile.rb +1 -1
  98. data/lib/factpulse/models/afnor_flow_syntax.rb +1 -1
  99. data/lib/factpulse/models/afnor_flow_type.rb +1 -1
  100. data/lib/factpulse/models/afnor_full_flow_info.rb +1 -1
  101. data/lib/factpulse/models/afnor_health_check_response.rb +1 -1
  102. data/lib/factpulse/models/afnor_legal_unit_administrative_status.rb +1 -1
  103. data/lib/factpulse/models/afnor_legal_unit_payload_history.rb +1 -1
  104. data/lib/factpulse/models/afnor_legal_unit_payload_included.rb +1 -1
  105. data/lib/factpulse/models/afnor_legal_unit_payload_included_no_siren.rb +1 -1
  106. data/lib/factpulse/models/afnor_platform_status.rb +1 -1
  107. data/lib/factpulse/models/afnor_processing_rule.rb +1 -1
  108. data/lib/factpulse/models/afnor_reason_code.rb +1 -1
  109. data/lib/factpulse/models/afnor_reason_code_enum.rb +1 -1
  110. data/lib/factpulse/models/afnor_recipient_platform_type.rb +1 -1
  111. data/lib/factpulse/models/afnor_result.rb +1 -1
  112. data/lib/factpulse/models/afnor_routing_code_administrative_status.rb +1 -1
  113. data/lib/factpulse/models/afnor_routing_code_field.rb +1 -1
  114. data/lib/factpulse/models/afnor_routing_code_payload_history_legal_unit_facility.rb +1 -1
  115. data/lib/factpulse/models/afnor_routing_code_post201_response.rb +1 -1
  116. data/lib/factpulse/models/afnor_routing_code_search.rb +1 -1
  117. data/lib/factpulse/models/afnor_routing_code_search_filters.rb +1 -1
  118. data/lib/factpulse/models/afnor_routing_code_search_filters_administrative_status.rb +1 -1
  119. data/lib/factpulse/models/afnor_routing_code_search_filters_routing_code_name.rb +1 -1
  120. data/lib/factpulse/models/afnor_routing_code_search_filters_routing_identifier.rb +1 -1
  121. data/lib/factpulse/models/afnor_routing_code_search_post200_response.rb +1 -1
  122. data/lib/factpulse/models/afnor_routing_code_search_sorting_inner.rb +1 -1
  123. data/lib/factpulse/models/afnor_search_directory_line.rb +1 -1
  124. data/lib/factpulse/models/afnor_search_directory_line_filters.rb +1 -1
  125. data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_identifier.rb +1 -1
  126. data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_suffix.rb +1 -1
  127. data/lib/factpulse/models/afnor_search_directory_line_sorting_inner.rb +1 -1
  128. data/lib/factpulse/models/afnor_search_flow_content.rb +1 -1
  129. data/lib/factpulse/models/afnor_search_flow_filters.rb +1 -1
  130. data/lib/factpulse/models/afnor_search_flow_params.rb +1 -1
  131. data/lib/factpulse/models/afnor_search_siren.rb +1 -1
  132. data/lib/factpulse/models/afnor_search_siren_filters.rb +1 -1
  133. data/lib/factpulse/models/afnor_search_siren_filters_administrative_status.rb +1 -1
  134. data/lib/factpulse/models/afnor_search_siren_filters_business_name.rb +1 -1
  135. data/lib/factpulse/models/afnor_search_siren_filters_entity_type.rb +1 -1
  136. data/lib/factpulse/models/afnor_search_siren_filters_siren.rb +1 -1
  137. data/lib/factpulse/models/afnor_search_siren_sorting_inner.rb +1 -1
  138. data/lib/factpulse/models/afnor_search_siret.rb +1 -1
  139. data/lib/factpulse/models/afnor_search_siret_filters.rb +1 -1
  140. data/lib/factpulse/models/afnor_search_siret_filters_address_lines.rb +1 -1
  141. data/lib/factpulse/models/afnor_search_siret_filters_administrative_status.rb +1 -1
  142. data/lib/factpulse/models/afnor_search_siret_filters_country_subdivision.rb +1 -1
  143. data/lib/factpulse/models/afnor_search_siret_filters_facility_type.rb +1 -1
  144. data/lib/factpulse/models/afnor_search_siret_filters_locality.rb +1 -1
  145. data/lib/factpulse/models/afnor_search_siret_filters_name.rb +1 -1
  146. data/lib/factpulse/models/afnor_search_siret_filters_postal_code.rb +1 -1
  147. data/lib/factpulse/models/afnor_search_siret_filters_siret.rb +1 -1
  148. data/lib/factpulse/models/afnor_search_siret_sorting_inner.rb +1 -1
  149. data/lib/factpulse/models/afnor_siren_field.rb +1 -1
  150. data/lib/factpulse/models/afnor_siren_search_post200_response.rb +1 -1
  151. data/lib/factpulse/models/afnor_siret_field.rb +1 -1
  152. data/lib/factpulse/models/afnor_siret_search_post200_response.rb +1 -1
  153. data/lib/factpulse/models/afnor_sorting_order.rb +1 -1
  154. data/lib/factpulse/models/afnor_strict_operator.rb +1 -1
  155. data/lib/factpulse/models/afnor_update_patch_directory_line_body.rb +1 -1
  156. data/lib/factpulse/models/afnor_update_patch_routing_code_body.rb +1 -1
  157. data/lib/factpulse/models/afnor_update_put_routing_code_body.rb +1 -1
  158. data/lib/factpulse/models/afnor_webhook_callback_content.rb +1 -1
  159. data/lib/factpulse/models/aggregated_payment_input.rb +1 -1
  160. data/lib/factpulse/models/aggregated_transaction_input.rb +1 -1
  161. data/lib/factpulse/models/allowance_charge.rb +2 -2
  162. data/lib/factpulse/models/allowance_charge_reason_code.rb +1 -1
  163. data/lib/factpulse/models/allowance_reason_code.rb +1 -1
  164. data/lib/factpulse/models/allowance_total_amount.rb +1 -1
  165. data/lib/factpulse/models/amount.rb +2 -2
  166. data/lib/factpulse/models/amount1.rb +2 -2
  167. data/lib/factpulse/models/amount2.rb +104 -0
  168. data/lib/factpulse/models/amount_due.rb +1 -1
  169. data/lib/factpulse/models/api_error.rb +1 -1
  170. data/lib/factpulse/models/api_profile.rb +1 -1
  171. data/lib/factpulse/models/async_task_status.rb +1 -1
  172. data/lib/factpulse/models/base_amount.rb +1 -1
  173. data/lib/factpulse/models/bounding_box_schema.rb +1 -1
  174. data/lib/factpulse/models/buyercountry.rb +1 -1
  175. data/lib/factpulse/models/celery_status.rb +1 -1
  176. data/lib/factpulse/models/certificate_info_response.rb +1 -1
  177. data/lib/factpulse/models/charge_total_amount.rb +1 -1
  178. data/lib/factpulse/models/chorus_pro_credentials.rb +95 -27
  179. data/lib/factpulse/models/chorus_pro_destination.rb +2 -2
  180. data/lib/factpulse/models/chorus_pro_result.rb +1 -1
  181. data/lib/factpulse/models/{facture_electronique_rest_api_schemas_validation_validation_error_response.rb → client_activate_response.rb} +76 -24
  182. data/lib/factpulse/models/client_create_request.rb +236 -0
  183. data/lib/factpulse/models/client_detail.rb +368 -0
  184. data/lib/factpulse/models/client_list_response.rb +249 -0
  185. data/lib/factpulse/models/client_summary.rb +368 -0
  186. data/lib/factpulse/models/client_update_request.rb +225 -0
  187. data/lib/factpulse/models/contact.rb +1 -1
  188. data/lib/factpulse/models/convert_resume_request.rb +1 -1
  189. data/lib/factpulse/models/convert_success_response.rb +1 -1
  190. data/lib/factpulse/models/convert_validation_failed_response.rb +1 -1
  191. data/lib/factpulse/models/country_code.rb +1 -1
  192. data/lib/factpulse/models/create_aggregated_report_request.rb +1 -1
  193. data/lib/factpulse/models/create_cdar_request.rb +1 -1
  194. data/lib/factpulse/models/create_e_reporting_request.rb +1 -1
  195. data/lib/factpulse/models/currency.rb +1 -1
  196. data/lib/factpulse/models/currency_code.rb +1 -1
  197. data/lib/factpulse/models/delivery_party.rb +1 -1
  198. data/lib/factpulse/models/destination.rb +1 -1
  199. data/lib/factpulse/models/doc_type.rb +1 -1
  200. data/lib/factpulse/models/document_type_info.rb +1 -1
  201. data/lib/factpulse/models/e_reporting_flow_type.rb +1 -1
  202. data/lib/factpulse/models/e_reporting_validation_error.rb +1 -1
  203. data/lib/factpulse/models/electronic_address.rb +1 -1
  204. data/lib/factpulse/models/encaisseamount.rb +1 -1
  205. data/lib/factpulse/models/encaisseamount1.rb +1 -1
  206. data/lib/factpulse/models/encaissee_request.rb +293 -0
  207. data/lib/factpulse/models/enriched_invoice_info.rb +1 -1
  208. data/lib/factpulse/models/error_level.rb +1 -1
  209. data/lib/factpulse/models/error_source.rb +1 -1
  210. data/lib/factpulse/models/extraction_info.rb +1 -1
  211. data/lib/factpulse/models/factur_x_invoice.rb +1 -1
  212. data/lib/factpulse/models/factur_xpdf_info.rb +1 -1
  213. data/lib/factpulse/models/{body_submit_cdar_xml_api_v1_cdar_submit_xml_post.rb → facture_electronique_rest_api_schemas_cdar_validation_error_response.rb} +68 -27
  214. data/lib/factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code.rb +1 -1
  215. data/lib/factpulse/models/{facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb → facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb} +30 -98
  216. data/lib/factpulse/models/field_status.rb +1 -1
  217. data/lib/factpulse/models/file_info.rb +1 -1
  218. data/lib/factpulse/models/files_info.rb +1 -1
  219. data/lib/factpulse/models/flow_direction.rb +1 -1
  220. data/lib/factpulse/models/flow_profile.rb +1 -1
  221. data/lib/factpulse/models/flow_summary.rb +1 -1
  222. data/lib/factpulse/models/flow_syntax.rb +1 -1
  223. data/lib/factpulse/models/flow_type.rb +1 -1
  224. data/lib/factpulse/models/generate_aggregated_report_response.rb +1 -1
  225. data/lib/factpulse/models/generate_cdar_response.rb +1 -1
  226. data/lib/factpulse/models/generate_certificate_request.rb +1 -1
  227. data/lib/factpulse/models/generate_certificate_response.rb +1 -1
  228. data/lib/factpulse/models/generate_e_reporting_response.rb +1 -1
  229. data/lib/factpulse/models/get_chorus_pro_id_request.rb +2 -2
  230. data/lib/factpulse/models/get_chorus_pro_id_response.rb +1 -1
  231. data/lib/factpulse/models/get_invoice_request.rb +2 -2
  232. data/lib/factpulse/models/get_invoice_response.rb +1 -1
  233. data/lib/factpulse/models/get_structure_request.rb +2 -2
  234. data/lib/factpulse/models/get_structure_response.rb +1 -1
  235. data/lib/factpulse/models/global_allowance_amount.rb +1 -1
  236. data/lib/factpulse/models/gross_unit_price.rb +1 -1
  237. data/lib/factpulse/models/http_validation_error.rb +1 -1
  238. data/lib/factpulse/models/incoming_invoice.rb +1 -1
  239. data/lib/factpulse/models/incoming_supplier.rb +1 -1
  240. data/lib/factpulse/models/invoice_format.rb +1 -1
  241. data/lib/factpulse/models/invoice_input.rb +1 -1
  242. data/lib/factpulse/models/invoice_line.rb +1 -1
  243. data/lib/factpulse/models/invoice_line_allowance_amount.rb +1 -1
  244. data/lib/factpulse/models/invoice_note.rb +1 -1
  245. data/lib/factpulse/models/invoice_payment_input.rb +1 -1
  246. data/lib/factpulse/models/invoice_references.rb +1 -1
  247. data/lib/factpulse/models/invoice_status.rb +1 -1
  248. data/lib/factpulse/models/invoice_totals.rb +1 -1
  249. data/lib/factpulse/models/invoice_totals_prepayment.rb +1 -1
  250. data/lib/factpulse/models/invoice_type_code.rb +1 -1
  251. data/lib/factpulse/models/invoice_type_code_output.rb +1 -1
  252. data/lib/factpulse/models/invoicing_framework.rb +1 -1
  253. data/lib/factpulse/models/invoicing_framework_code.rb +1 -1
  254. data/lib/factpulse/models/line_net_amount.rb +1 -1
  255. data/lib/factpulse/models/line_sub_type.rb +1 -1
  256. data/lib/factpulse/models/line_total_amount.rb +1 -1
  257. data/lib/factpulse/models/location_inner.rb +1 -1
  258. data/lib/factpulse/models/mandatory_note_schema.rb +1 -1
  259. data/lib/factpulse/models/manual_rate.rb +1 -1
  260. data/lib/factpulse/models/manual_vat_rate.rb +1 -1
  261. data/lib/factpulse/models/missing_field.rb +1 -1
  262. data/lib/factpulse/models/operation_nature.rb +1 -1
  263. data/lib/factpulse/models/output_format.rb +1 -1
  264. data/lib/factpulse/models/page_dimensions_schema.rb +1 -1
  265. data/lib/factpulse/models/payee.rb +1 -1
  266. data/lib/factpulse/models/payment_amount_by_rate.rb +2 -2
  267. data/lib/factpulse/models/payment_card.rb +1 -1
  268. data/lib/factpulse/models/payment_means.rb +1 -1
  269. data/lib/factpulse/models/pdf_validation_result_api.rb +1 -1
  270. data/lib/factpulse/models/pdp_config_response.rb +296 -0
  271. data/lib/factpulse/models/pdp_config_update_request.rb +271 -0
  272. data/lib/factpulse/models/pdp_credentials.rb +1 -1
  273. data/lib/factpulse/models/percentage.rb +1 -1
  274. data/lib/factpulse/models/postal_address.rb +1 -1
  275. data/lib/factpulse/models/price_allowance_amount.rb +1 -1
  276. data/lib/factpulse/models/price_basis_quantity.rb +1 -1
  277. data/lib/factpulse/models/processing_options.rb +1 -1
  278. data/lib/factpulse/models/processing_rule.rb +1 -1
  279. data/lib/factpulse/models/product_characteristic.rb +1 -1
  280. data/lib/factpulse/models/product_classification.rb +1 -1
  281. data/lib/factpulse/models/quantity.rb +1 -1
  282. data/lib/factpulse/models/rate.rb +1 -1
  283. data/lib/factpulse/models/rate1.rb +1 -1
  284. data/lib/factpulse/models/reason_code_info.rb +1 -1
  285. data/lib/factpulse/models/reason_codes_response.rb +1 -1
  286. data/lib/factpulse/models/recipient.rb +1 -3
  287. data/lib/factpulse/models/recipient_input.rb +1 -1
  288. data/lib/factpulse/models/refusee_request.rb +292 -0
  289. data/lib/factpulse/models/report_period.rb +1 -1
  290. data/lib/factpulse/models/report_sender.rb +1 -1
  291. data/lib/factpulse/models/rounding_amount.rb +1 -1
  292. data/lib/factpulse/models/schematron_validation_error.rb +1 -1
  293. data/lib/factpulse/models/scheme_id.rb +4 -4
  294. data/lib/factpulse/models/search_flow_request.rb +1 -1
  295. data/lib/factpulse/models/search_flow_response.rb +1 -1
  296. data/lib/factpulse/models/search_services_response.rb +1 -1
  297. data/lib/factpulse/models/search_structure_request.rb +2 -2
  298. data/lib/factpulse/models/search_structure_response.rb +1 -1
  299. data/lib/factpulse/models/{body_submit_cdar_api_v1_cdar_submit_post.rb → secret_status.rb} +46 -27
  300. data/lib/factpulse/models/sellercountry.rb +1 -1
  301. data/lib/factpulse/models/signature_info.rb +1 -1
  302. data/lib/factpulse/models/signature_info_api.rb +1 -1
  303. data/lib/factpulse/models/signature_parameters.rb +1 -1
  304. data/lib/factpulse/models/simplified_cdar_response.rb +274 -0
  305. data/lib/factpulse/models/simplified_invoice_data.rb +1 -1
  306. data/lib/factpulse/models/status_code_info.rb +1 -1
  307. data/lib/factpulse/models/status_codes_response.rb +1 -1
  308. data/lib/factpulse/models/structure_info.rb +1 -1
  309. data/lib/factpulse/models/structure_parameters.rb +1 -1
  310. data/lib/factpulse/models/structure_service.rb +1 -1
  311. data/lib/factpulse/models/submission_mode.rb +1 -1
  312. data/lib/factpulse/models/submit_aggregated_report_request.rb +1 -1
  313. data/lib/factpulse/models/submit_cdar_request.rb +45 -5
  314. data/lib/factpulse/models/submit_cdar_response.rb +1 -1
  315. data/lib/factpulse/models/submit_cdarxml_request.rb +46 -6
  316. data/lib/factpulse/models/submit_complete_invoice_request.rb +1 -1
  317. data/lib/factpulse/models/submit_complete_invoice_response.rb +17 -17
  318. data/lib/factpulse/models/submit_e_reporting_request.rb +1 -1
  319. data/lib/factpulse/models/submit_e_reporting_response.rb +1 -1
  320. data/lib/factpulse/models/submit_flow_request.rb +1 -1
  321. data/lib/factpulse/models/submit_flow_response.rb +1 -1
  322. data/lib/factpulse/models/submit_gross_amount.rb +1 -1
  323. data/lib/factpulse/models/submit_invoice_request.rb +2 -2
  324. data/lib/factpulse/models/submit_invoice_response.rb +1 -1
  325. data/lib/factpulse/models/submit_net_amount.rb +1 -1
  326. data/lib/factpulse/models/submit_vat_amount.rb +1 -1
  327. data/lib/factpulse/models/supplementary_attachment.rb +1 -1
  328. data/lib/factpulse/models/supplier.rb +1 -3
  329. data/lib/factpulse/models/task_response.rb +1 -1
  330. data/lib/factpulse/models/tax_breakdown_input.rb +1 -1
  331. data/lib/factpulse/models/tax_due_date_type.rb +1 -1
  332. data/lib/factpulse/models/tax_representative.rb +1 -1
  333. data/lib/factpulse/models/taxable_amount.rb +1 -1
  334. data/lib/factpulse/models/taxableamount.rb +1 -1
  335. data/lib/factpulse/models/taxamount.rb +1 -1
  336. data/lib/factpulse/models/taxamount1.rb +1 -1
  337. data/lib/factpulse/models/taxamount2.rb +1 -1
  338. data/lib/factpulse/models/taxexclusiveamount.rb +1 -1
  339. data/lib/factpulse/models/taxexclusiveamount1.rb +1 -1
  340. data/lib/factpulse/models/total_gross_amount.rb +1 -1
  341. data/lib/factpulse/models/total_net_amount.rb +1 -1
  342. data/lib/factpulse/models/total_vat_amount.rb +1 -1
  343. data/lib/factpulse/models/transaction_category.rb +1 -1
  344. data/lib/factpulse/models/transmission_type_code.rb +1 -1
  345. data/lib/factpulse/models/unit_net_price.rb +1 -1
  346. data/lib/factpulse/models/unit_of_measure.rb +1 -1
  347. data/lib/factpulse/models/validate_cdar_request.rb +1 -1
  348. data/lib/factpulse/models/validate_cdar_response.rb +3 -3
  349. data/lib/factpulse/models/validate_e_reporting_request.rb +1 -1
  350. data/lib/factpulse/models/validate_e_reporting_response.rb +1 -1
  351. data/lib/factpulse/models/validation_error.rb +1 -1
  352. data/lib/factpulse/models/validation_error_detail.rb +1 -1
  353. data/lib/factpulse/models/validation_error_response.rb +21 -68
  354. data/lib/factpulse/models/validation_info.rb +1 -1
  355. data/lib/factpulse/models/validation_success_response.rb +1 -1
  356. data/lib/factpulse/models/vat_accounting_code.rb +1 -1
  357. data/lib/factpulse/models/vat_amount.rb +1 -1
  358. data/lib/factpulse/models/vat_category.rb +1 -1
  359. data/lib/factpulse/models/vat_line.rb +1 -1
  360. data/lib/factpulse/models/vat_point_date_code.rb +1 -1
  361. data/lib/factpulse/models/vat_rate.rb +1 -1
  362. data/lib/factpulse/models/verification_success_response.rb +1 -1
  363. data/lib/factpulse/models/verified_field_schema.rb +1 -1
  364. data/lib/factpulse/version.rb +2 -2
  365. data/lib/factpulse.rb +17 -5
  366. metadata +34 -10
  367. data/docs/BodySubmitCdarApiV1CdarSubmitPost.md +0 -20
  368. data/docs/BodySubmitCdarXmlApiV1CdarSubmitXmlPost.md +0 -20
  369. data/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -26
  370. data/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +0 -18
@@ -0,0 +1,236 @@
1
+ =begin
2
+ #FactPulse REST API
3
+
4
+ # REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF 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 - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 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.20.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FactPulse
17
+ # Client creation request.
18
+ class ClientCreateRequest < ApiModelBase
19
+ # Client name
20
+ attr_accessor :name
21
+
22
+ attr_accessor :description
23
+
24
+ attr_accessor :siret
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'name' => :'name',
30
+ :'description' => :'description',
31
+ :'siret' => :'siret'
32
+ }
33
+ end
34
+
35
+ # Returns attribute mapping this model knows about
36
+ def self.acceptable_attribute_map
37
+ attribute_map
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ acceptable_attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'name' => :'String',
49
+ :'description' => :'String',
50
+ :'siret' => :'String'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ :'description',
58
+ :'siret'
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ClientCreateRequest` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::ClientCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'name')
79
+ self.name = attributes[:'name']
80
+ else
81
+ self.name = nil
82
+ end
83
+
84
+ if attributes.key?(:'description')
85
+ self.description = attributes[:'description']
86
+ end
87
+
88
+ if attributes.key?(:'siret')
89
+ self.siret = attributes[:'siret']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ if @name.nil?
99
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
100
+ end
101
+
102
+ if @name.to_s.length > 255
103
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
104
+ end
105
+
106
+ if @name.to_s.length < 1
107
+ invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
108
+ end
109
+
110
+ if !@description.nil? && @description.to_s.length > 1000
111
+ invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 1000.')
112
+ end
113
+
114
+ pattern = Regexp.new(/^\d{14}$/)
115
+ if !@siret.nil? && @siret !~ pattern
116
+ invalid_properties.push("invalid value for \"siret\", must conform to the pattern #{pattern}.")
117
+ end
118
+
119
+ invalid_properties
120
+ end
121
+
122
+ # Check to see if the all the properties in the model are valid
123
+ # @return true if the model is valid
124
+ def valid?
125
+ warn '[DEPRECATED] the `valid?` method is obsolete'
126
+ return false if @name.nil?
127
+ return false if @name.to_s.length > 255
128
+ return false if @name.to_s.length < 1
129
+ return false if !@description.nil? && @description.to_s.length > 1000
130
+ return false if !@siret.nil? && @siret !~ Regexp.new(/^\d{14}$/)
131
+ true
132
+ end
133
+
134
+ # Custom attribute writer method with validation
135
+ # @param [Object] name Value to be assigned
136
+ def name=(name)
137
+ if name.nil?
138
+ fail ArgumentError, 'name cannot be nil'
139
+ end
140
+
141
+ if name.to_s.length > 255
142
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
143
+ end
144
+
145
+ if name.to_s.length < 1
146
+ fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
147
+ end
148
+
149
+ @name = name
150
+ end
151
+
152
+ # Custom attribute writer method with validation
153
+ # @param [Object] description Value to be assigned
154
+ def description=(description)
155
+ if !description.nil? && description.to_s.length > 1000
156
+ fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 1000.'
157
+ end
158
+
159
+ @description = description
160
+ end
161
+
162
+ # Custom attribute writer method with validation
163
+ # @param [Object] siret Value to be assigned
164
+ def siret=(siret)
165
+ pattern = Regexp.new(/^\d{14}$/)
166
+ if !siret.nil? && siret !~ pattern
167
+ fail ArgumentError, "invalid value for \"siret\", must conform to the pattern #{pattern}."
168
+ end
169
+
170
+ @siret = siret
171
+ end
172
+
173
+ # Checks equality by comparing each attribute.
174
+ # @param [Object] Object to be compared
175
+ def ==(o)
176
+ return true if self.equal?(o)
177
+ self.class == o.class &&
178
+ name == o.name &&
179
+ description == o.description &&
180
+ siret == o.siret
181
+ end
182
+
183
+ # @see the `==` method
184
+ # @param [Object] Object to be compared
185
+ def eql?(o)
186
+ self == o
187
+ end
188
+
189
+ # Calculates hash code according to all attributes.
190
+ # @return [Integer] Hash code
191
+ def hash
192
+ [name, description, siret].hash
193
+ end
194
+
195
+ # Builds the object from hash
196
+ # @param [Hash] attributes Model attributes in the form of hash
197
+ # @return [Object] Returns the model itself
198
+ def self.build_from_hash(attributes)
199
+ return nil unless attributes.is_a?(Hash)
200
+ attributes = attributes.transform_keys(&:to_sym)
201
+ transformed_hash = {}
202
+ openapi_types.each_pair do |key, type|
203
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
204
+ transformed_hash["#{key}"] = nil
205
+ elsif type =~ /\AArray<(.*)>/i
206
+ # check to ensure the input is an array given that the attribute
207
+ # is documented as an array but the input is not
208
+ if attributes[attribute_map[key]].is_a?(Array)
209
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
210
+ end
211
+ elsif !attributes[attribute_map[key]].nil?
212
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
213
+ end
214
+ end
215
+ new(transformed_hash)
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ end
235
+
236
+ end
@@ -0,0 +1,368 @@
1
+ =begin
2
+ #FactPulse REST API
3
+
4
+ # REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF 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 - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 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.20.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FactPulse
17
+ # Detailed client view (same fields for now).
18
+ class ClientDetail < ApiModelBase
19
+ # Unique client identifier
20
+ attr_accessor :uid
21
+
22
+ # Client name
23
+ attr_accessor :name
24
+
25
+ attr_accessor :siret
26
+
27
+ attr_accessor :description
28
+
29
+ # Whether the client is active
30
+ attr_accessor :is_active
31
+
32
+ # Whether PDP config exists
33
+ attr_accessor :has_config_pdp
34
+
35
+ attr_accessor :pdp_is_active
36
+
37
+ attr_accessor :pdp_is_mock
38
+
39
+ # Whether Chorus Pro config exists
40
+ attr_accessor :has_config_chorus
41
+
42
+ # Creation date
43
+ attr_accessor :created_at
44
+
45
+ # Last update date
46
+ attr_accessor :updated_at
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'uid' => :'uid',
52
+ :'name' => :'name',
53
+ :'siret' => :'siret',
54
+ :'description' => :'description',
55
+ :'is_active' => :'isActive',
56
+ :'has_config_pdp' => :'hasConfigPdp',
57
+ :'pdp_is_active' => :'pdpIsActive',
58
+ :'pdp_is_mock' => :'pdpIsMock',
59
+ :'has_config_chorus' => :'hasConfigChorus',
60
+ :'created_at' => :'createdAt',
61
+ :'updated_at' => :'updatedAt'
62
+ }
63
+ end
64
+
65
+ # Returns attribute mapping this model knows about
66
+ def self.acceptable_attribute_map
67
+ attribute_map
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ acceptable_attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'uid' => :'String',
79
+ :'name' => :'String',
80
+ :'siret' => :'String',
81
+ :'description' => :'String',
82
+ :'is_active' => :'Boolean',
83
+ :'has_config_pdp' => :'Boolean',
84
+ :'pdp_is_active' => :'Boolean',
85
+ :'pdp_is_mock' => :'Boolean',
86
+ :'has_config_chorus' => :'Boolean',
87
+ :'created_at' => :'Time',
88
+ :'updated_at' => :'Time'
89
+ }
90
+ end
91
+
92
+ # List of attributes with nullable: true
93
+ def self.openapi_nullable
94
+ Set.new([
95
+ :'siret',
96
+ :'description',
97
+ :'pdp_is_active',
98
+ :'pdp_is_mock',
99
+ ])
100
+ end
101
+
102
+ # Initializes the object
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ def initialize(attributes = {})
105
+ if (!attributes.is_a?(Hash))
106
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ClientDetail` initialize method"
107
+ end
108
+
109
+ # check to see if the attribute exists and convert string to symbol for hash key
110
+ acceptable_attribute_map = self.class.acceptable_attribute_map
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!acceptable_attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::ClientDetail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+ if attributes.key?(:'uid')
119
+ self.uid = attributes[:'uid']
120
+ else
121
+ self.uid = nil
122
+ end
123
+
124
+ if attributes.key?(:'name')
125
+ self.name = attributes[:'name']
126
+ else
127
+ self.name = nil
128
+ end
129
+
130
+ if attributes.key?(:'siret')
131
+ self.siret = attributes[:'siret']
132
+ end
133
+
134
+ if attributes.key?(:'description')
135
+ self.description = attributes[:'description']
136
+ end
137
+
138
+ if attributes.key?(:'is_active')
139
+ self.is_active = attributes[:'is_active']
140
+ else
141
+ self.is_active = nil
142
+ end
143
+
144
+ if attributes.key?(:'has_config_pdp')
145
+ self.has_config_pdp = attributes[:'has_config_pdp']
146
+ else
147
+ self.has_config_pdp = nil
148
+ end
149
+
150
+ if attributes.key?(:'pdp_is_active')
151
+ self.pdp_is_active = attributes[:'pdp_is_active']
152
+ end
153
+
154
+ if attributes.key?(:'pdp_is_mock')
155
+ self.pdp_is_mock = attributes[:'pdp_is_mock']
156
+ end
157
+
158
+ if attributes.key?(:'has_config_chorus')
159
+ self.has_config_chorus = attributes[:'has_config_chorus']
160
+ else
161
+ self.has_config_chorus = nil
162
+ end
163
+
164
+ if attributes.key?(:'created_at')
165
+ self.created_at = attributes[:'created_at']
166
+ else
167
+ self.created_at = nil
168
+ end
169
+
170
+ if attributes.key?(:'updated_at')
171
+ self.updated_at = attributes[:'updated_at']
172
+ else
173
+ self.updated_at = nil
174
+ end
175
+ end
176
+
177
+ # Show invalid properties with the reasons. Usually used together with valid?
178
+ # @return Array for valid properties with the reasons
179
+ def list_invalid_properties
180
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
181
+ invalid_properties = Array.new
182
+ if @uid.nil?
183
+ invalid_properties.push('invalid value for "uid", uid cannot be nil.')
184
+ end
185
+
186
+ if @name.nil?
187
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
188
+ end
189
+
190
+ if @is_active.nil?
191
+ invalid_properties.push('invalid value for "is_active", is_active cannot be nil.')
192
+ end
193
+
194
+ if @has_config_pdp.nil?
195
+ invalid_properties.push('invalid value for "has_config_pdp", has_config_pdp cannot be nil.')
196
+ end
197
+
198
+ if @has_config_chorus.nil?
199
+ invalid_properties.push('invalid value for "has_config_chorus", has_config_chorus cannot be nil.')
200
+ end
201
+
202
+ if @created_at.nil?
203
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
204
+ end
205
+
206
+ if @updated_at.nil?
207
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
208
+ end
209
+
210
+ invalid_properties
211
+ end
212
+
213
+ # Check to see if the all the properties in the model are valid
214
+ # @return true if the model is valid
215
+ def valid?
216
+ warn '[DEPRECATED] the `valid?` method is obsolete'
217
+ return false if @uid.nil?
218
+ return false if @name.nil?
219
+ return false if @is_active.nil?
220
+ return false if @has_config_pdp.nil?
221
+ return false if @has_config_chorus.nil?
222
+ return false if @created_at.nil?
223
+ return false if @updated_at.nil?
224
+ true
225
+ end
226
+
227
+ # Custom attribute writer method with validation
228
+ # @param [Object] uid Value to be assigned
229
+ def uid=(uid)
230
+ if uid.nil?
231
+ fail ArgumentError, 'uid cannot be nil'
232
+ end
233
+
234
+ @uid = uid
235
+ end
236
+
237
+ # Custom attribute writer method with validation
238
+ # @param [Object] name Value to be assigned
239
+ def name=(name)
240
+ if name.nil?
241
+ fail ArgumentError, 'name cannot be nil'
242
+ end
243
+
244
+ @name = name
245
+ end
246
+
247
+ # Custom attribute writer method with validation
248
+ # @param [Object] is_active Value to be assigned
249
+ def is_active=(is_active)
250
+ if is_active.nil?
251
+ fail ArgumentError, 'is_active cannot be nil'
252
+ end
253
+
254
+ @is_active = is_active
255
+ end
256
+
257
+ # Custom attribute writer method with validation
258
+ # @param [Object] has_config_pdp Value to be assigned
259
+ def has_config_pdp=(has_config_pdp)
260
+ if has_config_pdp.nil?
261
+ fail ArgumentError, 'has_config_pdp cannot be nil'
262
+ end
263
+
264
+ @has_config_pdp = has_config_pdp
265
+ end
266
+
267
+ # Custom attribute writer method with validation
268
+ # @param [Object] has_config_chorus Value to be assigned
269
+ def has_config_chorus=(has_config_chorus)
270
+ if has_config_chorus.nil?
271
+ fail ArgumentError, 'has_config_chorus cannot be nil'
272
+ end
273
+
274
+ @has_config_chorus = has_config_chorus
275
+ end
276
+
277
+ # Custom attribute writer method with validation
278
+ # @param [Object] created_at Value to be assigned
279
+ def created_at=(created_at)
280
+ if created_at.nil?
281
+ fail ArgumentError, 'created_at cannot be nil'
282
+ end
283
+
284
+ @created_at = created_at
285
+ end
286
+
287
+ # Custom attribute writer method with validation
288
+ # @param [Object] updated_at Value to be assigned
289
+ def updated_at=(updated_at)
290
+ if updated_at.nil?
291
+ fail ArgumentError, 'updated_at cannot be nil'
292
+ end
293
+
294
+ @updated_at = updated_at
295
+ end
296
+
297
+ # Checks equality by comparing each attribute.
298
+ # @param [Object] Object to be compared
299
+ def ==(o)
300
+ return true if self.equal?(o)
301
+ self.class == o.class &&
302
+ uid == o.uid &&
303
+ name == o.name &&
304
+ siret == o.siret &&
305
+ description == o.description &&
306
+ is_active == o.is_active &&
307
+ has_config_pdp == o.has_config_pdp &&
308
+ pdp_is_active == o.pdp_is_active &&
309
+ pdp_is_mock == o.pdp_is_mock &&
310
+ has_config_chorus == o.has_config_chorus &&
311
+ created_at == o.created_at &&
312
+ updated_at == o.updated_at
313
+ end
314
+
315
+ # @see the `==` method
316
+ # @param [Object] Object to be compared
317
+ def eql?(o)
318
+ self == o
319
+ end
320
+
321
+ # Calculates hash code according to all attributes.
322
+ # @return [Integer] Hash code
323
+ def hash
324
+ [uid, name, siret, description, is_active, has_config_pdp, pdp_is_active, pdp_is_mock, has_config_chorus, created_at, updated_at].hash
325
+ end
326
+
327
+ # Builds the object from hash
328
+ # @param [Hash] attributes Model attributes in the form of hash
329
+ # @return [Object] Returns the model itself
330
+ def self.build_from_hash(attributes)
331
+ return nil unless attributes.is_a?(Hash)
332
+ attributes = attributes.transform_keys(&:to_sym)
333
+ transformed_hash = {}
334
+ openapi_types.each_pair do |key, type|
335
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
336
+ transformed_hash["#{key}"] = nil
337
+ elsif type =~ /\AArray<(.*)>/i
338
+ # check to ensure the input is an array given that the attribute
339
+ # is documented as an array but the input is not
340
+ if attributes[attribute_map[key]].is_a?(Array)
341
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
342
+ end
343
+ elsif !attributes[attribute_map[key]].nil?
344
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
345
+ end
346
+ end
347
+ new(transformed_hash)
348
+ end
349
+
350
+ # Returns the object in the form of hash
351
+ # @return [Hash] Returns the object in the form of hash
352
+ def to_hash
353
+ hash = {}
354
+ self.class.attribute_map.each_pair do |attr, param|
355
+ value = self.send(attr)
356
+ if value.nil?
357
+ is_nullable = self.class.openapi_nullable.include?(attr)
358
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
359
+ end
360
+
361
+ hash[param] = _to_hash(value)
362
+ end
363
+ hash
364
+ end
365
+
366
+ end
367
+
368
+ end