{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commsharbor/json-schema/commsharbor-payment-quota-schema.json",
  "title": "PaymentQuota",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commsharbor-pricing-api-openapi.yml#/components/schemas/PaymentQuota",
  "type": "object",
  "properties": {
    "free": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PaymentFree"
      },
      "description": "Free allowances and their windows."
    },
    "paid": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PaymentPrice"
      },
      "description": "List prices in USD or in the stated currency; account-only offers are marked. The operation's 402 is the payable quote."
    },
    "how_to_pay": {
      "type": "string",
      "description": "Payment instructions and availability restrictions."
    },
    "live": {
      "type": [
        "string",
        "null"
      ],
      "description": "Authoritative product quota endpoint."
    },
    "free_now": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "SKUs temporarily free despite their list price."
    },
    "charged_now": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "SKUs charged at their list price even when free_now has `*`."
    },
    "trial": {
      "allOf": [
        {
          "$ref": "#/$defs/PaymentTrial"
        }
      ],
      "description": "Registration trial, when offered."
    }
  },
  "required": [
    "free",
    "paid",
    "how_to_pay",
    "live"
  ],
  "$defs": {
    "PaymentFree": {
      "type": "object",
      "properties": {
        "o_que": {
          "type": "string",
          "description": "Operation or allowance."
        },
        "limite": {
          "type": "string",
          "description": "Allowance and eligibility."
        },
        "janela": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reset window, when applicable."
        }
      },
      "required": [
        "o_que",
        "limite",
        "janela"
      ]
    },
    "PaymentPrice": {
      "type": "object",
      "properties": {
        "o_que": {
          "type": "string",
          "description": "Operation and billing unit."
        },
        "price_usd": {
          "type": "number",
          "description": "Current list price in USD."
        },
        "price": {
          "type": "string",
          "description": "Price with its currency or billing unit."
        },
        "so_conta": {
          "type": "boolean",
          "description": "Only a signed-in account can buy this offer."
        }
      },
      "required": [
        "o_que"
      ]
    },
    "PaymentTrial": {
      "type": "object",
      "properties": {
        "days": {
          "type": "integer",
          "description": "Trial duration in days."
        },
        "how": {
          "type": "string",
          "description": "Eligibility and activation steps."
        }
      },
      "required": [
        "days",
        "how"
      ]
    }
  }
}