Skip to content

Services1 #274

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

Merged
merged 4 commits into from
May 15, 2023
Merged

Services1 #274

merged 4 commits into from
May 15, 2023

Conversation

Justintime50
Copy link
Member

@Justintime50 Justintime50 commented May 12, 2023

Description

Adds the following services and models:

  • ApiKey
  • Batch
  • Billing
  • Brand
  • CarrierAccount
  • CustomsInfo
  • CustomsItem

Updates various base service functions to handle new flows or differing names.

Testing

Updated 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)

@Justintime50 Justintime50 marked this pull request as ready for review May 12, 2023 21:35
@Justintime50 Justintime50 requested a review from a team May 12, 2023 21:35
Copy link
Contributor

@jchen293 jchen293 left a comment

Choose a reason for hiding this comment

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

lgtm, left non-blocking feedback

self._client = client
self._model_class = Batch.__name__

def create(self, **params) -> List[Any]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def create(self, **params) -> List[Any]:
def create(self, **params) -> Batch:

"""Create a Batch."""
return self._create_resource(self._model_class, **params)

def all(self, **params) -> List[Any]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def all(self, **params) -> List[Any]:
def all(self, **params) -> List[Batch]:

"""Update a CarrierAccount."""
return self._update_resource(self._model_class, id, **params)

def delete(self, id):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def delete(self, id):
def delete(self, id) -> None:

@Justintime50
Copy link
Member Author

@jchen293 thanks Jack! I'll make sure to do a good pass over everything once done to fix type hints

@Justintime50 Justintime50 merged commit 6a3dac8 into master May 15, 2023
@Justintime50 Justintime50 deleted the services1 branch May 15, 2023 16:23
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