<NME> 0005_2_2.py
<BEF> ADDFILE
<MSG> Squash 2.2.0dev migrations

<DFF> @@ -0,0 +1,1012 @@
+# Generated by Django 3.0.2 on 2020-01-09 05:34
+
+import django.core.validators
+import django.db.models.deletion
+from django.db import migrations, models
+
+import djstripe.enums
+import djstripe.fields
+
+
+class Migration(migrations.Migration):
+
+    replaces = [
+        ("djstripe", "0005_auto_20191002_1012"),
+        ("djstripe", "0006_auto_20191005_0907"),
+        ("djstripe", "0007_auto_20191107_0118"),
+        ("djstripe", "0008_auto_20191212_1434"),
+        ("djstripe", "0009_delete_upcominginvoice"),
+        ("djstripe", "0010_upcominginvoice"),
+        ("djstripe", "0011_auto_20191214_0453"),
+    ]
+
+    dependencies = [
+        ("djstripe", "0004_2_1"),
+    ]
+
+    operations = [
+        migrations.RemoveField(model_name="account", name="business_name",),
+        migrations.RemoveField(model_name="account", name="business_primary_color",),
+        migrations.RemoveField(model_name="account", name="business_url",),
+        migrations.RemoveField(model_name="account", name="debit_negative_balances",),
+        migrations.RemoveField(model_name="account", name="decline_charge_on",),
+        migrations.RemoveField(model_name="account", name="display_name",),
+        migrations.RemoveField(model_name="account", name="legal_entity",),
+        migrations.RemoveField(model_name="account", name="payout_schedule",),
+        migrations.RemoveField(
+            model_name="account", name="payout_statement_descriptor",
+        ),
+        migrations.RemoveField(model_name="account", name="statement_descriptor",),
+        migrations.RemoveField(model_name="account", name="support_email",),
+        migrations.RemoveField(model_name="account", name="support_phone",),
+        migrations.RemoveField(model_name="account", name="support_url",),
+        migrations.RemoveField(model_name="account", name="timezone",),
+        migrations.RemoveField(model_name="account", name="verification",),
+        migrations.RenameField(
+            model_name="invoice", old_name="billing", new_name="collection_method",
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="account_country",
+            field=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,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="account_name",
+            field=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,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="billing_reason",
+            field=djstripe.fields.StripeEnumField(
+                blank=True,
+                default="",
+                enum=djstripe.enums.InvoiceBillingReason,
+                help_text="Indicates the reason why the invoice was created. subscription_cycle indicates an invoice created by a subscription advancing into a new period. subscription_create indicates an invoice created due to creating a subscription. subscription_update indicates an invoice created due to updating a subscription. subscription is set for all old invoices to indicate either a change to a subscription or a period advancement. manual is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The upcoming value is reserved for simulated invoices per the upcoming invoice endpoint. subscription_threshold indicates an invoice created due to a billing threshold being reached.",
+                max_length=22,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="customer_address",
+            field=djstripe.fields.JSONField(
+                blank=True,
+                help_text="The customer’s address. Until the invoice is finalized, this field will equal customer.address. Once the invoice is finalized, this field will no longer be updated.",
+                null=True,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="customer_email",
+            field=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,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="customer_name",
+            field=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,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="customer_phone",
+            field=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,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="customer_shipping",
+            field=djstripe.fields.JSONField(
+                blank=True,
+                help_text="The customer’s shipping information. Until the invoice is finalized, this field will equal customer.shipping. Once the invoice is finalized, this field will no longer be updated.",
+                null=True,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="customer_tax_exempt",
+            field=djstripe.fields.StripeEnumField(
+                default="",
+                enum=djstripe.enums.CustomerTaxExempt,
+                help_text="The customer’s tax exempt status. Until the invoice is finalized, this field will equal customer.tax_exempt. Once the invoice is finalized, this field will no longer be updated.",
+                max_length=7,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="default_payment_method",
+            field=models.ForeignKey(
+                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",
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="footer",
+            field=models.TextField(
+                blank=True,
+                help_text="Footer displayed on the invoice.",
+                max_length=5000,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="post_payment_credit_notes_amount",
+            field=djstripe.fields.StripeQuantumCurrencyAmountField(
+                blank=True,
+                help_text="Total amount (in cents) of all post-payment credit notes issued for this invoice.",
+                null=True,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="pre_payment_credit_notes_amount",
+            field=djstripe.fields.StripeQuantumCurrencyAmountField(
+                blank=True,
+                help_text="Total amount (in cents) of all pre-payment credit notes issued for this invoice.",
+                null=True,
+            ),
+        ),
+        migrations.AddField(
+            model_name="invoice",
+            name="threshold_reason",
+            field=djstripe.fields.JSONField(
+                blank=True,
+                help_text="If billing_reason is set to subscription_threshold this returns more information on which threshold rules triggered the invoice.",
+                null=True,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="charge",
+            name="amount",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                decimal_places=2,
+                help_text="Amount charged (as decimal).",
+                max_digits=11,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="charge",
+            name="amount_refunded",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                decimal_places=2,
+                help_text="Amount (as decimal) refunded (can be less than the amount attribute on the charge if a partial refund was issued).",
+                max_digits=11,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="coupon",
+            name="amount_off",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                blank=True,
+                decimal_places=2,
+                help_text="Amount (as decimal) that will be taken off the subtotal of any invoices for this customer.",
+                max_digits=11,
+                null=True,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="invoice",
+            name="amount_due",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                decimal_places=2,
+                help_text="Final amount due (as decimal) at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. If there is a positive starting_balance for the invoice (the customer owes money), the amount_due will also take that into account. The charge that gets generated for the invoice will be for the amount specified in amount_due.",
+                max_digits=11,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="invoice",
+            name="amount_paid",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                decimal_places=2,
+                help_text="The amount, (as decimal), that was paid.",
+                max_digits=11,
+                null=True,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="invoice",
+            name="amount_remaining",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                decimal_places=2,
+                help_text="The amount remaining, (as decimal), that is due.",
+                max_digits=11,
+                null=True,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="invoice",
+            name="application_fee_amount",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                blank=True,
+                decimal_places=2,
+                help_text="The fee (as decimal) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.",
+                max_digits=11,
+                null=True,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="invoice",
+            name="subtotal",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                decimal_places=2,
+                help_text="Total (as decimal) of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied.",
+                max_digits=11,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="invoice",
+            name="tax",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                blank=True,
+                decimal_places=2,
+                help_text="The amount (as decimal) of tax included in the total, calculated from ``tax_percent`` and the subtotal. If no ``tax_percent`` is defined, this value will be null.",
+                max_digits=11,
+                null=True,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="invoice",
+            name="total",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                decimal_places=2,
+                max_digits=11,
+                verbose_name="Total (as decimal) after discount.",
+            ),
+        ),
+        migrations.AlterField(
+            model_name="invoiceitem",
+            name="amount",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                decimal_places=2,
+                help_text="Amount invoiced (as decimal).",
+                max_digits=11,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="payout",
+            name="amount",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                decimal_places=2,
+                help_text="Amount (as decimal) to be transferred to your bank account or debit card.",
+                max_digits=11,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="plan",
+            name="amount",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                blank=True,
+                decimal_places=2,
+                help_text="Amount (as decimal) to be charged on the interval specified.",
+                max_digits=11,
+                null=True,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="source",
+            name="amount",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                blank=True,
+                decimal_places=2,
+                help_text="Amount (as decimal) associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources.",
+                max_digits=11,
+                null=True,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="transfer",
+            name="amount",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                decimal_places=2, help_text="The amount transferred", max_digits=11
+            ),
+        ),
+        migrations.AlterField(
+            model_name="transfer",
+            name="amount_reversed",
+            field=djstripe.fields.StripeDecimalCurrencyAmountField(
+                blank=True,
+                decimal_places=2,
+                help_text="The amount (as decimal) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).",
+                max_digits=11,
+                null=True,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="refund",
+            name="reason",
+            field=djstripe.fields.StripeEnumField(
+                blank=True,
+                default="",
+                enum=djstripe.enums.RefundReason,
+                help_text="Reason for the refund.",
+                max_length=25,
+            ),
+        ),
+        migrations.AlterField(
+            model_name="refund",
+            name="status",
+            field=djstripe.fields.StripeEnumField(
+                blank=True,
+                enum=djstripe.enums.RefundStatus,
+                help_text="Status of the refund.",
+                max_length=9,
+            ),
+        ),
+        migrations.DeleteModel(name="UpcomingInvoice",),
+        migrations.CreateModel(
+            name="UpcomingInvoice",
+            fields=[
+                (
+                    "djstripe_id",
+                    models.BigAutoField(
+                        primary_key=True, serialize=False, verbose_name="ID"
+                    ),
+                ),
+                (
+                    "livemode",
+                    models.NullBooleanField(
+                        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.",
+                    ),
+                ),
+                (
+                    "created",
+                    djstripe.fields.StripeDateTimeField(
+                        blank=True,
+                        help_text="The datetime this object was created in stripe.",
+                        null=True,
+                    ),
+                ),
+                (
+                    "metadata",
+                    djstripe.fields.JSONField(
+                        blank=True,
+                        help_text="A set of key/value pairs that you can attach to an object. It can be useful for storing additional information about an object in a structured format.",
+                        null=True,
+                    ),
+                ),
+                (
+                    "description",
+                    models.TextField(
+                        blank=True, help_text="A description of this object.", null=True
+                    ),
+                ),
+                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
+                ("djstripe_updated", models.DateTimeField(auto_now=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,
+                        help_text="Final amount due (as decimal) at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. If there is a positive starting_balance for the invoice (the customer owes money), the amount_due will also take that into account. The charge that gets generated for the invoice will be for the amount specified in amount_due.",
+                        max_digits=11,
+                    ),
+                ),
+                (
+                    "amount_paid",
+                    djstripe.fields.StripeDecimalCurrencyAmountField(
+                        decimal_places=2,
+                        help_text="The amount, (as decimal), that was paid.",
+                        max_digits=11,
+                        null=True,
+                    ),
+                ),
+                (
+                    "amount_remaining",
+                    djstripe.fields.StripeDecimalCurrencyAmountField(
+                        decimal_places=2,
+                        help_text="The amount remaining, (as decimal), that is due.",
+                        max_digits=11,
+                        null=True,
+                    ),
+                ),
+                (
+                    "application_fee_amount",
+                    djstripe.fields.StripeDecimalCurrencyAmountField(
+                        blank=True,
+                        decimal_places=2,
+                        help_text="The fee (as decimal) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.",
+                        max_digits=11,
+                        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.NullBooleanField(
+                        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."
+                    ),
+                ),
+                (
+                    "billing_reason",
+                    djstripe.fields.StripeEnumField(
+                        blank=True,
+                        default="",
+                        enum=djstripe.enums.InvoiceBillingReason,
+                        help_text="Indicates the reason why the invoice was created. subscription_cycle indicates an invoice created by a subscription advancing into a new period. subscription_create indicates an invoice created due to creating a subscription. subscription_update indicates an invoice created due to updating a subscription. subscription is set for all old invoices to indicate either a change to a subscription or a period advancement. manual is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The upcoming value is reserved for simulated invoices per the upcoming invoice endpoint. subscription_threshold indicates an invoice created due to a billing threshold being reached.",
+                        max_length=22,
+                    ),
+                ),
+                (
+                    "closed",
+                    models.NullBooleanField(
+                        default=False,
+                        help_text="Whether or not the invoice is still trying to collect payment. An invoice is closed if it's either paid or it has been marked closed. A closed invoice will no longer attempt to collect payment.",
+                    ),
+                ),
+                (
+                    "collection_method",
+                    djstripe.fields.StripeEnumField(
+                        enum=djstripe.enums.InvoiceCollectionMethod,
+                        help_text="When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.",
+                        max_length=20,
+                        null=True,
+                    ),
+                ),
+                (
+                    "currency",
+                    djstripe.fields.StripeCurrencyCodeField(
+                        help_text="Three-letter ISO currency code", max_length=3
+                    ),
+                ),
+                (
+                    "customer_address",
+                    djstripe.fields.JSONField(
+                        blank=True,
+                        help_text="The customer’s address. Until the invoice is finalized, this field will equal customer.address. Once the invoice is finalized, this field will no longer be updated.",
+                        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,
+                        help_text="The customer’s shipping information. Until the invoice is finalized, this field will equal customer.shipping. Once the invoice is finalized, this field will no longer be updated.",
+                        null=True,
+                    ),
+                ),
+                (
+                    "customer_tax_exempt",
+                    djstripe.fields.StripeEnumField(
+                        default="",
+                        enum=djstripe.enums.CustomerTaxExempt,
+                        help_text="The customer’s tax exempt status. Until the invoice is finalized, this field will equal customer.tax_exempt. Once the invoice is finalized, this field will no longer be updated.",
+                        max_length=7,
+                    ),
+                ),
+                (
+                    "due_date",
+                    djstripe.fields.StripeDateTimeField(
+                        blank=True,
+                        help_text="The date on which payment for this invoice is due. This value will be null for invoices where billing=charge_automatically.",
+                        null=True,
+                    ),
+                ),
+                (
+                    "ending_balance",
+                    djstripe.fields.StripeQuantumCurrencyAmountField(
+                        help_text="Ending customer balance (in cents) after attempting to pay invoice. If the invoice has not been attempted yet, this will be null.",
+                        null=True,
+                    ),
+                ),
+                (
+                    "footer",
+                    models.TextField(
+                        blank=True,
+                        help_text="Footer displayed on the invoice.",
+                        max_length=5000,
+                    ),
+                ),
+                (
+                    "forgiven",
+                    models.NullBooleanField(
+                        default=False,
+                        help_text="Whether or not the invoice has been forgiven. Forgiving an invoice instructs us to update the subscription status as if the invoice were successfully paid. Once an invoice has been forgiven, it cannot be unforgiven or reopened.",
+                    ),
+                ),
+                (
+                    "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,
+                        help_text="The time at which payment will next be attempted.",
+                        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="The time at which payment will next be attempted.",
+                    ),
+                ),
+                (
+                    "period_end",
+                    djstripe.fields.StripeDateTimeField(
+                        help_text="End of the usage period during which invoice items were added to this invoice."
+                    ),
+                ),
+                (
+                    "period_start",
+                    djstripe.fields.StripeDateTimeField(
+                        help_text="Start of the usage period during which invoice items were added to this invoice."
+                    ),
+                ),
+                (
+                    "post_payment_credit_notes_amount",
+                    djstripe.fields.StripeQuantumCurrencyAmountField(
+                        blank=True,
+                        help_text="Total amount (in cents) of all post-payment credit notes issued for this invoice.",
+                        null=True,
+                    ),
+                ),
+                (
+                    "pre_payment_credit_notes_amount",
+                    djstripe.fields.StripeQuantumCurrencyAmountField(
+                        blank=True,
+                        help_text="Total amount (in cents) of all pre-payment credit notes issued for this invoice.",
+                        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(
+                        help_text="Starting customer balance (in cents) before attempting to pay invoice. If the invoice has not been attempted yet, this will be the current customer balance."
+                    ),
+                ),
+                (
+                    "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_transitions",
+                    djstripe.fields.JSONField(blank=True, null=True),
+                ),
+                (
+                    "subscription_proration_date",
+                    djstripe.fields.StripeDateTimeField(
+                        blank=True,
+                        help_text="Only set for upcoming invoices that preview prorations. The time used to calculate prorations.",
+                        null=True,
+                    ),
+                ),
+                (
+                    "subtotal",
+                    djstripe.fields.StripeDecimalCurrencyAmountField(
+                        decimal_places=2,
+                        help_text="Total (as decimal) of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied.",
+                        max_digits=11,
+                    ),
+                ),
+                (
+                    "tax",
+                    djstripe.fields.StripeDecimalCurrencyAmountField(
+                        blank=True,
+                        decimal_places=2,
+                        help_text="The amount (as decimal) of tax included in the total, calculated from ``tax_percent`` and the subtotal. If no ``tax_percent`` is defined, this value will be null.",
+                        max_digits=11,
+                        null=True,
+                    ),
+                ),
+                (
+                    "tax_percent",
+                    djstripe.fields.StripePercentField(
+                        blank=True,
+                        decimal_places=2,
+                        help_text="This percentage of the subtotal has been added to the total amount of the invoice, including invoice line items and discounts. This field is inherited from the subscription's ``tax_percent`` field, but can be changed before the invoice is paid. This field defaults to null.",
+                        max_digits=5,
+                        null=True,
+                        validators=[
+                            django.core.validators.MinValueValidator(1),
+                            django.core.validators.MaxValueValidator(100),
+                        ],
+                    ),
+                ),
+                (
+                    "threshold_reason",
+                    djstripe.fields.JSONField(
+                        blank=True,
+                        help_text="If billing_reason is set to subscription_threshold this returns more information on which threshold rules triggered the invoice.",
+                        null=True,
+                    ),
+                ),
+                (
+                    "total",
+                    djstripe.fields.StripeDecimalCurrencyAmountField(
+                        decimal_places=2,
+                        max_digits=11,
+                        verbose_name="Total (as decimal) after discount.",
+                    ),
+                ),
+                (
+                    "webhooks_delivered_at",
+                    djstripe.fields.StripeDateTimeField(
+                        help_text="The time at which webhooks for this invoice were successfully delivered (if the invoice had no webhooks to deliver, this will match `date`). Invoice payment is delayed until webhooks are delivered, or until all webhook delivery attempts have been exhausted.",
+                        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_upcominginvoice",
+                        to="djstripe.Charge",
+                    ),
+                ),
+                (
+                    "customer",
+                    models.ForeignKey(
+                        help_text="The customer associated with this invoice.",
+                        on_delete=django.db.models.deletion.CASCADE,
+                        related_name="upcominginvoices",
+                        to="djstripe.Customer",
+                    ),
+                ),
+                (
+                    "default_payment_method",
+                    models.ForeignKey(
+                        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",
+                    ),
+                ),
+                (
+                    "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",
+                    models.ForeignKey(
+                        help_text="The subscription that this invoice was prepared for, if any.",
+                        null=True,
+                        on_delete=django.db.models.deletion.SET_NULL,
+                        related_name="upcominginvoices",
+                        to="djstripe.Subscription",
+                    ),
+                ),
+            ],
+            options={"ordering": ["-created"], "abstract": False,},
+        ),
+        migrations.CreateModel(
+            name="TaxRate",
+            fields=[
+                (
+                    "djstripe_id",
+                    models.BigAutoField(
+                        primary_key=True, serialize=False, verbose_name="ID"
+                    ),
+                ),
+                ("id", djstripe.fields.StripeIdField(max_length=255, unique=True)),
+                (
+                    "livemode",
+                    models.NullBooleanField(
+                        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.",
+                    ),
+                ),
+                (
+                    "created",
+                    djstripe.fields.StripeDateTimeField(
+                        blank=True,
+                        help_text="The datetime this object was created in stripe.",
+                        null=True,
+                    ),
+                ),
+                (
+                    "metadata",
+                    djstripe.fields.JSONField(
+                        blank=True,
+                        help_text="A set of key/value pairs that you can attach to an object. It can be useful for storing additional information about an object in a structured format.",
+                        null=True,
+                    ),
+                ),
+                (
+                    "description",
+                    models.TextField(
+                        blank=True, help_text="A description of this object.", null=True
+                    ),
+                ),
+                ("djstripe_created", models.DateTimeField(auto_now_add=True)),
+                ("djstripe_updated", models.DateTimeField(auto_now=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.",
+                    ),
+                ),
+                (
+                    "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=2,
+                        help_text="This represents the tax rate percent out of 100.",
+                        max_digits=5,
+                        validators=[
+                            django.core.validators.MinValueValidator(1),
+                            django.core.validators.MaxValueValidator(100),
+                        ],
+                    ),
+                ),
+            ],
+            options={"get_latest_by": "created", "abstract": False,},
+        ),
+        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="_invoice_default_tax_rates_+",
+                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="_invoiceitem_tax_rates_+",
+                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="_subscription_default_tax_rates_+",
+                to="djstripe.TaxRate",
+            ),
+        ),
+        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="_subscriptionitem_tax_rates_+",
+                to="djstripe.TaxRate",
+            ),
+        ),
+        migrations.CreateModel(
+            name="DjstripeUpcomingInvoiceTotalTaxAmount",
+            fields=[
+                (
+                    "id",
+                    models.AutoField(
+                        auto_created=True,
+                        primary_key=True,
+                        serialize=False,
+                        verbose_name="ID",
+                    ),
+                ),
+                (
+                    "amount",
+                    djstripe.fields.StripeQuantumCurrencyAmountField(
+                        help_text="The amount, in cents, of the tax."
+                    ),
+                ),
+                (
+                    "inclusive",
+                    models.BooleanField(
+                        help_text="Whether this tax amount is inclusive or exclusive."
+                    ),
+                ),
+                (
+                    "invoice",
+                    models.ForeignKey(
+                        on_delete=django.db.models.deletion.CASCADE,
+                        related_name="+",
+                        to="djstripe.UpcomingInvoice",
+                    ),
+                ),
+                (
+                    "tax_rate",
+                    models.ForeignKey(
+                        help_text="The tax rate that was applied to get this tax amount.",
+                        on_delete=django.db.models.deletion.CASCADE,
+                        to="djstripe.TaxRate",
+                    ),
+                ),
+            ],
+            options={"unique_together": {("invoice", "tax_rate")},},
+        ),
+        migrations.CreateModel(
+            name="DjstripeInvoiceTotalTaxAmount",
+            fields=[
+                (
+                    "id",
+                    models.AutoField(
+                        auto_created=True,
+                        primary_key=True,
+                        serialize=False,
+                        verbose_name="ID",
+                    ),
+                ),
+                (
+                    "amount",
+                    djstripe.fields.StripeQuantumCurrencyAmountField(
+                        help_text="The amount, in cents, of the tax."
+                    ),
+                ),
+                (
+                    "inclusive",
+                    models.BooleanField(
+                        help_text="Whether this tax amount is inclusive or exclusive."
+                    ),
+                ),
+                (
+                    "invoice",
+                    models.ForeignKey(
+                        on_delete=django.db.models.deletion.CASCADE,
+                        related_name="total_tax_amounts",
+                        to="djstripe.Invoice",
+                    ),
+                ),
+                (
+                    "tax_rate",
+                    models.ForeignKey(
+                        help_text="The tax rate that was applied to get this tax amount.",
+                        on_delete=django.db.models.deletion.CASCADE,
+                        to="djstripe.TaxRate",
+                    ),
+                ),
+            ],
+            options={"unique_together": {("invoice", "tax_rate")},},
+        ),
+    ]

{'addition_count': 1012, 'commit_subject': 'Squash 2.2.0dev migrations', 'deletion_count': 0, 'file_extension': '.py', 'lang': 'py', 'license': 'mit', 'repo_name': 'dj-stripe/dj-stripe'}