def _extract_error(self, errors: List[T.Error],
                    conditionNode: etree.ElementBase) -> List[T.Error]:
     condition = Res.ConditionType()
     condition.build(conditionNode)
     return errors + [
         T.Error(
             code=condition.ConditionCode,
             message=condition.ConditionData,
             carrier=self.client.carrier_name,
         )
     ]
Esempio n. 2
0
 def _extract_error(self, errors: List[T.Error],
                    messageNode: etree.ElementBase) -> List[T.Error]:
     message = messageType()
     message.build(messageNode)
     return errors + [
         T.Error(
             code=message.code,
             message=message.description,
             carrier=self.client.carrier_name,
         )
     ]
 def _extract_error(self, errors: List[T.Error],
                    errorNode: etree.ElementBase) -> List[T.Error]:
     error = Err.CodeType()
     error.build(errorNode)
     return errors + [
         T.Error(
             code=error.Code,
             message=error.Description,
             carrier=self.client.carrier_name,
         )
     ]
Esempio n. 4
0
 def _extract_error(self, errors: List[T.Error],
                    notificationNode: etree.ElementBase) -> List[T.Error]:
     notification = Notification()
     notification.build(notificationNode)
     if notification.Severity in ("SUCCESS", "NOTE"):
         return errors
     return errors + [
         T.Error(
             code=notification.Code,
             message=notification.Message,
             carrier=self.client.carrier_name,
         )
     ]