apibank-ai 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: apibank-ai
3
+ Version: 1.0.0
4
+ Summary: SDK oficial de API Bank AI Empire para transacciones M2M y Escrow.
5
+ Author: API Bank AI Empire
6
+ Requires-Dist: requests>=2.25.1
7
+ Dynamic: author
8
+ Dynamic: requires-dist
9
+ Dynamic: summary
@@ -0,0 +1 @@
1
+ from .client import APIBankClient
@@ -0,0 +1,37 @@
1
+ import requests
2
+
3
+ class APIBankClient:
4
+ def __init__(self, api_key: str, base_url: str = "https://api-bank-ai.vercel.app"):
5
+ self.api_key = api_key
6
+ self.base_url = base_url.rstrip('/')
7
+ self.session = requests.Session()
8
+ self.session.headers.update({"Authorization": f"Bearer {self.api_key}"})
9
+
10
+ def get_wallet(self):
11
+ resp = self.session.get(f"{self.base_url}/v1/wallets/me")
12
+ resp.raise_for_status()
13
+ return resp.json()
14
+
15
+ def transfer(self, to_wallet_id: str, amount: float, description: str = ""):
16
+ payload = {"to_wallet_id": to_wallet_id, "amount": amount, "description": description}
17
+ resp = self.session.post(f"{self.base_url}/v1/transactions/transfer", json=payload)
18
+ resp.raise_for_status()
19
+ return resp.json()
20
+
21
+ def escrow_lock(self, receiver_id: str, amount: float, condition: str):
22
+ payload = {"receiver_id": receiver_id, "amount": amount, "condition": condition}
23
+ resp = self.session.post(f"{self.base_url}/v1/escrow/lock", json=payload)
24
+ resp.raise_for_status()
25
+ return resp.json()
26
+
27
+ def escrow_release(self, escrow_id: str):
28
+ payload = {"escrow_id": escrow_id}
29
+ resp = self.session.post(f"{self.base_url}/v1/escrow/release", json=payload)
30
+ resp.raise_for_status()
31
+ return resp.json()
32
+
33
+ def escrow_refund(self, escrow_id: str):
34
+ payload = {"escrow_id": escrow_id}
35
+ resp = self.session.post(f"{self.base_url}/v1/escrow/refund", json=payload)
36
+ resp.raise_for_status()
37
+ return resp.json()
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: apibank-ai
3
+ Version: 1.0.0
4
+ Summary: SDK oficial de API Bank AI Empire para transacciones M2M y Escrow.
5
+ Author: API Bank AI Empire
6
+ Requires-Dist: requests>=2.25.1
7
+ Dynamic: author
8
+ Dynamic: requires-dist
9
+ Dynamic: summary
@@ -0,0 +1,8 @@
1
+ setup.py
2
+ apibank/__init__.py
3
+ apibank/client.py
4
+ apibank_ai.egg-info/PKG-INFO
5
+ apibank_ai.egg-info/SOURCES.txt
6
+ apibank_ai.egg-info/dependency_links.txt
7
+ apibank_ai.egg-info/requires.txt
8
+ apibank_ai.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ requests>=2.25.1
@@ -0,0 +1 @@
1
+ apibank
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,12 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='apibank-ai',
5
+ version='1.0.0',
6
+ packages=find_packages(),
7
+ install_requires=[
8
+ 'requests>=2.25.1'
9
+ ],
10
+ author='API Bank AI Empire',
11
+ description='SDK oficial de API Bank AI Empire para transacciones M2M y Escrow.',
12
+ )