Skip to content

Commit 1983fe7

Browse files
authored
feat: LineItems for shipment/order creation (#644)
# Description <!-- Please provide a general summary of your PR changes and link any related issues or other pull requests. --> # Testing <!-- Please provide details on how you tested this code. See below. - All pull requests must be tested (unit tests where possible with accompanying cassettes, or provide a screenshot of end-to-end testing when unit tests are not possible) - New features must get a new unit test - Bug fixes/refactors must re-record existing cassettes --> # Pull Request Type Please select the option(s) that are relevant to this PR. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Improvement (fixing a typo, updating readme, renaming a variable name, etc)
1 parent 62690eb commit 1983fe7

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- `ApiKey.Enable`
99
- `ApiKey.Disable`
1010
- Adds `Tracker.Delete` function
11+
- Adds `LineItems` to the shipment/order create parameter set
1112

1213
## v7.4.0 (2025-11-24)
1314

EasyPost/Parameters/Shipment/Create.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,29 @@ public class Create : BaseParameters<Models.API.Shipment>, IShipmentParameter
154154
[NestedRequestParameter(typeof(Luma.CreateAndBuy), Necessity.Optional, "carrier_accounts")]
155155
public List<string>? CarrierAccountIds { get; set; }
156156

157+
/// <summary>
158+
/// A list of line items for the new <see cref="Models.API.Shipment"/>.
159+
/// </summary>
160+
[TopLevelRequestParameter(Necessity.Optional, "shipment", "line_items")]
161+
[NestedRequestParameter(typeof(Order.Create), Necessity.Optional, "line_items")]
162+
public List<LineItem>? LineItems { get; set; }
163+
164+
/// <summary>
165+
/// Represents a line item for a shipment.
166+
/// </summary>
167+
public class LineItem
168+
{
169+
/// <summary>
170+
/// The total value of the line item.
171+
/// </summary>
172+
public string? TotalLineValue { get; set; }
173+
174+
/// <summary>
175+
/// The description of the item.
176+
/// </summary>
177+
public string? ItemDescription { get; set; }
178+
}
179+
157180
#endregion
158181
}
159182
}

0 commit comments

Comments
 (0)