Skip to content

Commit

Permalink
[fix] Add missing parameters for creating orders (#561)
Browse files Browse the repository at this point in the history
- Port missing create shipment parameters to create order
- Update changelog
- Update examples submodule
  • Loading branch information
nwithan8 committed Apr 24, 2024
1 parent 6cf3720 commit f9cbfbc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## Next Release

- Add missing parameters for `Order.Create` parameter set

## v6.3.1 (2024-04-12)

- Fix `CarrierFields` serialization bug causing carrier account operations to fail
Expand Down
14 changes: 14 additions & 0 deletions EasyPost/Parameters/Order/Create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ public class Create : BaseParameters<Models.API.Order>, IOrderParameter
{
#region Request Parameters

/// <summary>
/// The <see cref="Address"/> (or <see cref="Address.Create"/> parameters) of the buyer for the new <see cref="Models.API.Order"/>.
/// Defaults to <see cref="ToAddress"/> if not provided.
/// </summary>
[TopLevelRequestParameter(Necessity.Optional, "order", "buyer_address")]
public IAddressParameter? BuyerAddress { get; set; }

/// <summary>
/// List of <see cref="Models.API.CarrierAccount"/>s to use to create the new <see cref="Models.API.Order"/>.
/// The provided <see cref="Models.API.CarrierAccount"/>s must exist prior to making the API call.
Expand All @@ -31,6 +38,13 @@ public class Create : BaseParameters<Models.API.Order>, IOrderParameter
[TopLevelRequestParameter(Necessity.Optional, "order", "reference")]
public string? Reference { get; set; }

/// <summary>
/// The return <see cref="Models.API.Address"/> (or <see cref="Address.Create"/> parameters) for the new <see cref="Models.API.Order"/>.
/// Defaults to <see cref="FromAddress"/> if not provided.
/// </summary>
[TopLevelRequestParameter(Necessity.Optional, "order", "return_address")]
public IAddressParameter? ReturnAddress { get; set; }

/// <summary>
/// List of <see cref="Models.API.Shipment"/>s (or <see cref="Shipment.Create"/> parameter sets) for the new <see cref="Models.API.Order"/>.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion examples
Submodule examples updated 33 files
+1 −1 README.md
+5 −0 community/docs/http_files/README.md
+100 −0 community/docs/http_files/addresses.http
+49 −0 community/docs/http_files/api-keys.http
+89 −0 community/docs/http_files/batches.http
+61 −0 community/docs/http_files/billing.http
+18 −0 community/docs/http_files/brands.http
+63 −0 community/docs/http_files/carrier-accounts.http
+31 −0 community/docs/http_files/carrier-metadata.http
+6 −0 community/docs/http_files/carrier-types.http
+34 −0 community/docs/http_files/customs-infos.http
+24 −0 community/docs/http_files/customs-items.http
+72 −0 community/docs/http_files/endshippers.http
+42 −0 community/docs/http_files/insurance.http
+115 −0 community/docs/http_files/orders.http
+22 −0 community/docs/http_files/parcels.http
+53 −0 community/docs/http_files/pickups.http
+52 −0 community/docs/http_files/rates.http
+88 −0 community/docs/http_files/referral-customers.http
+30 −0 community/docs/http_files/refunds.http
+26 −0 community/docs/http_files/reports.http
+32 −0 community/docs/http_files/scanforms.http
+279 −0 community/docs/http_files/shipments.http
+14 −0 community/docs/http_files/smartrate.http
+29 −0 community/docs/http_files/trackers.http
+67 −0 community/docs/http_files/users.http
+69 −0 community/docs/http_files/webhooks.http
+1 −1 official/docs/csharp/current/batches/add-shipments.cs
+1 −1 official/docs/csharp/current/batches/create.cs
+1 −1 official/docs/csharp/current/batches/remove-shipments.cs
+1 −1 official/docs/csharp/current/orders/create.cs
+3 −3 official/docs/csharp/current/orders/one-call-buy.cs
+1 −1 official/docs/csharp/current/scan-form/create.cs

0 comments on commit f9cbfbc

Please sign in to comment.