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, feat] Send FedEx SmartPost registration to correct endpoint, prep carrier account parameters #515

Merged
merged 6 commits into from
Sep 5, 2023

Conversation

nwithan8
Copy link
Member

@nwithan8 nwithan8 commented Sep 1, 2023

Description

  • Fix FedEx SmartPost not going to the /register endpoint when creating a carrier account.
  • Add custom parameter set for FedEx SmartPost (alongside FedEx and UPS)
  • Add enums for common carrier account types under CarrierAccountType
    • Replaces FedExAccount and UpsAccount constants that were introduced only in the previous release (no concern for breaking change issue)
  • Adds constructors for carrier account creation parameter sets that take in carrier account type as an argument
    • Old way (no argument) labeled as deprecated, as we want to move users towards defining the type during parameter construction
    • This will also come in handy if/when we introduce parameter sets for all carrier accounts
  • Adjust the relationship between base classes for carrier account creation parameters to remove unnecessary parameters (e.g. CreateFedEx no longer has a useless Credentials property, Create no longer has a useless RegistrationData property)

Testing

  • Update unit test to account for changes to constants, re-record cassettes as needed
    • Minimal-to-no changes to unit tests suggest this will not be a breaking change for end-users (this alters unadvertised code that was only introduced a week ago anyway)

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)

- Update carrier account creation endpoint flow to use enums
… sets to remove unnecessary parameters

- Add FedExSmartpost parameter set
- FedExSmartpost uses different endpoint for creation
- Update unit tests, re-record cassettes as needed
@nwithan8 nwithan8 requested a review from a team September 1, 2023 20:22
EasyPost/Constants.cs Outdated Show resolved Hide resolved
EasyPost/Models/API/CarrierAccountType.cs Outdated Show resolved Hide resolved
EasyPost/Parameters/CarrierAccount/Create.cs Show resolved Hide resolved
@nwithan8 nwithan8 merged commit 16573bc into master Sep 5, 2023
14 checks passed
@nwithan8 nwithan8 deleted the fedex_smartpost branch September 5, 2023 17:44
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