本文整理汇总了Python中pysimplesoap.client.SoapClient.rechazarCTG方法的典型用法代码示例。如果您正苦于以下问题:Python SoapClient.rechazarCTG方法的具体用法?Python SoapClient.rechazarCTG怎么用?Python SoapClient.rechazarCTG使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pysimplesoap.client.SoapClient
的用法示例。
在下文中一共展示了SoapClient.rechazarCTG方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import rechazarCTG [as 别名]
#.........这里部分代码省略.........
controles = ret['arrayControles']
self.Controles = ["%(tipo)s: %(descripcion)s" % ctl['control']
for ctl in controles]
@inicializar_y_capturar_excepciones
def Dummy(self):
"Obtener el estado de los servidores de la AFIP"
results = self.client.dummy()['response']
self.AppServerStatus = str(results['appserver'])
self.DbServerStatus = str(results['dbserver'])
self.AuthServerStatus = str(results['authserver'])
@inicializar_y_capturar_excepciones
def AnularCTG(self, carta_porte, ctg):
"Anular el CTG si se creó el mismo por error"
response = self.client.anularCTG(request=dict(
auth={
'token': self.Token, 'sign': self.Sign,
'cuitRepresentado': self.Cuit, },
datosAnularCTG={
'cartaPorte': carta_porte,
'ctg': ctg, }))['response']
datos = response.get('datosResponse')
self.__analizar_errores(response)
if datos:
self.CartaPorte = str(datos['cartaPorte'])
self.NumeroCTG = str(datos['CTG'])
self.FechaHora = str(datos['fechaHora'])
self.CodigoOperacion = str(datos['codigoOperacion'])
@inicializar_y_capturar_excepciones
def RechazarCTG(self, carta_porte, ctg, motivo):
"El Destino puede rechazar el CTG a través de la siguiente operatoria"
response = self.client.rechazarCTG(request=dict(
auth={
'token': self.Token, 'sign': self.Sign,
'cuitRepresentado': self.Cuit, },
datosRechazarCTG={
'cartaPorte': carta_porte,
'ctg': ctg, 'motivoRechazo': motivo,
}))['response']
datos = response.get('datosResponse')
self.__analizar_errores(response)
if datos:
self.CartaPorte = str(datos['cartaPorte'])
self.NumeroCTG = str(datos['CTG'])
self.FechaHora = str(datos['fechaHora'])
self.CodigoOperacion = str(datos['codigoOperacion'])
@inicializar_y_capturar_excepciones
def SolicitarCTGInicial(self, numero_carta_de_porte, codigo_especie,
cuit_canjeador, cuit_destino, cuit_destinatario, codigo_localidad_origen,
codigo_localidad_destino, codigo_cosecha, peso_neto_carga,
cant_horas=None, patente_vehiculo=None, cuit_transportista=None,
km_recorridos=None, **kwargs):
"Solicitar CTG Desde el Inicio"
# ajusto parámetros según validaciones de AFIP:
if cuit_canjeador and int(cuit_canjeador) == 0:
cuit_canjeador = None # nulo
ret = self.client.solicitarCTGInicial(request=dict(
auth={
'token': self.Token, 'sign': self.Sign,
'cuitRepresentado': self.Cuit, },
datosSolicitarCTGInicial=dict(
cartaPorte=numero_carta_de_porte,
codigoEspecie=codigo_especie,