Пример #1
0
 def create_modify_pickup_request(
         self, payload: PickupUpdateRequest) -> Serializable:
     """ Create a carrier specific pickup modification request data from payload """
     raise MethodNotSupportedError(
         self.__class__.create_modify_pickup_request.__name__,
         self.__class__.__name__,
     )
Пример #2
0
 def parse_cancel_pickup_response(
         self, response: Deserializable) -> Tuple[dict, List[Message]]:
     """ Create a united API pickup cancellation result from carrier response  """
     raise MethodNotSupportedError(
         self.__class__.parse_cancel_pickup_response.__name__,
         self.__class__.__name__,
     )
Пример #3
0
 def parse_pickup_response(
         self,
         response: Deserializable) -> Tuple[PickupDetails, List[Message]]:
     """ Create a united API pickup result from carrier response  """
     raise MethodNotSupportedError(
         self.__class__.parse_pickup_response.__name__,
         self.__class__.__name__)
Пример #4
0
 def parse_shipment_response(
         self,
         response: Deserializable) -> Tuple[ShipmentDetails, List[Message]]:
     """ Create a united API shipment creation result from carrier response  """
     raise MethodNotSupportedError(
         self.__class__.parse_shipment_response.__name__,
         self.__class__.__name__)
Пример #5
0
 def parse_tracking_response(
     self, response: Deserializable
 ) -> Tuple[List[TrackingDetails], List[Message]]:
     """ Create a united API tracking result list from carrier response  """
     raise MethodNotSupportedError(
         self.__class__.parse_tracking_response.__name__,
         self.__class__.__name__)
Пример #6
0
    def modify_pickup(self, request: Serializable) -> Deserializable:
        """Send one or many request(s) to update a pickup from a carrier webservice

        Args:
            request (Serializable): a carrier specific serializable request data type

        Returns:
            Deserializable: a deserializable rate response (xml, json, text...)

        Raises:
            MethodNotSupportedError: Is raised when the carrier integration does not implement this method
        """
        raise MethodNotSupportedError(self.__class__.modify_pickup.__name__,
                                      self.settings.carrier_name)
Пример #7
0
    def get_rates(self, request: Serializable) -> Deserializable:
        """Send one or many request(s) to get shipment rates from a carrier webservice

        Args:
            request (Serializable): a carrier specific serializable request data type

        Returns:
            Deserializable: a deserializable rate response (xml, json, text...)

        Raises:
           Deserializable: a deserializable rate response (xml, json, text...)
        """
        raise MethodNotSupportedError(self.__class__.get_rates.__name__,
                                      self.settings.carrier_name)
Пример #8
0
    def create_rate_request(self, payload: RateRequest) -> Serializable:
        """ Create a carrier specific rate request data from payload 

        Args:
            payload (AddressValidationRequest): the rate request payload

        Returns:
            Serializable: a carrier specific serializable request data type

        Raises:
            MethodNotSupportedError: Is raised when the carrier integration does not implement this method
        """
        raise MethodNotSupportedError(
            self.__class__.create_rate_request.__name__,
            self.settings.carrier_name)
Пример #9
0
    def parse_rate_response(
            self, response: Deserializable
    ) -> Tuple[List[RateDetails], List[Message]]:
        """ Create a unified API quote result list from carrier response

        Args:
            response (Deserializable): a deserializable tracking response (xml, json, text...)

        Returns:
            Tuple[List[RateDetails], List[Message]]: the rate details 
                as well as errors and messages returned

        Raises:
            MethodNotSupportedError: Is raised when the carrier integration does not implement this method
        """
        raise MethodNotSupportedError(
            self.__class__.parse_rate_response.__name__,
            self.settings.carrier_name)
Пример #10
0
    def parse_cancel_pickup_response(
            self, response: Deserializable
    ) -> Tuple[ConfirmationDetails, List[Message]]:
        """ Create a united API pickup cancellation result from carrier response  

        Args:
            response (Deserializable): a deserializable tracking response (xml, json, text...)

        Returns:
            Tuple[ConfirmationDetails, List[Message]]: the operation confirmation details

        Raises:
            MethodNotSupportedError: Is raised when the carrier integration does not implement this method
        """
        raise MethodNotSupportedError(
            self.__class__.parse_cancel_pickup_response.__name__,
            self.settings.carrier_name,
        )
Пример #11
0
 def create_pickup_request(self, payload: PickupRequest) -> Serializable:
     """ Create a carrier specific pickup request xml data from payload """
     raise MethodNotSupportedError(
         self.__class__.create_pickup_request.__name__,
         self.__class__.__name__)
Пример #12
0
 def create_shipment_request(self,
                             payload: ShipmentRequest) -> Serializable:
     """ Create a carrier specific shipment creation request data from payload """
     raise MethodNotSupportedError(
         self.__class__.create_shipment_request.__name__,
         self.__class__.__name__)
Пример #13
0
 def create_tracking_request(self,
                             payload: TrackingRequest) -> Serializable:
     """ Create a carrier specific tracking request data from payload """
     raise MethodNotSupportedError(
         self.__class__.create_tracking_request.__name__,
         self.__class__.__name__)
Пример #14
0
 def cancel_pickup(self, request: Serializable) -> Deserializable:
     raise MethodNotSupportedError(self.__class__.cancel_pickup.__name__,
                                   self.__class__.__name__)
Пример #15
0
 def create_shipment(self, request: Serializable) -> Deserializable:
     raise MethodNotSupportedError(self.__class__.create_shipment.__name__,
                                   self.__class__.__name__)
Пример #16
0
 def get_tracking(self, request: Serializable) -> Deserializable:
     raise MethodNotSupportedError(self.__class__.get_tracking.__name__,
                                   self.__class__.__name__)