Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
Update abstra-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
abstra-bot committed May 11, 2023
1 parent ad2bd14 commit 4556d28
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions abstra_cli/apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
from .subdomains import *
from .memberships import *
from .workspaces import *
from .billing import *
17 changes: 17 additions & 0 deletions abstra_cli/apis/billing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import abstra_cli.credentials as credentials
import abstra_cli.apis.main as api_main
import requests

billing_url = "https://billing.abstra.cloud"


def get_account_info():
headers = credentials.get_auth_headers()
_, workspace_id, _ = api_main.get_auth_info()
response = requests.get(
f"{billing_url}/workspaces/{workspace_id}/account", headers=headers
)
response_json = response.json()
if response_json is None:
return None
return response_json

0 comments on commit 4556d28

Please sign in to comment.