From e634ecd88dfc0cd6b537f4e7d320aa47fad0b2f5 Mon Sep 17 00:00:00 2001 From: Jerome Leclanche Date: Tue, 8 Aug 2017 03:58:46 +0300 Subject: [PATCH] Implement Event.idempotency_key field --- .../migrations/0010_event_idempotency_key.py | 21 +++++++++++++++++++ djstripe/stripe_objects.py | 1 + 2 files changed, 22 insertions(+) create mode 100644 djstripe/migrations/0010_event_idempotency_key.py diff --git a/djstripe/migrations/0010_event_idempotency_key.py b/djstripe/migrations/0010_event_idempotency_key.py new file mode 100644 index 0000000000..2c3b287786 --- /dev/null +++ b/djstripe/migrations/0010_event_idempotency_key.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.3 on 2017-08-08 00:59 +from __future__ import unicode_literals + +from django.db import migrations +import djstripe.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('djstripe', '0009_auto_20170806_1236'), + ] + + operations = [ + migrations.AddField( + model_name='event', + name='idempotency_key', + field=djstripe.fields.StripeTextField(blank=True, null=True), + ), + ] diff --git a/djstripe/stripe_objects.py b/djstripe/stripe_objects.py index 8b01afd90d..cccbb261e9 100644 --- a/djstripe/stripe_objects.py +++ b/djstripe/stripe_objects.py @@ -923,6 +923,7 @@ class Meta: "'automated' event with no associated request.", stripe_required=False ) + idempotency_key = StripeTextField(null=True, blank=True, stripe_required=False) received_api_version = StripeCharField( max_length=15, blank=True, stripe_name="api_version", help_text="the API version at which the event data was " "rendered. Blank for old entries only, all new entries will have this value"