EasyPost / easypost-csharp

EasyPost Shipping API Client Library for .NET and .NET Framework applications
https://easypost.com/docs/api
MIT License
66 stars 74 forks source link

[fix] Add `RestrictionComments` to `CustomsInfo` Create parameter set #598

Closed nwithan8 closed 1 month ago

nwithan8 commented 1 month ago

Description

Adds RestrictionComments parameter to the CustomsInfo.Create parameter set, and enforces its presence based on the value of RestrictionType (RestrictionComments must be set if RestrictionType is set (not null) and is anything other than "none")

Closes #597

Adds expanded TopLevelRequestParameterDependentsAttribute and NestedRequestParameterDependentsAttribute to accommodate for mix of value- and presence-based independent-dependent relationships. New possible enforcements, e.g.:

Testing

Pull Request Type

Please select the option(s) that are relevant to this PR.

nwithan8 commented 1 month ago

Huh, ya learn something new every day. I've never seen these customs values used in the wild.

I'm seeing some unrelated cassettes re-recorded here, were they expired? I'd recommend not including unrelated cassette changes if we can avoid it.

This kind of ballooned out, as the CustomsInfo fixture affected Shipment fixtures, which affects a lot of cassettes.