Skip to content

Commit

Permalink
Merge pull request #44 from PurplShip/SendleIntegrationhotFix
Browse files Browse the repository at this point in the history
Sendle integrationhot fix
  • Loading branch information
danh91 authored Mar 27, 2019
2 parents c75b8c3 + 5708f79 commit 6af459a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions purplship/mappers/sendle/sendle_mapper/partials/rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[]
)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion purplship/mappers/sendle/sendle_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions tests/sendle/quote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 6af459a

Please sign in to comment.