X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/468c2e650c854ffa691afc73aa1f41ce61283cdb..599ce05dcf12a1380c3a2181b694aed06f55fffd:/src/paypal/models.py?ds=sidebyside diff --git a/src/paypal/models.py b/src/paypal/models.py index 527e80458..80aa357a6 100644 --- a/src/paypal/models.py +++ b/src/paypal/models.py @@ -18,3 +18,11 @@ class BillingAgreement(models.Model): plan = models.ForeignKey(BillingPlan) active = models.BooleanField(max_length=32) token = models.CharField(max_length=32) + + def get_agreement(self): + from .rest import get_agreement + return get_agreement(self.agreement_id) + + def check_agreement(self): + from .rest import check_agreement + return check_agreement(self.agreement_id)