모든 미터의 목록을 가져옵니다.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const meter of client.meters.list()) {
console.log(meter.id);
}{
"items": [
{
"aggregation": {
"type": "count",
"key": "<string>"
},
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"event_name": "<string>",
"id": "<string>",
"measurement_unit": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"filter": "<unknown>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Page size default is 10 max is 100
x >= 0Page number default is 0
x >= 0List archived meters
Meters List
표시 하위 속성
A filter structure that combines multiple conditions with logical conjunctions (AND/OR).
Supports up to 3 levels of nesting to create complex filter expressions. Each filter has a conjunction (and/or) and clauses that can be either direct conditions or nested filters.
표시 하위 속성
Filter condition with key, operator, and value
표시 하위 속성
Filter key to apply
1 - 100equals, not_equals, greater_than, greater_than_or_equals, less_than, less_than_or_equals, contains, does_not_contain Filter value - can be string, number, or boolean
Logical conjunction to apply between clauses (and/or)
and, or {
"clauses": [
{
"key": "user_id",
"operator": "equals",
"value": "user123"
},
{
"key": "amount",
"operator": "greater_than",
"value": 100
}
],
"conjunction": "and"
}import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const meter of client.meters.list()) {
console.log(meter.id);
}{
"items": [
{
"aggregation": {
"type": "count",
"key": "<string>"
},
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"event_name": "<string>",
"id": "<string>",
"measurement_unit": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"filter": "<unknown>"
}
]
}