openmeter 1.0.0a7__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.
- openmeter-1.0.0a7/PKG-INFO +354 -0
- openmeter-1.0.0a7/README.md +327 -0
- openmeter-1.0.0a7/openmeter/__init__.py +28 -0
- openmeter-1.0.0a7/openmeter/_client.py +31 -0
- openmeter-1.0.0a7/openmeter/_commit.py +1 -0
- openmeter-1.0.0a7/openmeter/_generated/__init__.py +26 -0
- openmeter-1.0.0a7/openmeter/_generated/_client.py +254 -0
- openmeter-1.0.0a7/openmeter/_generated/_configuration.py +33 -0
- openmeter-1.0.0a7/openmeter/_generated/_patch.py +18 -0
- openmeter-1.0.0a7/openmeter/_generated/_utils/__init__.py +0 -0
- openmeter-1.0.0a7/openmeter/_generated/_utils/model_base.py +1231 -0
- openmeter-1.0.0a7/openmeter/_generated/_utils/serialization.py +2024 -0
- openmeter-1.0.0a7/openmeter/_generated/_version.py +3 -0
- openmeter-1.0.0a7/openmeter/_generated/aio/__init__.py +23 -0
- openmeter-1.0.0a7/openmeter/_generated/aio/_client.py +256 -0
- openmeter-1.0.0a7/openmeter/_generated/aio/_configuration.py +33 -0
- openmeter-1.0.0a7/openmeter/_generated/aio/_patch.py +18 -0
- openmeter-1.0.0a7/openmeter/_generated/aio/operations/__init__.py +93 -0
- openmeter-1.0.0a7/openmeter/_generated/aio/operations/_operations.py +19903 -0
- openmeter-1.0.0a7/openmeter/_generated/aio/operations/_patch.py +18 -0
- openmeter-1.0.0a7/openmeter/_generated/models/__init__.py +742 -0
- openmeter-1.0.0a7/openmeter/_generated/models/_enums.py +714 -0
- openmeter-1.0.0a7/openmeter/_generated/models/_models.py +15405 -0
- openmeter-1.0.0a7/openmeter/_generated/models/_patch.py +18 -0
- openmeter-1.0.0a7/openmeter/_generated/operations/__init__.py +93 -0
- openmeter-1.0.0a7/openmeter/_generated/operations/_operations.py +24038 -0
- openmeter-1.0.0a7/openmeter/_generated/operations/_patch.py +18 -0
- openmeter-1.0.0a7/openmeter/_types.py +88 -0
- openmeter-1.0.0a7/openmeter/_version.py +1 -0
- openmeter-1.0.0a7/openmeter/aio/__init__.py +23 -0
- openmeter-1.0.0a7/openmeter/aio/_client.py +31 -0
- openmeter-1.0.0a7/openmeter/aio/operations/__init__.py +29 -0
- openmeter-1.0.0a7/openmeter/models/__init__.py +30 -0
- openmeter-1.0.0a7/openmeter/operations/__init__.py +29 -0
- openmeter-1.0.0a7/openmeter/py.typed +1 -0
- openmeter-1.0.0a7/pyproject.toml +37 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openmeter
|
|
3
|
+
Version: 1.0.0a7
|
|
4
|
+
Summary: Client for OpenMeter: Real-Time and Scalable Usage Metering
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Keywords: openmeter,api,client,usage,usage-based,metering,ai,aggregation,real-time,billing,cloud
|
|
7
|
+
Author: Andras Toth
|
|
8
|
+
Author-email: 4157749+tothandras@users.noreply.github.com
|
|
9
|
+
Requires-Python: >=3.9,<4.0
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Requires-Dist: cloudevents (>=1.10.0,<2.0.0)
|
|
19
|
+
Requires-Dist: corehttp[aiohttp,requests] (>=1.0.0b6)
|
|
20
|
+
Requires-Dist: isodate (>=0.6.1,<0.8.0)
|
|
21
|
+
Requires-Dist: typing-extensions (>=4.6.0)
|
|
22
|
+
Requires-Dist: urllib3 (>=2.0.0,<3.0.0)
|
|
23
|
+
Project-URL: Homepage, https://openmeter.io
|
|
24
|
+
Project-URL: Repository, https://github.com/openmeter/openmeter
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# OpenMeter Python SDK
|
|
28
|
+
|
|
29
|
+
[On PyPI](https://pypi.org/project/openmeter)
|
|
30
|
+
|
|
31
|
+
This package is generated by `@typespec/http-client-python` with Typespec.
|
|
32
|
+
|
|
33
|
+
## Prerequisites
|
|
34
|
+
|
|
35
|
+
- Python 3.9 or later is required to use this package.
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
> The Python SDK is in preview mode.
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
pip install openmeter
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Examples
|
|
46
|
+
|
|
47
|
+
### Setup
|
|
48
|
+
|
|
49
|
+
#### Synchronous Client
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from openmeter import Client
|
|
53
|
+
|
|
54
|
+
client = Client(
|
|
55
|
+
endpoint="https://openmeter.cloud",
|
|
56
|
+
token="your-api-token",
|
|
57
|
+
)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Async Client
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from openmeter.aio import Client
|
|
64
|
+
|
|
65
|
+
client = Client(
|
|
66
|
+
endpoint="https://openmeter.cloud",
|
|
67
|
+
token="your-api-token",
|
|
68
|
+
)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Ingest an Event
|
|
72
|
+
|
|
73
|
+
#### Synchronous
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
import datetime
|
|
77
|
+
import uuid
|
|
78
|
+
|
|
79
|
+
from openmeter.models import Event
|
|
80
|
+
|
|
81
|
+
# Create an Event instance (following CloudEvents specification)
|
|
82
|
+
event = Event(
|
|
83
|
+
id=str(uuid.uuid4()),
|
|
84
|
+
source="my-app",
|
|
85
|
+
specversion="1.0",
|
|
86
|
+
type="prompt",
|
|
87
|
+
subject="customer-1",
|
|
88
|
+
time=datetime.datetime.now(datetime.timezone.utc),
|
|
89
|
+
data={
|
|
90
|
+
"tokens": 100,
|
|
91
|
+
"model": "gpt-4o",
|
|
92
|
+
"type": "input",
|
|
93
|
+
},
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
# Ingest the event
|
|
97
|
+
client.events.ingest_event(event)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### Async
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
import datetime
|
|
104
|
+
import uuid
|
|
105
|
+
import asyncio
|
|
106
|
+
|
|
107
|
+
from openmeter.aio import Client
|
|
108
|
+
from openmeter.models import Event
|
|
109
|
+
|
|
110
|
+
async def main():
|
|
111
|
+
async with Client(
|
|
112
|
+
endpoint="https://openmeter.cloud",
|
|
113
|
+
token="your-api-token",
|
|
114
|
+
) as client:
|
|
115
|
+
# Create an Event instance (following CloudEvents specification)
|
|
116
|
+
event = Event(
|
|
117
|
+
id=str(uuid.uuid4()),
|
|
118
|
+
source="my-app",
|
|
119
|
+
specversion="1.0",
|
|
120
|
+
type="prompt",
|
|
121
|
+
subject="customer-1",
|
|
122
|
+
time=datetime.datetime.now(datetime.timezone.utc),
|
|
123
|
+
data={
|
|
124
|
+
"tokens": 100,
|
|
125
|
+
"model": "gpt-4o",
|
|
126
|
+
"type": "input",
|
|
127
|
+
},
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
# Ingest the event
|
|
131
|
+
await client.events.ingest_event(event)
|
|
132
|
+
|
|
133
|
+
asyncio.run(main())
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Query Meter
|
|
137
|
+
|
|
138
|
+
#### Synchronous
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
from openmeter.models import MeterQueryResult
|
|
142
|
+
|
|
143
|
+
# Query total values
|
|
144
|
+
r: MeterQueryResult = client.meters.query_json(meter_id_or_slug="tokens_total")
|
|
145
|
+
print("Query total values:", r.data[0].value)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
#### Async
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
import asyncio
|
|
152
|
+
|
|
153
|
+
from openmeter.aio import Client
|
|
154
|
+
from openmeter.models import MeterQueryResult
|
|
155
|
+
|
|
156
|
+
async def main():
|
|
157
|
+
async with Client(
|
|
158
|
+
endpoint="https://openmeter.cloud",
|
|
159
|
+
token="your-api-token",
|
|
160
|
+
) as client:
|
|
161
|
+
# Query total values
|
|
162
|
+
r: MeterQueryResult = await client.meters.query_json(
|
|
163
|
+
meter_id_or_slug="tokens_total"
|
|
164
|
+
)
|
|
165
|
+
print("Query total values:", r.data[0].value)
|
|
166
|
+
|
|
167
|
+
asyncio.run(main())
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Client API Reference
|
|
171
|
+
|
|
172
|
+
The OpenMeter Python SDK provides a comprehensive client interface organized into logical operation groups. Below is a complete reference of all available methods.
|
|
173
|
+
|
|
174
|
+
### Overview
|
|
175
|
+
|
|
176
|
+
| Namespace | Operation | Method | Description |
|
|
177
|
+
| ---------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------- |
|
|
178
|
+
| **Events** | | | Track usage by ingesting events |
|
|
179
|
+
| | Create | `client.events.ingest_event(event)` | Ingest a single event |
|
|
180
|
+
| | Create | `client.events.ingest_events(events)` | Ingest batch of events |
|
|
181
|
+
| | Create | `client.events.ingest_events_json(events_json)` | Ingest events from JSON |
|
|
182
|
+
| | Read | `client.events.list(**kwargs)` | List ingested events with filtering |
|
|
183
|
+
| | Read | `client.events_v2.list(**kwargs)` | List ingested events with advanced filtering (V2) |
|
|
184
|
+
| **Meters** | | | Track and aggregate usage data from events |
|
|
185
|
+
| | Create | `client.meters.create(meter)` | Create a new meter |
|
|
186
|
+
| | Read | `client.meters.get(meter_id_or_slug)` | Get a meter by ID or slug |
|
|
187
|
+
| | Read | `client.meters.list(**kwargs)` | List all meters |
|
|
188
|
+
| | Read | `client.meters.query_json(meter_id_or_slug, **kwargs)` | Query usage data in JSON format |
|
|
189
|
+
| | Read | `client.meters.query_csv(meter_id_or_slug, **kwargs)` | Query usage data in CSV format |
|
|
190
|
+
| | Read | `client.meters.query(meter_id_or_slug, **kwargs)` | Query usage data |
|
|
191
|
+
| | Read | `client.meters.list_subjects(meter_id_or_slug, **kwargs)` | List subjects for a meter |
|
|
192
|
+
| | Read | `client.meters.list_group_by_values(meter_id_or_slug, **kwargs)` | List group-by values for a meter |
|
|
193
|
+
| | Update | `client.meters.update(meter_id_or_slug, meter)` | Update a meter by ID or slug |
|
|
194
|
+
| | Delete | `client.meters.delete(meter_id_or_slug)` | Delete a meter by ID or slug |
|
|
195
|
+
| **Subjects** | | | Manage entities that consume resources |
|
|
196
|
+
| | Create | `client.subjects.upsert(subjects)` | Create or update one or multiple subjects |
|
|
197
|
+
| | Read | `client.subjects.get(subject_id_or_key)` | Get a subject by ID or key |
|
|
198
|
+
| | Read | `client.subjects.list()` | List all subjects |
|
|
199
|
+
| | Delete | `client.subjects.delete(subject_id_or_key)` | Delete a subject by ID or key |
|
|
200
|
+
| **Customers** | | | Manage customer information and lifecycles |
|
|
201
|
+
| | Create | `client.customers.create(customer)` | Create a new customer |
|
|
202
|
+
| | Read | `client.customers.get(customer_id_or_key, **kwargs)` | Get a customer by ID or key |
|
|
203
|
+
| | Read | `client.customers.list(**kwargs)` | List all customers |
|
|
204
|
+
| | Read | `client.customers.list_customer_subscriptions(customer_id_or_key, **kwargs)` | List customer subscriptions |
|
|
205
|
+
| | Update | `client.customers.update(customer_id_or_key, customer)` | Update a customer |
|
|
206
|
+
| | Delete | `client.customers.delete(customer_id_or_key)` | Delete a customer |
|
|
207
|
+
| **Customer (Single)** | | | Customer-specific operations |
|
|
208
|
+
| | Read | `client.customer.get_customer_access(customer_id_or_key)` | Get customer access information |
|
|
209
|
+
| **Customer Apps** | | | Manage customer app integrations |
|
|
210
|
+
| | Read | `client.customer_apps.list_app_data(customer_id_or_key, **kwargs)` | List app data for a customer |
|
|
211
|
+
| | Update | `client.customer_apps.upsert_app_data(customer_id_or_key, app_data)` | Upsert app data for a customer |
|
|
212
|
+
| | Delete | `client.customer_apps.delete_app_data(customer_id_or_key, app_id)` | Delete app data for a customer |
|
|
213
|
+
| **Customer Stripe** | | | Manage Stripe integration for customers |
|
|
214
|
+
| | Read | `client.customer_stripe.get(customer_id_or_key)` | Get Stripe customer data |
|
|
215
|
+
| | Update | `client.customer_stripe.upsert(customer_id_or_key, data)` | Upsert Stripe customer data |
|
|
216
|
+
| | Create | `client.customer_stripe.create_portal_session(customer_id_or_key, **kwargs)` | Create a Stripe customer portal session |
|
|
217
|
+
| **Customer Entitlement** | | | Single customer entitlement operations |
|
|
218
|
+
| | Read | `client.customer_entitlement.get_customer_entitlement_value(customer_id_or_key, **kwargs)` | Get customer entitlement value |
|
|
219
|
+
| **Customer Overrides** | | | Manage customer-specific pricing overrides |
|
|
220
|
+
| | Read | `client.customer_overrides.list(customer_id_or_key)` | List customer overrides |
|
|
221
|
+
| | Read | `client.customer_overrides.get(customer_id_or_key, override_id)` | Get a customer override |
|
|
222
|
+
| | Update | `client.customer_overrides.upsert(customer_id_or_key, override)` | Upsert a customer override |
|
|
223
|
+
| | Delete | `client.customer_overrides.delete(customer_id_or_key, override_id)` | Delete a customer override |
|
|
224
|
+
| **Features** | | | Define application capabilities and services |
|
|
225
|
+
| | Create | `client.features.create(feature)` | Create a new feature |
|
|
226
|
+
| | Read | `client.features.get(feature_id)` | Get a feature by ID |
|
|
227
|
+
| | Read | `client.features.list(**kwargs)` | List all features |
|
|
228
|
+
| | Delete | `client.features.delete(feature_id)` | Delete a feature by ID |
|
|
229
|
+
| **Plans** | | | Manage subscription plans and pricing |
|
|
230
|
+
| | Create | `client.plans.create(request)` | Create a new plan |
|
|
231
|
+
| | Read | `client.plans.get(plan_id, **kwargs)` | Get a plan by ID |
|
|
232
|
+
| | Read | `client.plans.list(**kwargs)` | List all plans |
|
|
233
|
+
| | Update | `client.plans.update(plan_id, body)` | Update a plan |
|
|
234
|
+
| | Delete | `client.plans.delete(plan_id)` | Delete a plan by ID |
|
|
235
|
+
| | Other | `client.plans.publish(plan_id)` | Publish a plan |
|
|
236
|
+
| | Other | `client.plans.archive(plan_id)` | Archive a plan version |
|
|
237
|
+
| | Other | `client.plans.next(plan_id_or_key)` | Create new draft plan version |
|
|
238
|
+
| **Plan Addons** | | | Manage addons assigned to plans |
|
|
239
|
+
| | Create | `client.plan_addons.create(plan_id, body)` | Create addon assignment for plan |
|
|
240
|
+
| | Read | `client.plan_addons.get(plan_id, plan_addon_id)` | Get addon assignment for plan |
|
|
241
|
+
| | Read | `client.plan_addons.list(plan_id, **kwargs)` | List addon assignments for plan |
|
|
242
|
+
| | Update | `client.plan_addons.update(plan_id, plan_addon_id, body)` | Update addon assignment for plan |
|
|
243
|
+
| | Delete | `client.plan_addons.delete(plan_id, plan_addon_id)` | Delete addon assignment for plan |
|
|
244
|
+
| **Addons** | | | Manage standalone addons available across plans |
|
|
245
|
+
| | Create | `client.addons.create(request)` | Create a new addon |
|
|
246
|
+
| | Read | `client.addons.get(addon_id, **kwargs)` | Get an addon by ID |
|
|
247
|
+
| | Read | `client.addons.list(**kwargs)` | List all addons |
|
|
248
|
+
| | Update | `client.addons.update(addon_id, request)` | Update an addon |
|
|
249
|
+
| | Delete | `client.addons.delete(addon_id)` | Delete an addon by ID |
|
|
250
|
+
| | Other | `client.addons.publish(addon_id)` | Publish an addon |
|
|
251
|
+
| | Other | `client.addons.archive(addon_id)` | Archive an addon |
|
|
252
|
+
| **Subscriptions** | | | Manage customer subscriptions |
|
|
253
|
+
| | Create | `client.subscriptions.create(body)` | Create a new subscription |
|
|
254
|
+
| | Read | `client.subscriptions.get_expanded(subscription_id, **kwargs)` | Get a subscription with expanded details |
|
|
255
|
+
| | Update | `client.subscriptions.edit(subscription_id, body)` | Edit a subscription |
|
|
256
|
+
| | Update | `client.subscriptions.change(subscription_id, body)` | Change a subscription |
|
|
257
|
+
| | Update | `client.subscriptions.migrate(subscription_id, body)` | Migrate subscription to a new plan version |
|
|
258
|
+
| | Update | `client.subscriptions.restore(subscription_id)` | Restore a canceled subscription |
|
|
259
|
+
| | Delete | `client.subscriptions.cancel(subscription_id, body)` | Cancel a subscription |
|
|
260
|
+
| | Delete | `client.subscriptions.delete(subscription_id)` | Delete a subscription |
|
|
261
|
+
| | Other | `client.subscriptions.unschedule_cancelation(subscription_id)` | Unschedule a subscription cancelation |
|
|
262
|
+
| **Subscription Addons** | | | Manage addons on subscriptions |
|
|
263
|
+
| | Create | `client.subscription_addons.create(subscription_id, body)` | Add an addon to a subscription |
|
|
264
|
+
| | Read | `client.subscription_addons.get(subscription_id, subscription_addon_id)` | Get a subscription addon |
|
|
265
|
+
| | Read | `client.subscription_addons.list(subscription_id, **kwargs)` | List addons on a subscription |
|
|
266
|
+
| | Update | `client.subscription_addons.update(subscription_id, subscription_addon_id, body)` | Update a subscription addon |
|
|
267
|
+
| **Entitlements** | | | Admin entitlements management |
|
|
268
|
+
| | Read | `client.entitlements.list(**kwargs)` | List all entitlements (admin) |
|
|
269
|
+
| | Read | `client.entitlements.get(entitlement_id)` | Get an entitlement by ID |
|
|
270
|
+
| **Entitlements V2** | | | V2 Admin entitlements management |
|
|
271
|
+
| | Read | `client.entitlements_v2.list(**kwargs)` | List all entitlements V2 (admin) |
|
|
272
|
+
| | Read | `client.entitlements_v2.get(entitlement_id_or_feature_key, **kwargs)` | Get an entitlement V2 by ID or feature key |
|
|
273
|
+
| **Customer Entitlements V2** | | | Manage customer entitlements (V2) |
|
|
274
|
+
| | Create | `client.customer_entitlements_v2.post(customer_id_or_key, body)` | Create a customer entitlement |
|
|
275
|
+
| | Read | `client.customer_entitlements_v2.list(customer_id_or_key, **kwargs)` | List customer entitlements |
|
|
276
|
+
| | Read | `client.customer_entitlements_v2.get(customer_id_or_key, entitlement_id_or_feature_key)` | Get a customer entitlement |
|
|
277
|
+
| | Delete | `client.customer_entitlements_v2.delete(customer_id_or_key, entitlement_id)` | Delete a customer entitlement |
|
|
278
|
+
| | Update | `client.customer_entitlements_v2.override(customer_id_or_key, entitlement_id_or_feature_key, override)` | Override a customer entitlement |
|
|
279
|
+
| **Customer Entitlement V2** | | | Single customer entitlement operations (V2) |
|
|
280
|
+
| | Read | `client.customer_entitlement_v2.get_grants(customer_id_or_key, entitlement_id_or_feature_key, **kwargs)` | List grants for a customer entitlement |
|
|
281
|
+
| | Read | `client.customer_entitlement_v2.get_customer_entitlement_value(customer_id_or_key, entitlement_id_or_feature_key, **kwargs)` | Get customer entitlement value |
|
|
282
|
+
| | Read | `client.customer_entitlement_v2.get_customer_entitlement_history(customer_id_or_key, entitlement_id_or_feature_key, **kwargs)` | Get customer entitlement history |
|
|
283
|
+
| | Create | `client.customer_entitlement_v2.create_customer_entitlement_grant(customer_id_or_key, entitlement_id_or_feature_key, grant)` | Create a grant for customer entitlement |
|
|
284
|
+
| | Update | `client.customer_entitlement_v2.reset_customer_entitlement(customer_id_or_key, entitlement_id, **kwargs)` | Reset customer entitlement usage |
|
|
285
|
+
| **Grants** | | | Admin grants management |
|
|
286
|
+
| | Read | `client.grants.list(**kwargs)` | List all grants (admin) |
|
|
287
|
+
| | Delete | `client.grants.delete(grant_id)` | Delete (void) a grant |
|
|
288
|
+
| **Grants V2** | | | V2 Admin grants management |
|
|
289
|
+
| | Read | `client.grants_v2.list(**kwargs)` | List all grants V2 (admin) |
|
|
290
|
+
| **Billing Profiles** | | | Manage billing profiles |
|
|
291
|
+
| | Create | `client.billing_profiles.create(profile)` | Create a billing profile |
|
|
292
|
+
| | Read | `client.billing_profiles.get(id)` | Get a billing profile by ID |
|
|
293
|
+
| | Read | `client.billing_profiles.list(**kwargs)` | List billing profiles |
|
|
294
|
+
| | Update | `client.billing_profiles.update(id, profile)` | Update a billing profile |
|
|
295
|
+
| | Delete | `client.billing_profiles.delete(id)` | Delete a billing profile |
|
|
296
|
+
| **Invoices** | | | Manage invoices |
|
|
297
|
+
| | Read | `client.invoices.list(**kwargs)` | List invoices |
|
|
298
|
+
| | Other | `client.invoices.invoice_pending_lines_action(customer_id, **kwargs)` | Invoice pending lines for customer |
|
|
299
|
+
| **Invoice** | | | Single invoice operations |
|
|
300
|
+
| | Read | `client.invoice.get_invoice(id, **kwargs)` | Get an invoice by ID |
|
|
301
|
+
| | Update | `client.invoice.update_invoice(id, invoice)` | Update an invoice |
|
|
302
|
+
| | Delete | `client.invoice.delete_invoice(id)` | Delete an invoice |
|
|
303
|
+
| | Other | `client.invoice.advance_action(id)` | Advance invoice to next status |
|
|
304
|
+
| | Other | `client.invoice.approve_action(id)` | Approve an invoice |
|
|
305
|
+
| | Other | `client.invoice.retry_action(id, body)` | Retry advancing invoice after failure |
|
|
306
|
+
| | Other | `client.invoice.void_invoice_action(id)` | Void an invoice |
|
|
307
|
+
| | Other | `client.invoice.recalculate_tax_action(id)` | Recalculate invoice tax amounts |
|
|
308
|
+
| | Other | `client.invoice.snapshot_quantities_action(id)` | Snapshot invoice quantities |
|
|
309
|
+
| **Customer Invoice** | | | Customer-specific invoice operations |
|
|
310
|
+
| | Create | `client.customer_invoice.create_pending_invoice_line(customer_id, body)` | Create pending invoice line for customer |
|
|
311
|
+
| | Other | `client.customer_invoice.simulate_invoice(customer_id, **kwargs)` | Simulate an invoice for a customer |
|
|
312
|
+
| **Apps** | | | Manage integrations and app installations |
|
|
313
|
+
| | Read | `client.apps.list(**kwargs)` | List installed apps |
|
|
314
|
+
| | Read | `client.apps.get(id)` | Get an app by ID |
|
|
315
|
+
| | Update | `client.apps.update(id, app)` | Update an app |
|
|
316
|
+
| | Delete | `client.apps.uninstall(id)` | Uninstall an app |
|
|
317
|
+
| **App Stripe** | | | Stripe app integration |
|
|
318
|
+
| | Create | `client.app_stripe.webhook(id, body)` | Handle Stripe webhook event |
|
|
319
|
+
| | Update | `client.app_stripe.update_stripe_api_key(id, request)` | Update Stripe API key |
|
|
320
|
+
| | Create | `client.app_stripe.create_checkout_session(body)` | Create Stripe checkout session |
|
|
321
|
+
| **App Custom Invoicing** | | | Custom invoicing app integration |
|
|
322
|
+
| | Other | `client.app_custom_invoicing.draft_syncronized(id, invoice_number, **kwargs)` | Notify when draft invoice synchronized |
|
|
323
|
+
| | Other | `client.app_custom_invoicing.finalized(id, invoice_number, **kwargs)` | Notify when invoice finalized |
|
|
324
|
+
| | Other | `client.app_custom_invoicing.payment_status(id, invoice_number, body)` | Update invoice payment status |
|
|
325
|
+
| **Marketplace** | | | App marketplace operations |
|
|
326
|
+
| | Read | `client.marketplace.list(**kwargs)` | List marketplace apps |
|
|
327
|
+
| | Read | `client.marketplace.get(app_type)` | Get marketplace app |
|
|
328
|
+
| | Read | `client.marketplace.get_o_auth2_install_url(app_type, **kwargs)` | Get OAuth2 install URL |
|
|
329
|
+
| | Create | `client.marketplace.authorize_o_auth2_install(app_type, **kwargs)` | Authorize OAuth2 installation |
|
|
330
|
+
| | Create | `client.marketplace.install_with_api_key(app_type, body)` | Install app with API key |
|
|
331
|
+
| | Create | `client.marketplace.install(app_type, body)` | Install marketplace app |
|
|
332
|
+
| **Notification Channels** | | | Manage notification channels |
|
|
333
|
+
| | Create | `client.notification_channels.create(channel)` | Create a notification channel |
|
|
334
|
+
| | Read | `client.notification_channels.get(channel_id)` | Get a notification channel by ID |
|
|
335
|
+
| | Read | `client.notification_channels.list(**kwargs)` | List notification channels |
|
|
336
|
+
| | Update | `client.notification_channels.update(channel_id, channel)` | Update a notification channel |
|
|
337
|
+
| | Delete | `client.notification_channels.delete(channel_id)` | Delete a notification channel |
|
|
338
|
+
| **Notification Rules** | | | Manage notification rules |
|
|
339
|
+
| | Create | `client.notification_rules.create(rule)` | Create a notification rule |
|
|
340
|
+
| | Read | `client.notification_rules.get(rule_id)` | Get a notification rule by ID |
|
|
341
|
+
| | Read | `client.notification_rules.list(**kwargs)` | List notification rules |
|
|
342
|
+
| | Update | `client.notification_rules.update(rule_id, rule)` | Update a notification rule |
|
|
343
|
+
| | Delete | `client.notification_rules.delete(rule_id)` | Delete a notification rule |
|
|
344
|
+
| | Other | `client.notification_rules.test(rule_id)` | Test a notification rule |
|
|
345
|
+
| **Notification Events** | | | View notification events |
|
|
346
|
+
| | Read | `client.notification_events.get(event_id)` | Get a notification event by ID |
|
|
347
|
+
| | Read | `client.notification_events.list(**kwargs)` | List notification events |
|
|
348
|
+
| **Progress** | | | Track long-running operations |
|
|
349
|
+
| | Read | `client.progress.get_progress(id)` | Get progress of a long-running operation |
|
|
350
|
+
| **Currencies** | | | Currency information |
|
|
351
|
+
| | Read | `client.currencies.list_currencies()` | List all supported currencies |
|
|
352
|
+
| **Debug** | | | Debug utilities for monitoring and troubleshooting |
|
|
353
|
+
| | Read | `client.debug.metrics()` | Get event ingestion metrics |
|
|
354
|
+
|