Skip to content
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

[fix] Add missing parameters for creating orders #561

Merged
merged 4 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
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
32 changes: 32 additions & 0 deletions EasyPost/Parameters/Order/Create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,57 @@ 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.
/// </summary>
[TopLevelRequestParameter(Necessity.Optional, "order", "carrier_accounts")]
public List<Models.API.CarrierAccount>? CarrierAccounts { get; set; }

/// <summary>
/// <see cref="Models.API.CustomsInfo"/> (or a <see cref="Parameters.CustomsInfo.Create"/> parameter set) for the new <see cref="Models.API.Order"/>.
/// </summary>
[TopLevelRequestParameter(Necessity.Optional, "order", "customs_info")]
public ICustomsInfoParameter? CustomsInfo { get; set; }

/// <summary>
/// The origin <see cref="Models.API.Address"/> (or <see cref="Address.Create"/> parameters) for the new <see cref="Models.API.Order"/>.
/// </summary>
[TopLevelRequestParameter(Necessity.Optional, "order", "from_address")]
public IAddressParameter? FromAddress { get; set; }

/// <summary>
/// Whether the new <see cref="Models.API.Order"/> is a return.
/// </summary>
[TopLevelRequestParameter(Necessity.Optional, "order", "is_return")]
public bool? IsReturn { get; set; }

/// <summary>
/// Additional <see cref="Models.API.Options"/> for the new <see cref="Models.API.Order"/>.
/// </summary>
[TopLevelRequestParameter(Necessity.Optional, "order", "options")]
public Models.API.Options? Options { get; set; }

/// <summary>
/// Reference name for the new <see cref="Models.API.Order"/>.
/// </summary>
[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
Loading