Skip to content

Commit

Permalink
Merge pull request #111 from Purplship/patch-international-shipment-w…
Browse files Browse the repository at this point in the history
…ith-customs

[fix] international shipment request
  • Loading branch information
danh91 authored May 4, 2021
2 parents 9544d5f + d889549 commit 532979d
Show file tree
Hide file tree
Showing 46 changed files with 652 additions and 317 deletions.
2 changes: 1 addition & 1 deletion docs/development/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ canadapost_pickup_response = canadapost_proxy.schedule_pickup(canadapost_pickup_
# Parse the response into a Purplship unified Pickup response type
pickup_response = canadapost_mapper.parse_pickup_response(canadapost_pickup_response)

print(pickup_request)
print(pickup_response)
```
```shell
(
Expand Down
2 changes: 1 addition & 1 deletion docs/development/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Clone the repo

```bash
git clone [email protected]:PurplShip/purplship.git
git clone [email protected]:Purplship/purplship.git
```

## Source the `bash` script
Expand Down
13 changes: 12 additions & 1 deletion docs/guide/address.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,23 @@ validation, messages = purplship.Address.validate(request).from_(carrier_gateway
| `email` | `str` |
| `phone_number` | `str` |
| `state_code` | `str` |
| `suburb` | `str` |
| `residential` | `bool` |
| `address_line1` | `str` |
| `address_line2` | `str` |
| `federal_tax_id` | `str` |
| `state_tax_id` | `str` |
| `extra` | [AddressExtra](#addressextra) |


#### AddressExtra

| Name | Type | Description
| --- | --- | --- |
| `street_name` | `str` |
| `street_number` | `str` |
| `street_type` | `str` |
| `suburb` | `str` |
| `suite` | `str` |


### Response
Expand Down
39 changes: 36 additions & 3 deletions docs/guide/pickup.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,23 @@ pickup, messages = purplship.Pickup.schedule(request).from_(carrier_gateway).par
| `email` | `str` |
| `phone_number` | `str` |
| `state_code` | `str` |
| `suburb` | `str` |
| `residential` | `bool` |
| `address_line1` | `str` |
| `address_line2` | `str` |
| `federal_tax_id` | `str` |
| `state_tax_id` | `str` |
| `extra` | [AddressExtra](#addressextra) |


#### AddressExtra

| Name | Type | Description
| --- | --- | --- |
| `street_name` | `str` |
| `street_number` | `str` |
| `street_type` | `str` |
| `suburb` | `str` |
| `suite` | `str` |


#### Parcel
Expand Down Expand Up @@ -193,12 +204,23 @@ pickup, messages = purplship.Pickup.update(request).from_(carrier_gateway).parse
| `email` | `str` |
| `phone_number` | `str` |
| `state_code` | `str` |
| `suburb` | `str` |
| `residential` | `bool` |
| `address_line1` | `str` |
| `address_line2` | `str` |
| `federal_tax_id` | `str` |
| `state_tax_id` | `str` |
| `extra` | [AddressExtra](#addressextra) |


#### AddressExtra

| Name | Type | Description
| --- | --- | --- |
| `street_name` | `str` |
| `street_number` | `str` |
| `street_type` | `str` |
| `suburb` | `str` |
| `suite` | `str` |


#### Parcel
Expand Down Expand Up @@ -344,12 +366,23 @@ confirmation, messages = purplship.Pickup.cancel(request).from_(carrier_gateway)
| `email` | `str` |
| `phone_number` | `str` |
| `state_code` | `str` |
| `suburb` | `str` |
| `residential` | `bool` |
| `address_line1` | `str` |
| `address_line2` | `str` |
| `federal_tax_id` | `str` |
| `state_tax_id` | `str` |
| `extra` | [AddressExtra](#addressextra) |


#### AddressExtra

| Name | Type | Description
| --- | --- | --- |
| `street_name` | `str` |
| `street_number` | `str` |
| `street_type` | `str` |
| `suburb` | `str` |
| `suite` | `str` |


### Response
Expand Down
13 changes: 12 additions & 1 deletion docs/guide/rating.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,23 @@ rates, messages = purplship.Rating.fetch(request).from_(carrier_gateway).parse()
| `email` | `str` |
| `phone_number` | `str` |
| `state_code` | `str` |
| `suburb` | `str` |
| `residential` | `bool` |
| `address_line1` | `str` |
| `address_line2` | `str` |
| `federal_tax_id` | `str` |
| `state_tax_id` | `str` |
| `extra` | [AddressExtra](#addressextra) |


#### AddressExtra

| Name | Type | Description
| --- | --- | --- |
| `street_name` | `str` |
| `street_number` | `str` |
| `street_type` | `str` |
| `suburb` | `str` |
| `suite` | `str` |


#### Parcel
Expand Down
31 changes: 27 additions & 4 deletions docs/guide/shipping.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,23 @@ shipment, messages = purplship.Shipment.create(request).from_(gateway).parse()
| `email` | `str` |
| `phone_number` | `str` |
| `state_code` | `str` |
| `suburb` | `str` |
| `residential` | `bool` |
| `address_line1` | `str` |
| `address_line2` | `str` |
| `federal_tax_id` | `str` |
| `state_tax_id` | `str` |
| `extra` | [AddressExtra](#addressextra) |


#### AddressExtra

| Name | Type | Description
| --- | --- | --- |
| `street_name` | `str` |
| `street_number` | `str` |
| `street_type` | `str` |
| `suburb` | `str` |
| `suite` | `str` |


#### Parcel
Expand All @@ -74,10 +85,8 @@ shipment, messages = purplship.Shipment.create(request).from_(gateway).parse()
| Name | Type | Description
| --- | --- | --- |
| `paid_by` | `str` |
| `amount` | `float` |
| `currency` | `str` |
| `account_number` | `str` |
| `contact` | [Address](#address) |
| `id` | `str` |


Expand All @@ -93,14 +102,28 @@ shipment, messages = purplship.Shipment.create(request).from_(gateway).parse()
| `content_description` | `str` |
| `incoterm` | `str` |
| `invoice` | `str` |
| `invoice_date` | `str` |
| `license_number` | `str` |
| `certificate_number` | `str` |
| `commodities` | List[[Commodity](#commodity)] |
| `duty` | [Payment](#payment) |
| `duty` | [Duty](#duty) |
| `commercial_invoice` | `bool` |
| `options` | `dict` |
| `id` | `str` |


#### Duty

| Name | Type | Description
| --- | --- | --- |
| `paid_by` | `str` |
| `currency` | `str` |
| `account_number` | `str` |
| `declared_value` | `float` |
| `bill_to` | [Address](#address) |
| `id` | `str` |


#### Commodity

| Name | Type | Description
Expand Down
1 change: 0 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<a href="https://www.gnu.org/licenses/lgpl-3.0" rel="nofollow"><img src="https://img.shields.io/badge/License-LGPL%20v3-blue.svg" alt="License: LGPL v3" data-canonical-src="https://img.shields.io/badge/License-AGPL%20v3-blue.svg" style="max-width:100%;"></a>
<a href="https://github.com/python/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black" style="max-width:100%;"></a>
<a href="https://codecov.io/gh/Purplship/Purplship"><img src="https://codecov.io/gh/Purplship/Purplship/branch/main/graph/badge.svg" alt="codecov" style="max-width:100%;"></a>
<a href="https://codecov.io/gh/PurplShip/purplship"><img src="https://codecov.io/gh/PurplShip/purplship/branch/main/graph/badge.svg?token=D07fio4Dn6"/></a>
</p>

## What is Purplship?
Expand Down
43 changes: 32 additions & 11 deletions docs/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,12 @@
| `carrier_id` | `str` |


*Note that all carrier gateway defined bellow have these additional parameters*
*Note that all carrier gateway defined above have these additional parameters*

| Name | Type | Description
| --- | --- | --- |
| `carrier_name` | `str` | default: carrier name (eg: canadapost, purolator...)
| `id` | `str` |
| `test` | `boolean` |
| `carrier_name` | `str` | readonly: carrier name (eg: canadapost, purolator...)


---

Expand All @@ -155,12 +154,23 @@ All models can be imported at `from purplship.core.models import [ModelName]`
| `email` | `str` |
| `phone_number` | `str` |
| `state_code` | `str` |
| `suburb` | `str` |
| `residential` | `bool` |
| `address_line1` | `str` |
| `address_line2` | `str` |
| `federal_tax_id` | `str` |
| `state_tax_id` | `str` |
| `extra` | [AddressExtra](#addressextra) |


#### AddressExtra

| Name | Type | Description
| --- | --- | --- |
| `street_name` | `str` |
| `street_number` | `str` |
| `street_type` | `str` |
| `suburb` | `str` |
| `suite` | `str` |


#### AddressValidationDetails
Expand Down Expand Up @@ -194,11 +204,11 @@ All models can be imported at `from purplship.core.models import [ModelName]`
| Name | Type | Description
| --- | --- | --- |
| `id` | `str` |
| `sku` | `str` |
| `quantity` | `int` |
| `weight` | `float` |
| `weight_unit` | `str` |
| `description` | `str` |
| `quantity` | `int` |
| `sku` | `str` |
| `value_amount` | `float` |
| `value_currency` | `str` |
| `origin_country` | `str` |
Expand Down Expand Up @@ -226,14 +236,28 @@ All models can be imported at `from purplship.core.models import [ModelName]`
| `content_description` | `str` |
| `incoterm` | `str` |
| `invoice` | `str` |
| `invoice_date` | `str` |
| `license_number` | `str` |
| `certificate_number` | `str` |
| `commodities` | List[[Commodity](#commodity)] |
| `duty` | [Payment](#payment) |
| `duty` | [Duty](#duty) |
| `commercial_invoice` | `bool` |
| `options` | `dict` |
| `id` | `str` |


#### Duty

| Name | Type | Description
| --- | --- | --- |
| `paid_by` | `str` |
| `currency` | `str` |
| `account_number` | `str` |
| `declared_value` | `float` |
| `bill_to` | [Address](#address) |
| `id` | `str` |


#### Message

| Name | Type | Description
Expand Down Expand Up @@ -268,10 +292,8 @@ All models can be imported at `from purplship.core.models import [ModelName]`
| Name | Type | Description
| --- | --- | --- |
| `paid_by` | `str` |
| `amount` | `float` |
| `currency` | `str` |
| `account_number` | `str` |
| `contact` | [Address](#address) |
| `id` | `str` |


Expand Down Expand Up @@ -416,7 +438,6 @@ All models can be imported at `from purplship.core.models import [ModelName]`
| `location` | `str` |
| `code` | `str` |
| `time` | `str` |
| `signatory` | `str` |


#### TrackingRequest
Expand Down
2 changes: 1 addition & 1 deletion extensions/aramex/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "purplship.aramex"
version = "2021.3"
homepage="https://sdk.purplship.com"
repository="https://github.com/PurplShip/purplship"
repository="https://github.com/Purplship/purplship"
description = "Purplship - Aramex Shipping Extension"
authors = ["Dan Kobina <[email protected]>"]
license = "LGPLv3"
Expand Down
2 changes: 1 addition & 1 deletion extensions/australiapost/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "purplship.australiapost"
version = "2021.3"
homepage="https://sdk.purplship.com"
repository="https://github.com/PurplShip/purplship"
repository="https://github.com/Purplship/purplship"
description = "Purplship - Australia Post Shipping Extension"
authors = ["Dan Kobina <[email protected]>"]
license = "LGPLv3"
Expand Down
2 changes: 1 addition & 1 deletion extensions/boxknight/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "purplship.boxknight"
version = "2021.3"
homepage="https://sdk.purplship.com"
repository="https://github.com/PurplShip/purplship"
repository="https://github.com/Purplship/purplship"
description = "Purplship - Boxknight Shipping Extension"
authors = ["Dan Kobina <[email protected]>"]
license = "LGPLv3"
Expand Down
2 changes: 1 addition & 1 deletion extensions/canadapost/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "purplship.canadapost"
version = "2021.3.1"
homepage="https://sdk.purplship.com"
repository="https://github.com/PurplShip/purplship"
repository="https://github.com/Purplship/purplship"
description = "Purplship - Canada Post Shipping Extension"
authors = ["Dan Kobina <[email protected]>"]
license = "LGPLv3"
Expand Down
2 changes: 1 addition & 1 deletion extensions/canpar/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "purplship.canpar"
version = "2021.3"
homepage="https://sdk.purplship.com"
repository="https://github.com/PurplShip/purplship"
repository="https://github.com/Purplship/purplship"
description = "Purplship - Canpar Shipping Extension"
authors = ["Dan Kobina <[email protected]>"]
license = "LGPLv3"
Expand Down
Loading

0 comments on commit 532979d

Please sign in to comment.