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]: Change pickup_min_datetime and pickup_max_datetime Shipment Options types to string #520

Open
1 task done
gkeasypost opened this issue Sep 22, 2023 · 6 comments
Labels
triage Issue is being researched

Comments

@gkeasypost
Copy link

Feature Request Is New

  • I have verified that the requested feature does not already exist or has not already been requested.

Description of the feature

In the Options model, the pickup_min_datetime and pickup_max_datetime options should be a string type instead of a DateTime type in order to maintain consistency with what the EasyPost API returns for those options, as well as the same type as delivery_min_datetime and delivery_max_datetime.

see:
https://www.easypost.com/docs/api#options
https://github.com/EasyPost/easypost-csharp/blob/master/EasyPost/Models/API/Options.cs#L683
https://github.com/EasyPost/easypost-csharp/blob/master/EasyPost/Models/API/Options.cs#L689

@gkeasypost gkeasypost added the triage Issue is being researched label Sep 22, 2023
@nwithan8
Copy link
Member

Hey, thanks for reaching out! This is being discussed internally about the best way to handle non-primatives, particularly dates, in our client libraries, whether to keep them as strings as they are in the raw JSON, or whether to de/serialize them to language-specific elements (e.g. a DateTime in .NET).

Right now, it seems there is a mix of both throughout the library, so we will try to standardize it one way or another via a breaking change release.

We'll keep you updated. If any other developer would like to weigh in on what would be suit their expectations, please chime in!

@joe-rohde
Copy link

Standardizing these dates is important for working with different carrier requirements. Is there a timeline on when this will be addressed?

@nwithan8
Copy link
Member

Hey @joe-rohde , thanks for weighing in.

Unfortunately, we do not have a projected timeline or any updates to share regarding this.

If you could, can you elaborate on how the DateTime versus string type of a date is interfering with your usage of EasyPost? It will help us diagnose the issue and influence our decision about which paradigm to adopt.

@joe-rohde
Copy link

joe-rohde commented Nov 22, 2023 via email

@joe-rohde
Copy link

joe-rohde commented Jan 17, 2024

Any update on the effort in standardizing the datetimes in the API?

@Justintime50
Copy link
Member

Hey Joe, thanks for the example with CDL. Mind supplying a few more details so we can investigate the root cause further? You mentioned you are seeing a discrepancy with the datetimes you provided and what the API returns and that it’s causing the wrong datetimes in the CDL system - can you elaborate on the affect of that behavior? The datetimes provided appear the same with the exception of the response containing the timezone as UTC, is that what is causing the wrong datetimes? If so, does supplying your desired timezone in the datetime correct the problem? Our system will default to UTC when no timezone is supplied which may explain the discrepancy.

If that isn’t the problem or doesn’t correct the discrepancy, it would be helpful to have a shipment ID for a recent purchased CDL shipment that contains this problem so we can check it on our end.

We are still determining how to unify the datetime fields in this library and have no immediate plans to ship a breaking change release of this library to accomplish that. In the meantime, I’d love to help you get these datetime option fields working with CDL if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue is being researched
Projects
None yet
Development

No branches or pull requests

4 participants