{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/run402-com/json-schema/run402-com-metering-setting-schema.json",
  "title": "MeteringSetting",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/run402-com-billing-api-openapi.yml#/components/schemas/MeteringSetting",
  "type": "object",
  "required": [
    "enabled"
  ],
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "cap_usd_micros": {
      "type": "integer",
      "minimum": 1000000,
      "description": "The monthly cap; required the first time metering is enabled, kept otherwise."
    },
    "standing_order": {
      "type": "object",
      "required": [
        "enabled"
      ],
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Requires a saved card (POST …/billing/payment-methods/setup); `STANDING_ORDER_REQUIRES_CARD` otherwise."
        },
        "threshold_usd_micros": {
          "type": "integer",
          "minimum": 5000000,
          "default": 10000000
        },
        "recharge_usd_micros": {
          "type": "integer",
          "minimum": 5000000,
          "default": 20000000
        }
      }
    }
  }
}