Skip to content

Commit 816bf24

Browse files
authored
Merge pull request #140 from purplship/purplship-sdk-2021.7
[release] purplship SDK 2021.7
2 parents f115f6c + 06d483f commit 816bf24

File tree

144 files changed

+3033
-2506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+3033
-2506
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ from purplship.mappers.canadapost.settings import Settings
8282
# Initialize a carrier gateway
8383
canadapost = purplship.gateway["canadapost"].create(
8484
Settings(
85-
username="username",
86-
password="password",
87-
customer_number="123456789",
85+
username="6e93d53968881714",
86+
password="0bfa9fcb9853d1f51ee57a",
87+
customer_number="2004381",
88+
contract_id="42708517",
8889
test=True
8990
)
9091
)
@@ -125,6 +126,7 @@ rate_request = RateRequest(
125126
shipper=shipper,
126127
recipient=recipient,
127128
parcels=[parcel],
129+
services=["canadapost_xpresspost"],
128130
)
129131

130132
# Send a rate request using a carrier gateway
@@ -159,15 +161,16 @@ print(rates)
159161

160162
- [**Documentation**](https://sdk.purplship.com)
161163
- [**Bug Tracker**](https://github.com/puprlship/purplship/issues)
162-
- [**Community on Discord**](https://discord.gg/gS88uE7sEx)
164+
- [**Github Community**](https://github.com/purplship/purplship-server/discussions)
163165

164166
## Contributing
165167

166168
We encourage you to contribute to puprlship! Please check out the
167169
[Contributing to purplship guide](/docs/development/contributing.md) for guidelines about how to proceed.
168-
[Join the purplship Community!](https://github.com/purplship/purplship/discussions)
170+
[Join the purplship discord channel!](https://discord.gg/gS88uE7sEx)
169171

170-
Do you want to extend purplship and integrate a custom carrier, check out [Extending purplship](https://sdk.purplship.com/development/extending/)
172+
Do you want to extend purplship and integrate a custom carrier, check out
173+
[Extending purplship](https://sdk.purplship.com/development/extending/)
171174

172175
## License
173176

docs/development/extending.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ import purplship.providers.[carrier_name].units as units
8484
8585
8686
METADATA = Metadata(
87+
id="[carrier_name]",
8788
label="[Carrier Name]",
8889
8990
# Integrations

docs/guide/gateways.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,19 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
7070
| `id` | `str` |
7171
| `test` | `bool` |
7272
| `carrier_id` | `str` |
73+
| `account_country_code` | `str` |
74+
75+
76+
#### BoxKnight Settings `[carrier_name = boxknight]`
77+
78+
| Name | Type | Description
79+
| --- | --- | --- |
80+
| `username` | `str` | **required**
81+
| `password` | `str` | **required**
82+
| `id` | `str` |
83+
| `test` | `bool` |
84+
| `carrier_id` | `str` |
85+
| `account_country_code` | `str` |
7386

7487

7588
#### Canada Post Settings `[carrier_name = canadapost]`
@@ -78,12 +91,13 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
7891
| --- | --- | --- |
7992
| `username` | `str` | **required**
8093
| `password` | `str` | **required**
81-
| `customer_number` | `str` | **required**
94+
| `customer_number` | `str` |
8295
| `contract_id` | `str` |
8396
| `language` | `str` |
8497
| `id` | `str` |
8598
| `test` | `bool` |
8699
| `carrier_id` | `str` |
100+
| `account_country_code` | `str` |
87101

88102

89103
#### Canpar Settings `[carrier_name = canpar]`
@@ -92,9 +106,11 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
92106
| --- | --- | --- |
93107
| `username` | `str` | **required**
94108
| `password` | `str` | **required**
109+
| `language` | `str` |
95110
| `id` | `str` |
96111
| `test` | `bool` |
97112
| `carrier_id` | `str` |
113+
| `account_country_code` | `str` |
98114

99115

100116
#### DHL Express Settings `[carrier_name = dhl_express]`
@@ -104,6 +120,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
104120
| `site_id` | `str` | **required**
105121
| `password` | `str` | **required**
106122
| `account_number` | `str` |
123+
| `account_country_code` | `str` |
107124
| `id` | `str` |
108125
| `test` | `bool` |
109126
| `carrier_id` | `str` |
@@ -118,6 +135,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
118135
| `id` | `str` |
119136
| `test` | `bool` |
120137
| `carrier_id` | `str` |
138+
| `account_country_code` | `str` |
121139

122140

123141
#### Dicom Settings `[carrier_name = dicom]`
@@ -130,6 +148,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
130148
| `id` | `str` |
131149
| `test` | `bool` |
132150
| `carrier_id` | `str` |
151+
| `account_country_code` | `str` |
133152

134153

135154
#### FedEx Settings `[carrier_name = fedex]`
@@ -140,6 +159,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
140159
| `password` | `str` | **required**
141160
| `meter_number` | `str` | **required**
142161
| `account_number` | `str` | **required**
162+
| `account_country_code` | `str` |
143163
| `id` | `str` |
144164
| `test` | `bool` |
145165
| `carrier_id` | `str` |
@@ -157,6 +177,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
157177
| `id` | `str` |
158178
| `test` | `bool` |
159179
| `carrier_id` | `str` |
180+
| `account_country_code` | `str` |
160181

161182

162183
#### Royal Mail Settings `[carrier_name = royalmail]`
@@ -168,6 +189,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
168189
| `id` | `str` |
169190
| `test` | `bool` |
170191
| `carrier_id` | `str` |
192+
| `account_country_code` | `str` |
171193

172194

173195
#### Sendle Settings `[carrier_name = sendle]`
@@ -179,6 +201,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
179201
| `id` | `str` |
180202
| `test` | `bool` |
181203
| `carrier_id` | `str` |
204+
| `account_country_code` | `str` |
182205

183206

184207
#### SF-Express Settings `[carrier_name = sf_express]`
@@ -190,6 +213,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
190213
| `id` | `str` |
191214
| `test` | `bool` |
192215
| `carrier_id` | `str` |
216+
| `account_country_code` | `str` |
193217

194218

195219
#### TNT Settings `[carrier_name = tnt]`
@@ -213,6 +237,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
213237
| `password` | `str` | **required**
214238
| `access_license_number` | `str` | **required**
215239
| `account_number` | `str` |
240+
| `account_country_code` | `str` |
216241
| `id` | `str` |
217242
| `test` | `bool` |
218243
| `carrier_id` | `str` |
@@ -230,6 +255,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
230255
| `id` | `str` |
231256
| `test` | `bool` |
232257
| `carrier_id` | `str` |
258+
| `account_country_code` | `str` |
233259

234260

235261
#### USPS International Settings `[carrier_name = usps_international]`
@@ -244,6 +270,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
244270
| `id` | `str` |
245271
| `test` | `bool` |
246272
| `carrier_id` | `str` |
273+
| `account_country_code` | `str` |
247274

248275

249276
#### Yanwen Settings `[carrier_name = yanwen]`
@@ -255,6 +282,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
255282
| `id` | `str` |
256283
| `test` | `bool` |
257284
| `carrier_id` | `str` |
285+
| `account_country_code` | `str` |
258286

259287

260288
#### Yunexpress Settings `[carrier_name = yunexpress]`
@@ -266,6 +294,7 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
266294
| `id` | `str` |
267295
| `test` | `bool` |
268296
| `carrier_id` | `str` |
297+
| `account_country_code` | `str` |
269298

270299

271300
!!! note ""
@@ -276,4 +305,4 @@ carrier_gateway = purplship.gateway["carrier_name"].create(...)
276305
| `carrier_name` | `str` | default: carrier name (eg: canadapost, purolator...)
277306
| `id` | `str` |
278307
| `test` | `boolean` |
279-
308+
| `account_country_code` | `str` |

0 commit comments

Comments
 (0)