Skip to content

Add Update Shipment By Shipment ID #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,26 @@ Rename LabelDownload method to the more generic Download
### Fixed

Some documentation linking errors and minor typos

## 1.2.0

### Added

Method to Update Shipment By Shipment ID

### Changed

Moved Shipment Class to the common models, as it is used in multiple requests.
Updated package class to use the Shipment Package class in Rate Requests.

## 1.3.0

### Added

Create Shipments request

## 1.4.0

### Added

Create Label from Shipment ID
150 changes: 150 additions & 0 deletions ShipEngine.Tests/HttpResponseMocks/UpdateShipmentByID200Response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"shipment_id": "se-153814671",
"carrier_id": "se-423888",
"service_code": "ups_ground",
"external_shipment_id": null,
"ship_date": "2021-08-27T00:00:00Z",
"created_at": "2021-08-27T16:29:25.257Z",
"modified_at": "2021-08-27T16:29:25.24Z",
"shipment_status": "pending",
"ship_to": {
"name": "Amanda Miller",
"phone": null,
"company_name": null,
"address_line1": "525 S Winchester Blvd",
"address_line2": null,
"address_line3": null,
"city_locality": "San Jose",
"state_province": "CA",
"postal_code": "95128",
"country_code": "US",
"address_residential_indicator": "unknown"
},
"ship_from": {
"name": "John Doe",
"phone": "512-555-5555",
"company_name": "",
"address_line1": "4009 Marathon Blvd",
"address_line2": null,
"address_line3": null,
"city_locality": "Austin",
"state_province": "TX",
"postal_code": "78756",
"country_code": "US",
"address_residential_indicator": "unknown"
},
"warehouse_id": null,
"return_to": {
"name": "John Doe",
"phone": "512-555-5555",
"company_name": "",
"address_line1": "4009 Marathon Blvd",
"address_line2": null,
"address_line3": null,
"city_locality": "Austin",
"state_province": "TX",
"postal_code": "78756",
"country_code": "US",
"address_residential_indicator": "unknown"
},
"confirmation": "none",
"customs": {
"contents": "merchandise",
"customs_items": [
{
"customs_item_id": "se-65172544",
"description": "Prescription",
"quantity": 1,
"value": 100.00,
"harmonized_tariff_code": null,
"country_of_origin": null,
"unit_of_measure": null
}
],
"non_delivery": "return_to_sender",
"buyer_shipping_amount_paid": null,
"duties_paid": null
},
"external_order_id": null,
"order_source_code": null,
"advanced_options": {
"bill_to_account": null,
"bill_to_country_code": null,
"bill_to_party": null,
"bill_to_postal_code": null,
"contains_alcohol": false,
"delivered_duty_paid": false,
"non_machinable": false,
"saturday_delivery": false,
"dry_ice": false,
"dry_ice_weight": null,
"fedex_freight": null,
"freight_class": null,
"custom_field1": null,
"custom_field2": null,
"custom_field3": null,
"collect_on_delivery": null
},
"insurance_provider": "none",
"tags": [],
"packages": [
{
"package_code": "package",
"weight": {
"value": 17.0,
"unit": "pound"
},
"dimensions": {
"unit": "inch",
"length": 36.0,
"width": 12.0,
"height": 24.0
},
"insured_value": {
"currency": "usd",
"amount": 0.0
},
"label_messages": {
"reference1": null,
"reference2": null,
"reference3": null
},
"external_package_id": null
}
],
"total_weight": {
"value": 17.0,
"unit": "pound"
},
"items": [],
"address_validation": {
"status": "verified",
"original_address": {
"name": "John Smith",
"phone": null,
"company_name": "ShipStation",
"address_line1": "3800 N Lamar Blvd",
"address_line2": "#220",
"address_line3": null,
"city_locality": "Austin",
"state_province": "TX",
"postal_code": "78756",
"country_code": "US",
"address_residential_indicator": "no"
},
"matched_address": {
"name": "JOHN SMITH",
"phone": null,
"company_name": "SHIPSTATION",
"address_line1": "3800 N LAMAR BLVD STE 220",
"address_line2": null,
"address_line3": null,
"city_locality": "AUSTIN",
"state_province": "TX",
"postal_code": "78756-0003",
"country_code": "US",
"address_residential_indicator": "no"
},
"messages": []
}
}
14 changes: 7 additions & 7 deletions ShipEngine.Tests/ShipEngine.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp2.1;net461</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;net462</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />

<PackageReference Include="Moq" Version="4.14.7" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">

<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.0">
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand All @@ -25,6 +25,6 @@
<ProjectReference Include="..\ShipEngine\ShipEngine.csproj" />
</ItemGroup>

<ProjectExtensions><VisualStudio><UserProperties httpresponsemocks_4createimplicitmanifest200response_1json__JsonSchema="{" /></VisualStudio></ProjectExtensions>
<ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public CreateLabelFromShipmentDetailsTest()
Phone = "512-555-5555"
},
Confirmation = DeliveryConfirmation.DeliveryMailed,
Packages = new List<Package>() {
new Package() {
Packages = new List<ShipmentPackage>() {
new ShipmentPackage() {
Weight = new Weight() {
Value = 17,
Unit = WeightUnit.Pound
Expand Down
Loading