# Generated by Django 5.1.4 on 2025-01-03 03:17

import uuid

import django.core.validators
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

import djstripe.enums
import djstripe.fields
import djstripe.models.api
import djstripe.models.payment_methods
import djstripe.models.webhooks

DJSTRIPE_SUBSCRIBER_MODEL: str = getattr(
    settings, "DJSTRIPE_SUBSCRIBER_MODEL", settings.AUTH_USER_MODEL
)  # type: ignore

# Needed here for external apps that have added the DJSTRIPE_SUBSCRIBER_MODEL
# *not* in the '__first__' migration of the app, which results in:
# ValueError: Related model 'DJSTRIPE_SUBSCRIBER_MODEL' cannot be resolved
# Context: https://github.com/dj-stripe/dj-stripe/issues/707
DJSTRIPE_SUBSCRIBER_MODEL_MIGRATION_DEPENDENCY = getattr(
    settings, "DJSTRIPE_SUBSCRIBER_MODEL_MIGRATION_DEPENDENCY", "__first__"
)

DJSTRIPE_SUBSCRIBER_MODEL_DEPENDENCY = migrations.swappable_dependency(
    DJSTRIPE_SUBSCRIBER_MODEL
)

if DJSTRIPE_SUBSCRIBER_MODEL != settings.AUTH_USER_MODEL:
    DJSTRIPE_SUBSCRIBER_MODEL_DEPENDENCY = migrations.migration.SwappableTuple(
        (
            DJSTRIPE_SUBSCRIBER_MODEL.split(".", 1)[0],
            DJSTRIPE_SUBSCRIBER_MODEL_MIGRATION_DEPENDENCY,
        ),
        DJSTRIPE_SUBSCRIBER_MODEL,
    )


class Migration(migrations.Migration):
    initial = True

    dependencies = [DJSTRIPE_SUBSCRIBER_MODEL_DEPENDENCY]

    operations = [
        migrations.CreateModel(
            name="CountrySpec",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "id",
                    models.CharField(max_length=2, primary_key=True, serialize=False),
                ),
                (
                    "default_currency",
                    djstripe.fields.StripeCurrencyCodeField(max_length=3),
                ),
                ("supported_bank_account_currencies", djstripe.fields.JSONField()),
                ("supported_payment_currencies", djstripe.fields.JSONField()),
                ("supported_payment_methods", djstripe.fields.JSONField()),
                ("supported_transfer_countries", djstripe.fields.JSONField()),
                ("verification_fields", djstripe.fields.JSONField()),
            ],
            options={"abstract": False},
        ),
        migrations.CreateModel(
            name="DjstripePaymentMethod",
            fields=[
                (
                    "id",
                    models.CharField(max_length=255, primary_key=True, serialize=False),
                ),
                ("type", models.CharField(db_index=True, max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name="InvoiceOrLineItem",
            fields=[
                (
                    "id",
                    models.CharField(max_length=255, primary_key=True, serialize=False),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.InvoiceorLineItemType, max_length=255
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Account",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("business_profile", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "business_type",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.BusinessType,
                        max_length=255,
                    ),
                ),
                (
                    "charges_enabled",
                    models.BooleanField(
                        help_text="Whether the account can create live charges"
                    ),
                ),
                (
                    "country",
                    models.CharField(
                        help_text="The country of the account", max_length=2
                    ),
                ),
                ("company", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "default_currency",
                    djstripe.fields.StripeCurrencyCodeField(max_length=3),
                ),
                (
                    "details_submitted",
                    models.BooleanField(
                        help_text="Whether account details have been submitted. Standard accounts cannot receive payouts before this is true."
                    ),
                ),
                (
                    "email",
                    models.CharField(
                        help_text="The primary user's email address.", max_length=255
                    ),
                ),
                ("individual", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "payouts_enabled",
                    models.BooleanField(
                        help_text="Whether Stripe can send payouts to this account",
                        null=True,
                    ),
                ),
                (
                    "product_description",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes.",
                        max_length=255,
                    ),
                ),
                ("requirements", djstripe.fields.JSONField(blank=True, null=True)),
                ("settings", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.AccountType, max_length=255
                    ),
                ),
                ("tos_acceptance", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="ActiveEntitlement",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="APIKey",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                (
                    "id",
                    models.CharField(
                        default=djstripe.models.api.generate_api_key_id,
                        editable=False,
                        max_length=255,
                    ),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.APIKeyType, max_length=255
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        blank=True,
                        help_text="An optional name to identify the key.",
                        max_length=100,
                        verbose_name="Key name",
                    ),
                ),
                (
                    "secret",
                    models.CharField(
                        help_text="The value of the key.",
                        max_length=128,
                        unique=True,
                        validators=[
                            django.core.validators.RegexValidator(
                                regex="^(pk|sk|rk)_(test|live)_([a-zA-Z0-9]{24,99})"
                            )
                        ],
                    ),
                ),
                (
                    "livemode",
                    models.BooleanField(
                        help_text="Whether the key is valid for live or test mode."
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="ApplicationFee",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                ("amount_refunded", djstripe.fields.StripeQuantumCurrencyAmountField()),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "refunded",
                    models.BooleanField(
                        help_text="Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false."
                    ),
                ),
                (
                    "account",
                    djstripe.fields.StripeForeignKey(
                        help_text="ID of the Stripe account this fee was taken from.",
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="application_fees",
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="BalanceTransaction",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                ("available_on", djstripe.fields.StripeDateTimeField()),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "exchange_rate",
                    models.DecimalField(decimal_places=6, max_digits=8, null=True),
                ),
                ("fee", djstripe.fields.StripeQuantumCurrencyAmountField()),
                ("fee_details", djstripe.fields.JSONField()),
                ("net", djstripe.fields.StripeQuantumCurrencyAmountField()),
                ("source", djstripe.fields.StripeIdField(max_length=255)),
                (
                    "reporting_category",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.BalanceTransactionReportingCategory,
                        max_length=255,
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.BalanceTransactionStatus, max_length=255
                    ),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.BalanceTransactionType, max_length=255
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="ApplicationFeeRefund",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "fee",
                    djstripe.fields.StripeForeignKey(
                        help_text="The application fee that was refunded",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="refunds",
                        to="djstripe.applicationfee",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "balance_transaction",
                    djstripe.fields.StripeForeignKey(
                        help_text="Balance transaction that describes the impact on your account balance.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.balancetransaction",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="applicationfee",
            name="balance_transaction",
            field=djstripe.fields.StripeForeignKey(
                help_text="Balance transaction that describes the impact on your account balance.",
                on_delete=django.db.models.deletion.CASCADE,
                to="djstripe.balancetransaction",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.CreateModel(
            name="Charge",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                (
                    "amount_captured",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "amount_refunded",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                (
                    "application",
                    models.CharField(
                        blank=True,
                        help_text="ID of the Connect application that created the charge.",
                        max_length=255,
                    ),
                ),
                (
                    "application_fee_amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                ("billing_details", djstripe.fields.JSONField(null=True)),
                (
                    "calculated_statement_descriptor",
                    models.CharField(
                        default="",
                        help_text="The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.",
                        max_length=22,
                    ),
                ),
                (
                    "captured",
                    models.BooleanField(
                        default=False,
                        help_text="If the charge was created without capturing, this boolean represents whether or not it is still uncaptured or has since been captured.",
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "disputed",
                    models.BooleanField(
                        default=False, help_text="Whether the charge has been disputed."
                    ),
                ),
                (
                    "failure_code",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.ApiErrorCode,
                        max_length=255,
                    ),
                ),
                (
                    "failure_message",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="Message to user further explaining reason for charge failure if available.",
                        max_length=5000,
                    ),
                ),
                ("fraud_details", djstripe.fields.JSONField(blank=True, null=True)),
                ("outcome", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "paid",
                    models.BooleanField(
                        default=False,
                        help_text="True if the charge succeeded, or was successfully authorized for later capture, False otherwise.",
                    ),
                ),
                (
                    "payment_method_details",
                    djstripe.fields.JSONField(blank=True, null=True),
                ),
                (
                    "receipt_email",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="The email address that the receipt for this charge was sent to.",
                        max_length=800,
                    ),
                ),
                (
                    "receipt_number",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The transaction number that appears on email receipts sent for this charge.",
                        max_length=14,
                    ),
                ),
                (
                    "receipt_url",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.",
                        max_length=5000,
                    ),
                ),
                (
                    "refunded",
                    models.BooleanField(
                        default=False,
                        help_text="Whether or not the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.",
                    ),
                ),
                ("shipping", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "statement_descriptor",
                    models.CharField(
                        blank=True,
                        help_text="For card charges, use statement_descriptor_suffix instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters.",
                        max_length=22,
                        null=True,
                    ),
                ),
                (
                    "statement_descriptor_suffix",
                    models.CharField(
                        blank=True,
                        help_text="Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.",
                        max_length=22,
                        null=True,
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.ChargeStatus, max_length=255
                    ),
                ),
                ("transfer_data", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "transfer_group",
                    models.CharField(
                        blank=True,
                        help_text="A string that identifies this transaction as part of a group.",
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "application_fee",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The application fee (if any) for the charge.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="fee_for_charge",
                        to="djstripe.applicationfee",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "balance_transaction",
                    djstripe.fields.StripeForeignKey(
                        help_text="The balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.balancetransaction",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "on_behalf_of",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The account (if any) the charge was made on behalf of without triggering an automatic transfer.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="charges",
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="applicationfee",
            name="charge",
            field=djstripe.fields.StripeForeignKey(
                help_text="The charge that the application fee was taken from.",
                on_delete=django.db.models.deletion.CASCADE,
                to="djstripe.charge",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.CreateModel(
            name="Coupon",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=500)),
                ("applies_to", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "amount_off",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "currency",
                    djstripe.fields.StripeCurrencyCodeField(
                        blank=True, max_length=3, null=True
                    ),
                ),
                (
                    "duration",
                    djstripe.fields.StripeEnumField(
                        default="once",
                        enum=djstripe.enums.CouponDuration,
                        max_length=255,
                    ),
                ),
                (
                    "duration_in_months",
                    models.PositiveIntegerField(
                        blank=True,
                        help_text="If `duration` is `repeating`, the number of months the coupon applies.",
                        null=True,
                    ),
                ),
                (
                    "max_redemptions",
                    models.PositiveIntegerField(
                        blank=True,
                        help_text="Maximum number of times this coupon can be redeemed, in total, before it is no longer valid.",
                        null=True,
                    ),
                ),
                (
                    "name",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="Name of the coupon displayed to customers on for instance invoices or receipts.",
                        max_length=5000,
                    ),
                ),
                (
                    "percent_off",
                    djstripe.fields.StripePercentField(
                        blank=True,
                        decimal_places=2,
                        max_digits=5,
                        null=True,
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(100),
                        ],
                    ),
                ),
                (
                    "redeem_by",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "times_redeemed",
                    models.PositiveIntegerField(
                        default=0,
                        editable=False,
                        help_text="Number of times this coupon has been applied to a customer.",
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "get_latest_by": "created",
                "abstract": False,
                "unique_together": {("id", "livemode")},
            },
        ),
        migrations.CreateModel(
            name="Customer",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("address", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "balance",
                    djstripe.fields.StripeQuantumCurrencyAmountField(
                        blank=True, default=0, null=True
                    ),
                ),
                (
                    "currency",
                    djstripe.fields.StripeCurrencyCodeField(
                        blank=True, default="", max_length=3
                    ),
                ),
                (
                    "delinquent",
                    models.BooleanField(
                        blank=True,
                        default=False,
                        help_text="Whether or not the latest charge for the customer's latest invoice has failed.",
                        null=True,
                    ),
                ),
                (
                    "deleted",
                    models.BooleanField(
                        blank=True,
                        default=False,
                        help_text="Whether the Customer instance has been deleted upstream in Stripe or not.",
                        null=True,
                    ),
                ),
                (
                    "coupon_start",
                    djstripe.fields.StripeDateTimeField(
                        blank=True, editable=False, null=True
                    ),
                ),
                (
                    "coupon_end",
                    djstripe.fields.StripeDateTimeField(
                        blank=True, editable=False, null=True
                    ),
                ),
                ("discount", djstripe.fields.JSONField(blank=True, null=True)),
                ("email", models.TextField(blank=True, default="", max_length=5000)),
                (
                    "invoice_prefix",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The prefix for the customer used to generate unique invoice numbers.",
                        max_length=255,
                    ),
                ),
                ("invoice_settings", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "name",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="The customer's full name or business name.",
                        max_length=5000,
                    ),
                ),
                (
                    "phone",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="The customer's phone number.",
                        max_length=5000,
                    ),
                ),
                ("preferred_locales", djstripe.fields.JSONField(blank=True, null=True)),
                ("shipping", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "tax_exempt",
                    djstripe.fields.StripeEnumField(
                        default="",
                        enum=djstripe.enums.CustomerTaxExempt,
                        max_length=255,
                    ),
                ),
                ("date_purged", models.DateTimeField(editable=False, null=True)),
                (
                    "coupon",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.coupon",
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "subscriber",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="djstripe_customers",
                        to=DJSTRIPE_SUBSCRIBER_MODEL,
                    ),
                ),
                (
                    "default_source",
                    djstripe.fields.PaymentMethodForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="customers",
                        to="djstripe.djstripepaymentmethod",
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="charge",
            name="customer",
            field=djstripe.fields.StripeForeignKey(
                blank=True,
                help_text="The customer associated with this charge.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="charges",
                to="djstripe.customer",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.CreateModel(
            name="Card",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "address_city",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="City/District/Suburb/Town/Village.",
                        max_length=5000,
                    ),
                ),
                (
                    "address_country",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="Billing address country.",
                        max_length=5000,
                    ),
                ),
                (
                    "address_line1",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="Street address/PO Box/Company name.",
                        max_length=5000,
                    ),
                ),
                (
                    "address_line1_check",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.CardCheckResult,
                        max_length=255,
                    ),
                ),
                (
                    "address_line2",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="Apartment/Suite/Unit/Building.",
                        max_length=5000,
                    ),
                ),
                (
                    "address_state",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="State/County/Province/Region.",
                        max_length=5000,
                    ),
                ),
                (
                    "address_zip",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="ZIP or postal code.",
                        max_length=5000,
                    ),
                ),
                (
                    "address_zip_check",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.CardCheckResult,
                        max_length=255,
                    ),
                ),
                (
                    "brand",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.CardBrand, max_length=255
                    ),
                ),
                (
                    "country",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Two-letter ISO code representing the country of the card.",
                        max_length=2,
                    ),
                ),
                (
                    "cvc_check",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.CardCheckResult,
                        max_length=255,
                    ),
                ),
                (
                    "default_for_currency",
                    models.BooleanField(
                        help_text="Whether this external account (Card) is the default account for its currency.",
                        null=True,
                    ),
                ),
                (
                    "dynamic_last4",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="(For tokenized numbers only.) The last four digits of the device account number.",
                        max_length=4,
                    ),
                ),
                ("exp_month", models.IntegerField(help_text="Card expiration month.")),
                ("exp_year", models.IntegerField(help_text="Card expiration year.")),
                (
                    "fingerprint",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Uniquely identifies this particular card number.",
                        max_length=16,
                    ),
                ),
                (
                    "funding",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.CardFundingType, max_length=255
                    ),
                ),
                (
                    "last4",
                    models.CharField(
                        help_text="Last four digits of Card number.", max_length=4
                    ),
                ),
                (
                    "name",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="Cardholder name.",
                        max_length=5000,
                    ),
                ),
                (
                    "tokenization_method",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.CardTokenizationMethod,
                        max_length=255,
                    ),
                ),
                (
                    "account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The external account the charge was made on behalf of. Null here indicates that this value was never set.",
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="cards",
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="legacy_cards",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
            bases=(djstripe.models.payment_methods.LegacySourceMixin, models.Model),
        ),
        migrations.CreateModel(
            name="BankAccount",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "account_holder_name",
                    models.TextField(
                        blank=True,
                        help_text="The name of the person or business that owns the bank account.",
                        max_length=5000,
                    ),
                ),
                (
                    "account_holder_type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.BankAccountHolderType, max_length=255
                    ),
                ),
                (
                    "bank_name",
                    models.CharField(
                        help_text="Name of the bank associated with the routing number (e.g., `WELLS FARGO`).",
                        max_length=255,
                    ),
                ),
                (
                    "country",
                    models.CharField(
                        help_text="Two-letter ISO code representing the country the bank account is located in.",
                        max_length=2,
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "default_for_currency",
                    models.BooleanField(
                        help_text="Whether this external account (BankAccount) is the default account for its currency.",
                        null=True,
                    ),
                ),
                (
                    "fingerprint",
                    models.CharField(
                        help_text="Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.",
                        max_length=16,
                    ),
                ),
                ("last4", models.CharField(max_length=4)),
                (
                    "routing_number",
                    models.CharField(
                        help_text="The routing transit number for the bank account.",
                        max_length=255,
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.BankAccountStatus, max_length=255
                    ),
                ),
                (
                    "account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The external account the charge was made on behalf of. Null here indicates that this value was never set.",
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="bank_accounts",
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="bank_account",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
            bases=(djstripe.models.payment_methods.LegacySourceMixin, models.Model),
        ),
        migrations.CreateModel(
            name="Dispute",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                ("balance_transactions", djstripe.fields.JSONField(default=list)),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                ("evidence", djstripe.fields.JSONField()),
                ("evidence_details", djstripe.fields.JSONField()),
                (
                    "is_charge_refundable",
                    models.BooleanField(
                        help_text="If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute."
                    ),
                ),
                (
                    "reason",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.DisputeReason, max_length=255
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.DisputeStatus, max_length=255
                    ),
                ),
                (
                    "balance_transaction",
                    djstripe.fields.StripeForeignKey(
                        help_text="Balance transaction that describes the impact on your account balance.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="disputes",
                        to="djstripe.balancetransaction",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "charge",
                    djstripe.fields.StripeForeignKey(
                        help_text="The charge that was disputed",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="disputes",
                        to="djstripe.charge",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="charge",
            name="dispute",
            field=djstripe.fields.StripeForeignKey(
                blank=True,
                help_text="Details about the dispute if the charge has been disputed.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="charges",
                to="djstripe.dispute",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.AddField(
            model_name="charge",
            name="source",
            field=djstripe.fields.PaymentMethodForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="charges",
                to="djstripe.djstripepaymentmethod",
            ),
        ),
        migrations.CreateModel(
            name="EarlyFraudWarning",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="Event",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "api_version",
                    models.CharField(
                        blank=True,
                        help_text="the API version at which the event data was rendered. Blank for old entries only, all new entries will have this value",
                        max_length=64,
                    ),
                ),
                ("data", djstripe.fields.JSONField()),
                (
                    "request_id",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Information about the request that triggered this event, for traceability purposes. If empty string then this is an old entry without that data. If Null then this is not an old entry, but a Stripe 'automated' event with no associated request.",
                        max_length=50,
                    ),
                ),
                ("idempotency_key", models.TextField(blank=True, default="")),
                (
                    "type",
                    models.CharField(
                        help_text="Stripe's event description code", max_length=250
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="Feature",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="File",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "filename",
                    models.CharField(
                        help_text="A filename for the file, suitable for saving to a filesystem.",
                        max_length=255,
                    ),
                ),
                (
                    "purpose",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.FilePurpose, max_length=255
                    ),
                ),
                (
                    "size",
                    models.IntegerField(
                        help_text="The size in bytes of the file upload object."
                    ),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.FileType, max_length=255
                    ),
                ),
                (
                    "url",
                    models.CharField(
                        help_text="A read-only URL where the uploaded file can be accessed.",
                        max_length=200,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="FileLink",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "expires_at",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "url",
                    models.URLField(
                        help_text="The publicly accessible URL to download the file."
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "file",
                    djstripe.fields.StripeForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.file",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="IdempotencyKey",
            fields=[
                (
                    "uuid",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("action", models.CharField(max_length=100)),
                (
                    "livemode",
                    models.BooleanField(
                        help_text="Whether the key was used in live or test mode."
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
            ],
            options={"unique_together": {("action", "livemode")}},
        ),
        migrations.CreateModel(
            name="Invoice",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "account_country",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The country of the business associated with this invoice, most often the business creating the invoice.",
                        max_length=2,
                    ),
                ),
                (
                    "account_name",
                    models.TextField(
                        blank=True,
                        help_text="The public name of the business associated with this invoice, most often the business creating the invoice.",
                        max_length=5000,
                    ),
                ),
                (
                    "amount_due",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                (
                    "amount_paid",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "amount_remaining",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "application_fee_amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "attempt_count",
                    models.IntegerField(
                        help_text="Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule."
                    ),
                ),
                (
                    "attempted",
                    models.BooleanField(
                        default=False,
                        help_text="Whether or not an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the ``invoice.created`` webhook, for example, so you might not want to display that invoice as unpaid to your users.",
                    ),
                ),
                (
                    "auto_advance",
                    models.BooleanField(
                        help_text="Controls whether Stripe will perform automatic collection of the invoice. When false, the invoice's state will not automatically advance without an explicit action.",
                        null=True,
                    ),
                ),
                (
                    "billing_reason",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.InvoiceBillingReason,
                        max_length=255,
                    ),
                ),
                (
                    "collection_method",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.InvoiceCollectionMethod,
                        max_length=255,
                        null=True,
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                ("customer_address", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "customer_email",
                    models.TextField(
                        blank=True,
                        help_text="The customer's email. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.",
                        max_length=5000,
                    ),
                ),
                (
                    "customer_name",
                    models.TextField(
                        blank=True,
                        help_text="The customer's name. Until the invoice is finalized, this field will equal customer.name. Once the invoice is finalized, this field will no longer be updated.",
                        max_length=5000,
                    ),
                ),
                (
                    "customer_phone",
                    models.TextField(
                        blank=True,
                        help_text="The customer's phone number. Until the invoice is finalized, this field will equal customer.phone. Once the invoice is finalized, this field will no longer be updated.",
                        max_length=5000,
                    ),
                ),
                ("customer_shipping", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "customer_tax_exempt",
                    djstripe.fields.StripeEnumField(
                        default="",
                        enum=djstripe.enums.CustomerTaxExempt,
                        max_length=255,
                    ),
                ),
                ("discount", djstripe.fields.JSONField(blank=True, null=True)),
                ("discounts", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "due_date",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "ending_balance",
                    djstripe.fields.StripeQuantumCurrencyAmountField(null=True),
                ),
                (
                    "footer",
                    models.TextField(
                        blank=True,
                        help_text="Footer displayed on the invoice.",
                        max_length=5000,
                    ),
                ),
                (
                    "hosted_invoice_url",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been frozen yet, this will be null.",
                        max_length=799,
                    ),
                ),
                (
                    "invoice_pdf",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="The link to download the PDF for the invoice. If the invoice has not been frozen yet, this will be null.",
                        max_length=799,
                    ),
                ),
                (
                    "next_payment_attempt",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "number",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.",
                        max_length=64,
                    ),
                ),
                (
                    "paid",
                    models.BooleanField(
                        default=False,
                        help_text="Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.",
                    ),
                ),
                ("period_end", djstripe.fields.StripeDateTimeField()),
                ("period_start", djstripe.fields.StripeDateTimeField()),
                (
                    "post_payment_credit_notes_amount",
                    djstripe.fields.StripeQuantumCurrencyAmountField(
                        blank=True, null=True
                    ),
                ),
                (
                    "pre_payment_credit_notes_amount",
                    djstripe.fields.StripeQuantumCurrencyAmountField(
                        blank=True, null=True
                    ),
                ),
                (
                    "receipt_number",
                    models.CharField(
                        blank=True,
                        help_text="This is the transaction number that appears on email receipts sent for this invoice.",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "starting_balance",
                    djstripe.fields.StripeQuantumCurrencyAmountField(),
                ),
                (
                    "statement_descriptor",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="An arbitrary string to be displayed on your customer's credit card statement. The statement description may not include <>\"' characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. While most banks display this information consistently, some may display it incorrectly or not at all.",
                        max_length=22,
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.InvoiceStatus,
                        max_length=255,
                    ),
                ),
                (
                    "status_transitions",
                    djstripe.fields.JSONField(blank=True, null=True),
                ),
                (
                    "subscription_proration_date",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "subtotal",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                (
                    "tax",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "tax_percent",
                    djstripe.fields.StripePercentField(
                        blank=True,
                        decimal_places=2,
                        max_digits=5,
                        null=True,
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(100),
                        ],
                    ),
                ),
                ("threshold_reason", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "total",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                (
                    "webhooks_delivered_at",
                    djstripe.fields.StripeDateTimeField(null=True),
                ),
                (
                    "charge",
                    models.OneToOneField(
                        help_text="The latest charge generated for this invoice, if any.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="latest_%(class)s",
                        to="djstripe.charge",
                    ),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        help_text="The customer associated with this invoice.",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="%(class)ss",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "default_source",
                    djstripe.fields.PaymentMethodForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="invoices",
                        to="djstripe.djstripepaymentmethod",
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "ordering": ["-created"],
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
        migrations.AddField(
            model_name="charge",
            name="invoice",
            field=djstripe.fields.StripeForeignKey(
                help_text="The invoice this charge is for if one exists.",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="charges",
                to="djstripe.invoice",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.CreateModel(
            name="IssuingAuthorization",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "db_table": "djstripe_issuing_authorization",
            },
        ),
        migrations.CreateModel(
            name="IssuingCard",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "db_table": "djstripe_issuing_card",
            },
        ),
        migrations.CreateModel(
            name="IssuingCardholder",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "db_table": "djstripe_issuing_cardholder",
            },
        ),
        migrations.CreateModel(
            name="IssuingDispute",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "db_table": "djstripe_issuing_dispute",
            },
        ),
        migrations.CreateModel(
            name="IssuingTransaction",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "db_table": "djstripe_issuing_transaction",
            },
        ),
        migrations.CreateModel(
            name="PaymentIntent",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                (
                    "amount_capturable",
                    djstripe.fields.StripeQuantumCurrencyAmountField(),
                ),
                ("amount_received", djstripe.fields.StripeQuantumCurrencyAmountField()),
                (
                    "canceled_at",
                    djstripe.fields.StripeDateTimeField(
                        blank=True, default=None, null=True
                    ),
                ),
                (
                    "cancellation_reason",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        enum=djstripe.enums.PaymentIntentCancellationReason,
                        max_length=255,
                    ),
                ),
                (
                    "capture_method",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.CaptureMethod, max_length=255
                    ),
                ),
                (
                    "client_secret",
                    models.TextField(
                        help_text="The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.",
                        max_length=5000,
                    ),
                ),
                (
                    "confirmation_method",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.ConfirmationMethod, max_length=255
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "description",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="An arbitrary string attached to the object. Often useful for displaying to users.",
                        max_length=1000,
                    ),
                ),
                (
                    "last_payment_error",
                    djstripe.fields.JSONField(blank=True, null=True),
                ),
                ("next_action", djstripe.fields.JSONField(blank=True, null=True)),
                ("payment_method_types", djstripe.fields.JSONField()),
                (
                    "receipt_email",
                    models.CharField(
                        blank=True,
                        help_text="Email address that the receipt for the resulting payment will be sent to.",
                        max_length=255,
                    ),
                ),
                (
                    "setup_future_usage",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        enum=djstripe.enums.IntentUsage,
                        max_length=255,
                        null=True,
                    ),
                ),
                ("shipping", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "statement_descriptor",
                    models.CharField(
                        blank=True,
                        help_text="For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters.",
                        max_length=22,
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.PaymentIntentStatus, max_length=255
                    ),
                ),
                ("transfer_data", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "transfer_group",
                    models.CharField(
                        blank=True,
                        help_text="A string that identifies the resulting payment as part of a group. See the PaymentIntents Connect usage guide for details.",
                        max_length=255,
                    ),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        help_text="Customer this PaymentIntent is for if one exists.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "on_behalf_of",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The account (if any) for which the funds of the PaymentIntent are intended.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="payment_intents",
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="invoice",
            name="payment_intent",
            field=models.OneToOneField(
                help_text="The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice.Note that voiding an invoice will cancel the PaymentIntent",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="djstripe.paymentintent",
            ),
        ),
        migrations.AddField(
            model_name="dispute",
            name="payment_intent",
            field=djstripe.fields.StripeForeignKey(
                help_text="The PaymentIntent that was disputed",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="disputes",
                to="djstripe.paymentintent",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.AddField(
            model_name="charge",
            name="payment_intent",
            field=djstripe.fields.StripeForeignKey(
                help_text="PaymentIntent associated with this charge, if one exists.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="charges",
                to="djstripe.paymentintent",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.CreateModel(
            name="PaymentMethod",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                ("billing_details", djstripe.fields.JSONField()),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.PaymentMethodType, max_length=255
                    ),
                ),
                ("acss_debit", djstripe.fields.JSONField(blank=True, null=True)),
                ("affirm", djstripe.fields.JSONField(blank=True, null=True)),
                ("afterpay_clearpay", djstripe.fields.JSONField(blank=True, null=True)),
                ("alipay", djstripe.fields.JSONField(blank=True, null=True)),
                ("au_becs_debit", djstripe.fields.JSONField(blank=True, null=True)),
                ("bacs_debit", djstripe.fields.JSONField(blank=True, null=True)),
                ("bancontact", djstripe.fields.JSONField(blank=True, null=True)),
                ("blik", djstripe.fields.JSONField(blank=True, null=True)),
                ("boleto", djstripe.fields.JSONField(blank=True, null=True)),
                ("card", djstripe.fields.JSONField(blank=True, null=True)),
                ("card_present", djstripe.fields.JSONField(blank=True, null=True)),
                ("customer_balance", djstripe.fields.JSONField(blank=True, null=True)),
                ("eps", djstripe.fields.JSONField(blank=True, null=True)),
                ("fpx", djstripe.fields.JSONField(blank=True, null=True)),
                ("giropay", djstripe.fields.JSONField(blank=True, null=True)),
                ("grabpay", djstripe.fields.JSONField(blank=True, null=True)),
                ("ideal", djstripe.fields.JSONField(blank=True, null=True)),
                ("interac_present", djstripe.fields.JSONField(blank=True, null=True)),
                ("klarna", djstripe.fields.JSONField(blank=True, null=True)),
                ("konbini", djstripe.fields.JSONField(blank=True, null=True)),
                ("link", djstripe.fields.JSONField(blank=True, null=True)),
                ("oxxo", djstripe.fields.JSONField(blank=True, null=True)),
                ("p24", djstripe.fields.JSONField(blank=True, null=True)),
                ("paynow", djstripe.fields.JSONField(blank=True, null=True)),
                ("pix", djstripe.fields.JSONField(blank=True, null=True)),
                ("promptpay", djstripe.fields.JSONField(blank=True, null=True)),
                ("sepa_debit", djstripe.fields.JSONField(blank=True, null=True)),
                ("sofort", djstripe.fields.JSONField(blank=True, null=True)),
                ("us_bank_account", djstripe.fields.JSONField(blank=True, null=True)),
                ("wechat_pay", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="payment_methods",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="paymentintent",
            name="payment_method",
            field=djstripe.fields.StripeForeignKey(
                blank=True,
                help_text="Payment method used in this PaymentIntent.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="djstripe.paymentmethod",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.CreateModel(
            name="Mandate",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("customer_acceptance", djstripe.fields.JSONField()),
                ("payment_method_details", djstripe.fields.JSONField()),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.MandateStatus, max_length=255
                    ),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.MandateType, max_length=255
                    ),
                ),
                ("multi_use", djstripe.fields.JSONField(blank=True, null=True)),
                ("single_use", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "payment_method",
                    djstripe.fields.StripeForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.paymentmethod",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="invoice",
            name="default_payment_method",
            field=djstripe.fields.StripeForeignKey(
                blank=True,
                help_text="Default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="+",
                to="djstripe.paymentmethod",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.AddField(
            model_name="customer",
            name="default_payment_method",
            field=djstripe.fields.StripeForeignKey(
                blank=True,
                help_text="default payment method used for subscriptions and invoices for the customer.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="+",
                to="djstripe.paymentmethod",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.AddField(
            model_name="charge",
            name="payment_method",
            field=djstripe.fields.StripeForeignKey(
                help_text="PaymentMethod used in this charge.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="charges",
                to="djstripe.paymentmethod",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.CreateModel(
            name="Payout",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                ("arrival_date", djstripe.fields.StripeDateTimeField()),
                (
                    "automatic",
                    models.BooleanField(
                        help_text="`true` if the payout was created by an automated payout schedule, and `false` if it was requested manually."
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "failure_code",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.PayoutFailureCode,
                        max_length=255,
                    ),
                ),
                (
                    "failure_message",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="Message to user further explaining reason for payout failure if available.",
                    ),
                ),
                (
                    "method",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.PayoutMethod, max_length=8
                    ),
                ),
                (
                    "source_type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.PayoutSourceType, max_length=255
                    ),
                ),
                (
                    "statement_descriptor",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Extra information about a payout to be displayed on the user's bank statement.",
                        max_length=255,
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.PayoutStatus, max_length=255
                    ),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.PayoutType, max_length=255
                    ),
                ),
                (
                    "balance_transaction",
                    djstripe.fields.StripeForeignKey(
                        help_text="Balance transaction that describes the impact on your account balance.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.balancetransaction",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "destination",
                    djstripe.fields.StripeForeignKey(
                        help_text="Bank account or card the payout was sent to.",
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="djstripe.bankaccount",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "failure_balance_transaction",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="If the payout failed or was canceled, this will be the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="failure_payouts",
                        to="djstripe.balancetransaction",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "original_payout",
                    models.OneToOneField(
                        blank=True,
                        help_text="If this payout reverses another, this is the ID of the original payout.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.payout",
                    ),
                ),
                (
                    "reversed_by",
                    models.OneToOneField(
                        blank=True,
                        help_text="If this payout was reversed, this is the ID of the payout that reverses this payout.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="reversed_payout",
                        to="djstripe.payout",
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="Price",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "active",
                    models.BooleanField(
                        help_text="Whether the price can be used for new purchases."
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "nickname",
                    models.CharField(
                        blank=True,
                        help_text="A brief description of the plan, hidden from customers.",
                        max_length=250,
                    ),
                ),
                (
                    "recurring",
                    djstripe.fields.JSONField(blank=True, default=None, null=True),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.PriceType, max_length=255
                    ),
                ),
                (
                    "unit_amount",
                    djstripe.fields.StripeQuantumCurrencyAmountField(
                        blank=True, null=True
                    ),
                ),
                (
                    "unit_amount_decimal",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=12, max_digits=24, null=True
                    ),
                ),
                (
                    "billing_scheme",
                    djstripe.fields.StripeEnumField(
                        blank=True, enum=djstripe.enums.BillingScheme, max_length=255
                    ),
                ),
                (
                    "lookup_key",
                    models.CharField(
                        blank=True,
                        help_text="A lookup key used to retrieve prices dynamically from a static string.",
                        max_length=250,
                        null=True,
                    ),
                ),
                ("tiers", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "tiers_mode",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        enum=djstripe.enums.PriceTiersMode,
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "transform_quantity",
                    djstripe.fields.JSONField(blank=True, null=True),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "ordering": ["unit_amount"],
            },
        ),
        migrations.CreateModel(
            name="Product",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "name",
                    models.TextField(
                        help_text="The product's name, meant to be displayable to the customer. Applicable to both `service` and `good` types.",
                        max_length=5000,
                    ),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.ProductType, max_length=255
                    ),
                ),
                (
                    "active",
                    models.BooleanField(
                        help_text="Whether the product is currently available for purchase. Only applicable to products of `type=good`.",
                        null=True,
                    ),
                ),
                ("attributes", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "caption",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="A short one-line description of the product, meant to be displayableto the customer. Only applicable to products of `type=good`.",
                        max_length=5000,
                    ),
                ),
                ("deactivate_on", djstripe.fields.JSONField(blank=True, null=True)),
                ("images", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "package_dimensions",
                    djstripe.fields.JSONField(blank=True, null=True),
                ),
                (
                    "shippable",
                    models.BooleanField(
                        blank=True,
                        help_text="Whether this product is a shipped good. Only applicable to products of `type=good`.",
                        null=True,
                    ),
                ),
                (
                    "url",
                    models.CharField(
                        blank=True,
                        help_text="A URL of a publicly-accessible webpage for this product. Only applicable to products of `type=good`.",
                        max_length=799,
                        null=True,
                    ),
                ),
                (
                    "statement_descriptor",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only available on products of type=`service`.",
                        max_length=22,
                    ),
                ),
                ("unit_label", models.CharField(blank=True, default="", max_length=12)),
                (
                    "default_price",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The default price this product is associated with.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="products",
                        to="djstripe.price",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="price",
            name="product",
            field=djstripe.fields.StripeForeignKey(
                help_text="The product this price is associated with.",
                on_delete=django.db.models.deletion.CASCADE,
                related_name="prices",
                to="djstripe.product",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.CreateModel(
            name="Plan",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "active",
                    models.BooleanField(
                        help_text="Whether the plan can be used for new purchases."
                    ),
                ),
                (
                    "aggregate_usage",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.PlanAggregateUsage,
                        max_length=255,
                    ),
                ),
                (
                    "amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "amount_decimal",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=12, max_digits=24, null=True
                    ),
                ),
                (
                    "billing_scheme",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.BillingScheme,
                        max_length=255,
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "interval",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.PlanInterval, max_length=255
                    ),
                ),
                (
                    "interval_count",
                    models.PositiveIntegerField(
                        blank=True,
                        help_text="The number of intervals (specified in the interval property) between each subscription billing.",
                        null=True,
                    ),
                ),
                (
                    "nickname",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="A brief description of the plan, hidden from customers.",
                        max_length=5000,
                    ),
                ),
                ("tiers", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "tiers_mode",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        enum=djstripe.enums.PriceTiersMode,
                        max_length=255,
                        null=True,
                    ),
                ),
                ("transform_usage", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "trial_period_days",
                    models.IntegerField(
                        blank=True,
                        help_text="Number of trial period days granted when subscribing a customer to this plan. Null if the plan has no trial period.",
                        null=True,
                    ),
                ),
                (
                    "usage_type",
                    djstripe.fields.StripeEnumField(
                        default="licensed",
                        enum=djstripe.enums.PriceUsageType,
                        max_length=255,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "product",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The product whose pricing this plan determines.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.product",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "ordering": ["amount"],
            },
        ),
        migrations.CreateModel(
            name="PromotionCode",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="Refund",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "failure_reason",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.RefundFailureReason,
                        max_length=255,
                    ),
                ),
                (
                    "reason",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.RefundReason,
                        max_length=255,
                    ),
                ),
                (
                    "receipt_number",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The transaction number that appears on email receipts sent for this charge.",
                        max_length=64,
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        blank=True, enum=djstripe.enums.RefundStatus, max_length=255
                    ),
                ),
                (
                    "balance_transaction",
                    djstripe.fields.StripeForeignKey(
                        help_text="Balance transaction that describes the impact on your account balance.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.balancetransaction",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "charge",
                    djstripe.fields.StripeForeignKey(
                        help_text="The charge that was refunded",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="refunds",
                        to="djstripe.charge",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "failure_balance_transaction",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="failure_refunds",
                        to="djstripe.balancetransaction",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="Review",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="ScheduledQueryRun",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("data_load_time", djstripe.fields.StripeDateTimeField()),
                ("error", djstripe.fields.JSONField(blank=True, null=True)),
                ("result_available_until", djstripe.fields.StripeDateTimeField()),
                (
                    "sql",
                    models.TextField(help_text="SQL for the query.", max_length=5000),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.ScheduledQueryRunStatus, max_length=255
                    ),
                ),
                (
                    "title",
                    models.TextField(help_text="Title of the query.", max_length=5000),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "file",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The file object representing the results of the query.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.file",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="SetupIntent",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "application",
                    models.CharField(
                        blank=True,
                        help_text="ID of the Connect application that created the SetupIntent.",
                        max_length=255,
                    ),
                ),
                (
                    "cancellation_reason",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        enum=djstripe.enums.SetupIntentCancellationReason,
                        max_length=255,
                    ),
                ),
                (
                    "client_secret",
                    models.TextField(
                        blank=True,
                        help_text="The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.",
                        max_length=5000,
                    ),
                ),
                ("last_setup_error", djstripe.fields.JSONField(blank=True, null=True)),
                ("next_action", djstripe.fields.JSONField(blank=True, null=True)),
                ("payment_method_types", djstripe.fields.JSONField()),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.SetupIntentStatus, max_length=255
                    ),
                ),
                (
                    "usage",
                    djstripe.fields.StripeEnumField(
                        default="off_session",
                        enum=djstripe.enums.IntentUsage,
                        max_length=255,
                    ),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="Customer this SetupIntent belongs to, if one exists.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "on_behalf_of",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The account (if any) for which the setup is intended.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="setup_intents",
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "payment_method",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="Payment method used in this PaymentIntent.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.paymentmethod",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="Source",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "client_secret",
                    models.CharField(
                        help_text="The client secret of the source. Used for client-side retrieval using a publishable key.",
                        max_length=255,
                    ),
                ),
                (
                    "currency",
                    djstripe.fields.StripeCurrencyCodeField(
                        blank=True, default="", max_length=3
                    ),
                ),
                (
                    "flow",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.SourceFlow, max_length=255
                    ),
                ),
                ("owner", djstripe.fields.JSONField()),
                (
                    "statement_descriptor",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Extra information about a source. This will appear on your customer's statement every time you charge the source.",
                        max_length=255,
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.SourceStatus, max_length=255
                    ),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.SourceType, max_length=255
                    ),
                ),
                (
                    "usage",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.SourceUsage, max_length=255
                    ),
                ),
                ("code_verification", djstripe.fields.JSONField(blank=True, null=True)),
                ("receiver", djstripe.fields.JSONField(blank=True, null=True)),
                ("redirect", djstripe.fields.JSONField(blank=True, null=True)),
                ("source_data", djstripe.fields.JSONField()),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="sources",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="SourceTransaction",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("ach_credit_transfer", djstripe.fields.JSONField()),
                (
                    "amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                ("customer_data", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.SourceTransactionStatus, max_length=255
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "source",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.source",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="Subscription",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "application_fee_percent",
                    djstripe.fields.StripePercentField(
                        blank=True,
                        decimal_places=2,
                        max_digits=5,
                        null=True,
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(100),
                        ],
                    ),
                ),
                (
                    "billing_cycle_anchor",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "billing_thresholds",
                    djstripe.fields.JSONField(blank=True, null=True),
                ),
                (
                    "cancel_at",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "cancel_at_period_end",
                    models.BooleanField(
                        default=False,
                        help_text="If the subscription has been canceled with the ``at_period_end`` flag set to true, ``cancel_at_period_end`` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period.",
                    ),
                ),
                (
                    "canceled_at",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "collection_method",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.InvoiceCollectionMethod, max_length=255
                    ),
                ),
                ("current_period_end", djstripe.fields.StripeDateTimeField()),
                ("current_period_start", djstripe.fields.StripeDateTimeField()),
                (
                    "days_until_due",
                    models.IntegerField(
                        blank=True,
                        help_text="Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `billing=charge_automatically`.",
                        null=True,
                    ),
                ),
                ("discount", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "ended_at",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "next_pending_invoice_item_invoice",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                ("pause_collection", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "pending_invoice_item_interval",
                    djstripe.fields.JSONField(blank=True, null=True),
                ),
                ("pending_update", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "proration_behavior",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="create_prorations",
                        enum=djstripe.enums.SubscriptionProrationBehavior,
                        max_length=255,
                    ),
                ),
                (
                    "proration_date",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "quantity",
                    models.IntegerField(
                        blank=True,
                        help_text="The quantity applied to this subscription. This value will be `null` for multi-plan subscriptions",
                        null=True,
                    ),
                ),
                (
                    "start_date",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.SubscriptionStatus, max_length=255
                    ),
                ),
                (
                    "trial_end",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "trial_start",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        help_text="The customer associated with this subscription.",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="subscriptions",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "default_payment_method",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="djstripe.paymentmethod",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "default_source",
                    djstripe.fields.PaymentMethodForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="subscriptions",
                        to="djstripe.djstripepaymentmethod",
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "latest_invoice",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The most recent invoice this subscription has generated.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="djstripe.invoice",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "pending_setup_intent",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="We can use this SetupIntent to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="setup_intents",
                        to="djstripe.setupintent",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "plan",
                    models.ForeignKey(
                        blank=True,
                        help_text="The plan associated with this subscription. This value will be `null` for multi-plan subscriptions",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="subscriptions",
                        to="djstripe.plan",
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="Session",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "amount_total",
                    djstripe.fields.StripeQuantumCurrencyAmountField(
                        blank=True, null=True
                    ),
                ),
                (
                    "amount_subtotal",
                    djstripe.fields.StripeQuantumCurrencyAmountField(
                        blank=True, null=True
                    ),
                ),
                (
                    "billing_address_collection",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        enum=djstripe.enums.SessionBillingAddressCollection,
                        max_length=255,
                    ),
                ),
                (
                    "cancel_url",
                    models.TextField(
                        blank=True,
                        help_text="The URL the customer will be directed to if theydecide to cancel payment and return to your website.",
                        max_length=5000,
                    ),
                ),
                (
                    "client_reference_id",
                    models.TextField(
                        blank=True,
                        help_text="A unique string to reference the Checkout Session.This can be a customer ID, a cart ID, or similar, andcan be used to reconcile the session with your internal systems.",
                        max_length=5000,
                    ),
                ),
                (
                    "currency",
                    djstripe.fields.StripeCurrencyCodeField(
                        blank=True, max_length=3, null=True
                    ),
                ),
                (
                    "customer_email",
                    models.CharField(
                        blank=True,
                        help_text="If provided, this value will be used when the Customer object is created.",
                        max_length=255,
                    ),
                ),
                ("display_items", djstripe.fields.JSONField(blank=True, null=True)),
                ("line_items", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "locale",
                    models.CharField(
                        blank=True,
                        help_text="The IETF language tag of the locale Checkout is displayed in.If blank or auto, the browser's locale is used.",
                        max_length=255,
                    ),
                ),
                (
                    "mode",
                    djstripe.fields.StripeEnumField(
                        blank=True, enum=djstripe.enums.SessionMode, max_length=255
                    ),
                ),
                ("payment_method_types", djstripe.fields.JSONField()),
                (
                    "payment_status",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        enum=djstripe.enums.SessionPaymentStatus,
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "shipping_address_collection",
                    djstripe.fields.JSONField(blank=True, null=True),
                ),
                ("shipping_cost", djstripe.fields.JSONField(blank=True, null=True)),
                ("shipping_details", djstripe.fields.JSONField(blank=True, null=True)),
                ("shipping_options", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        enum=djstripe.enums.SessionStatus,
                        max_length=255,
                        null=True,
                    ),
                ),
                (
                    "submit_type",
                    djstripe.fields.StripeEnumField(
                        blank=True, enum=djstripe.enums.SubmitTypeStatus, max_length=255
                    ),
                ),
                (
                    "success_url",
                    models.TextField(
                        blank=True,
                        help_text="The URL the customer will be directed to after the payment or subscriptioncreation is successful.",
                        max_length=5000,
                    ),
                ),
                ("total_details", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "url",
                    models.TextField(
                        blank=True,
                        help_text="The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value is only present when the session is active.",
                        max_length=5000,
                        null=True,
                    ),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        help_text="Customer this Checkout is for if one exists.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "payment_intent",
                    djstripe.fields.StripeForeignKey(
                        help_text="PaymentIntent created if SKUs or line items were provided.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.paymentintent",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "setup_intent",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The ID of the SetupIntent for Checkout Sessions in setup mode.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.setupintent",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "subscription",
                    djstripe.fields.StripeForeignKey(
                        help_text="Subscription created if one or more plans were provided.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.subscription",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="InvoiceItem",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                ("date", djstripe.fields.StripeDateTimeField()),
                (
                    "discountable",
                    models.BooleanField(
                        default=False,
                        help_text="If True, discounts will apply to this invoice item. Always False for prorations.",
                    ),
                ),
                ("discounts", djstripe.fields.JSONField(blank=True, null=True)),
                ("period", djstripe.fields.JSONField()),
                ("period_end", djstripe.fields.StripeDateTimeField()),
                ("period_start", djstripe.fields.StripeDateTimeField()),
                (
                    "proration",
                    models.BooleanField(
                        default=False,
                        help_text="Whether or not the invoice item was created automatically as a proration adjustment when the customer switched plans.",
                    ),
                ),
                (
                    "quantity",
                    models.IntegerField(
                        blank=True,
                        help_text="If the invoice item is a proration, the quantity of the subscription for which the proration was computed.",
                        null=True,
                    ),
                ),
                (
                    "unit_amount",
                    djstripe.fields.StripeQuantumCurrencyAmountField(
                        blank=True, null=True
                    ),
                ),
                (
                    "unit_amount_decimal",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=12, max_digits=24, null=True
                    ),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        help_text="The customer associated with this invoiceitem.",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="invoiceitems",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "invoice",
                    djstripe.fields.StripeForeignKey(
                        help_text="The invoice to which this invoiceitem is attached.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="invoiceitems",
                        to="djstripe.invoice",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "plan",
                    models.ForeignKey(
                        help_text="If the invoice item is a proration, the plan of the subscription for which the proration was computed.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.plan",
                    ),
                ),
                (
                    "price",
                    models.ForeignKey(
                        help_text="If the invoice item is a proration, the price of the subscription for which the proration was computed.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="invoiceitems",
                        to="djstripe.price",
                    ),
                ),
                (
                    "subscription",
                    djstripe.fields.StripeForeignKey(
                        help_text="The subscription that this invoice item has been created for, if any.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="invoiceitems",
                        to="djstripe.subscription",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="invoice",
            name="subscription",
            field=djstripe.fields.StripeForeignKey(
                help_text="The subscription that this invoice was prepared for, if any.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="%(class)ss",
                to="djstripe.subscription",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.CreateModel(
            name="Discount",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("coupon", djstripe.fields.JSONField(blank=True, null=True)),
                ("end", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                (
                    "promotion_code",
                    models.CharField(
                        blank=True,
                        help_text="The promotion code applied to create this discount.",
                        max_length=255,
                    ),
                ),
                ("start", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The ID of the customer associated with this discount.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="customer_discounts",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "invoice",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The invoice that the discount’s coupon was applied to, if it was applied directly to a particular invoice.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="invoice_discounts",
                        to="djstripe.invoice",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "invoice_item",
                    djstripe.fields.InvoiceOrLineItemForeignKey(
                        blank=True,
                        help_text="The invoice item id (or invoice line item id for invoice line items of type=‘subscription’) that the discount’s coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.invoiceorlineitem",
                    ),
                ),
                (
                    "checkout_session",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.session",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "subscription",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The subscription that this coupon is applied to, if it is applied to a particular subscription.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="subscription_discounts",
                        to="djstripe.subscription",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="SubscriptionItem",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "billing_thresholds",
                    djstripe.fields.JSONField(blank=True, null=True),
                ),
                (
                    "proration_behavior",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="create_prorations",
                        enum=djstripe.enums.SubscriptionProrationBehavior,
                        max_length=255,
                    ),
                ),
                (
                    "proration_date",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "quantity",
                    models.PositiveIntegerField(
                        blank=True,
                        help_text="The quantity of the plan to which the customer should be subscribed.",
                        null=True,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "plan",
                    models.ForeignKey(
                        help_text="The plan the customer is subscribed to.",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="subscription_items",
                        to="djstripe.plan",
                    ),
                ),
                (
                    "price",
                    models.ForeignKey(
                        blank=True,
                        help_text="The price the customer is subscribed to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="subscription_items",
                        to="djstripe.price",
                    ),
                ),
                (
                    "subscription",
                    djstripe.fields.StripeForeignKey(
                        help_text="The subscription this subscription item belongs to.",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="items",
                        to="djstripe.subscription",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="LineItem",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                (
                    "amount_excluding_tax",
                    djstripe.fields.StripeQuantumCurrencyAmountField(),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                ("discount_amounts", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "discountable",
                    models.BooleanField(
                        default=False,
                        help_text="If True, discounts will apply to this line item. Always False for prorations.",
                    ),
                ),
                ("discounts", djstripe.fields.JSONField(blank=True, null=True)),
                ("period", djstripe.fields.JSONField()),
                ("period_end", djstripe.fields.StripeDateTimeField()),
                ("period_start", djstripe.fields.StripeDateTimeField()),
                ("price", djstripe.fields.JSONField()),
                (
                    "proration",
                    models.BooleanField(
                        default=False,
                        help_text="Whether or not the invoice item was created automatically as a proration adjustment when the customer switched plans.",
                    ),
                ),
                ("proration_details", djstripe.fields.JSONField()),
                ("tax_amounts", djstripe.fields.JSONField(blank=True, null=True)),
                ("tax_rates", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.LineItem, max_length=255
                    ),
                ),
                (
                    "unit_amount_excluding_tax",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "quantity",
                    models.IntegerField(
                        blank=True,
                        help_text="The quantity of the subscription, if the line item is a subscription or a proration.",
                        null=True,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "invoice_item",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The ID of the invoice item associated with this line item if any.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.invoiceitem",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "subscription",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The subscription that the invoice item pertains to, if any.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.subscription",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "subscription_item",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.subscriptionitem",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="SubscriptionSchedule",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "canceled_at",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "completed_at",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                ("current_phase", djstripe.fields.JSONField(blank=True, null=True)),
                ("default_settings", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "end_behavior",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.SubscriptionScheduleEndBehavior,
                        max_length=255,
                    ),
                ),
                ("phases", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "released_at",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.SubscriptionScheduleStatus, max_length=255
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        help_text="The customer who owns the subscription schedule.",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="schedules",
                        to="djstripe.customer",
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "released_subscription",
                    models.ForeignKey(
                        blank=True,
                        help_text="The subscription once managed by this subscription schedule (if it is released).",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="released_schedules",
                        to="djstripe.subscription",
                    ),
                ),
                (
                    "subscription",
                    models.ForeignKey(
                        blank=True,
                        help_text="ID of the subscription managed by the subscription schedule.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="subscriptions",
                        to="djstripe.subscription",
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="subscription",
            name="schedule",
            field=models.ForeignKey(
                blank=True,
                help_text="The schedule associated with this subscription.",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="subscriptions",
                to="djstripe.subscriptionschedule",
            ),
        ),
        migrations.CreateModel(
            name="TaxCode",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="A short name for the tax code.", max_length=128
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "verbose_name": "Tax Code",
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="ShippingRate",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "active",
                    models.BooleanField(
                        default=True,
                        help_text="Whether the shipping rate can be used for new purchases. Defaults to true",
                    ),
                ),
                (
                    "display_name",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.",
                        max_length=50,
                    ),
                ),
                ("fixed_amount", djstripe.fields.JSONField()),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        default="fixed_amount",
                        enum=djstripe.enums.ShippingRateType,
                        max_length=255,
                    ),
                ),
                ("delivery_estimate", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "tax_behavior",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.ShippingRateTaxBehavior, max_length=255
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "tax_code",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The shipping tax code",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.taxcode",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "verbose_name": "Shipping Rate",
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="TaxId",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                (
                    "country",
                    models.CharField(
                        help_text="Two-letter ISO code representing the country of the tax ID.",
                        max_length=2,
                    ),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.TaxIdType, max_length=255
                    ),
                ),
                (
                    "value",
                    models.CharField(help_text="Value of the tax ID.", max_length=50),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tax_ids",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "verbose_name": "Tax ID",
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="TaxRate",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "active",
                    models.BooleanField(
                        default=True,
                        help_text="Defaults to true. When set to false, this tax rate cannot be applied to objects in the API, but will still be applied to subscriptions and invoices that already have it set.",
                    ),
                ),
                (
                    "country",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Two-letter country code.",
                        max_length=2,
                    ),
                ),
                (
                    "display_name",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.",
                        max_length=50,
                    ),
                ),
                (
                    "inclusive",
                    models.BooleanField(
                        help_text="This specifies if the tax rate is inclusive or exclusive."
                    ),
                ),
                (
                    "jurisdiction",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The jurisdiction for the tax rate.",
                        max_length=50,
                    ),
                ),
                (
                    "percentage",
                    djstripe.fields.StripePercentField(
                        decimal_places=4,
                        max_digits=7,
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(100),
                        ],
                    ),
                ),
                (
                    "state",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="ISO 3166-2 subdivision code, without country prefix.",
                        max_length=2,
                    ),
                ),
                (
                    "tax_type",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The high-level tax type, such as vat, gst, sales_tax or custom.",
                        max_length=50,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "verbose_name": "Tax Rate",
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
        migrations.AddField(
            model_name="subscriptionitem",
            name="tax_rates",
            field=models.ManyToManyField(
                blank=True,
                db_table="djstripe_djstripesubscriptionitemtaxrate",
                help_text="The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item.",
                related_name="+",
                to="djstripe.taxrate",
            ),
        ),
        migrations.AddField(
            model_name="subscription",
            name="default_tax_rates",
            field=models.ManyToManyField(
                blank=True,
                db_table="djstripe_djstripesubscriptiondefaulttaxrate",
                help_text="The tax rates that will apply to any subscription item that does not have tax_rates set. Invoices created will have their default_tax_rates populated from the subscription.",
                related_name="+",
                to="djstripe.taxrate",
            ),
        ),
        migrations.AddField(
            model_name="invoiceitem",
            name="tax_rates",
            field=models.ManyToManyField(
                blank=True,
                db_table="djstripe_djstripeinvoiceitemtaxrate",
                help_text="The tax rates which apply to this invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item.",
                related_name="+",
                to="djstripe.taxrate",
            ),
        ),
        migrations.AddField(
            model_name="invoice",
            name="default_tax_rates",
            field=models.ManyToManyField(
                blank=True,
                db_table="djstripe_djstripeinvoicedefaulttaxrate",
                help_text="The tax rates applied to this invoice, if any.",
                related_name="+",
                to="djstripe.taxrate",
            ),
        ),
        migrations.CreateModel(
            name="Transfer",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                (
                    "amount_reversed",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "destination",
                    djstripe.fields.StripeIdField(max_length=255, null=True),
                ),
                (
                    "destination_payment",
                    djstripe.fields.StripeIdField(
                        blank=True, max_length=255, null=True
                    ),
                ),
                (
                    "reversed",
                    models.BooleanField(
                        default=False,
                        help_text="Whether or not the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.",
                    ),
                ),
                (
                    "source_transaction",
                    djstripe.fields.StripeIdField(max_length=255, null=True),
                ),
                (
                    "source_type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.LegacySourceType, max_length=255
                    ),
                ),
                (
                    "transfer_group",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="A string that identifies this transaction as part of a group.",
                        max_length=255,
                    ),
                ),
                (
                    "balance_transaction",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="Balance transaction that describes the impact on your account balance.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.balancetransaction",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.AddField(
            model_name="charge",
            name="source_transfer",
            field=djstripe.fields.StripeForeignKey(
                blank=True,
                help_text="The transfer which created this charge. Only present if the charge came from another Stripe account.",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="djstripe.transfer",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.AddField(
            model_name="charge",
            name="transfer",
            field=djstripe.fields.StripeForeignKey(
                blank=True,
                help_text="The transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="djstripe.transfer",
                to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
            ),
        ),
        migrations.CreateModel(
            name="TransferReversal",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                (
                    "balance_transaction",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="Balance transaction that describes the impact on your account balance.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="transfer_reversals",
                        to="djstripe.balancetransaction",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "transfer",
                    djstripe.fields.StripeForeignKey(
                        help_text="The transfer that was reversed.",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="reversals",
                        to="djstripe.transfer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="UpcomingInvoice",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "account_country",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The country of the business associated with this invoice, most often the business creating the invoice.",
                        max_length=2,
                    ),
                ),
                (
                    "account_name",
                    models.TextField(
                        blank=True,
                        help_text="The public name of the business associated with this invoice, most often the business creating the invoice.",
                        max_length=5000,
                    ),
                ),
                (
                    "amount_due",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                (
                    "amount_paid",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "amount_remaining",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "application_fee_amount",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "attempt_count",
                    models.IntegerField(
                        help_text="Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule."
                    ),
                ),
                (
                    "attempted",
                    models.BooleanField(
                        default=False,
                        help_text="Whether or not an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the ``invoice.created`` webhook, for example, so you might not want to display that invoice as unpaid to your users.",
                    ),
                ),
                (
                    "auto_advance",
                    models.BooleanField(
                        help_text="Controls whether Stripe will perform automatic collection of the invoice. When false, the invoice's state will not automatically advance without an explicit action.",
                        null=True,
                    ),
                ),
                (
                    "billing_reason",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.InvoiceBillingReason,
                        max_length=255,
                    ),
                ),
                (
                    "collection_method",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.InvoiceCollectionMethod,
                        max_length=255,
                        null=True,
                    ),
                ),
                ("currency", djstripe.fields.StripeCurrencyCodeField(max_length=3)),
                ("customer_address", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "customer_email",
                    models.TextField(
                        blank=True,
                        help_text="The customer's email. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.",
                        max_length=5000,
                    ),
                ),
                (
                    "customer_name",
                    models.TextField(
                        blank=True,
                        help_text="The customer's name. Until the invoice is finalized, this field will equal customer.name. Once the invoice is finalized, this field will no longer be updated.",
                        max_length=5000,
                    ),
                ),
                (
                    "customer_phone",
                    models.TextField(
                        blank=True,
                        help_text="The customer's phone number. Until the invoice is finalized, this field will equal customer.phone. Once the invoice is finalized, this field will no longer be updated.",
                        max_length=5000,
                    ),
                ),
                ("customer_shipping", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "customer_tax_exempt",
                    djstripe.fields.StripeEnumField(
                        default="",
                        enum=djstripe.enums.CustomerTaxExempt,
                        max_length=255,
                    ),
                ),
                ("discount", djstripe.fields.JSONField(blank=True, null=True)),
                ("discounts", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "due_date",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "ending_balance",
                    djstripe.fields.StripeQuantumCurrencyAmountField(null=True),
                ),
                (
                    "footer",
                    models.TextField(
                        blank=True,
                        help_text="Footer displayed on the invoice.",
                        max_length=5000,
                    ),
                ),
                (
                    "hosted_invoice_url",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been frozen yet, this will be null.",
                        max_length=799,
                    ),
                ),
                (
                    "invoice_pdf",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="The link to download the PDF for the invoice. If the invoice has not been frozen yet, this will be null.",
                        max_length=799,
                    ),
                ),
                (
                    "next_payment_attempt",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "number",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.",
                        max_length=64,
                    ),
                ),
                (
                    "paid",
                    models.BooleanField(
                        default=False,
                        help_text="Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.",
                    ),
                ),
                ("period_end", djstripe.fields.StripeDateTimeField()),
                ("period_start", djstripe.fields.StripeDateTimeField()),
                (
                    "post_payment_credit_notes_amount",
                    djstripe.fields.StripeQuantumCurrencyAmountField(
                        blank=True, null=True
                    ),
                ),
                (
                    "pre_payment_credit_notes_amount",
                    djstripe.fields.StripeQuantumCurrencyAmountField(
                        blank=True, null=True
                    ),
                ),
                (
                    "receipt_number",
                    models.CharField(
                        blank=True,
                        help_text="This is the transaction number that appears on email receipts sent for this invoice.",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "starting_balance",
                    djstripe.fields.StripeQuantumCurrencyAmountField(),
                ),
                (
                    "statement_descriptor",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="An arbitrary string to be displayed on your customer's credit card statement. The statement description may not include <>\"' characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. While most banks display this information consistently, some may display it incorrectly or not at all.",
                        max_length=22,
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        blank=True,
                        default="",
                        enum=djstripe.enums.InvoiceStatus,
                        max_length=255,
                    ),
                ),
                (
                    "status_transitions",
                    djstripe.fields.JSONField(blank=True, null=True),
                ),
                (
                    "subscription_proration_date",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "subtotal",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                (
                    "tax",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        blank=True, decimal_places=2, max_digits=14, null=True
                    ),
                ),
                (
                    "tax_percent",
                    djstripe.fields.StripePercentField(
                        blank=True,
                        decimal_places=2,
                        max_digits=5,
                        null=True,
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(100),
                        ],
                    ),
                ),
                ("threshold_reason", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "total",
                    djstripe.fields.StripeDecimalCurrencyAmountField(
                        decimal_places=2, max_digits=14
                    ),
                ),
                (
                    "webhooks_delivered_at",
                    djstripe.fields.StripeDateTimeField(null=True),
                ),
                (
                    "charge",
                    models.OneToOneField(
                        help_text="The latest charge generated for this invoice, if any.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="latest_%(class)s",
                        to="djstripe.charge",
                    ),
                ),
                (
                    "customer",
                    djstripe.fields.StripeForeignKey(
                        help_text="The customer associated with this invoice.",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="%(class)ss",
                        to="djstripe.customer",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "default_payment_method",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="Default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="djstripe.paymentmethod",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "default_source",
                    djstripe.fields.PaymentMethodForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="upcoming_invoices",
                        to="djstripe.djstripepaymentmethod",
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "payment_intent",
                    models.OneToOneField(
                        help_text="The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice.Note that voiding an invoice will cancel the PaymentIntent",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.paymentintent",
                    ),
                ),
                (
                    "subscription",
                    djstripe.fields.StripeForeignKey(
                        help_text="The subscription that this invoice was prepared for, if any.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="%(class)ss",
                        to="djstripe.subscription",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={
                "ordering": ["-created"],
                "get_latest_by": "created",
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="UsageRecord",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                (
                    "quantity",
                    models.PositiveIntegerField(
                        help_text="The quantity of the plan to which the customer should be subscribed."
                    ),
                ),
                (
                    "timestamp",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "action",
                    djstripe.fields.StripeEnumField(
                        default="increment",
                        enum=djstripe.enums.UsageAction,
                        max_length=255,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "subscription_item",
                    djstripe.fields.StripeForeignKey(
                        help_text="The subscription item this usage record contains data for.",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="usage_records",
                        to="djstripe.subscriptionitem",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="UsageRecordSummary",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("period", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "period_end",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "period_start",
                    djstripe.fields.StripeDateTimeField(blank=True, null=True),
                ),
                (
                    "total_usage",
                    models.PositiveIntegerField(
                        help_text="The quantity of the plan to which the customer should be subscribed."
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "invoice",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="usage_record_summaries",
                        to="djstripe.invoice",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "subscription_item",
                    djstripe.fields.StripeForeignKey(
                        help_text="The subscription item this usage record contains data for.",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="usage_record_summaries",
                        to="djstripe.subscriptionitem",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="VerificationReport",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("document", djstripe.fields.JSONField(blank=True, null=True)),
                ("id_number", djstripe.fields.JSONField(blank=True, null=True)),
                ("options", djstripe.fields.JSONField(blank=True, null=True)),
                ("selfie", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.VerificationType, max_length=255
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="VerificationSession",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                ("last_error", djstripe.fields.JSONField(blank=True, null=True)),
                ("redaction", djstripe.fields.JSONField(blank=True, null=True)),
                ("verified_outputs", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.VerificationSessionStatus, max_length=255
                    ),
                ),
                (
                    "type",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.VerificationType, max_length=255
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "last_verification_report",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.verificationreport",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="WebhookEndpoint",
            fields=[
                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
                ("djstripe_updated", models.DateTimeField(auto_now=True)),
                ("stripe_data", djstripe.fields.JSONField(default=dict)),
                (
                    "djstripe_id",
                    models.BigAutoField(
                        primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
                (
                    "livemode",
                    models.BooleanField(
                        blank=True,
                        default=None,
                        help_text="Null here indicates that the livemode status is unknown or was previously unrecorded. Otherwise, this field indicates whether this record comes from Stripe test mode or live mode operation.",
                        null=True,
                    ),
                ),
                ("created", djstripe.fields.StripeDateTimeField(blank=True, null=True)),
                ("metadata", djstripe.fields.JSONField(blank=True, null=True)),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="A description of this object.", null=True
                    ),
                ),
                (
                    "api_version",
                    models.CharField(
                        blank=True,
                        help_text="The API version events are rendered as for this webhook endpoint. Defaults to the configured Stripe API Version.",
                        max_length=64,
                    ),
                ),
                ("enabled_events", djstripe.fields.JSONField()),
                (
                    "secret",
                    models.CharField(
                        blank=True,
                        editable=False,
                        help_text="The endpoint's secret, used to generate webhook signatures.",
                        max_length=256,
                    ),
                ),
                (
                    "status",
                    djstripe.fields.StripeEnumField(
                        enum=djstripe.enums.WebhookEndpointStatus, max_length=255
                    ),
                ),
                (
                    "url",
                    models.URLField(
                        help_text="The URL of the webhook endpoint.", max_length=2048
                    ),
                ),
                (
                    "application",
                    models.CharField(
                        blank=True,
                        help_text="The ID of the associated Connect application.",
                        max_length=255,
                    ),
                ),
                (
                    "djstripe_uuid",
                    models.UUIDField(
                        default=uuid.uuid4,
                        help_text="A UUID specific to dj-stripe generated for the endpoint",
                        unique=True,
                    ),
                ),
                (
                    "djstripe_tolerance",
                    models.PositiveSmallIntegerField(
                        default=300,
                        help_text="Controls the milliseconds tolerance which wards against replay attacks. Leave this to its default value unless you know what you're doing.",
                    ),
                ),
                (
                    "djstripe_validation_method",
                    djstripe.fields.StripeEnumField(
                        default="verify_signature",
                        enum=djstripe.enums.WebhookEndpointValidation,
                        max_length=255,
                    ),
                ),
                (
                    "djstripe_owner_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"get_latest_by": "created", "abstract": False},
        ),
        migrations.CreateModel(
            name="WebhookEventTrigger",
            fields=[
                ("id", models.BigAutoField(primary_key=True, serialize=False)),
                (
                    "remote_ip",
                    models.GenericIPAddressField(
                        help_text="IP address of the request client."
                    ),
                ),
                ("headers", djstripe.fields.JSONField()),
                ("body", models.TextField(blank=True)),
                (
                    "valid",
                    models.BooleanField(
                        default=False,
                        help_text="Whether or not the webhook event has passed validation",
                    ),
                ),
                (
                    "processed",
                    models.BooleanField(
                        default=False,
                        help_text="Whether or not the webhook event has been successfully processed",
                    ),
                ),
                ("exception", models.CharField(blank=True, max_length=128)),
                (
                    "traceback",
                    models.TextField(
                        blank=True,
                        help_text="Traceback if an exception was thrown during processing",
                    ),
                ),
                (
                    "djstripe_version",
                    models.CharField(
                        default=djstripe.models.webhooks._get_version,
                        help_text="The version of dj-stripe when the webhook was received",
                        max_length=32,
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("updated", models.DateTimeField(auto_now=True)),
                (
                    "event",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="Event object contained in the (valid) Webhook",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.event",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "stripe_trigger_account",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The Stripe Account this object belongs to.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.account",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "webhook_endpoint",
                    djstripe.fields.StripeForeignKey(
                        blank=True,
                        help_text="The endpoint this webhook was received on",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="djstripe.webhookendpoint",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="DjstripeInvoiceTotalTaxAmount",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                (
                    "inclusive",
                    models.BooleanField(
                        help_text="Whether this tax amount is inclusive or exclusive."
                    ),
                ),
                (
                    "invoice",
                    djstripe.fields.StripeForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="total_tax_amounts",
                        to="djstripe.invoice",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "tax_rate",
                    djstripe.fields.StripeForeignKey(
                        help_text="The tax rate that was applied to get this tax amount.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.taxrate",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
            ],
            options={"unique_together": {("invoice", "tax_rate")}},
        ),
        migrations.CreateModel(
            name="DjstripeUpcomingInvoiceTotalTaxAmount",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("amount", djstripe.fields.StripeQuantumCurrencyAmountField()),
                (
                    "inclusive",
                    models.BooleanField(
                        help_text="Whether this tax amount is inclusive or exclusive."
                    ),
                ),
                (
                    "tax_rate",
                    djstripe.fields.StripeForeignKey(
                        help_text="The tax rate that was applied to get this tax amount.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="djstripe.taxrate",
                        to_field=settings.DJSTRIPE_FOREIGN_KEY_TO_FIELD,
                    ),
                ),
                (
                    "invoice",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="djstripe.upcominginvoice",
                    ),
                ),
            ],
            options={"unique_together": {("invoice", "tax_rate")}},
        ),
    ]
