billing: Show estimated subscription revenue on /activity.

[Substantial edits by Rishi Gupta]
This commit is contained in:
Vishnu Ks
2018-11-16 21:38:09 +05:30
committed by Rishi Gupta
parent a7c33e12cb
commit 2e04cdbe5e
5 changed files with 60 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ class Customer:
account_balance: int
email: str
description: str
discount: Optional[Dict[str, Any]]
discount: Optional[Discount]
metadata: Dict[str, str]
@staticmethod
@@ -33,6 +33,15 @@ class Customer:
def save(customer: Customer) -> Customer:
...
@staticmethod
def delete_discount(customer: Customer) -> None:
...
@staticmethod
def list(limit: Optional[int]=...) -> List[Customer]:
...
class Invoice:
amount_due: int
total: int
@@ -74,8 +83,12 @@ class Product:
def create(name: str=..., type: str=..., statement_descriptor: str=..., unit_label: str=...) -> Product:
...
class Discount:
coupon: Coupon
class Coupon:
id: str
percent_off: int
@staticmethod
def create(duration: str=..., name: str=..., percent_off: int=...) -> Coupon: