django-stripe-hooks 0.2.0.dev2__tar.gz → 0.2.0.dev3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/PKG-INFO +14 -20
  2. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/README.md +7 -7
  3. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/admin.py +624 -0
  4. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/apps.py +27 -0
  5. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/display.py +83 -0
  6. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/fields.py +79 -0
  7. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/forms.py +19 -0
  8. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/management/commands/import_stripe.py +29 -30
  9. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/management/commands/stripe_webhooks.py +393 -0
  10. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/managers.py +33 -34
  11. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/migrations/0002_rename_card_paymentmethod_details_and_more.py +34 -0
  12. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/migrations/0003_alter_balancetransaction_amount_and_more.py +134 -0
  13. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/migrations/0004_alter_balancetransaction_currency_and_more.py +68 -0
  14. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/models.py +660 -727
  15. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/money.py +156 -0
  16. django_stripe_hooks-0.2.0.dev3/django_stripe_hooks/static/django_stripe_hooks/css/admin.css +44 -0
  17. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/urls.py +2 -3
  18. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/utils.py +9 -7
  19. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/views.py +13 -14
  20. django_stripe_hooks-0.2.0.dev3/pyproject.toml +107 -0
  21. django_stripe_hooks-0.2.0.dev3/pyproject.toml.orig +98 -0
  22. django_stripe_hooks-0.2.0.dev2/django_stripe_hooks/admin.py +0 -806
  23. django_stripe_hooks-0.2.0.dev2/django_stripe_hooks/apps.py +0 -24
  24. django_stripe_hooks-0.2.0.dev2/django_stripe_hooks/management/commands/stripe_webhooks.py +0 -375
  25. django_stripe_hooks-0.2.0.dev2/pyproject.toml +0 -56
  26. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/__init__.py +0 -0
  27. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/management/__init__.py +0 -0
  28. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/management/commands/__init__.py +0 -0
  29. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/migrations/0001_initial.py +0 -0
  30. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/migrations/__init__.py +0 -0
  31. {django_stripe_hooks-0.2.0.dev2 → django_stripe_hooks-0.2.0.dev3}/django_stripe_hooks/py.typed +0 -0
@@ -1,18 +1,13 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: django-stripe-hooks
3
- Version: 0.2.0.dev2
3
+ Version: 0.2.0.dev3
4
4
  Summary: Webhooks for syncing Stripe payment data to your Django database.
5
- License: MIT
6
5
  Author: Geoffrey Eisenbarth
7
- Author-email: geoffrey.eisenbarth@gmail.com
8
- Requires-Python: >=3.12,<4
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.12
12
- Classifier: Programming Language :: Python :: 3.13
13
- Classifier: Programming Language :: Python :: 3.14
14
- Requires-Dist: django (>=6.0)
15
- Requires-Dist: stripe (>=14.4.1,<15.0.0)
6
+ Author-email: Geoffrey Eisenbarth <geoffrey.eisenbarth@gmail.com>
7
+ License: MIT
8
+ Requires-Dist: django>=6.0
9
+ Requires-Dist: stripe>=14.4.1,<15.0.0
10
+ Requires-Python: >=3.12, <4
16
11
  Description-Content-Type: text/markdown
17
12
 
18
13
  # Stripe Webhooks for Django
@@ -75,7 +70,7 @@ pip install django-stripe-hooks
75
70
  ```python
76
71
  INSTALLED_APPS = [
77
72
  # ...
78
- 'django_stripe_hooks',
73
+ "django_stripe_hooks",
79
74
  ]
80
75
  ```
81
76
 
@@ -99,7 +94,7 @@ In your project's `urls.py`:
99
94
  from django.urls import path, include
100
95
 
101
96
  urlpatterns = [
102
- path('stripe/', include('django_stripe_hooks.urls')),
97
+ path("stripe/", include("django_stripe_hooks.urls")),
103
98
  # ...
104
99
  ]
105
100
  ```
@@ -124,8 +119,8 @@ This interactive command will allow you to create, update, and manage your Strip
124
119
  After creation, the command prints two values to add to your `settings.py`:
125
120
 
126
121
  ```python
127
- STRIPE_WEBHOOK_ENDPOINT_ID = "we_..." # used to update the endpoint later
128
- STRIPE_WEBHOOK_SECRET_KEY = "whsec_..." # used to verify incoming signatures
122
+ STRIPE_WEBHOOK_ENDPOINT_ID = "we_..." # used to update the endpoint later
123
+ STRIPE_WEBHOOK_SECRET_KEY = "whsec_..." # used to verify incoming signatures
129
124
  ```
130
125
 
131
126
  > **Important:** `STRIPE_WEBHOOK_SECRET_KEY` is only returned once by Stripe. Copy it immediately.
@@ -156,8 +151,8 @@ To react to specific webhook events (e.g. sending a welcome email when a subscri
156
151
  ```python
157
152
  from django_stripe_hooks.views import StripeWebhooks
158
153
 
159
- class MyStripeWebhooks(StripeWebhooks):
160
154
 
155
+ class MyStripeWebhooks(StripeWebhooks):
161
156
  def customer_subscription_created(self) -> None:
162
157
  subscription = self.django_obj
163
158
  send_mail(
@@ -191,7 +186,7 @@ from django.urls import path
191
186
  from myapp.views import MyStripeWebhooks
192
187
 
193
188
  urlpatterns = [
194
- path('payments/webhooks/', MyStripeWebhooks.as_view(), name='stripe_webhooks'),
189
+ path("payments/webhooks/", MyStripeWebhooks.as_view(), name="stripe_webhooks"),
195
190
  ]
196
191
  ```
197
192
 
@@ -217,7 +212,7 @@ A few consequences to be aware of:
217
212
  In practice, most webhooks arrive within a few seconds, but network conditions and Stripe processing can delay delivery by minutes.
218
213
  Do not rely on webhooks for time-critical operations where you need an immediate response.
219
214
 
220
- - **Not all objects generate webhooks.**
215
+ - **Not all objects generate webhooks.**
221
216
  `SubscriptionItem`, `InvoiceLineItem`, `InvoicePayment`, and `BalanceTransaction` do not have their own Stripe webhook events. They are populated as nested objects within parent webhook payloads (e.g. a `customer.subscription.updated` event includes subscription items).
222
217
 
223
218
  ---
@@ -279,4 +274,3 @@ Distributed under the MIT license.
279
274
  ## Support
280
275
 
281
276
  [Open an issue](https://github.com/geoffrey-eisenbarth/django-stripe-hooks/issues) for bugs or questions.
282
-
@@ -58,7 +58,7 @@ pip install django-stripe-hooks
58
58
  ```python
59
59
  INSTALLED_APPS = [
60
60
  # ...
61
- 'django_stripe_hooks',
61
+ "django_stripe_hooks",
62
62
  ]
63
63
  ```
64
64
 
@@ -82,7 +82,7 @@ In your project's `urls.py`:
82
82
  from django.urls import path, include
83
83
 
84
84
  urlpatterns = [
85
- path('stripe/', include('django_stripe_hooks.urls')),
85
+ path("stripe/", include("django_stripe_hooks.urls")),
86
86
  # ...
87
87
  ]
88
88
  ```
@@ -107,8 +107,8 @@ This interactive command will allow you to create, update, and manage your Strip
107
107
  After creation, the command prints two values to add to your `settings.py`:
108
108
 
109
109
  ```python
110
- STRIPE_WEBHOOK_ENDPOINT_ID = "we_..." # used to update the endpoint later
111
- STRIPE_WEBHOOK_SECRET_KEY = "whsec_..." # used to verify incoming signatures
110
+ STRIPE_WEBHOOK_ENDPOINT_ID = "we_..." # used to update the endpoint later
111
+ STRIPE_WEBHOOK_SECRET_KEY = "whsec_..." # used to verify incoming signatures
112
112
  ```
113
113
 
114
114
  > **Important:** `STRIPE_WEBHOOK_SECRET_KEY` is only returned once by Stripe. Copy it immediately.
@@ -139,8 +139,8 @@ To react to specific webhook events (e.g. sending a welcome email when a subscri
139
139
  ```python
140
140
  from django_stripe_hooks.views import StripeWebhooks
141
141
 
142
- class MyStripeWebhooks(StripeWebhooks):
143
142
 
143
+ class MyStripeWebhooks(StripeWebhooks):
144
144
  def customer_subscription_created(self) -> None:
145
145
  subscription = self.django_obj
146
146
  send_mail(
@@ -174,7 +174,7 @@ from django.urls import path
174
174
  from myapp.views import MyStripeWebhooks
175
175
 
176
176
  urlpatterns = [
177
- path('payments/webhooks/', MyStripeWebhooks.as_view(), name='stripe_webhooks'),
177
+ path("payments/webhooks/", MyStripeWebhooks.as_view(), name="stripe_webhooks"),
178
178
  ]
179
179
  ```
180
180
 
@@ -200,7 +200,7 @@ A few consequences to be aware of:
200
200
  In practice, most webhooks arrive within a few seconds, but network conditions and Stripe processing can delay delivery by minutes.
201
201
  Do not rely on webhooks for time-critical operations where you need an immediate response.
202
202
 
203
- - **Not all objects generate webhooks.**
203
+ - **Not all objects generate webhooks.**
204
204
  `SubscriptionItem`, `InvoiceLineItem`, `InvoicePayment`, and `BalanceTransaction` do not have their own Stripe webhook events. They are populated as nested objects within parent webhook payloads (e.g. a `customer.subscription.updated` event includes subscription items).
205
205
 
206
206
  ---