Mixins
ApiMixin ¶
Mixin for models that require an API instance to be set.
This allows us to create model methods such as cancel, book, etc., that require an API instance to function.
The API instance is set using the set_api method, and it can be accessed via the _api attribute.
If the API instance is not set, calling methods that require it will raise a ValueError.
PhoneLongitudeLatitudeMixin ¶
Mixin for models that require phone number, latitude, and longitude fields.
This mixin exists to make it easier to handle the various names these fields can have in different APIs.
AddressMixin ¶
Mixin for models that require address fields.
This mixin exists to make it easier to handle the various names these fields can have in different APIs. Keep alias lists in sync with _ADDRESS_ALIAS_TO_CANONICAL in anonymize/anonymizer.py.