Skip to content

[fix] Handle serializing array/list parameters in GET/DELETE query strings #601

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

Merged
merged 3 commits into from
Oct 31, 2024
Merged
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
23 changes: 22 additions & 1 deletion EasyPost.Tests/HttpTests/RequestTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Net.Http;
using EasyPost._base;
using EasyPost.Http;
using Xunit;
@@ -13,9 +14,29 @@ public class RequestTest
[Fact]
public void TestRequestDisposal()
{
Request request = new("https://google.com", "not_a_real_endpoint", Method.Get, ApiVersion.V2, new Dictionary<string, object> { { "key", "value" } }, new Dictionary<string, string> { { "header_key", "header_value" } });
Request request = new("https://example.com", "not_a_real_endpoint", Method.Get, ApiVersion.V2, new Dictionary<string, object> { { "key", "value" } }, new Dictionary<string, string> { { "header_key", "header_value" } });
CustomAssertions.DoesNotThrow(() => request.Dispose());
}

[Fact]
public void TestQueryParameterList()
{
var parameters = new Dictionary<string, object>
{
{ "key1", new List<string> { "value1", "value2" } },
{ "key2", "value3" }
};

Request request = new("https://example.com", "not_a_real_endpoint", Method.Get, ApiVersion.V2, parameters, new Dictionary<string, string> { { "header_key", "header_value" } });

HttpRequestMessage httpRequestMessage = request.AsHttpRequestMessage();

string queryString = httpRequestMessage.RequestUri?.Query;

Assert.Contains("key1[]=value1", queryString); // Does not account for URL encoding
Assert.Contains("key1[]=value2", queryString); // Does not account for URL encoding
Assert.Contains("key2=value3", queryString); // Does not account for URL encoding
}

#endregion
}
48 changes: 39 additions & 9 deletions EasyPost/Http/Request.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Net.Http;
@@ -115,6 +116,9 @@ private void BuildQueryParameters()
// add query parameters
NameValueCollection query = HttpUtility.ParseQueryString(string.Empty);

// Separately store the list parameters to add them last
List<string> listParameters = new();

// build query string from parameters
foreach (KeyValuePair<string, object> param in _parameters)
{
@@ -124,26 +128,52 @@ private void BuildQueryParameters()
continue;
}

query[param.Key] = param.Value switch
var @switch = new SwitchCase
{
// TODO: Handle special conversions for other types
// DateTime dateTime => dateTime.ToString("o", CultureInfo.InvariantCulture),
var _ => param.Value.ToString(),
{ param.Value is IList, () => listParameters = AddListQueryParameter(listParameters, param.Key, (IList)param.Value) },
{ SwitchCaseScenario.Default, () => query[param.Key] = param.Value.ToString() },
};
@switch.MatchFirstTrue();
}

// short circuit if no query parameters
if (query.Count == 0)
// Finalize the query string
string queryString = query.ToString() ?? string.Empty;

// Add list parameters to the query string
string parameterCharacter = queryString.Length == 0 ? "?" : "&";
foreach (string pair in listParameters)
{
return;
queryString += $"{parameterCharacter}{pair}";
parameterCharacter = "&";
}

// rebuild the request URL with the query string appended
var uriBuilder = new UriBuilder(_requestMessage.RequestUri!)
{
Query = query.ToString(),
Query = queryString,
};
_requestMessage.RequestUri = new Uri(uriBuilder.ToString());

// _requestMessage.RequestUri = new Uri(uriBuilder.ToString());
_requestMessage.RequestUri = uriBuilder.Uri;
}

private static List<string> AddListQueryParameter(List<string> pairs, string key, IList value)
{
string keyPrefix = $"{HttpUtility.UrlEncode(key)}[]";
// ReSharper disable once LoopCanBeConvertedToQuery
foreach (object? item in value)
{
string? itemString = item?.ToString();
if (itemString == null)
{
continue;
}

string pair = $"{keyPrefix}={HttpUtility.UrlEncode(itemString)}";
pairs.Add(pair);
}

return pairs;
}

/// <inheritdoc cref="EasyPostClient._isDisposed"/>
1 change: 1 addition & 0 deletions EasyPost/Parameters/Tracker/All.cs
Original file line number Diff line number Diff line change
@@ -83,7 +83,8 @@
StartDatetime = dictionary.GetOrNull<string>("start_datetime"),
EndDatetime = dictionary.GetOrNull<string>("end_datetime"),
Carrier = dictionary.GetOrNull<string>("carrier"),
TrackingCode = dictionary.GetOrNull<string>("tracking_code"),

Check warning on line 86 in EasyPost/Parameters/Tracker/All.cs

GitHub Actions / Coverage_Requirements

'All.TrackingCode' is obsolete: 'This property will be removed in a future version and replaced with TrackingCodes.'

Check warning on line 86 in EasyPost/Parameters/Tracker/All.cs

GitHub Actions / lint

'All.TrackingCode' is obsolete: 'This property will be removed in a future version and replaced with TrackingCodes.'

Check warning on line 86 in EasyPost/Parameters/Tracker/All.cs

GitHub Actions / NET_Tests (Net50)

'All.TrackingCode' is obsolete: 'This property will be removed in a future version and replaced with TrackingCodes.'

Check warning on line 86 in EasyPost/Parameters/Tracker/All.cs

GitHub Actions / NET_Tests (Net60)

'All.TrackingCode' is obsolete: 'This property will be removed in a future version and replaced with TrackingCodes.'

Check warning on line 86 in EasyPost/Parameters/Tracker/All.cs

GitHub Actions / Visual_Basic_Compatibility_Test

'All.TrackingCode' is obsolete: 'This property will be removed in a future version and replaced with TrackingCodes.'

Check warning on line 86 in EasyPost/Parameters/Tracker/All.cs

GitHub Actions / FSharp_Compatibility_Tests

'All.TrackingCode' is obsolete: 'This property will be removed in a future version and replaced with TrackingCodes.'

Check warning on line 86 in EasyPost/Parameters/Tracker/All.cs

GitHub Actions / NET_Tests (Net70)

'All.TrackingCode' is obsolete: 'This property will be removed in a future version and replaced with TrackingCodes.'

Check warning on line 86 in EasyPost/Parameters/Tracker/All.cs

GitHub Actions / NET_Tests (NetStandard20)

'All.TrackingCode' is obsolete: 'This property will be removed in a future version and replaced with TrackingCodes.'

Check warning on line 86 in EasyPost/Parameters/Tracker/All.cs

GitHub Actions / NET_Tests (Net80)

'All.TrackingCode' is obsolete: 'This property will be removed in a future version and replaced with TrackingCodes.'
TrackingCodes = dictionary.GetOrNull<List<string>>("tracking_codes"),
};
}
}

Unchanged files with check annotations Beta

/// Convert this object to a deprecated <see cref="TimeInTransitDetails"/> object.
/// </summary>
/// <returns>A <see cref="TimeInTransitDetails"/> object copy.</returns>
internal TimeInTransitDetails AsDeprecatedTimeInTransitDetails() => new TimeInTransitDetails

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / Coverage_Requirements

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / Coverage_Requirements

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / lint

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / lint

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / NET_Tests (Net50)

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / NET_Tests (Net50)

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / NET_Tests (Net60)

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / NET_Tests (Net60)

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / Visual_Basic_Compatibility_Test

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / Visual_Basic_Compatibility_Test

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / FSharp_Compatibility_Tests

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / FSharp_Compatibility_Tests

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / NET_Tests (Net70)

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / NET_Tests (Net70)

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / NET_Tests (NetStandard20)

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / NET_Tests (NetStandard20)

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / NET_Tests (Net80)

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'

Check warning on line 35 in EasyPost/Models/API/TimeInTransitDetailsForDeliveryDateEstimate.cs

GitHub Actions / NET_Tests (Net80)

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'
{
DaysInTransit = DaysInTransit,
EasyPostEstimatedDeliveryDate = EasyPostEstimatedDeliveryDate,
public bool? ByDrone { get; set; }
[JsonProperty("carrier_insurance_amount")]
public string? CarrierInsuranceAmount { get; set; }

Check warning on line 118 in EasyPost/Models/API/Options.cs

GitHub Actions / Coverage_Requirements

Missing XML comment for publicly visible type or member 'Options.CarrierInsuranceAmount'

Check warning on line 118 in EasyPost/Models/API/Options.cs

GitHub Actions / lint

Missing XML comment for publicly visible type or member 'Options.CarrierInsuranceAmount'

Check warning on line 118 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net50)

Missing XML comment for publicly visible type or member 'Options.CarrierInsuranceAmount'

Check warning on line 118 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net60)

Missing XML comment for publicly visible type or member 'Options.CarrierInsuranceAmount'

Check warning on line 118 in EasyPost/Models/API/Options.cs

GitHub Actions / Visual_Basic_Compatibility_Test

Missing XML comment for publicly visible type or member 'Options.CarrierInsuranceAmount'

Check warning on line 118 in EasyPost/Models/API/Options.cs

GitHub Actions / FSharp_Compatibility_Tests

Missing XML comment for publicly visible type or member 'Options.CarrierInsuranceAmount'

Check warning on line 118 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net70)

Missing XML comment for publicly visible type or member 'Options.CarrierInsuranceAmount'

Check warning on line 118 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (NetStandard20)

Missing XML comment for publicly visible type or member 'Options.CarrierInsuranceAmount'

Check warning on line 118 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net80)

Missing XML comment for publicly visible type or member 'Options.CarrierInsuranceAmount'
/// <summary>
/// Assign an email address to receive carrier notifications.
public string? CodMethod { get; set; }
[JsonProperty("commercial_invoice_format")]
public string? CommercialInvoiceFormat { get; set; }

Check warning on line 170 in EasyPost/Models/API/Options.cs

GitHub Actions / Coverage_Requirements

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceFormat'

Check warning on line 170 in EasyPost/Models/API/Options.cs

GitHub Actions / lint

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceFormat'

Check warning on line 170 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net50)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceFormat'

Check warning on line 170 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net60)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceFormat'

Check warning on line 170 in EasyPost/Models/API/Options.cs

GitHub Actions / Visual_Basic_Compatibility_Test

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceFormat'

Check warning on line 170 in EasyPost/Models/API/Options.cs

GitHub Actions / FSharp_Compatibility_Tests

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceFormat'

Check warning on line 170 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net70)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceFormat'

Check warning on line 170 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (NetStandard20)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceFormat'

Check warning on line 170 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net80)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceFormat'
[JsonProperty("commercial_invoice_letterhead")]
public string? CommercialInvoiceLetterhead { get; set; }

Check warning on line 173 in EasyPost/Models/API/Options.cs

GitHub Actions / Coverage_Requirements

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceLetterhead'

Check warning on line 173 in EasyPost/Models/API/Options.cs

GitHub Actions / lint

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceLetterhead'

Check warning on line 173 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net50)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceLetterhead'

Check warning on line 173 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net60)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceLetterhead'

Check warning on line 173 in EasyPost/Models/API/Options.cs

GitHub Actions / Visual_Basic_Compatibility_Test

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceLetterhead'

Check warning on line 173 in EasyPost/Models/API/Options.cs

GitHub Actions / FSharp_Compatibility_Tests

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceLetterhead'

Check warning on line 173 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net70)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceLetterhead'

Check warning on line 173 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (NetStandard20)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceLetterhead'

Check warning on line 173 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net80)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceLetterhead'
[JsonProperty("commercial_invoice_signature")]
public string? CommercialInvoiceSignature { get; set; }

Check warning on line 176 in EasyPost/Models/API/Options.cs

GitHub Actions / Coverage_Requirements

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSignature'

Check warning on line 176 in EasyPost/Models/API/Options.cs

GitHub Actions / lint

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSignature'

Check warning on line 176 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net50)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSignature'

Check warning on line 176 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net60)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSignature'

Check warning on line 176 in EasyPost/Models/API/Options.cs

GitHub Actions / Visual_Basic_Compatibility_Test

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSignature'

Check warning on line 176 in EasyPost/Models/API/Options.cs

GitHub Actions / FSharp_Compatibility_Tests

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSignature'

Check warning on line 176 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net70)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSignature'

Check warning on line 176 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (NetStandard20)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSignature'

Check warning on line 176 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net80)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSignature'
[JsonProperty("commercial_invoice_size")]
public string? CommercialInvoiceSize { get; set; }

Check warning on line 179 in EasyPost/Models/API/Options.cs

GitHub Actions / Coverage_Requirements

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSize'

Check warning on line 179 in EasyPost/Models/API/Options.cs

GitHub Actions / lint

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSize'

Check warning on line 179 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net50)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSize'

Check warning on line 179 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net60)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSize'

Check warning on line 179 in EasyPost/Models/API/Options.cs

GitHub Actions / Visual_Basic_Compatibility_Test

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSize'

Check warning on line 179 in EasyPost/Models/API/Options.cs

GitHub Actions / FSharp_Compatibility_Tests

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSize'

Check warning on line 179 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net70)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSize'

Check warning on line 179 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (NetStandard20)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSize'

Check warning on line 179 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net80)

Missing XML comment for publicly visible type or member 'Options.CommercialInvoiceSize'
/// <summary>
/// A description of the content of the shipment.
public string? ContentDescription { get; set; }
[JsonProperty("cost_center")]
public string? CostCenter { get; set; }

Check warning on line 188 in EasyPost/Models/API/Options.cs

GitHub Actions / Coverage_Requirements

Missing XML comment for publicly visible type or member 'Options.CostCenter'

Check warning on line 188 in EasyPost/Models/API/Options.cs

GitHub Actions / lint

Missing XML comment for publicly visible type or member 'Options.CostCenter'

Check warning on line 188 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net50)

Missing XML comment for publicly visible type or member 'Options.CostCenter'

Check warning on line 188 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net60)

Missing XML comment for publicly visible type or member 'Options.CostCenter'

Check warning on line 188 in EasyPost/Models/API/Options.cs

GitHub Actions / Visual_Basic_Compatibility_Test

Missing XML comment for publicly visible type or member 'Options.CostCenter'

Check warning on line 188 in EasyPost/Models/API/Options.cs

GitHub Actions / FSharp_Compatibility_Tests

Missing XML comment for publicly visible type or member 'Options.CostCenter'

Check warning on line 188 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net70)

Missing XML comment for publicly visible type or member 'Options.CostCenter'

Check warning on line 188 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (NetStandard20)

Missing XML comment for publicly visible type or member 'Options.CostCenter'

Check warning on line 188 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net80)

Missing XML comment for publicly visible type or member 'Options.CostCenter'
/// <summary>
/// Which currency this <see cref="Shipment"/> will show for rates if carrier allows.
public string? Currency { get; set; }
[JsonProperty("customs_broker_address_id")]
public string? CustomsBrokerAddressId { get; set; }

Check warning on line 197 in EasyPost/Models/API/Options.cs

GitHub Actions / Coverage_Requirements

Missing XML comment for publicly visible type or member 'Options.CustomsBrokerAddressId'

Check warning on line 197 in EasyPost/Models/API/Options.cs

GitHub Actions / lint

Missing XML comment for publicly visible type or member 'Options.CustomsBrokerAddressId'

Check warning on line 197 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net50)

Missing XML comment for publicly visible type or member 'Options.CustomsBrokerAddressId'

Check warning on line 197 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net60)

Missing XML comment for publicly visible type or member 'Options.CustomsBrokerAddressId'

Check warning on line 197 in EasyPost/Models/API/Options.cs

GitHub Actions / Visual_Basic_Compatibility_Test

Missing XML comment for publicly visible type or member 'Options.CustomsBrokerAddressId'

Check warning on line 197 in EasyPost/Models/API/Options.cs

GitHub Actions / FSharp_Compatibility_Tests

Missing XML comment for publicly visible type or member 'Options.CustomsBrokerAddressId'

Check warning on line 197 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net70)

Missing XML comment for publicly visible type or member 'Options.CustomsBrokerAddressId'

Check warning on line 197 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (NetStandard20)

Missing XML comment for publicly visible type or member 'Options.CustomsBrokerAddressId'

Check warning on line 197 in EasyPost/Models/API/Options.cs

GitHub Actions / NET_Tests (Net80)

Missing XML comment for publicly visible type or member 'Options.CustomsBrokerAddressId'
[JsonProperty("customs_include_shipping")]
public string? CustomsIncludeShipping { get; set; }
namespace EasyPost.Parameters.Tracker
{
/// <summary>
/// Parameters for <see cref="EasyPost.Services.TrackerService.CreateList(CreateList, System.Threading.CancellationToken)"/> API calls.

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Roslyn_Static_Analysis

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Roslyn_Static_Analysis

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Roslyn_Static_Analysis

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Roslyn_Static_Analysis

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Roslyn_Static_Analysis

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Roslyn_Static_Analysis

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Roslyn_Static_Analysis

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Roslyn_Static_Analysis

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Roslyn_Static_Analysis

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Roslyn_Static_Analysis

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved

Check warning on line 9 in EasyPost/Parameters/Tracker/CreateList.cs

GitHub Actions / Integration_Tests

XML comment has cref attribute 'CreateList(CreateList, System.Threading.CancellationToken)' that could not be resolved
/// </summary>
[ExcludeFromCodeCoverage]
public class CreateList : BaseParameters<Models.API.Tracker>, ITrackerParameter
var supportedFeature = new SupportedFeature();
var taxIdentifier = new TaxIdentifier();
var timeInTransit = new TimeInTransit();
var timeInTransitDetails = new TimeInTransitDetails();

Check warning on line 79 in EasyPost.Integration/Basics.cs

GitHub Actions / Integration_Tests

'TimeInTransitDetails' is obsolete: 'This class will be removed in a future version and replaced with TimeInTransitDetailsForDeliveryDateEstimate.'
var timeInTransitDetailsForDeliveryDateEstimate = new TimeInTransitDetailsForDeliveryDateEstimate();
var timeInTransitDetailsByDeliveryDate = new TimeInTransitDetailsForShipDateRecommendation();
var tracker = new Tracker();