Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions mpt_api_client/mptclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from mpt_api_client.resources import OrderCollectionClient


class MPTClient:
"""MPT API Client."""
class MPTClientBase:
"""MPT API Client Base."""

def __init__(
self,
Expand All @@ -19,6 +19,10 @@ def __init__(
def __getattr__(self, name): # type: ignore[no-untyped-def]
return self.registry.get(name)(client=self.mpt_client)


class MPTClient(MPTClientBase):
"""MPT API Client."""

@property
def commerce(self) -> "CommerceMpt":
"""Commerce MPT API Client.
Expand All @@ -30,7 +34,7 @@ def commerce(self) -> "CommerceMpt":
return CommerceMpt(mpt_client=self.mpt_client, registry=commerce)


class CommerceMpt(MPTClient):
class CommerceMpt(MPTClientBase):
"""Commerce MPT API Client."""

@property
Expand Down