-
Notifications
You must be signed in to change notification settings - Fork 74
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 missing options #593
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do some options have a type comment while others don't?
[JsonProperty("carrier_insurance_amount")] | ||
public string? CarrierInsuranceAmount { get; set; } | ||
public string? CarrierInsuranceAmount { get; set; } // number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the comment be any
?
public string? CarrierInsuranceAmount { get; set; } // number | |
public string? CarrierInsuranceAmount { get; set; } // any |
Those with comments are to denote options that are technically the wrong type (e.g. a "string" type, but server-side, it parses it as a number. An end-user could potentially provide a non-numeric string, which would cause issues server-side). These should be considered for changes during the next breaking changes release cycle. |
As mentioned in the past, I don't believe exposing all available options is the right play. Many are intentionally undocumented for various reasons - many need to be vetted for validity. I would caution against moving forward with this PR and instead continue having users rely on the custom option override you built to allow passing options that may not be officially supported. |
Description
Add all missing shipping options.
NOTE: Some options are/continue to be the wrong type (e.g. string instead of bool, string instead of DateTime (#520)). This PR is purely additive, with only new options and documentation on existing options to point out where a type is invalid. We should consider fixing these in a breaking change in the future.
Closes #592
Testing
Pull Request Type
Please select the option(s) that are relevant to this PR.