# coding: utf-8

"""
    FactPulse REST API

     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/     

    The version of the OpenAPI document: 1.0.0
    Contact: contact@factpulse.fr
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import unittest

from factpulse.models.afnor_directory_line_search_post200_response import AFNORDirectoryLineSearchPost200Response

class TestAFNORDirectoryLineSearchPost200Response(unittest.TestCase):
    """AFNORDirectoryLineSearchPost200Response unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional) -> AFNORDirectoryLineSearchPost200Response:
        """Test AFNORDirectoryLineSearchPost200Response
            include_optional is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        # uncomment below to create an instance of `AFNORDirectoryLineSearchPost200Response`
        """
        model = AFNORDirectoryLineSearchPost200Response()
        if include_optional:
            return AFNORDirectoryLineSearchPost200Response(
                search = factpulse.models.search_directory_line.searchDirectoryLine(
                    filters = factpulse.models.afnor_search_directory_line_filters.AFNOR_searchDirectoryLineFilters(
                        addressing_identifier = factpulse.models.afnor_search_directory_line_filters_addressing_identifier.AFNOR_searchDirectoryLineFiltersAddressingIdentifier(
                            op = 'contains', 
                            value = 'dcsc456sdcsdcs556', ), 
                        siren = factpulse.models.afnor_search_siren_filters_siren.AFNOR_searchSirenFiltersSiren(), 
                        siret = factpulse.models.afnor_search_siret_filters_siret.AFNOR_searchSiretFiltersSiret(), 
                        routing_identifier = factpulse.models.afnor_routing_code_search_filters_routing_identifier.AFNOR_routingCodeSearchFiltersRoutingIdentifier(), 
                        addressing_suffix = factpulse.models.afnor_search_directory_line_filters_addressing_suffix.AFNOR_searchDirectoryLineFiltersAddressingSuffix(), ), 
                    sorting = [{champ=addressingIdentifier, order=ascending}], 
                    fields = [addressingIdentifier, siren, siret, addressingSuffix, idInstance], 
                    limit = 50, 
                    ignore = 20, ),
                total_number_of_results = 1500,
                results = [
                    factpulse.models.directory_line_payload_history_legal_unit_facility_routing_code.directoryLinePayloadHistoryLegalUnitFacilityRoutingCode(
                        addressing_identifier = 'dcsc456sdcsdcs556', 
                        siren = '702042755', 
                        siret = '70204275500240', 
                        addressing_suffix = 'dcsc456sdcsdcs556', 
                        routing_code = factpulse.models.afnor_directory_line_payload_history_legal_unit_facility_routing_code_routing_code.AFNOR_directoryLinePayloadHistoryLegalUnitFacilityRoutingCodeRoutingCode(
                            routing_identifier = 'dcsc456sdcsdcs556', 
                            routing_identifier_type = '0224', 
                            routing_code_name = 'Libellé Code routage', 
                            manages_legal_commitment = True, 
                            administrative_status = 'A', 
                            address = factpulse.models.afnor_address_read.AFNOR_addressRead(
                                address_line1 = '16 BIS RUE HENRI BARBUSSE', 
                                address_line2 = 'CEDEX 1', 
                                address_line3 = 'Bâtiment le Callipso', 
                                postal_code = '38100', 
                                country_subdivision = 'Bretagne', 
                                locality = 'Grenoble', 
                                country_code = 'FR', 
                                country_name = 'France', ), ), 
                        platform = factpulse.models.afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.AFNOR_directoryLinePayloadHistoryLegalUnitFacilityRoutingCodePlatform(
                            platform_type = 'WK', 
                            platform_status = 'Enabled', ), 
                        legal_unit = factpulse.models.legal_unit_payload_included.legalUnitPayloadIncluded(
                            business_name = 'Boulangerie Pascale', 
                            entity_type = 'Public', ), 
                        facility = factpulse.models.facility_payload_included.facilityPayloadIncluded(
                            siret = '70204275500240', 
                            siren = '702042755', 
                            name = 'Boulangerie Pascale', 
                            facility_type = 'P', 
                            diffusible = 'O', 
                            b2g_additional_data = factpulse.models.afnor_facility_payload_history_ule_b2g_additional_data.AFNOR_facilityPayloadHistoryUleB2gAdditionalData(
                                pm = True, 
                                pm_only = True, 
                                manages_payment_status = True, 
                                manages_legal_commitment_code = True, 
                                manages_legal_commitment_or_service_code = True, 
                                service_code_status = True, ), ), )
                    ]
            )
        else:
            return AFNORDirectoryLineSearchPost200Response(
        )
        """

    def testAFNORDirectoryLineSearchPost200Response(self):
        """Test AFNORDirectoryLineSearchPost200Response"""
        # inst_req_only = self.make_instance(include_optional=False)
        # inst_req_and_optional = self.make_instance(include_optional=True)

if __name__ == '__main__':
    unittest.main()
