# Path: roulier/codec.py
# class Encoder(ABC):
# class DecoderGetLabel(ABC):
# class DecoderGetPackingSlip(ABC):
#     def __init__(self, config_object):
#     def _extra_input_data_processing(self, input_payload, data):
#     def transform_input_to_carrier_webservice(self, data):
#     def encode(self, input_payload):
#     def __init__(self, config_object):
#     def decode(self, response, payload):
#     def _get_parcel_number(self, payload):
#     def __init__(self, config_object):
#     def decode(self, response, payload):
# 
# Path: roulier/carriers/geodis/geodis_api_rest_ws.py
# class GeodisApiTrackingListOut(GeodisMappingOut):
#     def to_address(self):
#         return {
#             "street1": "adresse1Dest",
#             "street2": "adresse2Dest",
#             "country": "codePaysDest",
#             "zip": "codePostalDest",
#             "country_name": "libellePaysDest",
#             "name": "nomDest",
#             "city": "villeDest",
#         }
# 
#     def from_address(self):
#         return {
#             "street1": "adresse1Exp",
#             "street2": "adresse2Exp",
#             "country": "codePaysExp",
#             "zip": "codePostalExp",
#             "country_name": "libellePaysExp",
#             "name": "nomExp",
#             "city": "villeExp",
#         }
# 
#     def parcels(self):
#         return {
#             "weight": "poids",
#         }
# 
#     def service(self):
#         return {
#             "product": "codeProduit",
#             "agencyId": "codeSa",
#             "customerId": "codeClient",
#             "shippingId": "noRecepisse",
#             "shippingDate": "dateDepart",
#             "reference1": "reference1",
#             "reference2": "reference2",
#             "reference3": "refDest",
#             "option": "codeOption",
#         }
# 
#     def tracking(self):
#         return {
#             "statusDate": "dateEtat",
#             "estDeliveryDate": "dateLivraison",
#             "status": "status",
#             "statusDetails": "libelleLongEtat",
#             "trackingCode": "noSuivi",
#             "publicUrl": "urlSuiviDestinataire",
#             "proofUrl": "urlImageEnlevementLivraison",
#         }
# 
#     def schema(self):
#         return {
#             "parcels": self.parcels(),
#             "service": self.service(),
#             "from_address": self.from_address(),
#             "to_address": self.to_address(),
#             "tracking": self.tracking(),
#         }


from roulier.codec import Decoder
from .geodis_api_rest_ws import GeodisApiTrackingListOut
"""Geodis XML -> Python."""


class GeodisDecoderRestWs(Decoder):
    """Geodis XML -> Python."""

    def decode(self, payload, action):
        """Geodis JSON -> Python.
        payload[body] : dict
        payload[request] : Requests obj
        """
        body = payload["body"]
        if action == "trackingList":

# Path: roulier/codec.py
# class Encoder(ABC):
# class DecoderGetLabel(ABC):
# class DecoderGetPackingSlip(ABC):
#     def __init__(self, config_object):
#     def _extra_input_data_processing(self, input_payload, data):
#     def transform_input_to_carrier_webservice(self, data):
#     def encode(self, input_payload):
#     def __init__(self, config_object):
#     def decode(self, response, payload):
#     def _get_parcel_number(self, payload):
#     def __init__(self, config_object):
#     def decode(self, response, payload):
# 
# Path: roulier/carriers/geodis/geodis_api_rest_ws.py
# class GeodisApiTrackingListOut(GeodisMappingOut):
#     def to_address(self):
#         return {
#             "street1": "adresse1Dest",
#             "street2": "adresse2Dest",
#             "country": "codePaysDest",
#             "zip": "codePostalDest",
#             "country_name": "libellePaysDest",
#             "name": "nomDest",
#             "city": "villeDest",
#         }
# 
#     def from_address(self):
#         return {
#             "street1": "adresse1Exp",
#             "street2": "adresse2Exp",
#             "country": "codePaysExp",
#             "zip": "codePostalExp",
#             "country_name": "libellePaysExp",
#             "name": "nomExp",
#             "city": "villeExp",
#         }
# 
#     def parcels(self):
#         return {
#             "weight": "poids",
#         }
# 
#     def service(self):
#         return {
#             "product": "codeProduit",
#             "agencyId": "codeSa",
#             "customerId": "codeClient",
#             "shippingId": "noRecepisse",
#             "shippingDate": "dateDepart",
#             "reference1": "reference1",
#             "reference2": "reference2",
#             "reference3": "refDest",
#             "option": "codeOption",
#         }
# 
#     def tracking(self):
#         return {
#             "statusDate": "dateEtat",
#             "estDeliveryDate": "dateLivraison",
#             "status": "status",
#             "statusDetails": "libelleLongEtat",
#             "trackingCode": "noSuivi",
#             "publicUrl": "urlSuiviDestinataire",
#             "proofUrl": "urlImageEnlevementLivraison",
#         }
# 
#     def schema(self):
#         return {
#             "parcels": self.parcels(),
#             "service": self.service(),
#             "from_address": self.from_address(),
#             "to_address": self.to_address(),
#             "tracking": self.tracking(),
#         }


# Path: roulier/carriers/geodis/geodis_decoder_rest_ws.py
from roulier.codec import Decoder
from .geodis_api_rest_ws import GeodisApiTrackingListOut

"""Geodis XML -> Python."""


class GeodisDecoderRestWs(Decoder):
    """Geodis XML -> Python."""

    def decode(self, payload, action):
        """Geodis JSON -> Python.
        payload[body] : dict
        payload[request] : Requests obj
        """
        body = payload["body"]
        if action == "trackingList":

            mapping = GeodisApiTrackingListOut()