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

Remove carbon_offset from structs #203

Merged
merged 3 commits into from
Dec 1, 2023
Merged

Remove carbon_offset from structs #203

merged 3 commits into from
Dec 1, 2023

Conversation

jchen293
Copy link
Contributor

Description

Removed CarbonOffset parameter from createShipmentRequest, buyShipmentRequest, and buyShipmentRequest structs as EasyPost now offers Carbon Neutral shipments by default for free

Testing

Re-recorded all cassettes(more than a year old) and updated unit tests

Pull Request Type

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

  • 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)
  • Improvement (fixing a typo, updating readme, renaming a variable name, etc.)

@jchen293 jchen293 requested a review from a team November 30, 2023 21:30
Copy link
Contributor

@nwithan8 nwithan8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nice thing about Go's inability to have optional parameters, and therefore the need to implement a new function for each possible combination of parameters, combined with the fact it can't overload like Java (each function has its own unique, hopefully-descriptive name), is that here we're just removing whole functions, rather than changing existing function signatures. Less of a breaking change for end-users.

tests/insurance_test.go Outdated Show resolved Hide resolved
tests/order_test.go Show resolved Hide resolved
@jchen293 jchen293 merged commit 2fe3489 into master Dec 1, 2023
9 checks passed
@jchen293 jchen293 deleted the remove_carbon_offset branch December 1, 2023 18:14
@jchen293 jchen293 changed the title Remove carbon_offset from parameter Remove carbon_offset from structs Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants