diff --git a/purplship/mappers/sendle/sendle_mapper/partials/rate.py b/purplship/mappers/sendle/sendle_mapper/partials/rate.py index 8ce64a464f..fe9a501ee1 100644 --- a/purplship/mappers/sendle/sendle_mapper/partials/rate.py +++ b/purplship/mappers/sendle/sendle_mapper/partials/rate.py @@ -39,7 +39,7 @@ def _extract_quote(self, parcel_quote: ParcelQuoteResponse) -> QuoteDetails: duties_and_taxes=parcel_quote.quote.tax.amount, total_charge=parcel_quote.quote.net.amount, currency=parcel_quote.quote.net.currency, - delivery_date=str(parcel_quote.eta.date_range[-1:]), + delivery_date=parcel_quote.eta.date_range[-1], discount=None, extra_charges=[] ) @@ -49,7 +49,7 @@ def create_parcel_quote_request(self, payload: RateRequest) -> ParcelQuoteReques SendleMapperPartial._create_domestic_quote if ( payload.recipient.country_code is None or - payload.recipient.country_code == 'AUS' + payload.recipient.country_code == 'AU' ) else SendleMapperPartial._create_international_quote )(payload) diff --git a/purplship/mappers/sendle/sendle_proxy.py b/purplship/mappers/sendle/sendle_proxy.py index 2cdbf539d7..c784d022a5 100644 --- a/purplship/mappers/sendle/sendle_proxy.py +++ b/purplship/mappers/sendle/sendle_proxy.py @@ -30,7 +30,7 @@ def get_quotes(self, parcel_quote_request: ParcelQuoteRequest) -> dict: "Content-Type": "application/json", "Authorization": f"Basic {self.authorization}", }, - method="POST", + method="GET", ) return to_dict(response) diff --git a/tests/sendle/quote.py b/tests/sendle/quote.py index e653b21cb5..000aeba783 100644 --- a/tests/sendle/quote.py +++ b/tests/sendle/quote.py @@ -71,7 +71,7 @@ def test_parse_quote_response_errors(self): "base_charge": 14.95, "carrier": "Sendle", "currency": "AUD", - "delivery_date": "['2018-02-19']", + "delivery_date": "2018-02-19", "duties_and_taxes": 1.36, "service_name": "Easy", "service_type": "Easy", @@ -81,7 +81,7 @@ def test_parse_quote_response_errors(self): "base_charge": 13.95, "carrier": "Sendle", "currency": "AUD", - "delivery_date": "['2018-02-19']", + "delivery_date": "2018-02-19", "duties_and_taxes": 1.27, "service_name": "Premium", "service_type": "Premium", @@ -91,7 +91,7 @@ def test_parse_quote_response_errors(self): "base_charge": 13.95, "carrier": "Sendle", "currency": "AUD", - "delivery_date": "['2018-02-14']", + "delivery_date": "2018-02-14", "duties_and_taxes": 1.27, "service_name": "Pro", "service_type": "Pro",