Skip to content

Commit

Permalink
- Add missing address parameters to Shipment create parameter set (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwithan8 authored Sep 5, 2023
1 parent 16573bc commit bf1ed28
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions EasyPost/Parameters/Shipment/Create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,26 @@ public class Create : BaseParameters<Models.API.Shipment>, IShipmentParameter
[NestedRequestParameter(typeof(ScanForm.Create), Necessity.Optional, "from_address")]
public IAddressParameter? FromAddress { get; set; }

/// <summary>
/// The return <see cref="Models.API.Address"/> (or a <see cref="Address.Create"/> parameter set) for the new <see cref="Models.API.Shipment"/>.
/// </summary>
[TopLevelRequestParameter(Necessity.Optional, "shipment", "return_address")]
[NestedRequestParameter(typeof(Pickup.Create), Necessity.Optional, "return_address")]
[NestedRequestParameter(typeof(Batch.Create), Necessity.Optional, "return_address")]
[NestedRequestParameter(typeof(Order.Create), Necessity.Optional, "return_address")]
[NestedRequestParameter(typeof(ScanForm.Create), Necessity.Optional, "return_address")]
public IAddressParameter? ReturnAddress { get; set; }

/// <summary>
/// The buyer <see cref="Models.API.Address"/> (or a <see cref="Address.Create"/> parameter set) for the new <see cref="Models.API.Shipment"/>.
/// </summary>
[TopLevelRequestParameter(Necessity.Optional, "shipment", "buyer_address")]
[NestedRequestParameter(typeof(Pickup.Create), Necessity.Optional, "buyer_address")]
[NestedRequestParameter(typeof(Batch.Create), Necessity.Optional, "buyer_address")]
[NestedRequestParameter(typeof(Order.Create), Necessity.Optional, "buyer_address")]
[NestedRequestParameter(typeof(ScanForm.Create), Necessity.Optional, "buyer_address")]
public IAddressParameter? BuyerAddress { get; set; }

/// <summary>
/// The physical <see cref="Models.API.Parcel"/> (or <see cref="Parcel.Create"/> parameter set) being transported in the new <see cref="Models.API.Shipment"/>.
/// </summary>
Expand Down

0 comments on commit bf1ed28

Please sign in to comment.