openvibers/openvibe.billing Commits
Declare billing.usage.record in repo docs and note usage keying (#5)
Changes
nnew file mode 100644@@@ -0,0 +1,21 @@++{++ "id": "billing.usage.record",++ "version": "1.0",++ "owner": "billing",++ "status": "active",++ "visibility": "internal",++ "description": "Record a platform.usage-sample@1 reading without moving money. The reading's idempotency_key deduplicates retries. Listing all readings requires billing.ledger.admin.",++ "permissions": [++ "billing:usage"++ ],++ "resourceConstraints": [++ "none"++ ],++ "quotaClass": "ledger-write",++ "events": [],++ "implementedBy": [++ "POST /api/v1/usage"++ ],++ "inputSchema": "platform.usage-sample@1",++ "outputSchema": "billing.usage-record-result@1"++}@@@ -21,7 +21,8 @@"billing.cashout.manage","billing.subscription.manage","billing.entitlement.check",-- "billing.ledger.admin"++ "billing.ledger.admin",++ "billing.usage.record"],"eventsProduced": ["billing.transaction.settled",@@@ -2,7 +2,8 @@/*** /api/v1 — the operations API. Service tokens only (audience openvibe.billing); Live is the-- * first client. Every mutating call needs an Idempotency-Key and is refused with 503++ * first client. Every mutating call needs an Idempotency-Key — except POST /api/v1/usage,++ * which is keyed by the reading's own idempotency_key — and is refused with 503* billing.frozen while the economy is frozen (reads keep working).** Amounts are integers: bits for Vibes (vibes-bits), cents for money (usd-cents). People are
new file mode 100644
new file mode 100644
@@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
+{
+ "id": "billing.usage.record",
+ "version": "1.0",
+ "owner": "billing",
+ "status": "active",
+ "visibility": "internal",
+ "description": "Record a platform.usage-sample@1 reading without moving money. The reading's idempotency_key deduplicates retries. Listing all readings requires billing.ledger.admin.",
+ "permissions": [
+ "billing:usage"
+ ],
+ "resourceConstraints": [
+ "none"
+ ],
+ "quotaClass": "ledger-write",
+ "events": [],
+ "implementedBy": [
+ "POST /api/v1/usage"
+ ],
+ "inputSchema": "platform.usage-sample@1",
+ "outputSchema": "billing.usage-record-result@1"
+}
@@ -21,7 +21,8 @@
@@ -21,7 +21,8 @@
"billing.cashout.manage",
"billing.cashout.manage",
"billing.subscription.manage",
"billing.subscription.manage",
"billing.entitlement.check",
"billing.entitlement.check",
- "billing.ledger.admin"
+ "billing.ledger.admin",
+ "billing.usage.record"
],
],
"eventsProduced": [
"eventsProduced": [
"billing.transaction.settled",
"billing.transaction.settled",
@@ -2,7 +2,8 @@
@@ -2,7 +2,8 @@
/**
/**
* /api/v1 — the operations API. Service tokens only (audience openvibe.billing); Live is the
* /api/v1 — the operations API. Service tokens only (audience openvibe.billing); Live is the
- * first client. Every mutating call needs an Idempotency-Key and is refused with 503
+ * first client. Every mutating call needs an Idempotency-Key — except POST /api/v1/usage,
+ * which is keyed by the reading's own idempotency_key — and is refused with 503
* billing.frozen while the economy is frozen (reads keep working).
* billing.frozen while the economy is frozen (reads keep working).
*
*
* Amounts are integers: bits for Vibes (vibes-bits), cents for money (usd-cents). People are
* Amounts are integers: bits for Vibes (vibes-bits), cents for money (usd-cents). People are