# Generated by Django 2.0.1 on 2018-01-09 18:57

from django.db import migrations, models
import django.db.models.deletion
import djstripe.fields


class Migration(migrations.Migration):

    dependencies = [
        ('djstripe', '0015_auto_20180109_0245'),
    ]

    operations = [
        migrations.CreateModel(
            name='Dispute',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stripe_id', djstripe.fields.StripeIdField(max_length=255, unique=True)),
                ('livemode', djstripe.fields.StripeNullBooleanField(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.')),
                ('stripe_timestamp', djstripe.fields.StripeDateTimeField(help_text='The datetime this object was created in stripe.', null=True)),
                ('metadata', djstripe.fields.StripeJSONField(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', djstripe.fields.StripeTextField(blank=True, help_text='A description of this object.', null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('amount', djstripe.fields.StripeIntegerField(help_text='Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).')),
                ('currency', djstripe.fields.StripeCharField(help_text='Three-letter ISO currency code.', max_length=3)),
                ('evidence', djstripe.fields.StripeJSONField(help_text='Evidence provided to respond to a dispute.')),
                ('evidence_details', djstripe.fields.StripeJSONField(help_text='Information about the evidence submission.')),
                ('is_charge_refundable', djstripe.fields.StripeBooleanField(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.StripeCharField(choices=[('bank_cannot_process', 'Bank cannot process'), ('credit_not_processed', 'Credit not processed'), ('customer_initiated', 'Customer-initiated'), ('debit_not_authorized', 'Debit not authorized'), ('duplicate', 'Duplicate'), ('fraudulent', 'Fraudulent'), ('general', 'General'), ('incorrect_account_details', 'Incorrect account details'), ('insufficient_funds', 'Insufficient funds'), ('product_not_received', 'Product not received'), ('product_unacceptable', 'Product unacceptable'), ('subscription_canceled', 'Subscription canceled'), ('unrecognized', 'Unrecognized')], max_length=50)),
                ('status', djstripe.fields.StripeCharField(choices=[('charge_refunded', 'Charge refunded'), ('lost', 'Lost'), ('needs_response', 'Needs response'), ('under_review', 'Under review'), ('warning_closed', 'Warning closed'), ('warning_needs_response', 'Warning needs response'), ('warning_under_review', 'Warning under review'), ('won', 'Won')], max_length=50)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.RemoveField(
            model_name='charge',
            name='disputed',
        ),
        migrations.AddField(
            model_name='charge',
            name='dispute',
            field=models.ForeignKey(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'),
        ),
    ]
