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

[chore] Support new UPS carrier account create/update endpoint #574

Merged
merged 10 commits into from
Jul 15, 2024

Conversation

nwithan8
Copy link
Member

@nwithan8 nwithan8 commented Jul 9, 2024

Description

  • Update carrier account creation/update functions to account for new UPS endpoint without introducing new functions
  • Add/rework parameter sets for UPS carrier account creation to accommodate new schema
  • Under-the-hood changes to carrier account parameter sets for determining endpoints based on type
  • Add parameter sets for UPS carrier account update
  • Mark existing legacy carrier account creation/update functions (using dictionaries) as obsolete, as they do not support the new UPS endpoints
    • Introduce guard clauses that will cause the legacy functions to error out if attempting to use them for a UPS account - guide users to the parameter set-based alternatives
  • Under-the-hood consolidation of dictionary mutations for parameter JSON serialization

Outside of obsolete warnings (and guard clauses if users decide to ignore the obsolete warnings), there are no breaking changes to existing workflows. Only those creating/editing UPS accounts will need to account for the changes made in this PR.

Testing

  • New unit tests to confirm UPS endpoint switching, guard clauses, parameter set inheritance and serialization
  • Added/re-recorded cassettes as needed

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)

- Mark legacy (dictionary) carrier account creation function as deprecated (does not support FedEx and UPS registrations)
- Introduce new error type raised if invalid function called (guard clause for legacy carrier account creation function)
…UPS-specific tests

- Add required test fixtures
- Add/re-record cassettes as needed
@nwithan8 nwithan8 requested a review from a team July 9, 2024 00:08
Co-authored-by: Jack Chen <jchen@easypost.com>
@nwithan8 nwithan8 merged commit 7a6b3b7 into master Jul 15, 2024
14 checks passed
@nwithan8 nwithan8 deleted the ups_registration branch July 15, 2024 20:35
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.

3 participants