easypost-go icon indicating copy to clipboard operation
easypost-go copied to clipboard

Custom (un)marshalling for CustomsItem to account for Value type

Open nwithan8 opened this issue 3 years ago • 0 comments

Description

  • Custom (un)marshal functions for CustomsItem to account for float/string discrepancy with Value
    • Value will always be a string when serialized to JSON
    • Value can be either a string or a float when deserializing from JSON
  • Remove workaround from fixtures
  • Re-record cassettes as needed

Testing

  • Manually tested and confirmed that deserializing a string (via API response) and a float (via fixture JSON) both work
  • Cassettes re-recorded as needed
  • All unit tests pass

Pull Request Type

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

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x] Improvement (fixing a typo, updating readme, renaming a variable name, etc.)

nwithan8 avatar Sep 21 '22 20:09 nwithan8