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

[feat] Add TrackingCodes parameter #594

Merged
merged 3 commits into from
Oct 9, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Next Release

- Removes the deprecated `create_list` tracker endpoint function as it is no longer available via API
- Adds `TrackingCodes` optional parameter to `Tracker.All` parameter set for listing trackers

## v6.7.3 (2024-09-17)

Expand Down
10 changes: 10 additions & 0 deletions EasyPost/Parameters/Tracker/All.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using EasyPost.Utilities.Internal.Attributes;
Expand Down Expand Up @@ -51,10 +52,19 @@

/// <summary>
/// Only return trackers with the given tracking code.
/// Deprecated: Use <see cref="TrackingCodes"/> instead.
/// </summary>
// TODO: Remove in next major version.
[Obsolete("This property will be removed in a future version and replaced with TrackingCodes.")]
[TopLevelRequestParameter(Necessity.Optional, "tracking_code")]
public string? TrackingCode { get; set; }

/// <summary>
/// Only return trackers with the given tracking codes.
/// </summary>
[TopLevelRequestParameter(Necessity.Optional, "tracking_codes")]
public List<string>? TrackingCodes { get; set; }

#endregion

/// <summary>
Expand All @@ -73,7 +83,7 @@
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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

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

View workflow job for this annotation

GitHub Actions / NET_Tests (Net80)

'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

View workflow job for this annotation

GitHub Actions / Visual_Basic_Compatibility_Test

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