thunderbird_accounts.subscription.models

Classes

Customer(*args, **kwargs)

A paddle customer.

Subscription(*args, **kwargs)

A paddle subscription.

class thunderbird_accounts.subscription.models.Customer(*args, **kwargs)[source]

Bases: BaseModel

A paddle customer.

Parameters:
  • paddle_id – The customer id field in paddle

  • name – The name of the customer

  • email – The email of the customer

  • uuid (UUIDField) – Primary key: Uuid

  • created_at (DateTimeField) – Created at

  • updated_at (DateTimeField) – Updated at

Relationship fields:

Parameters:

user (ForeignKey to User) – User (related name: customer)

Reverse relationships:

Parameters:

subscription (Reverse ForeignKey from Subscription) – All subscriptions of this customer (related name of customer)

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

class thunderbird_accounts.subscription.models.Subscription(*args, **kwargs)[source]

Bases: BaseModel

A paddle subscription.

Parameters:
  • name – The name of the subscription

  • paddle_id – The subscription’s paddle id

  • is_active – Is this subscription active?

  • active_since – Datetime when the subscription became active

  • inactive_since – Datetime when the subscription became inactive

  • uuid (UUIDField) – Primary key: Uuid

  • created_at (DateTimeField) – Created at

  • updated_at (DateTimeField) – Updated at

Relationship fields:

Parameters:

customer (ForeignKey to Customer) – Customer (related name: subscription)

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned