Skip to content

Commit fa554be

Browse files
committed
feat: add billing
1 parent 9b0cf5c commit fa554be

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

videodb/_constants.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class ApiPath:
4848
workflow = "workflow"
4949
timeline = "timeline"
5050
delete = "delete"
51+
billing = "billing"
52+
usage = "usage"
53+
checkout = "checkout"
54+
checkouts = "checkouts"
55+
invoices = "invoices"
5156

5257

5358
class Status:

videodb/client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ def update_collection(self, id: str, name: str, description: str) -> Collection:
8484
collection_data.get("description"),
8585
)
8686

87+
def check_usage(self) -> dict:
88+
return self.get(path=f"{ApiPath.billing}/{ApiPath.usage}")
89+
90+
def checkout(self) -> dict:
91+
return self.post(path=f"{ApiPath.billing}/{ApiPath.checkout}")
92+
93+
def get_invoices(self) -> List[dict]:
94+
return self.get(path=f"{ApiPath.billing}/{ApiPath.invoices}")
95+
96+
def get_checkouts(self) -> List[dict]:
97+
return self.get(path=f"{ApiPath.billing}/{ApiPath.checkouts}")
98+
8799
def upload(
88100
self,
89101
file_path: str = None,

0 commit comments

Comments
 (0)