Skip to content

Commit

Permalink
Update to the latest version of the ShipEngine spec
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBenzSW committed Feb 5, 2025
1 parent 91f98fe commit 62d5226
Show file tree
Hide file tree
Showing 12 changed files with 297 additions and 226 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,13 @@ Fixed handling of No Content responses

- Updated to ShipEngine API 1.1.202410161910
- Added A4 and A6 as options for label layouts

## 3.0.0-beta.17

### Added

- Updated to ShipEngine API 1.1.202501091801

### Updated

- Marked v2 methods as obsolete
34 changes: 29 additions & 5 deletions ShipEngineSDK/Model/CreateLabelFromRateRequestBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,56 @@ namespace ShipEngineSDK.Model;
public partial class CreateLabelFromRateRequestBody
{

/// <summary>
/// Optional - Value will be saved in the shipment&#39;s advanced_options &gt; custom_field1
/// </summary>
/// <value>Optional - Value will be saved in the shipment&#39;s advanced_options &gt; custom_field1</value>
[JsonPropertyName("custom_field1"), JsonPropertyOrder(1)]
public string? CustomField1 { get; set; }

/// <summary>
/// Optional - Value will be saved in the shipment&#39;s advanced_options &gt; custom_field2
/// </summary>
/// <value>Optional - Value will be saved in the shipment&#39;s advanced_options &gt; custom_field2</value>
[JsonPropertyName("custom_field2"), JsonPropertyOrder(2)]
public string? CustomField2 { get; set; }

/// <summary>
/// Optional - Value will be saved in the shipment&#39;s advanced_options &gt; custom_field3
/// </summary>
/// <value>Optional - Value will be saved in the shipment&#39;s advanced_options &gt; custom_field3</value>
[JsonPropertyName("custom_field3"), JsonPropertyOrder(3)]
public string? CustomField3 { get; set; }

/// <summary>
/// The display format that the label should be shown in.
/// </summary>
/// <value>The display format that the label should be shown in.</value>
[JsonPropertyName("display_scheme"), JsonPropertyOrder(1)]
[JsonPropertyName("display_scheme"), JsonPropertyOrder(4)]
public DisplayScheme? DisplayScheme { get; set; }

/// <summary>
/// Gets or Sets LabelDownloadType
/// </summary>
[JsonPropertyName("label_download_type"), JsonPropertyOrder(2)]
[JsonPropertyName("label_download_type"), JsonPropertyOrder(5)]
public LabelDownloadType? LabelDownloadType { get; set; }

/// <summary>
/// Gets or Sets LabelFormat
/// </summary>
[JsonPropertyName("label_format"), JsonPropertyOrder(3)]
[JsonPropertyName("label_format"), JsonPropertyOrder(6)]
public LabelFormat? LabelFormat { get; set; }

/// <summary>
/// Gets or Sets LabelLayout
/// </summary>
[JsonPropertyName("label_layout"), JsonPropertyOrder(4)]
[JsonPropertyName("label_layout"), JsonPropertyOrder(7)]
public LabelLayout? LabelLayout { get; set; }

/// <summary>
/// Gets or Sets ValidateAddress
/// </summary>
[JsonPropertyName("validate_address"), JsonPropertyOrder(5)]
[JsonPropertyName("validate_address"), JsonPropertyOrder(8)]
public ValidateAddress? ValidateAddress { get; set; }


Expand All @@ -67,6 +88,9 @@ public override string ToString()
var sb = new StringBuilder();
sb.Append("class CreateLabelFromRateRequestBody {\n");
#pragma warning disable CS0612 // Type or member is obsolete
sb.Append(" CustomField1: ").Append(CustomField1).Append("\n");
sb.Append(" CustomField2: ").Append(CustomField2).Append("\n");
sb.Append(" CustomField3: ").Append(CustomField3).Append("\n");
sb.Append(" DisplayScheme: ").Append(DisplayScheme).Append("\n");
sb.Append(" LabelDownloadType: ").Append(LabelDownloadType).Append("\n");
sb.Append(" LabelFormat: ").Append(LabelFormat).Append("\n");
Expand Down
2 changes: 1 addition & 1 deletion ShipEngineSDK/Model/GetTrackingLogFromLabelResponseBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public partial class GetTrackingLogFromLabelResponseBody
/// This should not be used for input as it will be ignored on serialization.
/// </remarks>
/// <example>
/// Your shipment has been delivered.
/// Your parcel has been successfully delivered.
/// </example>
[JsonPropertyName("status_detail_description"), JsonInclude]
public string? StatusDetailDescription { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion ShipEngineSDK/Model/GetTrackingLogResponseBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public partial class GetTrackingLogResponseBody
/// This should not be used for input as it will be ignored on serialization.
/// </remarks>
/// <example>
/// Your shipment has been delivered.
/// Your parcel has been successfully delivered.
/// </example>
[JsonPropertyName("status_detail_description"), JsonInclude]
public string? StatusDetailDescription { get; set; }
Expand Down
28 changes: 18 additions & 10 deletions ShipEngineSDK/Model/Products.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,62 +50,69 @@ public partial class Products
[JsonPropertyName("description"), JsonPropertyOrder(3)]
public string? Description { get; set; }

/// <summary>
/// Additional details about products
/// </summary>
/// <value>Additional details about products</value>
[JsonPropertyName("extended_details"), JsonPropertyOrder(4)]
public Dictionary<string, Object>? ExtendedDetails { get; set; }

/// <summary>
/// The [Harmonized Tariff Code](https://en.wikipedia.org/wiki/Harmonized_System) of this item.
/// </summary>
/// <value>The [Harmonized Tariff Code](https://en.wikipedia.org/wiki/Harmonized_System) of this item.</value>
/// <example>
/// 3926.1
/// </example>
[JsonPropertyName("harmonized_tariff_code"), JsonPropertyOrder(4)]
[JsonPropertyName("harmonized_tariff_code"), JsonPropertyOrder(5)]
public string? HarmonizedTariffCode { get; set; }

/// <summary>
/// Manufacturers Identification code
/// </summary>
/// <value>Manufacturers Identification code</value>
[JsonPropertyName("mid_code"), JsonPropertyOrder(5)]
[JsonPropertyName("mid_code"), JsonPropertyOrder(6)]
public string? MidCode { get; set; }

/// <summary>
/// link to the item on the seller website
/// </summary>
/// <value>link to the item on the seller website</value>
[JsonPropertyName("product_url"), JsonPropertyOrder(6)]
[JsonPropertyName("product_url"), JsonPropertyOrder(7)]
public string? ProductUrl { get; set; }

/// <summary>
/// The quantity of this item in the shipment.
/// </summary>
/// <value>The quantity of this item in the shipment.</value>
[JsonPropertyName("quantity"), JsonPropertyOrder(7)]
[JsonPropertyName("quantity"), JsonPropertyOrder(8)]
public int? Quantity { get; set; }

/// <summary>
/// The SKU (Stock Keeping Unit) of the item
/// </summary>
/// <value>The SKU (Stock Keeping Unit) of the item</value>
[JsonPropertyName("sku"), JsonPropertyOrder(8)]
[JsonPropertyName("sku"), JsonPropertyOrder(9)]
public string? Sku { get; set; }

/// <summary>
/// Description of the Custom Item&#39;s SKU
/// </summary>
/// <value>Description of the Custom Item&#39;s SKU</value>
[JsonPropertyName("sku_description"), JsonPropertyOrder(9)]
[JsonPropertyName("sku_description"), JsonPropertyOrder(10)]
public string? SkuDescription { get; set; }

/// <summary>
/// Gets or Sets UnitOfMeasure
/// </summary>
[JsonPropertyName("unit_of_measure"), JsonPropertyOrder(10)]
[JsonPropertyName("unit_of_measure"), JsonPropertyOrder(11)]
public string? UnitOfMeasure { get; set; }

/// <summary>
/// The declared value of each item
/// </summary>
/// <value>The declared value of each item</value>
[JsonPropertyName("value"), JsonPropertyOrder(11)]
[JsonPropertyName("value"), JsonPropertyOrder(12)]
public MonetaryValue? Value { get; set; }

/// <summary>
Expand All @@ -115,14 +122,14 @@ public partial class Products
/// <example>
/// 0.2
/// </example>
[JsonPropertyName("vat_rate"), JsonPropertyOrder(12)]
[JsonPropertyName("vat_rate"), JsonPropertyOrder(13)]
public decimal? VatRate { get; set; }

/// <summary>
/// The item weight
/// </summary>
/// <value>The item weight</value>
[JsonPropertyName("weight"), JsonPropertyOrder(13)]
[JsonPropertyName("weight"), JsonPropertyOrder(14)]
public Weight? Weight { get; set; }


Expand All @@ -138,6 +145,7 @@ public override string ToString()
sb.Append(" CountryOfOrigin: ").Append(CountryOfOrigin).Append("\n");
sb.Append(" DangerousGoods: ").Append(DangerousGoods).Append("\n");
sb.Append(" Description: ").Append(Description).Append("\n");
sb.Append(" ExtendedDetails: ").Append(ExtendedDetails).Append("\n");
sb.Append(" HarmonizedTariffCode: ").Append(HarmonizedTariffCode).Append("\n");
sb.Append(" MidCode: ").Append(MidCode).Append("\n");
sb.Append(" ProductUrl: ").Append(ProductUrl).Append("\n");
Expand Down
12 changes: 12 additions & 0 deletions ShipEngineSDK/Model/SmartPostHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,18 @@ public SmartPostHub(string value)
public static SmartPostHub WheelingIl { get; } = new("wheeling_il");


/// <summary>
/// Enum MiddletownCt for value: middletown_ct
/// </summary>
public static SmartPostHub MiddletownCt { get; } = new("middletown_ct");


/// <summary>
/// Enum PortlandOr for value: portland_or
/// </summary>
public static SmartPostHub PortlandOr { get; } = new("portland_or");


/// <summary>
/// Get a string representation of the current value
/// </summary>
Expand Down
282 changes: 141 additions & 141 deletions ShipEngineSDK/Model/StatusDetailCode.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ShipEngineSDK/Model/TrackEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public partial class TrackEvent
/// This should not be used for input as it will be ignored on serialization.
/// </remarks>
/// <example>
/// Your shipment is on its way between depots.
/// Your shipment is on its way between the carrier hubs.
/// </example>
[JsonPropertyName("status_detail_description"), JsonInclude]
public string? StatusDetailDescription { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion ShipEngineSDK/Model/TrackingInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public partial class TrackingInformation
/// This should not be used for input as it will be ignored on serialization.
/// </remarks>
/// <example>
/// Your shipment has been delivered.
/// Your parcel has been successfully delivered.
/// </example>
[JsonPropertyName("status_detail_description"), JsonInclude]
public string? StatusDetailDescription { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion ShipEngineSDK/ShipEngineSDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PackageId>ShipEngine</PackageId>
<PackageTags>sdk;rest;api;shipping;rates;label;tracking;cost;address;validation;normalization;fedex;ups;usps;</PackageTags>

<Version>3.0.0-beta.16</Version>
<Version>3.0.0-beta.17</Version>
<Authors>ShipEngine</Authors>
<Company>ShipEngine</Company>
<Summary>The official ShipEngine C# SDK for .NET</Summary>
Expand Down
Loading

0 comments on commit 62d5226

Please sign in to comment.