EasyPost / easypost-go

Golang bindings for the EasyPost API
https://easypost.com/docs/api
ISC License
42 stars 17 forks source link

[bug] Fix `DateTime`-type objects not being URL-encoded for HTTP GET requests #211

Closed nwithan8 closed 7 months ago

nwithan8 commented 7 months ago

Description

PR #184 forgot to implement the interface for allowing the custom DateTime class to be URL-encoded, causing any DateTime-type parameters (e.g. start_datetime, end_datetime) to being excluded in GET HTTP requests. POST HTTP requests were/are still valid, as the DateTime class was properly built to serialize to JSON data.

This PR adds the required EncodeValues method on the DateTime class to instruct how to encode the class value.

Closes #210

Testing

Pull Request Type

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