A thin python wrapper for the fastbill API
Project description
management commands
python manage.py fastbill --update-articles
signals
put this in your models.py
from django_fastbill.signals import customer_signal, subscription_signal, payment_signal
from django.dispatch import receiver
@receiver(customer_signal)
def customer_signal_receiver(sender, customer, event_type, raw_data, **kwargs):
print "#" * 50
print "sender", sender
print "event_type", event_type
print "customer", customer
print "data", raw_data
print "#" * 50
@receiver(subscription_signal)
def subscription_signal_receiver(sender, customer, subscription, event_type, raw_data, **kwargs):
print "#" * 50
print "sender", sender
print "event_type", event_type
print "customer", customer
print "subscription", subscription
print "data", raw_data
print "#" * 50
@receiver(payment_signal)
def payment_signal_receiver(sender, customer, subscription, invoice, event_type, raw_data, **kwargs):
print "#" * 50
print "sender", sender
print "event_type", event_type
print "customer", customer
print "subscription", subscription
print "invoice", invoice
print "data", raw_data
print "#" * 50
python manage.py fastbill --update-articles
signals
put this in your models.py
from django_fastbill.signals import customer_signal, subscription_signal, payment_signal
from django.dispatch import receiver
@receiver(customer_signal)
def customer_signal_receiver(sender, customer, event_type, raw_data, **kwargs):
print "#" * 50
print "sender", sender
print "event_type", event_type
print "customer", customer
print "data", raw_data
print "#" * 50
@receiver(subscription_signal)
def subscription_signal_receiver(sender, customer, subscription, event_type, raw_data, **kwargs):
print "#" * 50
print "sender", sender
print "event_type", event_type
print "customer", customer
print "subscription", subscription
print "data", raw_data
print "#" * 50
@receiver(payment_signal)
def payment_signal_receiver(sender, customer, subscription, invoice, event_type, raw_data, **kwargs):
print "#" * 50
print "sender", sender
print "event_type", event_type
print "customer", customer
print "subscription", subscription
print "invoice", invoice
print "data", raw_data
print "#" * 50
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-fastbill-0.1.4.tar.gz
(14.6 kB
view details)
File details
Details for the file django-fastbill-0.1.4.tar.gz
.
File metadata
- Download URL: django-fastbill-0.1.4.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4021dc6b39d8772ceef919ef4687fb7f783cd078120c6ff0b59e2f19be7a8226 |
|
MD5 | 65b9a0a37849eda7ce741facc077b000 |
|
BLAKE2b-256 | 7ff92a78383bcfef71b4c50ff2b5b3239a281c6d3c559db0ca03b7d0e5c16aad |