Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
sincpro-siat-soap / services / billing / check_service.py
Size: Mime:
from sincpro_siat_soap import DataTransferObject, Feature, siat_soap_sdk
from sincpro_siat_soap.global_definitions import SIAT_WSDL


class CommandCheckHealth(DataTransferObject):
    pass


class ResponseCheckHealth(DataTransferObject):
    is_up: bool


@siat_soap_sdk.feature(CommandCheckHealth)
class CheckHealth(Feature):

    def execute(self, dto: CommandCheckHealth) -> ResponseCheckHealth:
        response = self.soap_client(
            SIAT_WSDL.FACTURA_COMPRA_VENTA
        ).service.verificarComunicacion()
        return ResponseCheckHealth(is_up=response["transaccion"])