-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from PurplShip/rc5hotFixes
Rc5hot fixes
- Loading branch information
Showing
42 changed files
with
524 additions
and
523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from .client import Client | ||
from .mapper import Mapper | ||
from .proxy import Proxy | ||
from .entities import Quote, Tracking | ||
from .Types import Quote, Tracking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
from typing import List, Tuple | ||
from .client import Client | ||
from ..domain import entities as E | ||
from ..domain import Types as T | ||
|
||
class Mapper: | ||
""" Unitied API to carrier API Mapper (Interface) """ | ||
client: Client | ||
|
||
def create_quote_request(self, payload: E.shipment_request): | ||
def create_quote_request(self, payload: T.shipment_request): | ||
""" Create carrier specific quote request xml data from payload """ | ||
raise Exception("Not Supported") | ||
|
||
def parse_quote_response(self, response) -> Tuple[List[E.QuoteDetails], List[E.Error]]: | ||
def parse_quote_response(self, response) -> Tuple[List[T.QuoteDetails], List[T.Error]]: | ||
""" Create united API quote result list from carrier xml response """ | ||
raise Exception("Not Supported") | ||
|
||
def create_tracking_request(self, payload: E.tracking_request): | ||
def create_tracking_request(self, payload: T.tracking_request): | ||
""" Create carrier specific tracking request xml data from payload """ | ||
raise Exception("Not Supported") | ||
|
||
def parse_tracking_response(self, response) -> Tuple[List[E.TrackingDetails], List[E.Error]]: | ||
def parse_tracking_response(self, response) -> Tuple[List[T.TrackingDetails], List[T.Error]]: | ||
""" Create united API tracking result list from carrier xml response """ | ||
raise Exception("Not Supported") | ||
|
||
def create_shipment_request(self, payload: E.shipment_request): | ||
def create_shipment_request(self, payload: T.shipment_request): | ||
""" Create carrier specific shipment creation request xml data from payload """ | ||
raise Exception("Not Supported") | ||
|
||
def parse_shipment_response(self, response) -> Tuple[E.ShipmentDetails, List[E.Error]]: | ||
def parse_shipment_response(self, response) -> Tuple[T.ShipmentDetails, List[T.Error]]: | ||
""" Create united API shipment creation result from carrier xml response """ | ||
raise Exception("Not Supported") | ||
|
||
def create_pickup_request(self, payload: E.pickup_request): | ||
def create_pickup_request(self, payload: T.pickup_request): | ||
""" Create carrier specific pickup request xml data from payload """ | ||
raise Exception("Not Supported") | ||
|
||
def modify_pickup_request(self, payload: E.pickup_request): | ||
def modify_pickup_request(self, payload: T.pickup_request): | ||
""" Create carrier specific pickup modification request xml data from payload """ | ||
raise Exception("Not Supported") | ||
|
||
def parse_pickup_response(self, response) -> Tuple[E.PickupDetails, List[E.Error]]: | ||
def parse_pickup_response(self, response) -> Tuple[T.PickupDetails, List[T.Error]]: | ||
""" Create united API pickup result from carrier xml response """ | ||
raise Exception("Not Supported") | ||
|
||
def create_pickup_cancellation_request(self, payload: E.pickup_cancellation_request): | ||
def create_pickup_cancellation_request(self, payload: T.pickup_cancellation_request): | ||
""" Create carrier specific pickup cancellation request xml data from payload """ | ||
raise Exception("Not Supported") | ||
|
||
def parse_pickup_cancellation_response(self, response) -> Tuple[dict, List[E.Error]]: | ||
def parse_pickup_cancellation_response(self, response) -> Tuple[dict, List[T.Error]]: | ||
""" Create united API pickup cancellation result from carrier xml response """ | ||
raise Exception("Not Supported") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.