agentpay-python 0.1.0__tar.gz → 0.1.1__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.
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/PKG-INFO +1 -1
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/agentpay/client.py +6 -6
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/agentpay_python.egg-info/PKG-INFO +1 -1
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/pyproject.toml +1 -1
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/README.md +0 -0
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/agentpay/__init__.py +0 -0
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/agentpay/models.py +0 -0
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/agentpay_python.egg-info/SOURCES.txt +0 -0
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/agentpay_python.egg-info/dependency_links.txt +0 -0
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/agentpay_python.egg-info/requires.txt +0 -0
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/agentpay_python.egg-info/top_level.txt +0 -0
- {agentpay_python-0.1.0 → agentpay_python-0.1.1}/setup.cfg +0 -0
|
@@ -72,9 +72,9 @@ class AgentPayClient:
|
|
|
72
72
|
resp.raise_for_status()
|
|
73
73
|
data = resp.json()
|
|
74
74
|
return BalanceInfo(
|
|
75
|
-
balance=data
|
|
76
|
-
credits_used=data
|
|
77
|
-
credits_remaining=data
|
|
75
|
+
balance=data.get("credits", data.get("balance", 0)),
|
|
76
|
+
credits_used=data.get("credits_used", 0),
|
|
77
|
+
credits_remaining=data.get("credits", data.get("credits_remaining", 0)),
|
|
78
78
|
)
|
|
79
79
|
|
|
80
80
|
def forecast(
|
|
@@ -121,9 +121,9 @@ class AgentPayClient:
|
|
|
121
121
|
resp.raise_for_status()
|
|
122
122
|
data = resp.json()
|
|
123
123
|
return SpendResult(
|
|
124
|
-
success=data.get("success", True),
|
|
125
|
-
credits_used=data.get("credits_used", amount),
|
|
126
|
-
credits_remaining=data.get("credits_remaining", 0),
|
|
124
|
+
success=data.get("ok", data.get("success", True)),
|
|
125
|
+
credits_used=data.get("spent", data.get("credits_used", amount)),
|
|
126
|
+
credits_remaining=data.get("new_balance", data.get("credits_remaining", 0)),
|
|
127
127
|
message=data.get("message", ""),
|
|
128
128
|
)
|
|
129
129
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentpay_python-0.1.0 → agentpay_python-0.1.1}/agentpay_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|