ds_provider_simployer_py_lib.linked_service.simployer ===================================================== .. py:module:: ds_provider_simployer_py_lib.linked_service.simployer .. autoapi-nested-parse:: **File:** ``simployer.py`` **Region:** ``ds_provider_simployer_py_lib/linked_service/simployer`` Simployer Linked Service This module implements a linked service for Simployer, allowing users to connect to and interact with Simployer instance using client credentials. .. rubric:: Example >>> from uuid import uuid4 >>> linked_service = SimployerLinkedService( ... settings=SimployerLinkedServiceSettings( ... client_id="your_client_id", ... client_secret="your_client_secret", ... ), ... id=uuid4(), ... name="simployer-connection", ... version="1.0.0", ... description="Simployer API connection" ... ) >>> # For testing credentials >>> success, message = linked_service.test_connection() >>> # For actual usage with persistent connection >>> linked_service.connect() >>> try: ... session = linked_service.session # Use session for API calls ... finally: ... linked_service.close() Attributes ---------- .. autoapisummary:: ds_provider_simployer_py_lib.linked_service.simployer.logger ds_provider_simployer_py_lib.linked_service.simployer.SimployerLinkedServiceSettingsType Classes ------- .. autoapisummary:: ds_provider_simployer_py_lib.linked_service.simployer.SimployerLinkedServiceSettings ds_provider_simployer_py_lib.linked_service.simployer.SimployerLinkedService Module Contents --------------- .. py:data:: logger .. py:class:: SimployerLinkedServiceSettings Bases: :py:obj:`ds_protocol_http_py_lib.HttpLinkedServiceSettings` Settings required to connect to Simployer API using client credentials. .. attribute:: client_id Client ID for authentication .. attribute:: client_secret Client secret for authentication .. attribute:: token_endpoint Token endpoint (default: https://simplauth.simployer.com/oauth/token) .. attribute:: audience Audience identifier (default: https://hrconnect.simployer.com) .. attribute:: api_version API version to use (default: v1) .. attribute:: host API host URL (default: https://hrconnect.simployer.com) .. attribute:: auth_type Authentication type (default: CUSTOM) .. attribute:: custom Custom authentication settings, required if auth_type is CUSTOM .. py:attribute:: client_id :type: str The client ID for authentication. .. py:attribute:: client_secret :type: str The client secret for authentication. .. py:attribute:: token_endpoint :type: str :value: 'https://simplauth.simployer.com/oauth/token' The token endpoint URL. .. py:attribute:: audience :type: str :value: 'https://hrconnect.simployer.com' The audience identifier. .. py:attribute:: api_version :type: str :value: 'v1' The API version to use. .. py:attribute:: host :type: str :value: 'https://hrconnect.simployer.com' The API host URL. .. py:attribute:: auth_type :type: ds_protocol_http_py_lib.enums.AuthType The authentication type to use. .. py:attribute:: custom :type: ds_protocol_http_py_lib.linked_service.CustomAuthSettings | None :value: None Custom authentication settings, required if auth_type is CUSTOM. .. py:data:: SimployerLinkedServiceSettingsType .. py:class:: SimployerLinkedService Bases: :py:obj:`ds_protocol_http_py_lib.HttpLinkedService`\ [\ :py:obj:`SimployerLinkedServiceSettingsType`\ ], :py:obj:`Generic`\ [\ :py:obj:`SimployerLinkedServiceSettingsType`\ ] Linked service for connecting to Simployer using client credentials. .. py:attribute:: settings :type: SimployerLinkedServiceSettingsType .. py:property:: type :type: ds_provider_simployer_py_lib.enums.ResourceType Get the type of the linked service. :returns: ResourceType .. py:method:: __post_init__() -> None Post-init method to set up the linked service. If self.settings.custom is None and auth_type is CUSTOM, populates custom with default OAuth2 client credentials settings. This allows callers to preconfigure custom auth settings or subclasses to override the behavior. :returns: None