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] misleading parameter types for .NET examples #128

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion official/docs/csharp/current/batches/add-shipments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static async Task Main()

Parameters.Batch.AddShipments parameters = new()
{
Shipments = new List<Shipment> { shipment },
Shipments = new List<IShipmentParameter> { shipment },
};

batch = await client.Batch.AddShipments(batch.Id, parameters);
Expand Down
2 changes: 1 addition & 1 deletion official/docs/csharp/current/batches/create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static async Task Main()

Parameters.Batch.Create parameters = new()
{
Shipments = new List<Shipment>()
Shipments = new List<IShipmentParameter>()
{
shipment
}
Expand Down
2 changes: 1 addition & 1 deletion official/docs/csharp/current/batches/remove-shipments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static async Task Main()

Parameters.Batch.RemoveShipments parameters = new()
{
Shipments = new List<Shipment> { shipment },
Shipments = new List<IShipmentParameter> { shipment },
};

batch = await client.Batch.RemoveShipments(batch.Id, parameters);
Expand Down
2 changes: 1 addition & 1 deletion official/docs/csharp/current/orders/create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static async Task Main()
Country = "US",
Zip = "94104"
},
Shipments = new List<Shipment>() { shipment }
Shipments = new List<IShipmentParameter>() { shipment }
};

Order order = await client.Order.Create(parameters);
Expand Down
6 changes: 3 additions & 3 deletions official/docs/csharp/current/orders/one-call-buy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ public static async Task Main()
Country = "US",
Zip = "94104"
},
Shipments = new List<Parameters.Shipment.Create>
Shipments = new List<IShipmentParameter>
{
new()
new Parameters.Shipment.Create()
{
Parcel = new Parameters.Parcel.Create
{
Weight = 10.2
}
},
new()
new Parameters.Shipment.Create()
{
Parcel = new Parameters.Parcel.Create
{
Expand Down
2 changes: 1 addition & 1 deletion official/docs/csharp/current/scan-form/create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static async Task Main()

Parameters.ScanForm.Create parameters = new()
{
Shipments = new List<Shipment>
Shipments = new List<IShipmentParameter>
{
shipment
}
Expand Down
Loading