Skip to content

Commit

Permalink
move ObjectWithClassReference
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Dec 11, 2024
1 parent 0ad4239 commit da579fa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/edutap/wallet_google/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .models.datatypes.general import Pagination
from .models.datatypes.message import Message
from .models.misc import AddMessageRequest
from .models.passes.bases import ObjectWithClassReference
from .models.misc import ObjectWithClassReference
from .registry import lookup_metadata
from .registry import lookup_model
from .registry import lookup_model_by_plural_name
Expand Down
8 changes: 8 additions & 0 deletions src/edutap/wallet_google/models/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
from .passes import retail
from .passes import tickets_and_transit

class ObjectWithClassReference(WithIdModel):
"""
Google Wallet Object with a classReferences attribute, that reflects the whole class data.
This class is used to create the save_link only, never inherit from it.
"""

classReference: ClassModel | None = None

@register_model(
"SmartTap",
Expand Down
9 changes: 0 additions & 9 deletions src/edutap/wallet_google/models/passes/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,6 @@ class ObjectModel(WithIdModel):
validTimeInterval: TimeInterval | None = None


class ObjectWithClassReference(WithIdModel):
"""
Mixin for all Google Wallet Object with a classReferences attribute, that reflects the whole class data.
This class is used to create the save_link only, never inherit from it.
"""

classReference: ClassModel | None = None


class StyleableMixin:
"""
Mixin for Google Wallet Classes/Objects that can be styled.
Expand Down
1 change: 1 addition & 0 deletions src/edutap/wallet_google/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@


class RegistryMetadataDict(TypedDict, total=False):
"""TypedDict for the metadata of a registered model."""
model: type[Model]
name: str
url_part: str
Expand Down

0 comments on commit da579fa

Please sign in to comment.