{
  "openapi": "3.0.0",
  "info": {
    "title": "Zuplo Developer API",
    "version": "1.0.0",
    "termsOfService": "https://zuplo.com/legal/terms",
    "contact": {
      "name": "Zuplo",
      "url": "https://zuplo.com/",
      "email": "support@zuplo.com"
    },
    "description": "The Zuplo Developer API lets you programmatically manage your Zuplo account, projects, environments, tunnels, custom domains, and more. Use it to automate workflows, integrate with CI/CD pipelines, or build custom tooling on top of Zuplo.\n\n## Authentication\n\nAll API requests require a **Bearer token** in the `Authorization` header:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\n### Creating an API Key\n\n1. Navigate to [portal.zuplo.com](https://portal.zuplo.com) and log in.\n2. Select the account you want to work with.\n3. Go to **Settings** > **API Keys**.\n4. Click **Create New Key** or copy an existing key.\n\nAPI keys are scoped to your account, so a single key works for all projects under that account. If you belong to multiple accounts, make sure to select the correct one before creating a key.\n\n> **⚠️ Warning:** Keep your API key secure. Do not commit it to version control or share it publicly. Use environment variables to store your key in CI/CD environments.\n"
  },
  "externalDocs": {
    "url": "https://zuplo.com/docs/articles/accounts/zuplo-api-keys",
    "description": "Create and scope Zuplo account API keys"
  },
  "tags": [
    {
      "name": "Analytics",
      "description": "Analytics and usage data"
    },
    {
      "name": "API Keys - Buckets",
      "description": "A Bucket is an object representing a group of API key consumers for a given account. This section includes a group of endpoints available to perform CRUD operations on a bucket. You can learn more about buckets [here](https://zuplo.com/docs/articles/api-key-buckets)."
    },
    {
      "name": "API Keys - Consumers",
      "description": "A Consumer is an object representing a group of API keys in a given bucket. This section includes a group of endpoints available to perform CRUD operations on a consumer. You can learn more about consumers [here](https://zuplo.com/docs/articles/api-key-management#consumers)."
    },
    {
      "name": "API Keys - Keys",
      "description": "This is an object representing an API key. This section includes a list of endpoints to perform CRUD operations on an API key. You can learn more about API keys [here](https://zuplo.com/docs/articles/api-key-management#api-keys)."
    },
    {
      "name": "API Keys - Managers",
      "description": "A Manager is an object representing a group of managers in a given consumer. This section includes a group of endpoints available to perform operations on a manager. You can learn more about consumer managers [here](https://zuplo.com/docs/articles/api-key-management#consumers)."
    },
    {
      "name": "Audit Logs"
    },
    {
      "name": "Build Logs"
    },
    {
      "name": "Client Auth - OAuth",
      "description": "Client authentication endpoints"
    },
    {
      "name": "Client mTLS CA Certificates",
      "description": "Manage account-level client mTLS CA certificates"
    },
    {
      "name": "Custom Domains",
      "description": "Manage account custom domains and their deployment mappings"
    },
    {
      "name": "Deployments",
      "description": "Set of operations available to handle deployments. You can learn more about deployments [here](https://zuplo.com/docs/articles/environments)."
    },
    {
      "name": "Environments",
      "description": "Zuplo environments"
    },
    {
      "name": "Key Auth V2 - Api Keys",
      "description": "API key authentication management"
    },
    {
      "name": "Managed Dedicated - Fleet Configurations",
      "description": "Manage proxy configurations for managed-dedicated fleets"
    },
    {
      "name": "Managed Dedicated - Fleets",
      "description": "List and retrieve fleet information"
    },
    {
      "name": "MCP Servers",
      "description": "MCP server endpoints for AI-powered tools"
    },
    {
      "name": "Metering - Apps"
    },
    {
      "name": "Metering - Billing"
    },
    {
      "name": "Metering - Buckets",
      "description": "API Metering bucket management"
    },
    {
      "name": "Metering - Customers"
    },
    {
      "name": "Metering - Events"
    },
    {
      "name": "Metering - Features"
    },
    {
      "name": "Metering - Marketplace"
    },
    {
      "name": "Metering - Meters"
    },
    {
      "name": "Metering - Plans",
      "description": "API Metering plan management"
    },
    {
      "name": "Metering - Quotas",
      "description": "API Metering quotas"
    },
    {
      "name": "Metering - Subscriptions",
      "description": "API Metering subscriptions"
    },
    {
      "name": "Metering V2 - Consumer Usage"
    },
    {
      "name": "Metering V2 - Consumers"
    },
    {
      "name": "Metering V2 - Plans",
      "description": "API Metering plan management"
    },
    {
      "name": "Metering V2 - Subscription Usage"
    },
    {
      "name": "Metering V2 - Subscriptions",
      "description": "API Metering bucket management"
    },
    {
      "name": "Metering V2 - Tenants",
      "description": "API Metering tenant management"
    },
    {
      "name": "Metering V2 - Users",
      "description": "API Metering user managmenet"
    },
    {
      "name": "Metering V3 - API Keys"
    },
    {
      "name": "Metering V3 - Customer Member Invites"
    },
    {
      "name": "Metering V3 - Customer Members"
    },
    {
      "name": "Metering V3 - Monetization Configuration"
    },
    {
      "name": "Metering V3 - Payment Checkout"
    },
    {
      "name": "Metering V3 - Plan Invites"
    },
    {
      "name": "Metering V3 - Plans"
    },
    {
      "name": "Metering V3 - Stripe Setup"
    },
    {
      "name": "Metering V3 - Subscriptions"
    },
    {
      "name": "Metering V3 - Users"
    },
    {
      "name": "mTLS"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Runtime Logs"
    },
    {
      "name": "Tunnel Services",
      "description": "List of endpoints available to manage services for a given tunnel."
    },
    {
      "name": "Tunnels",
      "description": "List of endpoints available to perform operations on Tunnels."
    },
    {
      "name": "Variables",
      "description": "Set of operations available to create and update environment variables. You can learn more about environment variables [here](https://zuplo.com/docs/articles/environment-variables)."
    }
  ],
  "paths": {
    "/mcp": {
      "post": {
        "operationId": "developerApiMcpServer",
        "summary": "Zuplo Platform MCP Server",
        "description": "Exposes the public Zuplo Developer API operations as MCP tools.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "tags": [
          "MCP Servers"
        ],
        "x-mcp-server": {
          "name": "com.zuplo/platform",
          "version": "1.0.0"
        }
      }
    },
    "/mcp/docs": {
      "post": {
        "operationId": "docsMcpPost",
        "summary": "Docs MCP Server",
        "description": "Public Streamable HTTP MCP server for Zuplo documentation tools and stable agent resources.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "tags": [
          "MCP Servers"
        ],
        "security": [
          {}
        ],
        "x-mcp-server": {
          "name": "com.zuplo/docs",
          "version": "1.0.0",
          "tools": [
            {
              "name": "search-zuplo-docs",
              "description": "Use this tool to do a semantic search for reference content related to Zuplo. The results provided will be extracts from documentation sites and other public sources like GitHub. The content may not fully answer your question -- be circumspect when reviewing and interpreting these extracts before using them in your response."
            },
            {
              "name": "ask-question-about-zuplo",
              "description": "Use this tool to ask a question about Zuplo to an AI Support Agent that is knowledgeable about Zuplo. Use this tool to ask specific troubleshooting, feature capability, or conceptual questions. Be specific and provide the minimum context needed to address your question in full"
            }
          ]
        }
      },
      "get": {
        "operationId": "docsMcpGet",
        "summary": "Docs MCP Server stream",
        "description": "Returns HTTP 405 because this stateless MCP server does not offer a standalone server-sent event stream.",
        "parameters": [],
        "responses": {
          "405": {
            "description": "Client error",
            "headers": {
              "Allow": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "POST"
                  ]
                }
              }
            },
            "content": {
              "text/plain; charset=utf-8": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "MCP Servers"
        ],
        "security": [
          {}
        ]
      },
      "delete": {
        "operationId": "docsMcpDelete",
        "summary": "Docs MCP Server session termination",
        "description": "Returns HTTP 405 because this MCP server is stateless and does not create protocol sessions.",
        "parameters": [],
        "responses": {
          "405": {
            "description": "Client error",
            "headers": {
              "Allow": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "POST"
                  ]
                }
              }
            },
            "content": {
              "text/plain; charset=utf-8": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "MCP Servers"
        ],
        "security": [
          {}
        ]
      }
    },
    "/mcp/docs/server-card": {
      "get": {
        "operationId": "docsMcpServerCard",
        "summary": "Docs MCP Server Card",
        "description": "Experimental MCP Server Card describing the public Docs MCP endpoint and its supported protocol versions.",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "headers": {
              "Access-Control-Allow-Headers": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "Content-Type, If-None-Match"
                  ]
                }
              },
              "Access-Control-Allow-Methods": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "GET"
                  ]
                }
              },
              "Access-Control-Allow-Origin": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "*"
                  ]
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "ETag"
                  ]
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "public, max-age=3600"
                  ]
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/mcp-server-card+json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.MCP.McpServerCardDocument"
                }
              }
            }
          },
          "304": {
            "description": "The client has made a conditional request and the resource has not been modified.",
            "headers": {
              "Access-Control-Allow-Headers": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "Content-Type, If-None-Match"
                  ]
                }
              },
              "Access-Control-Allow-Methods": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "GET"
                  ]
                }
              },
              "Access-Control-Allow-Origin": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "*"
                  ]
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "ETag"
                  ]
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "public, max-age=3600"
                  ]
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "MCP Servers"
        ],
        "security": [
          {}
        ]
      }
    },
    "/mcp/server-card": {
      "get": {
        "operationId": "platformMcpServerCard",
        "summary": "Platform MCP Server Card",
        "description": "Experimental MCP Server Card describing the authenticated Zuplo Platform MCP endpoint.",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "headers": {
              "Access-Control-Allow-Headers": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "Content-Type, If-None-Match"
                  ]
                }
              },
              "Access-Control-Allow-Methods": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "GET"
                  ]
                }
              },
              "Access-Control-Allow-Origin": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "*"
                  ]
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "ETag"
                  ]
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "public, max-age=3600"
                  ]
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/mcp-server-card+json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.MCP.McpServerCardDocument"
                }
              }
            }
          },
          "304": {
            "description": "The client has made a conditional request and the resource has not been modified.",
            "headers": {
              "Access-Control-Allow-Headers": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "Content-Type, If-None-Match"
                  ]
                }
              },
              "Access-Control-Allow-Methods": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "GET"
                  ]
                }
              },
              "Access-Control-Allow-Origin": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "*"
                  ]
                }
              },
              "Access-Control-Expose-Headers": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "ETag"
                  ]
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string",
                  "enum": [
                    "public, max-age=3600"
                  ]
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "MCP Servers"
        ],
        "security": [
          {}
        ]
      }
    },
    "/openapi": {
      "get": {
        "operationId": "openApi",
        "summary": "OpenAPI Specification",
        "description": "Returns the OpenAPI V3 spec for Zuplo's Developer API",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.OpenApiRoute.ApiSpec"
                }
              }
            }
          }
        },
        "security": [
          {}
        ]
      }
    },
    "/v1/accounts": {
      "get": {
        "operationId": "AccountService_list",
        "summary": "Lists accounts",
        "description": "Lists the accounts for the user or api key.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Accounts.AccountsList"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/audit-logs": {
      "get": {
        "operationId": "AuditLogsService_list",
        "summary": "Query audit logs",
        "description": "Retrieves audit logs with optional filtering and pagination.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogs.AuditLogsQuery.limit"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogs.AuditLogsQuery.offset"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogs.AuditLogsQuery.action"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogs.AuditLogsQuery.startDate"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogs.AuditLogsQuery.endDate"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogs.AuditLogsQuery.actor"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogs.AuditLogsQuery.success"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.AuditLogs.AuditLogsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Audit Logs"
        ]
      }
    },
    "/v1/accounts/{accountName}/client-mtls-ca-certificates": {
      "post": {
        "operationId": "ClientMtlsCaCertificatesService_create",
        "summary": "Create Client mTLS CA Certificate",
        "description": "Creates a client mTLS CA certificate for an account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          }
        ],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificate"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Client mTLS CA Certificates"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateCreateBody"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "ClientMtlsCaCertificatesService_list",
        "summary": "List Client mTLS CA Certificates",
        "description": "Lists client mTLS CA certificates for an account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateListResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Client mTLS CA Certificates"
        ]
      }
    },
    "/v1/accounts/{accountName}/client-mtls-ca-certificates/{id}": {
      "patch": {
        "operationId": "ClientMtlsCaCertificatesService_update",
        "summary": "Update Client mTLS CA Certificate",
        "description": "Updates a client mTLS CA certificate.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificate"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Client mTLS CA Certificates"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateUpdateBody"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "ClientMtlsCaCertificatesService_delete",
        "summary": "Delete Client mTLS CA Certificate",
        "description": "Deletes a client mTLS CA certificate.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateParams"
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful."
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Client mTLS CA Certificates"
        ]
      }
    },
    "/v1/accounts/{accountName}/custom-domains": {
      "get": {
        "operationId": "CustomDomainsService_list",
        "summary": "Get Custom Domains",
        "description": "Gets the account custom domains",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainsList"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Custom Domains"
        ]
      },
      "post": {
        "operationId": "CustomDomainsService_create",
        "summary": "Create Custom Domain",
        "description": "Creates a custom domain",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainMutationResult"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Custom Domains"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainCreateBody"
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "CustomDomainsService_update",
        "summary": "Update a Custom Domain",
        "description": "Updates a custom domain",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainMutationResult"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Custom Domains"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainUpdateBody"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "CustomDomainsService_delete",
        "summary": "Delete a Custom Domain",
        "description": "Delete a custom domain",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.CustomDomains.CustomDomainDeleteQuery.hostname"
          },
          {
            "$ref": "#/components/parameters/Zuplo.CustomDomains.CustomDomainDeleteQuery.deploymentName"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded."
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Custom Domains"
        ]
      }
    },
    "/v1/accounts/{accountName}/key-buckets": {
      "get": {
        "operationId": "ApiKeyBucketsService_list",
        "summary": "Lists buckets",
        "description": "Lists all buckets belonging to this account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Buckets"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Buckets"
        ]
      },
      "post": {
        "operationId": "ApiKeyBucketsService_create",
        "summary": "Creates a bucket",
        "description": "Creates a new bucket for this account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Bucket"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Buckets"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.ApiKeys.BucketCreateBody"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/key-buckets/{bucketName}": {
      "get": {
        "operationId": "ApiKeyBucketsService_read",
        "summary": "Gets a bucket",
        "description": "Returns the details for a bucket, including the token used to connect to the bucket.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Bucket"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Buckets"
        ]
      },
      "patch": {
        "operationId": "ApiKeyBucketsService_update",
        "summary": "Updates a bucket",
        "description": "Updates a bucket, and returns the updated value.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Bucket"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Buckets"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.ApiKeys.BucketUpdateBody"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "ApiKeyBucketsService_delete",
        "summary": "Deletes a bucket",
        "description": "Deletes a bucket and any related resources",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful."
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Buckets"
        ]
      }
    },
    "/v1/accounts/{accountName}/key-buckets/{bucketName}/consumers": {
      "get": {
        "operationId": "ApiKeyConsumersService_list",
        "summary": "Lists consumers",
        "description": "Lists all consumers belonging to this account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "description": "The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used. Default: 1000",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            },
            "explode": false
          },
          {
            "name": "offset",
            "in": "query",
            "required": true,
            "description": "The offset of the first item returned in the collection. Default: 0",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "explode": false
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.IncludeApiKeyParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.IncludeManagerInvitesParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.IncludeManagerParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.KeyFormatQueryParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ManagerEmailQueryParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.TagQueryParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Consumers"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Consumers"
        ]
      },
      "post": {
        "operationId": "ApiKeyConsumersService_create",
        "summary": "Creates a consumer",
        "description": "Creates a new consumer for this account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.WithApiKeyQueryParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Consumer"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Consumers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.ApiKeys.ConsumerCreateBody"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/key-buckets/{bucketName}/consumers/{consumerName}": {
      "get": {
        "operationId": "ApiKeyConsumersService_read",
        "summary": "Gets a consumer",
        "description": "Gets a consumer given a bucket name and consumer name.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.IncludeApiKeyParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.KeyFormatQueryParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.IncludeManagerParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.IncludeManagerInvitesParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.TagQueryParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Consumer"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Consumers"
        ]
      },
      "patch": {
        "operationId": "ApiKeyConsumersService_update",
        "summary": "Updates a consumer",
        "description": "Update the consumer with the matching consumer name.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.TagQueryParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Consumer"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Consumers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.ApiKeys.ConsumerUpdateBody"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "ApiKeyConsumersService_delete",
        "summary": "Deletes a consumer",
        "description": "Deletes a consumer and any related resources",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.TagQueryParam"
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful."
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Consumers"
        ]
      }
    },
    "/v1/accounts/{accountName}/key-buckets/{bucketName}/consumers/{consumerName}/keys": {
      "get": {
        "operationId": "ApiKeyKeysService_list",
        "summary": "Lists keys",
        "description": "Lists all keys for this consumer.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "description": "The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used. Default: 1000",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            },
            "explode": false
          },
          {
            "name": "offset",
            "in": "query",
            "required": true,
            "description": "The offset of the first item returned in the collection. Default: 0",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "explode": false
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.KeyFormatQueryParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKeys"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Keys"
        ]
      },
      "post": {
        "operationId": "ApiKeyKeysService_create",
        "summary": "Creates an API key",
        "description": "Creates a new API key for this consumer. New API keys will automatically have [API Key Leak Detection](https://zuplo.com/docs/articles/api-key-leak-detection) enabled.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKey"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKeyCreateOrUpdateBody"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/key-buckets/{bucketName}/consumers/{consumerName}/keys/$bulk": {
      "post": {
        "operationId": "ApiKeyKeysService_bulkCreate",
        "summary": "Creates multiple API keys",
        "description": "Creates multiple new API keys for this consumer.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKeys"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyBulkCreateOrUpdateBody"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/key-buckets/{bucketName}/consumers/{consumerName}/keys/{keyId}": {
      "get": {
        "operationId": "ApiKeyKeysService_get",
        "summary": "Gets an API key",
        "description": "Retrieves an API key for this consumer.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ApiKeyParams.keyId"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.KeyFormatQueryParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.TagQueryParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKey"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Keys"
        ]
      },
      "patch": {
        "operationId": "ApiKeyKeysService_update",
        "summary": "Updates an API key",
        "description": "Updates an API key for this consumer.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ApiKeyParams.keyId"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.TagQueryParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKey"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKeyCreateOrUpdateBody"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "ApiKeyKeysService_delete",
        "summary": "Deletes an API key",
        "description": "Deletes an API key for this consumer.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ApiKeyParams.keyId"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.TagQueryParam"
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful."
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Keys"
        ]
      }
    },
    "/v1/accounts/{accountName}/key-buckets/{bucketName}/consumers/{consumerName}/managers": {
      "get": {
        "operationId": "ApiKeyConsumerManagers_list",
        "summary": "Lists managers",
        "description": "Lists all managers belonging to a consumer.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          },
          {
            "name": "limit",
            "in": "query",
            "required": true,
            "description": "The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used. Default: 1000",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            },
            "explode": false
          },
          {
            "name": "offset",
            "in": "query",
            "required": true,
            "description": "The offset of the first item returned in the collection. Default: 0",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Managers"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Managers"
        ]
      },
      "post": {
        "operationId": "ApiKeyConsumerManagers_create",
        "summary": "Creates a manager",
        "description": "Creates a new manager for a consumer.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Manager"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Managers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.ApiKeys.ManagerCreateBody"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/key-buckets/{bucketName}/consumers/{consumerName}/managers/{managerId}": {
      "delete": {
        "operationId": "ApiKeyConsumerManagers_delete",
        "summary": "Deletes a manager",
        "description": "Deletes a manager record",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ManagerParams.managerId"
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful."
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Managers"
        ]
      }
    },
    "/v1/accounts/{accountName}/key-buckets/{bucketName}/consumers/{consumerName}/roll-key": {
      "post": {
        "operationId": "ApiKeyConsumersService_rollKey",
        "summary": "Roll consumer keys",
        "description": "Set expiration for keys with no expiration date and creates a new key.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.BucketParams.bucketName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.ConsumerParams.consumerName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.ApiKeys.TagQueryParam"
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful."
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitWithRetryAfter"
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "API Keys - Consumers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.Common.ExpiresOnField"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/projects/{projectName}/branches/{branchName}/variables": {
      "post": {
        "operationId": "VariablesService_create",
        "summary": "Creates a variable",
        "description": "Creates a new environment variable in a branch for a given project.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountProjectParams.projectName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Common.BranchParams"
          }
        ],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Variables.Variable"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Variables"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.Variables.VariableCreateBody"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/projects/{projectName}/branches/{branchName}/variables/{variableName}": {
      "patch": {
        "operationId": "VariablesService_update",
        "summary": "Updates a variable",
        "description": "Update the value of a variable in a branch for a given project.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountProjectParams.projectName"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Common.BranchParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Common.VariableParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Variables.Variable"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Variables"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.Variables.VariableUpdateBody"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/projects/{projectName}/deployment-status/{statusId}": {
      "get": {
        "operationId": "V1_deploymentStatus",
        "summary": "Gets a deployment status",
        "description": "Gets the deployment status of your upload. Use the UUID of the uploaded sources as the `statusId`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountProjectParams.projectName"
          },
          {
            "name": "statusId",
            "in": "path",
            "required": true,
            "description": "The UUID of the uploaded sources.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.DeploymentStatus.DeploymentStatus"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Deployments"
        ]
      }
    },
    "/v1/accounts/{accountName}/projects/{projectName}/deployments": {
      "get": {
        "operationId": "DeploymentsService_list",
        "summary": "Lists deployments",
        "description": "Lists the deployments for the specified account and project.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountProjectParams.projectName"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Deployments.DeploymentsList"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Deployments"
        ]
      }
    },
    "/v1/accounts/{accountName}/tunnels": {
      "get": {
        "operationId": "TunnelService_list",
        "summary": "Lists tunnels",
        "description": "Lists all tunnels belonging to this account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Tunnels.TunnelList"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Tunnels"
        ]
      },
      "post": {
        "operationId": "TunnelService_create",
        "summary": "Creates a tunnel",
        "description": "Creates a new tunnel for this account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          }
        ],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Tunnels.Tunnel"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Tunnels"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.Tunnels.Tunnel"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/tunnels/{tunnelId}": {
      "get": {
        "operationId": "TunnelService_read",
        "summary": "Gets a tunnel",
        "description": "Returns the details for a tunnel, including the token used to connect to the tunnel.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Tunnels.TunnelIdParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Tunnels.Tunnel"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Tunnels"
        ]
      },
      "delete": {
        "operationId": "TunnelService_delete",
        "summary": "Deletes a tunnel",
        "description": "Deletes a tunnel and any services that it has.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Tunnels.TunnelIdParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Tunnels.TunnelTeardownOperation"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Tunnels"
        ]
      }
    },
    "/v1/accounts/{accountName}/tunnels/{tunnelId}/$rotate-token": {
      "post": {
        "operationId": "TunnelService_update",
        "summary": "Rotates the token",
        "description": "Rotates the token used to connect to the tunnel.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Tunnels.TunnelIdParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Tunnels.Tunnel"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Tunnels"
        ]
      }
    },
    "/v1/accounts/{accountName}/tunnels/{tunnelId}/provisioning-operations/{operationId}": {
      "get": {
        "operationId": "TunneledServicesService_getProvisioningStatus",
        "summary": "Gets a provisioning status",
        "description": "This endpoint returns the status of the services that the tunnel is currently configured for. Provisioning the services is an asynchronous process so this endpoint allows you to poll the status.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Tunnels.TunnelIdParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Tunnels.TunneledServiceProvisioningStatusParams.operationId"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Tunnels.TunneledServicesProvisioningOperation"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Tunnel Services"
        ]
      }
    },
    "/v1/accounts/{accountName}/tunnels/{tunnelId}/services-configuration": {
      "get": {
        "operationId": "TunneledServicesService_getServiceConfiguration",
        "summary": "Gets a service configuration",
        "description": "This endpoint returns a snapshot of the services that the tunnel is currently configured for.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Tunnels.TunnelIdParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Tunnels.TunneledServicesConfiguration"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Tunnel Services"
        ]
      },
      "put": {
        "operationId": "TunneledServicesService_putServiceConfiguration",
        "summary": "Configures tunnel services",
        "description": "This endpoint reads the request body and creates/updates/delete the services that the tunnel connects to.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Tunnels.TunnelIdParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Tunnels.TunneledServicesProvisioningOperation"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Tunnel Services"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.Tunnels.TunneledServicesConfiguration"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{accountName}/tunnels/{tunnelId}/teardown-operations/{operationId}": {
      "get": {
        "operationId": "TunnelService_getProvisioningStatus",
        "summary": "Gets a teardown status",
        "description": "This endpoint returns the status of the deletion of the tunnel. Tearing down the tunnel is an asynchronous process so this endpoint allows you to poll the status.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.AccountParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Tunnels.TunnelIdParam"
          },
          {
            "$ref": "#/components/parameters/Zuplo.Tunnels.TunnelTeardownStatusParams.operationId"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Tunnels.TunnelTeardownOperation"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Tunnels"
        ]
      }
    },
    "/v1/audit-logs/{bucketId}/events": {
      "get": {
        "operationId": "BucketAuditLogsService_query_events",
        "summary": "Query audit log events",
        "description": "Search audit log events for a bucket. Supports filtering by event type, actor, subject, and time range.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.BucketParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsEventsQuery.limit"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsEventsQuery.offset"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsEventsQuery.type"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsEventsQuery.actorSub"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsEventsQuery.subject"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsEventsQuery.startDate"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsEventsQuery.endDate"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.AuditLogsV1.AuditLogsEventsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Audit Logs"
        ]
      }
    },
    "/v1/audit-logs/{bucketId}/stats": {
      "get": {
        "operationId": "BucketAuditLogsService_stats",
        "summary": "Aggregated audit log stats",
        "description": "Returns top-N event counts grouped by event type or actor sub.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.BucketParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsStatsQuery.groupBy"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsStatsQuery.limit"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsStatsQuery.startDate"
          },
          {
            "$ref": "#/components/parameters/Zuplo.AuditLogsV1.AuditLogsStatsQuery.endDate"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.AuditLogsV1.AuditLogsStatsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Audit Logs"
        ]
      }
    },
    "/v1/deployments/sources": {
      "post": {
        "operationId": "DeployService_sources",
        "summary": "Upload deployment source",
        "description": "Creates a URL for uploading sources.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Sources.Source"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Deployments"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.Deploys.SourceCreateBody"
              }
            }
          }
        }
      }
    },
    "/v1/deployments/{deploymentName}": {
      "get": {
        "operationId": "DeploymentsService_read",
        "summary": "Get a deployment",
        "description": "Gets the specified deployment.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.DeployParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Deployments.Deployment"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Deployments"
        ]
      },
      "delete": {
        "operationId": "DeploymentsService_delete",
        "summary": "Deletes a deployment",
        "description": "Deletes the specified deployment.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.DeployParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded."
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Deployments"
        ]
      }
    },
    "/v1/deployments/{deploymentName}/build-logs/{buildId}": {
      "get": {
        "operationId": "BuildLogsService_get",
        "summary": "Get build logs",
        "description": "Retrieves the build logs for a deployment build, grouped by stage (API and Dev Portal) and by build step. Optionally filterable by `stage` and `step`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.DeployParams"
          },
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the build (UUID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Zuplo.BuildLogs.BuildLogsQuery.stage"
          },
          {
            "$ref": "#/components/parameters/Zuplo.BuildLogs.BuildLogsQuery.step"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.BuildLogs.BuildLogsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Build Logs"
        ]
      }
    },
    "/v1/deployments/{deploymentName}/deploy": {
      "post": {
        "operationId": "DeployService_redeploy",
        "summary": "Re-deploy a deployment",
        "description": "Re-deploys the specified deployment so that it can pick up new environment variables or other configuration changes.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.DeployParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Deploys.DeploymentResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Deployments"
        ]
      }
    },
    "/v1/deployments/{deploymentName}/logs/requests": {
      "get": {
        "operationId": "RuntimeLogsService_listRequests",
        "summary": "List request logs",
        "description": "Lists request-log summaries for a deployment within the given time window, ordered most recent first. Supports cursor pagination and optional filtering by HTTP method, status class, route path, log severity, and free-text search.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.DeployParams"
          },
          {
            "$ref": "#/components/parameters/Zuplo.RuntimeLogs.RequestLogsListQuery.startTime"
          },
          {
            "$ref": "#/components/parameters/Zuplo.RuntimeLogs.RequestLogsListQuery.endTime"
          },
          {
            "$ref": "#/components/parameters/Zuplo.RuntimeLogs.RequestLogsListQuery.cursor"
          },
          {
            "$ref": "#/components/parameters/Zuplo.RuntimeLogs.RequestLogsListQuery.limit"
          },
          {
            "$ref": "#/components/parameters/Zuplo.RuntimeLogs.RequestLogsListQuery.httpMethod"
          },
          {
            "$ref": "#/components/parameters/Zuplo.RuntimeLogs.RequestLogsListQuery.httpStatus"
          },
          {
            "$ref": "#/components/parameters/Zuplo.RuntimeLogs.RequestLogsListQuery.routePath"
          },
          {
            "$ref": "#/components/parameters/Zuplo.RuntimeLogs.RequestLogsListQuery.search"
          },
          {
            "$ref": "#/components/parameters/Zuplo.RuntimeLogs.RequestLogsListQuery.severity"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.RuntimeLogs.RequestLogsListResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Runtime Logs"
        ]
      }
    },
    "/v1/deployments/{deploymentName}/logs/requests/{requestId}": {
      "get": {
        "operationId": "RuntimeLogsService_getRequest",
        "summary": "Get request log detail",
        "description": "Retrieves the full request detail and all log entries for a single request on a deployment.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.DeployParams"
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the request (correlation ID stamped by the gateway).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.RuntimeLogs.RequestLogDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.NotFoundProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Runtime Logs"
        ]
      }
    },
    "/v1/deployments/{deploymentName}/recent-calls": {
      "get": {
        "operationId": "V1_recentCalls",
        "summary": "Get recent requests for a given deployment in the last 24 hours",
        "description": "Returns recent API requests for the specified deployment from the previous 24 hours.",
        "parameters": [
          {
            "name": "deploymentName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of recent calls to return. Defaults to 20 when omitted.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            },
            "explode": false
          },
          {
            "name": "consumers",
            "in": "query",
            "required": true,
            "description": "List of consumers to fetch analytics for.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ConsumerAnalytics.RecentCallsData"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Analytics"
        ]
      }
    },
    "/v1/deployments/{deploymentName}/stats-by-status-code": {
      "get": {
        "operationId": "V1_statsByStatusCode",
        "summary": "Get statistics on requests by status code for a given deployment",
        "description": "Returns request counts grouped by HTTP status code for the specified deployment and time window.",
        "parameters": [
          {
            "name": "deploymentName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": true,
            "description": "The time window to filter the results by.",
            "schema": {
              "$ref": "#/components/schemas/Zuplo.ConsumerAnalytics.StatsByStatusCode.TimeWindowFilter"
            },
            "explode": false
          },
          {
            "name": "consumers",
            "in": "query",
            "required": true,
            "description": "List of consumers to fetch analytics for.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.ConsumerAnalytics.ReponseStatsByStatusCodeData"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Analytics"
        ]
      }
    },
    "/v1/environments": {
      "get": {
        "operationId": "EnvironmentsService_list",
        "summary": "Query environments",
        "description": "Query the environments by project and account. Also returns managed dedicated environments the user owns.",
        "parameters": [
          {
            "name": "accountName",
            "in": "query",
            "required": true,
            "description": "The name of the account. You can find this in your Zuplo Portal under Settings > Project Information.",
            "schema": {
              "type": "string"
            },
            "explode": false
          },
          {
            "name": "projectName",
            "in": "query",
            "required": true,
            "description": "The name of the project. You can find this in your Zuplo Portal under Settings > Project Information.",
            "schema": {
              "type": "string"
            },
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Environments.EnvironmentsList"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Environments"
        ]
      }
    },
    "/v1/environments/{environmentName}": {
      "get": {
        "operationId": "EnvironmentsService_read",
        "summary": "Get an environment",
        "description": "Gets the specified environment.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Zuplo.Common.EnvironmentParams"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Environments.Environment"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Environments"
        ]
      }
    },
    "/v1/projects": {
      "get": {
        "operationId": "ProjectsService_list",
        "summary": "Lists projects",
        "description": "Lists the projects by account.",
        "parameters": [
          {
            "name": "accountName",
            "in": "query",
            "required": false,
            "description": "The name of the account. You can find this in your Zuplo Portal under Settings > Project Information.",
            "schema": {
              "type": "string"
            },
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Projects.ProjectsList"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "ProjectsService_create",
        "summary": "Create project",
        "description": "Creates a new project for the account.",
        "parameters": [
          {
            "name": "accountName",
            "in": "query",
            "required": false,
            "description": "The name of the account. You can find this in your Zuplo Portal under Settings > Project Information.",
            "schema": {
              "type": "string"
            },
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.Projects.Project"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Zuplo.Projects.ProjectCreateBody"
              }
            }
          }
        }
      }
    },
    "/v1/who-am-i": {
      "get": {
        "operationId": "V1_whoAmI",
        "summary": "Who Am I",
        "description": "Returns basic information about the caller. Supports both API key and JWT authentication. The response always includes the subject identifier (`sub`). The `account` field is included when called with an API key, and `email` is included when called with a JWT that carries the email claim.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.WhoAmI.WhoAmI"
                }
              }
            }
          },
          "400": {
            "description": "The server could not understand the request due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Access is unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.UnauthorizedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v3/metering/{bucketId}/features": {
      "get": {
        "operationId": "listFeatures",
        "summary": "List features",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nList features.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meterSlug",
            "in": "query",
            "required": false,
            "description": "Filter by meterSlug",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form"
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "description": "Include archived features in response.",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "explode": false,
            "style": "form"
          },
          {
            "$ref": "#/components/parameters/Pagination.page"
          },
          {
            "$ref": "#/components/parameters/Pagination.pageSize"
          },
          {
            "$ref": "#/components/parameters/LimitOffset.offset"
          },
          {
            "$ref": "#/components/parameters/LimitOffset.limit"
          },
          {
            "$ref": "#/components/parameters/FeatureOrderByOrdering.order"
          },
          {
            "$ref": "#/components/parameters/FeatureOrderByOrdering.orderBy"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListFeaturesResult"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Features"
        ]
      },
      "post": {
        "operationId": "createFeature",
        "summary": "Create feature",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nFeatures are either metered or static. A feature is metered if meterSlug is provided at creation.\nFor metered features you can pass additional filters that will be applied when calculating feature usage, based on the meter's groupBy fields.\nOnly meters with SUM and COUNT aggregation are supported for features.\nFeatures cannot be updated later, only archived.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Feature"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Features"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeatureCreateInputs"
              }
            }
          }
        }
      }
    },
    "/v3/metering/{bucketId}/features/{featureId}": {
      "get": {
        "operationId": "getFeature",
        "summary": "Get feature",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nGet a feature by ID.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Feature"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Features"
        ]
      },
      "delete": {
        "operationId": "deleteFeature",
        "summary": "Delete feature",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nArchive a feature by ID.\n\nOnce a feature is archived it cannot be unarchived. If a feature is archived, new entitlements cannot be created for it, but archiving the feature does not affect existing entitlements.\nThis means, if you want to create a new feature with the same key, and then create entitlements for it, the previous entitlements have to be deleted first on a per subject basis.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful. "
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Features"
        ]
      }
    },
    "/v3/metering/{bucketId}/meters": {
      "get": {
        "operationId": "listMeters",
        "summary": "List meters",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nList meters.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Pagination.page"
          },
          {
            "$ref": "#/components/parameters/Pagination.pageSize"
          },
          {
            "$ref": "#/components/parameters/MeterOrderByOrdering.order"
          },
          {
            "$ref": "#/components/parameters/MeterOrderByOrdering.orderBy"
          },
          {
            "$ref": "#/components/parameters/queryMeterList.includeDeleted"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Meter"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Meters"
        ]
      },
      "post": {
        "operationId": "createMeter",
        "summary": "Create meter",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nCreate a meter.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meter"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Meters"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeterCreate"
              }
            }
          }
        }
      }
    },
    "/v3/metering/{bucketId}/meters/{meterIdOrSlug}": {
      "get": {
        "operationId": "getMeter",
        "summary": "Get meter",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nGet a meter by ID or slug.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meterIdOrSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meter"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Meters"
        ]
      },
      "put": {
        "operationId": "updateMeter",
        "summary": "Update meter",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nUpdate a meter.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meterIdOrSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meter"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Meters"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeterUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMeter",
        "summary": "Delete meter",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nDelete a meter.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meterIdOrSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful. "
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Meters"
        ]
      }
    },
    "/v3/metering/{bucketId}/meters/{meterIdOrSlug}/group-by/{groupByKey}/values": {
      "get": {
        "operationId": "listMeterGroupByValues",
        "summary": "List meter group by values",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nList meter group by values.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meterIdOrSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$"
            }
          },
          {
            "name": "groupByKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Start date-time in RFC 3339 format.\n\nInclusive. Defaults to 24 hours ago.\n\nFor example: ?from=2025-01-01T00%3A00%3A00.000Z",
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2023-01-01T01:01:01.001Z"
            },
            "style": "form"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "End date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?to=2025-02-01T00%3A00%3A00.000Z",
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2023-01-01T01:01:01.001Z"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Meters"
        ]
      }
    },
    "/v3/metering/{bucketId}/meters/{meterIdOrSlug}/query": {
      "get": {
        "operationId": "queryMeter",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meterIdOrSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$"
            }
          },
          {
            "$ref": "#/components/parameters/MeterQuery.clientId"
          },
          {
            "$ref": "#/components/parameters/MeterQuery.from"
          },
          {
            "$ref": "#/components/parameters/MeterQuery.to"
          },
          {
            "$ref": "#/components/parameters/MeterQuery.windowSize"
          },
          {
            "$ref": "#/components/parameters/MeterQuery.windowTimeZone"
          },
          {
            "$ref": "#/components/parameters/MeterQuery.subject"
          },
          {
            "$ref": "#/components/parameters/MeterQuery.filterCustomerId"
          },
          {
            "$ref": "#/components/parameters/MeterQuery.filterSubscription"
          },
          {
            "$ref": "#/components/parameters/MeterQuery.filterGroupBy"
          },
          {
            "$ref": "#/components/parameters/MeterQuery.advancedMeterGroupByFilters"
          },
          {
            "$ref": "#/components/parameters/MeterQuery.groupBy"
          }
        ],
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nQuery meter for usage.",
        "summary": "Query meter",
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeterQueryResult"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Meters"
        ]
      },
      "post": {
        "operationId": "queryMeterPost",
        "summary": "Query meter",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meterIdOrSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeterQueryResult"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Meters"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeterQueryRequest"
              }
            }
          }
        },
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>"
      }
    },
    "/v3/metering/{bucketId}/plans": {
      "get": {
        "operationId": "listPlans",
        "summary": "List plans",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nList all plans.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "required": false,
            "description": "Include deleted plans in response.\n\nUsage: `?includeDeleted=true`",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "explode": false,
            "style": "form"
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Filter by plan.id attribute",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
                "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
                "example": "01G65Z755AFWAKHE12NY0CQ9FH"
              }
            },
            "style": "form"
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "description": "Filter by plan.key attribute",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
                "description": "A key is a unique string that is used to identify a resource."
              }
            },
            "style": "form"
          },
          {
            "name": "keyVersion",
            "in": "query",
            "required": false,
            "description": "Filter by plan.key and plan.version attributes",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            },
            "style": "deepObject"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only return plans with the given status.\n\nUsage:\n- `?status=active`: return only the currently active plan\n- `?status=draft`: return only the draft plan\n- `?status=archived`: return only the archived plans",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PlanStatus"
              }
            },
            "style": "form"
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "description": "Filter by plan.currency attribute",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            },
            "style": "form"
          },
          {
            "$ref": "#/components/parameters/Pagination.page"
          },
          {
            "$ref": "#/components/parameters/Pagination.pageSize"
          },
          {
            "$ref": "#/components/parameters/PlanOrderByOrdering.order"
          },
          {
            "$ref": "#/components/parameters/PlanOrderByOrdering.orderBy"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanPaginatedResponse"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Plans"
        ]
      },
      "post": {
        "operationId": "createPlan",
        "summary": "Create a plan",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nCreate a new plan or a new version of an existing plan.\n\nIf no plan exists with the given key, a new plan is created with version 1.\nIf a plan with the given key already exists, a new draft version is created\nwith an incremented version number.\nOnly one draft version per plan key is allowed at a time.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Plans"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanCreate"
              }
            }
          }
        }
      }
    },
    "/v3/metering/{bucketId}/plans/{planId}": {
      "get": {
        "operationId": "getPlan",
        "summary": "Get plan",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nGet a plan by id or key. The latest published version is returned if latter is used.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "x-go-type": "string"
            },
            "x-go-type": "string"
          },
          {
            "name": "includeLatest",
            "in": "query",
            "required": false,
            "description": "Include latest version of the Plan instead of the version in active state.\n\nUsage: `?includeLatest=true`",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "explode": false,
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Plans"
        ]
      },
      "put": {
        "operationId": "updatePlan",
        "summary": "Update a plan",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nUpdate plan by id.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Plans"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanReplaceUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deletePlan",
        "summary": "Delete plan",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nSoft delete plan by plan.id.\n\nOnce a plan is deleted it cannot be undeleted.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful. "
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Plans"
        ]
      }
    },
    "/v3/metering/{bucketId}/plans/{planId}/archive": {
      "post": {
        "operationId": "archivePlan",
        "summary": "Archive plan version",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nArchive a plan version.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Plans"
        ]
      }
    },
    "/v3/metering/{bucketId}/plans/{planId}/publish": {
      "post": {
        "operationId": "publishPlan",
        "summary": "Publish plan",
        "description": "<p style=\"padding: 10px; border-radius: 5px; background-color: #fff3cd; color: #856404; border: 1px solid #ffc107;\"><strong>⚠️ Preview:</strong> The Metering APIs are in preview and subject to change.</p>\n\nPublish a plan version.",
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestProblemResponse"
                }
              }
            }
          },
          "401": {
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedProblemResponse"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenProblemResponse"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundProblemResponse"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PreconditionFailedProblemResponse"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorProblemResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUnavailableProblemResponse"
                }
              }
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/UnexpectedProblemResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Metering - Plans"
        ]
      }
    }
  },
  "security": [
    {
      "DeveloperApiKey": []
    }
  ],
  "components": {
    "parameters": {
      "Zuplo.ApiKeys.ApiKeyParams.keyId": {
        "name": "keyId",
        "in": "path",
        "required": true,
        "description": "The key id.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.ApiKeys.BucketParams.bucketName": {
        "name": "bucketName",
        "in": "path",
        "required": true,
        "description": "The name of the bucket. Zuplo automatically creates a bucket for your project. You can find it in youe Zuplo Portal under Settings > Project Information.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.ApiKeys.ConsumerParams.consumerName": {
        "name": "consumerName",
        "in": "path",
        "required": true,
        "description": "The name of the consumer.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.ApiKeys.IncludeApiKeyParam": {
        "name": "include-api-keys",
        "in": "query",
        "required": false,
        "description": "Include the api key data in the response.",
        "schema": {
          "type": "boolean",
          "x-example": true
        },
        "x-example": true,
        "explode": false
      },
      "Zuplo.ApiKeys.IncludeManagerInvitesParam": {
        "name": "include-manager-invites",
        "in": "query",
        "required": false,
        "description": "Include the manager invites data in the response.",
        "schema": {
          "type": "boolean",
          "x-example": true
        },
        "x-example": true,
        "explode": false
      },
      "Zuplo.ApiKeys.IncludeManagerParam": {
        "name": "include-managers",
        "in": "query",
        "required": false,
        "description": "Include the manager's data in the response.",
        "schema": {
          "type": "boolean",
          "x-example": true
        },
        "x-example": true,
        "explode": false
      },
      "Zuplo.ApiKeys.KeyFormatQueryParam": {
        "name": "key-format",
        "in": "query",
        "required": false,
        "description": "The format of the key to return.\n`none`: Key is completely hidden.\n`visible`: Key is completely visible.\n`masked`: Part of key suffix is visible.",
        "schema": {
          "$ref": "#/components/schemas/Zuplo.ApiKeys.KeyFormat",
          "x-example": "masked"
        },
        "x-example": "masked",
        "explode": false
      },
      "Zuplo.ApiKeys.ManagerEmailQueryParam": {
        "name": "manager-email",
        "in": "query",
        "required": false,
        "description": "Filter by email address of key manager.",
        "schema": {
          "type": "string",
          "x-example": "bob@example.com"
        },
        "x-example": "bob@example.com",
        "explode": false
      },
      "Zuplo.ApiKeys.ManagerParams.managerId": {
        "name": "managerId",
        "in": "path",
        "required": true,
        "description": "The manager id",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.ApiKeys.TagQueryParam": {
        "name": "tag",
        "in": "query",
        "required": false,
        "description": "Query by tag. Example usage is `tag.account=foo`, where `account` is the name of the tag property and `foo` is the value.",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.ApiKeys.WithApiKeyQueryParam": {
        "name": "with-api-key",
        "in": "query",
        "required": false,
        "description": "If an API key should be created with the consumer.",
        "schema": {
          "type": "boolean",
          "x-example": true
        },
        "x-example": true,
        "explode": false
      },
      "Zuplo.AuditLogs.AuditLogsQuery.action": {
        "name": "action",
        "in": "query",
        "required": false,
        "description": "Filter by specific action (e.g., 'account.create')",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.AuditLogs.AuditLogsQuery.actor": {
        "name": "actor",
        "in": "query",
        "required": false,
        "description": "Filter by actor email address or subject identifier",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.AuditLogs.AuditLogsQuery.endDate": {
        "name": "endDate",
        "in": "query",
        "required": false,
        "description": "Filter events before this date (ISO 8601 format)",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "explode": false
      },
      "Zuplo.AuditLogs.AuditLogsQuery.limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Maximum number of results to return (1-100)",
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 1,
          "maximum": 100,
          "default": 20
        },
        "explode": false
      },
      "Zuplo.AuditLogs.AuditLogsQuery.offset": {
        "name": "offset",
        "in": "query",
        "required": false,
        "description": "Number of results to skip for pagination",
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "default": 0
        },
        "explode": false
      },
      "Zuplo.AuditLogs.AuditLogsQuery.startDate": {
        "name": "startDate",
        "in": "query",
        "required": false,
        "description": "Filter events after this date (ISO 8601 format)",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "explode": false
      },
      "Zuplo.AuditLogs.AuditLogsQuery.success": {
        "name": "success",
        "in": "query",
        "required": false,
        "description": "Filter by success status (true for successful, false for failed)",
        "schema": {
          "type": "boolean"
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsEventsQuery.actorSub": {
        "name": "actorSub",
        "in": "query",
        "required": false,
        "description": "Filter by actor subject identifier",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsEventsQuery.endDate": {
        "name": "endDate",
        "in": "query",
        "required": false,
        "description": "Filter events at or before this time (ISO 8601)",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsEventsQuery.limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Maximum number of results to return (1-100)",
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 1,
          "maximum": 100,
          "default": 20
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsEventsQuery.offset": {
        "name": "offset",
        "in": "query",
        "required": false,
        "description": "Number of results to skip for pagination",
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "default": 0
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsEventsQuery.startDate": {
        "name": "startDate",
        "in": "query",
        "required": false,
        "description": "Filter events at or after this time (ISO 8601)",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsEventsQuery.subject": {
        "name": "subject",
        "in": "query",
        "required": false,
        "description": "Filter by event subject",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsEventsQuery.type": {
        "name": "type",
        "in": "query",
        "required": false,
        "description": "Filter by event type (reverse-DNS, e.g. 'com.zuplo.apikey.create')",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsStatsQuery.endDate": {
        "name": "endDate",
        "in": "query",
        "required": false,
        "description": "Filter events at or before this time (ISO 8601)",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsStatsQuery.groupBy": {
        "name": "groupBy",
        "in": "query",
        "required": true,
        "description": "Column to group by: type | actorSub",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsStatsQuery.limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Maximum number of groups to return (1-100)",
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 1,
          "maximum": 100,
          "default": 25
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.AuditLogsStatsQuery.startDate": {
        "name": "startDate",
        "in": "query",
        "required": false,
        "description": "Filter events at or after this time (ISO 8601)",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "explode": false
      },
      "Zuplo.AuditLogsV1.BucketParams": {
        "name": "bucketId",
        "in": "path",
        "required": true,
        "description": "Bucket id or bucket name.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.BuildLogs.BuildLogsQuery.stage": {
        "name": "stage",
        "in": "query",
        "required": false,
        "description": "Filter build logs to a specific stage. Required when `step` is set.",
        "schema": {
          "$ref": "#/components/schemas/Zuplo.BuildLogs.BuildLogStage"
        },
        "explode": false
      },
      "Zuplo.BuildLogs.BuildLogsQuery.step": {
        "name": "step",
        "in": "query",
        "required": false,
        "description": "Filter build logs to a specific build step within the stage. Requires `stage` to also be set.",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.ClientAuth.BucketParams": {
        "name": "bucketId",
        "in": "path",
        "required": true,
        "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateParams": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The ID of the client mTLS CA certificate.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Common.AccountParams": {
        "name": "accountName",
        "in": "path",
        "required": true,
        "description": "The name of the account. You can find this in your Zuplo Portal under Settings > Project Information.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Common.AccountProjectParams.projectName": {
        "name": "projectName",
        "in": "path",
        "required": true,
        "description": "The name of the project. You can find this in your Zuplo Portal under Settings > Project Information.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Common.BranchParams": {
        "name": "branchName",
        "in": "path",
        "required": true,
        "description": "The name of the branch in your source control provider.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Common.DeployParams": {
        "name": "deploymentName",
        "in": "path",
        "required": true,
        "description": "The name of the deployment. You can find this in the Zuplo Portal under Settings > Environments.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Common.EnvironmentParams": {
        "name": "environmentName",
        "in": "path",
        "required": true,
        "description": "The name of the environment.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Common.VariableParams": {
        "name": "variableName",
        "in": "path",
        "required": true,
        "description": "The name of the environment variable.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.CustomDomains.CustomDomainDeleteQuery.deploymentName": {
        "name": "deploymentName",
        "in": "query",
        "required": false,
        "description": "The deployment associated with the hostname, when deleting a deployment-specific mapping.",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.CustomDomains.CustomDomainDeleteQuery.hostname": {
        "name": "hostname",
        "in": "query",
        "required": true,
        "description": "The hostname of the custom domain to delete.",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.KeyAuthV2.BucketParams": {
        "name": "bucketId",
        "in": "path",
        "required": true,
        "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.KeyAuthV2.ConsumerParams.consumerId": {
        "name": "consumerId",
        "in": "path",
        "required": true,
        "description": "The id of the consumer.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Metering.BucketParams": {
        "name": "bucketId",
        "in": "path",
        "required": true,
        "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Metering.PlanParams.planId": {
        "name": "planId",
        "in": "path",
        "required": true,
        "description": "The id of the plan.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Metering.SubscriptionParams.subscriptionId": {
        "name": "subscriptionId",
        "in": "path",
        "required": true,
        "description": "The id of the subscription.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV2.BucketParams": {
        "name": "bucketId",
        "in": "path",
        "required": true,
        "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV2.ConsumerParams.consumerId": {
        "name": "consumerId",
        "in": "path",
        "required": true,
        "description": "The id of the consumer.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV2.PlansParams.planId": {
        "name": "planId",
        "in": "path",
        "required": true,
        "description": "The id of the plan.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV2.SubscriptionsParams.subscriptionId": {
        "name": "subscriptionId",
        "in": "path",
        "required": true,
        "description": "The id of the subscription.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV2.TenantsParams.tenantId": {
        "name": "tenantId",
        "in": "path",
        "required": true,
        "description": "The id of the tenant.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV2.UsersParams.userId": {
        "name": "userId",
        "in": "path",
        "required": true,
        "description": "The id of the user.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.ApiKeyParams.apiKeyId": {
        "name": "apiKeyId",
        "in": "path",
        "required": true,
        "description": "The API key ID",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.BucketParams": {
        "name": "bucketId",
        "in": "path",
        "required": true,
        "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.ConsumerParams.consumerId": {
        "name": "consumerId",
        "in": "path",
        "required": true,
        "description": "The consumer ID",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.CustomerMemberInviteParams.memberInviteId": {
        "name": "memberInviteId",
        "in": "path",
        "required": true,
        "description": "Member invite record ID",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.CustomerMemberParams.memberId": {
        "name": "memberId",
        "in": "path",
        "required": true,
        "description": "Member record ID",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.CustomerSubscriptionsParams.customerId": {
        "name": "customerId",
        "in": "path",
        "required": true,
        "description": "The Zuplo metering customer ID or key",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.PlanInviteParams.planInviteId": {
        "name": "planInviteId",
        "in": "path",
        "required": true,
        "description": "The id of the plan invite.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.PlanPurchaseDetailsParams.customerId": {
        "name": "customerId",
        "in": "path",
        "required": true,
        "description": "The Zuplo metering customer ID",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.PlanPurchaseDetailsParams.planId": {
        "name": "planId",
        "in": "path",
        "required": true,
        "description": "The plan ID",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.SubscriptionParams.subscriptionId": {
        "name": "subscriptionId",
        "in": "path",
        "required": true,
        "description": "The subscription ID",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MeteringV3.UserParams.userId": {
        "name": "userId",
        "in": "path",
        "required": true,
        "description": "User record ID",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.MtlsCertificates.MtlsCertificateParams": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The ID of the mTLS certificate.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.RuntimeLogs.RequestLogsListQuery.cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "description": "Opaque cursor returned in `pagination.cursor` on a previous page. Pass to fetch the next page.",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.RuntimeLogs.RequestLogsListQuery.endTime": {
        "name": "endTime",
        "in": "query",
        "required": true,
        "description": "Inclusive ISO 8601 upper bound on request timestamp.",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "explode": false
      },
      "Zuplo.RuntimeLogs.RequestLogsListQuery.httpMethod": {
        "name": "httpMethod",
        "in": "query",
        "required": false,
        "description": "Filter to requests with this HTTP method.",
        "schema": {
          "type": "string",
          "enum": [
            "GET",
            "POST",
            "PUT",
            "PATCH",
            "DELETE",
            "HEAD",
            "OPTIONS",
            "TRACE",
            "CONNECT"
          ]
        },
        "explode": false
      },
      "Zuplo.RuntimeLogs.RequestLogsListQuery.httpStatus": {
        "name": "httpStatus",
        "in": "query",
        "required": false,
        "description": "Filter to requests with this HTTP status class (`2xx`, `3xx`, `4xx`, `5xx`).",
        "schema": {
          "type": "string",
          "enum": [
            "2xx",
            "3xx",
            "4xx",
            "5xx"
          ]
        },
        "explode": false
      },
      "Zuplo.RuntimeLogs.RequestLogsListQuery.limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Maximum number of results to return (1-200).",
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 1,
          "maximum": 200,
          "default": 50
        },
        "explode": false
      },
      "Zuplo.RuntimeLogs.RequestLogsListQuery.routePath": {
        "name": "routePath",
        "in": "query",
        "required": false,
        "description": "Filter to requests that matched this route path.",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.RuntimeLogs.RequestLogsListQuery.search": {
        "name": "search",
        "in": "query",
        "required": false,
        "description": "Case-insensitive free-text search across log message bodies for the request window.",
        "schema": {
          "type": "string"
        },
        "explode": false
      },
      "Zuplo.RuntimeLogs.RequestLogsListQuery.severity": {
        "name": "severity",
        "in": "query",
        "required": false,
        "description": "Filter to requests whose maximum log severity equals this value.",
        "schema": {
          "type": "string",
          "enum": [
            "debug",
            "info",
            "warn",
            "error"
          ]
        },
        "explode": false
      },
      "Zuplo.RuntimeLogs.RequestLogsListQuery.startTime": {
        "name": "startTime",
        "in": "query",
        "required": true,
        "description": "Inclusive ISO 8601 lower bound on request timestamp.",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "explode": false
      },
      "Zuplo.Tunnels.TunnelIdParam": {
        "name": "tunnelId",
        "in": "path",
        "required": true,
        "description": "The ID of the tunnel.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Tunnels.TunnelTeardownStatusParams.operationId": {
        "name": "operationId",
        "in": "path",
        "required": true,
        "description": "The ID of the deletion operation.",
        "schema": {
          "type": "string"
        }
      },
      "Zuplo.Tunnels.TunneledServiceProvisioningStatusParams.operationId": {
        "name": "operationId",
        "in": "path",
        "required": true,
        "description": "The ID of the operation.",
        "schema": {
          "type": "string"
        }
      },
      "AddonOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "AddonOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/AddonOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "BillingProfileCustomerOverrideOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "BillingProfileCustomerOverrideOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/BillingProfileCustomerOverrideOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "BillingProfileListCustomerOverridesParams.billingProfile": {
        "name": "billingProfile",
        "in": "query",
        "required": false,
        "description": "Filter by billing profile.",
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "style": "form"
      },
      "BillingProfileListCustomerOverridesParams.customerId": {
        "name": "customerId",
        "in": "query",
        "required": false,
        "description": "Filter by customer id.",
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "style": "form"
      },
      "BillingProfileListCustomerOverridesParams.customerKey": {
        "name": "customerKey",
        "in": "query",
        "required": false,
        "description": "Filter by customer key",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "BillingProfileListCustomerOverridesParams.customerName": {
        "name": "customerName",
        "in": "query",
        "required": false,
        "description": "Filter by customer name.",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "BillingProfileListCustomerOverridesParams.customerPrimaryEmail": {
        "name": "customerPrimaryEmail",
        "in": "query",
        "required": false,
        "description": "Filter by customer primary email",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "BillingProfileListCustomerOverridesParams.customersWithoutPinnedProfile": {
        "name": "customersWithoutPinnedProfile",
        "in": "query",
        "required": false,
        "description": "Only return customers without pinned billing profiles. This implicitly sets includeAllCustomers to true.",
        "schema": {
          "type": "boolean"
        },
        "style": "form"
      },
      "BillingProfileListCustomerOverridesParams.expand": {
        "name": "expand",
        "in": "query",
        "required": false,
        "description": "Expand the response with additional details.",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/BillingProfileCustomerOverrideExpand"
          }
        },
        "style": "form"
      },
      "BillingProfileListCustomerOverridesParams.includeAllCustomers": {
        "name": "includeAllCustomers",
        "in": "query",
        "required": false,
        "description": "Include customers without customer overrides.\n\nIf set to false only the customers specifically associated with a billing profile will be returned.\n\nIf set to true, in case of the default billing profile, all customers will be returned.",
        "schema": {
          "type": "boolean",
          "default": true
        },
        "style": "form"
      },
      "BillingProfileOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "BillingProfileOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/BillingProfileOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "CursorPagination.cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "description": "The cursor after which to start the pagination.",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "CursorPagination.limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "The limit of the pagination.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 100
        },
        "explode": false,
        "style": "form"
      },
      "CustomerOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "CustomerOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/CustomerOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "CustomerSubscriptionOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "CustomerSubscriptionOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/CustomerSubscriptionOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "EntitlementOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "EntitlementOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/EntitlementOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "FeatureOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "FeatureOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/FeatureOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "GrantOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "GrantOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/GrantOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "InvoiceListParams.createdAfter": {
        "name": "createdAfter",
        "in": "query",
        "required": false,
        "description": "Filter by invoice created time.\nInclusive.",
        "schema": {
          "type": "string",
          "format": "date-time",
          "example": "2023-01-01T01:01:01.001Z"
        },
        "style": "form"
      },
      "InvoiceListParams.createdBefore": {
        "name": "createdBefore",
        "in": "query",
        "required": false,
        "description": "Filter by invoice created time.\nInclusive.",
        "schema": {
          "type": "string",
          "format": "date-time",
          "example": "2023-01-01T01:01:01.001Z"
        },
        "style": "form"
      },
      "InvoiceListParams.customers": {
        "name": "customers",
        "in": "query",
        "required": false,
        "description": "Filter by customer ID",
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "style": "form"
      },
      "InvoiceListParams.expand": {
        "name": "expand",
        "in": "query",
        "required": false,
        "description": "What parts of the list output to expand in listings",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/InvoiceExpand"
          }
        },
        "style": "form"
      },
      "InvoiceListParams.extendedStatuses": {
        "name": "extendedStatuses",
        "in": "query",
        "required": false,
        "description": "Filter by invoice extended statuses",
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "style": "form"
      },
      "InvoiceListParams.includeDeleted": {
        "name": "includeDeleted",
        "in": "query",
        "required": false,
        "description": "Include deleted invoices",
        "schema": {
          "type": "boolean"
        },
        "explode": false,
        "style": "form"
      },
      "InvoiceListParams.issuedAfter": {
        "name": "issuedAfter",
        "in": "query",
        "required": false,
        "description": "Filter by invoice issued time.\nInclusive.",
        "schema": {
          "type": "string",
          "format": "date-time",
          "example": "2023-01-01T01:01:01.001Z"
        },
        "style": "form"
      },
      "InvoiceListParams.issuedBefore": {
        "name": "issuedBefore",
        "in": "query",
        "required": false,
        "description": "Filter by invoice issued time.\nInclusive.",
        "schema": {
          "type": "string",
          "format": "date-time",
          "example": "2023-01-01T01:01:01.001Z"
        },
        "style": "form"
      },
      "InvoiceListParams.periodStartAfter": {
        "name": "periodStartAfter",
        "in": "query",
        "required": false,
        "description": "Filter by period start time.\nInclusive.",
        "schema": {
          "type": "string",
          "format": "date-time",
          "example": "2023-01-01T01:01:01.001Z"
        },
        "style": "form"
      },
      "InvoiceListParams.periodStartBefore": {
        "name": "periodStartBefore",
        "in": "query",
        "required": false,
        "description": "Filter by period start time.\nInclusive.",
        "schema": {
          "type": "string",
          "format": "date-time",
          "example": "2023-01-01T01:01:01.001Z"
        },
        "style": "form"
      },
      "InvoiceListParams.statuses": {
        "name": "statuses",
        "in": "query",
        "required": false,
        "description": "Filter by the invoice status.",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/InvoiceStatus"
          }
        },
        "style": "form"
      },
      "InvoiceOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "InvoiceOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/InvoiceOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "LimitOffset.limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Number of items to return.\n\nDefault is 100.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000,
          "default": 100
        },
        "explode": false,
        "style": "form"
      },
      "LimitOffset.offset": {
        "name": "offset",
        "in": "query",
        "required": false,
        "description": "Number of items to skip.\n\nDefault is 0.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "default": 0
        },
        "explode": false,
        "style": "form"
      },
      "MarketplaceApiKeyInstallRequest.type": {
        "name": "type",
        "in": "path",
        "required": true,
        "description": "The type of the app to install.",
        "schema": {
          "$ref": "#/components/schemas/AppType"
        }
      },
      "MarketplaceInstallRequest.type": {
        "name": "type",
        "in": "path",
        "required": true,
        "description": "The type of the app to install.",
        "schema": {
          "$ref": "#/components/schemas/AppType"
        }
      },
      "MarketplaceOAuth2InstallAuthorizeRequest.type": {
        "name": "type",
        "in": "path",
        "required": true,
        "description": "The type of the app to install.",
        "schema": {
          "$ref": "#/components/schemas/AppType"
        }
      },
      "MeterOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "MeterOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/MeterOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "MeterQuery.advancedMeterGroupByFilters": {
        "name": "advancedMeterGroupByFilters",
        "in": "query",
        "required": false,
        "description": "Optional advanced meter group by filters.\nYou can use this to filter for values of the meter groupBy fields.",
        "content": {
          "application/json": {
            "schema": {
              "additionalProperties": {
                "$ref": "#/components/schemas/FilterString"
              },
              "title": "Advanced meter group by filters",
              "format": "application/json"
            }
          }
        }
      },
      "MeterQuery.clientId": {
        "name": "clientId",
        "in": "query",
        "required": false,
        "description": "Client ID\nUseful to track progress of a query.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 36
        },
        "explode": false,
        "style": "form"
      },
      "MeterQuery.filterCustomerId": {
        "name": "filterCustomerId",
        "in": "query",
        "required": false,
        "description": "Filtering by multiple customers.\n\nFor example: ?filterCustomerId=customer-1&filterCustomerId=customer-2",
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 100
        },
        "style": "form"
      },
      "MeterQuery.filterGroupBy": {
        "name": "filterGroupBy",
        "in": "query",
        "required": false,
        "description": "Simple filter for group bys with exact match.\n\nFor example: ?filterGroupBy[vendor]=openai&filterGroupBy[model]=gpt-4-turbo",
        "schema": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "style": "deepObject",
        "deprecated": true
      },
      "MeterQuery.filterSubscription": {
        "name": "filterSubscription",
        "in": "query",
        "required": false,
        "description": "Filtering by multiple subscriptions.\n\nFor example: ?filterSubscription=subscription-1&filterSubscription=subscription-2",
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 100
        },
        "style": "form"
      },
      "MeterQuery.from": {
        "name": "from",
        "in": "query",
        "required": false,
        "description": "Start date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?from=2025-01-01T00%3A00%3A00.000Z",
        "schema": {
          "type": "string",
          "format": "date-time",
          "example": "2023-01-01T01:01:01.001Z"
        },
        "style": "form"
      },
      "MeterQuery.groupBy": {
        "name": "groupBy",
        "in": "query",
        "required": false,
        "description": "If not specified a single aggregate will be returned for each subject and time window.\n`subject` is a reserved group by value.\n\nFor example: ?groupBy=subject&groupBy=model",
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "style": "form"
      },
      "MeterQuery.subject": {
        "name": "subject",
        "in": "query",
        "required": false,
        "description": "Filtering by multiple subjects.\n\nFor example: ?subject=subject-1&subject=subject-2",
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "style": "form"
      },
      "MeterQuery.to": {
        "name": "to",
        "in": "query",
        "required": false,
        "description": "End date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?to=2025-02-01T00%3A00%3A00.000Z",
        "schema": {
          "type": "string",
          "format": "date-time",
          "example": "2023-01-01T01:01:01.001Z"
        },
        "style": "form"
      },
      "MeterQuery.windowSize": {
        "name": "windowSize",
        "in": "query",
        "required": false,
        "description": "If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.\n\nFor example: ?windowSize=DAY",
        "schema": {
          "$ref": "#/components/schemas/WindowSize"
        },
        "explode": false,
        "style": "form"
      },
      "MeterQuery.windowTimeZone": {
        "name": "windowTimeZone",
        "in": "query",
        "required": false,
        "description": "The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).\nIf not specified, the UTC timezone will be used.\n\nFor example: ?windowTimeZone=UTC",
        "schema": {
          "type": "string",
          "default": "UTC"
        },
        "explode": false,
        "style": "form"
      },
      "NotificationChannelOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "NotificationChannelOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/NotificationChannelOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "NotificationEventOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "NotificationEventOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/NotificationEventOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "NotificationRuleOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "NotificationRuleOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/NotificationRuleOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "OAuth2AuthorizationCodeGrantErrorParams.error": {
        "name": "error",
        "in": "query",
        "required": false,
        "description": "Error code.\nRequired with the error response.",
        "schema": {
          "$ref": "#/components/schemas/OAuth2AuthorizationCodeGrantErrorType"
        },
        "explode": false,
        "style": "form"
      },
      "OAuth2AuthorizationCodeGrantErrorParams.error_description": {
        "name": "error_description",
        "in": "query",
        "required": false,
        "description": "Optional human-readable text providing additional information,\nused to assist the client developer in understanding the error that occurred.",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "OAuth2AuthorizationCodeGrantErrorParams.error_uri": {
        "name": "error_uri",
        "in": "query",
        "required": false,
        "description": "Optional uri identifying a human-readable web page with\ninformation about the error, used to provide the client\ndeveloper with additional information about the error",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "OAuth2AuthorizationCodeGrantSuccessParams.code": {
        "name": "code",
        "in": "query",
        "required": false,
        "description": "Authorization code which the client will later exchange for an access token.\nRequired with the success response.",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "OAuth2AuthorizationCodeGrantSuccessParams.state": {
        "name": "state",
        "in": "query",
        "required": false,
        "description": "Required if the \"state\" parameter was present in the client authorization request.\nThe exact value received from the client:\n\nUnique, randomly generated, opaque, and non-guessable string that is sent\nwhen starting an authentication request and validated when processing the response.",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "Pagination.page": {
        "name": "page",
        "in": "query",
        "required": false,
        "description": "Page index.\n\nDefault is 1.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        },
        "explode": false,
        "style": "form"
      },
      "Pagination.pageSize": {
        "name": "pageSize",
        "in": "query",
        "required": false,
        "description": "The maximum number of items per page.\n\nDefault is 100.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000,
          "default": 100
        },
        "explode": false,
        "style": "form"
      },
      "PlanAddonOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "PlanAddonOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/PlanAddonOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "PlanOrderByOrdering.order": {
        "name": "order",
        "in": "query",
        "required": false,
        "description": "The order direction.",
        "schema": {
          "$ref": "#/components/schemas/SortOrder",
          "default": "ASC"
        },
        "explode": false,
        "style": "form"
      },
      "PlanOrderByOrdering.orderBy": {
        "name": "orderBy",
        "in": "query",
        "required": false,
        "description": "The order by field.",
        "schema": {
          "$ref": "#/components/schemas/PlanOrderBy"
        },
        "explode": false,
        "style": "form"
      },
      "listCustomerAppDataParams.type": {
        "name": "type",
        "in": "query",
        "required": false,
        "description": "Filter customer data by app type.",
        "schema": {
          "$ref": "#/components/schemas/AppType"
        },
        "explode": false,
        "style": "form"
      },
      "queryCustomerGet": {
        "name": "expand",
        "in": "query",
        "required": false,
        "description": "What parts of the customer output to expand",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/CustomerExpand"
          }
        },
        "style": "form"
      },
      "queryCustomerList.expand": {
        "name": "expand",
        "in": "query",
        "required": false,
        "description": "What parts of the list output to expand in listings",
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/CustomerExpand"
          }
        },
        "style": "form"
      },
      "queryCustomerList.includeDeleted": {
        "name": "includeDeleted",
        "in": "query",
        "required": false,
        "description": "Include deleted customers.",
        "schema": {
          "type": "boolean",
          "default": false
        },
        "explode": false,
        "style": "form"
      },
      "queryCustomerList.key": {
        "name": "key",
        "in": "query",
        "required": false,
        "description": "Filter customers by key.\nCase-insensitive partial match.",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "queryCustomerList.name": {
        "name": "name",
        "in": "query",
        "required": false,
        "description": "Filter customers by name.\nCase-insensitive partial match.",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "queryCustomerList.planKey": {
        "name": "planKey",
        "in": "query",
        "required": false,
        "description": "Filter customers by the plan key of their susbcription.",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "queryCustomerList.primaryEmail": {
        "name": "primaryEmail",
        "in": "query",
        "required": false,
        "description": "Filter customers by primary email.\nCase-insensitive partial match.",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "queryCustomerList.subject": {
        "name": "subject",
        "in": "query",
        "required": false,
        "description": "Filter customers by usage attribution subject.\nCase-insensitive partial match.",
        "schema": {
          "type": "string"
        },
        "explode": false,
        "style": "form"
      },
      "queryMeterList.includeDeleted": {
        "name": "includeDeleted",
        "in": "query",
        "required": false,
        "description": "Include deleted meters.",
        "schema": {
          "type": "boolean",
          "default": false
        },
        "explode": false,
        "style": "form"
      },
      "bucketId": {
        "name": "bucketId",
        "in": "path",
        "required": true,
        "description": "The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "ApiKeyBulkCreateOrUpdateBody": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKeyCreateOrUpdateBody"
        },
        "example": [
          {
            "description": "My secret api key",
            "expiresOn": "2023-04-20T05:54:34.408Z",
            "key": "zpka_66b21c8591354c0997db232cc2f79c9e_69253f24"
          },
          {
            "description": "My secret api key2",
            "expiresOn": "2023-05-20T05:54:34.408Z",
            "key": "zpka_77b21c8591354c0997db232cc2f79c9e_69253f99"
          }
        ]
      },
      "Zuplo.Accounts.Account": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The id of the account",
            "example": "103f832d-5331-42db-9d38-bbac05a68305"
          },
          "name": {
            "type": "string",
            "description": "The name of the account",
            "example": "my-account"
          },
          "label": {
            "type": "string",
            "description": "The label of the account",
            "example": "My Account"
          }
        },
        "description": "A Zuplo account",
        "example": {
          "id": "103f832d-5331-42db-9d38-bbac05a68305",
          "name": "my-account",
          "label": "My Account"
        }
      },
      "Zuplo.Accounts.AccountsList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.Accounts.Account"
            }
          }
        },
        "example": {
          "data": [
            {
              "id": "103f832d-5331-42db-9d38-bbac05a68305",
              "name": "my-account",
              "label": "My Account"
            },
            {
              "id": "b006949f-c71a-43d8-8533-92d8dedc5d1c",
              "name": "orange-fox"
            }
          ]
        }
      },
      "Zuplo.ApiKeys.ApiKey": {
        "type": "object",
        "required": [
          "createdOn",
          "updatedOn",
          "id"
        ],
        "properties": {
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was created.",
            "example": "2023-04-18T05:54:34.408Z",
            "readOnly": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was last updated.",
            "example": "2023-04-20T05:54:34.408Z",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "readOnly": true
          },
          "expiresOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the key expires.",
            "x-example": "2023-04-18T05:54:34.408Z"
          },
          "description": {
            "type": "string",
            "description": "The description of the api key."
          },
          "key": {
            "type": "string",
            "description": "The API key's value. You can use this parameter to override Zuplo's default key format, but this is not recommended as you will lose our [API Key Leak Detection](https://zuplo.com/docs/articles/api-key-leak-detection)"
          }
        },
        "description": "A Consumer can have any number of API keys associated with it. Each API Key shares the same identity (i.e. Consumer) when authenticating with this service. Keys can have their own description to note the use of the key and can have an expiration date. Expired keys will not be permitted to authenticate after their expiration.",
        "example": {
          "createdOn": "2023-04-20T05:54:34.408Z",
          "updatedOn": "2023-04-20T05:54:34.408Z",
          "id": "key_m1m4ol223R0kGHGZY7tPQMQl",
          "description": "My secret api key",
          "expiresOn": "2023-04-20T05:54:34.408Z",
          "key": "zpka_66b21c8591354c0997db232cc2f79c9e_69253f24"
        }
      },
      "Zuplo.ApiKeys.ApiKeyCreateOrUpdateBody": {
        "type": "object",
        "properties": {
          "expiresOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the key expires.",
            "x-example": "2023-04-18T05:54:34.408Z"
          },
          "description": {
            "type": "string",
            "description": "The description of the api key."
          },
          "key": {
            "type": "string",
            "description": "The API key's value. You can use this parameter to override Zuplo's default key format, but this is not recommended as you will lose our [API Key Leak Detection](https://zuplo.com/docs/articles/api-key-leak-detection)"
          }
        },
        "example": {
          "description": "My secret api key",
          "expiresOn": "2023-04-20T05:54:34.408Z",
          "key": "zpka_66b21c8591354c0997db232cc2f79c9e_69253f24"
        }
      },
      "Zuplo.ApiKeys.ApiKeys": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKey"
            }
          },
          "limit": {
            "type": "integer",
            "format": "uint32",
            "example": 1000
          },
          "offset": {
            "type": "integer",
            "format": "uint32",
            "example": 0
          },
          "total": {
            "type": "integer",
            "format": "uint32"
          }
        },
        "example": {
          "data": [
            {
              "createdOn": "2023-04-20T05:54:34.408Z",
              "updatedOn": "2023-04-20T05:54:34.408Z",
              "id": "key_m1m4ol223R0kGHGZY7tPQMQl",
              "description": "My secret api key",
              "expiresOn": "2023-04-20T05:54:34.408Z",
              "key": "zpka_66b21c8591354c0997db232cc2f79c9e_69253f24"
            }
          ],
          "limit": 1000,
          "offset": 0
        }
      },
      "Zuplo.ApiKeys.Bucket": {
        "type": "object",
        "required": [
          "createdOn",
          "updatedOn",
          "id",
          "name"
        ],
        "properties": {
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was created.",
            "example": "2023-04-18T05:54:34.408Z",
            "readOnly": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was last updated.",
            "example": "2023-04-20T05:54:34.408Z",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "x-example": "bckt_pCcNMjERFSoh5xIQir7o99Z6KDoLp36e",
            "readOnly": true
          },
          "isRetrievable": {
            "type": "boolean",
            "description": "Whether the API keys stored in the bucket are retrievable",
            "x-example": true
          },
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9-]{5,128}$",
            "description": "A friendly name for the bucket.",
            "x-example": "my-bucket"
          },
          "description": {
            "type": "string",
            "description": "A description of the bucket.",
            "x-example": "Bucket for zuplo consumers"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key value pairs to associate with the bucket.",
            "x-example": {
              "foo": "baz"
            }
          }
        },
        "description": "Top level group for API key mangement. A bucket could be used with a single Zuplo environment or shared among multiple environments or projects. By default a Zuplo API Gateway project will be created with several buckets that map to production, preview, and working copy environments.",
        "example": {
          "id": "bckt_pCcNMjERFSoh5xIQir7o99Z6KDoLp36e",
          "name": "my-bucket",
          "createdOn": "2023-07-24T19:26:36.000Z",
          "updatedOn": "2023-07-24T19:26:36.000Z",
          "description": "Bucket for zuplo consumers",
          "isRetrievable": true,
          "tags": {
            "foo": "bar"
          }
        }
      },
      "Zuplo.ApiKeys.BucketCreateBody": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9-]{5,128}$",
            "description": "A friendly name for the bucket.",
            "x-example": "my-bucket"
          },
          "description": {
            "type": "string",
            "description": "A description of the bucket.",
            "x-example": "Bucket for zuplo consumers"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key value pairs to associate with the bucket.",
            "x-example": {
              "foo": "baz"
            }
          }
        },
        "example": {
          "name": "my-bucket",
          "description": "Bucket for zuplo consumers",
          "tags": {
            "foo": "bar"
          }
        }
      },
      "Zuplo.ApiKeys.BucketUpdateBody": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "A description of the bucket.",
            "x-example": "Bucket for zuplo consumers"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key value pairs to associate with the bucket.",
            "x-example": {
              "foo": "baz"
            }
          }
        },
        "example": {
          "description": "Bucket for zuplo consumers",
          "tags": {
            "foo": "bar"
          }
        }
      },
      "Zuplo.ApiKeys.Buckets": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ApiKeys.Bucket"
            }
          },
          "limit": {
            "type": "integer",
            "format": "uint32",
            "example": 1000
          },
          "offset": {
            "type": "integer",
            "format": "uint32",
            "example": 0
          },
          "total": {
            "type": "integer",
            "format": "uint32"
          }
        },
        "example": {
          "data": [
            {
              "id": "bckt_pCcNMjERFSoh5xIQir7o99Z6KDoLp36e",
              "name": "my-bucket",
              "createdOn": "2023-07-24T19:26:36.000Z",
              "updatedOn": "2023-07-24T19:26:36.000Z",
              "description": "Bucket for zuplo consumers",
              "isRetrievable": true,
              "tags": {
                "foo": "bar"
              }
            }
          ]
        }
      },
      "Zuplo.ApiKeys.Consumer": {
        "type": "object",
        "required": [
          "createdOn",
          "updatedOn",
          "id",
          "name"
        ],
        "properties": {
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was created.",
            "example": "2023-04-18T05:54:34.408Z",
            "readOnly": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was last updated.",
            "example": "2023-04-20T05:54:34.408Z",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9-]{1,128}$",
            "description": "A friendly name for the consumer. This name is used as the default user.sub property in the API Key Authentication policy."
          },
          "apiKeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKey"
            }
          },
          "description": {
            "type": "string",
            "description": "A description of the consumer."
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key value pairs to associate with the consumer."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Generic metadata associated with the consumer."
          }
        },
        "description": "Consumers are the core of the API Key service. The consumer is the 'identity' of any API Keys that are created. ",
        "example": {
          "id": "csmr_brw0leTAVw478VFKD4F6OqVI",
          "name": "zup-inc",
          "createdOn": "2023-04-20T05:54:34.408Z",
          "updatedOn": "2023-04-20T05:54:34.408Z",
          "description": "Consumer for zup inc",
          "tags": {
            "foo": "bar"
          },
          "metadata": {
            "id": "zup-id-343"
          },
          "managers": [
            {
              "id": "eusr_MeefoYod5eQN33MEjC4PeRFH",
              "createdOn": "2023-06-19T17:32:11.990Z",
              "email": "mgr@zuploinc.com",
              "sub": "sub-oauth2|113533232396018044159"
            }
          ],
          "apiKeys": [
            {
              "id": "key_AM7eAiR0BiaXTam951XmC9kK",
              "description": "api key for zup inc",
              "createdOn": "2023-06-19T17:32:17.737Z",
              "updatedOn": "2023-06-19T17:32:17.737Z",
              "expiresOn": "2035-06-19T17:32:17.737Z",
              "key": "****69ff2f90"
            }
          ]
        }
      },
      "Zuplo.ApiKeys.ConsumerCreateBody": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9-]{1,128}$",
            "description": "A friendly name for the consumer. This name is used as the default user.sub property in the API Key Authentication policy."
          },
          "managers": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Zuplo.ApiKeys.Manager"
                }
              }
            ],
            "description": "Email addresses of the managers to invite or a list of managers (with subs) to add to the consumer."
          },
          "apiKeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ApiKeys.ApiKey"
            }
          },
          "description": {
            "type": "string",
            "description": "A description of the consumer."
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key value pairs to associate with the consumer."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Generic metadata associated with the consumer."
          }
        },
        "example": {
          "name": "zup-inc",
          "description": "Consumer for zup inc",
          "tags": {
            "foo": "bar"
          },
          "metadata": {
            "id": "zup-id-343"
          },
          "managers": [
            {
              "id": "123",
              "email": "user@example.com",
              "sub": "oauth2|113533232396018044159",
              "createdOn": "2023-06-19T17:32:11.990Z"
            }
          ]
        }
      },
      "Zuplo.ApiKeys.ConsumerUpdateBody": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "A description of the consumer."
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key value pairs to associate with the consumer."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Generic metadata associated with the consumer."
          }
        },
        "example": {
          "description": "Consumer for zup inc",
          "tags": {
            "foo": "bar"
          },
          "metadata": {
            "id": "zup-id-343"
          }
        }
      },
      "Zuplo.ApiKeys.Consumers": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ApiKeys.Consumer"
            }
          },
          "limit": {
            "type": "integer",
            "format": "uint32",
            "example": 1000
          },
          "offset": {
            "type": "integer",
            "format": "uint32",
            "example": 0
          },
          "total": {
            "type": "integer",
            "format": "uint32"
          }
        },
        "example": {
          "data": [
            {
              "id": "csmr_brw0leTAVw478VFKD4F6OqVI",
              "name": "zup-inc",
              "createdOn": "2023-04-20T05:54:34.408Z",
              "updatedOn": "2023-04-20T05:54:34.408Z",
              "description": "Consumer for zup inc",
              "tags": {
                "foo": "bar"
              },
              "metadata": {
                "id": "zup-id-343"
              },
              "managers": [
                {
                  "id": "eusr_MeefoYod5eQN33MEjC4PeRFH",
                  "createdOn": "2023-06-19T17:32:11.990Z",
                  "email": "mgr@zuploinc.com",
                  "sub": "sub-oauth2|113533232396018044159"
                }
              ],
              "apiKeys": [
                {
                  "id": "key_AM7eAiR0BiaXTam951XmC9kK",
                  "description": "api key for zup inc",
                  "createdOn": "2023-06-19T17:32:17.737Z",
                  "updatedOn": "2023-06-19T17:32:17.737Z",
                  "expiresOn": "2035-06-19T17:32:17.737Z",
                  "key": "****69ff2f90"
                }
              ]
            }
          ],
          "offset": 0,
          "limit": 1000
        }
      },
      "Zuplo.ApiKeys.KeyFormat": {
        "type": "string",
        "enum": [
          "none",
          "visible",
          "masked"
        ]
      },
      "Zuplo.ApiKeys.Manager": {
        "type": "object",
        "required": [
          "createdOn",
          "id",
          "email",
          "sub"
        ],
        "properties": {
          "email": {
            "type": "string",
            "description": "The email address of the manager"
          },
          "sub": {
            "type": "string",
            "description": "The sub of the manager in the identity provider"
          }
        },
        "description": "Managers are users that have access to a consumer. Managers can be added directly to a consumer (using email and sub) or invited (using only email) to a consumer.",
        "example": {
          "createdOn": "2023-04-20T05:54:34.408Z",
          "id": "managerId",
          "email": "bob@example.com",
          "sub": "sub-oauth2|113533232396018044159"
        }
      },
      "Zuplo.ApiKeys.ManagerCreateBody": {
        "type": "object",
        "required": [
          "email",
          "sub"
        ],
        "properties": {
          "email": {
            "type": "string",
            "description": "The email address of the manager",
            "x-example": "bob@example.com"
          },
          "sub": {
            "type": "string",
            "description": "The sub of the manager in the identity provider",
            "x-example": "sub-oauth2|113533232396018044159"
          }
        },
        "example": {
          "email": "bob@example.com",
          "sub": "sub-oauth2|113533232396018044159"
        }
      },
      "Zuplo.ApiKeys.Managers": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ApiKeys.Manager"
            }
          },
          "limit": {
            "type": "integer",
            "format": "uint32",
            "example": 1000
          },
          "offset": {
            "type": "integer",
            "format": "uint32",
            "example": 0
          },
          "total": {
            "type": "integer",
            "format": "uint32"
          }
        },
        "example": {
          "data": [
            {
              "createdOn": "2023-04-20T05:54:34.408Z",
              "id": "managerId",
              "email": "bob@example.com",
              "sub": "sub-oauth2|113533232396018044159"
            }
          ],
          "limit": 1000,
          "offset": 0
        }
      },
      "Zuplo.AuditLogs.ActingAs": {
        "type": "object",
        "required": [
          "sub",
          "email"
        ],
        "properties": {
          "sub": {
            "type": "string",
            "description": "The subject identifier of the user being impersonated"
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "The email address of the impersonated user (if available)"
          }
        },
        "description": "Details about the user being impersonated, if applicable"
      },
      "Zuplo.AuditLogs.Actor": {
        "type": "object",
        "required": [
          "sub",
          "email",
          "type",
          "connection",
          "actingAs",
          "metadata"
        ],
        "properties": {
          "sub": {
            "type": "string",
            "description": "The subject identifier of the actor (user ID, API key, etc.)"
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "The email address of the actor (only for user actors)"
          },
          "type": {
            "type": "string",
            "description": "The type of actor (e.g., 'user', 'consumer', 'service', 'anonymous')"
          },
          "connection": {
            "type": "string",
            "nullable": true,
            "description": "The authentication connection used (e.g., 'auth0', 'google')"
          },
          "actingAs": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.AuditLogs.ActingAs"
              }
            ],
            "nullable": true,
            "description": "Information about the user being impersonated, if any"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "Additional metadata about the actor"
          }
        },
        "description": "Details about the actor who performed the action"
      },
      "Zuplo.AuditLogs.AuditLog": {
        "type": "object",
        "required": [
          "action",
          "metadata",
          "actor",
          "resources",
          "context",
          "route",
          "timestamp",
          "requestId",
          "success",
          "error"
        ],
        "properties": {
          "action": {
            "type": "string",
            "description": "The action that was performed (e.g., 'account.create', 'project.delete')"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "Additional metadata about the action"
          },
          "actor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.AuditLogs.Actor"
              }
            ],
            "description": "Details about the actor who performed the action"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.AuditLogs.Resource"
            },
            "nullable": true,
            "description": "List of resources affected by this action"
          },
          "context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.AuditLogs.Context"
              }
            ],
            "description": "Contextual information about where and how the action was performed"
          },
          "route": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.AuditLogs.Route"
              }
            ],
            "description": "Information about the API route that triggered this audit event"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the action occurred"
          },
          "requestId": {
            "type": "string",
            "description": "The unique request ID for correlation"
          },
          "success": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the action was successful"
          },
          "error": {
            "type": "string",
            "nullable": true,
            "description": "Error message if the action failed"
          }
        },
        "description": "An audit log entry representing an action performed in the system"
      },
      "Zuplo.AuditLogs.AuditLogsPagination": {
        "type": "object",
        "required": [
          "limit",
          "offset",
          "total",
          "hasMore"
        ],
        "properties": {
          "limit": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of results returned"
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "description": "Number of results skipped"
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of results available"
          },
          "hasMore": {
            "type": "boolean",
            "description": "Whether there are more results available"
          }
        },
        "description": "Pagination information for audit logs"
      },
      "Zuplo.AuditLogs.AuditLogsResponse": {
        "type": "object",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.AuditLogs.AuditLog"
            },
            "description": "Array of audit log entries"
          },
          "pagination": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.AuditLogs.AuditLogsPagination"
              }
            ],
            "description": "Pagination information"
          }
        },
        "description": "Response containing a list of audit logs with pagination"
      },
      "Zuplo.AuditLogs.Context": {
        "type": "object",
        "required": [
          "ipAddress",
          "userAgent",
          "country",
          "region",
          "city",
          "postalCode",
          "metroCode",
          "asOrg"
        ],
        "properties": {
          "ipAddress": {
            "type": "string",
            "nullable": true,
            "description": "The IP address of the request"
          },
          "userAgent": {
            "type": "string",
            "nullable": true,
            "description": "The user agent string of the request"
          },
          "country": {
            "type": "string",
            "nullable": true,
            "description": "The ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB')"
          },
          "region": {
            "type": "string",
            "nullable": true,
            "description": "The region/state code (e.g., 'CA' for California)"
          },
          "city": {
            "type": "string",
            "nullable": true,
            "description": "The city name from which the request originated"
          },
          "postalCode": {
            "type": "string",
            "nullable": true,
            "description": "The postal/ZIP code"
          },
          "metroCode": {
            "type": "string",
            "nullable": true,
            "description": "The metro code (DMA code in the US)"
          },
          "asOrg": {
            "type": "string",
            "nullable": true,
            "description": "The Autonomous System organization (ISP name)"
          }
        },
        "description": "Contextual information about where and how the action was performed"
      },
      "Zuplo.AuditLogs.Resource": {
        "type": "object",
        "required": [
          "type",
          "id",
          "metadata"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of resource (e.g., 'account', 'project', 'deployment')"
          },
          "id": {
            "type": "string",
            "description": "The unique identifier of the resource"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "Additional metadata about the resource"
          }
        },
        "description": "A resource affected by the action"
      },
      "Zuplo.AuditLogs.Route": {
        "type": "object",
        "required": [
          "source",
          "url",
          "method"
        ],
        "properties": {
          "source": {
            "type": "string",
            "nullable": true,
            "description": "The source system or API that handled the request (e.g., 'api', 'gateway')"
          },
          "url": {
            "type": "string",
            "nullable": true,
            "description": "The full URL path of the request"
          },
          "method": {
            "type": "string",
            "nullable": true,
            "description": "The HTTP method used for the request"
          }
        },
        "description": "Information about the API route that triggered this audit event"
      },
      "Zuplo.AuditLogsV1.AuditLogEvent": {
        "type": "object",
        "required": [
          "specversion",
          "id",
          "source",
          "type",
          "time",
          "bucketid"
        ],
        "properties": {
          "specversion": {
            "type": "string",
            "description": "CloudEvents spec version, always '1.0'"
          },
          "id": {
            "type": "string",
            "description": "Unique event id (request id or generated)"
          },
          "source": {
            "type": "string",
            "description": "Originating component URI"
          },
          "type": {
            "type": "string",
            "description": "Reverse-DNS event type (e.g. 'com.zuplo.apikey.create')"
          },
          "time": {
            "type": "string",
            "format": "date-time",
            "description": "Event time"
          },
          "datacontenttype": {
            "type": "string",
            "description": "Content type of the payload, always 'application/json'"
          },
          "subject": {
            "type": "string",
            "nullable": true,
            "description": "The principal the event is about (user / actor)"
          },
          "bucketid": {
            "type": "string",
            "description": "Bucket the event belongs to"
          },
          "actorsub": {
            "type": "string",
            "nullable": true,
            "description": "Actor identifier (e.g. user sub)"
          },
          "actortype": {
            "type": "string",
            "description": "Actor type: user | service | apikey | anonymous"
          },
          "actoremail": {
            "type": "string",
            "nullable": true,
            "description": "Actor email when known"
          },
          "actorconnection": {
            "type": "string",
            "nullable": true,
            "description": "Auth issuer / IdP"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.AuditLogsV1.AuditLogResource"
            },
            "description": "Resources affected by this event"
          },
          "requestid": {
            "type": "string",
            "nullable": true,
            "description": "Correlation id matching the originating request"
          },
          "success": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the action succeeded"
          },
          "httpmethod": {
            "type": "string",
            "nullable": true,
            "description": "HTTP method of the originating request"
          },
          "httpurl": {
            "type": "string",
            "nullable": true,
            "description": "URL path (with query) of the originating request"
          },
          "httpstatus": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "HTTP status code of the response"
          },
          "ipaddress": {
            "type": "string",
            "nullable": true,
            "description": "Client IP address"
          },
          "useragent": {
            "type": "string",
            "nullable": true,
            "description": "Client user agent"
          },
          "country": {
            "type": "string",
            "nullable": true,
            "description": "ISO 3166-1 alpha-2 country code"
          },
          "region": {
            "type": "string",
            "nullable": true,
            "description": "Region / state code"
          },
          "city": {
            "type": "string",
            "nullable": true,
            "description": "City name"
          },
          "data": {
            "type": "object",
            "additionalProperties": {},
            "description": "Event payload"
          },
          "extensions": {
            "type": "object",
            "additionalProperties": {},
            "description": "Spillover for unknown CloudEvent extensions"
          }
        },
        "description": "A bucket-scoped audit log event in CloudEvents 1.0 format"
      },
      "Zuplo.AuditLogsV1.AuditLogResource": {
        "type": "object",
        "required": [
          "type",
          "id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Resource type (e.g. 'api-key', 'account')"
          },
          "id": {
            "type": "string",
            "description": "Resource identifier"
          }
        },
        "description": "A resource affected by an audit event"
      },
      "Zuplo.AuditLogsV1.AuditLogsEventsResponse": {
        "type": "object",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.AuditLogsV1.AuditLogEvent"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Zuplo.AuditLogsV1.AuditLogsPagination"
          }
        },
        "description": "Audit log events response"
      },
      "Zuplo.AuditLogsV1.AuditLogsPagination": {
        "type": "object",
        "required": [
          "limit",
          "offset",
          "total",
          "hasMore"
        ],
        "properties": {
          "limit": {
            "type": "integer",
            "format": "int32"
          },
          "offset": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "description": "Pagination for audit log events"
      },
      "Zuplo.AuditLogsV1.AuditLogsStatsEntry": {
        "type": "object",
        "required": [
          "key",
          "count"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "Key value for this bucket (e.g. event type, actor sub)"
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Event count for this key"
          }
        },
        "description": "Aggregated audit log stats entry"
      },
      "Zuplo.AuditLogsV1.AuditLogsStatsResponse": {
        "type": "object",
        "required": [
          "groupBy",
          "data"
        ],
        "properties": {
          "groupBy": {
            "type": "string",
            "description": "Column that was grouped by"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.AuditLogsV1.AuditLogsStatsEntry"
            }
          }
        },
        "description": "Audit log stats response"
      },
      "Zuplo.BuildLogs.BuildLogRow": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "minItems": 3,
        "maxItems": 3,
        "description": "A single build-log row, returned as a fixed 3-tuple of [timestamp (ISO 8601), severity, message].",
        "example": [
          "2024-01-01T00:00:00.000Z",
          "INFO",
          "Build started"
        ]
      },
      "Zuplo.BuildLogs.BuildLogStage": {
        "type": "string",
        "enum": [
          "api",
          "dev-portal"
        ],
        "description": "The build stage that produced a set of build logs. Wire values are kebab-case (`api`, `dev-portal`); the response groups logs under camelCase keys (`api`, `devPortal`). Mirrors tenant-api's `DeploymentStageNameSchema` — keep in sync when new stages are added upstream."
      },
      "Zuplo.BuildLogs.BuildLogStepGroup": {
        "type": "object",
        "additionalProperties": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Zuplo.BuildLogs.BuildLogRow"
          }
        },
        "description": "Build logs for a stage, grouped by build step. Keys are step names (e.g. \"build\"); values are ordered arrays of build-log rows."
      },
      "Zuplo.BuildLogs.BuildLogsData": {
        "type": "object",
        "required": [
          "api",
          "devPortal"
        ],
        "properties": {
          "api": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.BuildLogs.BuildLogStepGroup"
              }
            ],
            "description": "Build logs for the API/gateway build stage, grouped by step."
          },
          "devPortal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.BuildLogs.BuildLogStepGroup"
              }
            ],
            "description": "Build logs for the Dev Portal build stage, grouped by step."
          }
        },
        "description": "Build logs grouped by stage (API vs Dev Portal) and then by build step."
      },
      "Zuplo.BuildLogs.BuildLogsResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.BuildLogs.BuildLogsData"
              }
            ],
            "description": "Build logs grouped by stage and step."
          }
        },
        "description": "Response containing the build logs for a deployment build.",
        "example": {
          "data": {
            "api": {
              "build": [
                [
                  "2024-01-01T00:00:00.000Z",
                  "INFO",
                  "Build started"
                ]
              ]
            },
            "devPortal": {}
          }
        }
      },
      "Zuplo.ClientAuth.JwksResponse": {
        "type": "object",
        "required": [
          "keys"
        ],
        "properties": {
          "keys": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "Zuplo.ClientAuth.OAuthAccessTokenResponse": {
        "type": "object",
        "required": [
          "access_token",
          "token_type",
          "expires_in"
        ],
        "properties": {
          "access_token": {
            "type": "string",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJz..."
          },
          "token_type": {
            "type": "string",
            "enum": [
              "Bearer"
            ],
            "example": "Bearer"
          },
          "expires_in": {
            "type": "integer",
            "example": 3600
          },
          "scope": {
            "type": "string",
            "example": "account project deployment"
          }
        }
      },
      "Zuplo.ClientAuth.OAuthErrorResponse": {
        "type": "object",
        "required": [
          "error",
          "error_description"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "invalid_client"
          },
          "error_description": {
            "type": "string",
            "example": "Client authentication failed"
          }
        }
      },
      "Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificate": {
        "type": "object",
        "required": [
          "id",
          "name",
          "certificateInfo",
          "createdOn",
          "updatedOn"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the client mTLS CA certificate.",
            "example": "cert_abc123",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "The name of the client mTLS CA certificate.",
            "example": "my_client_ca"
          },
          "certificateInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateInfo"
              }
            ],
            "description": "Certificate information."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was created.",
            "example": "2023-04-18T05:54:34.408Z",
            "readOnly": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was last updated.",
            "example": "2023-04-20T05:54:34.408Z",
            "readOnly": true
          }
        },
        "description": "A client mTLS CA certificate configured for an account."
      },
      "Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateCreateBody": {
        "type": "object",
        "required": [
          "name",
          "certificate"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "The name of the client mTLS CA certificate.",
            "example": "my_client_ca"
          },
          "certificate": {
            "type": "string",
            "minLength": 1,
            "description": "The PEM-encoded CA certificate."
          }
        }
      },
      "Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateInfo": {
        "type": "object",
        "required": [
          "subject",
          "issuer",
          "validFrom",
          "validTo",
          "serialNumber"
        ],
        "properties": {
          "subject": {
            "type": "string",
            "description": "Certificate subject.",
            "example": "CN=Example Client CA"
          },
          "issuer": {
            "type": "string",
            "description": "Certificate issuer.",
            "example": "CN=Example Root CA"
          },
          "validFrom": {
            "type": "string",
            "description": "Certificate valid from date.",
            "example": "2024-01-01T00:00:00Z"
          },
          "validTo": {
            "type": "string",
            "description": "Certificate valid to date.",
            "example": "2025-01-01T00:00:00Z"
          },
          "serialNumber": {
            "type": "string",
            "description": "Certificate serial number.",
            "example": "12345"
          }
        },
        "description": "Details parsed from a client mTLS CA certificate."
      },
      "Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateListResponse": {
        "type": "object",
        "required": [
          "data",
          "offset",
          "limit"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificate"
            },
            "description": "List of client mTLS CA certificates."
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "description": "Offset for pagination."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "description": "Limit for pagination."
          }
        }
      },
      "Zuplo.ClientMtlsCaCertificates.ClientMtlsCaCertificateUpdateBody": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "The name of the client mTLS CA certificate.",
            "example": "my_client_ca"
          }
        }
      },
      "Zuplo.Common.ExpiresOnField": {
        "type": "object",
        "required": [
          "expiresOn"
        ],
        "properties": {
          "expiresOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item will expire.",
            "example": "2050-04-18T05:54:34.408Z"
          }
        },
        "example": {
          "expiresOn": "2050-04-18T05:54:34.408Z"
        }
      },
      "Zuplo.Configurations.Configuration": {
        "type": "object",
        "required": [
          "accountName",
          "projectName",
          "environmentType",
          "systemConfigurations"
        ],
        "properties": {
          "accountName": {
            "type": "string",
            "example": "chocolate_great_buzzard"
          },
          "projectName": {
            "type": "string",
            "example": "lime-fox"
          },
          "environmentType": {
            "type": "string",
            "enum": [
              "production",
              "preview",
              "development"
            ],
            "example": "production"
          },
          "systemConfigurations": {
            "type": "string",
            "example": "72ih3avJtXRUz6jqHtLEBFVmJDYr1GZtMTKFS8Q71SbyiHgzbL9fPscMURcuEPnryrMv3ABU1fB4qgopG5CkmdgD2..."
          }
        },
        "example": {
          "accountName": "chocolate_great_buzzard",
          "projectName": "lime-fox",
          "environmentType": "production",
          "systemConfigurations": "72ih3avJtXRUz6jqHtLEBFVmJDYr1GZtMTKFS8Q71SbyiHgzbL9fPscMURcuEPnryrMv3ABU1fB4qgopG5CkmdgD2..."
        }
      },
      "Zuplo.ConsumerAnalytics.CallsByStatusCodeData": {
        "type": "object"
      },
      "Zuplo.ConsumerAnalytics.CallsDetailData": {
        "type": "object",
        "required": [
          "consumer",
          "timeStamp",
          "totalCalls",
          "callsByStatusCode"
        ],
        "properties": {
          "consumer": {
            "type": "string",
            "readOnly": true
          },
          "timeStamp": {
            "type": "string",
            "readOnly": true
          },
          "totalCalls": {
            "type": "integer",
            "readOnly": true
          },
          "callsByStatusCode": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ConsumerAnalytics.CallsByStatusCodeData"
            },
            "readOnly": true
          }
        }
      },
      "Zuplo.ConsumerAnalytics.RecentCallsData": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ConsumerAnalytics.RequestData"
            },
            "readOnly": true
          }
        }
      },
      "Zuplo.ConsumerAnalytics.ReponseStatsByStatusCodeData": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.ConsumerAnalytics.StatsByStatusCodeData"
              }
            ],
            "readOnly": true
          }
        }
      },
      "Zuplo.ConsumerAnalytics.RequestData": {
        "type": "object",
        "required": [
          "consumer",
          "method",
          "routePath",
          "statusCode",
          "timeStamp",
          "city",
          "country"
        ],
        "properties": {
          "consumer": {
            "type": "string",
            "readOnly": true
          },
          "method": {
            "type": "string",
            "readOnly": true
          },
          "routePath": {
            "type": "string",
            "readOnly": true
          },
          "statusCode": {
            "type": "string",
            "readOnly": true
          },
          "timeStamp": {
            "type": "string",
            "readOnly": true
          },
          "city": {
            "type": "string",
            "readOnly": true
          },
          "country": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "Zuplo.ConsumerAnalytics.StatsByStatusCode.TimeWindowFilter": {
        "type": "string",
        "enum": [
          "last-hour",
          "last-24-hours",
          "last-7-days",
          "last-30-days",
          "last-3-months"
        ]
      },
      "Zuplo.ConsumerAnalytics.StatsByStatusCodeData": {
        "type": "object",
        "properties": {
          "stats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ConsumerAnalytics.StatsData"
            },
            "readOnly": true
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ConsumerAnalytics.CallsDetailData"
            },
            "readOnly": true
          }
        }
      },
      "Zuplo.ConsumerAnalytics.StatsData": {
        "type": "object",
        "required": [
          "totalCalls",
          "consumer",
          "callsByStatusCode"
        ],
        "properties": {
          "totalCalls": {
            "type": "integer",
            "readOnly": true
          },
          "consumer": {
            "type": "string",
            "readOnly": true
          },
          "callsByStatusCode": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ConsumerAnalytics.CallsByStatusCodeData"
            },
            "readOnly": true
          }
        }
      },
      "Zuplo.CustomDomains.CustomDomain": {
        "type": "object",
        "required": [
          "id",
          "accountName",
          "projectName",
          "deployments",
          "hostname",
          "provider"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the custom domain.",
            "example": "cdm_01HZX8D7A1M9S0K4Y2N6P3Q8R5"
          },
          "accountName": {
            "type": "string",
            "description": "The account that owns the custom domain.",
            "example": "chocolate_great_buzzard"
          },
          "projectName": {
            "type": "string",
            "description": "The project associated with the custom domain.",
            "example": "todo-list-api"
          },
          "deployments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainDeployment"
            },
            "description": "The deployments currently mapped to this hostname."
          },
          "hostname": {
            "type": "string",
            "description": "The hostname assigned to the custom domain.",
            "example": "api.example.com"
          },
          "provider": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainProvider"
              }
            ],
            "description": "The provider backing the custom domain.",
            "example": "cloudflare"
          }
        },
        "description": "A custom domain configured for an account.",
        "example": {
          "id": "cdm_01HZX8D7A1M9S0K4Y2N6P3Q8R5",
          "accountName": "chocolate_great_buzzard",
          "projectName": "todo-list-api",
          "deployments": [
            {
              "deploymentName": "todo-list-api-main-59eec11",
              "branch": "main",
              "environmentType": "PRODUCTION",
              "isDefault": true,
              "stage": "api",
              "cname": "todo-list-api-main-59eec11.zuplo.app"
            }
          ],
          "hostname": "api.example.com",
          "provider": "cloudflare"
        }
      },
      "Zuplo.CustomDomains.CustomDomainCreateBody": {
        "type": "object",
        "required": [
          "hostname"
        ],
        "properties": {
          "hostname": {
            "type": "string",
            "description": "The hostname to configure as a custom domain.",
            "example": "api.example.com"
          },
          "deploymentName": {
            "type": "string",
            "description": "The deployment to associate with the hostname.",
            "example": "todo-list-api-main-59eec11"
          },
          "stage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainStage"
              }
            ],
            "description": "The stage to expose on the hostname.",
            "example": "api"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this domain should be the default domain for the deployment.",
            "example": true
          },
          "isAlias": {
            "type": "boolean",
            "description": "Whether the domain should be configured as an alias.",
            "example": false
          }
        },
        "description": "Request body for creating a custom domain.",
        "example": {
          "hostname": "api.example.com",
          "deploymentName": "todo-list-api-main-59eec11",
          "stage": "api",
          "isDefault": true,
          "isAlias": false
        }
      },
      "Zuplo.CustomDomains.CustomDomainDeployment": {
        "type": "object",
        "required": [
          "deploymentName",
          "branch",
          "environmentType",
          "isDefault",
          "stage",
          "cname"
        ],
        "properties": {
          "deploymentName": {
            "type": "string",
            "nullable": true,
            "description": "The deployment name associated with the custom domain.",
            "example": "todo-list-api-main-59eec11"
          },
          "branch": {
            "type": "string",
            "nullable": true,
            "description": "The branch associated with the deployment.",
            "example": "main"
          },
          "environmentType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainEnvironmentType"
              }
            ],
            "nullable": true,
            "description": "The environment type associated with the deployment.",
            "example": "PRODUCTION"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this deployment is the default for the hostname.",
            "example": true
          },
          "stage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainStage"
              }
            ],
            "nullable": true,
            "description": "The stage exposed by this custom domain mapping.",
            "example": "api"
          },
          "cname": {
            "type": "string",
            "nullable": true,
            "description": "The CNAME target for this deployment.",
            "example": "todo-list-api-main-59eec11.zuplo.app"
          }
        },
        "description": "A deployment bound to a custom domain.",
        "example": {
          "deploymentName": "todo-list-api-main-59eec11",
          "branch": "main",
          "environmentType": "PRODUCTION",
          "isDefault": true,
          "stage": "api",
          "cname": "todo-list-api-main-59eec11.zuplo.app"
        }
      },
      "Zuplo.CustomDomains.CustomDomainEnvironmentType": {
        "type": "string",
        "enum": [
          "PRODUCTION",
          "PREVIEW",
          "WORKING_COPY"
        ],
        "description": "The environment type targeted by a custom domain deployment."
      },
      "Zuplo.CustomDomains.CustomDomainMutationResult": {
        "type": "object",
        "required": [
          "deploymentName",
          "hostname",
          "stage",
          "ownershipVerification",
          "cname"
        ],
        "properties": {
          "deploymentName": {
            "type": "string",
            "nullable": true,
            "description": "The deployment associated with the hostname.",
            "example": "todo-list-api-main-59eec11"
          },
          "hostname": {
            "type": "string",
            "description": "The hostname that was created or updated.",
            "example": "api.example.com"
          },
          "stage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomainStage"
              }
            ],
            "nullable": true,
            "description": "The stage exposed by the hostname.",
            "example": "api"
          },
          "ownershipVerification": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.CustomDomains.OwnershipVerification"
              }
            ],
            "nullable": true,
            "description": "The DNS record required to verify domain ownership, if any."
          },
          "cname": {
            "type": "string",
            "nullable": true,
            "description": "The CNAME target for the custom domain, if any.",
            "example": "todo-list-api-main-59eec11.zuplo.app"
          }
        },
        "description": "The result of creating or updating a custom domain.",
        "example": {
          "deploymentName": "todo-list-api-main-59eec11",
          "hostname": "api.example.com",
          "stage": "api",
          "ownershipVerification": {
            "name": "_zuplo.api.example.com",
            "type": "TXT",
            "value": "zuplo-verification-token"
          },
          "cname": "todo-list-api-main-59eec11.zuplo.app"
        }
      },
      "Zuplo.CustomDomains.CustomDomainProvider": {
        "type": "string",
        "enum": [
          "cloudflare",
          "amazon",
          "custom",
          "alias"
        ],
        "description": "The provider backing a custom domain."
      },
      "Zuplo.CustomDomains.CustomDomainStage": {
        "type": "string",
        "enum": [
          "api",
          "dev-portal"
        ],
        "description": "The stage exposed by a custom domain."
      },
      "Zuplo.CustomDomains.CustomDomainUpdateBody": {
        "type": "object",
        "required": [
          "hostname"
        ],
        "properties": {
          "hostname": {
            "type": "string",
            "description": "The hostname to update.",
            "example": "api.example.com"
          },
          "deploymentName": {
            "type": "string",
            "description": "The deployment to associate with the hostname.",
            "example": "todo-list-api-main-59eec11"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this domain should be the default domain for the deployment.",
            "example": true
          }
        },
        "description": "Request body for updating a custom domain.",
        "example": {
          "hostname": "api.example.com",
          "deploymentName": "todo-list-api-main-59eec11",
          "isDefault": true
        }
      },
      "Zuplo.CustomDomains.CustomDomainsList": {
        "type": "object",
        "required": [
          "data",
          "offset",
          "limit"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.CustomDomains.CustomDomain"
            },
            "description": "The custom domains returned for the account."
          },
          "offset": {
            "type": "integer",
            "format": "uint32",
            "description": "The number of records skipped.",
            "example": 0
          },
          "limit": {
            "type": "integer",
            "format": "uint32",
            "description": "The maximum number of records returned.",
            "example": 100
          }
        },
        "description": "Response containing a paginated list of custom domains.",
        "example": {
          "data": [
            {
              "id": "cdm_01HZX8D7A1M9S0K4Y2N6P3Q8R5",
              "accountName": "chocolate_great_buzzard",
              "projectName": "todo-list-api",
              "deployments": [
                {
                  "deploymentName": "todo-list-api-main-59eec11",
                  "branch": "main",
                  "environmentType": "PRODUCTION",
                  "isDefault": true,
                  "stage": "api",
                  "cname": "todo-list-api-main-59eec11.zuplo.app"
                }
              ],
              "hostname": "api.example.com",
              "provider": "cloudflare"
            }
          ],
          "offset": 0,
          "limit": 100
        }
      },
      "Zuplo.CustomDomains.OwnershipVerification": {
        "type": "object",
        "required": [
          "name",
          "type",
          "value"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The DNS record name to create.",
            "example": "_zuplo.api.example.com"
          },
          "type": {
            "type": "string",
            "description": "The DNS record type to create.",
            "example": "TXT"
          },
          "value": {
            "type": "string",
            "description": "The DNS record value to create.",
            "example": "zuplo-verification-token"
          }
        },
        "description": "DNS record details used to verify domain ownership.",
        "example": {
          "name": "_zuplo.api.example.com",
          "type": "TXT",
          "value": "zuplo-verification-token"
        }
      },
      "Zuplo.DeploymentStatus.DeploymentStatus": {
        "type": "object",
        "required": [
          "status",
          "url",
          "steps",
          "buildResult"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "ERROR",
              "IN_PROGRESS"
            ],
            "example": "SUCCESS"
          },
          "url": {
            "type": "string",
            "example": "https://api.zuplo.com/v1/deployments/lime-fox-main-bbe7540"
          },
          "steps": {
            "type": "object",
            "additionalProperties": {}
          },
          "buildResult": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "description": "Status of a Zuplo project deployment, including the status, build results, and a URL to view more details.",
        "example": {
          "status": "SUCCESS",
          "url": "https://api.zuplo.com/v1/deployments/lime-fox-main-bbe7540",
          "steps": {},
          "buildResult": {}
        }
      },
      "Zuplo.Deployments.Deployment": {
        "type": "object",
        "required": [
          "name",
          "url",
          "label",
          "urlParameter",
          "createdOn",
          "updatedOn",
          "loggingId",
          "accountName",
          "projectName",
          "state",
          "message",
          "branchName",
          "environmentType"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the deployment. You can find this in the Zuplo Portal under Settings > Environments.",
            "example": "lime-fox-main-bbe7540"
          },
          "url": {
            "type": "string",
            "example": "https://api.zuplo.com/deployments/lime-fox-main-bbe7540"
          },
          "label": {
            "type": "string",
            "example": "main"
          },
          "urlParameter": {
            "type": "string",
            "example": "main"
          },
          "createdOn": {
            "type": "string",
            "example": "2023-07-25T23:41:41.468Z"
          },
          "updatedOn": {
            "type": "string",
            "example": "2023-07-25T23:41:41.468Z"
          },
          "loggingId": {
            "type": "string",
            "example": "chocolate_great_buzzard::lime-fox::main::main::bbe7540"
          },
          "accountName": {
            "type": "string",
            "example": "chocolate_great_buzzard"
          },
          "projectName": {
            "type": "string",
            "example": "lime-fox"
          },
          "state": {
            "type": "string",
            "example": "STARTED"
          },
          "message": {
            "type": "string",
            "enum": [
              ""
            ],
            "example": ""
          },
          "branchName": {
            "type": "string",
            "example": "main"
          },
          "environmentType": {
            "type": "string",
            "example": "PRODUCTION"
          }
        },
        "description": "A single deployment of a Zup.",
        "example": {
          "name": "lime-fox-main-bbe7540",
          "label": "main",
          "urlParameter": "main",
          "createdOn": "2023-07-25T23:41:41.468Z",
          "updatedOn": "2023-07-25T23:41:41.468Z",
          "loggingId": "chocolate_great_buzzard::lime-fox::main::main::bbe7540",
          "accountName": "chocolate_great_buzzard",
          "projectName": "lime-fox",
          "state": "STARTED",
          "message": "",
          "branchName": "main",
          "url": "https://lime-fox-main-bbe7540.zuplo.app",
          "environmentType": "PRODUCTION"
        }
      },
      "Zuplo.Deployments.DeploymentsList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.Deployments.Deployment"
            }
          }
        },
        "example": {
          "data": [
            {
              "name": "lime-fox-main-bbe7540",
              "label": "main",
              "urlParameter": "main",
              "createdOn": "2023-07-25T23:41:41.468Z",
              "updatedOn": "2023-07-25T23:41:41.468Z",
              "loggingId": "chocolate_great_buzzard::lime-fox::main::main::bbe7540",
              "accountName": "chocolate_great_buzzard",
              "projectName": "lime-fox",
              "state": "STARTED",
              "message": "",
              "branchName": "main",
              "url": "https://lime-fox-main-bbe7540.zuplo.app",
              "environmentType": "PRODUCTION"
            }
          ]
        }
      },
      "Zuplo.Deploys.DeploymentResponse": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string"
          }
        },
        "example": {
          "status": "request enqueued"
        }
      },
      "Zuplo.Deploys.SourceCreateBody": {
        "type": "object",
        "required": [
          "accountName",
          "projectName",
          "branchName"
        ],
        "properties": {
          "accountName": {
            "type": "string",
            "description": "The name of the account",
            "example": "my-account"
          },
          "projectName": {
            "type": "string",
            "description": "The name of the project",
            "example": "my-project"
          },
          "branchName": {
            "type": "string",
            "description": "The name of the branch for deployment",
            "example": "main"
          }
        }
      },
      "Zuplo.Deploys.SourceUrlCreateBody": {
        "type": "object",
        "required": [
          "accountName",
          "projectName",
          "branchName"
        ],
        "properties": {
          "accountName": {
            "type": "string",
            "description": "The name of the account",
            "example": "my-account"
          },
          "projectName": {
            "type": "string",
            "description": "The name of the project",
            "example": "my-project"
          },
          "branchName": {
            "type": "string",
            "description": "The name of the branch for deployment",
            "example": "main"
          },
          "repositoryUrl": {
            "type": "string",
            "description": "The git repository url of the source code",
            "example": "https://github.com/my-account/my-project"
          },
          "branch": {
            "type": "string",
            "description": "The git branch",
            "example": "main"
          },
          "sha": {
            "type": "string",
            "description": "The git sha of the commit",
            "example": "9fb5c38a83013be1625c9b5cb2d1bdf458ff827e"
          }
        }
      },
      "Zuplo.Environments.Environment": {
        "type": "object",
        "required": [
          "name",
          "createdOn",
          "accountName",
          "projectName",
          "branchName",
          "environmentType"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the environment.",
            "example": "lime-fox-main-bbe7540"
          },
          "createdOn": {
            "type": "string",
            "example": "2023-07-25T23:41:41.468Z"
          },
          "accountName": {
            "type": "string",
            "example": "chocolate_great_buzzard"
          },
          "projectName": {
            "type": "string",
            "example": "lime-fox"
          },
          "branchName": {
            "type": "string",
            "example": "main"
          },
          "environmentType": {
            "type": "string",
            "enum": [
              "production",
              "preview",
              "development"
            ],
            "example": "production"
          }
        },
        "description": "The environment representing a Zup. This is mainly used in self-hosting deployments.",
        "example": {
          "name": "lime-fox-main-bbe7540",
          "accountName": "chocolate_great_buzzard",
          "projectName": "lime-fox",
          "createdOn": "2023-07-25T23:41:41.468Z",
          "branchName": "main",
          "environmentType": "production"
        }
      },
      "Zuplo.Environments.EnvironmentCreateBody": {
        "type": "object",
        "required": [
          "accountName",
          "projectName",
          "environmentType",
          "branchName"
        ],
        "properties": {
          "accountName": {
            "type": "string",
            "description": "The name of the account",
            "example": "my-account"
          },
          "projectName": {
            "type": "string",
            "description": "The name of the project",
            "example": "my-project"
          },
          "environmentType": {
            "type": "string",
            "enum": [
              "production",
              "preview"
            ],
            "description": "The name of the branch for deployment",
            "example": "preview"
          },
          "branchName": {
            "type": "string",
            "description": "The name of the branch for deployment",
            "example": "main"
          }
        }
      },
      "Zuplo.Environments.EnvironmentsList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.Environments.Environment"
            }
          }
        },
        "example": {
          "data": [
            {
              "name": "lime-fox-main-bbe7540",
              "accountName": "chocolate_great_buzzard",
              "projectName": "lime-fox",
              "createdOn": "2023-07-25T23:41:41.468Z",
              "branchName": "main",
              "environmentType": "production"
            }
          ]
        }
      },
      "Zuplo.HttpProblemDetails.BadRequestProblemResponse": {
        "type": "object",
        "required": [
          "type",
          "title"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "https://httpproblems.com/http-status/400"
            ]
          },
          "title": {
            "type": "string",
            "enum": [
              "Bad Request"
            ]
          }
        },
        "allOf": [
          {
            "type": "object",
            "required": [
              "type",
              "title"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "detail": {
                "type": "string"
              },
              "instance": {
                "type": "string"
              }
            }
          }
        ],
        "example": {
          "type": "https://httpproblems.com/http-status/400",
          "title": "Bad Request",
          "status": 400
        }
      },
      "Zuplo.HttpProblemDetails.InternalServerErrorProblemResponse": {
        "type": "object",
        "required": [
          "type",
          "title"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "https://httpproblems.com/http-status/500"
            ]
          },
          "title": {
            "type": "string",
            "enum": [
              "Internal Server Error"
            ]
          }
        },
        "allOf": [
          {
            "type": "object",
            "required": [
              "type",
              "title"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "detail": {
                "type": "string"
              },
              "instance": {
                "type": "string"
              }
            }
          }
        ],
        "example": {
          "type": "https://httpproblems.com/http-status/500",
          "title": "Internal Server Error",
          "status": 500
        }
      },
      "Zuplo.HttpProblemDetails.NotFoundProblemResponse": {
        "type": "object",
        "required": [
          "type",
          "title"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "https://httpproblems.com/http-status/404"
            ]
          },
          "title": {
            "type": "string",
            "enum": [
              "Not Found"
            ]
          }
        },
        "allOf": [
          {
            "type": "object",
            "required": [
              "type",
              "title"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "detail": {
                "type": "string"
              },
              "instance": {
                "type": "string"
              }
            }
          }
        ],
        "example": {
          "type": "https://httpproblems.com/http-status/404",
          "title": "Not Found",
          "status": 404
        }
      },
      "Zuplo.HttpProblemDetails.UnauthorizedProblemResponse": {
        "type": "object",
        "required": [
          "type",
          "title"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "https://httpproblems.com/http-status/401"
            ]
          },
          "title": {
            "type": "string",
            "enum": [
              "Unauthorized"
            ]
          }
        },
        "allOf": [
          {
            "type": "object",
            "required": [
              "type",
              "title"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "detail": {
                "type": "string"
              },
              "instance": {
                "type": "string"
              }
            }
          }
        ],
        "example": {
          "type": "https://httpproblems.com/http-status/401",
          "title": "Unauthorized",
          "status": 401
        }
      },
      "Zuplo.MCP.McpServerCardDocument": {
        "type": "object",
        "required": [
          "$schema",
          "name",
          "version",
          "description"
        ],
        "properties": {
          "$schema": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "websiteUrl": {
            "type": "string"
          },
          "remotes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MCP.McpServerCardRemote"
            }
          }
        }
      },
      "Zuplo.MCP.McpServerCardHeaderInput": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "isRequired": {
            "type": "boolean"
          },
          "isSecret": {
            "type": "boolean"
          },
          "placeholder": {
            "type": "string"
          }
        }
      },
      "Zuplo.MCP.McpServerCardRemote": {
        "type": "object",
        "required": [
          "type",
          "url"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "streamable-http",
              "sse"
            ]
          },
          "url": {
            "type": "string"
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MCP.McpServerCardHeaderInput"
            }
          },
          "supportedProtocolVersions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Zuplo.ManagedDedicated.Fleet": {
        "type": "object",
        "required": [
          "id",
          "name",
          "vendor",
          "controlPlaneUrl",
          "isAccountDefault",
          "createdOn",
          "updatedOn"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Fleet ID"
          },
          "name": {
            "type": "string",
            "description": "Fleet name"
          },
          "vendor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.ManagedDedicated.FleetVendor"
              }
            ],
            "description": "Fleet vendor"
          },
          "controlPlaneUrl": {
            "type": "string",
            "description": "Control plane URL"
          },
          "isAccountDefault": {
            "type": "boolean",
            "description": "Whether this is the default fleet for the account"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp"
          }
        },
        "description": "Fleet information"
      },
      "Zuplo.ManagedDedicated.FleetConfigurationRequest": {
        "type": "object",
        "additionalProperties": {},
        "description": "Fleet configuration request"
      },
      "Zuplo.ManagedDedicated.FleetConfigurationResponse": {
        "type": "object",
        "additionalProperties": {},
        "description": "Fleet configuration response"
      },
      "Zuplo.ManagedDedicated.FleetListResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.ManagedDedicated.Fleet"
            },
            "description": "List of fleets"
          }
        },
        "description": "Fleet list response"
      },
      "Zuplo.ManagedDedicated.FleetVendor": {
        "type": "string",
        "enum": [
          "akamai",
          "amazon",
          "google",
          "microsoft"
        ],
        "description": "Fleet vendor"
      },
      "Zuplo.Metering.Bucket": {
        "type": "object",
        "required": [
          "createdOn",
          "updatedOn",
          "id",
          "accountName"
        ],
        "properties": {
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was created.",
            "example": "2023-04-18T05:54:34.408Z",
            "readOnly": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was last updated.",
            "example": "2023-04-20T05:54:34.408Z",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "example": "mtr_STYBm01FabkgZOP3KtkYdJuO",
            "readOnly": true
          },
          "accountName": {
            "type": "string",
            "example": "my-account",
            "readOnly": true
          }
        },
        "example": {
          "id": "mtr_STYBm01FabkgZOP3KtkYdJuO",
          "accountName": "my-account",
          "createdOn": "2023-07-24T19:26:36.000Z",
          "updatedOn": "2023-07-24T19:26:36.000Z"
        }
      },
      "Zuplo.Metering.Buckets": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.Metering.Bucket"
            }
          },
          "limit": {
            "type": "integer",
            "format": "uint32",
            "example": 1000
          },
          "offset": {
            "type": "integer",
            "format": "uint32",
            "example": 0
          },
          "total": {
            "type": "integer",
            "format": "uint32"
          }
        },
        "example": {
          "data": [
            {
              "id": "mtr_STYBm01FabkgZOP3KtkYdJuO",
              "accountName": "my-account",
              "createdOn": "2023-07-24T19:26:36.000Z",
              "updatedOn": "2023-07-24T19:26:36.000Z"
            }
          ]
        }
      },
      "Zuplo.Metering.Plan": {
        "type": "object",
        "required": [
          "createdOn",
          "updatedOn",
          "id",
          "hasSubscriptions",
          "label",
          "planExternalId",
          "meters"
        ],
        "properties": {
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was created.",
            "example": "2023-04-18T05:54:34.408Z",
            "readOnly": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was last updated.",
            "example": "2023-04-20T05:54:34.408Z",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "example": "plan_40dRwJecUOu9xDj2OeXDcYA5",
            "readOnly": true
          },
          "hasSubscriptions": {
            "type": "boolean",
            "example": true,
            "readOnly": true
          },
          "label": {
            "type": "string",
            "example": "Basic Subscription Plan"
          },
          "planExternalId": {
            "type": "string",
            "example": "prod_Pbyd5ARBWtFxkg"
          },
          "meters": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "example": "Requests"
                },
                "max": {
                  "type": "integer",
                  "example": 10
                },
                "available": {
                  "type": "integer"
                }
              },
              "required": [
                "max"
              ]
            },
            "example": {
              "requests": {
                "label": "Requests",
                "max": 10
              }
            }
          },
          "trialDays": {
            "type": "integer",
            "example": 10
          },
          "trialEndStatus": {
            "type": "string",
            "enum": [
              "paused",
              "canceled"
            ],
            "example": "paused"
          },
          "isTrialCollectPayment": {
            "type": "boolean"
          }
        },
        "example": {
          "id": "plan_GUmJS9zKX5mkY46Cf6fAUejZ",
          "createdOn": "2024-01-23T21:31:47Z",
          "updatedOn": "2024-01-23T21:31:47Z",
          "label": "someLabel",
          "planExternalId": "somePlanExternalId",
          "meters": {
            "computeUnits": {
              "label": "Compute Units",
              "max": 30
            },
            "requests": {
              "label": "Requests",
              "max": 10
            }
          },
          "hasSubscriptions": true
        }
      },
      "Zuplo.Metering.PlanCreateBody": {
        "type": "object",
        "required": [
          "label",
          "planExternalId",
          "meters"
        ],
        "properties": {
          "label": {
            "type": "string",
            "example": "Basic Subscription Plan"
          },
          "planExternalId": {
            "type": "string",
            "example": "prod_Pbyd5ARBWtFxkg"
          },
          "meters": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "example": "Requests"
                },
                "max": {
                  "type": "integer",
                  "example": 10
                },
                "available": {
                  "type": "integer"
                }
              },
              "required": [
                "max"
              ]
            },
            "example": {
              "requests": {
                "label": "Requests",
                "max": 10
              }
            }
          },
          "trialDays": {
            "type": "integer",
            "example": 10
          },
          "trialEndStatus": {
            "type": "string",
            "enum": [
              "paused",
              "canceled"
            ],
            "example": "paused"
          },
          "isTrialCollectPayment": {
            "type": "boolean"
          }
        }
      },
      "Zuplo.Metering.PlanUpdateBody": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "example": "Basic Subscription Plan"
          },
          "planExternalId": {
            "type": "string",
            "example": "prod_Pbyd5ARBWtFxkg"
          },
          "meters": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "example": "Requests"
                },
                "max": {
                  "type": "integer",
                  "example": 10
                },
                "available": {
                  "type": "integer"
                }
              }
            },
            "example": {
              "requests": {
                "label": "Requests",
                "max": 10
              }
            }
          },
          "trialDays": {
            "type": "integer",
            "example": 10
          },
          "trialEndStatus": {
            "type": "string",
            "enum": [
              "paused",
              "canceled"
            ],
            "example": "paused"
          },
          "isTrialCollectPayment": {
            "type": "boolean"
          }
        }
      },
      "Zuplo.Metering.Plans": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.Metering.Plan"
            }
          },
          "limit": {
            "type": "integer",
            "format": "uint32",
            "example": 1000
          },
          "offset": {
            "type": "integer",
            "format": "uint32",
            "example": 0
          },
          "total": {
            "type": "integer",
            "format": "uint32"
          }
        },
        "example": {
          "data": [
            {
              "id": "plan_GUmJS9zKX5mkY46Cf6fAUejZ",
              "createdOn": "2024-01-23T21:31:47Z",
              "updatedOn": "2024-01-23T21:31:47Z",
              "label": "someLabel",
              "planExternalId": "somePlanExternalId",
              "meters": {
                "computeUnits": {
                  "label": "Compute Units",
                  "max": 30
                },
                "requests": {
                  "label": "Requests",
                  "max": 10
                }
              },
              "hasSubscriptions": true
            }
          ]
        }
      },
      "Zuplo.Metering.Quota": {
        "type": "object",
        "additionalProperties": {
          "type": "integer"
        },
        "example": {
          "requests": 10
        }
      },
      "Zuplo.Metering.Subscription": {
        "type": "object",
        "required": [
          "createdOn",
          "updatedOn",
          "id",
          "planIds",
          "planExternalIds",
          "status",
          "type",
          "renewalStrategy",
          "region",
          "customerKey",
          "subscriptionExternalId",
          "customerExternalId"
        ],
        "properties": {
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was created.",
            "example": "2023-04-18T05:54:34.408Z",
            "readOnly": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was last updated.",
            "example": "2023-04-20T05:54:34.408Z",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "example": "sbsc_BnCcCqQHM5H4z60sTR0FfCKg",
            "readOnly": true
          },
          "planIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "plan_ZLbXn7SCZt6KJnD6SU8Ljv8w"
            ]
          },
          "planExternalIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "prod_Pbyd5ARBWtFxkg"
            ]
          },
          "quotaResetAnchor": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "incomplete",
              "incomplete-expired",
              "trialing",
              "past-due",
              "canceled",
              "unpaid",
              "paused"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "periodic"
            ]
          },
          "renewalStrategy": {
            "type": "string",
            "enum": [
              "monthly",
              "yearly"
            ]
          },
          "region": {
            "type": "string",
            "enum": [
              "us-central1",
              "us-east1",
              "europe-west4"
            ]
          },
          "customerKey": {
            "type": "string",
            "example": "d8984b34-defd-458c-bf34-7fb1b69ce714"
          },
          "subscriptionExternalId": {
            "type": "string",
            "example": "sub_1OmlUlLQav6G4UBHsPy2BY7J"
          },
          "customerExternalId": {
            "type": "string",
            "example": "cus_PbzTcoZtPtelYg"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "trialEndStatus": {
            "type": "string",
            "example": "paused"
          },
          "trialEndDate": {
            "type": "string",
            "format": "date-time"
          },
          "trialStartDate": {
            "type": "string",
            "format": "date-time"
          },
          "nextBillingCycle": {
            "type": "string",
            "format": "date-time"
          },
          "productKey": {
            "type": "string"
          }
        },
        "example": {
          "id": "sbsc_2te8204SbBQ9Zf0D9Ec9SKQC",
          "planIds": [
            "plan_ZLbXn7SCZt6KJnD6SU8Ljv8w"
          ],
          "planExternalIds": [
            "prod_Pbyd5ARBWtFxkg"
          ],
          "createdOn": "2024-02-22T23:16:06Z",
          "updatedOn": "2024-02-22T23:16:06Z",
          "quotaResetAnchor": "2024-02-22T23:16:06Z",
          "status": "active",
          "type": "periodic",
          "renewalStrategy": "monthly",
          "region": "us-central1",
          "customerKey": "d8984b34-defd-458c-bf34-7fb1b69ce714",
          "subscriptionExternalId": "sub_1OmlUlLQav6G4UBHsPy2BY7J",
          "customerExternalId": "cus_PbzTcoZtPtelYg",
          "nextBillingCycle": "2024-06-22T00:00:00Z"
        }
      },
      "Zuplo.Metering.SubscriptionCreateBody": {
        "type": "object",
        "required": [
          "planIds",
          "planExternalIds",
          "status",
          "type",
          "renewalStrategy",
          "region",
          "customerKey",
          "subscriptionExternalId",
          "customerExternalId"
        ],
        "properties": {
          "planIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "plan_ZLbXn7SCZt6KJnD6SU8Ljv8w"
            ]
          },
          "planExternalIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "prod_Pbyd5ARBWtFxkg"
            ]
          },
          "quotaResetAnchor": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "incomplete",
              "incomplete-expired",
              "trialing",
              "past-due",
              "canceled",
              "unpaid",
              "paused"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "periodic"
            ]
          },
          "renewalStrategy": {
            "type": "string",
            "enum": [
              "monthly",
              "yearly"
            ]
          },
          "region": {
            "type": "string",
            "enum": [
              "us-central1",
              "us-east1",
              "europe-west4"
            ]
          },
          "customerKey": {
            "type": "string",
            "example": "d8984b34-defd-458c-bf34-7fb1b69ce714"
          },
          "subscriptionExternalId": {
            "type": "string",
            "example": "sub_1OmlUlLQav6G4UBHsPy2BY7J"
          },
          "customerExternalId": {
            "type": "string",
            "example": "cus_PbzTcoZtPtelYg"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "trialEndStatus": {
            "type": "string",
            "example": "paused"
          },
          "trialEndDate": {
            "type": "string",
            "format": "date-time"
          },
          "trialStartDate": {
            "type": "string",
            "format": "date-time"
          },
          "nextBillingCycle": {
            "type": "string",
            "format": "date-time"
          },
          "productKey": {
            "type": "string"
          }
        }
      },
      "Zuplo.Metering.SubscriptionUpdateBody": {
        "type": "object",
        "properties": {
          "planExternalIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "prod_Pbyd5ARBWtFxkg"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "incomplete",
              "incomplete-expired",
              "trialing",
              "past-due",
              "canceled",
              "unpaid",
              "paused"
            ]
          },
          "prorate": {
            "type": "number",
            "example": 0.75
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "trialEndDate": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Zuplo.Metering.Subscriptions": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.Metering.Subscription"
            }
          },
          "limit": {
            "type": "integer",
            "format": "uint32",
            "example": 1000
          },
          "offset": {
            "type": "integer",
            "format": "uint32",
            "example": 0
          },
          "total": {
            "type": "integer",
            "format": "uint32"
          }
        },
        "example": {
          "data": [
            {
              "id": "sbsc_vP3r5TxhjMBLZr6JsNGAWkgB",
              "planIds": [
                "plan_5jqkZ9K6VzCn2YSeQ0l7WoRl"
              ],
              "planExternalIds": [
                "prod_PQIwOzwlFOd0ky"
              ],
              "createdOn": "2024-02-06T23:34:10Z",
              "updatedOn": "2024-02-06T23:34:10Z",
              "quotaResetAnchor": "2024-02-06T23:34:10Z",
              "status": "active",
              "type": "periodic",
              "renewalStrategy": "monthly",
              "region": "us-central1",
              "customerKey": "5b8d3cc0-5cd7-4910-a502-d904181815c2",
              "productKey": "routes.oas.json",
              "subscriptionExternalId": "sub_1Ogy6hEgfsfDxksqxt4Ffiv8",
              "customerExternalId": "cus_PW0625dV3Cz0sr",
              "nextBillingCycle": "2024-03-06T00:00:00Z"
            }
          ]
        }
      },
      "Zuplo.MeteringV3.CalculateTaxResponse": {
        "type": "object",
        "required": [
          "currency",
          "items",
          "subtotal",
          "taxAmount",
          "taxInclusive",
          "taxes",
          "total"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.TaxCalculationItemResult"
            },
            "nullable": true
          },
          "subtotal": {
            "type": "integer",
            "format": "int64"
          },
          "taxAmount": {
            "type": "integer",
            "format": "int64"
          },
          "taxInclusive": {
            "type": "boolean"
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.TaxItem"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Zuplo.MeteringV3.CancelSubscriptionRequestBody": {
        "type": "object",
        "required": [
          "timing"
        ],
        "properties": {
          "timing": {
            "type": "string",
            "description": "The timing for canceling the subscription. Supported values: immediate, next_billing_cycle"
          }
        }
      },
      "Zuplo.MeteringV3.ChangePlanSubscriptionRequestBody": {
        "type": "object",
        "required": [
          "planId"
        ],
        "properties": {
          "planId": {
            "type": "string",
            "description": "The plan ID"
          },
          "customerEmail": {
            "type": "string",
            "description": "The customer email address (required for private plans)"
          }
        }
      },
      "Zuplo.MeteringV3.CreateMntMemberInviteRequestBody": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "description": "Invitee email address"
          },
          "invitedBy": {
            "type": "string",
            "description": "Identifier of the inviting member (optional)"
          }
        }
      },
      "Zuplo.MeteringV3.CreateMntMemberRequestBody": {
        "type": "object",
        "required": [
          "userId"
        ],
        "properties": {
          "userId": {
            "type": "string",
            "description": "User record ID"
          }
        }
      },
      "Zuplo.MeteringV3.CreateOmPlanInviteResponseBody": {
        "type": "object",
        "required": [
          "bucketId",
          "createdOn",
          "email",
          "id",
          "planId",
          "updatedOn"
        ],
        "properties": {
          "bucketId": {
            "type": "string"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Zuplo.MeteringV3.CreatePaymentCheckoutSessionRequestBody": {
        "type": "object",
        "required": [
          "customerKey",
          "billingEmail",
          "planId",
          "successUrl",
          "cancelUrl"
        ],
        "properties": {
          "customerKey": {
            "type": "string",
            "description": "The customer key"
          },
          "billingEmail": {
            "type": "string",
            "description": "The billing email address"
          },
          "planId": {
            "type": "string",
            "description": "The plan ID"
          },
          "successUrl": {
            "type": "string",
            "description": "The URL to which the payment provider should send the customer when payment or setup is complete."
          },
          "cancelUrl": {
            "type": "string",
            "description": "If set, the payment provider displays a back button and the customer is directed to this URL if they decide to cancel payment."
          }
        }
      },
      "Zuplo.MeteringV3.CreatePaymentCheckoutSessionResponseBody": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "description": "The URL to redirect the customer to. Points to Stripe checkout for new customers, or directly to the success URL for customers with existing Stripe billing."
          }
        }
      },
      "Zuplo.MeteringV3.CreatePaymentPortalSessionRequestBody": {
        "type": "object",
        "required": [
          "customerKey",
          "billingEmail"
        ],
        "properties": {
          "customerKey": {
            "type": "string",
            "description": "The customer key"
          },
          "billingEmail": {
            "type": "string",
            "description": "The billing email address"
          },
          "locale": {
            "type": "string",
            "description": "The IETF language tag of the locale the customer portal is displayed in (e.g., en, de, es)"
          },
          "returnUrl": {
            "type": "string",
            "description": "The URL to redirect the customer to after they complete their actions in the portal"
          }
        }
      },
      "Zuplo.MeteringV3.CreatePaymentPortalSessionResponseBody": {
        "type": "object",
        "required": [
          "type",
          "url"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of session URL returned: 'portal' for existing Stripe customers, 'checkout' for new customers who need to set up billing."
          },
          "url": {
            "type": "string",
            "description": "The URL to the Stripe session."
          }
        }
      },
      "Zuplo.MeteringV3.CreateSubscriptionRequestBody": {
        "type": "object",
        "required": [
          "customerId",
          "customerEmail",
          "planId"
        ],
        "properties": {
          "customerId": {
            "type": "string",
            "description": "The Zuplo metering customer ID or key"
          },
          "customerEmail": {
            "type": "string",
            "description": "The customer email address"
          },
          "planId": {
            "type": "string",
            "description": "The plan ID"
          },
          "apiKey": {
            "type": "string",
            "description": "Optional existing API key to import instead of generating a new one"
          }
        }
      },
      "Zuplo.MeteringV3.CreateUserRequestBody": {
        "type": "object",
        "required": [
          "sub",
          "email"
        ],
        "properties": {
          "sub": {
            "type": "string",
            "description": "Auth subject (JWT sub)"
          },
          "email": {
            "type": "string",
            "description": "User email address"
          },
          "emailVerified": {
            "type": "boolean",
            "description": "Whether the email is verified; defaults to false when omitted"
          },
          "externalId": {
            "type": "string",
            "description": "External identifier unique within the bucket"
          },
          "firstName": {
            "type": "string",
            "description": "User first name"
          },
          "lastName": {
            "type": "string",
            "description": "User last name"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "description": "User metadata"
          }
        }
      },
      "Zuplo.MeteringV3.CustomInvoicingTaxConfig": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.DefaultTaxConfigBehavior": {
        "type": "object",
        "properties": {
          "behavior": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.DiscountPercentage": {
        "type": "object",
        "required": [
          "percentage"
        ],
        "properties": {
          "percentage": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.DiscountUsage": {
        "type": "object",
        "required": [
          "quantity"
        ],
        "properties": {
          "quantity": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.Discounts": {
        "type": "object",
        "properties": {
          "percentage": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.DiscountPercentage"
          },
          "usage": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.DiscountUsage"
          }
        }
      },
      "Zuplo.MeteringV3.Entitlement": {
        "type": "object"
      },
      "Zuplo.MeteringV3.EntitlementValue": {
        "type": "object",
        "required": [
          "hasAccess"
        ],
        "properties": {
          "balance": {
            "type": "number",
            "format": "double"
          },
          "config": {
            "type": "string"
          },
          "hasAccess": {
            "type": "boolean"
          },
          "overage": {
            "type": "number",
            "format": "double"
          },
          "usage": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "Zuplo.MeteringV3.Feature": {
        "type": "object",
        "required": [
          "createdAt",
          "id",
          "key",
          "name",
          "updatedAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "advancedMeterGroupByFilters": {
            "type": "object",
            "additionalProperties": {}
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "meterGroupByFilters": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "meterSlug": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.GetPlanPurchaseDetailsResponseBody": {
        "type": "object",
        "required": [
          "billingCadence",
          "createdAt",
          "currency",
          "id",
          "key",
          "metadata",
          "monthlyPrice",
          "name",
          "paymentMethodRequired",
          "phases",
          "status",
          "updatedAt",
          "validationErrors",
          "version",
          "yearlyPrice"
        ],
        "properties": {
          "alignment": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.PlanAlignment"
          },
          "billingCadence": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date-time"
          },
          "effectiveTo": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "monthlyPrice": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "paymentMethodRequired": {
            "type": "boolean"
          },
          "phases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.PlanPurchasePhase"
            },
            "nullable": true
          },
          "proRatingConfig": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.ProRatingConfig"
          },
          "status": {
            "type": "string"
          },
          "tax": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.CalculateTaxResponse"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "validationErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.PlanPurchaseValidationError"
            },
            "nullable": true
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "yearlyPrice": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Zuplo.MeteringV3.GetSubscriptionUsageResponseBody": {
        "type": "object",
        "required": [
          "customerId",
          "entitlements",
          "subscriptionId"
        ],
        "properties": {
          "customerId": {
            "type": "string"
          },
          "entitlements": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.EntitlementValue"
            }
          },
          "paymentStatus": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.SubscriptionPaymentStatus"
          },
          "planKey": {
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.ListMntMemberInvitesResponseBody": {
        "type": "object",
        "required": [
          "items",
          "page",
          "pageSize",
          "totalCount"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.MntMemberInviteResponseBody"
            },
            "nullable": true,
            "description": "Invites on this page"
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "pageSize": {
            "type": "integer",
            "format": "int64"
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Zuplo.MeteringV3.ListMntMembersResponseBody": {
        "type": "object",
        "required": [
          "items",
          "page",
          "pageSize",
          "totalCount"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.MntMemberResponseBody"
            },
            "nullable": true,
            "description": "Members on this page"
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "pageSize": {
            "type": "integer",
            "format": "int64"
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Zuplo.MeteringV3.ListOmPlanInvitesResponseBody": {
        "type": "object",
        "required": [
          "items",
          "page",
          "pageSize",
          "totalCount"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.CreateOmPlanInviteResponseBody"
            },
            "nullable": true,
            "description": "The items on the page"
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "pageSize": {
            "type": "integer",
            "format": "int64"
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Zuplo.MeteringV3.ListSubscriptionWithAPIKeysItem": {
        "type": "object",
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.PlanWithPricing"
          }
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.SubscriptionWithAPIKeysResponse"
          }
        ]
      },
      "Zuplo.MeteringV3.ListSubscriptionsResponseBody": {
        "type": "object",
        "required": [
          "items",
          "page",
          "pageSize",
          "totalCount"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.ListSubscriptionWithAPIKeysItem"
            },
            "nullable": true
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "pageSize": {
            "type": "integer",
            "format": "int64"
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Zuplo.MeteringV3.ListUserMembershipsResponseBody": {
        "type": "object",
        "required": [
          "items",
          "page",
          "pageSize",
          "totalCount"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.MntMembershipResponseBody"
            },
            "nullable": true,
            "description": "Memberships on this page"
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "pageSize": {
            "type": "integer",
            "format": "int64"
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Zuplo.MeteringV3.ListUsersResponseBody": {
        "type": "object",
        "required": [
          "items",
          "page",
          "pageSize",
          "totalCount"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.UserResponseBody"
            },
            "nullable": true,
            "description": "Users on this page"
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "pageSize": {
            "type": "integer",
            "format": "int64"
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Zuplo.MeteringV3.MntMemberInviteResponseBody": {
        "type": "object",
        "required": [
          "bucketId",
          "code",
          "createdOn",
          "customerId",
          "email",
          "expiresOn",
          "id",
          "status",
          "updatedOn"
        ],
        "properties": {
          "bucketId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "customerId": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expiresOn": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "acceptedOn": {
            "type": "string",
            "format": "date-time"
          },
          "invitedBy": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.MntMemberInviteStatusFilter": {
        "type": "string",
        "enum": [
          "pending",
          "accepted",
          "revoked",
          "rejected"
        ]
      },
      "Zuplo.MeteringV3.MntMemberInviteStatusTransition": {
        "type": "string",
        "enum": [
          "accepted",
          "rejected",
          "revoked",
          "pending"
        ]
      },
      "Zuplo.MeteringV3.MntMemberResponseBody": {
        "type": "object",
        "required": [
          "id",
          "bucketId",
          "customerId",
          "userId",
          "createdOn",
          "updatedOn"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "bucketId": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "user": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.MntMemberUserResponseBody"
          }
        }
      },
      "Zuplo.MeteringV3.MntMemberUserResponseBody": {
        "type": "object",
        "required": [
          "id",
          "emailVerified",
          "sub",
          "createdOn",
          "updatedOn"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "sub": {
            "type": "string"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.MntMembershipResponseBody": {
        "type": "object",
        "required": [
          "id",
          "bucketId",
          "customerId",
          "createdOn",
          "updatedOn"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "bucketId": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Zuplo.MeteringV3.Period": {
        "type": "object",
        "required": [
          "from",
          "to"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Zuplo.MeteringV3.PlanAlignment": {
        "type": "object",
        "properties": {
          "billablesMustAlign": {
            "type": "boolean"
          }
        }
      },
      "Zuplo.MeteringV3.PlanPurchasePhase": {
        "type": "object",
        "required": [
          "duration",
          "key",
          "metadata",
          "name",
          "rateCards"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "duration": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          },
          "rateCards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.PlanPurchaseRateCard"
            },
            "nullable": true
          }
        }
      },
      "Zuplo.MeteringV3.PlanPurchaseRateCard": {
        "type": "object"
      },
      "Zuplo.MeteringV3.PlanPurchaseValidationError": {
        "type": "object",
        "required": [
          "code",
          "field",
          "message"
        ],
        "properties": {
          "attributes": {
            "type": "object",
            "additionalProperties": {}
          },
          "code": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.PlanReference": {
        "type": "object",
        "required": [
          "id",
          "key",
          "version"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Zuplo.MeteringV3.PlanWithPricing": {
        "type": "object",
        "required": [
          "billingCadence",
          "createdAt",
          "currency",
          "id",
          "key",
          "metadata",
          "monthlyPrice",
          "name",
          "paymentMethodRequired",
          "phases",
          "status",
          "updatedAt",
          "validationErrors",
          "version",
          "yearlyPrice"
        ],
        "properties": {
          "alignment": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.PlanAlignment"
          },
          "billingCadence": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "defaultTaxConfig": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.DefaultTaxConfigBehavior"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date-time"
          },
          "effectiveTo": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "monthlyPrice": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "paymentMethodRequired": {
            "type": "boolean"
          },
          "phases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.PlanPurchasePhase"
            },
            "nullable": true
          },
          "proRatingConfig": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.ProRatingConfig"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "validationErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.PlanPurchaseValidationError"
            },
            "nullable": true
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "yearlyPrice": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Zuplo.MeteringV3.ProRatingConfig": {
        "type": "object",
        "required": [
          "enabled",
          "mode"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "mode": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.RateCardUsageBasedPrice": {
        "type": "object"
      },
      "Zuplo.MeteringV3.RollAPIKeyRequestBody": {
        "type": "object",
        "properties": {
          "expiresOn": {
            "type": "string",
            "format": "date-time",
            "description": "The expiration date for the key being rolled (optional)"
          }
        }
      },
      "Zuplo.MeteringV3.StripeTaxConfig": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.SubscriptionAlignment": {
        "type": "object",
        "properties": {
          "billablesMustAlign": {
            "type": "boolean"
          },
          "currentAlignedBillingPeriod": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.Period"
          }
        }
      },
      "Zuplo.MeteringV3.SubscriptionApiKey": {
        "type": "object",
        "required": [
          "id",
          "key",
          "createdOn",
          "updatedOn"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the API key"
          },
          "key": {
            "type": "string",
            "description": "The API key"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "The creation date of the API key"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "The last update date of the API key"
          },
          "description": {
            "type": "string",
            "description": "The description of the API key"
          },
          "expiresOn": {
            "type": "string",
            "format": "date-time",
            "description": "The expiration date of the API key"
          }
        }
      },
      "Zuplo.MeteringV3.SubscriptionConsumerResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdOn",
          "updatedOn",
          "tags",
          "metadata",
          "apiKeys",
          "managers"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The consumer id"
          },
          "name": {
            "type": "string",
            "description": "The consumer name"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "Date in which the record was created"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "Date in which the record was updated"
          },
          "description": {
            "type": "string",
            "description": "The consumer description"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {},
            "description": "The consumer tags"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "description": "The consumer metadata"
          },
          "apiKeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.SubscriptionApiKey"
            },
            "nullable": true
          },
          "managers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.SubscriptionManager"
            },
            "nullable": true
          }
        }
      },
      "Zuplo.MeteringV3.SubscriptionItem": {
        "type": "object",
        "required": [
          "activeFrom",
          "billingCadence",
          "createdAt",
          "id",
          "key",
          "metadata",
          "name",
          "price",
          "updatedAt"
        ],
        "properties": {
          "activeFrom": {
            "type": "string",
            "format": "date-time"
          },
          "billingCadence": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.RateCardUsageBasedPrice"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "discounts": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.Discounts"
          },
          "featureKey": {
            "type": "string"
          },
          "included": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.SubscriptionItemIncluded"
          },
          "taxConfig": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.TaxConfig"
          }
        }
      },
      "Zuplo.MeteringV3.SubscriptionItemIncluded": {
        "type": "object",
        "required": [
          "feature"
        ],
        "properties": {
          "feature": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.Feature"
          },
          "entitlement": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.Entitlement"
          }
        }
      },
      "Zuplo.MeteringV3.SubscriptionManager": {
        "type": "object",
        "required": [
          "id",
          "email",
          "sub",
          "createdOn"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Manager record id"
          },
          "email": {
            "type": "string",
            "description": "Manager email address"
          },
          "sub": {
            "type": "string",
            "description": "Manager sub"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "Date in which the record was created"
          }
        }
      },
      "Zuplo.MeteringV3.SubscriptionPaymentStatus": {
        "type": "object",
        "required": [
          "isFirstPayment",
          "status"
        ],
        "properties": {
          "isFirstPayment": {
            "type": "boolean"
          },
          "lastPaymentFailedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastPaymentSucceededAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.SubscriptionPhaseExpanded": {
        "type": "object",
        "required": [
          "activeFrom",
          "createdAt",
          "id",
          "key",
          "metadata",
          "name",
          "updatedAt",
          "itemTimelines",
          "items"
        ],
        "properties": {
          "activeFrom": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "itemTimelines": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Zuplo.MeteringV3.SubscriptionItem"
              },
              "nullable": true
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.SubscriptionItem"
            },
            "nullable": true
          },
          "activeTo": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "discounts": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.Discounts"
          }
        }
      },
      "Zuplo.MeteringV3.SubscriptionWithAPIKeysResponse": {
        "type": "object",
        "required": [
          "activeFrom",
          "billingAnchor",
          "billingCadence",
          "consumer",
          "createdAt",
          "currency",
          "customerId",
          "id",
          "metadata",
          "name",
          "phases",
          "status",
          "updatedAt"
        ],
        "properties": {
          "activeFrom": {
            "type": "string",
            "format": "date-time"
          },
          "billingAnchor": {
            "type": "string",
            "format": "date-time"
          },
          "billingCadence": {
            "type": "string"
          },
          "consumer": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.SubscriptionConsumerResponse"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          },
          "phases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MeteringV3.SubscriptionPhaseExpanded"
            },
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time"
          },
          "alignment": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.SubscriptionAlignment"
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {}
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "plan": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.PlanReference"
          },
          "proRatingConfig": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.ProRatingConfig"
          }
        }
      },
      "Zuplo.MeteringV3.TaxCalculationItemResult": {
        "type": "object",
        "required": [
          "amount",
          "taxAmount"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "taxAmount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Zuplo.MeteringV3.TaxConfig": {
        "type": "object",
        "properties": {
          "behavior": {
            "type": "string"
          },
          "customInvoicing": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.CustomInvoicingTaxConfig"
          },
          "stripe": {
            "$ref": "#/components/schemas/Zuplo.MeteringV3.StripeTaxConfig"
          }
        }
      },
      "Zuplo.MeteringV3.TaxItem": {
        "type": "object",
        "required": [
          "amount",
          "jurisdiction",
          "rate",
          "taxType"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "format": "int64"
          },
          "jurisdiction": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          },
          "taxType": {
            "type": "string"
          }
        }
      },
      "Zuplo.MeteringV3.UpdateMntMemberInviteRequestBody": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Invitee email address (patch a pending invite, or set member email when accepting)"
          },
          "emailVerified": {
            "type": "boolean",
            "description": "Member emailVerified when accepting; defaults to false when omitted"
          },
          "expiresOn": {
            "type": "string",
            "format": "date-time",
            "description": "Invite expiration time (patch a pending invite)"
          },
          "firstName": {
            "type": "string",
            "description": "Member first name when accepting"
          },
          "invitedBy": {
            "type": "string",
            "description": "Identifier of the inviting member (patch a pending invite)"
          },
          "lastName": {
            "type": "string",
            "description": "Member last name when accepting"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.MeteringV3.MntMemberInviteStatusTransition"
              }
            ],
            "description": "Invite status transition: accepted or rejected (invitee), or revoked or pending (admin)"
          },
          "sub": {
            "type": "string",
            "description": "Auth subject (JWT sub); required when accepting or rejecting"
          }
        }
      },
      "Zuplo.MeteringV3.UpdateMntMemberInviteResponseBody": {
        "type": "object",
        "properties": {
          "invite": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.MeteringV3.MntMemberInviteResponseBody"
              }
            ],
            "description": "Present when status is revoked or rejected"
          },
          "member": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.MeteringV3.MntMemberResponseBody"
              }
            ],
            "description": "Present when status is accepted"
          }
        }
      },
      "Zuplo.MeteringV3.UserResponseBody": {
        "type": "object",
        "required": [
          "id",
          "bucketId",
          "sub",
          "emailVerified",
          "createdOn",
          "updatedOn"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "bucketId": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "Zuplo.MtlsCertificates.CertificateInfo": {
        "type": "object",
        "required": [
          "subject",
          "issuer",
          "validFrom",
          "validTo",
          "serialNumber"
        ],
        "properties": {
          "subject": {
            "type": "string",
            "description": "Certificate subject",
            "example": "CN=example.com"
          },
          "issuer": {
            "type": "string",
            "description": "Certificate issuer",
            "example": "CN=Example CA"
          },
          "validFrom": {
            "type": "string",
            "description": "Certificate valid from date",
            "example": "2024-01-01T00:00:00Z"
          },
          "validTo": {
            "type": "string",
            "description": "Certificate valid to date",
            "example": "2025-01-01T00:00:00Z"
          },
          "serialNumber": {
            "type": "string",
            "description": "Certificate serial number",
            "example": "12345"
          }
        }
      },
      "Zuplo.MtlsCertificates.Environments": {
        "type": "object",
        "required": [
          "development",
          "preview",
          "production"
        ],
        "properties": {
          "development": {
            "type": "boolean",
            "description": "Whether the certificate is enabled for the development environment"
          },
          "preview": {
            "type": "boolean",
            "description": "Whether the certificate is enabled for the preview environment"
          },
          "production": {
            "type": "boolean",
            "description": "Whether the certificate is enabled for the production environment"
          }
        }
      },
      "Zuplo.MtlsCertificates.MtlsCertificate": {
        "type": "object",
        "required": [
          "id",
          "name",
          "certificateInfo",
          "environments",
          "createdOn",
          "updatedOn"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the certificate",
            "example": "cert_abc123",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "The name of the certificate. Must be alphanumeric with underscores.",
            "example": "my_client_cert"
          },
          "certificateInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.MtlsCertificates.CertificateInfo"
              }
            ],
            "description": "Certificate information"
          },
          "environments": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.MtlsCertificates.Environments"
              }
            ],
            "description": "Environments where the certificate is enabled"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was created.",
            "example": "2023-04-18T05:54:34.408Z",
            "readOnly": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was last updated.",
            "example": "2023-04-20T05:54:34.408Z",
            "readOnly": true
          }
        }
      },
      "Zuplo.MtlsCertificates.MtlsCertificateCreateBody": {
        "type": "object",
        "required": [
          "name",
          "certificate",
          "key",
          "environments"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "The name of the certificate. Must be alphanumeric with underscores.",
            "example": "my_client_cert"
          },
          "certificate": {
            "type": "string",
            "minLength": 1,
            "description": "The PEM-encoded certificate"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "description": "The PEM-encoded private key"
          },
          "environments": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "development",
                "preview",
                "production"
              ]
            },
            "minItems": 1,
            "description": "List of environments where the certificate should be enabled"
          }
        }
      },
      "Zuplo.MtlsCertificates.MtlsCertificateListResponse": {
        "type": "object",
        "required": [
          "data",
          "offset",
          "limit"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.MtlsCertificates.MtlsCertificate"
            },
            "description": "List of mTLS certificates"
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "description": "Offset for pagination"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "description": "Limit for pagination"
          }
        }
      },
      "Zuplo.MtlsCertificates.MtlsCertificateUpdateBody": {
        "type": "object",
        "properties": {
          "environments": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "development",
                "preview",
                "production"
              ]
            },
            "minItems": 1,
            "description": "List of environments where the certificate should be enabled"
          }
        }
      },
      "Zuplo.OpenApiRoute.ApiSpec": {
        "type": "object",
        "additionalProperties": {},
        "description": "An OpenAPI 3 document describing the Zuplo Developer API."
      },
      "Zuplo.Projects.Project": {
        "type": "object",
        "required": [
          "name",
          "accountName"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the project",
            "example": "lime-fox"
          },
          "accountName": {
            "type": "string",
            "description": "The name of the account this project belongs to",
            "example": "lime-fox"
          }
        },
        "description": "A single project.",
        "example": {
          "name": "lime-fox",
          "accountName": "chocolate_great_buzzard"
        }
      },
      "Zuplo.Projects.ProjectCreateBody": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the project",
            "example": "lime-fox"
          }
        },
        "description": "The body of the project creation request.",
        "example": {
          "name": "lime-fox"
        }
      },
      "Zuplo.Projects.ProjectsList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.Projects.Project"
            }
          }
        },
        "example": {
          "data": [
            {
              "name": "lime-fox",
              "accountName": "chocolate_great_buzzard"
            },
            {
              "name": "orange-fox",
              "accountName": "chocolate_great_buzzard"
            }
          ]
        }
      },
      "Zuplo.RuntimeLogs.RequestLogDetail": {
        "type": "object",
        "required": [
          "requestId",
          "timestamp",
          "httpMethod",
          "httpStatus",
          "routePath",
          "durationMs",
          "colo",
          "country",
          "city",
          "continent",
          "clientIp",
          "asOrganization",
          "userSub",
          "systemRouteName",
          "zuploUserAgent"
        ],
        "properties": {
          "requestId": {
            "type": "string",
            "description": "Unique identifier for the request."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp when the request was received."
          },
          "httpMethod": {
            "type": "string",
            "description": "HTTP method of the request."
          },
          "httpStatus": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code of the response."
          },
          "routePath": {
            "type": "string",
            "description": "Matched route path on the deployment."
          },
          "durationMs": {
            "type": "integer",
            "format": "int32",
            "description": "End-to-end duration of the request in milliseconds."
          },
          "colo": {
            "type": "string",
            "description": "Edge colo (point of presence) that served the request."
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code of the client."
          },
          "city": {
            "type": "string",
            "description": "City the request was made from, when derivable from the client IP."
          },
          "continent": {
            "type": "string",
            "description": "Continent code (e.g. `NA`, `EU`) of the client."
          },
          "clientIp": {
            "type": "string",
            "description": "IP address of the client."
          },
          "asOrganization": {
            "type": "string",
            "description": "AS organization (ISP name) for the client IP."
          },
          "userSub": {
            "type": "string",
            "description": "Authenticated user/consumer subject for the request, or `(anonymous)` if unauthenticated."
          },
          "systemRouteName": {
            "type": "string",
            "description": "Internal system route name (Zuplo-defined), if applicable."
          },
          "zuploUserAgent": {
            "type": "string",
            "description": "User-Agent header captured by the Zuplo runtime."
          }
        },
        "description": "Detailed information about a single request, returned in the detail response."
      },
      "Zuplo.RuntimeLogs.RequestLogDetailResponse": {
        "type": "object",
        "required": [
          "request",
          "logs"
        ],
        "properties": {
          "request": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.RuntimeLogs.RequestLogDetail"
              }
            ],
            "description": "The request summary and contextual fields."
          },
          "logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.RuntimeLogs.RequestLogEntry"
            },
            "description": "All log entries emitted during the request, ordered by emit time."
          }
        },
        "description": "Response containing the request detail and all log entries for a single request."
      },
      "Zuplo.RuntimeLogs.RequestLogEntry": {
        "type": "object",
        "required": [
          "logId",
          "timestamp",
          "severity",
          "messages",
          "attributes",
          "source",
          "requestId",
          "atomicCounter"
        ],
        "properties": {
          "logId": {
            "type": "string",
            "description": "Unique identifier for the log entry."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp when the log entry was emitted."
          },
          "severity": {
            "type": "string",
            "description": "Severity of the log entry (`debug`, `info`, `warn`, `error`)."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ordered array of message strings for the entry."
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Structured attributes attached to the entry."
          },
          "source": {
            "type": "string",
            "description": "Source that emitted the log (e.g. policy or handler name)."
          },
          "requestId": {
            "type": "string",
            "description": "Request ID this log entry belongs to."
          },
          "atomicCounter": {
            "type": "integer",
            "format": "int32",
            "description": "Monotonically increasing counter used to preserve emit order within a single request."
          }
        },
        "description": "A single log entry emitted during a request."
      },
      "Zuplo.RuntimeLogs.RequestLogSummary": {
        "type": "object",
        "required": [
          "requestId",
          "timestamp",
          "httpMethod",
          "httpStatus",
          "routePath",
          "durationMs",
          "colo",
          "country",
          "maxSeverity",
          "logCount"
        ],
        "properties": {
          "requestId": {
            "type": "string",
            "description": "Unique identifier for the request (correlation ID stamped by the gateway).",
            "example": "c21fefe0-8938-4f17-8fb8-c844d68042f3"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp when the request was received.",
            "example": "2026-05-14T12:00:00.000Z"
          },
          "httpMethod": {
            "type": "string",
            "description": "HTTP method of the request.",
            "example": "GET"
          },
          "httpStatus": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code of the response.",
            "example": 200
          },
          "routePath": {
            "type": "string",
            "description": "Matched route path on the deployment.",
            "example": "/v1/items/:id"
          },
          "durationMs": {
            "type": "integer",
            "format": "int32",
            "description": "End-to-end duration of the request in milliseconds.",
            "example": 42
          },
          "colo": {
            "type": "string",
            "description": "Edge colo (point of presence) that served the request.",
            "example": "SFO"
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code of the client.",
            "example": "US"
          },
          "maxSeverity": {
            "type": "string",
            "nullable": true,
            "description": "Maximum log severity recorded during this request, or null if no logs were emitted.",
            "example": "info"
          },
          "logCount": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of log entries recorded for this request.",
            "example": 3
          }
        },
        "description": "Summary information for a single request, returned in the list response. Mirrors the per-row shape returned by tenant-api's request-list query."
      },
      "Zuplo.RuntimeLogs.RequestLogsListResponse": {
        "type": "object",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.RuntimeLogs.RequestLogSummary"
            },
            "description": "Array of request-log summaries, ordered most recent first."
          },
          "pagination": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Zuplo.RuntimeLogs.RequestLogsPagination"
              }
            ],
            "description": "Pagination state for the result set."
          }
        },
        "description": "Response listing request-log summaries for a deployment.",
        "example": {
          "data": [
            {
              "requestId": "c21fefe0-8938-4f17-8fb8-c844d68042f3",
              "timestamp": "2026-05-14T12:00:00.000Z",
              "httpMethod": "GET",
              "httpStatus": 200,
              "routePath": "/v1/items/:id",
              "durationMs": 42,
              "colo": "SFO",
              "country": "US",
              "maxSeverity": "info",
              "logCount": 3
            }
          ],
          "pagination": {
            "cursor": null,
            "hasMore": false
          }
        }
      },
      "Zuplo.RuntimeLogs.RequestLogsPagination": {
        "type": "object",
        "required": [
          "cursor",
          "hasMore"
        ],
        "properties": {
          "cursor": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor to pass as `cursor` on the next request to fetch the next page. Treat as a string the client does not introspect — the encoding is owned by tenant-api and can change. `null` when there is no further page."
          },
          "hasMore": {
            "type": "boolean",
            "description": "Whether more results are available beyond this page."
          }
        },
        "description": "Pagination information for a request-log list page."
      },
      "Zuplo.Sources.Source": {
        "type": "object",
        "required": [
          "uploadUrl"
        ],
        "properties": {
          "uploadUrl": {
            "type": "string",
            "example": "https://storage.googleapis.com/[..]1fac8da132b9"
          }
        },
        "example": {
          "uploadUrl": "https://storage.googleapis.com/[..]1fac8da132b9"
        }
      },
      "Zuplo.Tunnels.Tunnel": {
        "type": "object",
        "required": [
          "tunnelId",
          "name",
          "token"
        ],
        "properties": {
          "tunnelId": {
            "type": "string",
            "example": "tnl_JcHFzTcJ9y4GU69lKBOaxFYU",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9-]{3,24}$",
            "description": "A friendly name for the tunnel.",
            "example": "api-service-tunnel"
          },
          "token": {
            "type": "string",
            "description": "Set your TUNNEL_TOKEN to this value to connect to the tunnel.",
            "example": "eyJhIjoiODJh[..]m89In0=",
            "readOnly": true
          }
        },
        "description": "Tunnels allow you to expose services running on bare metal, on-premises, or other non-cloud providers to the Zuplo platform. [Further reading](https://zuplo.com/docs/articles/secure-tunnel).",
        "example": {
          "tunnelId": "tnl_JcHFzTcJ9y4GU69lKBOaxFYU",
          "name": "api-service-tunnel",
          "token": "eyJhIjoiODJhNGM0ZTBlYWY3ZmU3YjQyMWRlZHU1ODhlNjg1ZGMiLCJ0IjoiNjY3ZWZhODktYzIyNS00NTIyLWI0M2EtYTgwYzY0OTgxMGY1IiwicyI6IkY5RGdVNnNNOTJWT245OUlUSWxMazVwY3lHV0ZLVG1jcHg2d0I5TkR4Vm89In0="
        }
      },
      "Zuplo.Tunnels.TunnelList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.Tunnels.TunnelListItem"
            }
          },
          "limit": {
            "type": "integer",
            "format": "uint32",
            "example": 1000
          },
          "offset": {
            "type": "integer",
            "format": "uint32",
            "example": 0
          },
          "total": {
            "type": "integer",
            "format": "uint32"
          }
        },
        "example": {
          "data": [
            {
              "id": "tnl_JcHFzTcJ9y4GU69lKBOaxFYU",
              "name": "api-service-tunnel"
            }
          ]
        }
      },
      "Zuplo.Tunnels.TunnelListItem": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "tnl_JcHFzTcJ9y4GU69lKBOaxFYU",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9-]{3,24}$",
            "description": "A friendly name for the tunnel.",
            "example": "api-service-tunnel"
          }
        }
      },
      "Zuplo.Tunnels.TunnelTeardownOperation": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "tst_1vmvAjaCun9Mfeosn3Og4ddD",
            "readOnly": true
          },
          "status": {
            "type": "string",
            "enum": [
              "in-progress",
              "success",
              "error"
            ],
            "example": "success"
          },
          "message": {
            "type": "string",
            "example": "Successfully torn down tunnel."
          },
          "details": {
            "type": "string"
          }
        }
      },
      "Zuplo.Tunnels.TunneledServiceConfiguration": {
        "type": "object",
        "required": [
          "name",
          "endpoint",
          "configurations"
        ],
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9-]{3,24}$",
            "description": "A friendly name for the service. This name needs to be unique across all your tunneled services. Changing this will invalidate existing services with the name.",
            "example": "authservice"
          },
          "endpoint": {
            "type": "string",
            "description": "The URL of the service that the tunnel will forward to, e.g, http://localhost:3000",
            "example": "https://localhost:3000"
          },
          "configurations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "project": {
                  "type": "string",
                  "description": "The name the project.",
                  "example": "alpha-beta-gamma"
                },
                "accessibleBy": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "working-copy",
                      "preview",
                      "production"
                    ]
                  },
                  "description": "The environments of the project that should have acess to this tunneled service.",
                  "example": [
                    "preview",
                    "production"
                  ]
                }
              },
              "required": [
                "project",
                "accessibleBy"
              ]
            },
            "description": "A list of projects that should have access to this tunneled service under the service://name URL scheme."
          }
        },
        "description": "Tunnel service configuration."
      },
      "Zuplo.Tunnels.TunneledServicesConfiguration": {
        "type": "object",
        "required": [
          "version",
          "services"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "format": "uint8",
            "description": "The version of this configuration format.",
            "example": 1
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Zuplo.Tunnels.TunneledServiceConfiguration"
            },
            "description": "A list of services that the tunnel will connect to."
          }
        }
      },
      "Zuplo.Tunnels.TunneledServicesProvisioningOperation": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "pst_ezMUOh0xFqRWg84DPH5jVwgO",
            "readOnly": true
          },
          "status": {
            "type": "string",
            "enum": [
              "in-progress",
              "success",
              "error"
            ],
            "example": "success"
          },
          "message": {
            "type": "string",
            "example": "Successfully provisioned services."
          },
          "details": {
            "type": "string"
          }
        }
      },
      "Zuplo.Variables.Variable": {
        "type": "object",
        "required": [
          "branch",
          "createdOn",
          "updatedOn",
          "name",
          "isSecret",
          "value"
        ],
        "properties": {
          "branch": {
            "type": "string",
            "example": "preview",
            "readOnly": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was created.",
            "example": "2023-04-18T05:54:34.408Z",
            "readOnly": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the item was last updated.",
            "example": "2023-04-20T05:54:34.408Z",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "The name of the variable. Must be named in SCREAMING_SNAKE_CASE.",
            "example": "APP_ENVIRONMENT_KEY"
          },
          "isSecret": {
            "type": "boolean",
            "description": "Whether the variable is a secret.",
            "example": true
          },
          "value": {
            "type": "string",
            "description": "The value of the variable."
          }
        },
        "example": {
          "name": "PORTAL_ID",
          "isSecret": false,
          "value": "89333",
          "branch": "main",
          "createdOn": "2023-04-18T05:54:34.408Z",
          "updatedOn": "2023-04-20T05:54:34.408Z"
        }
      },
      "Zuplo.Variables.VariableCreateBody": {
        "type": "object",
        "required": [
          "name",
          "isSecret",
          "value"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the variable. Must be named in SCREAMING_SNAKE_CASE.",
            "example": "APP_ENVIRONMENT_KEY"
          },
          "isSecret": {
            "type": "boolean",
            "description": "Whether the variable is a secret.",
            "example": true
          },
          "value": {
            "type": "string",
            "description": "The value of the variable."
          }
        },
        "example": {
          "name": "PORTAL_ID",
          "isSecret": false,
          "value": "89333"
        }
      },
      "Zuplo.Variables.VariableUpdateBody": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "The value of the variable."
          }
        },
        "example": {
          "value": "89333"
        }
      },
      "Zuplo.WhoAmI.WhoAmI": {
        "type": "object",
        "required": [
          "sub"
        ],
        "properties": {
          "account": {
            "type": "string",
            "example": "chocolate_blizzard_treat"
          },
          "email": {
            "type": "string",
            "example": "user@example.com"
          },
          "sub": {
            "type": "string",
            "example": "auth0|abc123"
          }
        }
      },
      "Addon": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "key",
          "version",
          "instanceType",
          "currency",
          "status",
          "rateCards",
          "validationErrors"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A semi-unique identifier for the resource.",
            "title": "Key"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Version of the add-on. Incremented when the add-on is updated.",
            "title": "Version",
            "default": 1,
            "readOnly": true
          },
          "instanceType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AddonInstanceType"
              }
            ],
            "description": "The instanceType of the add-ons. Can be \"single\" or \"multiple\".",
            "title": "InstanceType"
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency code of the add-on.",
            "title": "Currency",
            "default": "USD"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the add-on becomes effective. When not specified, the add-on is a draft.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Effective start date",
            "readOnly": true
          },
          "effectiveTo": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the add-on is no longer effective. When not specified, the add-on is effective indefinitely.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Effective end date",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AddonStatus"
              }
            ],
            "description": "The status of the add-on.\nComputed based on the effective start and end dates:\n- draft = no effectiveFrom\n- active = effectiveFrom <= now < effectiveTo\n- archived  = effectiveTo <= now",
            "title": "Status",
            "readOnly": true
          },
          "rateCards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateCard"
            },
            "description": "The rate cards of the add-on.",
            "title": "Rate cards"
          },
          "validationErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "nullable": true,
            "description": "List of validation errors.",
            "title": "Validation errors",
            "readOnly": true
          }
        },
        "description": "Add-on allows extending subscriptions with compatible plans with additional ratecards."
      },
      "AddonCreate": {
        "type": "object",
        "required": [
          "name",
          "key",
          "instanceType",
          "currency",
          "rateCards"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A semi-unique identifier for the resource.",
            "title": "Key"
          },
          "instanceType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AddonInstanceType"
              }
            ],
            "description": "The instanceType of the add-ons. Can be \"single\" or \"multiple\".",
            "title": "InstanceType"
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency code of the add-on.",
            "title": "Currency",
            "default": "USD"
          },
          "rateCards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateCard"
            },
            "description": "The rate cards of the add-on.",
            "title": "Rate cards"
          }
        },
        "description": "Resource create operation model."
      },
      "AddonInstanceType": {
        "type": "string",
        "enum": [
          "single",
          "multiple"
        ],
        "description": "The instanceType of the add-on.\nSingle instance add-ons can be added to subscription only once while add-ons with multiple type can be added more then once."
      },
      "AddonOrderBy": {
        "type": "string",
        "enum": [
          "id",
          "key",
          "version",
          "created_at",
          "updated_at"
        ],
        "description": "Order by options for add-ons."
      },
      "AddonPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Addon"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "AddonReplaceUpdate": {
        "type": "object",
        "required": [
          "name",
          "instanceType",
          "rateCards"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "instanceType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AddonInstanceType"
              }
            ],
            "description": "The instanceType of the add-ons. Can be \"single\" or \"multiple\".",
            "title": "InstanceType"
          },
          "rateCards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateCard"
            },
            "description": "The rate cards of the add-on.",
            "title": "Rate cards"
          }
        },
        "description": "Resource update operation model."
      },
      "AddonStatus": {
        "type": "string",
        "enum": [
          "draft",
          "active",
          "archived"
        ],
        "description": "The status of the add-on defined by the effectiveFrom and effectiveTo properties."
      },
      "Address": {
        "type": "object",
        "properties": {
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CountryCode"
              }
            ],
            "description": "Country code in [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 format."
          },
          "postalCode": {
            "type": "string",
            "description": "Postal code."
          },
          "state": {
            "type": "string",
            "description": "State or province."
          },
          "city": {
            "type": "string",
            "description": "City."
          },
          "line1": {
            "type": "string",
            "description": "First line of the address."
          },
          "line2": {
            "type": "string",
            "description": "Second line of the address."
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone number."
          }
        },
        "description": "Address"
      },
      "Alignment": {
        "type": "object",
        "properties": {
          "billablesMustAlign": {
            "type": "boolean",
            "description": "Whether all Billable items and RateCards must align.\nAlignment means the Price's BillingCadence must align for both duration and anchor time.",
            "deprecated": true
          }
        },
        "description": "Alignment configuration for a plan or subscription.",
        "deprecated": true
      },
      "Annotations": {
        "type": "object",
        "additionalProperties": {},
        "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
        "example": {
          "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
        }
      },
      "App": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/StripeApp"
          },
          {
            "$ref": "#/components/schemas/SandboxApp"
          },
          {
            "$ref": "#/components/schemas/CustomInvoicingApp"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "stripe": "#/components/schemas/StripeApp",
            "sandbox": "#/components/schemas/SandboxApp",
            "custom_invoicing": "#/components/schemas/CustomInvoicingApp"
          }
        },
        "description": "App.\nOne of: stripe"
      },
      "AppBase": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "listing",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "listing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarketplaceListing"
              }
            ],
            "description": "The marketplace listing that this installed app is based on.",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppStatus"
              }
            ],
            "description": "Status of the app connection.",
            "readOnly": true
          }
        },
        "description": "Abstract base model for installed apps.\n\nRepresent an app installed to the organization.\nThis is an actual instance, with its own configuration and credentials."
      },
      "AppCapability": {
        "type": "object",
        "required": [
          "type",
          "key",
          "name",
          "description"
        ],
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppCapabilityType"
              }
            ],
            "description": "The capability type."
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "Key"
          },
          "name": {
            "type": "string",
            "description": "The capability name."
          },
          "description": {
            "type": "string",
            "description": "The capability description."
          }
        },
        "description": "App capability.\n\nCapabilities only exist in config so they don't extend the Resource model.",
        "example": {
          "type": "collectPayments",
          "key": "stripe_collect_payment",
          "name": "Collect Payments",
          "description": "Stripe payments collects outstanding revenue with Stripe customer's default payment method."
        }
      },
      "AppCapabilityType": {
        "type": "string",
        "enum": [
          "reportUsage",
          "reportEvents",
          "calculateTax",
          "invoiceCustomers",
          "collectPayments"
        ],
        "description": "App capability type."
      },
      "AppPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/App"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "AppReadOrCreateOrUpdateOrDeleteOrQuery": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/StripeAppReadOrCreateOrUpdateOrDeleteOrQuery"
          },
          {
            "$ref": "#/components/schemas/SandboxApp"
          },
          {
            "$ref": "#/components/schemas/CustomInvoicingApp"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "stripe": "#/components/schemas/StripeAppReadOrCreateOrUpdateOrDeleteOrQuery",
            "sandbox": "#/components/schemas/SandboxApp",
            "custom_invoicing": "#/components/schemas/CustomInvoicingApp"
          }
        },
        "description": "App.\nOne of: stripe"
      },
      "AppReference": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The ID of the app.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "App reference\n\nCan be used as a short reference to an app if the full app object is not needed."
      },
      "AppReplaceUpdate": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/StripeAppReplaceUpdate"
          },
          {
            "$ref": "#/components/schemas/SandboxAppReplaceUpdate"
          },
          {
            "$ref": "#/components/schemas/CustomInvoicingAppReplaceUpdate"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "stripe": "#/components/schemas/StripeAppReplaceUpdate",
            "sandbox": "#/components/schemas/SandboxAppReplaceUpdate",
            "custom_invoicing": "#/components/schemas/CustomInvoicingAppReplaceUpdate"
          }
        },
        "description": "App ReplaceUpdate Model"
      },
      "AppStatus": {
        "type": "string",
        "enum": [
          "ready",
          "unauthorized"
        ],
        "description": "App installed status."
      },
      "AppType": {
        "type": "string",
        "enum": [
          "stripe",
          "sandbox",
          "custom_invoicing"
        ],
        "description": "Type of the app."
      },
      "BadRequestProblemResponse": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnexpectedProblemResponse"
          }
        ],
        "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."
      },
      "BalanceHistoryWindow": {
        "type": "object",
        "required": [
          "period",
          "usage",
          "balanceAtStart"
        ],
        "properties": {
          "period": {
            "$ref": "#/components/schemas/Period"
          },
          "usage": {
            "type": "number",
            "format": "double",
            "description": "The total usage of the feature in the period.",
            "example": 100,
            "readOnly": true
          },
          "balanceAtStart": {
            "type": "number",
            "format": "double",
            "description": "The entitlement balance at the start of the period.",
            "example": 100,
            "readOnly": true
          }
        },
        "description": "The balance history window."
      },
      "BillingCollectionAlignment": {
        "type": "string",
        "enum": [
          "subscription",
          "anchored"
        ],
        "description": "BillingCollectionAlignment specifies when the pending line items should be collected into\nan invoice.",
        "title": "Collection alignment"
      },
      "BillingCustomerProfile": {
        "type": "object",
        "required": [
          "supplier",
          "workflow",
          "apps"
        ],
        "properties": {
          "supplier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingParty"
              }
            ],
            "description": "The name and contact information for the supplier this billing profile represents",
            "readOnly": true
          },
          "workflow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflow"
              }
            ],
            "description": "The billing workflow settings for this profile",
            "readOnly": true
          },
          "apps": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingProfileAppsOrReference"
              }
            ],
            "description": "The applications used by this billing profile.\n\nExpand settings govern if this includes the whole app object or just the ID references.",
            "readOnly": true
          }
        },
        "description": "Customer specific merged profile.\n\nThis profile is calculated from the customer override and the billing profile it references or the default.\n\nThus this does not have any kind of resource fields, only the calculated values."
      },
      "BillingDiscountMetadata": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Correlation ID for the discount.\n\nThis is used to link discounts across different invoices (progressive billing use case).\n\nIf not provided, the invoicing engine will auto-generate one. When editing an invoice line,\nplease make sure to keep the same correlation ID of the discount or in progressive billing\nsetups the discount amounts might be incorrect.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "Billing specific fields for product catalog discounts."
      },
      "BillingDiscountPercentage": {
        "type": "object",
        "required": [
          "percentage"
        ],
        "properties": {
          "percentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Percentage"
              }
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "The percentage of the discount.",
            "title": "Percentage"
          },
          "correlationId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Correlation ID for the discount.\n\nThis is used to link discounts across different invoices (progressive billing use case).\n\nIf not provided, the invoicing engine will auto-generate one. When editing an invoice line,\nplease make sure to keep the same correlation ID of the discount or in progressive billing\nsetups the discount amounts might be incorrect.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "A percentage discount."
      },
      "BillingDiscountReason": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/DiscountReasonMaximumSpend"
          },
          {
            "$ref": "#/components/schemas/DiscountReasonRatecardPercentage"
          },
          {
            "$ref": "#/components/schemas/DiscountReasonRatecardUsage"
          },
          {
            "$ref": "#/components/schemas/DiscountReasonProrationCredit"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "maximum_spend": "#/components/schemas/DiscountReasonMaximumSpend",
            "ratecard_percentage": "#/components/schemas/DiscountReasonRatecardPercentage",
            "ratecard_usage": "#/components/schemas/DiscountReasonRatecardUsage",
            "proration_credit": "#/components/schemas/DiscountReasonProrationCredit"
          }
        },
        "description": "The reason for the discount."
      },
      "BillingDiscountUsage": {
        "type": "object",
        "required": [
          "quantity"
        ],
        "properties": {
          "quantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The quantity of the usage discount.\n\nMust be positive.",
            "title": "Usage"
          },
          "correlationId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Correlation ID for the discount.\n\nThis is used to link discounts across different invoices (progressive billing use case).\n\nIf not provided, the invoicing engine will auto-generate one. When editing an invoice line,\nplease make sure to keep the same correlation ID of the discount or in progressive billing\nsetups the discount amounts might be incorrect.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "A usage discount."
      },
      "BillingDiscounts": {
        "type": "object",
        "properties": {
          "percentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingDiscountPercentage"
              }
            ],
            "description": "The percentage discount."
          },
          "usage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingDiscountUsage"
              }
            ],
            "description": "The usage discount."
          }
        },
        "description": "A discount by type."
      },
      "BillingInvoiceCustomerExtendedDetails": {
        "type": "object",
        "required": [
          "usageAttribution"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the party (if available)",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "An optional unique key of the party (if available)",
            "title": "Key"
          },
          "name": {
            "type": "string",
            "description": "Legal name or representation of the organization."
          },
          "taxId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingPartyTaxIdentity"
              }
            ],
            "description": "The entity's legal ID code used for tax purposes. They may have\nother numbers, but we're only interested in those valid for tax purposes."
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Address"
            },
            "maxItems": 1,
            "description": "Regular post addresses for where information should be sent if needed."
          },
          "usageAttribution": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerUsageAttribution"
              }
            ],
            "description": "Mapping to attribute metered usage to the customer",
            "title": "Usage Attribution"
          }
        },
        "description": "BillingInvoiceCustomerExtendedDetails is a collection of fields that are used to extend the billing party details for invoices.\n\nThese fields contain the Zuplo Metering specific details for the customer, that are not strictly required for the invoice itself."
      },
      "BillingParty": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the party (if available)",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "An optional unique key of the party (if available)",
            "title": "Key"
          },
          "name": {
            "type": "string",
            "description": "Legal name or representation of the organization."
          },
          "taxId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingPartyTaxIdentity"
              }
            ],
            "description": "The entity's legal ID code used for tax purposes. They may have\nother numbers, but we're only interested in those valid for tax purposes."
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Address"
            },
            "maxItems": 1,
            "description": "Regular post addresses for where information should be sent if needed."
          }
        },
        "description": "Party represents a person or business entity."
      },
      "BillingPartyReplaceUpdate": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "An optional unique key of the party (if available)",
            "title": "Key"
          },
          "name": {
            "type": "string",
            "description": "Legal name or representation of the organization."
          },
          "taxId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingPartyTaxIdentity"
              }
            ],
            "description": "The entity's legal ID code used for tax purposes. They may have\nother numbers, but we're only interested in those valid for tax purposes."
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Address"
            },
            "maxItems": 1,
            "description": "Regular post addresses for where information should be sent if needed."
          }
        },
        "description": "Resource update operation model."
      },
      "BillingPartyTaxIdentity": {
        "type": "object",
        "properties": {
          "code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingTaxIdentificationCode"
              }
            ],
            "description": "Normalized tax code shown on the original identity document."
          }
        },
        "description": "Identity stores the details required to identify an entity for tax purposes in a specific country."
      },
      "BillingProfile": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "supplier",
          "workflow",
          "apps",
          "default"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "supplier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingParty"
              }
            ],
            "description": "The name and contact information for the supplier this billing profile represents"
          },
          "workflow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflow"
              }
            ],
            "description": "The billing workflow settings for this profile",
            "readOnly": true
          },
          "apps": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingProfileAppsOrReference"
              }
            ],
            "description": "The applications used by this billing profile.\n\nExpand settings govern if this includes the whole app object or just the ID references.",
            "readOnly": true
          },
          "default": {
            "type": "boolean",
            "description": "Is this the default profile?"
          }
        },
        "description": "BillingProfile represents a billing profile"
      },
      "BillingProfileAppReferences": {
        "type": "object",
        "required": [
          "tax",
          "invoicing",
          "payment"
        ],
        "properties": {
          "tax": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppReference"
              }
            ],
            "description": "The tax app used for this workflow",
            "readOnly": true
          },
          "invoicing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppReference"
              }
            ],
            "description": "The invoicing app used for this workflow",
            "readOnly": true
          },
          "payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppReference"
              }
            ],
            "description": "The payment app used for this workflow",
            "readOnly": true
          }
        },
        "description": "BillingProfileAppReferences represents the references (id, type) to the apps used by a billing profile"
      },
      "BillingProfileApps": {
        "type": "object",
        "required": [
          "tax",
          "invoicing",
          "payment"
        ],
        "properties": {
          "tax": {
            "allOf": [
              {
                "$ref": "#/components/schemas/App"
              }
            ],
            "description": "The tax app used for this workflow",
            "readOnly": true
          },
          "invoicing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/App"
              }
            ],
            "description": "The invoicing app used for this workflow",
            "readOnly": true
          },
          "payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/App"
              }
            ],
            "description": "The payment app used for this workflow",
            "readOnly": true
          }
        },
        "description": "BillingProfileApps represents the applications used by a billing profile"
      },
      "BillingProfileAppsCreate": {
        "type": "object",
        "required": [
          "tax",
          "invoicing",
          "payment"
        ],
        "properties": {
          "tax": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The tax app used for this workflow",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "x-go-type": "string"
          },
          "invoicing": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The invoicing app used for this workflow",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "x-go-type": "string"
          },
          "payment": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The payment app used for this workflow",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "x-go-type": "string"
          }
        },
        "description": "BillingProfileAppsCreate represents the input for creating a billing profile's apps"
      },
      "BillingProfileAppsOrReference": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/BillingProfileApps"
          },
          {
            "$ref": "#/components/schemas/BillingProfileAppReferences"
          }
        ],
        "description": "ProfileAppsOrReference represents the union of ProfileApps and ProfileAppReferences\nfor a billing profile."
      },
      "BillingProfileCreate": {
        "type": "object",
        "required": [
          "name",
          "supplier",
          "default",
          "workflow",
          "apps"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "supplier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingParty"
              }
            ],
            "description": "The name and contact information for the supplier this billing profile represents"
          },
          "default": {
            "type": "boolean",
            "description": "Is this the default profile?"
          },
          "workflow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowCreate"
              }
            ],
            "description": "The billing workflow settings for this profile."
          },
          "apps": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingProfileAppsCreate"
              }
            ],
            "description": "The apps used by this billing profile."
          }
        },
        "description": "BillingProfileCreate represents the input for creating a billing profile"
      },
      "BillingProfileCustomerOverride": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "customerId"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "billingProfileId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The billing profile this override is associated with.\n\nIf empty the default profile is looked up dynamically.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The customer id this override is associated with.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "Customer override values."
      },
      "BillingProfileCustomerOverrideCreate": {
        "type": "object",
        "properties": {
          "billingProfileId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The billing profile this override is associated with.\n\nIf not provided, the default billing profile is chosen if available.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "Payload for creating a new or updating an existing customer override."
      },
      "BillingProfileCustomerOverrideExpand": {
        "type": "string",
        "enum": [
          "apps",
          "customer"
        ],
        "description": "CustomerOverrideExpand specifies the parts of the profile to expand."
      },
      "BillingProfileCustomerOverrideOrderBy": {
        "type": "string",
        "enum": [
          "customerId",
          "customerName",
          "customerKey",
          "customerPrimaryEmail",
          "customerCreatedAt"
        ],
        "description": "Order by options for customers."
      },
      "BillingProfileCustomerOverrideWithDetails": {
        "type": "object",
        "required": [
          "baseBillingProfileId"
        ],
        "properties": {
          "customerOverride": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingProfileCustomerOverride"
              }
            ],
            "description": "The customer override values.\n\nIf empty the merged values are calculated based on the default profile."
          },
          "baseBillingProfileId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The billing profile the customerProfile is associated with at the time of query.\n\ncustomerOverride contains the explicit mapping set in the customer override object. If that is\nempty, then the baseBillingProfileId is the default profile.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "customerProfile": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingCustomerProfile"
              }
            ],
            "description": "Merged billing profile with the customer specific overrides."
          },
          "customer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ],
            "description": "The customer this override belongs to."
          }
        },
        "description": "Customer specific workflow overrides."
      },
      "BillingProfileCustomerOverrideWithDetailsPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingProfileCustomerOverrideWithDetails"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "BillingProfileCustomerWorkflowOverride": {
        "type": "object",
        "required": [
          "taxApp",
          "invoicingApp",
          "paymentApp"
        ],
        "properties": {
          "collection": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowCollectionSettings"
              }
            ],
            "description": "The collection settings for this workflow"
          },
          "invoicing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowInvoicingSettings"
              }
            ],
            "description": "The invoicing settings for this workflow"
          },
          "payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowPaymentSettings"
              }
            ],
            "description": "The payment settings for this workflow"
          },
          "tax": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowTaxSettings"
              }
            ],
            "description": "The tax settings for this workflow"
          },
          "taxApp": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppReadOrCreateOrUpdateOrDeleteOrQuery"
              }
            ],
            "description": "The tax app used for this workflow",
            "readOnly": true
          },
          "invoicingApp": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppReadOrCreateOrUpdateOrDeleteOrQuery"
              }
            ],
            "description": "The invoicing app used for this workflow",
            "readOnly": true
          },
          "paymentApp": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppReadOrCreateOrUpdateOrDeleteOrQuery"
              }
            ],
            "description": "The payment app used for this workflow",
            "readOnly": true
          }
        },
        "description": "Customer specific workflow overrides."
      },
      "BillingProfileExpand": {
        "type": "string",
        "enum": [
          "apps"
        ],
        "description": "BillingProfileExpand details what profile fields to expand"
      },
      "BillingProfileOrderBy": {
        "type": "string",
        "enum": [
          "createdAt",
          "updatedAt",
          "default",
          "name"
        ],
        "description": "BillingProfileOrderBy specifies the ordering options for profiles"
      },
      "BillingProfilePaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingProfile"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "BillingProfileReplaceUpdateWithWorkflow": {
        "type": "object",
        "required": [
          "name",
          "supplier",
          "default",
          "workflow"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "supplier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingParty"
              }
            ],
            "description": "The name and contact information for the supplier this billing profile represents"
          },
          "default": {
            "type": "boolean",
            "description": "Is this the default profile?"
          },
          "workflow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflow"
              }
            ],
            "description": "The billing workflow settings for this profile."
          }
        },
        "description": "BillingProfileReplaceUpdate represents the input for updating a billing profile\n\nThe apps field cannot be updated directly, if an app change is desired a new\nprofile should be created."
      },
      "BillingTaxIdentificationCode": {
        "type": "string",
        "minLength": 1,
        "maxLength": 32,
        "description": "TaxIdentificationCode is a normalized tax code shown on the original identity document."
      },
      "BillingWorkflow": {
        "type": "object",
        "properties": {
          "collection": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowCollectionSettings"
              }
            ],
            "description": "The collection settings for this workflow"
          },
          "invoicing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowInvoicingSettings"
              }
            ],
            "description": "The invoicing settings for this workflow"
          },
          "payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowPaymentSettings"
              }
            ],
            "description": "The payment settings for this workflow"
          },
          "tax": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowTaxSettings"
              }
            ],
            "description": "The tax settings for this workflow"
          }
        },
        "description": "BillingWorkflow represents the settings for a billing workflow."
      },
      "BillingWorkflowAppReferenceType": {
        "type": "string",
        "enum": [
          "app_id",
          "app_type"
        ],
        "description": "App reference type specifies the type of reference inside an app reference"
      },
      "BillingWorkflowCollectionAlignment": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/BillingWorkflowCollectionAlignmentSubscription"
          },
          {
            "$ref": "#/components/schemas/BillingWorkflowCollectionAlignmentAnchored"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "subscription": "#/components/schemas/BillingWorkflowCollectionAlignmentSubscription",
            "anchored": "#/components/schemas/BillingWorkflowCollectionAlignmentAnchored"
          }
        },
        "description": "The alignment for collecting the pending line items into an invoice.\n\nDefaults to subscription, which means that we are to create a new invoice every time the\na subscription period starts (for in advance items) or ends (for in arrears items)."
      },
      "BillingWorkflowCollectionAlignmentAnchored": {
        "type": "object",
        "required": [
          "type",
          "recurringPeriod"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "anchored"
            ],
            "description": "The type of alignment."
          },
          "recurringPeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodV2"
              }
            ],
            "description": "The recurring period for the alignment."
          }
        },
        "description": "BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items\ninto an invoice."
      },
      "BillingWorkflowCollectionAlignmentSubscription": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "subscription"
            ],
            "description": "The type of alignment."
          }
        },
        "description": "BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items\ninto an invoice."
      },
      "BillingWorkflowCollectionSettings": {
        "type": "object",
        "properties": {
          "alignment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowCollectionAlignment"
              }
            ],
            "description": "The alignment for collecting the pending line items into an invoice.",
            "default": {
              "type": "subscription"
            }
          },
          "interval": {
            "type": "string",
            "format": "ISO8601",
            "description": "This grace period can be used to delay the collection of the pending line items specified in\nalignment.\n\nThis is useful, in case of multiple subscriptions having slightly different billing periods.",
            "example": "P1D",
            "default": "PT1H"
          }
        },
        "description": "Workflow collection specifies how to collect the pending line items for an invoice"
      },
      "BillingWorkflowCreate": {
        "type": "object",
        "properties": {
          "collection": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowCollectionSettings"
              }
            ],
            "description": "The collection settings for this workflow"
          },
          "invoicing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowInvoicingSettings"
              }
            ],
            "description": "The invoicing settings for this workflow"
          },
          "payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowPaymentSettings"
              }
            ],
            "description": "The payment settings for this workflow"
          },
          "tax": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowTaxSettings"
              }
            ],
            "description": "The tax settings for this workflow"
          }
        },
        "description": "Resource create operation model."
      },
      "BillingWorkflowInvoicingSettings": {
        "type": "object",
        "properties": {
          "autoAdvance": {
            "type": "boolean",
            "description": "Whether to automatically issue the invoice after the draftPeriod has passed.",
            "default": true
          },
          "draftPeriod": {
            "type": "string",
            "format": "ISO8601",
            "description": "The period for the invoice to be kept in draft status for manual reviews.",
            "example": "P1D",
            "default": "P0D"
          },
          "dueAfter": {
            "type": "string",
            "format": "ISO8601",
            "description": "The period after which the invoice is due.\nWith some payment solutions it's only applicable for manual collection method.",
            "example": "P30D",
            "default": "P30D"
          },
          "progressiveBilling": {
            "type": "boolean",
            "description": "Should progressive billing be allowed for this workflow?",
            "default": false
          },
          "defaultTaxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "Default tax configuration to apply to the invoices."
          }
        },
        "description": "BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow",
        "title": "Workflow invoice settings"
      },
      "BillingWorkflowLineResolution": {
        "type": "string",
        "enum": [
          "day",
          "period"
        ],
        "description": "BillingWorkflowLineResolution specifies how the line items should be resolved in the invoice",
        "title": "Item resolution"
      },
      "BillingWorkflowPaymentSettings": {
        "type": "object",
        "properties": {
          "collectionMethod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CollectionMethod"
              }
            ],
            "description": "The payment method for the invoice.",
            "default": "charge_automatically"
          }
        },
        "description": "BillingWorkflowPaymentSettings represents the payment settings for a billing workflow",
        "title": "Workflow payment settings"
      },
      "BillingWorkflowTaxSettings": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Enable automatic tax calculation when tax is supported by the app.\nFor example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax.",
            "default": true
          },
          "enforced": {
            "type": "boolean",
            "description": "Enforce tax calculation when tax is supported by the app.\nWhen enabled, Zuplo Metering will not allow to create an invoice without tax calculation.\nEnforcement is different per apps, for example, Stripe app requires customer\nto have a tax location when starting a paid subscription.",
            "default": false
          }
        },
        "description": "BillingWorkflowTaxSettings represents the tax settings for a billing workflow",
        "title": "Workflow tax settings"
      },
      "CalculateTaxRequest": {
        "type": "object",
        "required": [
          "items",
          "currency",
          "customerId"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxCalculationItem"
            },
            "minItems": 1,
            "description": "The line items to calculate tax for."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "Three-letter ISO currency code."
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The customer ID to calculate tax for. The customer must have a linked Stripe customer\nwith a valid billing address.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "CalculateTaxRequest is the input for calculating tax."
      },
      "CalculateTaxResponse": {
        "type": "object",
        "required": [
          "currency",
          "subtotal",
          "taxAmount",
          "total",
          "taxInclusive",
          "taxes",
          "items"
        ],
        "properties": {
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "Three-letter ISO currency code."
          },
          "subtotal": {
            "type": "integer",
            "description": "The original amount before tax in the smallest currency unit."
          },
          "taxAmount": {
            "type": "integer",
            "description": "The total tax amount in the smallest currency unit."
          },
          "total": {
            "type": "integer",
            "description": "The total amount including tax in the smallest currency unit."
          },
          "taxInclusive": {
            "type": "boolean",
            "description": "Whether the tax is included in the subtotal amount."
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxItem"
            },
            "description": "Per-jurisdiction tax breakdown."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxCalculationItemResult"
            },
            "description": "Per-item tax calculation results, in the same order as the request items."
          }
        },
        "description": "CalculateTaxResponse contains the tax calculation result for an order confirmation page."
      },
      "CheckoutSessionCustomTextAfterSubmitParams": {
        "type": "object",
        "properties": {
          "afterSubmit": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "maxLength": 1200
              }
            },
            "description": "Custom text that should be displayed after the payment confirmation button."
          },
          "shippingAddress": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "maxLength": 1200
              }
            },
            "description": "Custom text that should be displayed alongside shipping address collection."
          },
          "submit": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "maxLength": 1200
              }
            },
            "description": "Custom text that should be displayed alongside the payment confirmation button."
          },
          "termsOfServiceAcceptance": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "maxLength": 1200
              }
            },
            "description": "Custom text that should be displayed in place of the default terms of service agreement text."
          }
        },
        "description": "Stripe CheckoutSession.custom_text"
      },
      "CheckoutSessionUIMode": {
        "type": "string",
        "enum": [
          "embedded",
          "hosted"
        ],
        "description": "Stripe CheckoutSession.ui_mode"
      },
      "ClientAppStartResponse": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "description": "The URL to start the OAuth2 authorization code grant flow."
          }
        },
        "description": "Response from the client app (Zuplo Metering backend) to start the OAuth2 flow."
      },
      "CollectionMethod": {
        "type": "string",
        "enum": [
          "charge_automatically",
          "send_invoice"
        ],
        "description": "CollectionMethod specifies how the invoice should be collected (automatic vs manual)",
        "title": "Collection method"
      },
      "ConflictProblemResponse": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnexpectedProblemResponse"
          }
        ],
        "description": "The request could not be completed due to a conflict with the current state of the target resource."
      },
      "CountryCode": {
        "type": "string",
        "minLength": 2,
        "maxLength": 2,
        "pattern": "^[A-Z]{2}$",
        "description": "[ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 country code.\nCustom two-letter country codes are also supported for convenience.",
        "example": "US"
      },
      "CreateCheckoutSessionTaxIdCollection": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Enable tax ID collection during checkout. Defaults to false."
          },
          "required": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateCheckoutSessionTaxIdCollectionRequired"
              }
            ],
            "description": "Describes whether a tax ID is required during checkout. Defaults to never."
          }
        },
        "description": "Create Stripe checkout session tax ID collection."
      },
      "CreateCheckoutSessionTaxIdCollectionRequired": {
        "type": "string",
        "enum": [
          "if_supported",
          "never"
        ],
        "description": "Create Stripe checkout session tax ID collection required."
      },
      "CreateStripeCheckoutSessionBillingAddressCollection": {
        "type": "string",
        "enum": [
          "auto",
          "required"
        ],
        "description": "Specify whether Checkout should collect the customer’s billing address."
      },
      "CreateStripeCheckoutSessionConsentCollection": {
        "type": "object",
        "properties": {
          "paymentMethodReuseAgreement": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement"
              }
            ],
            "description": "Determines the position and visibility of the payment method reuse agreement in the UI.\nWhen set to auto, Stripe’s defaults will be used. When set to hidden, the payment method reuse agreement text will always be hidden in the UI."
          },
          "promotions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionConsentCollectionPromotions"
              }
            ],
            "description": "If set to auto, enables the collection of customer consent for promotional communications.\nThe Checkout Session will determine whether to display an option to opt into promotional\ncommunication from the merchant depending on the customer’s locale. Only available to US merchants."
          },
          "termsOfService": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionConsentCollectionTermsOfService"
              }
            ],
            "description": "If set to required, it requires customers to check a terms of service checkbox before being able to pay.\nThere must be a valid terms of service URL set in your Stripe Dashboard settings.\nhttps://dashboard.stripe.com/settings/public"
          }
        },
        "description": "Configure fields for the Checkout Session to gather active consent from customers."
      },
      "CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement": {
        "type": "object",
        "properties": {
          "position": {
            "$ref": "#/components/schemas/CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition"
          }
        },
        "description": "Create Stripe checkout session payment method reuse agreement."
      },
      "CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition": {
        "type": "string",
        "enum": [
          "auto",
          "hidden"
        ],
        "description": "Create Stripe checkout session consent collection agreement position."
      },
      "CreateStripeCheckoutSessionConsentCollectionPromotions": {
        "type": "string",
        "enum": [
          "auto",
          "none"
        ],
        "description": "Create Stripe checkout session consent collection promotions."
      },
      "CreateStripeCheckoutSessionConsentCollectionTermsOfService": {
        "type": "string",
        "enum": [
          "none",
          "required"
        ],
        "description": "Create Stripe checkout session consent collection terms of service."
      },
      "CreateStripeCheckoutSessionCustomerUpdate": {
        "type": "object",
        "properties": {
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionCustomerUpdateBehavior"
              }
            ],
            "description": "Describes whether Checkout saves the billing address onto customer.address.\nTo always collect a full billing address, use billing_address_collection.\nDefaults to never."
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionCustomerUpdateBehavior"
              }
            ],
            "description": "Describes whether Checkout saves the name onto customer.name.\nDefaults to never."
          },
          "shipping": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionCustomerUpdateBehavior"
              }
            ],
            "description": "Describes whether Checkout saves shipping information onto customer.shipping.\nTo collect shipping information, use shipping_address_collection.\nDefaults to never."
          }
        },
        "description": "Controls what fields on Customer can be updated by the Checkout Session."
      },
      "CreateStripeCheckoutSessionCustomerUpdateBehavior": {
        "type": "string",
        "enum": [
          "auto",
          "never"
        ],
        "description": "Create Stripe checkout session customer update behavior."
      },
      "CreateStripeCheckoutSessionRedirectOnCompletion": {
        "type": "string",
        "enum": [
          "always",
          "if_required",
          "never"
        ],
        "description": "Create Stripe checkout session redirect on completion."
      },
      "CreateStripeCheckoutSessionRequest": {
        "type": "object",
        "required": [
          "customer",
          "options"
        ],
        "properties": {
          "appId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "If not provided, the default Stripe app is used if any.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerId"
              },
              {
                "$ref": "#/components/schemas/CustomerKey"
              },
              {
                "$ref": "#/components/schemas/CustomerCreate"
              }
            ],
            "description": "Provide a customer ID or key to use an existing Zuplo Metering customer.\nor provide a customer object to create a new customer."
          },
          "stripeCustomerId": {
            "type": "string",
            "description": "Stripe customer ID.\nIf not provided Zuplo Metering creates a new Stripe customer or\nuses the Zuplo Metering customer's default Stripe customer ID."
          },
          "options": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionRequestOptions"
              }
            ],
            "description": "Options passed to Stripe when creating the checkout session."
          }
        },
        "description": "Create Stripe checkout session request.",
        "example": {
          "customer": {
            "name": "ACME, Inc.",
            "currency": "USD",
            "usageAttribution": {
              "subjectKeys": [
                "my-identifier"
              ]
            }
          },
          "options": {
            "currency": "USD",
            "successURL": "http://example.com",
            "billingAddressCollection": "required",
            "taxIdCollection": {
              "enabled": true,
              "required": "if_supported"
            },
            "customerUpdate": {
              "name": "auto",
              "address": "auto"
            }
          }
        }
      },
      "CreateStripeCheckoutSessionRequestOptions": {
        "type": "object",
        "properties": {
          "billingAddressCollection": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionBillingAddressCollection"
              }
            ],
            "description": "Specify whether Checkout should collect the customer’s billing address. Defaults to auto."
          },
          "cancelURL": {
            "type": "string",
            "description": "If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.\nThis parameter is not allowed if ui_mode is embedded."
          },
          "clientReferenceID": {
            "type": "string",
            "description": "A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems."
          },
          "customerUpdate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionCustomerUpdate"
              }
            ],
            "description": "Controls what fields on Customer can be updated by the Checkout Session."
          },
          "consentCollection": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionConsentCollection"
              }
            ],
            "description": "Configure fields for the Checkout Session to gather active consent from customers."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "Three-letter ISO currency code, in lowercase."
          },
          "customText": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CheckoutSessionCustomTextAfterSubmitParams"
              }
            ],
            "description": "Display additional text for your customers using custom text."
          },
          "expiresAt": {
            "type": "integer",
            "format": "int64",
            "description": "The Epoch time in seconds at which the Checkout Session will expire.\nIt can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation."
          },
          "locale": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Set of key-value pairs that you can attach to an object.\nThis can be useful for storing additional information about the object in a structured format.\nIndividual keys can be unset by posting an empty value to them.\nAll keys can be unset by posting an empty value to metadata."
          },
          "returnURL": {
            "type": "string",
            "description": "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site.\nThis parameter is required if ui_mode is embedded and redirect-based payment methods are enabled on the session."
          },
          "successURL": {
            "type": "string",
            "description": "The URL to which Stripe should send customers when payment or setup is complete.\nThis parameter is not allowed if ui_mode is embedded.\nIf you’d like to use information from the successful Checkout Session on your page, read the guide on customizing your success page:\nhttps://docs.stripe.com/payments/checkout/custom-success-page"
          },
          "uiMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CheckoutSessionUIMode"
              }
            ],
            "description": "The UI mode of the Session. Defaults to hosted."
          },
          "paymentMethodTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of the types of payment methods (e.g., card) this Checkout Session can accept."
          },
          "redirectOnCompletion": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateStripeCheckoutSessionRedirectOnCompletion"
              }
            ],
            "description": "This parameter applies to ui_mode: embedded. Defaults to always.\nLearn more about the redirect behavior of embedded sessions at\nhttps://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form"
          },
          "taxIdCollection": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateCheckoutSessionTaxIdCollection"
              }
            ],
            "description": "Controls tax ID collection during checkout."
          }
        },
        "description": "Create Stripe checkout session options\nSee https://docs.stripe.com/api/checkout/sessions/create"
      },
      "CreateStripeCheckoutSessionResult": {
        "type": "object",
        "required": [
          "customerId",
          "stripeCustomerId",
          "sessionId",
          "setupIntentId",
          "createdAt",
          "mode"
        ],
        "properties": {
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The Zuplo Metering customer ID.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "stripeCustomerId": {
            "type": "string",
            "description": "The Stripe customer ID."
          },
          "sessionId": {
            "type": "string",
            "description": "The checkout session ID."
          },
          "setupIntentId": {
            "type": "string",
            "description": "The checkout session setup intent ID."
          },
          "clientSecret": {
            "type": "string",
            "description": "The client secret of the checkout session.\nThis can be used to initialize Stripe.js for your client-side implementation."
          },
          "clientReferenceId": {
            "type": "string",
            "description": "A unique string to reference the Checkout Session.\nThis can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems."
          },
          "customerEmail": {
            "type": "string",
            "description": "Customer's email address provided to Stripe."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "Three-letter ISO currency code, in lowercase."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp at which the checkout session was created.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp at which the checkout session will expire.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Set of key-value pairs attached to the checkout session."
          },
          "status": {
            "type": "string",
            "description": "The status of the checkout session."
          },
          "url": {
            "type": "string",
            "description": "URL to show the checkout session."
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StripeCheckoutSessionMode"
              }
            ],
            "description": "Mode\nAlways `setup` for now."
          },
          "cancelURL": {
            "type": "string",
            "description": "Cancel URL."
          },
          "successURL": {
            "type": "string",
            "description": "Success URL."
          },
          "returnURL": {
            "type": "string",
            "description": "Return URL."
          }
        },
        "description": "Create Stripe Checkout Session response."
      },
      "CreateStripeCustomerPortalSessionParams": {
        "type": "object",
        "properties": {
          "configurationId": {
            "type": "string",
            "description": "The ID of an existing configuration to use for this session,\ndescribing its functionality and features.\nIf not specified, the session uses the default configuration.\n\nSee https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-configuration",
            "title": "Configuration"
          },
          "locale": {
            "type": "string",
            "description": "The IETF language tag of the locale customer portal is displayed in.\nIf blank or auto, the customer’s preferred_locales or browser’s locale is used.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-locale",
            "title": "Locale"
          },
          "returnUrl": {
            "type": "string",
            "description": "The URL to redirect the customer to after they have completed\ntheir requested actions.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url",
            "title": "ReturnUrl"
          }
        },
        "description": "Stripe customer portal request params."
      },
      "CreditNoteOriginalInvoiceRef": {
        "type": "object",
        "required": [
          "type",
          "url"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "credit_note_original_invoice"
            ],
            "description": "Type of the invoice."
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time",
            "description": "IssueAt reflects the time the document was issued.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceNumber"
              }
            ],
            "description": "(Serial) Number of the referenced document.",
            "readOnly": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Link to the source document.",
            "readOnly": true
          }
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/InvoiceGenericDocumentRef"
          }
        ],
        "description": "CreditNoteOriginalInvoiceRef is used to reference the original invoice that a credit note is based on."
      },
      "Currency": {
        "type": "object",
        "required": [
          "code",
          "name",
          "symbol",
          "subunits"
        ],
        "properties": {
          "code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency ISO code."
          },
          "name": {
            "type": "string",
            "description": "The currency name."
          },
          "symbol": {
            "type": "string",
            "description": "The currency symbol."
          },
          "subunits": {
            "type": "integer",
            "format": "uint32",
            "description": "Subunit of the currency."
          }
        },
        "description": "Currency describes a currency supported by Zuplo Metering."
      },
      "CurrencyCode": {
        "type": "string",
        "minLength": 3,
        "maxLength": 3,
        "pattern": "^[A-Z]{3}$",
        "description": "Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.\nCustom three-letter currency codes are also supported for convenience.",
        "example": "USD"
      },
      "CustomInvoicingApp": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "listing",
          "status",
          "type",
          "enableDraftSyncHook",
          "enableIssuingSyncHook"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "listing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarketplaceListing"
              }
            ],
            "description": "The marketplace listing that this installed app is based on.",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppStatus"
              }
            ],
            "description": "Status of the app connection.",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "custom_invoicing"
            ],
            "description": "The app's type is CustomInvoicing."
          },
          "enableDraftSyncHook": {
            "type": "boolean",
            "description": "Enable draft.sync hook.\n\nIf the hook is not enabled, the invoice will be progressed to the next state automatically."
          },
          "enableIssuingSyncHook": {
            "type": "boolean",
            "description": "Enable issuing.sync hook.\n\nIf the hook is not enabled, the invoice will be progressed to the next state automatically."
          }
        },
        "description": "Custom Invoicing app can be used for interface with any invoicing or payment system.\n\nThis app provides ways to manipulate invoices and payments, however the integration\nmust rely on Notifications API to get notified about invoice changes."
      },
      "CustomInvoicingAppReplaceUpdate": {
        "type": "object",
        "required": [
          "name",
          "type",
          "enableDraftSyncHook",
          "enableIssuingSyncHook"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "type": {
            "type": "string",
            "enum": [
              "custom_invoicing"
            ],
            "description": "The app's type is CustomInvoicing."
          },
          "enableDraftSyncHook": {
            "type": "boolean",
            "description": "Enable draft.sync hook.\n\nIf the hook is not enabled, the invoice will be progressed to the next state automatically."
          },
          "enableIssuingSyncHook": {
            "type": "boolean",
            "description": "Enable issuing.sync hook.\n\nIf the hook is not enabled, the invoice will be progressed to the next state automatically."
          }
        },
        "description": "Resource update operation model."
      },
      "CustomInvoicingCustomerAppData": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "app": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomInvoicingApp"
              }
            ],
            "description": "The installed custom invoicing app this data belongs to.",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The app ID.\nIf not provided, it will use the global default for the app type.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "App ID"
          },
          "type": {
            "type": "string",
            "enum": [
              "custom_invoicing"
            ],
            "description": "The app name.",
            "title": "App Type"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Metadata to be used by the custom invoicing provider."
          }
        },
        "description": "Custom Invoicing Customer App Data."
      },
      "CustomInvoicingDraftSynchronizedRequest": {
        "type": "object",
        "properties": {
          "invoicing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomInvoicingSyncResult"
              }
            ],
            "description": "The result of the synchronization."
          }
        },
        "description": "Information to finalize the draft details of an invoice."
      },
      "CustomInvoicingFinalizedInvoicingRequest": {
        "type": "object",
        "properties": {
          "invoiceNumber": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceNumber"
              }
            ],
            "description": "If set the invoice's number will be set to this value."
          },
          "sentToCustomerAt": {
            "type": "string",
            "format": "date-time",
            "description": "If set the invoice's sent to customer at will be set to this value.",
            "example": "2023-01-01T01:01:01.001Z"
          }
        },
        "description": "Information to finalize the invoicing details of an invoice."
      },
      "CustomInvoicingFinalizedPaymentRequest": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "description": "If set the invoice's payment external ID will be set to this value."
          }
        },
        "description": "Information to finalize the payment details of an invoice."
      },
      "CustomInvoicingFinalizedRequest": {
        "type": "object",
        "properties": {
          "invoicing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomInvoicingFinalizedInvoicingRequest"
              }
            ],
            "description": "The result of the synchronization."
          },
          "payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomInvoicingFinalizedPaymentRequest"
              }
            ],
            "description": "The result of the payment synchronization."
          }
        },
        "description": "Information to finalize the invoice.\n\nIf invoicing.invoiceNumber is not set, then a new invoice number will be generated (INV- prefix)."
      },
      "CustomInvoicingLineDiscountExternalIdMapping": {
        "type": "object",
        "required": [
          "lineDiscountId",
          "externalId"
        ],
        "properties": {
          "lineDiscountId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The line discount ID.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "externalId": {
            "type": "string",
            "description": "The external ID (e.g. custom invoicing system's ID)."
          }
        },
        "description": "Mapping between line discounts and external IDs."
      },
      "CustomInvoicingLineExternalIdMapping": {
        "type": "object",
        "required": [
          "lineId",
          "externalId"
        ],
        "properties": {
          "lineId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The line ID.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "externalId": {
            "type": "string",
            "description": "The external ID (e.g. custom invoicing system's ID)."
          }
        },
        "description": "Mapping between lines and external IDs."
      },
      "CustomInvoicingPaymentTrigger": {
        "type": "string",
        "enum": [
          "paid",
          "payment_failed",
          "payment_uncollectible",
          "payment_overdue",
          "action_required",
          "void"
        ],
        "description": "Payment trigger to execute on a finalized invoice."
      },
      "CustomInvoicingSyncResult": {
        "type": "object",
        "properties": {
          "invoiceNumber": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceNumber"
              }
            ],
            "description": "If set the invoice's number will be set to this value."
          },
          "externalId": {
            "type": "string",
            "description": "If set the invoice's invoicing external ID will be set to this value."
          },
          "lineExternalIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomInvoicingLineExternalIdMapping"
            },
            "description": "If set the invoice's line external IDs will be set to this value.\n\nThis can be used to reference the external system's entities in the\ninvoice."
          },
          "lineDiscountExternalIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomInvoicingLineDiscountExternalIdMapping"
            },
            "description": "If set the invoice's line discount external IDs will be set to this value.\n\nThis can be used to reference the external system's entities in the\ninvoice."
          }
        },
        "description": "Information to synchronize the invoice.\n\nCan be used to store external app's IDs on the invoice or lines."
      },
      "CustomInvoicingTaxConfig": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Tax code.\n\nThe tax code should be interpreted by the custom invoicing provider.",
            "title": "Tax code"
          }
        },
        "description": "Custom invoicing tax config."
      },
      "CustomInvoicingUpdatePaymentStatusRequest": {
        "type": "object",
        "required": [
          "trigger"
        ],
        "properties": {
          "trigger": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomInvoicingPaymentTrigger"
              }
            ],
            "description": "The trigger to be executed on the invoice."
          }
        },
        "description": "Update payment status request.\n\nCan be used to manipulate invoice's payment status (when custominvoicing app is being used)."
      },
      "CustomPlanInput": {
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "required": [
              "name",
              "currency",
              "billingCadence",
              "phases"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256,
                "description": "Human-readable name for the resource. Between 1 and 256 characters.",
                "title": "Display name"
              },
              "description": {
                "type": "string",
                "maxLength": 1024,
                "description": "Optional description of the resource. Maximum 1024 characters.",
                "title": "Description"
              },
              "metadata": {
                "type": "object",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Metadata"
                  }
                ],
                "nullable": true,
                "description": "Additional metadata for the resource.",
                "title": "Metadata"
              },
              "alignment": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Alignment"
                  }
                ],
                "description": "Alignment configuration for the plan."
              },
              "currency": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CurrencyCode"
                  }
                ],
                "description": "The currency code of the plan.",
                "title": "Currency",
                "default": "USD"
              },
              "billingCadence": {
                "type": "string",
                "format": "duration",
                "description": "The default billing cadence for subscriptions using this plan.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).",
                "title": "Billing cadence",
                "example": "P1M"
              },
              "proRatingConfig": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ProRatingConfig"
                  }
                ],
                "description": "Default pro-rating configuration for subscriptions using this plan.",
                "title": "Pro-rating configuration",
                "default": {
                  "enabled": true,
                  "mode": "max_consumption_based"
                }
              },
              "phases": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PlanPhase"
                },
                "minItems": 1,
                "description": "The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.\nA phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.",
                "title": "Plan phases"
              }
            },
            "description": "The template for omitting properties."
          }
        ],
        "description": "Plan input for custom subscription creation (without key and version)."
      },
      "CustomSubscriptionChange": {
        "type": "object",
        "required": [
          "timing",
          "customPlan"
        ],
        "properties": {
          "timing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionTiming"
              }
            ],
            "description": "Timing configuration for the change, when the change should take effect.\nFor changing a subscription, the accepted values depend on the subscription configuration."
          },
          "billingAnchor": {
            "type": "string",
            "format": "date-time",
            "description": "The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the previous subscription billing anchor will be used.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "customPlan": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomPlanInput"
              }
            ],
            "description": "The custom plan description which defines the Subscription."
          }
        },
        "description": "Change a custom subscription."
      },
      "CustomSubscriptionCreate": {
        "type": "object",
        "required": [
          "customPlan"
        ],
        "properties": {
          "customPlan": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomPlanInput"
              }
            ],
            "description": "The custom plan description which defines the Subscription."
          },
          "timing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionTiming"
              }
            ],
            "description": "Timing configuration for the change, when the change should take effect.\nThe default is immediate.",
            "default": "immediate"
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The ID of the customer. Provide either the key or ID. Has presedence over the key.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "customerKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The key of the customer. Provide either the key or ID."
          },
          "billingAnchor": {
            "type": "string",
            "format": "date-time",
            "description": "The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the subscription start time will be used.",
            "example": "2023-01-01T01:01:01.001Z"
          }
        },
        "description": "Create a custom subscription.",
        "title": "Create custom"
      },
      "Customer": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "usageAttribution"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "An optional unique key of the customer.\nUseful to reference the customer in external systems.\nFor example, your database ID.",
            "title": "Key"
          },
          "usageAttribution": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerUsageAttribution"
              }
            ],
            "description": "Mapping to attribute metered usage to the customer",
            "title": "Usage Attribution"
          },
          "primaryEmail": {
            "type": "string",
            "description": "The primary email address of the customer.",
            "title": "Primary Email"
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "Currency of the customer.\nUsed for billing, tax and invoicing.",
            "title": "Currency"
          },
          "billingAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "The billing address of the customer.\nUsed for tax and invoicing.",
            "title": "Billing Address"
          },
          "currentSubscriptionId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The ID of the Subscription if the customer has one.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "Current Subscription ID",
            "readOnly": true
          },
          "subscriptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Subscription"
            },
            "description": "The subscriptions of the customer.\nOnly with the `subscriptions` expand option.",
            "title": "Subscriptions",
            "readOnly": true
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          }
        },
        "description": "A customer object.",
        "example": {
          "id": "01G65Z755AFWAKHE12NY0CQ9FH",
          "name": "ACME Inc.",
          "usageAttribution": {
            "subjectKeys": [
              "my_subject_key"
            ]
          },
          "createdAt": "2024-01-01T01:01:01.001Z",
          "updatedAt": "2024-01-01T01:01:01.001Z"
        }
      },
      "CustomerAccess": {
        "type": "object",
        "required": [
          "subscriptions"
        ],
        "properties": {
          "subscriptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionEntitlements"
            },
            "description": "List of subscription-based entitlements grouped by subscription.\nEach item contains a subscription ID and its associated entitlements.",
            "readOnly": true
          }
        },
        "description": "CustomerAccess describes what features the customer has access to."
      },
      "CustomerAppData": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/StripeCustomerAppData"
          },
          {
            "$ref": "#/components/schemas/SandboxCustomerAppData"
          },
          {
            "$ref": "#/components/schemas/CustomInvoicingCustomerAppData"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "stripe": "#/components/schemas/StripeCustomerAppData",
            "sandbox": "#/components/schemas/SandboxCustomerAppData",
            "custom_invoicing": "#/components/schemas/CustomInvoicingCustomerAppData"
          }
        },
        "description": "CustomerAppData\nStores the app specific data for the customer.\nOne of: stripe, sandbox, custom_invoicing"
      },
      "CustomerAppDataCreateOrUpdateItem": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/StripeCustomerAppDataCreateOrUpdateItem"
          },
          {
            "$ref": "#/components/schemas/SandboxCustomerAppData"
          },
          {
            "$ref": "#/components/schemas/CustomInvoicingCustomerAppData"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "stripe": "#/components/schemas/StripeCustomerAppDataCreateOrUpdateItem",
            "sandbox": "#/components/schemas/SandboxCustomerAppData",
            "custom_invoicing": "#/components/schemas/CustomInvoicingCustomerAppData"
          }
        },
        "description": "CustomerAppData\nStores the app specific data for the customer.\nOne of: stripe, sandbox, custom_invoicing"
      },
      "CustomerAppDataPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerAppData"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "CustomerCreate": {
        "type": "object",
        "required": [
          "name",
          "usageAttribution"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "An optional unique key of the customer.\nUseful to reference the customer in external systems.\nFor example, your database ID.",
            "title": "Key"
          },
          "usageAttribution": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerUsageAttribution"
              }
            ],
            "description": "Mapping to attribute metered usage to the customer",
            "title": "Usage Attribution"
          },
          "primaryEmail": {
            "type": "string",
            "description": "The primary email address of the customer.",
            "title": "Primary Email"
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "Currency of the customer.\nUsed for billing, tax and invoicing.",
            "title": "Currency"
          },
          "billingAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "The billing address of the customer.\nUsed for tax and invoicing.",
            "title": "Billing Address"
          }
        },
        "description": "Resource create operation model."
      },
      "CustomerExpand": {
        "type": "string",
        "enum": [
          "subscriptions"
        ],
        "description": "CustomerExpand specifies the parts of the customer to expand in the list output."
      },
      "CustomerId": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "Create Stripe checkout session with customer ID."
      },
      "CustomerKey": {
        "type": "object",
        "required": [
          "key"
        ],
        "properties": {
          "key": {
            "type": "string"
          }
        },
        "description": "Create Stripe checkout session with customer key."
      },
      "CustomerOrderBy": {
        "type": "string",
        "enum": [
          "id",
          "name",
          "createdAt"
        ],
        "description": "Order by options for customers."
      },
      "CustomerPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Customer"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "CustomerReplaceUpdate": {
        "type": "object",
        "required": [
          "name",
          "usageAttribution"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "An optional unique key of the customer.\nUseful to reference the customer in external systems.\nFor example, your database ID.",
            "title": "Key"
          },
          "usageAttribution": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerUsageAttribution"
              }
            ],
            "description": "Mapping to attribute metered usage to the customer",
            "title": "Usage Attribution"
          },
          "primaryEmail": {
            "type": "string",
            "description": "The primary email address of the customer.",
            "title": "Primary Email"
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "Currency of the customer.\nUsed for billing, tax and invoicing.",
            "title": "Currency"
          },
          "billingAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "The billing address of the customer.\nUsed for tax and invoicing.",
            "title": "Billing Address"
          }
        },
        "description": "Resource update operation model."
      },
      "CustomerSubscriptionOrderBy": {
        "type": "string",
        "enum": [
          "activeFrom",
          "activeTo"
        ],
        "description": "Order by options for customer subscriptions."
      },
      "CustomerUsageAttribution": {
        "type": "object",
        "required": [
          "subjectKeys"
        ],
        "properties": {
          "subjectKeys": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "SubjectKey is a key that is used to identify a subject."
            },
            "minItems": 1,
            "maxItems": 1,
            "description": "The subjects that are attributed to the customer.",
            "title": "SubjectKeys"
          }
        },
        "description": "Mapping to attribute metered usage to the customer.\nOne customer can have multiple subjects,\nbut one subject can only belong to one customer."
      },
      "DiscountPercentage": {
        "type": "object",
        "required": [
          "percentage"
        ],
        "properties": {
          "percentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Percentage"
              }
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "The percentage of the discount.",
            "title": "Percentage"
          }
        },
        "description": "Percentage discount."
      },
      "DiscountReasonMaximumSpend": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "maximum_spend"
            ]
          }
        },
        "description": "The reason for the discount is a maximum spend."
      },
      "DiscountReasonProrationCredit": {
        "type": "object",
        "required": [
          "type",
          "previousSubscriptionId",
          "maxPercentage"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "proration_credit"
            ]
          },
          "previousSubscriptionId": {
            "type": "string",
            "description": "The ID of the previous subscription that generated this credit."
          },
          "maxPercentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The maximum percentage (of time or consumption) used to calculate the credit."
          }
        },
        "description": "The reason for the discount is a proration credit from a previous subscription."
      },
      "DiscountReasonRatecardPercentage": {
        "type": "object",
        "required": [
          "type",
          "percentage"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "ratecard_percentage"
            ]
          },
          "percentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Percentage"
              }
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "The percentage of the discount.",
            "title": "Percentage"
          },
          "correlationId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Correlation ID for the discount.\n\nThis is used to link discounts across different invoices (progressive billing use case).\n\nIf not provided, the invoicing engine will auto-generate one. When editing an invoice line,\nplease make sure to keep the same correlation ID of the discount or in progressive billing\nsetups the discount amounts might be incorrect.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "The reason for the discount is a ratecard percentage."
      },
      "DiscountReasonRatecardUsage": {
        "type": "object",
        "required": [
          "type",
          "quantity"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "ratecard_usage"
            ]
          },
          "quantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The quantity of the usage discount.\n\nMust be positive.",
            "title": "Usage"
          },
          "correlationId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Correlation ID for the discount.\n\nThis is used to link discounts across different invoices (progressive billing use case).\n\nIf not provided, the invoicing engine will auto-generate one. When editing an invoice line,\nplease make sure to keep the same correlation ID of the discount or in progressive billing\nsetups the discount amounts might be incorrect.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "The reason for the discount is a ratecard usage."
      },
      "DiscountReasonType": {
        "type": "string",
        "enum": [
          "maximum_spend",
          "ratecard_percentage",
          "ratecard_usage",
          "proration_credit"
        ],
        "description": "The type of the discount reason."
      },
      "DiscountUsage": {
        "type": "object",
        "required": [
          "quantity"
        ],
        "properties": {
          "quantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The quantity of the usage discount.\n\nMust be positive.",
            "title": "Usage"
          }
        },
        "description": "Usage discount.\n\nUsage discount means that the first N items are free. From billing perspective\nthis means that any usage on a specific feature is considered 0 until this discount\nis exhausted."
      },
      "Discounts": {
        "type": "object",
        "properties": {
          "percentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountPercentage"
              }
            ],
            "description": "The percentage discount."
          },
          "usage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountUsage"
              }
            ],
            "description": "The usage discount."
          }
        },
        "description": "Discount by type on a price"
      },
      "DynamicPrice": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "dynamic"
            ],
            "description": "The type of the price."
          },
          "multiplier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price",
            "title": "The multiplier to apply to the base price to get the dynamic price",
            "default": "1"
          }
        },
        "description": "Dynamic price.\n\nThe underlying meter's value is considered the base price in the\ncustomer's currency.\n\nThe rate specifies the markup over the price."
      },
      "DynamicPriceWithCommitments": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "dynamic"
            ],
            "description": "The type of the price."
          },
          "multiplier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price",
            "title": "The multiplier to apply to the base price to get the dynamic price",
            "default": "1"
          },
          "minimumAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The customer is committed to spend at least the amount.",
            "title": "Minimum amount"
          },
          "maximumAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The customer is limited to spend at most the amount.",
            "title": "Maximum amount"
          }
        },
        "description": "Dynamic price with spend commitments."
      },
      "EditOp": {
        "type": "string",
        "enum": [
          "add_item",
          "remove_item",
          "unschedule_edit",
          "add_phase",
          "remove_phase",
          "stretch_phase"
        ],
        "description": "Enum listing the different operation types."
      },
      "EditSubscriptionAddItem": {
        "type": "object",
        "required": [
          "op",
          "phaseKey",
          "rateCard"
        ],
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "add_item"
            ]
          },
          "phaseKey": {
            "type": "string"
          },
          "rateCard": {
            "$ref": "#/components/schemas/RateCard"
          }
        },
        "description": "Add a new item to a phase."
      },
      "EditSubscriptionAddPhase": {
        "type": "object",
        "required": [
          "op",
          "phase"
        ],
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "add_phase"
            ]
          },
          "phase": {
            "$ref": "#/components/schemas/SubscriptionPhaseCreate"
          }
        },
        "description": "Add a new phase"
      },
      "EditSubscriptionRemoveItem": {
        "type": "object",
        "required": [
          "op",
          "phaseKey",
          "itemKey"
        ],
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "remove_item"
            ]
          },
          "phaseKey": {
            "type": "string"
          },
          "itemKey": {
            "type": "string"
          }
        },
        "description": "Remove an item from a phase."
      },
      "EditSubscriptionRemovePhase": {
        "type": "object",
        "required": [
          "op",
          "phaseKey",
          "shift"
        ],
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "remove_phase"
            ]
          },
          "phaseKey": {
            "type": "string"
          },
          "shift": {
            "$ref": "#/components/schemas/RemovePhaseShifting"
          }
        },
        "description": "Remove a phase"
      },
      "EditSubscriptionStretchPhase": {
        "type": "object",
        "required": [
          "op",
          "phaseKey",
          "extendBy"
        ],
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "stretch_phase"
            ]
          },
          "phaseKey": {
            "type": "string"
          },
          "extendBy": {
            "type": "string",
            "format": "duration"
          }
        },
        "description": "Stretch a phase"
      },
      "EditSubscriptionUnscheduleEdit": {
        "type": "object",
        "required": [
          "op"
        ],
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "unschedule_edit"
            ]
          }
        },
        "description": "Unschedules any edits from the current phase."
      },
      "Entitlement": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EntitlementMetered"
          },
          {
            "$ref": "#/components/schemas/EntitlementStatic"
          },
          {
            "$ref": "#/components/schemas/EntitlementBoolean"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "metered": "#/components/schemas/EntitlementMetered",
            "static": "#/components/schemas/EntitlementStatic",
            "boolean": "#/components/schemas/EntitlementBoolean"
          }
        },
        "description": "Entitlement templates are used to define the entitlements of a plan.\nFeatures are omitted from the entitlement template, as they are defined in the rate card."
      },
      "EntitlementBaseTemplate": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "activeFrom",
          "id",
          "type",
          "subjectKey",
          "featureKey",
          "featureId"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "The annotations of the entitlement.",
            "example": {
              "subscription.id": "sub_123"
            },
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Readonly unique ULID identifier.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EntitlementType"
              }
            ],
            "description": "The type of the entitlement.",
            "title": "Type"
          },
          "subjectKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The identifier key unique to the subject.\nNOTE: Subjects are being deprecated, please use the new customer APIs.",
            "example": "customer-1"
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "currentUsagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The current usage period."
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriod"
              }
            ],
            "description": "The defined usage period of the entitlement"
          }
        },
        "description": "Shared fields of the entitlement templates."
      },
      "EntitlementBoolean": {
        "type": "object",
        "required": [
          "type",
          "createdAt",
          "updatedAt",
          "activeFrom",
          "id",
          "subjectKey",
          "featureKey",
          "featureId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "boolean"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "The annotations of the entitlement.",
            "example": {
              "subscription.id": "sub_123"
            },
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Readonly unique ULID identifier.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "subjectKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The identifier key unique to the subject.\nNOTE: Subjects are being deprecated, please use the new customer APIs.",
            "example": "customer-1"
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "currentUsagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The current usage period."
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriod"
              }
            ],
            "description": "The defined usage period of the entitlement"
          }
        },
        "description": "Entitlement template of a boolean entitlement."
      },
      "EntitlementBooleanCreateInputs": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.\nEither featureKey or featureId is required.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.\nEither featureKey or featureId is required.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodCreateInput"
              }
            ],
            "description": "The usage period associated with the entitlement."
          },
          "type": {
            "type": "string",
            "enum": [
              "boolean"
            ]
          }
        },
        "description": "Create inputs for boolean entitlement"
      },
      "EntitlementBooleanV2": {
        "type": "object",
        "required": [
          "type",
          "createdAt",
          "updatedAt",
          "activeFrom",
          "id",
          "featureKey",
          "featureId",
          "customerId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "boolean"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "The annotations of the entitlement.",
            "example": {
              "subscription.id": "sub_123"
            },
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Readonly unique ULID identifier.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "currentUsagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The current usage period."
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriod"
              }
            ],
            "description": "The defined usage period of the entitlement"
          },
          "customerKey": {
            "type": "string",
            "description": "The identifier key unique to the customer",
            "example": "customer-1"
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The identifier unique to the customer",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          }
        },
        "description": "Entitlement template of a boolean entitlement."
      },
      "EntitlementCreateInputs": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EntitlementMeteredCreateInputs"
          },
          {
            "$ref": "#/components/schemas/EntitlementStaticCreateInputs"
          },
          {
            "$ref": "#/components/schemas/EntitlementBooleanCreateInputs"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "metered": "#/components/schemas/EntitlementMeteredCreateInputs",
            "static": "#/components/schemas/EntitlementStaticCreateInputs",
            "boolean": "#/components/schemas/EntitlementBooleanCreateInputs"
          }
        },
        "description": "Create inputs for entitlement"
      },
      "EntitlementCreateSharedFields": {
        "type": "object",
        "properties": {
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.\nEither featureKey or featureId is required.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.\nEither featureKey or featureId is required.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodCreateInput"
              }
            ],
            "description": "The usage period associated with the entitlement."
          }
        },
        "description": "Shared fields for entitlement creation"
      },
      "EntitlementCustomerFields": {
        "type": "object",
        "required": [
          "customerId"
        ],
        "properties": {
          "customerKey": {
            "type": "string",
            "description": "The identifier key unique to the customer",
            "example": "customer-1"
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The identifier unique to the customer",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          }
        },
        "description": "Customer fields for entitlements"
      },
      "EntitlementGrant": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "amount",
          "effectiveAt",
          "expiration",
          "id",
          "entitlementId"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "amount": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "The amount to grant. Should be a positive number.",
            "example": 100
          },
          "priority": {
            "type": "integer",
            "format": "uint8",
            "minimum": 1,
            "maximum": 255,
            "description": "The priority of the grant. Grants with higher priority are applied first.\nPriority is a positive decimal numbers. With lower numbers indicating higher importance.\nFor example, a priority of 1 is more urgent than a priority of 2.\nWhen there are several grants available for the same subject, the system selects the grant with the highest priority.\nIn cases where grants share the same priority level, the grant closest to its expiration will be used first.\nIn the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.",
            "example": 1
          },
          "effectiveAt": {
            "type": "string",
            "format": "date-time",
            "description": "Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "expiration": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExpirationPeriod"
              }
            ],
            "description": "The grant expiration definition"
          },
          "maxRolloverAmount": {
            "type": "number",
            "format": "double",
            "description": "Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))",
            "example": 100,
            "default": 0
          },
          "minRolloverAmount": {
            "type": "number",
            "format": "double",
            "description": "Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))",
            "example": 100,
            "default": 0
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "The grant metadata.",
            "example": {
              "stripePaymentId": "pi_4OrAkhLvyihio9p51h9iiFnB"
            }
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Readonly unique ULID identifier.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "entitlementId": {
            "type": "string",
            "description": "The unique entitlement ULID that the grant is associated with.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "nextRecurrence": {
            "type": "string",
            "format": "date-time",
            "description": "The next time the grant will recurr.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time the grant expires.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "voidedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time the grant was voided.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "recurrence": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriod"
              }
            ],
            "description": "The recurrence period of the grant."
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Grant annotations",
            "example": {
              "issueAfterReset": true
            }
          }
        },
        "description": "The grant."
      },
      "EntitlementGrantCreateInput": {
        "type": "object",
        "required": [
          "amount",
          "effectiveAt",
          "expiration"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "The amount to grant. Should be a positive number.",
            "example": 100
          },
          "priority": {
            "type": "integer",
            "format": "uint8",
            "minimum": 1,
            "maximum": 255,
            "description": "The priority of the grant. Grants with higher priority are applied first.\nPriority is a positive decimal numbers. With lower numbers indicating higher importance.\nFor example, a priority of 1 is more urgent than a priority of 2.\nWhen there are several grants available for the same subject, the system selects the grant with the highest priority.\nIn cases where grants share the same priority level, the grant closest to its expiration will be used first.\nIn the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.",
            "example": 1
          },
          "effectiveAt": {
            "type": "string",
            "format": "date-time",
            "description": "Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "expiration": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExpirationPeriod"
              }
            ],
            "description": "The grant expiration definition"
          },
          "maxRolloverAmount": {
            "type": "number",
            "format": "double",
            "description": "Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))",
            "example": 100,
            "default": 0
          },
          "minRolloverAmount": {
            "type": "number",
            "format": "double",
            "description": "Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))",
            "example": 100,
            "default": 0
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "The grant metadata.",
            "example": {
              "stripePaymentId": "pi_4OrAkhLvyihio9p51h9iiFnB"
            }
          },
          "recurrence": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodCreateInput"
              }
            ],
            "description": "The subject of the grant."
          }
        },
        "description": "The grant creation input."
      },
      "EntitlementGrantCreateInputV2": {
        "type": "object",
        "required": [
          "amount",
          "effectiveAt"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "The amount to grant. Should be a positive number.",
            "example": 100
          },
          "priority": {
            "type": "integer",
            "format": "uint8",
            "minimum": 1,
            "maximum": 255,
            "description": "The priority of the grant. Grants with higher priority are applied first.\nPriority is a positive decimal numbers. With lower numbers indicating higher importance.\nFor example, a priority of 1 is more urgent than a priority of 2.\nWhen there are several grants available for the same subject, the system selects the grant with the highest priority.\nIn cases where grants share the same priority level, the grant closest to its expiration will be used first.\nIn the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.",
            "example": 1
          },
          "effectiveAt": {
            "type": "string",
            "format": "date-time",
            "description": "Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "minRolloverAmount": {
            "type": "number",
            "format": "double",
            "description": "Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))",
            "example": 100,
            "default": 0
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "The grant metadata.",
            "example": {
              "stripePaymentId": "pi_4OrAkhLvyihio9p51h9iiFnB"
            }
          },
          "recurrence": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodCreateInput"
              }
            ],
            "description": "The subject of the grant."
          },
          "maxRolloverAmount": {
            "type": "number",
            "format": "double",
            "description": "Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. The default value equals grant amount.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))",
            "example": 100
          },
          "expiration": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExpirationPeriod"
              }
            ],
            "description": "The grant expiration definition. If no expiration is provided, the grant can be active indefinitely."
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Grant annotations",
            "example": {
              "internal_reference": "internal_reference"
            }
          }
        },
        "description": "The grant creation input."
      },
      "EntitlementGrantV2": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "amount",
          "effectiveAt",
          "id",
          "entitlementId"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "amount": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "The amount to grant. Should be a positive number.",
            "example": 100
          },
          "priority": {
            "type": "integer",
            "format": "uint8",
            "minimum": 1,
            "maximum": 255,
            "description": "The priority of the grant. Grants with higher priority are applied first.\nPriority is a positive decimal numbers. With lower numbers indicating higher importance.\nFor example, a priority of 1 is more urgent than a priority of 2.\nWhen there are several grants available for the same subject, the system selects the grant with the highest priority.\nIn cases where grants share the same priority level, the grant closest to its expiration will be used first.\nIn the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.",
            "example": 1
          },
          "effectiveAt": {
            "type": "string",
            "format": "date-time",
            "description": "Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "minRolloverAmount": {
            "type": "number",
            "format": "double",
            "description": "Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))",
            "example": 100,
            "default": 0
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "The grant metadata.",
            "example": {
              "stripePaymentId": "pi_4OrAkhLvyihio9p51h9iiFnB"
            }
          },
          "maxRolloverAmount": {
            "type": "number",
            "format": "double",
            "description": "Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. The default value equals grant amount.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))",
            "example": 100
          },
          "expiration": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExpirationPeriod"
              }
            ],
            "description": "The grant expiration definition. If no expiration is provided, the grant can be active indefinitely."
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Grant annotations",
            "example": {
              "internal_reference": "internal_reference"
            }
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Readonly unique ULID identifier.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "entitlementId": {
            "type": "string",
            "description": "The unique entitlement ULID that the grant is associated with.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "nextRecurrence": {
            "type": "string",
            "format": "date-time",
            "description": "The next time the grant will recurr.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time the grant expires.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "voidedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time the grant was voided.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "recurrence": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriod"
              }
            ],
            "description": "The recurrence period of the grant."
          }
        },
        "description": "The grant."
      },
      "EntitlementMetered": {
        "type": "object",
        "required": [
          "type",
          "createdAt",
          "updatedAt",
          "activeFrom",
          "id",
          "subjectKey",
          "featureKey",
          "featureId",
          "lastReset",
          "currentUsagePeriod",
          "measureUsageFrom",
          "usagePeriod"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "metered"
            ]
          },
          "isSoftLimit": {
            "type": "boolean",
            "description": "If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.",
            "title": "Soft limit",
            "default": false
          },
          "isUnlimited": {
            "type": "boolean",
            "description": "Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.",
            "deprecated": true,
            "default": false
          },
          "issueAfterReset": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.",
            "title": "Initial grant amount"
          },
          "issueAfterResetPriority": {
            "type": "integer",
            "format": "uint8",
            "minimum": 1,
            "maximum": 255,
            "description": "Defines the grant priority for the default grant.",
            "title": "Issue grant after reset priority",
            "default": 1
          },
          "preserveOverageAtReset": {
            "type": "boolean",
            "description": "If true, the overage is preserved at reset. If false, the usage is reset to 0.",
            "title": "Preserve overage at reset",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "The annotations of the entitlement.",
            "example": {
              "subscription.id": "sub_123"
            },
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Readonly unique ULID identifier.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "subjectKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The identifier key unique to the subject.\nNOTE: Subjects are being deprecated, please use the new customer APIs.",
            "example": "customer-1"
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "lastReset": {
            "type": "string",
            "format": "date-time",
            "description": "The time the last reset happened.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "currentUsagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The current usage period.",
            "readOnly": true
          },
          "measureUsageFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The time from which usage is measured. If not specified on creation, defaults to entitlement creation time.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriod"
              }
            ],
            "description": "THe usage period of the entitlement.",
            "readOnly": true
          }
        },
        "description": "Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems.\nAccess is determined based on feature usage using a balance calculation (the \"usage allowance\" provided by the issued grants is \"burnt down\" by the usage)."
      },
      "EntitlementMeteredCalculatedFields": {
        "type": "object",
        "required": [
          "lastReset",
          "currentUsagePeriod",
          "measureUsageFrom",
          "usagePeriod"
        ],
        "properties": {
          "lastReset": {
            "type": "string",
            "format": "date-time",
            "description": "The time the last reset happened.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "currentUsagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The current usage period.",
            "readOnly": true
          },
          "measureUsageFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The time from which usage is measured. If not specified on creation, defaults to entitlement creation time.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriod"
              }
            ],
            "description": "THe usage period of the entitlement.",
            "readOnly": true
          }
        },
        "description": "Calculated fields for metered entitlements."
      },
      "EntitlementMeteredCreateInputs": {
        "type": "object",
        "required": [
          "type",
          "usagePeriod"
        ],
        "properties": {
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.\nEither featureKey or featureId is required.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.\nEither featureKey or featureId is required.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "type": {
            "type": "string",
            "enum": [
              "metered"
            ]
          },
          "isSoftLimit": {
            "type": "boolean",
            "description": "If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.",
            "title": "Soft limit",
            "default": false
          },
          "isUnlimited": {
            "type": "boolean",
            "description": "Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.",
            "deprecated": true,
            "default": false
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodCreateInput"
              }
            ],
            "description": "The usage period associated with the entitlement."
          },
          "measureUsageFrom": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeasureUsageFrom"
              }
            ],
            "description": "Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time."
          },
          "issueAfterReset": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.",
            "title": "Initial grant amount"
          },
          "issueAfterResetPriority": {
            "type": "integer",
            "format": "uint8",
            "minimum": 1,
            "maximum": 255,
            "description": "Defines the grant priority for the default grant.",
            "title": "Issue grant after reset priority",
            "default": 1
          },
          "preserveOverageAtReset": {
            "type": "boolean",
            "description": "If true, the overage is preserved at reset. If false, the usage is reset to 0.",
            "title": "Preserve overage at reset",
            "default": false
          }
        },
        "description": "Create inpurs for metered entitlement"
      },
      "EntitlementMeteredV2": {
        "type": "object",
        "required": [
          "type",
          "createdAt",
          "updatedAt",
          "activeFrom",
          "id",
          "featureKey",
          "featureId",
          "lastReset",
          "currentUsagePeriod",
          "measureUsageFrom",
          "usagePeriod",
          "customerId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "metered"
            ]
          },
          "isSoftLimit": {
            "type": "boolean",
            "description": "If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.",
            "title": "Soft limit",
            "default": false
          },
          "preserveOverageAtReset": {
            "type": "boolean",
            "description": "If true, the overage is preserved at reset. If false, the usage is reset to 0.",
            "title": "Preserve overage at reset",
            "default": false
          },
          "issueAfterReset": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.",
            "title": "Initial grant amount",
            "deprecated": true
          },
          "issueAfterResetPriority": {
            "type": "integer",
            "format": "uint8",
            "minimum": 1,
            "maximum": 255,
            "description": "Defines the grant priority for the default grant.",
            "title": "Issue grant after reset priority",
            "deprecated": true,
            "default": 1
          },
          "issue": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IssueAfterReset"
              }
            ],
            "description": "Issue after reset",
            "title": "Issue after reset"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "The annotations of the entitlement.",
            "example": {
              "subscription.id": "sub_123"
            },
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Readonly unique ULID identifier.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "lastReset": {
            "type": "string",
            "format": "date-time",
            "description": "The time the last reset happened.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "currentUsagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The current usage period.",
            "readOnly": true
          },
          "measureUsageFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The time from which usage is measured. If not specified on creation, defaults to entitlement creation time.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriod"
              }
            ],
            "description": "THe usage period of the entitlement.",
            "readOnly": true
          },
          "customerKey": {
            "type": "string",
            "description": "The identifier key unique to the customer",
            "example": "customer-1"
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The identifier unique to the customer",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          }
        },
        "description": "Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems.\nAccess is determined based on feature usage using a balance calculation (the \"usage allowance\" provided by the issued grants is \"burnt down\" by the usage)."
      },
      "EntitlementMeteredV2CreateInputs": {
        "type": "object",
        "required": [
          "type",
          "usagePeriod"
        ],
        "properties": {
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.\nEither featureKey or featureId is required.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.\nEither featureKey or featureId is required.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "type": {
            "type": "string",
            "enum": [
              "metered"
            ]
          },
          "isSoftLimit": {
            "type": "boolean",
            "description": "If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.",
            "title": "Soft limit",
            "default": false
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodCreateInput"
              }
            ],
            "description": "The usage period associated with the entitlement."
          },
          "measureUsageFrom": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeasureUsageFrom"
              }
            ],
            "description": "Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time."
          },
          "preserveOverageAtReset": {
            "type": "boolean",
            "description": "If true, the overage is preserved at reset. If false, the usage is reset to 0.",
            "title": "Preserve overage at reset",
            "default": false
          },
          "issueAfterReset": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.",
            "title": "Initial grant amount",
            "deprecated": true
          },
          "issueAfterResetPriority": {
            "type": "integer",
            "format": "uint8",
            "minimum": 1,
            "maximum": 255,
            "description": "Defines the grant priority for the default grant.",
            "title": "Issue grant after reset priority",
            "deprecated": true,
            "default": 1
          },
          "issue": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IssueAfterReset"
              }
            ],
            "description": "Issue after reset",
            "title": "Issue after reset"
          },
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntitlementGrantCreateInputV2"
            },
            "description": "Grants",
            "title": "Grants"
          }
        },
        "description": "Create inputs for metered entitlement"
      },
      "EntitlementOrderBy": {
        "type": "string",
        "enum": [
          "createdAt",
          "updatedAt"
        ],
        "description": "Order by options for entitlements."
      },
      "EntitlementPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Entitlement"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "EntitlementStatic": {
        "type": "object",
        "required": [
          "type",
          "config",
          "createdAt",
          "updatedAt",
          "activeFrom",
          "id",
          "subjectKey",
          "featureKey",
          "featureId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "static"
            ]
          },
          "config": {
            "type": "string",
            "format": "json",
            "description": "The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.",
            "example": "{ \"integrations\": [\"github\"] }"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "The annotations of the entitlement.",
            "example": {
              "subscription.id": "sub_123"
            },
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Readonly unique ULID identifier.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "subjectKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The identifier key unique to the subject.\nNOTE: Subjects are being deprecated, please use the new customer APIs.",
            "example": "customer-1"
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "currentUsagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The current usage period."
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriod"
              }
            ],
            "description": "The defined usage period of the entitlement"
          }
        },
        "description": "A static entitlement."
      },
      "EntitlementStaticCreateInputs": {
        "type": "object",
        "required": [
          "type",
          "config"
        ],
        "properties": {
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.\nEither featureKey or featureId is required.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.\nEither featureKey or featureId is required.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodCreateInput"
              }
            ],
            "description": "The usage period associated with the entitlement."
          },
          "type": {
            "type": "string",
            "enum": [
              "static"
            ]
          },
          "config": {
            "type": "string",
            "format": "json",
            "description": "The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.",
            "example": "{ \"integrations\": [\"github\"] }"
          }
        },
        "description": "Create inputs for static entitlement"
      },
      "EntitlementStaticV2": {
        "type": "object",
        "required": [
          "type",
          "config",
          "createdAt",
          "updatedAt",
          "activeFrom",
          "id",
          "featureKey",
          "featureId",
          "customerId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "static"
            ]
          },
          "config": {
            "type": "string",
            "format": "json",
            "description": "The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.",
            "example": "{ \"integrations\": [\"github\"] }"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "The annotations of the entitlement.",
            "example": {
              "subscription.id": "sub_123"
            },
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Readonly unique ULID identifier.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the subject is entitled to use.",
            "example": "example-feature-key"
          },
          "featureId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The feature the subject is entitled to use.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "currentUsagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The current usage period."
          },
          "usagePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriod"
              }
            ],
            "description": "The defined usage period of the entitlement"
          },
          "customerKey": {
            "type": "string",
            "description": "The identifier key unique to the customer",
            "example": "customer-1"
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The identifier unique to the customer",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          }
        },
        "description": "A static entitlement."
      },
      "EntitlementType": {
        "type": "string",
        "enum": [
          "metered",
          "boolean",
          "static"
        ],
        "description": "Type of the entitlement.",
        "x-go-type": "string"
      },
      "EntitlementV2": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EntitlementMeteredV2"
          },
          {
            "$ref": "#/components/schemas/EntitlementStaticV2"
          },
          {
            "$ref": "#/components/schemas/EntitlementBooleanV2"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "metered": "#/components/schemas/EntitlementMeteredV2",
            "static": "#/components/schemas/EntitlementStaticV2",
            "boolean": "#/components/schemas/EntitlementBooleanV2"
          }
        },
        "description": "Entitlement templates are used to define the entitlements of a plan.\nFeatures are omitted from the entitlement template, as they are defined in the rate card."
      },
      "EntitlementV2CreateInputs": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EntitlementMeteredV2CreateInputs"
          },
          {
            "$ref": "#/components/schemas/EntitlementStaticCreateInputs"
          },
          {
            "$ref": "#/components/schemas/EntitlementBooleanCreateInputs"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "metered": "#/components/schemas/EntitlementMeteredV2CreateInputs",
            "static": "#/components/schemas/EntitlementStaticCreateInputs",
            "boolean": "#/components/schemas/EntitlementBooleanCreateInputs"
          }
        },
        "description": "Create inputs for entitlement"
      },
      "EntitlementV2PaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntitlementV2"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "EntitlementValue": {
        "type": "object",
        "required": [
          "hasAccess"
        ],
        "properties": {
          "hasAccess": {
            "type": "boolean",
            "description": "Whether the subject has access to the feature. Shared accross all entitlement types.",
            "example": true,
            "readOnly": true
          },
          "balance": {
            "type": "number",
            "format": "double",
            "description": "Only available for metered entitlements. Metered entitlements are built around a balance calculation where feature usage is deducted from the issued grants. Balance represents the remaining balance of the entitlement, it's value never turns negative.",
            "example": 100,
            "readOnly": true
          },
          "usage": {
            "type": "number",
            "format": "double",
            "description": "Only available for metered entitlements. Returns the total feature usage in the current period.",
            "example": 50,
            "readOnly": true
          },
          "overage": {
            "type": "number",
            "format": "double",
            "description": "Only available for metered entitlements. Overage represents the usage that wasn't covered by grants, e.g. if the subject had a total feature usage of 100 in the period but they were only granted 80, there would be 20 overage.",
            "example": 0,
            "readOnly": true
          },
          "config": {
            "type": "string",
            "description": "Only available for static entitlements. The JSON parsable config of the entitlement.",
            "example": "{ key: \"value\" }",
            "readOnly": true
          }
        },
        "description": "Entitlements are the core of Zuplo Metering access management. They define access to features for subjects. Entitlements can be metered, boolean, or static."
      },
      "ErrorExtension": {
        "type": "object",
        "required": [
          "field",
          "code",
          "message"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "The path to the field.",
            "example": "addons/pro/ratecards/token/featureKey",
            "readOnly": true
          },
          "code": {
            "type": "string",
            "description": "The machine readable description of the error.",
            "example": "invalid_feature_key",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "description": "The human readable description of the error.",
            "example": "not found feature by key",
            "readOnly": true
          }
        },
        "additionalProperties": {},
        "description": "Generic ErrorExtension as part of HTTPProblem.Extensions.[StatusCode]"
      },
      "Event": {
        "type": "object",
        "required": [
          "id",
          "source",
          "specversion",
          "type",
          "subject",
          "subscription"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Identifies the event.",
            "example": "5c10fade-1c9e-4d6c-8275-c52c36731d3c"
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "format": "uri-reference",
            "description": "Identifies the context in which an event happened.",
            "example": "service-name"
          },
          "specversion": {
            "type": "string",
            "minLength": 1,
            "description": "The version of the CloudEvents specification which the event uses.",
            "example": "1.0",
            "default": "1.0"
          },
          "type": {
            "type": "string",
            "minLength": 1,
            "description": "Contains a value describing the type of event related to the originating occurrence.",
            "example": "com.example.someevent"
          },
          "datacontenttype": {
            "type": "string",
            "enum": [
              "application/json"
            ],
            "nullable": true,
            "description": "Content type of the CloudEvents data value. Only the value \"application/json\" is allowed over HTTP.",
            "example": "application/json"
          },
          "dataschema": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "minLength": 1,
            "description": "Identifies the schema that data adheres to."
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "description": "Describes the subject of the event in the context of the event producer (identified by source).",
            "example": "customer-id"
          },
          "time": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the occurrence happened. Must adhere to RFC 3339.",
            "example": "2023-01-01T01:01:01.001Z",
            "nullable": true
          },
          "data": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "The event payload.\nOptional, if present it must be a JSON object."
          },
          "subscription": {
            "type": "string",
            "minLength": 1,
            "description": "The subscription ID this event belongs to.\nRequired extension field for event attribution to subscriptions.",
            "example": "01HZXABCD3M6E7K8J9PQRS1TUV"
          }
        },
        "description": "CloudEvents Specification JSON Schema\n\nOptional properties are nullable according to the CloudEvents specification:\nOPTIONAL not omitted attributes MAY be represented as a null JSON value.",
        "example": {
          "id": "5c10fade-1c9e-4d6c-8275-c52c36731d3c",
          "source": "service-name",
          "specversion": "1.0",
          "type": "prompt",
          "subject": "customer-id",
          "time": "2023-01-01T01:01:01.001Z",
          "subscription": "01HZXABCD3M6E7K8J9PQRS1TUV"
        },
        "x-go-type-import": {
          "path": "github.com/cloudevents/sdk-go/v2/event"
        },
        "x-go-type": "event.Event"
      },
      "EventDeliveryAttemptResponse": {
        "type": "object",
        "required": [
          "body",
          "durationMs"
        ],
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "Status code of the response if available.",
            "title": "Status Code",
            "readOnly": true
          },
          "body": {
            "type": "string",
            "description": "The body of the response.",
            "title": "Response Body",
            "readOnly": true
          },
          "durationMs": {
            "type": "integer",
            "description": "The duration of the response in milliseconds.",
            "title": "Response Duration",
            "readOnly": true
          },
          "url": {
            "type": "string",
            "description": "URL where the event was sent in case of notification channel with webhook type.",
            "title": "URL",
            "readOnly": true
          }
        },
        "description": "The response of the event delivery attempt."
      },
      "ExpirationDuration": {
        "type": "string",
        "enum": [
          "HOUR",
          "DAY",
          "WEEK",
          "MONTH",
          "YEAR"
        ],
        "description": "The expiration duration enum"
      },
      "ExpirationPeriod": {
        "type": "object",
        "required": [
          "duration",
          "count"
        ],
        "properties": {
          "duration": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExpirationDuration"
              }
            ],
            "description": "The unit of time for the expiration period."
          },
          "count": {
            "type": "integer",
            "format": "uint32",
            "minimum": 1,
            "maximum": 1000,
            "description": "The number of time units in the expiration period.",
            "example": 12
          }
        },
        "description": "The grant expiration definition"
      },
      "Feature": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "key",
          "name",
          "id"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was archived.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Archival Time",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A key is a unique string that is used to identify a resource.",
            "title": "The unique key of the feature"
          },
          "name": {
            "type": "string",
            "title": "The human-readable name of the feature"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "title": "Optional metadata",
            "example": {
              "key": "value"
            }
          },
          "meterSlug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A key is a unique string that is used to identify a resource.",
            "title": "Meter slug",
            "example": "tokens_total"
          },
          "meterGroupByFilters": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Optional meter group by filters.\nUseful if the meter scope is broader than what feature tracks.\nExample scenario would be a meter tracking all token use with groupBy fields for the model,\nthen the feature could filter for model=gpt-4.",
            "title": "Meter group by filters",
            "deprecated": true,
            "example": {
              "model": "gpt-4",
              "type": "input"
            }
          },
          "advancedMeterGroupByFilters": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/FilterString"
            },
            "description": "Optional advanced meter group by filters.\nYou can use this to filter for values of the meter groupBy fields.",
            "title": "Advanced meter group by filters",
            "example": {
              "model": {
                "$in": [
                  "gpt-4",
                  "gpt-4o"
                ]
              },
              "type": {
                "$eq": "input"
              }
            }
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Readonly unique ULID identifier.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "readOnly": true
          }
        },
        "description": "Represents a feature that can be enabled or disabled for a plan.\nUsed both for product catalog and entitlements."
      },
      "FeatureCreateInputs": {
        "type": "object",
        "required": [
          "key",
          "name"
        ],
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A key is a unique string that is used to identify a resource.",
            "title": "The unique key of the feature"
          },
          "name": {
            "type": "string",
            "title": "The human-readable name of the feature"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "title": "Optional metadata",
            "example": {
              "key": "value"
            }
          },
          "meterSlug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A key is a unique string that is used to identify a resource.",
            "title": "Meter slug",
            "example": "tokens_total"
          },
          "meterGroupByFilters": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Optional meter group by filters.\nUseful if the meter scope is broader than what feature tracks.\nExample scenario would be a meter tracking all token use with groupBy fields for the model,\nthen the feature could filter for model=gpt-4.",
            "title": "Meter group by filters",
            "deprecated": true,
            "example": {
              "model": "gpt-4",
              "type": "input"
            }
          },
          "advancedMeterGroupByFilters": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/FilterString"
            },
            "description": "Optional advanced meter group by filters.\nYou can use this to filter for values of the meter groupBy fields.",
            "title": "Advanced meter group by filters",
            "example": {
              "model": {
                "$in": [
                  "gpt-4",
                  "gpt-4o"
                ]
              },
              "type": {
                "$eq": "input"
              }
            }
          }
        },
        "description": "Represents a feature that can be enabled or disabled for a plan.\nUsed both for product catalog and entitlements."
      },
      "FeatureMeta": {
        "type": "object",
        "required": [
          "id",
          "key"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Unique identifier of a feature.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "title": "Feature Unique Identifier"
          },
          "key": {
            "type": "string",
            "description": "The key is an immutable unique identifier of the feature used throughout the API,\nfor example when interacting with a subject's entitlements.",
            "title": "Feature Key",
            "example": "gpt4_tokens"
          }
        },
        "description": "Limited representation of a feature resource which includes only its unique identifiers (id, key)."
      },
      "FeatureOrderBy": {
        "type": "string",
        "enum": [
          "id",
          "key",
          "name",
          "createdAt",
          "updatedAt"
        ],
        "description": "Order by options for features."
      },
      "FeaturePaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Feature"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "FilterBoolean": {
        "type": "object",
        "properties": {
          "$eq": {
            "type": "boolean",
            "nullable": true,
            "description": "The field must be equal to the provided value.",
            "x-omitempty": true
          }
        },
        "description": "A filter for a boolean field."
      },
      "FilterFloat": {
        "type": "object",
        "properties": {
          "$eq": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "The field must be equal to the provided value.",
            "x-omitempty": true
          },
          "$ne": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "The field must not be equal to the provided value.",
            "x-omitempty": true
          },
          "$gt": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "The field must be greater than the provided value.",
            "x-omitempty": true
          },
          "$gte": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "The field must be greater than or equal to the provided value.",
            "x-omitempty": true
          },
          "$lt": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "The field must be less than the provided value.",
            "x-omitempty": true
          },
          "$lte": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "The field must be less than or equal to the provided value.",
            "x-omitempty": true
          },
          "$and": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FilterFloat"
            },
            "nullable": true,
            "description": "Provide a list of filters to be combined with a logical AND.",
            "x-omitempty": true
          },
          "$or": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FilterFloat"
            },
            "nullable": true,
            "description": "Provide a list of filters to be combined with a logical OR.",
            "x-omitempty": true
          }
        },
        "description": "A filter for a float field."
      },
      "FilterIDExact": {
        "type": "object",
        "properties": {
          "$in": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            },
            "nullable": true,
            "description": "The field must be in the provided list of values.",
            "x-omitempty": true
          }
        },
        "description": "A filter for a ID (ULID) field allowing only equality or inclusion."
      },
      "FilterInteger": {
        "type": "object",
        "properties": {
          "$eq": {
            "type": "integer",
            "nullable": true,
            "description": "The field must be equal to the provided value.",
            "x-omitempty": true
          },
          "$ne": {
            "type": "integer",
            "nullable": true,
            "description": "The field must not be equal to the provided value.",
            "x-omitempty": true
          },
          "$gt": {
            "type": "integer",
            "nullable": true,
            "description": "The field must be greater than the provided value.",
            "x-omitempty": true
          },
          "$gte": {
            "type": "integer",
            "nullable": true,
            "description": "The field must be greater than or equal to the provided value.",
            "x-omitempty": true
          },
          "$lt": {
            "type": "integer",
            "nullable": true,
            "description": "The field must be less than the provided value.",
            "x-omitempty": true
          },
          "$lte": {
            "type": "integer",
            "nullable": true,
            "description": "The field must be less than or equal to the provided value.",
            "x-omitempty": true
          },
          "$and": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FilterInteger"
            },
            "nullable": true,
            "description": "Provide a list of filters to be combined with a logical AND.",
            "x-omitempty": true
          },
          "$or": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FilterInteger"
            },
            "nullable": true,
            "description": "Provide a list of filters to be combined with a logical OR.",
            "x-omitempty": true
          }
        },
        "description": "A filter for an integer field."
      },
      "FilterString": {
        "type": "object",
        "properties": {
          "$eq": {
            "type": "string",
            "nullable": true,
            "description": "The field must be equal to the provided value.",
            "x-omitempty": true
          },
          "$ne": {
            "type": "string",
            "nullable": true,
            "description": "The field must not be equal to the provided value.",
            "x-omitempty": true
          },
          "$in": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "description": "The field must be in the provided list of values.",
            "x-omitempty": true
          },
          "$nin": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "description": "The field must not be in the provided list of values.",
            "x-omitempty": true
          },
          "$like": {
            "type": "string",
            "nullable": true,
            "description": "The field must match the provided value.",
            "x-omitempty": true
          },
          "$nlike": {
            "type": "string",
            "nullable": true,
            "description": "The field must not match the provided value.",
            "x-omitempty": true
          },
          "$ilike": {
            "type": "string",
            "nullable": true,
            "description": "The field must match the provided value, ignoring case.",
            "x-omitempty": true
          },
          "$nilike": {
            "type": "string",
            "nullable": true,
            "description": "The field must not match the provided value, ignoring case.",
            "x-omitempty": true
          },
          "$gt": {
            "type": "string",
            "nullable": true,
            "description": "The field must be greater than the provided value.",
            "x-omitempty": true
          },
          "$gte": {
            "type": "string",
            "nullable": true,
            "description": "The field must be greater than or equal to the provided value.",
            "x-omitempty": true
          },
          "$lt": {
            "type": "string",
            "nullable": true,
            "description": "The field must be less than the provided value.",
            "x-omitempty": true
          },
          "$lte": {
            "type": "string",
            "nullable": true,
            "description": "The field must be less than or equal to the provided value.",
            "x-omitempty": true
          },
          "$and": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FilterString"
            },
            "nullable": true,
            "description": "Provide a list of filters to be combined with a logical AND.",
            "x-omitempty": true
          },
          "$or": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FilterString"
            },
            "nullable": true,
            "description": "Provide a list of filters to be combined with a logical OR.",
            "x-omitempty": true
          }
        },
        "description": "A filter for a string field."
      },
      "FilterTime": {
        "type": "object",
        "properties": {
          "$gt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The field must be greater than the provided value.",
            "x-omitempty": true
          },
          "$gte": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The field must be greater than or equal to the provided value.",
            "x-omitempty": true
          },
          "$lt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The field must be less than the provided value.",
            "x-omitempty": true
          },
          "$lte": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "The field must be less than or equal to the provided value.",
            "x-omitempty": true
          },
          "$and": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FilterTime"
            },
            "nullable": true,
            "description": "Provide a list of filters to be combined with a logical AND.",
            "x-omitempty": true
          },
          "$or": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FilterTime"
            },
            "nullable": true,
            "description": "Provide a list of filters to be combined with a logical OR.",
            "x-omitempty": true
          }
        },
        "description": "A filter for a time field."
      },
      "FlatPrice": {
        "type": "object",
        "required": [
          "type",
          "amount"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "flat"
            ],
            "description": "The type of the price."
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The amount of the flat price."
          }
        },
        "description": "Flat price."
      },
      "FlatPriceWithPaymentTerm": {
        "type": "object",
        "required": [
          "type",
          "amount"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "flat"
            ],
            "description": "The type of the price."
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The amount of the flat price."
          },
          "paymentTerm": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PricePaymentTerm"
              }
            ],
            "description": "The payment term of the flat price.\nDefaults to in advance.",
            "default": "in_advance"
          }
        },
        "description": "Flat price with payment term."
      },
      "ForbiddenProblemResponse": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnexpectedProblemResponse"
          }
        ],
        "description": "The server understood the request but refuses to authorize it."
      },
      "GatewayTimeoutProblemResponse": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnexpectedProblemResponse"
          }
        ],
        "description": "The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request."
      },
      "GrantBurnDownHistorySegment": {
        "type": "object",
        "required": [
          "period",
          "usage",
          "overage",
          "balanceAtStart",
          "grantBalancesAtStart",
          "balanceAtEnd",
          "grantBalancesAtEnd",
          "grantUsages"
        ],
        "properties": {
          "period": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The period of the segment."
          },
          "usage": {
            "type": "number",
            "format": "double",
            "description": "The total usage of the grant in the period.",
            "example": 100,
            "readOnly": true
          },
          "overage": {
            "type": "number",
            "format": "double",
            "description": "Overuse that wasn't covered by grants.",
            "example": 100,
            "readOnly": true
          },
          "balanceAtStart": {
            "type": "number",
            "format": "double",
            "description": "entitlement balance at the start of the period.",
            "example": 100,
            "readOnly": true
          },
          "grantBalancesAtStart": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            },
            "description": "The balance breakdown of each active grant at the start of the period: GrantID: Balance",
            "example": {
              "01G65Z755AFWAKHE12NY0CQ9FH": 100
            },
            "readOnly": true
          },
          "balanceAtEnd": {
            "type": "number",
            "format": "double",
            "description": "The entitlement balance at the end of the period.",
            "example": 100,
            "readOnly": true
          },
          "grantBalancesAtEnd": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            },
            "description": "The balance breakdown of each active grant at the end of the period: GrantID: Balance",
            "example": {
              "01G65Z755AFWAKHE12NY0CQ9FH": 100
            },
            "readOnly": true
          },
          "grantUsages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrantUsageRecord"
            },
            "description": "Which grants were actually burnt down in the period and by what amount.",
            "readOnly": true
          }
        },
        "description": "A segment of the grant burn down history.\n\nA given segment represents the usage of a grant between events that changed either the grant burn down priority order or the usag period."
      },
      "GrantOrderBy": {
        "type": "string",
        "enum": [
          "id",
          "createdAt",
          "updatedAt"
        ],
        "description": "Order by options for grants."
      },
      "GrantPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntitlementGrant"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "GrantUsageRecord": {
        "type": "object",
        "required": [
          "grantId",
          "usage"
        ],
        "properties": {
          "grantId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The id of the grant",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "usage": {
            "type": "number",
            "format": "double",
            "description": "The usage in the period",
            "example": 100
          }
        },
        "description": "Usage Record"
      },
      "GrantV2PaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntitlementGrantV2"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "IDResource": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          }
        },
        "description": "IDResource is a resouce with an ID."
      },
      "IngestEventsBody": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/Event"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          }
        ],
        "description": "The body of the events request.\nEither a single event or a batch of events."
      },
      "IngestedEvent": {
        "type": "object",
        "required": [
          "event",
          "ingestedAt",
          "storedAt"
        ],
        "properties": {
          "event": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Event"
              }
            ],
            "description": "The original event ingested."
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The customer ID if the event is associated with a customer.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "validationError": {
            "type": "string",
            "description": "The validation error if the event failed validation."
          },
          "ingestedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the event was ingested.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "storedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the event was stored.",
            "example": "2023-01-01T01:01:01.001Z"
          }
        },
        "description": "An ingested event with optional validation error.",
        "example": {
          "event": {
            "id": "5c10fade-1c9e-4d6c-8275-c52c36731d3c",
            "source": "service-name",
            "specversion": "1.0",
            "type": "prompt",
            "subject": "customer-id",
            "time": "2023-01-01T01:01:01.001Z",
            "subscription": "01HZXABCD3M6E7K8J9PQRS1TUV"
          },
          "ingestedAt": "2023-01-01T01:01:01.001Z",
          "storedAt": "2023-01-01T01:01:02.001Z"
        }
      },
      "IngestedEventCursorPaginatedResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestedEvent"
            },
            "maxItems": 100,
            "description": "The items in the response."
          },
          "nextCursor": {
            "type": "string",
            "description": "The cursor of the last item in the list."
          }
        },
        "description": "A response for cursor pagination."
      },
      "InstallMethod": {
        "type": "string",
        "enum": [
          "with_oauth2",
          "with_api_key",
          "no_credentials_required"
        ],
        "description": "Install method of the application."
      },
      "InternalServerErrorProblemResponse": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnexpectedProblemResponse"
          }
        ],
        "description": "The server encountered an unexpected condition that prevented it from fulfilling the request."
      },
      "Invoice": {
        "type": "object",
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "type",
          "supplier",
          "customer",
          "number",
          "currency",
          "totals",
          "status",
          "statusDetails",
          "workflow"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceType"
              }
            ],
            "description": "Type of the invoice.\n\nThe type of invoice determines the purpose of the invoice and how it should be handled.\n\nSupported types:\n- standard: A regular commercial invoice document between a supplier and customer.\n- credit_note: Reflects a refund either partial or complete of the preceding document. A credit note effectively *extends* the previous document.",
            "readOnly": true
          },
          "supplier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingParty"
              }
            ],
            "description": "The taxable entity supplying the goods or services."
          },
          "customer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingInvoiceCustomerExtendedDetails"
              }
            ],
            "description": "Legal entity receiving the goods or services."
          },
          "number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceNumber"
              }
            ],
            "description": "Number specifies the human readable key used to reference this Invoice.\n\nThe invoice number can change in the draft phases, as we are allocating temporary draft\ninvoice numbers, but it's final as soon as the invoice gets finalized (issued state).\n\nPlease note that the number is (depending on the upstream settings) either unique for the\nwhole organization or unique for the customer, or in multi (stripe) account setups unique for the\naccount.",
            "readOnly": true
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "Currency for all invoice line items.\n\nMulti currency invoices are not supported yet."
          },
          "preceding": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceDocumentRef"
            },
            "description": "Key information regarding previous invoices and potentially details as to why they were corrected.",
            "readOnly": true
          },
          "totals": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceTotals"
              }
            ],
            "description": "Summary of all the invoice totals, including taxes (calculated).",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceStatus"
              }
            ],
            "description": "The status of the invoice.\n\nThis field only conatins a simplified status, for more detailed information use the statusDetails field.",
            "readOnly": true
          },
          "statusDetails": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceStatusDetails"
              }
            ],
            "description": "The details of the current invoice status.",
            "readOnly": true
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time the invoice was issued.\n\nDepending on the status of the invoice this can mean multiple things:\n- draft, gathering: The time the invoice will be issued based on the workflow settings.\n- issued: The time the invoice was issued.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "draftUntil": {
            "type": "string",
            "format": "date-time",
            "description": "The time until the invoice is in draft status.\n\nOn draft invoice creation it is calculated from the workflow settings.\n\nIf manual approval is required, the draftUntil time is set.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "quantitySnapshotedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the quantity snapshots on the invoice lines were taken.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "collectionAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the invoice will be/has been collected.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "description": "Due time of the fulfillment of the invoice (if available).",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "period": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The period the invoice covers. If the invoice has no line items, it's not set."
          },
          "voidedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time the invoice was voided.\n\nIf the invoice was voided, this field will be set to the time the invoice was voided.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "sentToCustomerAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time the invoice was sent to customer.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "workflow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceWorkflowSettings"
              }
            ],
            "description": "The workflow associated with the invoice.\n\nIt is always a snapshot of the workflow settings at the time of invoice creation. The\nfield is optional as it should be explicitly requested with expand options."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLine"
            },
            "description": "List of invoice lines representing each of the items sold to the customer."
          },
          "payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoicePaymentTerms"
              }
            ],
            "description": "Information on when, how, and to whom the invoice should be paid.",
            "readOnly": true
          },
          "validationIssues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationIssue"
            },
            "description": "Validation issues reported by the invoice workflow.",
            "readOnly": true
          },
          "externalIds": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceAppExternalIds"
              }
            ],
            "description": "External IDs of the invoice in other apps such as Stripe.",
            "readOnly": true
          }
        },
        "description": "Invoice represents an invoice in the system."
      },
      "InvoiceAppExternalIds": {
        "type": "object",
        "properties": {
          "invoicing": {
            "type": "string",
            "description": "The external ID of the invoice in the invoicing app if available.",
            "readOnly": true
          },
          "tax": {
            "type": "string",
            "description": "The external ID of the invoice in the tax app if available.",
            "readOnly": true
          },
          "payment": {
            "type": "string",
            "description": "The external ID of the invoice in the payment app if available.",
            "readOnly": true
          }
        },
        "description": "InvoiceAppExternalIds contains the external IDs of the invoice in other apps such as Stripe."
      },
      "InvoiceAvailableActionDetails": {
        "type": "object",
        "required": [
          "resultingState"
        ],
        "properties": {
          "resultingState": {
            "type": "string",
            "description": "The state the invoice will reach if the action is activated and\nall intermediate steps are successful.\n\nFor example advancing a draft_created invoice will result in a draft_manual_approval_needed invoice.",
            "readOnly": true
          }
        },
        "description": "InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for\nnon-gathering invoices."
      },
      "InvoiceAvailableActionInvoiceDetails": {
        "type": "object",
        "description": "InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for\ngathering invoices."
      },
      "InvoiceAvailableActions": {
        "type": "object",
        "properties": {
          "advance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceAvailableActionDetails"
              }
            ],
            "description": "Advance the invoice to the next status.",
            "readOnly": true
          },
          "approve": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceAvailableActionDetails"
              }
            ],
            "description": "Approve an invoice that requires manual approval.",
            "readOnly": true
          },
          "delete": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceAvailableActionDetails"
              }
            ],
            "description": "Delete the invoice (only non-issued invoices can be deleted).",
            "readOnly": true
          },
          "retry": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceAvailableActionDetails"
              }
            ],
            "description": "Retry an invoice issuing step that failed.",
            "readOnly": true
          },
          "snapshotQuantities": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceAvailableActionDetails"
              }
            ],
            "description": "Snapshot quantities for usage based line items.",
            "readOnly": true
          },
          "void": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceAvailableActionDetails"
              }
            ],
            "description": "Void an already issued invoice.",
            "readOnly": true
          },
          "invoice": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceAvailableActionInvoiceDetails"
              }
            ],
            "description": "Invoice a gathering invoice",
            "readOnly": true
          }
        },
        "description": "InvoiceAvailableActions represents the actions that can be performed on the invoice."
      },
      "InvoiceDetailedLine": {
        "type": "object",
        "required": [
          "name",
          "createdAt",
          "updatedAt",
          "id",
          "managedBy",
          "status",
          "currency",
          "totals",
          "period",
          "invoiceAt",
          "type"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ID of the line.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "managedBy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineManagedBy"
              }
            ],
            "description": "managedBy specifies if the line is manually added via the api or managed by Zuplo Metering.",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineStatus"
              }
            ],
            "description": "Status of the line.\n\nExternal calls always create valid lines, other line types are managed by the\nbilling engine of Zuplo Metering.",
            "readOnly": true
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineDiscounts"
              }
            ],
            "description": "Discounts detailes applied to this line.\n\nNew discounts can be added via the invoice's discounts API, to facilitate\ndiscounts that are affecting multiple lines.",
            "readOnly": true
          },
          "invoice": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceReference"
              }
            ],
            "description": "The invoice this item belongs to."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency of this line."
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineTaxItem"
            },
            "description": "Taxes applied to the invoice totals.",
            "readOnly": true
          },
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "Tax config specify the tax configuration for this line.",
            "deprecated": true
          },
          "totals": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceTotals"
              }
            ],
            "description": "Totals for this line.",
            "readOnly": true
          },
          "period": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."
          },
          "externalIds": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineAppExternalIds"
              }
            ],
            "description": "External IDs of the invoice in other apps such as Stripe.",
            "readOnly": true
          },
          "subscription": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineSubscriptionReference"
              }
            ],
            "description": "Subscription are the references to the subscritpions that this line is related to.",
            "readOnly": true
          },
          "invoiceAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time this line item should be invoiced.",
            "example": "2023-01-01T01:01:01.001Z",
            "deprecated": true
          },
          "type": {
            "type": "string",
            "enum": [
              "flat_fee"
            ],
            "description": "Type of the line.",
            "deprecated": true,
            "readOnly": true
          },
          "perUnitAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "Price of the item being sold.",
            "deprecated": true
          },
          "paymentTerm": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PricePaymentTerm"
              }
            ],
            "description": "Payment term of the line.",
            "deprecated": true,
            "default": "in_advance"
          },
          "quantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "Quantity of the item being sold.",
            "deprecated": true
          },
          "rateCard": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceDetailedLineRateCard"
              }
            ],
            "description": "The rate card that is used for this line."
          },
          "category": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceDetailedLineCostCategory"
              }
            ],
            "description": "Category of the flat fee.",
            "default": "regular",
            "readOnly": true
          }
        },
        "description": "InvoiceDetailedLine represents a line item that is sold to the customer as a manually added fee."
      },
      "InvoiceDetailedLineCostCategory": {
        "type": "string",
        "enum": [
          "regular",
          "commitment"
        ],
        "description": "InvoiceDetailedLineCostCategory determines if the flat fee is a regular fee due to use due to a\ncommitment."
      },
      "InvoiceDetailedLineRateCard": {
        "type": "object",
        "required": [
          "price"
        ],
        "properties": {
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.",
            "title": "Tax config"
          },
          "price": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/FlatPriceWithPaymentTerm"
              }
            ],
            "nullable": true,
            "description": "The price of the rate card.\nWhen null, the feature or service is free.",
            "title": "Price",
            "example": {
              "type": "flat",
              "amount": "100",
              "paymentTerm": "in_arrears"
            }
          },
          "quantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "Quantity of the item being sold.\n\nDefault: 1"
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingDiscounts"
              }
            ],
            "description": "The discounts that are applied to the line."
          }
        },
        "description": "InvoiceDetailedLineRateCard represents the rate card (intent) for a flat fee line."
      },
      "InvoiceDiscountBase": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "reason"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ID of the charge or discount.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "readOnly": true
          },
          "reason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingDiscountReason"
              }
            ],
            "description": "Reason code.",
            "readOnly": true
          },
          "description": {
            "type": "string",
            "description": "Text description as to why the discount was applied.",
            "readOnly": true
          },
          "externalIds": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineAppExternalIds"
              }
            ],
            "description": "External IDs of the invoice in other apps such as Stripe.",
            "readOnly": true
          }
        },
        "description": "InvoiceDiscountBase represents a charge or discount that can be applied to a line or the entire invoice."
      },
      "InvoiceDocumentRef": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/CreditNoteOriginalInvoiceRef"
          }
        ],
        "description": "InvoiceDocumentRef is used to describe a reference to an existing document (invoice)."
      },
      "InvoiceDocumentRefType": {
        "type": "string",
        "enum": [
          "credit_note_original_invoice"
        ],
        "description": "InvoiceDocumentRefType defines the type of document that is being referenced."
      },
      "InvoiceExpand": {
        "type": "string",
        "enum": [
          "lines",
          "preceding",
          "workflow.apps"
        ],
        "description": "InvoiceExpand specifies the parts of the invoice to expand in the list output."
      },
      "InvoiceGenericDocumentRef": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceDocumentRefType"
              }
            ],
            "description": "Type of the document referenced.",
            "readOnly": true
          },
          "reason": {
            "type": "string",
            "description": "Human readable description on why this reference is here or needs to be used.",
            "readOnly": true
          },
          "description": {
            "type": "string",
            "description": "Additional details about the document.",
            "readOnly": true
          }
        },
        "description": "Omitted fields:\nperiod: Tax period in which the referred document had an effect required by some tax regimes and formats.\nstamps: Seals of approval from other organisations that may need to be listed.\next: \tExtensions for additional codes that may be required.",
        "title": "InvoiceGenericDocumentRef is used to describe an existing document or a specific part of it's contents."
      },
      "InvoiceLine": {
        "type": "object",
        "required": [
          "name",
          "createdAt",
          "updatedAt",
          "id",
          "managedBy",
          "status",
          "currency",
          "totals",
          "period",
          "invoiceAt",
          "type"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ID of the line.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "managedBy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineManagedBy"
              }
            ],
            "description": "managedBy specifies if the line is manually added via the api or managed by Zuplo Metering.",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineStatus"
              }
            ],
            "description": "Status of the line.\n\nExternal calls always create valid lines, other line types are managed by the\nbilling engine of Zuplo Metering.",
            "readOnly": true
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineDiscounts"
              }
            ],
            "description": "Discounts detailes applied to this line.\n\nNew discounts can be added via the invoice's discounts API, to facilitate\ndiscounts that are affecting multiple lines.",
            "readOnly": true
          },
          "invoice": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceReference"
              }
            ],
            "description": "The invoice this item belongs to."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency of this line."
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineTaxItem"
            },
            "description": "Taxes applied to the invoice totals.",
            "readOnly": true
          },
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "Tax config specify the tax configuration for this line.",
            "deprecated": true
          },
          "totals": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceTotals"
              }
            ],
            "description": "Totals for this line.",
            "readOnly": true
          },
          "period": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."
          },
          "invoiceAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time this line item should be invoiced.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "externalIds": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineAppExternalIds"
              }
            ],
            "description": "External IDs of the invoice in other apps such as Stripe.",
            "readOnly": true
          },
          "subscription": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineSubscriptionReference"
              }
            ],
            "description": "Subscription are the references to the subscritpions that this line is related to.",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "usage_based"
            ],
            "description": "Type of the line.",
            "deprecated": true,
            "readOnly": true
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateCardUsageBasedPrice"
              }
            ],
            "description": "Price of the usage-based item being sold.",
            "deprecated": true
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature that the usage is based on.",
            "deprecated": true
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceDetailedLine"
            },
            "description": "The lines detailing the item or service sold.",
            "readOnly": true
          },
          "rateCard": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceUsageBasedRateCard"
              }
            ],
            "description": "The rate card that is used for this line.\n\nThe rate card captures the intent of the price and discounts for the usage-based item."
          },
          "quantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The quantity of the item being sold.\n\nAny usage discounts applied previously are deducted from this quantity.",
            "readOnly": true
          },
          "meteredQuantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The quantity of the item that has been metered for the period before any discounts were applied.",
            "readOnly": true
          },
          "preLinePeriodQuantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The quantity of the item used before this line's period.\n\nIt is non-zero in case of progressive billing, when this shows how much of the usage was already billed.\n\nAny usage discounts applied previously are deducted from this quantity.",
            "readOnly": true
          },
          "meteredPreLinePeriodQuantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The metered quantity of the item used in before this line's period without any discounts applied.\n\nIt is non-zero in case of progressive billing, when this shows how much of the usage was already billed.",
            "readOnly": true
          }
        },
        "description": "InvoiceUsageBasedLine represents a line item that is sold to the customer based on usage."
      },
      "InvoiceLineAmountDiscount": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "reason",
          "amount"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ID of the charge or discount.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "readOnly": true
          },
          "reason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingDiscountReason"
              }
            ],
            "description": "Reason code.",
            "readOnly": true
          },
          "description": {
            "type": "string",
            "description": "Text description as to why the discount was applied.",
            "readOnly": true
          },
          "externalIds": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineAppExternalIds"
              }
            ],
            "description": "External IDs of the invoice in other apps such as Stripe.",
            "readOnly": true
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "Fixed discount amount to apply (calculated if percent present).",
            "title": "Amount in the currency of the invoice",
            "readOnly": true
          }
        },
        "description": "InvoiceLineAmountDiscount represents an amount deducted from the line, and will be applied before taxes."
      },
      "InvoiceLineAppExternalIds": {
        "type": "object",
        "properties": {
          "invoicing": {
            "type": "string",
            "description": "The external ID of the invoice in the invoicing app if available.",
            "readOnly": true
          },
          "tax": {
            "type": "string",
            "description": "The external ID of the invoice in the tax app if available.",
            "readOnly": true
          }
        },
        "description": "InvoiceLineAppExternalIds contains the external IDs of the invoice in other apps such as Stripe."
      },
      "InvoiceLineBase": {
        "type": "object",
        "required": [
          "name",
          "createdAt",
          "updatedAt",
          "id",
          "type",
          "managedBy",
          "status",
          "currency",
          "totals",
          "period",
          "invoiceAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ID of the line.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineTypes"
              }
            ],
            "description": "Type of the line.\n\nA line's type cannot be changed after creation.",
            "deprecated": true,
            "readOnly": true
          },
          "managedBy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineManagedBy"
              }
            ],
            "description": "managedBy specifies if the line is manually added via the api or managed by Zuplo Metering.",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineStatus"
              }
            ],
            "description": "Status of the line.\n\nExternal calls always create valid lines, other line types are managed by the\nbilling engine of Zuplo Metering.",
            "readOnly": true
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineDiscounts"
              }
            ],
            "description": "Discounts detailes applied to this line.\n\nNew discounts can be added via the invoice's discounts API, to facilitate\ndiscounts that are affecting multiple lines.",
            "readOnly": true
          },
          "invoice": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceReference"
              }
            ],
            "description": "The invoice this item belongs to."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency of this line."
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineTaxItem"
            },
            "description": "Taxes applied to the invoice totals.",
            "readOnly": true
          },
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "Tax config specify the tax configuration for this line.",
            "deprecated": true
          },
          "totals": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceTotals"
              }
            ],
            "description": "Totals for this line.",
            "readOnly": true
          },
          "period": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."
          },
          "invoiceAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time this line item should be invoiced.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "externalIds": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineAppExternalIds"
              }
            ],
            "description": "External IDs of the invoice in other apps such as Stripe.",
            "readOnly": true
          },
          "subscription": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineSubscriptionReference"
              }
            ],
            "description": "Subscription are the references to the subscritpions that this line is related to.",
            "readOnly": true
          }
        },
        "description": "InvoiceLine represents a single item or service sold to the customer.\n\nThis is a base class for all line types, and should not be used directly."
      },
      "InvoiceLineDiscounts": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineAmountDiscount"
            },
            "description": "Amount based discounts applied to the line.\n\nAmount based discounts are deduced from the total price of the line."
          },
          "usage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineUsageDiscount"
            },
            "description": "Usage based discounts applied to the line.\n\nUsage based discounts are deduced from the usage of the line before price calculations are applied."
          }
        },
        "description": "InvoiceLineDiscounts represents the discounts applied to the invoice line by type."
      },
      "InvoiceLineManagedBy": {
        "type": "string",
        "enum": [
          "subscription",
          "system",
          "manual"
        ],
        "description": "InvoiceLineManagedBy specifies who manages the line."
      },
      "InvoiceLineReplaceUpdate": {
        "type": "object",
        "required": [
          "name",
          "period",
          "invoiceAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "Tax config specify the tax configuration for this line.",
            "deprecated": true
          },
          "period": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."
          },
          "invoiceAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time this line item should be invoiced.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateCardUsageBasedPrice"
              }
            ],
            "description": "Price of the usage-based item being sold.",
            "deprecated": true
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature that the usage is based on.",
            "deprecated": true
          },
          "rateCard": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceUsageBasedRateCard"
              }
            ],
            "description": "The rate card that is used for this line.\n\nThe rate card captures the intent of the price and discounts for the usage-based item."
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The ID of the line.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "InvoiceLineReplaceUpdate represents the update model for an UBP invoice line.\n\nThis type makes ID optional to allow for creating new lines as part of the update."
      },
      "InvoiceLineStatus": {
        "type": "string",
        "enum": [
          "valid",
          "detailed",
          "split"
        ],
        "description": "Line status specifies the status of the line."
      },
      "InvoiceLineSubscriptionReference": {
        "type": "object",
        "required": [
          "subscription",
          "phase",
          "item",
          "billingPeriod"
        ],
        "properties": {
          "subscription": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IDResource"
              }
            ],
            "description": "The subscription.",
            "readOnly": true
          },
          "phase": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IDResource"
              }
            ],
            "description": "The phase of the subscription.",
            "readOnly": true
          },
          "item": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IDResource"
              }
            ],
            "description": "The item this line is related to.",
            "readOnly": true
          },
          "billingPeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The billing period of the subscription. In case the subscription item's billing period is different\nfrom the subscription's billing period, this field will contain the billing period of the subscription itself.\n\nFor example, in case of:\n- A monthly billed subscription anchored to 2025-01-01\n- A subscription item billed daily\n\nAn example line would have the period of 2025-01-02 to 2025-01-03 as the item is billed daily, but the subscription's billing period\nwill be 2025-01-01 to 2025-01-31.",
            "readOnly": true
          }
        },
        "description": "InvoiceLineSubscriptionReference contains the references to the subscription that this line is related to."
      },
      "InvoiceLineTaxBehavior": {
        "type": "string",
        "enum": [
          "inclusive",
          "exclusive"
        ],
        "description": "InvoiceLineTaxBehavior details how the tax item is applied to the base amount.\n\nInclusive means the tax is included in the base amount.\nExclusive means the tax is added to the base amount."
      },
      "InvoiceLineTaxItem": {
        "type": "object",
        "properties": {
          "config": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "Tax provider configuration.",
            "readOnly": true
          },
          "percent": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Percentage"
              }
            ],
            "description": "Percent defines the percentage set manually or determined from\nthe rate key (calculated if rate present). A nil percent implies that\nthis tax combo is **exempt** from tax.\")",
            "readOnly": true
          },
          "surcharge": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "Some countries require an additional surcharge (calculated if rate present).",
            "readOnly": true
          },
          "behavior": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineTaxBehavior"
              }
            ],
            "description": "Is the tax item inclusive or exclusive of the base amount.",
            "readOnly": true
          }
        },
        "description": "TaxConfig stores the configuration for a tax line relative to an invoice line."
      },
      "InvoiceLineTypes": {
        "type": "string",
        "enum": [
          "flat_fee",
          "usage_based"
        ],
        "description": "LineTypes represents the different types of lines that can be used in an invoice.",
        "deprecated": true
      },
      "InvoiceLineUsageDiscount": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "reason",
          "quantity"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ID of the charge or discount.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "readOnly": true
          },
          "reason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingDiscountReason"
              }
            ],
            "description": "Reason code.",
            "readOnly": true
          },
          "description": {
            "type": "string",
            "description": "Text description as to why the discount was applied.",
            "readOnly": true
          },
          "externalIds": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceLineAppExternalIds"
              }
            ],
            "description": "External IDs of the invoice in other apps such as Stripe.",
            "readOnly": true
          },
          "quantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The usage to apply.",
            "title": "Usage quantity in the unit of the underlying meter",
            "readOnly": true
          },
          "preLinePeriodQuantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The usage discount already applied to the previous split lines.\n\nOnly set if progressive billing is enabled and the line is a split line.",
            "title": "Usage quantity in the unit of the underlying meter",
            "readOnly": true
          }
        },
        "description": "InvoiceLineUsageDiscount represents an usage-based discount applied to the line.\n\nThe deduction is done before the pricing algorithm is applied."
      },
      "InvoiceNumber": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256,
        "description": "InvoiceNumber is a unique identifier for the invoice, generated by the\ninvoicing app.\n\nThe uniqueness depends on a lot of factors:\n- app setting (unique per app or unique per customer)\n- multiple app scenarios (multiple apps generating invoices with the same prefix)",
        "example": "INV-2024-01-01-01"
      },
      "InvoiceOrderBy": {
        "type": "string",
        "enum": [
          "customer.name",
          "issuedAt",
          "status",
          "createdAt",
          "updatedAt",
          "periodStart"
        ],
        "description": "InvoiceOrderBy specifies the ordering options for invoice listing."
      },
      "InvoicePaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "InvoicePaymentTerms": {
        "type": "object",
        "properties": {
          "terms": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentTerms"
              }
            ],
            "description": "The terms of payment for the invoice."
          }
        },
        "description": "Payment contains details as to how the invoice should be paid."
      },
      "InvoicePendingLineCreate": {
        "type": "object",
        "required": [
          "name",
          "period",
          "invoiceAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "Tax config specify the tax configuration for this line.",
            "deprecated": true
          },
          "period": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."
          },
          "invoiceAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time this line item should be invoiced.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateCardUsageBasedPrice"
              }
            ],
            "description": "Price of the usage-based item being sold.",
            "deprecated": true
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature that the usage is based on.",
            "deprecated": true
          },
          "rateCard": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceUsageBasedRateCard"
              }
            ],
            "description": "The rate card that is used for this line.\n\nThe rate card captures the intent of the price and discounts for the usage-based item."
          }
        },
        "description": "InvoicePendingLineCreate represents the create model for an invoice line that is sold to the customer based on usage."
      },
      "InvoicePendingLineCreateInput": {
        "type": "object",
        "required": [
          "currency",
          "lines"
        ],
        "properties": {
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency of the lines to be created."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoicePendingLineCreate"
            },
            "minItems": 1,
            "description": "The lines to be created."
          }
        },
        "description": "InvoicePendingLineCreate represents the create model for a pending invoice line."
      },
      "InvoicePendingLineCreateResponse": {
        "type": "object",
        "required": [
          "lines",
          "invoice",
          "isInvoiceNew"
        ],
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLine"
            },
            "description": "The lines that were created.",
            "readOnly": true
          },
          "invoice": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Invoice"
              }
            ],
            "description": "The invoice containing the created lines.",
            "readOnly": true
          },
          "isInvoiceNew": {
            "type": "boolean",
            "description": "Whether the invoice was newly created.",
            "readOnly": true
          }
        },
        "description": "InvoicePendingLineCreateResponse represents the response from the create pending line endpoint."
      },
      "InvoicePendingLinesActionFiltersInput": {
        "type": "object",
        "properties": {
          "lineIds": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            },
            "description": "The pending line items to include in the invoice, if not provided:\n- all line items that have invoice_at < asOf will be included\n- [progressive billing only] all usage based line items will be included up to asOf, new\nusage-based line items will be staged for the rest of the billing cycle\n\nAll lineIDs present in the list, must exists and must be invoicable as of asOf, or the action will fail."
          }
        },
        "description": "InvoicePendingLinesActionFiltersInput specifies which lines to include in the invoice."
      },
      "InvoicePendingLinesActionInput": {
        "type": "object",
        "required": [
          "customerId"
        ],
        "properties": {
          "filters": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoicePendingLinesActionFiltersInput"
              }
            ],
            "description": "Filters to apply when creating the invoice."
          },
          "asOf": {
            "type": "string",
            "format": "date-time",
            "description": "The time as of which the invoice is created.\n\nIf not provided, the current time is used.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The customer ID for which to create the invoice.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "progressiveBillingOverride": {
            "type": "boolean",
            "description": "Override the progressive billing setting of the customer.\n\nCan be used to disable/enable progressive billing in case the business logic\nrequires it, if not provided the billing profile's progressive billing setting will be used."
          }
        },
        "description": "BillingInvoiceActionInput is the input for creating an invoice.\n\nInvoice creation is always based on already pending line items created by the billingCreateLineByCustomer\noperation. Empty invoices are not allowed."
      },
      "InvoiceReference": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The ID of the invoice.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "readOnly": true
          },
          "number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceNumber"
              }
            ],
            "description": "The number of the invoice.",
            "readOnly": true
          }
        },
        "description": "Reference to an invoice."
      },
      "InvoiceReplaceUpdate": {
        "type": "object",
        "required": [
          "supplier",
          "customer",
          "lines",
          "workflow"
        ],
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "supplier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingPartyReplaceUpdate"
              }
            ],
            "description": "The supplier of the lines included in the invoice."
          },
          "customer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingPartyReplaceUpdate"
              }
            ],
            "description": "The customer the invoice is sent to."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineReplaceUpdate"
            },
            "description": "The lines included in the invoice."
          },
          "workflow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceWorkflowReplaceUpdate"
              }
            ],
            "description": "The workflow settings for the invoice."
          }
        },
        "description": "InvoiceReplaceUpdate represents the update model for an invoice."
      },
      "InvoiceSimulationInput": {
        "type": "object",
        "required": [
          "currency",
          "lines"
        ],
        "properties": {
          "number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceNumber"
              }
            ],
            "description": "The number of the invoice."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "Currency for all invoice line items.\n\nMulti currency invoices are not supported yet."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceSimulationLine"
            },
            "description": "Lines to be included in the generated invoice."
          }
        },
        "description": "InvoiceSimulationInput is the input for simulating an invoice."
      },
      "InvoiceSimulationLine": {
        "type": "object",
        "required": [
          "name",
          "period",
          "invoiceAt",
          "quantity"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "Tax config specify the tax configuration for this line.",
            "deprecated": true
          },
          "period": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."
          },
          "invoiceAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time this line item should be invoiced.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateCardUsageBasedPrice"
              }
            ],
            "description": "Price of the usage-based item being sold.",
            "deprecated": true
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature that the usage is based on.",
            "deprecated": true
          },
          "rateCard": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceUsageBasedRateCard"
              }
            ],
            "description": "The rate card that is used for this line.\n\nThe rate card captures the intent of the price and discounts for the usage-based item."
          },
          "quantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The quantity of the item being sold."
          },
          "preLinePeriodQuantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The quantity of the item used before this line's period, if the line is billed progressively."
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ID of the line. If not specified it will be auto-generated.\n\nWhen discounts are specified, this must be provided, so that the discount can reference it.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "description": "InvoiceSimulationLine represents a usage-based line item that can be input to the simulation endpoint."
      },
      "InvoiceStatus": {
        "type": "string",
        "enum": [
          "gathering",
          "draft",
          "issuing",
          "issued",
          "payment_processing",
          "overdue",
          "paid",
          "uncollectible",
          "voided"
        ],
        "description": "InvoiceStatus describes the status of an invoice."
      },
      "InvoiceStatusDetails": {
        "type": "object",
        "required": [
          "immutable",
          "failed",
          "extendedStatus",
          "availableActions"
        ],
        "properties": {
          "immutable": {
            "type": "boolean",
            "description": "Is the invoice editable?",
            "readOnly": true
          },
          "failed": {
            "type": "boolean",
            "description": "Is the invoice in a failed state?",
            "readOnly": true
          },
          "extendedStatus": {
            "type": "string",
            "description": "Extended status information for the invoice.",
            "readOnly": true
          },
          "availableActions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceAvailableActions"
              }
            ],
            "description": "The actions that can be performed on the invoice."
          }
        },
        "description": "InvoiceStatusDetails represents the details of the invoice status.\n\nAPI users are encouraged to rely on the immutable/failed/avaliableActions fields to determine\nthe next steps of the invoice instead of the extendedStatus field."
      },
      "InvoiceTotals": {
        "type": "object",
        "required": [
          "amount",
          "chargesTotal",
          "discountsTotal",
          "taxesInclusiveTotal",
          "taxesExclusiveTotal",
          "taxesTotal",
          "total"
        ],
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The total value of the line before taxes, discounts and commitments.",
            "readOnly": true
          },
          "chargesTotal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The amount of value of the line that are due to additional charges.",
            "readOnly": true
          },
          "discountsTotal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The amount of value of the line that are due to discounts.",
            "readOnly": true
          },
          "taxesInclusiveTotal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The total amount of taxes that are included in the line.",
            "readOnly": true
          },
          "taxesExclusiveTotal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The total amount of taxes that are added on top of amount from the line.",
            "readOnly": true
          },
          "taxesTotal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The total amount of taxes for this line.",
            "readOnly": true
          },
          "total": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The total amount value of the line after taxes, discounts and commitments.",
            "readOnly": true
          }
        },
        "description": "Totals contains the summaries of all calculations for the invoice."
      },
      "InvoiceType": {
        "type": "string",
        "enum": [
          "standard",
          "credit_note"
        ],
        "description": "InvoiceType represents the type of invoice.\n\nThe type of invoice determines the purpose of the invoice and how it should be handled."
      },
      "InvoiceUsageBasedRateCard": {
        "type": "object",
        "required": [
          "price"
        ],
        "properties": {
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the customer is entitled to use.",
            "title": "Feature key"
          },
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.",
            "title": "Tax config"
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateCardUsageBasedPrice"
              }
            ],
            "nullable": true,
            "description": "The price of the rate card.\nWhen null, the feature or service is free."
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingDiscounts"
              }
            ],
            "description": "The discounts that are applied to the line."
          }
        },
        "description": "InvoiceUsageBasedRateCard represents the rate card (intent) for an usage-based line."
      },
      "InvoiceWorkflowInvoicingSettingsReplaceUpdate": {
        "type": "object",
        "properties": {
          "autoAdvance": {
            "type": "boolean",
            "description": "Whether to automatically issue the invoice after the draftPeriod has passed.",
            "default": true
          },
          "draftPeriod": {
            "type": "string",
            "format": "ISO8601",
            "description": "The period for the invoice to be kept in draft status for manual reviews.",
            "example": "P1D",
            "default": "P0D"
          },
          "dueAfter": {
            "type": "string",
            "format": "ISO8601",
            "description": "The period after which the invoice is due.\nWith some payment solutions it's only applicable for manual collection method.",
            "example": "P30D",
            "default": "P30D"
          },
          "defaultTaxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "Default tax configuration to apply to the invoices."
          }
        },
        "description": "InvoiceWorkflowInvoicingSettingsReplaceUpdate represents the update model for the invoicing settings of an invoice workflow."
      },
      "InvoiceWorkflowReplaceUpdate": {
        "type": "object",
        "required": [
          "workflow"
        ],
        "properties": {
          "workflow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceWorkflowSettingsReplaceUpdate"
              }
            ],
            "description": "The workflow used for this invoice."
          }
        },
        "description": "InvoiceWorkflowReplaceUpdate represents the update model for an invoice workflow.\n\nFields that are immutable a re removed from the model. This is based on InvoiceWorkflowSettings."
      },
      "InvoiceWorkflowSettings": {
        "type": "object",
        "required": [
          "sourceBillingProfileId",
          "workflow"
        ],
        "properties": {
          "apps": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingProfileAppsOrReference"
              }
            ],
            "description": "The apps that will be used to orchestrate the invoice's workflow.",
            "readOnly": true
          },
          "sourceBillingProfileId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "sourceBillingProfileID is the billing profile on which the workflow was based on.\n\nThe profile is snapshotted on invoice creation, after which it can be altered independently\nof the profile itself.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "readOnly": true
          },
          "workflow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflow"
              }
            ],
            "description": "The workflow details used by this invoice."
          }
        },
        "description": "InvoiceWorkflowSettings represents the workflow settings used by the invoice.\n\nThis is a clone of the billing profile's workflow settings at the time of invoice creation\nwith customer overrides considered."
      },
      "InvoiceWorkflowSettingsReplaceUpdate": {
        "type": "object",
        "required": [
          "invoicing",
          "payment"
        ],
        "properties": {
          "invoicing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceWorkflowInvoicingSettingsReplaceUpdate"
              }
            ],
            "description": "The invoicing settings for this workflow"
          },
          "payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BillingWorkflowPaymentSettings"
              }
            ],
            "description": "The payment settings for this workflow"
          }
        },
        "description": "Mutable workflow settings for an invoice.\n\nOther fields on the invoice's workflow are not mutable, they serve as a history of the invoice's workflow\nat creation time."
      },
      "IssueAfterReset": {
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "The initial grant amount",
            "title": "Initial grant amount"
          },
          "priority": {
            "type": "integer",
            "format": "uint8",
            "minimum": 1,
            "maximum": 255,
            "description": "The priority of the issue after reset",
            "title": "Issue grant after reset priority",
            "default": 1
          }
        },
        "description": "Issue after reset"
      },
      "ListAppsRequest": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page index.\n\nDefault is 1.",
            "example": 1,
            "default": 1
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "The maximum number of items per page.\n\nDefault is 100.",
            "example": 100,
            "default": 100
          }
        },
        "description": "Query params for listing installed apps"
      },
      "ListEntitlementsResult": {
        "oneOf": [
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Entitlement"
            }
          },
          {
            "$ref": "#/components/schemas/EntitlementPaginatedResponse"
          }
        ],
        "description": "List entitlements result"
      },
      "ListFeaturesResult": {
        "oneOf": [
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Feature"
            }
          },
          {
            "$ref": "#/components/schemas/FeaturePaginatedResponse"
          }
        ],
        "description": "List features result"
      },
      "MarketplaceInstallRequestPayload": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the application to install.\n\nIf name is not provided defaults to the marketplace listing's name."
          },
          "createBillingProfile": {
            "type": "boolean",
            "description": "If true, a billing profile will be created for the app.\nThe Stripe app will be also set as the default billing profile if the current default is a Sandbox app.",
            "default": true
          }
        },
        "description": "Marketplace install request payload."
      },
      "MarketplaceInstallResponse": {
        "type": "object",
        "required": [
          "app",
          "defaultForCapabilityTypes"
        ],
        "properties": {
          "app": {
            "$ref": "#/components/schemas/App"
          },
          "defaultForCapabilityTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppCapabilityType"
            },
            "description": "Default for capabilities"
          }
        },
        "description": "Marketplace install response."
      },
      "MarketplaceListing": {
        "type": "object",
        "required": [
          "type",
          "name",
          "description",
          "capabilities",
          "installMethods"
        ],
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppType"
              }
            ],
            "description": "The app's type"
          },
          "name": {
            "type": "string",
            "description": "The app's name."
          },
          "description": {
            "type": "string",
            "description": "The app's description."
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppCapability"
            },
            "description": "The app's capabilities."
          },
          "installMethods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstallMethod"
            },
            "description": "Install methods.\n\nList of methods to install the app."
          }
        },
        "description": "A marketplace listing.\nRepresent an available app in the app marketplace that can be installed to the organization.\n\nMarketplace apps only exist in config so they don't extend the Resource model.",
        "example": {
          "type": "stripe",
          "name": "Stripe",
          "description": "Stripe interation allows you to collect payments with Stripe.",
          "capabilities": [
            {
              "type": "calculateTax",
              "key": "stripe_calculate_tax",
              "name": "Calculate Tax",
              "description": "Stripe Tax calculates tax portion of the invoices."
            },
            {
              "type": "invoiceCustomers",
              "key": "stripe_invoice_customers",
              "name": "Invoice Customers",
              "description": "Stripe invoices customers with due amount."
            },
            {
              "type": "collectPayments",
              "key": "stripe_collect_payments",
              "name": "Collect Payments",
              "description": "Stripe payments collects outstanding revenue with Stripe customer's default payment method."
            }
          ],
          "installMethods": [
            "with_oauth2",
            "with_api_key"
          ]
        }
      },
      "MarketplaceListingPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketplaceListing"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "MeasureUsageFrom": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/MeasureUsageFromPreset"
          },
          {
            "$ref": "#/components/schemas/MeasureUsageFromTime"
          }
        ],
        "description": "Measure usage from"
      },
      "MeasureUsageFromPreset": {
        "type": "string",
        "enum": [
          "CURRENT_PERIOD_START",
          "NOW"
        ],
        "description": "Start of measurement options",
        "x-enum-varnames": [
          "CurrentPeriodStart",
          "Now"
        ]
      },
      "MeasureUsageFromTime": {
        "type": "string",
        "format": "date-time",
        "description": "[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.",
        "example": "2023-01-01T01:01:01.001Z"
      },
      "Metadata": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "Set of key-value pairs.\nMetadata can be used to store additional information about a resource.",
        "example": {
          "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
        },
        "x-go-type": "map[string]string"
      },
      "Meter": {
        "type": "object",
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "slug",
          "aggregation",
          "eventType"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.",
            "title": "Display name"
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A unique, human-readable identifier for the meter.\nMust consist only alphanumeric and underscore characters.",
            "example": "tokens_total"
          },
          "aggregation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeterAggregation"
              }
            ],
            "description": "The aggregation type to use for the meter.",
            "example": "SUM"
          },
          "eventType": {
            "type": "string",
            "minLength": 1,
            "description": "The event type to aggregate.",
            "example": "prompt"
          },
          "eventFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The date since the meter should include events.\nUseful to skip old events.\nIf not specified, all historical events are included.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "valueProperty": {
            "type": "string",
            "minLength": 1,
            "description": "JSONPath expression to extract the value from the ingested event's data property.\n\nThe ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.\n\nFor UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.",
            "example": "$.tokens"
          },
          "groupBy": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Named JSONPath expressions to extract the group by values from the event data.\n\nKeys must be unique and consist only alphanumeric and underscore characters.",
            "example": {
              "type": "$.type"
            }
          }
        },
        "description": "A meter is a configuration that defines how to match and aggregate events.",
        "example": {
          "id": "01G65Z755AFWAKHE12NY0CQ9FH",
          "slug": "tokens_total",
          "name": "Tokens Total",
          "description": "AI Token Usage",
          "aggregation": "SUM",
          "eventType": "prompt",
          "valueProperty": "$.tokens",
          "groupBy": {
            "model": "$.model",
            "type": "$.type"
          },
          "createdAt": "2024-01-01T01:01:01.001Z",
          "updatedAt": "2024-01-01T01:01:01.001Z"
        }
      },
      "MeterAggregation": {
        "type": "string",
        "enum": [
          "SUM",
          "COUNT",
          "UNIQUE_COUNT",
          "AVG",
          "MIN",
          "MAX",
          "LATEST"
        ],
        "description": "The aggregation type to use for the meter.",
        "x-enum-varnames": [
          "Sum",
          "Count",
          "UniqueCount",
          "Avg",
          "Min",
          "Max",
          "Latest"
        ]
      },
      "MeterCreate": {
        "type": "object",
        "required": [
          "slug",
          "aggregation",
          "eventType"
        ],
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.",
            "title": "Display name"
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A unique, human-readable identifier for the meter.\nMust consist only alphanumeric and underscore characters.",
            "example": "tokens_total"
          },
          "aggregation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeterAggregation"
              }
            ],
            "description": "The aggregation type to use for the meter.",
            "example": "SUM"
          },
          "eventType": {
            "type": "string",
            "minLength": 1,
            "description": "The event type to aggregate.",
            "example": "prompt"
          },
          "eventFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The date since the meter should include events.\nUseful to skip old events.\nIf not specified, all historical events are included.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "valueProperty": {
            "type": "string",
            "minLength": 1,
            "description": "JSONPath expression to extract the value from the ingested event's data property.\n\nThe ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.\n\nFor UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.",
            "example": "$.tokens"
          },
          "groupBy": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Named JSONPath expressions to extract the group by values from the event data.\n\nKeys must be unique and consist only alphanumeric and underscore characters.",
            "example": {
              "type": "$.type"
            }
          }
        },
        "description": "A meter create model.",
        "example": {
          "slug": "tokens_total",
          "name": "Tokens Total",
          "description": "AI Token Usage",
          "aggregation": "SUM",
          "eventType": "prompt",
          "valueProperty": "$.tokens",
          "groupBy": {
            "model": "$.model",
            "type": "$.type"
          }
        }
      },
      "MeterOrderBy": {
        "type": "string",
        "enum": [
          "key",
          "name",
          "aggregation",
          "createdAt",
          "updatedAt"
        ],
        "description": "Order by options for meters."
      },
      "MeterQueryRequest": {
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 36,
            "description": "Client ID\nUseful to track progress of a query.",
            "example": "f74e58ed-94ce-4041-ae06-cf45420451a3"
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Start date-time in RFC 3339 format.\n\nInclusive.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "End date-time in RFC 3339 format.\n\nInclusive.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "windowSize": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WindowSize"
              }
            ],
            "description": "If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.",
            "example": "DAY"
          },
          "windowTimeZone": {
            "type": "string",
            "description": "The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).\nIf not specified, the UTC timezone will be used.",
            "example": "UTC",
            "default": "UTC"
          },
          "subject": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "description": "Filtering by multiple subjects.",
            "example": [
              "subject-1",
              "subject-2"
            ]
          },
          "filterCustomerId": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "description": "Filtering by multiple customers.",
            "example": [
              "id-1",
              "id-2"
            ]
          },
          "filterSubscription": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "description": "Filtering by multiple subscriptions.",
            "example": [
              "subscription-1",
              "subscription-2"
            ]
          },
          "filterGroupBy": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Simple filter for group bys with exact match.",
            "example": {
              "model": [
                "gpt-4-turbo",
                "gpt-4o"
              ],
              "type": [
                "prompt"
              ]
            }
          },
          "advancedMeterGroupByFilters": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/FilterString"
            },
            "description": "Optional advanced meter group by filters.\nYou can use this to filter for values of the meter groupBy fields.",
            "example": {
              "model": {
                "$in": [
                  "gpt-4",
                  "gpt-4o"
                ]
              },
              "type": {
                "$eq": "input"
              }
            }
          },
          "groupBy": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "description": "If not specified a single aggregate will be returned for each subject and time window.\n`subject` is a reserved group by value.",
            "example": [
              "model",
              "type"
            ]
          }
        },
        "description": "A meter query request."
      },
      "MeterQueryResult": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "The start of the period the usage is queried from.\nIf not specified, the usage is queried from the beginning of time.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "The end of the period the usage is queried to.\nIf not specified, the usage is queried up to the current time.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "windowSize": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WindowSize"
              }
            ],
            "description": "The window size that the usage is aggregated.\nIf not specified, the usage is aggregated over the entire period."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeterQueryRow"
            },
            "description": "The usage data.\nIf no data is available, an empty array is returned."
          }
        },
        "description": "The result of a meter query.",
        "example": {
          "from": "2023-01-01T00:00:00Z",
          "to": "2023-01-02T00:00:00Z",
          "windowSize": "DAY",
          "data": [
            {
              "value": 12,
              "windowStart": "2023-01-01T00:00:00Z",
              "windowEnd": "2023-01-02T00:00:00Z",
              "subject": "customer-1",
              "groupBy": {
                "model": "gpt-4-turbo",
                "type": "prompt"
              }
            }
          ]
        }
      },
      "MeterQueryRow": {
        "type": "object",
        "required": [
          "value",
          "windowStart",
          "windowEnd",
          "subject",
          "groupBy"
        ],
        "properties": {
          "value": {
            "type": "number",
            "format": "double",
            "description": "The aggregated value."
          },
          "windowStart": {
            "type": "string",
            "format": "date-time",
            "description": "The start of the window the value is aggregated over.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "windowEnd": {
            "type": "string",
            "format": "date-time",
            "description": "The end of the window the value is aggregated over.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "subject": {
            "type": "string",
            "nullable": true,
            "description": "The subject the value is aggregated over.\nIf not specified, the value is aggregated over all subjects."
          },
          "customerId": {
            "type": "string",
            "description": "The customer ID the value is aggregated over."
          },
          "groupBy": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "The group by values the value is aggregated over."
          }
        },
        "description": "A row in the result of a meter query.",
        "example": {
          "value": 12,
          "windowStart": "2023-01-01T00:00:00Z",
          "windowEnd": "2023-01-02T00:00:00Z",
          "subject": "customer-1",
          "groupBy": {
            "model": "gpt-4-turbo",
            "type": "prompt"
          }
        }
      },
      "MeterUpdate": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.",
            "title": "Display name"
          },
          "groupBy": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Named JSONPath expressions to extract the group by values from the event data.\n\nKeys must be unique and consist only alphanumeric and underscore characters.",
            "example": {
              "type": "$.type"
            }
          }
        },
        "description": "A meter update model.\n\nOnly the properties that can be updated are included.\nFor example, the slug and aggregation cannot be updated.",
        "example": {
          "name": "Tokens Total",
          "description": "AI Token Usage",
          "groupBy": {
            "model": "$.model",
            "type": "$.type"
          }
        }
      },
      "NotFoundProblemResponse": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnexpectedProblemResponse"
          }
        ],
        "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."
      },
      "NotImplementedProblemResponse": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnexpectedProblemResponse"
          }
        ],
        "description": "The server does not support the functionality required to fulfill the request."
      },
      "NotificationChannel": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/NotificationChannelWebhook"
          }
        ],
        "description": "Notification channel."
      },
      "NotificationChannelCreateRequest": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/NotificationChannelWebhookCreateRequest"
          }
        ],
        "description": "Union type for requests creating new notification channel with certain type."
      },
      "NotificationChannelMeta": {
        "type": "object",
        "required": [
          "id",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Identifies the notification channel.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "title": "Channel Unique Identifier",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationChannelType"
              }
            ],
            "description": "Notification channel type.",
            "title": "Channel Type"
          }
        },
        "description": "Metadata only fields of a notification channel."
      },
      "NotificationChannelOrderBy": {
        "type": "string",
        "enum": [
          "id",
          "type",
          "createdAt",
          "updatedAt"
        ],
        "description": "Order by options for notification channels."
      },
      "NotificationChannelPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationChannel"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "NotificationChannelType": {
        "type": "string",
        "enum": [
          "WEBHOOK"
        ],
        "description": "Type of the notification channel.",
        "x-enum-varnames": [
          "Webhook"
        ]
      },
      "NotificationChannelWebhook": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "type",
          "name",
          "url"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Identifies the notification channel.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "title": "Channel Unique Identifier",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "WEBHOOK"
            ],
            "description": "Notification channel type.",
            "title": "Channel Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "User friendly name of the channel.",
            "title": "Channel Name",
            "example": "customer-webhook"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the channel is disabled or not.",
            "title": "Channel Disabled",
            "example": true,
            "default": false
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "url": {
            "type": "string",
            "description": "Webhook URL where the notification is sent.",
            "title": "Webhook URL",
            "example": "https://example.com/webhook"
          },
          "customHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom HTTP headers sent as part of the webhook request.",
            "title": "Custom HTTP Headers"
          },
          "signingSecret": {
            "type": "string",
            "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$",
            "description": "Signing secret used for webhook request validation on the receiving end.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24",
            "title": "Signing Secret",
            "example": "whsec_S6g2HLnTwd9AhHwUIMFggVS9OfoPafN8"
          }
        },
        "description": "Notification channel with webhook type."
      },
      "NotificationChannelWebhookCreateRequest": {
        "type": "object",
        "required": [
          "type",
          "name",
          "url"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "WEBHOOK"
            ],
            "description": "Notification channel type.",
            "title": "Channel Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "User friendly name of the channel.",
            "title": "Channel Name",
            "example": "customer-webhook"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the channel is disabled or not.",
            "title": "Channel Disabled",
            "example": true,
            "default": false
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "url": {
            "type": "string",
            "description": "Webhook URL where the notification is sent.",
            "title": "Webhook URL",
            "example": "https://example.com/webhook"
          },
          "customHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom HTTP headers sent as part of the webhook request.",
            "title": "Custom HTTP Headers"
          },
          "signingSecret": {
            "type": "string",
            "pattern": "^(whsec_)?[a-zA-Z0-9+/=]{32,100}$",
            "description": "Signing secret used for webhook request validation on the receiving end.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24",
            "title": "Signing Secret",
            "example": "whsec_S6g2HLnTwd9AhHwUIMFggVS9OfoPafN8"
          }
        },
        "description": "Request with input parameters for creating new notification channel with webhook type."
      },
      "NotificationEvent": {
        "type": "object",
        "required": [
          "id",
          "type",
          "createdAt",
          "rule",
          "deliveryStatus",
          "payload"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier of the notification event.",
            "example": "01J2KNP1YTXQRXHTDJ4KPR7PZ0",
            "title": "Event Identifier",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationEventType"
              }
            ],
            "description": "Type of the notification event.",
            "title": "Event Type",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the notification event was created in RFC 3339 format.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "rule": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationRule"
              }
            ],
            "description": "The nnotification rule which generated this event.",
            "readOnly": true
          },
          "deliveryStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationEventDeliveryStatus"
            },
            "description": "The delivery status of the notification event.",
            "title": "Delivery Status",
            "readOnly": true
          },
          "payload": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationEventPayload"
              }
            ],
            "description": "Timestamp when the notification event was created in RFC 3339 format.",
            "readOnly": true
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          }
        },
        "description": "Type of the notification event."
      },
      "NotificationEventBalanceThresholdPayload": {
        "type": "object",
        "required": [
          "id",
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the notification event the payload belongs to.",
            "example": "01J2KNP1YTXQRXHTDJ4KPR7PZ0",
            "title": "Notification Event Identifier",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "entitlements.balance.threshold"
            ],
            "description": "Type of the notification event.",
            "title": "Notification Event Type",
            "readOnly": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the notification event was created in RFC 3339 format.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationEventBalanceThresholdPayloadData"
              }
            ],
            "description": "The data of the payload.",
            "title": "Payload Data",
            "readOnly": true
          }
        },
        "description": "Payload for notification event with `entitlements.balance.threshold` type."
      },
      "NotificationEventBalanceThresholdPayloadData": {
        "type": "object",
        "required": [
          "entitlement",
          "feature",
          "subject",
          "value",
          "threshold"
        ],
        "properties": {
          "entitlement": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EntitlementMetered"
              }
            ],
            "title": "Entitlement",
            "readOnly": true
          },
          "feature": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Feature"
              }
            ],
            "title": "Feature",
            "readOnly": true
          },
          "subject": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Subject"
              }
            ],
            "title": "Subject",
            "readOnly": true
          },
          "value": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EntitlementValue"
              }
            ],
            "title": "Entitlement Value",
            "readOnly": true
          },
          "customer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ],
            "title": "Customer",
            "readOnly": true
          },
          "threshold": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationRuleBalanceThresholdValue"
              }
            ],
            "title": "Threshold",
            "readOnly": true
          }
        },
        "description": "Data of the payload for notification event with `entitlements.balance.threshold` type."
      },
      "NotificationEventDeliveryAttempt": {
        "type": "object",
        "required": [
          "state",
          "response",
          "timestamp"
        ],
        "properties": {
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationEventDeliveryStatusState"
              }
            ],
            "description": "State of teh delivery attempt.",
            "title": "State of teh delivery attempt",
            "example": "SUCCESS",
            "readOnly": true
          },
          "response": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EventDeliveryAttemptResponse"
              }
            ],
            "description": "Response returned by the notification event recipient.",
            "title": "Response returned by the notification event recipient",
            "readOnly": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the delivery attempt.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Timestamp of the delivery attempt",
            "readOnly": true
          }
        },
        "description": "The delivery attempt of the notification event."
      },
      "NotificationEventDeliveryStatus": {
        "type": "object",
        "required": [
          "state",
          "reason",
          "updatedAt",
          "channel",
          "attempts"
        ],
        "properties": {
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationEventDeliveryStatusState"
              }
            ],
            "description": "Delivery state of the notification event to the channel.",
            "example": "SUCCESS",
            "readOnly": true
          },
          "reason": {
            "type": "string",
            "description": "The reason of the last deliverry state update.",
            "title": "State Reason",
            "example": "Failed to dispatch event due to provider error.",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the status was last updated in RFC 3339 format.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "channel": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationChannelMeta"
              }
            ],
            "description": "Notification channel the delivery status associated with.",
            "title": "Notification Channel",
            "readOnly": true
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          },
          "nextAttempt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the next delivery attempt. If null it means there will be no more delivery attempts.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Timestamp of the next delivery attempt",
            "readOnly": true
          },
          "attempts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationEventDeliveryAttempt"
            },
            "description": "List of delivery attempts.",
            "title": "Delivery Attempts",
            "readOnly": true
          }
        },
        "description": "The delivery status of the notification event."
      },
      "NotificationEventDeliveryStatusState": {
        "type": "string",
        "enum": [
          "SUCCESS",
          "FAILED",
          "SENDING",
          "PENDING",
          "RESENDING"
        ],
        "description": "The delivery state of the notification event to the channel.",
        "title": "Delivery State",
        "x-enum-varnames": [
          "Success",
          "Failed",
          "Sending",
          "Pending",
          "Resending"
        ]
      },
      "NotificationEventEntitlementValuePayloadBase": {
        "type": "object",
        "required": [
          "entitlement",
          "feature",
          "subject",
          "value"
        ],
        "properties": {
          "entitlement": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EntitlementMetered"
              }
            ],
            "title": "Entitlement",
            "readOnly": true
          },
          "feature": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Feature"
              }
            ],
            "title": "Feature",
            "readOnly": true
          },
          "subject": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Subject"
              }
            ],
            "title": "Subject",
            "readOnly": true
          },
          "value": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EntitlementValue"
              }
            ],
            "title": "Entitlement Value",
            "readOnly": true
          },
          "customer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ],
            "title": "Customer",
            "readOnly": true
          }
        },
        "description": "Base data for any payload with entitlement entitlement value."
      },
      "NotificationEventInvoiceCreatedPayload": {
        "type": "object",
        "required": [
          "id",
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the notification event the payload belongs to.",
            "example": "01J2KNP1YTXQRXHTDJ4KPR7PZ0",
            "title": "Notification Event Identifier",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice.created"
            ],
            "description": "Type of the notification event.",
            "title": "Notification Event Type",
            "readOnly": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the notification event was created in RFC 3339 format.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Invoice"
              }
            ],
            "description": "The data of the payload.",
            "title": "Payload Data",
            "readOnly": true
          }
        },
        "description": "Payload for notification event with `invoice.created` type."
      },
      "NotificationEventInvoiceUpdatedPayload": {
        "type": "object",
        "required": [
          "id",
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the notification event the payload belongs to.",
            "example": "01J2KNP1YTXQRXHTDJ4KPR7PZ0",
            "title": "Notification Event Identifier",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice.updated"
            ],
            "description": "Type of the notification event.",
            "title": "Notification Event Type",
            "readOnly": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the notification event was created in RFC 3339 format.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Invoice"
              }
            ],
            "description": "The data of the payload.",
            "title": "Payload Data",
            "readOnly": true
          }
        },
        "description": "Payload for notification event with `invoice.updated` type."
      },
      "NotificationEventOrderBy": {
        "type": "string",
        "enum": [
          "id",
          "createdAt"
        ],
        "description": "Order by options for notification channels."
      },
      "NotificationEventPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationEvent"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "NotificationEventPayload": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/NotificationEventResetPayload"
          },
          {
            "$ref": "#/components/schemas/NotificationEventBalanceThresholdPayload"
          },
          {
            "$ref": "#/components/schemas/NotificationEventInvoiceCreatedPayload"
          },
          {
            "$ref": "#/components/schemas/NotificationEventInvoiceUpdatedPayload"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "entitlements.reset": "#/components/schemas/NotificationEventResetPayload",
            "entitlements.balance.threshold": "#/components/schemas/NotificationEventBalanceThresholdPayload",
            "invoice.created": "#/components/schemas/NotificationEventInvoiceCreatedPayload",
            "invoice.updated": "#/components/schemas/NotificationEventInvoiceUpdatedPayload"
          }
        },
        "description": "The delivery status of the notification event."
      },
      "NotificationEventResendRequest": {
        "type": "object",
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            },
            "description": "Notification channels to which the event should be re-sent.",
            "title": "Channels"
          }
        },
        "description": "A notification event that will be re-sent."
      },
      "NotificationEventResetPayload": {
        "type": "object",
        "required": [
          "id",
          "type",
          "timestamp",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the notification event the payload belongs to.",
            "example": "01J2KNP1YTXQRXHTDJ4KPR7PZ0",
            "title": "Notification Event Identifier",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "entitlements.reset"
            ],
            "description": "Type of the notification event.",
            "title": "Notification Event Type",
            "readOnly": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the notification event was created in RFC 3339 format.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationEventEntitlementValuePayloadBase"
              }
            ],
            "description": "The data of the payload.",
            "title": "Payload Data",
            "readOnly": true
          }
        },
        "description": "Payload for notification event with `entitlements.reset` type."
      },
      "NotificationEventType": {
        "type": "string",
        "enum": [
          "entitlements.balance.threshold",
          "entitlements.reset",
          "invoice.created",
          "invoice.updated"
        ],
        "description": "Type of the notification event."
      },
      "NotificationRule": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/NotificationRuleBalanceThreshold"
          },
          {
            "$ref": "#/components/schemas/NotificationRuleEntitlementReset"
          },
          {
            "$ref": "#/components/schemas/NotificationRuleInvoiceCreated"
          },
          {
            "$ref": "#/components/schemas/NotificationRuleInvoiceUpdated"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "entitlements.balance.threshold": "#/components/schemas/NotificationRuleBalanceThreshold",
            "entitlements.reset": "#/components/schemas/NotificationRuleEntitlementReset",
            "invoice.created": "#/components/schemas/NotificationRuleInvoiceCreated",
            "invoice.updated": "#/components/schemas/NotificationRuleInvoiceUpdated"
          }
        },
        "description": "Notification Rule."
      },
      "NotificationRuleBalanceThreshold": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "type",
          "name",
          "channels",
          "thresholds"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Identifies the notification rule.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "title": "Rule Unique Identifier",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "entitlements.balance.threshold"
            ],
            "description": "Notification rule type.",
            "title": "Rule Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The user friendly name of the notification rule.",
            "title": "Rule Name",
            "example": "Balance threshold reached"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the rule is disabled or not.",
            "title": "Rule Disabled",
            "example": true,
            "default": false
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationChannelMeta"
            },
            "description": "List of notification channels the rule applies to.",
            "title": "Channels assigned to Rule"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "thresholds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationRuleBalanceThresholdValue"
            },
            "minItems": 1,
            "maxItems": 10,
            "description": "List of thresholds the rule suppose to be triggered.",
            "title": "Entitlement Balance Thresholds"
          },
          "features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeatureMeta"
            },
            "minItems": 1,
            "description": "Optional field containing list of features the rule applies to.",
            "title": "Features"
          }
        },
        "description": "Notification rule with entitlements.balance.threshold type."
      },
      "NotificationRuleBalanceThresholdCreateRequest": {
        "type": "object",
        "required": [
          "type",
          "name",
          "thresholds",
          "channels"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "entitlements.balance.threshold"
            ],
            "description": "Notification rule type.",
            "title": "Rule Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The user friendly name of the notification rule.",
            "title": "Rule Name",
            "example": "Balance threshold reached"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the rule is disabled or not.",
            "title": "Rule Disabled",
            "example": true,
            "default": false
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "thresholds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationRuleBalanceThresholdValue"
            },
            "minItems": 1,
            "maxItems": 10,
            "description": "List of thresholds the rule suppose to be triggered.",
            "title": "Entitlement Balance Thresholds"
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            },
            "minItems": 1,
            "description": "List of notification channels the rule is applied to.",
            "title": "Channels"
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "description": "ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen."
            },
            "minItems": 1,
            "description": "Optional field for defining the scope of notification by feature. It may contain features by id or key.",
            "title": "Features"
          }
        },
        "description": "Request with input parameters for creating new notification rule with entitlements.balance.threshold type."
      },
      "NotificationRuleBalanceThresholdValue": {
        "type": "object",
        "required": [
          "value",
          "type"
        ],
        "properties": {
          "value": {
            "type": "number",
            "format": "double",
            "description": "Value of the threshold.",
            "title": "Threshold Value",
            "example": 100
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationRuleBalanceThresholdValueType"
              }
            ],
            "description": "Type of the threshold.",
            "example": "usage_value"
          }
        },
        "description": "Threshold value with multiple supported types."
      },
      "NotificationRuleBalanceThresholdValueType": {
        "type": "string",
        "enum": [
          "PERCENT",
          "NUMBER",
          "balance_value",
          "usage_percentage",
          "usage_value"
        ],
        "description": "Type of the rule in the balance threshold specification:\n* `balance_value`: threshold defined by the remaining balance value based on usage and the total of grants in the current usage period\n* `usage_percentage`: threshold defined by the usage percentage compared to the total of grants in the current usage period\n* `usage_value`: threshold defined by the usage value in the current usage period\n* `NUMBER` (**deprecated**): see `usage_value`\n* `PERCENT` (**deprecated**): see `usage_percentage`",
        "title": "Notification balance threshold type",
        "x-enum-varnames": [
          "Percent",
          "Number",
          "BalanceValue",
          "UsagePercentage",
          "UsageValue"
        ]
      },
      "NotificationRuleCreateRequest": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/NotificationRuleBalanceThresholdCreateRequest"
          },
          {
            "$ref": "#/components/schemas/NotificationRuleEntitlementResetCreateRequest"
          },
          {
            "$ref": "#/components/schemas/NotificationRuleInvoiceCreatedCreateRequest"
          },
          {
            "$ref": "#/components/schemas/NotificationRuleInvoiceUpdatedCreateRequest"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "entitlements.balance.threshold": "#/components/schemas/NotificationRuleBalanceThresholdCreateRequest",
            "entitlements.reset": "#/components/schemas/NotificationRuleEntitlementResetCreateRequest",
            "invoice.created": "#/components/schemas/NotificationRuleInvoiceCreatedCreateRequest",
            "invoice.updated": "#/components/schemas/NotificationRuleInvoiceUpdatedCreateRequest"
          }
        },
        "description": "Union type for requests creating new notification rule with certain type."
      },
      "NotificationRuleEntitlementReset": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "type",
          "name",
          "channels"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Identifies the notification rule.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "title": "Rule Unique Identifier",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "entitlements.reset"
            ],
            "description": "Notification rule type.",
            "title": "Rule Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The user friendly name of the notification rule.",
            "title": "Rule Name",
            "example": "Balance threshold reached"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the rule is disabled or not.",
            "title": "Rule Disabled",
            "example": true,
            "default": false
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationChannelMeta"
            },
            "description": "List of notification channels the rule applies to.",
            "title": "Channels assigned to Rule"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeatureMeta"
            },
            "minItems": 1,
            "description": "Optional field containing list of features the rule applies to.",
            "title": "Features"
          }
        },
        "description": "Notification rule with entitlements.reset type."
      },
      "NotificationRuleEntitlementResetCreateRequest": {
        "type": "object",
        "required": [
          "type",
          "name",
          "channels"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "entitlements.reset"
            ],
            "description": "Notification rule type.",
            "title": "Rule Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The user friendly name of the notification rule.",
            "title": "Rule Name",
            "example": "Balance threshold reached"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the rule is disabled or not.",
            "title": "Rule Disabled",
            "example": true,
            "default": false
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            },
            "minItems": 1,
            "description": "List of notification channels the rule is applied to.",
            "title": "Channels"
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "description": "ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen."
            },
            "minItems": 1,
            "description": "Optional field for defining the scope of notification by feature. It may contain features by id or key.",
            "title": "Features"
          }
        },
        "description": "Request with input parameters for creating new notification rule with entitlements.reset type."
      },
      "NotificationRuleInvoiceCreated": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "type",
          "name",
          "channels"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Identifies the notification rule.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "title": "Rule Unique Identifier",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice.created"
            ],
            "description": "Notification rule type.",
            "title": "Rule Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The user friendly name of the notification rule.",
            "title": "Rule Name",
            "example": "Balance threshold reached"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the rule is disabled or not.",
            "title": "Rule Disabled",
            "example": true,
            "default": false
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationChannelMeta"
            },
            "description": "List of notification channels the rule applies to.",
            "title": "Channels assigned to Rule"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          }
        },
        "description": "Notification rule with invoice.created type."
      },
      "NotificationRuleInvoiceCreatedCreateRequest": {
        "type": "object",
        "required": [
          "type",
          "name",
          "channels"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "invoice.created"
            ],
            "description": "Notification rule type.",
            "title": "Rule Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The user friendly name of the notification rule.",
            "title": "Rule Name",
            "example": "Balance threshold reached"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the rule is disabled or not.",
            "title": "Rule Disabled",
            "example": true,
            "default": false
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            },
            "minItems": 1,
            "description": "List of notification channels the rule is applied to.",
            "title": "Channels"
          }
        },
        "description": "Request with input parameters for creating new notification rule with invoice.created type."
      },
      "NotificationRuleInvoiceUpdated": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "type",
          "name",
          "channels"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Identifies the notification rule.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "title": "Rule Unique Identifier",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice.updated"
            ],
            "description": "Notification rule type.",
            "title": "Rule Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The user friendly name of the notification rule.",
            "title": "Rule Name",
            "example": "Balance threshold reached"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the rule is disabled or not.",
            "title": "Rule Disabled",
            "example": true,
            "default": false
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationChannelMeta"
            },
            "description": "List of notification channels the rule applies to.",
            "title": "Channels assigned to Rule"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          }
        },
        "description": "Notification rule with invoice.updated type."
      },
      "NotificationRuleInvoiceUpdatedCreateRequest": {
        "type": "object",
        "required": [
          "type",
          "name",
          "channels"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "invoice.updated"
            ],
            "description": "Notification rule type.",
            "title": "Rule Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The user friendly name of the notification rule.",
            "title": "Rule Name",
            "example": "Balance threshold reached"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the rule is disabled or not.",
            "title": "Rule Disabled",
            "example": true,
            "default": false
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            },
            "minItems": 1,
            "description": "List of notification channels the rule is applied to.",
            "title": "Channels"
          }
        },
        "description": "Request with input parameters for creating new notification rule with invoice.updated  type."
      },
      "NotificationRuleMeta": {
        "type": "object",
        "required": [
          "id",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "Identifies the notification rule.",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "title": "Rule Unique Identifier",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationEventType"
              }
            ],
            "description": "Notification rule type.",
            "title": "Rule Type",
            "readOnly": true
          }
        },
        "description": "Metadata only fields of a notification channel."
      },
      "NotificationRuleOrderBy": {
        "type": "string",
        "enum": [
          "id",
          "type",
          "createdAt",
          "updatedAt"
        ],
        "description": "Order by options for notification channels."
      },
      "NotificationRulePaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationRule"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "Numeric": {
        "type": "string",
        "pattern": "^\\-?[0-9]+(\\.[0-9]+)?$",
        "description": "Numeric represents an arbitrary precision number."
      },
      "OAuth2AuthorizationCodeGrantErrorType": {
        "type": "string",
        "enum": [
          "invalid_request",
          "unauthorized_client",
          "access_denied",
          "unsupported_response_type",
          "invalid_scope",
          "server_error",
          "temporarily_unavailable"
        ],
        "description": "OAuth2 authorization code grant error types."
      },
      "PackagePrice": {
        "type": "object",
        "required": [
          "type",
          "amount",
          "quantityPerPackage"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "package"
            ],
            "description": "The type of the price."
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The price of one package.",
            "title": "Amount"
          },
          "quantityPerPackage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The quantity per package.",
            "title": "Quantity per package"
          }
        },
        "description": "Package price.\n\nThe item is sold in packages. Each package contains quantityPerPackage items, the price of the\npackage is set in amount.\n\nThe total price of the usage will be enough packages that can accomodate all the usage.\n\nExamples (given a package size of 20, and an amount of $10):\n- if the quantity is 98, the price will be 5*$10=$50.\n- if the quantity is zero, the price will be 0*$10=$0, as even the first package is not purchased.\n- if the quantity is 20, the price will be 1*$10=$10, as the usage fits into the first package.\n- if the quantity is 20.1, the price will be 2*$10=$20, as the additional 0.1 usage (compared to the\nprevious example) requires a new package."
      },
      "PackagePriceWithCommitments": {
        "type": "object",
        "required": [
          "type",
          "amount",
          "quantityPerPackage"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "package"
            ],
            "description": "The type of the price."
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The price of one package.",
            "title": "Amount"
          },
          "quantityPerPackage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The quantity per package.",
            "title": "Quantity per package"
          },
          "minimumAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The customer is committed to spend at least the amount.",
            "title": "Minimum amount"
          },
          "maximumAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The customer is limited to spend at most the amount.",
            "title": "Maximum amount"
          }
        },
        "description": "Package price with spend commitments."
      },
      "PaymentDueDate": {
        "type": "object",
        "required": [
          "dueAt",
          "amount"
        ],
        "properties": {
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the payment is due.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "notes": {
            "type": "string",
            "description": "Other details to take into account for the due date.",
            "readOnly": true
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "How much needs to be paid by the date.",
            "readOnly": true
          },
          "percent": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Percentage"
              }
            ],
            "description": "Percentage of the total that should be paid by the date.",
            "readOnly": true
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "If different from the parent document's base currency.",
            "readOnly": true
          }
        },
        "description": "PaymentDueDate contains an amount that should be paid by the given date."
      },
      "PaymentTermDueDate": {
        "type": "object",
        "required": [
          "type",
          "dueAt"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "due_date"
            ],
            "description": "Type of terms to be applied."
          },
          "detail": {
            "type": "string",
            "description": "Text detail of the chosen payment terms.",
            "readOnly": true
          },
          "notes": {
            "type": "string",
            "description": "Description of the conditions for payment.",
            "readOnly": true
          },
          "dueAt": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentDueDate"
            },
            "minItems": 1,
            "description": "When the payment is due.",
            "readOnly": true
          }
        },
        "description": "PaymentTermDueDate defines the terms for payment on a specific date."
      },
      "PaymentTermInstant": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "instant"
            ],
            "description": "Type of terms to be applied."
          },
          "detail": {
            "type": "string",
            "description": "Text detail of the chosen payment terms.",
            "readOnly": true
          },
          "notes": {
            "type": "string",
            "description": "Description of the conditions for payment.",
            "readOnly": true
          }
        },
        "description": "PaymentTermInstant defines the terms for payment on receipt of invoice."
      },
      "PaymentTermType": {
        "type": "string",
        "enum": [
          "due_date",
          "instant"
        ],
        "description": "PaymentTermType defines the type of terms to be applied."
      },
      "PaymentTerms": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PaymentTermInstant"
          },
          {
            "$ref": "#/components/schemas/PaymentTermDueDate"
          }
        ],
        "description": "PaymentTerms defines the terms for payment."
      },
      "Percentage": {
        "type": "number",
        "format": "double",
        "description": "Numeric representation of a percentage\n\n50% is represented as 50",
        "example": 50,
        "x-go-package": "github.com/openmeterio/openmeter/pkg/models",
        "x-go-type": "models.Percentage"
      },
      "Period": {
        "type": "object",
        "required": [
          "from",
          "to"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Period start time.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "Period end time.",
            "example": "2023-02-01T01:01:01.001Z"
          }
        },
        "description": "A period with a start and end time."
      },
      "Plan": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "key",
          "version",
          "currency",
          "billingCadence",
          "status",
          "phases",
          "validationErrors",
          "paymentMethodRequired"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A semi-unique identifier for the resource.",
            "title": "Key"
          },
          "alignment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Alignment"
              }
            ],
            "description": "Alignment configuration for the plan."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Version of the plan. Incremented when the plan is updated.",
            "title": "Version",
            "default": 1,
            "readOnly": true
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency code of the plan.",
            "title": "Currency",
            "default": "USD"
          },
          "billingCadence": {
            "type": "string",
            "format": "duration",
            "description": "The default billing cadence for subscriptions using this plan.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).",
            "title": "Billing cadence",
            "example": "P1M"
          },
          "proRatingConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProRatingConfig"
              }
            ],
            "description": "Default pro-rating configuration for subscriptions using this plan.",
            "title": "Pro-rating configuration",
            "default": {
              "enabled": true,
              "mode": "max_consumption_based"
            }
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the plan becomes effective. When not specified, the plan is a draft.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Effective start date",
            "readOnly": true
          },
          "effectiveTo": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the plan is no longer effective. When not specified, the plan is effective indefinitely.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Effective end date",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PlanStatus"
              }
            ],
            "description": "The status of the plan.\nComputed based on the effective start and end dates:\n- draft = no effectiveFrom\n- active = effectiveFrom <= now < effectiveTo\n- archived / inactive = effectiveTo <= now\n- scheduled = now < effectiveFrom < effectiveTo",
            "title": "Status",
            "readOnly": true
          },
          "phases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanPhase"
            },
            "minItems": 1,
            "description": "The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.\nA phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.",
            "title": "Plan phases"
          },
          "validationErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "nullable": true,
            "description": "List of validation errors.",
            "title": "Validation errors",
            "readOnly": true
          },
          "paymentMethodRequired": {
            "type": "boolean",
            "description": "Indicates whether a payment method is required to create a subscription with this plan.\nComputed based on whether ANY phase has billable items (rate cards with prices).\nAligns with the subscription validator's billing setup check which checks all phases.",
            "title": "Payment method required",
            "readOnly": true
          }
        },
        "description": "Plans provide a template for subscriptions."
      },
      "PlanAddon": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "addon",
          "fromPlanPhase",
          "validationErrors"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "addon": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Addon"
              }
            ],
            "description": "Add-on object.",
            "title": "Addon",
            "readOnly": true
          },
          "fromPlanPhase": {
            "type": "string",
            "description": "The key of the plan phase from the add-on becomes available for purchase.",
            "title": "The plan phase from the add-on becomes purchasable"
          },
          "maxQuantity": {
            "type": "integer",
            "description": "The maximum number of times the add-on can be purchased for the plan.\nIt is not applicable for add-ons with single instance type.",
            "title": "Max quantity of the add-on"
          },
          "validationErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "nullable": true,
            "description": "List of validation errors.",
            "title": "Validation errors",
            "readOnly": true
          }
        },
        "description": "The PlanAddon describes the association between a plan and add-on."
      },
      "PlanAddonCreate": {
        "type": "object",
        "required": [
          "fromPlanPhase",
          "addonId"
        ],
        "properties": {
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "fromPlanPhase": {
            "type": "string",
            "description": "The key of the plan phase from the add-on becomes available for purchase.",
            "title": "The plan phase from the add-on becomes purchasable"
          },
          "maxQuantity": {
            "type": "integer",
            "description": "The maximum number of times the add-on can be purchased for the plan.\nIt is not applicable for add-ons with single instance type.",
            "title": "Max quantity of the add-on"
          },
          "addonId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The add-on unique identifier in ULID format.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "Add-on unique identifier"
          }
        },
        "description": "A plan add-on assignment create request."
      },
      "PlanAddonOrderBy": {
        "type": "string",
        "enum": [
          "id",
          "key",
          "version",
          "created_at",
          "updated_at"
        ],
        "description": "Order by options for plan add-on assignments."
      },
      "PlanAddonPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanAddon"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "PlanAddonReplaceUpdate": {
        "type": "object",
        "required": [
          "fromPlanPhase"
        ],
        "properties": {
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "fromPlanPhase": {
            "type": "string",
            "description": "The key of the plan phase from the add-on becomes available for purchase.",
            "title": "The plan phase from the add-on becomes purchasable"
          },
          "maxQuantity": {
            "type": "integer",
            "description": "The maximum number of times the add-on can be purchased for the plan.\nIt is not applicable for add-ons with single instance type.",
            "title": "Max quantity of the add-on"
          }
        },
        "description": "Resource update operation model."
      },
      "PlanCreate": {
        "type": "object",
        "required": [
          "name",
          "key",
          "currency",
          "billingCadence",
          "phases"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A semi-unique identifier for the resource.",
            "title": "Key"
          },
          "alignment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Alignment"
              }
            ],
            "description": "Alignment configuration for the plan."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency code of the plan.",
            "title": "Currency",
            "default": "USD"
          },
          "billingCadence": {
            "type": "string",
            "format": "duration",
            "description": "The default billing cadence for subscriptions using this plan.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).",
            "title": "Billing cadence",
            "example": "P1M"
          },
          "proRatingConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProRatingConfig"
              }
            ],
            "description": "Default pro-rating configuration for subscriptions using this plan.",
            "title": "Pro-rating configuration",
            "default": {
              "enabled": true,
              "mode": "max_consumption_based"
            }
          },
          "phases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanPhase"
            },
            "minItems": 1,
            "description": "The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.\nA phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.",
            "title": "Plan phases"
          }
        },
        "description": "Resource create operation model."
      },
      "PlanOrderBy": {
        "type": "string",
        "enum": [
          "id",
          "key",
          "version",
          "created_at",
          "updated_at"
        ],
        "description": "Order by options for plans."
      },
      "PlanPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Plan"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "PlanPhase": {
        "type": "object",
        "required": [
          "key",
          "name",
          "duration",
          "rateCards"
        ],
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A semi-unique identifier for the resource.",
            "title": "Key"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "duration": {
            "type": "string",
            "format": "duration",
            "nullable": true,
            "description": "The duration of the phase.",
            "title": "Duration",
            "example": "P1Y"
          },
          "rateCards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateCard"
            },
            "description": "The rate cards of the plan.",
            "title": "Rate cards"
          }
        },
        "description": "The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses."
      },
      "PlanReference": {
        "type": "object",
        "required": [
          "id",
          "key",
          "version"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The plan ID.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The plan key."
          },
          "version": {
            "type": "integer",
            "description": "The plan version."
          }
        },
        "description": "References an exact plan."
      },
      "PlanReferenceInput": {
        "type": "object",
        "required": [
          "key"
        ],
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The plan key."
          },
          "version": {
            "type": "integer",
            "description": "The plan version."
          }
        },
        "description": "References an exact plan defaulting to the current active version."
      },
      "PlanReplaceUpdate": {
        "type": "object",
        "required": [
          "name",
          "billingCadence",
          "phases"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "alignment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Alignment"
              }
            ],
            "description": "Alignment configuration for the plan."
          },
          "billingCadence": {
            "type": "string",
            "format": "duration",
            "description": "The default billing cadence for subscriptions using this plan.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).",
            "title": "Billing cadence",
            "example": "P1M"
          },
          "proRatingConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProRatingConfig"
              }
            ],
            "description": "Default pro-rating configuration for subscriptions using this plan.",
            "title": "Pro-rating configuration",
            "default": {
              "enabled": true,
              "mode": "max_consumption_based"
            }
          },
          "phases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanPhase"
            },
            "minItems": 1,
            "description": "The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.\nA phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.",
            "title": "Plan phases"
          }
        },
        "description": "Resource update operation model."
      },
      "PlanStatus": {
        "type": "string",
        "enum": [
          "draft",
          "active",
          "archived",
          "scheduled"
        ],
        "description": "The status of a plan."
      },
      "PlanSubscriptionChange": {
        "type": "object",
        "required": [
          "timing",
          "plan"
        ],
        "properties": {
          "timing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionTiming"
              }
            ],
            "description": "Timing configuration for the change, when the change should take effect.\nFor changing a subscription, the accepted values depend on the subscription configuration."
          },
          "alignment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Alignment"
              }
            ],
            "description": "What alignment settings the subscription should have."
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Arbitrary metadata associated with the subscription."
          },
          "plan": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PlanReferenceInput"
              }
            ],
            "description": "The plan reference to change to."
          },
          "startingPhase": {
            "type": "string",
            "minLength": 1,
            "description": "The key of the phase to start the subscription in.\nIf not provided, the subscription will start in the first phase of the plan."
          },
          "name": {
            "type": "string",
            "description": "The name of the Subscription. If not provided the plan name is used."
          },
          "description": {
            "type": "string",
            "description": "Description for the Subscription."
          },
          "billingAnchor": {
            "type": "string",
            "format": "date-time",
            "description": "The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the previous subscription billing anchor will be used.",
            "example": "2023-01-01T01:01:01.001Z"
          }
        },
        "description": "Change subscription based on plan."
      },
      "PlanSubscriptionCreate": {
        "type": "object",
        "required": [
          "plan"
        ],
        "properties": {
          "alignment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Alignment"
              }
            ],
            "description": "What alignment settings the subscription should have."
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Arbitrary metadata associated with the subscription."
          },
          "plan": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PlanReferenceInput"
              }
            ],
            "description": "The plan reference to change to."
          },
          "startingPhase": {
            "type": "string",
            "minLength": 1,
            "description": "The key of the phase to start the subscription in.\nIf not provided, the subscription will start in the first phase of the plan."
          },
          "name": {
            "type": "string",
            "description": "The name of the Subscription. If not provided the plan name is used."
          },
          "description": {
            "type": "string",
            "description": "Description for the Subscription."
          },
          "timing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionTiming"
              }
            ],
            "description": "Timing configuration for the change, when the change should take effect.\nThe default is immediate.",
            "default": "immediate"
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The ID of the customer. Provide either the key or ID. Has presedence over the key.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "customerKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The key of the customer. Provide either the key or ID."
          },
          "billingAnchor": {
            "type": "string",
            "format": "date-time",
            "description": "The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the subscription start time will be used.",
            "example": "2023-01-01T01:01:01.001Z"
          }
        },
        "description": "Create subscription based on plan.",
        "title": "Create from plan"
      },
      "PortalToken": {
        "type": "object",
        "required": [
          "subject"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "readOnly": true
          },
          "subject": {
            "type": "string",
            "example": "customer-1"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "expired": {
            "type": "boolean",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "token": {
            "type": "string",
            "description": "The token is only returned at creation.",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ6dXBsby1tZXRlcmluZyIsInN1YiI6ImN1c3RvbWVyLTEifQ.signature",
            "readOnly": true
          },
          "allowedMeterSlugs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional, if defined only the specified meters will be allowed.",
            "example": [
              "tokens_total"
            ]
          }
        },
        "description": "A consumer portal token.\n\nValidator doesn't obey required for readOnly properties\nSee: https://github.com/stoplightio/spectral/issues/1274"
      },
      "PreconditionFailedProblemResponse": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnexpectedProblemResponse"
          }
        ],
        "description": "One or more conditions given in the request header fields evaluated to false when tested on the server."
      },
      "Price": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/FlatPrice"
          },
          {
            "$ref": "#/components/schemas/UnitPrice"
          },
          {
            "$ref": "#/components/schemas/TieredPrice"
          },
          {
            "$ref": "#/components/schemas/DynamicPrice"
          },
          {
            "$ref": "#/components/schemas/PackagePrice"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "flat": "#/components/schemas/FlatPrice",
            "unit": "#/components/schemas/UnitPrice",
            "tiered": "#/components/schemas/TieredPrice",
            "dynamic": "#/components/schemas/DynamicPrice",
            "package": "#/components/schemas/PackagePrice"
          }
        },
        "description": "Price.\nOne of: flat, unit, or tiered."
      },
      "PricePaymentTerm": {
        "type": "string",
        "enum": [
          "in_advance",
          "in_arrears"
        ],
        "description": "The payment term of a flat price.\nOne of: in_advance or in_arrears."
      },
      "PriceTier": {
        "type": "object",
        "required": [
          "flatPrice",
          "unitPrice"
        ],
        "properties": {
          "upToAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.",
            "title": "Up to quantity"
          },
          "flatPrice": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/FlatPrice"
              }
            ],
            "nullable": true,
            "description": "The flat price component of the tier.",
            "title": "Flat price component"
          },
          "unitPrice": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/UnitPrice"
              }
            ],
            "nullable": true,
            "description": "The unit price component of the tier.",
            "title": "Unit price component"
          }
        },
        "description": "A price tier.\nAt least one price component is required in each tier."
      },
      "PriceType": {
        "type": "string",
        "enum": [
          "flat",
          "unit",
          "tiered",
          "dynamic",
          "package"
        ],
        "description": "The type of the price."
      },
      "ProRatingConfig": {
        "type": "object",
        "required": [
          "enabled",
          "mode"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether pro-rating is enabled for this plan.",
            "title": "Enable pro-rating",
            "default": true
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProRatingMode"
              }
            ],
            "description": "How to handle pro-rating for billing period changes.",
            "title": "Pro-rating mode",
            "default": "max_consumption_based"
          }
        },
        "description": "Configuration for pro-rating behavior."
      },
      "ProRatingMode": {
        "type": "string",
        "enum": [
          "max_consumption_based"
        ],
        "description": "Pro-rating mode options for handling billing period changes."
      },
      "Progress": {
        "type": "object",
        "required": [
          "success",
          "failed",
          "total",
          "updatedAt"
        ],
        "properties": {
          "success": {
            "type": "integer",
            "format": "uint64",
            "description": "Success is the number of items that succeeded"
          },
          "failed": {
            "type": "integer",
            "format": "uint64",
            "description": "Failed is the number of items that failed"
          },
          "total": {
            "type": "integer",
            "format": "uint64",
            "description": "The total number of items to process"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time the progress was last updated",
            "example": "2023-01-01T01:01:01.001Z"
          }
        },
        "description": "Progress describes a progress of a task."
      },
      "RateCard": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RateCardFlatFee"
          },
          {
            "$ref": "#/components/schemas/RateCardUsageBased"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "flat_fee": "#/components/schemas/RateCardFlatFee",
            "usage_based": "#/components/schemas/RateCardUsageBased"
          }
        },
        "description": "A rate card defines the pricing and entitlement of a feature or service."
      },
      "RateCardBooleanEntitlement": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "type": {
            "type": "string",
            "enum": [
              "boolean"
            ]
          }
        },
        "description": "Entitlement template of a boolean entitlement."
      },
      "RateCardEntitlement": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RateCardMeteredEntitlement"
          },
          {
            "$ref": "#/components/schemas/RateCardStaticEntitlement"
          },
          {
            "$ref": "#/components/schemas/RateCardBooleanEntitlement"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "metered": "#/components/schemas/RateCardMeteredEntitlement",
            "static": "#/components/schemas/RateCardStaticEntitlement",
            "boolean": "#/components/schemas/RateCardBooleanEntitlement"
          }
        },
        "description": "Entitlement templates are used to define the entitlements of a plan.\nFeatures are omitted from the entitlement template, as they are defined in the rate card."
      },
      "RateCardFlatFee": {
        "type": "object",
        "required": [
          "type",
          "key",
          "name",
          "billingCadence",
          "price"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "flat_fee"
            ],
            "description": "The type of the RateCard.",
            "title": "RateCard type"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A semi-unique identifier for the resource.",
            "title": "Key"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the customer is entitled to use.",
            "title": "Feature key"
          },
          "entitlementTemplate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateCardEntitlement"
              }
            ],
            "description": "The entitlement of the rate card.\nOnly available when featureKey is set."
          },
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.",
            "title": "Tax config"
          },
          "billingCadence": {
            "type": "string",
            "format": "duration",
            "nullable": true,
            "description": "The billing cadence of the rate card.\nWhen null it means it is a one time fee.",
            "title": "Billing cadence"
          },
          "price": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/FlatPriceWithPaymentTerm"
              }
            ],
            "nullable": true,
            "description": "The price of the rate card.\nWhen null, the feature or service is free.",
            "title": "Price",
            "example": {
              "type": "flat",
              "amount": "100",
              "paymentTerm": "in_arrears"
            }
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Discounts"
              }
            ],
            "description": "The discount of the rate card. For flat fee rate cards only percentage discounts are supported.\nOnly available when price is set.",
            "title": "Discounts"
          }
        },
        "description": "A flat fee rate card defines a one-time purchase or a recurring fee."
      },
      "RateCardMeteredEntitlement": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "type": {
            "type": "string",
            "enum": [
              "metered"
            ]
          },
          "isSoftLimit": {
            "type": "boolean",
            "description": "If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.",
            "title": "Soft limit",
            "default": false
          },
          "issueAfterReset": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "description": "You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.",
            "title": "Initial grant amount"
          },
          "issueAfterResetPriority": {
            "type": "integer",
            "format": "uint8",
            "minimum": 1,
            "maximum": 255,
            "description": "Defines the grant priority for the default grant.",
            "title": "Issue grant after reset priority",
            "default": 1
          },
          "preserveOverageAtReset": {
            "type": "boolean",
            "description": "If true, the overage is preserved at reset. If false, the usage is reset to 0.",
            "title": "Preserve overage at reset",
            "default": false
          },
          "usagePeriod": {
            "type": "string",
            "format": "duration",
            "description": "The interval of the metered entitlement.\nDefaults to the billing cadence of the rate card.",
            "title": "Usage Period"
          }
        },
        "description": "The entitlement template with a metered entitlement."
      },
      "RateCardStaticEntitlement": {
        "type": "object",
        "required": [
          "type",
          "config"
        ],
        "properties": {
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional metadata for the feature."
          },
          "type": {
            "type": "string",
            "enum": [
              "static"
            ]
          },
          "config": {
            "type": "string",
            "format": "json",
            "description": "The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.",
            "example": "{ \"integrations\": [\"github\"] }"
          }
        },
        "description": "Entitlement template of a static entitlement."
      },
      "RateCardType": {
        "type": "string",
        "enum": [
          "flat_fee",
          "usage_based"
        ],
        "description": "The type of the rate card."
      },
      "RateCardUsageBased": {
        "type": "object",
        "required": [
          "type",
          "key",
          "name",
          "billingCadence",
          "price"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "usage_based"
            ],
            "description": "The type of the RateCard.",
            "title": "RateCard type"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A semi-unique identifier for the resource.",
            "title": "Key"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature the customer is entitled to use.",
            "title": "Feature key"
          },
          "entitlementTemplate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateCardEntitlement"
              }
            ],
            "description": "The entitlement of the rate card.\nOnly available when featureKey is set."
          },
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.",
            "title": "Tax config"
          },
          "billingCadence": {
            "type": "string",
            "format": "duration",
            "description": "The billing cadence of the rate card.",
            "title": "Billing cadence"
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateCardUsageBasedPrice"
              }
            ],
            "nullable": true,
            "description": "The price of the rate card.\nWhen null, the feature or service is free."
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Discounts"
              }
            ],
            "description": "The discounts of the rate card.\n\nFlat fee rate cards only support percentage discounts.",
            "title": "Discounts"
          }
        },
        "description": "A usage-based rate card defines a price based on usage."
      },
      "RateCardUsageBasedPrice": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/FlatPriceWithPaymentTerm"
          },
          {
            "$ref": "#/components/schemas/UnitPriceWithCommitments"
          },
          {
            "$ref": "#/components/schemas/TieredPriceWithCommitments"
          },
          {
            "$ref": "#/components/schemas/DynamicPriceWithCommitments"
          },
          {
            "$ref": "#/components/schemas/PackagePriceWithCommitments"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "flat": "#/components/schemas/FlatPriceWithPaymentTerm",
            "unit": "#/components/schemas/UnitPriceWithCommitments",
            "tiered": "#/components/schemas/TieredPriceWithCommitments",
            "dynamic": "#/components/schemas/DynamicPriceWithCommitments",
            "package": "#/components/schemas/PackagePriceWithCommitments"
          }
        },
        "description": "The price of the usage based rate card."
      },
      "RecurringPeriod": {
        "type": "object",
        "required": [
          "interval",
          "anchor",
          "intervalISO"
        ],
        "properties": {
          "interval": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodInterval"
              }
            ],
            "description": "The unit of time for the interval. Heuristically maps ISO duraitons to enum values or returns the ISO duration.",
            "title": "Interval"
          },
          "anchor": {
            "type": "string",
            "format": "date-time",
            "description": "A date-time anchor to base the recurring period on.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Anchor time"
          },
          "intervalISO": {
            "type": "string",
            "format": "duration",
            "description": "The unit of time for the interval in ISO8601 format."
          }
        },
        "description": "Recurring period with an interval and an anchor.",
        "deprecated": true,
        "example": {
          "interval": "DAY",
          "intervalISO": "P1D",
          "anchor": "2023-01-01T01:01:01.001Z"
        }
      },
      "RecurringPeriodCreateInput": {
        "type": "object",
        "required": [
          "interval"
        ],
        "properties": {
          "interval": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodInterval"
              }
            ],
            "description": "The unit of time for the interval.",
            "title": "Interval"
          },
          "anchor": {
            "type": "string",
            "format": "date-time",
            "description": "A date-time anchor to base the recurring period on.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Anchor time"
          }
        },
        "description": "Recurring period with an interval and an anchor.",
        "example": {
          "interval": "DAY",
          "anchor": "2023-01-01T01:01:01.001Z"
        }
      },
      "RecurringPeriodInterval": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$"
          },
          {
            "$ref": "#/components/schemas/RecurringPeriodIntervalEnum"
          }
        ],
        "description": "Period duration for the recurrence"
      },
      "RecurringPeriodIntervalEnum": {
        "type": "string",
        "enum": [
          "DAY",
          "WEEK",
          "MONTH",
          "YEAR"
        ],
        "description": "The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`."
      },
      "RecurringPeriodV2": {
        "type": "object",
        "required": [
          "interval",
          "anchor"
        ],
        "properties": {
          "interval": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringPeriodInterval"
              }
            ],
            "description": "The unit of time for the interval. Heuristically maps ISO duraitons to enum values or returns the ISO duration.",
            "title": "Interval"
          },
          "anchor": {
            "type": "string",
            "format": "date-time",
            "description": "A date-time anchor to base the recurring period on.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Anchor time"
          }
        },
        "description": "Recurring period with an interval and an anchor."
      },
      "RemovePhaseShifting": {
        "type": "string",
        "enum": [
          "next",
          "prev"
        ],
        "description": "The direction of the phase shift when a phase is removed."
      },
      "ResetEntitlementUsageInput": {
        "type": "object",
        "properties": {
          "effectiveAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time at which the reset takes effect, defaults to now. The reset cannot be in the future. The provided value is truncated to the minute due to how historical meter data is stored.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "retainAnchor": {
            "type": "boolean",
            "description": "Determines whether the usage period anchor is retained or reset to the effectiveAt time.\n- If true, the usage period anchor is retained.\n- If false, the usage period anchor is reset to the effectiveAt time."
          },
          "preserveOverage": {
            "type": "boolean",
            "description": "Determines whether the overage is preserved or forgiven, overriding the entitlement's default behavior.\n- If true, the overage is preserved.\n- If false, the overage is forgiven."
          }
        },
        "description": "Reset parameters"
      },
      "SandboxApp": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "listing",
          "status",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "listing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarketplaceListing"
              }
            ],
            "description": "The marketplace listing that this installed app is based on.",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppStatus"
              }
            ],
            "description": "Status of the app connection.",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "sandbox"
            ],
            "description": "The app's type is Sandbox."
          }
        },
        "description": "Sandbox app can be used for testing Zuplo Metering features.\n\nThe app is not creating anything in external systems, thus it is safe to use for\nverifying Zuplo Metering features."
      },
      "SandboxAppReplaceUpdate": {
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "type": {
            "type": "string",
            "enum": [
              "sandbox"
            ],
            "description": "The app's type is Sandbox."
          }
        },
        "description": "Resource update operation model."
      },
      "SandboxCustomerAppData": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "app": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SandboxApp"
              }
            ],
            "description": "The installed sandbox app this data belongs to.",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The app ID.\nIf not provided, it will use the global default for the app type.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "App ID"
          },
          "type": {
            "type": "string",
            "enum": [
              "sandbox"
            ],
            "description": "The app name.",
            "title": "App Type"
          }
        },
        "description": "Sandbox Customer App Data."
      },
      "ServiceUnavailableProblemResponse": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnexpectedProblemResponse"
          }
        ],
        "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."
      },
      "SortOrder": {
        "type": "string",
        "enum": [
          "ASC",
          "DESC"
        ],
        "description": "The order direction."
      },
      "SpendCommitments": {
        "type": "object",
        "properties": {
          "minimumAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The customer is committed to spend at least the amount.",
            "title": "Minimum amount"
          },
          "maximumAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The customer is limited to spend at most the amount.",
            "title": "Maximum amount"
          }
        },
        "description": "Spending commitments.\nThe customer is committed to spend at least the minimum amount and at most the maximum amount."
      },
      "StripeAPIKeyInput": {
        "type": "object",
        "required": [
          "secretAPIKey"
        ],
        "properties": {
          "secretAPIKey": {
            "type": "string"
          }
        },
        "description": "The Stripe API key input.\nUsed to authenticate with the Stripe API."
      },
      "StripeApp": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "listing",
          "status",
          "type",
          "stripeAccountId",
          "livemode",
          "maskedAPIKey"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "listing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarketplaceListing"
              }
            ],
            "description": "The marketplace listing that this installed app is based on.",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppStatus"
              }
            ],
            "description": "Status of the app connection.",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "stripe"
            ],
            "description": "The app's type is Stripe."
          },
          "stripeAccountId": {
            "type": "string",
            "description": "The Stripe account ID.",
            "readOnly": true
          },
          "livemode": {
            "type": "boolean",
            "description": "Livemode, true if the app is in production mode.",
            "readOnly": true
          },
          "maskedAPIKey": {
            "type": "string",
            "description": "The masked API key.\nOnly shows the first 8 and last 3 characters.",
            "readOnly": true
          }
        },
        "description": "A installed Stripe app object.",
        "example": {
          "id": "01G65Z755AFWAKHE12NY0CQ9FH",
          "type": "stripe",
          "name": "Stripe",
          "status": "ready",
          "listing": {
            "type": "stripe",
            "name": "Stripe",
            "description": "Stripe interation allows you to collect payments with Stripe.",
            "capabilities": [
              {
                "type": "calculateTax",
                "key": "stripe_calculate_tax",
                "name": "Calculate Tax",
                "description": "Stripe Tax calculates tax portion of the invoices."
              },
              {
                "type": "invoiceCustomers",
                "key": "stripe_invoice_customers",
                "name": "Invoice Customers",
                "description": "Stripe invoices customers with due amount."
              },
              {
                "type": "collectPayments",
                "key": "stripe_collect_payments",
                "name": "Collect Payments",
                "description": "Stripe payments collects outstanding revenue with Stripe customer's default payment method."
              }
            ],
            "installMethods": [
              "with_oauth2",
              "with_api_key"
            ]
          },
          "createdAt": "2024-01-01T01:01:01.001Z",
          "updatedAt": "2024-01-01T01:01:01.001Z",
          "stripeAccountId": "acct_123456789",
          "livemode": true,
          "maskedAPIKey": "sk_live_************abc"
        }
      },
      "StripeAppReadOrCreateOrUpdateOrDeleteOrQuery": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "listing",
          "status",
          "type",
          "stripeAccountId",
          "livemode",
          "maskedAPIKey"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "listing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarketplaceListing"
              }
            ],
            "description": "The marketplace listing that this installed app is based on.",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppStatus"
              }
            ],
            "description": "Status of the app connection.",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "stripe"
            ],
            "description": "The app's type is Stripe."
          },
          "stripeAccountId": {
            "type": "string",
            "description": "The Stripe account ID.",
            "readOnly": true
          },
          "livemode": {
            "type": "boolean",
            "description": "Livemode, true if the app is in production mode.",
            "readOnly": true
          },
          "maskedAPIKey": {
            "type": "string",
            "description": "The masked API key.\nOnly shows the first 8 and last 3 characters.",
            "readOnly": true
          },
          "secretAPIKey": {
            "type": "string",
            "format": "password",
            "description": "The Stripe API key."
          }
        },
        "description": "A installed Stripe app object.",
        "example": {
          "id": "01G65Z755AFWAKHE12NY0CQ9FH",
          "type": "stripe",
          "name": "Stripe",
          "status": "ready",
          "listing": {
            "type": "stripe",
            "name": "Stripe",
            "description": "Stripe interation allows you to collect payments with Stripe.",
            "capabilities": [
              {
                "type": "calculateTax",
                "key": "stripe_calculate_tax",
                "name": "Calculate Tax",
                "description": "Stripe Tax calculates tax portion of the invoices."
              },
              {
                "type": "invoiceCustomers",
                "key": "stripe_invoice_customers",
                "name": "Invoice Customers",
                "description": "Stripe invoices customers with due amount."
              },
              {
                "type": "collectPayments",
                "key": "stripe_collect_payments",
                "name": "Collect Payments",
                "description": "Stripe payments collects outstanding revenue with Stripe customer's default payment method."
              }
            ],
            "installMethods": [
              "with_oauth2",
              "with_api_key"
            ]
          },
          "createdAt": "2024-01-01T01:01:01.001Z",
          "updatedAt": "2024-01-01T01:01:01.001Z",
          "stripeAccountId": "acct_123456789",
          "livemode": true,
          "maskedAPIKey": "sk_live_************abc"
        }
      },
      "StripeAppReplaceUpdate": {
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "type": {
            "type": "string",
            "enum": [
              "stripe"
            ],
            "description": "The app's type is Stripe."
          },
          "secretAPIKey": {
            "type": "string",
            "format": "password",
            "description": "The Stripe API key."
          }
        },
        "description": "Resource update operation model."
      },
      "StripeCheckoutSessionMode": {
        "type": "string",
        "enum": [
          "setup"
        ],
        "description": "Stripe CheckoutSession.mode"
      },
      "StripeCustomerAppData": {
        "type": "object",
        "required": [
          "type",
          "stripeCustomerId"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The app ID.\nIf not provided, it will use the global default for the app type.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "App ID"
          },
          "type": {
            "type": "string",
            "enum": [
              "stripe"
            ],
            "description": "The app name.",
            "title": "App Type"
          },
          "stripeCustomerId": {
            "type": "string",
            "description": "The Stripe customer ID."
          },
          "stripeDefaultPaymentMethodId": {
            "type": "string",
            "description": "The Stripe default payment method ID."
          },
          "app": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StripeApp"
              }
            ],
            "description": "The installed stripe app this data belongs to.",
            "readOnly": true
          }
        },
        "description": "Stripe Customer App Data.",
        "example": {
          "type": "stripe",
          "stripeCustomerId": "cus_xxxxxxxxxxxxxx"
        }
      },
      "StripeCustomerAppDataBase": {
        "type": "object",
        "required": [
          "stripeCustomerId"
        ],
        "properties": {
          "stripeCustomerId": {
            "type": "string",
            "description": "The Stripe customer ID."
          },
          "stripeDefaultPaymentMethodId": {
            "type": "string",
            "description": "The Stripe default payment method ID."
          }
        },
        "description": "Stripe Customer App Data Base."
      },
      "StripeCustomerAppDataCreateOrUpdateItem": {
        "type": "object",
        "required": [
          "type",
          "stripeCustomerId"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The app ID.\nIf not provided, it will use the global default for the app type.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "App ID"
          },
          "type": {
            "type": "string",
            "enum": [
              "stripe"
            ],
            "description": "The app name.",
            "title": "App Type"
          },
          "stripeCustomerId": {
            "type": "string",
            "description": "The Stripe customer ID."
          },
          "stripeDefaultPaymentMethodId": {
            "type": "string",
            "description": "The Stripe default payment method ID."
          }
        },
        "description": "Stripe Customer App Data.",
        "example": {
          "type": "stripe",
          "stripeCustomerId": "cus_xxxxxxxxxxxxxx"
        }
      },
      "StripeCustomerPortalSession": {
        "type": "object",
        "required": [
          "id",
          "stripeCustomerId",
          "configurationId",
          "livemode",
          "createdAt",
          "returnUrl",
          "locale",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the customer portal session.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-id"
          },
          "stripeCustomerId": {
            "type": "string",
            "description": "The ID of the stripe customer."
          },
          "configurationId": {
            "type": "string",
            "description": "Configuration used to customize the customer portal.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-configuration"
          },
          "livemode": {
            "type": "boolean",
            "description": "Livemode.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-livemode"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Created at.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-created",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "returnUrl": {
            "type": "string",
            "description": "Return URL.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-return_url"
          },
          "locale": {
            "type": "string",
            "description": "Status.\n  /**\nThe IETF language tag of the locale customer portal is displayed in.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-locale"
          },
          "url": {
            "type": "string",
            "description": "/**\nThe ID of the customer.The URL to redirect the customer to after they have completed\ntheir requested actions."
          }
        },
        "description": "Stripe customer portal session.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object"
      },
      "StripeTaxConfig": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^txcd_\\d{8}$",
            "description": "Product tax code.\n\nSee: https://docs.stripe.com/tax/tax-codes",
            "title": "Tax code",
            "example": "txcd_10000000"
          }
        },
        "description": "The tax config for Stripe."
      },
      "StripeWebhookEvent": {
        "type": "object",
        "required": [
          "id",
          "type",
          "livemode",
          "created",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The event ID."
          },
          "type": {
            "type": "string",
            "description": "The event type."
          },
          "livemode": {
            "type": "boolean",
            "description": "Live mode."
          },
          "created": {
            "type": "integer",
            "format": "int32",
            "description": "The event created timestamp."
          },
          "data": {
            "type": "object",
            "properties": {
              "object": {}
            },
            "required": [
              "object"
            ],
            "description": "The event data."
          }
        },
        "description": "Stripe webhook event."
      },
      "StripeWebhookResponse": {
        "type": "object",
        "required": [
          "namespaceId",
          "appId"
        ],
        "properties": {
          "namespaceId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "appId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "message": {
            "type": "string"
          }
        },
        "description": "Stripe webhook response."
      },
      "Subject": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "key"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the subject.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "description": "A unique, human-readable identifier for the subject.\nThis is typically a database ID or a customer key.",
            "example": "customer-db-id-123"
          },
          "displayName": {
            "type": "string",
            "nullable": true,
            "description": "A human-readable display name for the subject.",
            "example": "Customer Name"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "Metadata for the subject.",
            "example": {
              "hubspotId": "123456"
            }
          },
          "currentPeriodStart": {
            "type": "string",
            "format": "date-time",
            "description": "The start of the current period for the subject.",
            "example": "2023-01-01T00:00:00Z",
            "deprecated": true
          },
          "currentPeriodEnd": {
            "type": "string",
            "format": "date-time",
            "description": "The end of the current period for the subject.",
            "example": "2023-02-01T00:00:00Z",
            "deprecated": true
          },
          "stripeCustomerId": {
            "type": "string",
            "nullable": true,
            "description": "The Stripe customer ID for the subject.",
            "deprecated": true,
            "example": "cus_JMOlctsKV8"
          }
        },
        "description": "A subject is a unique identifier for a usage attribution by its key.\nSubjects only exist in the concept of metering.\nSubjects are optional to create and work as an enrichment for the subject key like displayName, metadata, etc.\nSubjects are useful when you are reporting usage events with your own database ID but want to enrich the subject with a human-readable name or metadata.\nFor most use cases, a subject is equivalent to a customer.",
        "example": {
          "createdAt": "2025-01-01T01:01:01.001Z",
          "updatedAt": "2025-02-01T01:01:01.001Z",
          "deletedAt": "2025-03-01T01:01:01.001Z",
          "id": "01G65Z755AFWAKHE12NY0CQ9FH",
          "key": "customer-id",
          "displayName": "Customer Name",
          "metadata": {
            "hubspotId": "123456"
          },
          "stripeCustomerId": "cus_JMOlctsKV8"
        }
      },
      "SubjectUpsert": {
        "type": "object",
        "required": [
          "key"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "A unique, human-readable identifier for the subject.\nThis is typically a database ID or a customer key.",
            "example": "customer-db-id-123"
          },
          "displayName": {
            "type": "string",
            "nullable": true,
            "description": "A human-readable display name for the subject.",
            "example": "Customer Name"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true,
            "description": "Metadata for the subject.",
            "example": {
              "hubspotId": "123456"
            }
          },
          "currentPeriodStart": {
            "type": "string",
            "format": "date-time",
            "description": "The start of the current period for the subject.",
            "example": "2023-01-01T00:00:00Z",
            "deprecated": true
          },
          "currentPeriodEnd": {
            "type": "string",
            "format": "date-time",
            "description": "The end of the current period for the subject.",
            "example": "2023-02-01T00:00:00Z",
            "deprecated": true
          },
          "stripeCustomerId": {
            "type": "string",
            "nullable": true,
            "description": "The Stripe customer ID for the subject.",
            "deprecated": true,
            "example": "cus_JMOlctsKV8"
          }
        },
        "description": "A subject is a unique identifier for a user or entity.",
        "example": {
          "key": "customer-id",
          "displayName": "Customer Name",
          "metadata": {
            "hubspotId": "123456"
          },
          "stripeCustomerId": "cus_JMOlctsKV8"
        }
      },
      "Subscription": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "activeFrom",
          "status",
          "customerId",
          "currency",
          "billingCadence",
          "billingAnchor"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          },
          "alignment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Alignment"
              }
            ],
            "description": "Alignment configuration for the plan."
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionStatus"
              }
            ],
            "description": "The status of the subscription.",
            "readOnly": true
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The customer ID of the subscription.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "plan": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PlanReference"
              }
            ],
            "description": "The plan of the subscription."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency code of the subscription.\nWill be revised once we add multi currency support.",
            "title": "Currency",
            "default": "USD"
          },
          "billingCadence": {
            "type": "string",
            "format": "duration",
            "description": "The billing cadence for the subscriptions.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).",
            "title": "Billing cadence",
            "example": "P1M",
            "readOnly": true
          },
          "proRatingConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProRatingConfig"
              }
            ],
            "description": "The pro-rating configuration for the subscriptions.",
            "title": "Pro-rating configuration",
            "default": {
              "enabled": true,
              "mode": "max_consumption_based"
            },
            "readOnly": true
          },
          "billingAnchor": {
            "type": "string",
            "format": "date-time",
            "description": "The normalizedbilling anchor of the subscription.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Billing anchor",
            "readOnly": true
          }
        },
        "description": "Subscription is an exact subscription instance."
      },
      "SubscriptionAccess": {
        "type": "object",
        "required": [
          "subscriptionId",
          "customerId",
          "entitlements"
        ],
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The subscription ID this access is for.",
            "readOnly": true
          },
          "customerId": {
            "type": "string",
            "description": "The customer ID that owns this subscription.",
            "readOnly": true
          },
          "planKey": {
            "type": "string",
            "description": "The plan key of the subscription.",
            "readOnly": true
          },
          "paymentStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPaymentStatus"
              }
            ],
            "description": "The payment status of the current subscription phase."
          },
          "entitlements": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/EntitlementValue"
            },
            "description": "Map of feature keys to entitlement values for this subscription."
          },
          "accessBlocked": {
            "type": "boolean",
            "description": "If true, end-user API requests for this subscription are denied by the monetization policy. Toggled via the block-access and unblock-access endpoints.",
            "readOnly": true
          }
        },
        "description": "Access information for a specific subscription including entitlements and usage."
      },
      "SubscriptionAddon": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "activeFrom",
          "addon",
          "quantityAt",
          "quantity",
          "timeline",
          "subscriptionId",
          "rateCards"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "addon": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
                "description": "The ID of the add-on.",
                "example": "01G65Z755AFWAKHE12NY0CQ9FH",
                "title": "ID"
              },
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
                "description": "A semi-unique identifier for the resource.",
                "title": "Key",
                "readOnly": true
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The version of the Add-on which templates this instance.",
                "title": "Version",
                "default": 1,
                "readOnly": true
              },
              "instanceType": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AddonInstanceType"
                  }
                ],
                "description": "The instance type of the add-on.",
                "title": "InstanceType",
                "readOnly": true
              }
            },
            "required": [
              "id",
              "key",
              "version",
              "instanceType"
            ],
            "description": "Partially populated add-on properties.",
            "title": "Addon"
          },
          "quantityAt": {
            "type": "string",
            "format": "date-time",
            "description": "For which point in time the quantity was resolved to.",
            "example": "2025-01-05T00:00:00Z",
            "title": "QuantityAt",
            "readOnly": true
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "description": "The quantity of the add-on. Always 1 for single instance add-ons.",
            "title": "Quantity",
            "example": 1
          },
          "timeline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionAddonTimelineSegment"
            },
            "description": "The timeline of the add-on. The returned periods are sorted and continuous.",
            "title": "Timeline",
            "example": [
              {
                "quantity": 1,
                "activeFrom": "2025-01-01T00:00:00Z",
                "activeTo": "2025-01-02T00:00:00Z"
              },
              {
                "quantity": 0,
                "activeFrom": "2025-01-02T00:00:00Z",
                "activeTo": "2025-01-03T00:00:00Z"
              },
              {
                "quantity": 1,
                "activeFrom": "2025-01-03T00:00:00Z"
              }
            ],
            "readOnly": true
          },
          "subscriptionId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The ID of the subscription.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "SubscriptionID",
            "readOnly": true
          },
          "rateCards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionAddonRateCard"
            },
            "description": "The rate cards of the add-on.",
            "title": "Rate cards",
            "readOnly": true
          }
        },
        "description": "A subscription add-on, represents concrete instances of an add-on for a given subscription."
      },
      "SubscriptionAddonCreate": {
        "type": "object",
        "required": [
          "name",
          "quantity",
          "timing",
          "addon"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "description": "The quantity of the add-on. Always 1 for single instance add-ons.",
            "title": "Quantity",
            "example": 1
          },
          "timing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionTiming"
              }
            ],
            "description": "The timing of the operation. After the create or update, a new entry will be created in the timeline.",
            "title": "Timing"
          },
          "addon": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
                "description": "The ID of the add-on.",
                "example": "01G65Z755AFWAKHE12NY0CQ9FH"
              }
            },
            "required": [
              "id"
            ],
            "description": "The add-on to create.",
            "title": "Addon"
          }
        },
        "description": "A subscription add-on create body."
      },
      "SubscriptionAddonRateCard": {
        "type": "object",
        "required": [
          "rateCard",
          "affectedSubscriptionItemIds"
        ],
        "properties": {
          "rateCard": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateCard"
              }
            ],
            "description": "The rate card.",
            "title": "Rate card"
          },
          "affectedSubscriptionItemIds": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
              "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
              "example": "01G65Z755AFWAKHE12NY0CQ9FH"
            },
            "description": "The IDs of the subscription items that this rate card belongs to.",
            "title": "Affected subscription item IDs",
            "readOnly": true
          }
        },
        "description": "A rate card for a subscription add-on."
      },
      "SubscriptionAddonTimelineSegment": {
        "type": "object",
        "required": [
          "activeFrom",
          "quantity"
        ],
        "properties": {
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "description": "The quantity of the add-on for the given period.",
            "title": "Quantity",
            "example": 1,
            "readOnly": true
          }
        },
        "description": "A subscription add-on event."
      },
      "SubscriptionAddonUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "description": "The quantity of the add-on. Always 1 for single instance add-ons.",
            "title": "Quantity",
            "example": 1
          },
          "timing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionTiming"
              }
            ],
            "description": "The timing of the operation. After the create or update, a new entry will be created in the timeline.",
            "title": "Timing"
          }
        },
        "description": "Resource create or update operation model."
      },
      "SubscriptionAlignment": {
        "type": "object",
        "properties": {
          "billablesMustAlign": {
            "type": "boolean",
            "description": "Whether all Billable items and RateCards must align.\nAlignment means the Price's BillingCadence must align for both duration and anchor time.",
            "deprecated": true
          },
          "currentAlignedBillingPeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Period"
              }
            ],
            "description": "The current billing period. Only has value if the subscription is aligned and active."
          }
        },
        "description": "Alignment details enriched with the current billing period."
      },
      "SubscriptionBadRequestErrorResponse": {
        "type": "object",
        "required": [
          "type",
          "title",
          "detail",
          "instance"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "Type contains a URI that identifies the problem type.",
            "example": "about:blank",
            "default": "about:blank"
          },
          "title": {
            "type": "string",
            "description": "A a short, human-readable summary of the problem type.",
            "example": "Bad Request"
          },
          "status": {
            "type": "integer",
            "format": "int16",
            "minimum": 400,
            "maximum": 599,
            "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
            "example": 400
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "example": "The request body must be a JSON object."
          },
          "instance": {
            "type": "string",
            "format": "uri",
            "description": "A URI reference that identifies the specific occurrence of the problem.",
            "example": "urn:request:local/JMOlctsKV8-000001"
          },
          "extensions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionErrorExtensions"
              }
            ],
            "description": "Additional properties specific to the problem type may be present."
          }
        },
        "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). Variants with ErrorExtensions specific to subscriptions."
      },
      "SubscriptionChange": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PlanSubscriptionChange"
          },
          {
            "$ref": "#/components/schemas/CustomSubscriptionChange"
          }
        ],
        "description": "Change a subscription."
      },
      "SubscriptionChangeCreditEstimate": {
        "type": "object",
        "required": [
          "creditAmount",
          "currency",
          "maxPercentage",
          "timePercentage",
          "consumptionPercentage",
          "upfrontCost",
          "overflowCredit"
        ],
        "properties": {
          "creditAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The total estimated credit amount."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency of the credit."
          },
          "maxPercentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The max(time%, consumption%) used in the calculation (as a ratio, e.g. 0.35 = 35%)."
          },
          "timePercentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The time-based percentage consumed in the current billing period (as a ratio)."
          },
          "consumptionPercentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The max entitlement consumption percentage across metered items (as a ratio)."
          },
          "upfrontCost": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The total upfront cost of the subscription used as the base for the credit."
          },
          "overflowCredit": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The overflow credit from previous subscription changes (multi-hop A→B→C)."
          }
        },
        "description": "Estimated proration credit for a subscription change."
      },
      "SubscriptionChangeResponseBody": {
        "type": "object",
        "required": [
          "current",
          "next"
        ],
        "properties": {
          "current": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Subscription"
              }
            ],
            "description": "The current subscription before the change.",
            "title": "Current subscription"
          },
          "next": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionExpanded"
              }
            ],
            "description": "The new state of the subscription after the change.",
            "title": "The subscription it will be changed to"
          }
        },
        "description": "Response body for subscription change."
      },
      "SubscriptionConflictErrorResponse": {
        "type": "object",
        "required": [
          "type",
          "title",
          "detail",
          "instance"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "Type contains a URI that identifies the problem type.",
            "example": "about:blank",
            "default": "about:blank"
          },
          "title": {
            "type": "string",
            "description": "A a short, human-readable summary of the problem type.",
            "example": "Bad Request"
          },
          "status": {
            "type": "integer",
            "format": "int16",
            "minimum": 400,
            "maximum": 599,
            "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
            "example": 400
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "example": "The request body must be a JSON object."
          },
          "instance": {
            "type": "string",
            "format": "uri",
            "description": "A URI reference that identifies the specific occurrence of the problem.",
            "example": "urn:request:local/JMOlctsKV8-000001"
          },
          "extensions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionErrorExtensions"
              }
            ],
            "description": "Additional properties specific to the problem type may be present."
          }
        },
        "description": "The request could not be completed due to a conflict with the current state of the target resource.\nVariants with ErrorExtensions specific to subscriptions."
      },
      "SubscriptionCreate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PlanSubscriptionCreate"
          },
          {
            "$ref": "#/components/schemas/CustomSubscriptionCreate"
          }
        ],
        "description": "Create a subscription."
      },
      "SubscriptionEdit": {
        "type": "object",
        "required": [
          "customizations"
        ],
        "properties": {
          "customizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionEditOperation"
            },
            "maxItems": 100,
            "description": "Batch processing commands for manipulating running subscriptions.\nThe key format is `/phases/{phaseKey}` or `/phases/{phaseKey}/items/{itemKey}`."
          },
          "timing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionTiming"
              }
            ],
            "description": "Whether the billing period should be restarted.Timing configuration to allow for the changes to take effect at different times."
          }
        },
        "description": "Subscription edit input."
      },
      "SubscriptionEditOperation": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EditSubscriptionAddItem"
          },
          {
            "$ref": "#/components/schemas/EditSubscriptionRemoveItem"
          },
          {
            "$ref": "#/components/schemas/EditSubscriptionAddPhase"
          },
          {
            "$ref": "#/components/schemas/EditSubscriptionRemovePhase"
          },
          {
            "$ref": "#/components/schemas/EditSubscriptionStretchPhase"
          },
          {
            "$ref": "#/components/schemas/EditSubscriptionUnscheduleEdit"
          }
        ],
        "discriminator": {
          "propertyName": "op",
          "mapping": {
            "add_item": "#/components/schemas/EditSubscriptionAddItem",
            "remove_item": "#/components/schemas/EditSubscriptionRemoveItem",
            "add_phase": "#/components/schemas/EditSubscriptionAddPhase",
            "remove_phase": "#/components/schemas/EditSubscriptionRemovePhase",
            "stretch_phase": "#/components/schemas/EditSubscriptionStretchPhase",
            "unschedule_edit": "#/components/schemas/EditSubscriptionUnscheduleEdit"
          }
        },
        "description": "The operation to be performed on the subscription."
      },
      "SubscriptionEntitlements": {
        "type": "object",
        "required": [
          "subscriptionId",
          "entitlements"
        ],
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The subscription ID these entitlements belong to.",
            "readOnly": true
          },
          "entitlements": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/EntitlementValue"
            },
            "description": "Map of entitlements for this subscription.\nThe key is the feature key, the value is the entitlement value.",
            "readOnly": true
          },
          "paymentStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPaymentStatus"
              }
            ],
            "description": "Payment status details for the subscription's current phase.\nUse this to determine if access should be granted based on payment state.",
            "readOnly": true
          }
        },
        "description": "SubscriptionEntitlements describes entitlements for a specific subscription."
      },
      "SubscriptionErrorExtensions": {
        "type": "object",
        "properties": {
          "validationErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorExtension"
            }
          }
        },
        "required": [
          "validationErrors"
        ],
        "description": "Error extensions for the Subscription Errors."
      },
      "SubscriptionExpanded": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "activeFrom",
          "status",
          "customerId",
          "currency",
          "billingCadence",
          "billingAnchor",
          "phases"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "annotations": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Set of key-value pairs managed by the system. Cannot be modified by user.",
            "title": "Annotations",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionStatus"
              }
            ],
            "description": "The status of the subscription.",
            "readOnly": true
          },
          "customerId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The customer ID of the subscription.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "plan": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PlanReference"
              }
            ],
            "description": "The plan of the subscription."
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ],
            "description": "The currency code of the subscription.\nWill be revised once we add multi currency support.",
            "title": "Currency",
            "default": "USD"
          },
          "billingCadence": {
            "type": "string",
            "format": "duration",
            "description": "The billing cadence for the subscriptions.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).",
            "title": "Billing cadence",
            "example": "P1M",
            "readOnly": true
          },
          "proRatingConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProRatingConfig"
              }
            ],
            "description": "The pro-rating configuration for the subscriptions.",
            "title": "Pro-rating configuration",
            "default": {
              "enabled": true,
              "mode": "max_consumption_based"
            },
            "readOnly": true
          },
          "billingAnchor": {
            "type": "string",
            "format": "date-time",
            "description": "The normalizedbilling anchor of the subscription.",
            "example": "2023-01-01T01:01:01.001Z",
            "title": "Billing anchor",
            "readOnly": true
          },
          "alignment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionAlignment"
              }
            ],
            "description": "Alignment details enriched with the current billing period."
          },
          "phases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionPhaseExpanded"
            },
            "description": "The phases of the subscription."
          }
        },
        "description": "Expanded subscription"
      },
      "SubscriptionItem": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "activeFrom",
          "key",
          "billingCadence",
          "price"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence start of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The cadence end of the resource.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The identifier of the RateCard.\nSubscriptionItem/RateCard can be identified, it has a reference:\n\n1. If a Feature is associated with the SubscriptionItem, it is identified by the Feature\n1.1 It can be an ID reference, for an exact version of the Feature (Features can change across versions)\n1.2 It can be a Key reference, which always refers to the latest (active or inactive) version of a Feature\n\n2. If a Feature is not associated with the SubscriptionItem, it is referenced by the Price\n\nWe say \"referenced by the Price\" regardless of how a price itself is referenced, it colloquially makes sense to say \"paying the same price for the same thing\". In practice this should be derived from what's printed on the invoice line-item."
          },
          "featureKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "The feature's key (if present)."
          },
          "billingCadence": {
            "type": "string",
            "format": "duration",
            "nullable": true,
            "description": "The billing cadence of the rate card.\nWhen null, the rate card is a one-time purchase.",
            "title": "Billing cadence"
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RateCardUsageBasedPrice"
              }
            ],
            "nullable": true,
            "description": "The price of the rate card.\nWhen null, the feature or service is free.",
            "title": "Price",
            "example": {
              "type": "flat",
              "amount": "100",
              "paymentTerm": "in_arrears"
            }
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Discounts"
              }
            ],
            "description": "The discounts applied to the rate card.",
            "title": "Discounts"
          },
          "included": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionItemIncluded"
              }
            ],
            "description": "Describes what access is gained via the SubscriptionItem"
          },
          "taxConfig": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxConfig"
              }
            ],
            "description": "The tax config of the Subscription Item.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.",
            "title": "Tax config"
          }
        },
        "description": "The actual contents of the Subscription, what the user gets, what they pay, etc..."
      },
      "SubscriptionItemIncluded": {
        "type": "object",
        "required": [
          "feature"
        ],
        "properties": {
          "feature": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Feature"
              }
            ],
            "description": "The feature the customer is entitled to use."
          },
          "entitlement": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Entitlement"
              }
            ],
            "description": "The entitlement of the Subscription Item."
          }
        },
        "description": "Included contents like Entitlement, or the Feature."
      },
      "SubscriptionPaginatedResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "page",
          "pageSize",
          "items"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of items.",
            "example": 500
          },
          "page": {
            "type": "integer",
            "description": "The page index.",
            "example": 1
          },
          "pageSize": {
            "type": "integer",
            "description": "The maximum number of items per page.",
            "example": 100
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Subscription"
            },
            "description": "The items in the current page."
          }
        },
        "description": "Paginated response"
      },
      "SubscriptionPaymentStatus": {
        "type": "object",
        "required": [
          "status",
          "isFirstPayment",
          "maxPaymentOverdueDays"
        ],
        "properties": {
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPaymentStatusType"
              }
            ],
            "description": "The current payment status.",
            "readOnly": true
          },
          "isFirstPayment": {
            "type": "boolean",
            "description": "True if this subscription has never had a successful payment.\nUseful for distinguishing \"first payment pending\" from \"renewal payment failed\".",
            "readOnly": true
          },
          "lastPaymentSucceededAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when payment was last successfully collected.",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "lastPaymentFailedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when payment last failed (for implementing grace periods).",
            "example": "2023-01-01T01:01:01.001Z",
            "readOnly": true
          },
          "maxPaymentOverdueDays": {
            "type": "integer",
            "description": "Number of days after lastPaymentFailedAt before access is revoked. Default is 3. Applies only to renewal payment failures (isFirstPayment: false). For first payment failures, access is blocked immediately regardless of this value.",
            "example": 3,
            "readOnly": true
          }
        },
        "description": "Payment status details for a subscription phase.\nProvides status, timestamps, and whether this is the subscription's first payment."
      },
      "SubscriptionPaymentStatusType": {
        "type": "string",
        "enum": [
          "paid",
          "not_required",
          "pending",
          "failed",
          "uncollectible"
        ],
        "description": "Payment status values for a subscription phase."
      },
      "SubscriptionPhase": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "key",
          "activeFrom"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A locally unique identifier for the resource."
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Discounts"
              }
            ],
            "description": "The discounts on the plan.",
            "title": "Discounts"
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The time from which the phase is active.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The until which the Phase is active.",
            "example": "2023-01-01T01:01:01.001Z"
          }
        },
        "description": "Subscription phase, analogous to plan phases."
      },
      "SubscriptionPhaseCreate": {
        "type": "object",
        "required": [
          "startAfter",
          "key",
          "name"
        ],
        "properties": {
          "startAfter": {
            "type": "string",
            "format": "duration",
            "nullable": true,
            "description": "Interval after the subscription starts to transition to the phase.\nWhen null, the phase starts immediately after the subscription starts.",
            "title": "Start after",
            "example": "P1Y"
          },
          "duration": {
            "type": "string",
            "format": "duration",
            "description": "The intended duration of the new phase.\nDuration is required when the phase will not be the last phase.",
            "title": "Duration",
            "example": "P1M"
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Discounts"
              }
            ],
            "description": "The discounts on the plan.",
            "title": "Discounts"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A locally unique identifier for the phase."
          },
          "name": {
            "type": "string",
            "description": "The name of the phase."
          },
          "description": {
            "type": "string",
            "description": "The description of the phase."
          }
        },
        "description": "Subscription phase create input."
      },
      "SubscriptionPhaseExpanded": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "key",
          "activeFrom",
          "items",
          "itemTimelines"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "A unique identifier for the resource.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "title": "ID",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Human-readable name for the resource. Between 1 and 256 characters.",
            "title": "Display name"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional description of the resource. Maximum 1024 characters.",
            "title": "Description"
          },
          "metadata": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "nullable": true,
            "description": "Additional metadata for the resource.",
            "title": "Metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
            "description": "A locally unique identifier for the resource."
          },
          "discounts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Discounts"
              }
            ],
            "description": "The discounts on the plan.",
            "title": "Discounts"
          },
          "activeFrom": {
            "type": "string",
            "format": "date-time",
            "description": "The time from which the phase is active.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "activeTo": {
            "type": "string",
            "format": "date-time",
            "description": "The until which the Phase is active.",
            "example": "2023-01-01T01:01:01.001Z"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionItem"
            },
            "description": "The items of the phase. The structure is flattened to better conform to the Plan API.\nThe timelines are flattened according to the following rules:\n- for the current phase, the `items` contains only the active item for each key\n- for past phases, the `items` contains only the last item for each key\n- for future phases, the `items` contains only the first version of the item for each key"
          },
          "itemTimelines": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SubscriptionItem"
              }
            },
            "description": "Includes all versions of the items on each key, including all edits, scheduled changes, etc..."
          }
        },
        "description": "Expanded subscription phase"
      },
      "SubscriptionStatus": {
        "type": "string",
        "enum": [
          "active",
          "inactive",
          "canceled",
          "scheduled"
        ],
        "description": "Subscription status."
      },
      "SubscriptionTiming": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/SubscriptionTimingEnum"
          },
          {
            "type": "string",
            "format": "date-time",
            "description": "[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.",
            "example": "2023-01-01T01:01:01.001Z"
          }
        ],
        "description": "Subscription edit timing defined when the changes should take effect.\nIf the provided configuration is not supported by the subscription, an error will be returned."
      },
      "SubscriptionTimingEnum": {
        "type": "string",
        "enum": [
          "immediate",
          "next_billing_cycle"
        ],
        "description": "Subscription edit timing.\nWhen immediate, the requested changes take effect immediately.\nWhen nextBillingCycle, the requested changes take effect at the next billing cycle."
      },
      "TaxBehavior": {
        "type": "string",
        "enum": [
          "inclusive",
          "exclusive"
        ],
        "description": "Tax behavior.\n\nThis enum is used to specify whether tax is included in the price or excluded from the price."
      },
      "TaxCalculationItem": {
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "minimum": 0,
            "description": "The amount in the smallest currency unit (e.g. cents for USD)."
          }
        },
        "description": "TaxCalculationItem represents a single line item for tax calculation."
      },
      "TaxCalculationItemResult": {
        "type": "object",
        "required": [
          "amount",
          "taxAmount"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "description": "The original amount before tax in the smallest currency unit."
          },
          "taxAmount": {
            "type": "integer",
            "description": "The tax amount for this item in the smallest currency unit."
          }
        },
        "description": "TaxCalculationItemResult contains the tax calculation result for a single line item."
      },
      "TaxConfig": {
        "type": "object",
        "properties": {
          "behavior": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxBehavior"
              }
            ],
            "description": "Tax behavior.\n\nIf not specified the billing profile is used to determine the tax behavior.\nIf not specified in the billing profile, the provider's default behavior is used.",
            "title": "Tax behavior"
          },
          "stripe": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StripeTaxConfig"
              }
            ],
            "description": "Stripe tax config.",
            "title": "Stripe tax config"
          },
          "customInvoicing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomInvoicingTaxConfig"
              }
            ],
            "description": "Custom invoicing tax config.",
            "title": "Custom invoicing tax config"
          }
        },
        "description": "Set of provider specific tax configs."
      },
      "TaxItem": {
        "type": "object",
        "required": [
          "jurisdiction",
          "rate",
          "amount",
          "taxType"
        ],
        "properties": {
          "jurisdiction": {
            "type": "string",
            "description": "Two-letter country code (ISO 3166-1 alpha-2) of the jurisdiction imposing the tax (e.g. \"GB\")."
          },
          "rate": {
            "type": "string",
            "description": "The tax rate as a percentage string (e.g. \"20.0\")."
          },
          "amount": {
            "type": "integer",
            "description": "The tax amount for this jurisdiction in the smallest currency unit."
          },
          "taxType": {
            "type": "string",
            "description": "The type of tax (e.g. \"vat\", \"sales_tax\", \"gst\")."
          }
        },
        "description": "TaxItem represents a single jurisdiction's tax in the breakdown."
      },
      "TieredPrice": {
        "type": "object",
        "required": [
          "type",
          "mode",
          "tiers"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "tiered"
            ],
            "description": "The type of the price.\n\nOne of: flat, unit, or tiered."
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TieredPriceMode"
              }
            ],
            "description": "Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.",
            "title": "Mode"
          },
          "tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceTier"
            },
            "minItems": 1,
            "description": "The tiers of the tiered price.\nAt least one price component is required in each tier.",
            "title": "Tiers"
          }
        },
        "description": "Tiered price."
      },
      "TieredPriceMode": {
        "type": "string",
        "enum": [
          "volume",
          "graduated"
        ],
        "description": "The mode of the tiered price."
      },
      "TieredPriceWithCommitments": {
        "type": "object",
        "required": [
          "type",
          "mode",
          "tiers"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "tiered"
            ],
            "description": "The type of the price.\n\nOne of: flat, unit, or tiered."
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TieredPriceMode"
              }
            ],
            "description": "Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.",
            "title": "Mode"
          },
          "tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceTier"
            },
            "minItems": 1,
            "description": "The tiers of the tiered price.\nAt least one price component is required in each tier.",
            "title": "Tiers"
          },
          "minimumAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The customer is committed to spend at least the amount.",
            "title": "Minimum amount"
          },
          "maximumAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The customer is limited to spend at most the amount.",
            "title": "Maximum amount"
          }
        },
        "description": "Tiered price with spend commitments."
      },
      "ULIDOrExternalKey": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ULID (Universally Unique Lexicographically Sortable Identifier).",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "ExternalKey is a looser version of key."
          }
        ],
        "description": "ULID (Universally Unique Lexicographically Sortable Identifier) or external unique key.",
        "x-go-type": "string"
      },
      "UnauthorizedProblemResponse": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnexpectedProblemResponse"
          }
        ],
        "description": "The request has not been applied because it lacks valid authentication credentials for the target resource."
      },
      "UnexpectedProblemResponse": {
        "type": "object",
        "required": [
          "type",
          "title",
          "detail",
          "instance"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "Type contains a URI that identifies the problem type.",
            "example": "about:blank",
            "default": "about:blank"
          },
          "title": {
            "type": "string",
            "description": "A a short, human-readable summary of the problem type.",
            "example": "Bad Request"
          },
          "status": {
            "type": "integer",
            "format": "int16",
            "minimum": 400,
            "maximum": 599,
            "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
            "example": 400
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "example": "The request body must be a JSON object."
          },
          "instance": {
            "type": "string",
            "format": "uri",
            "description": "A URI reference that identifies the specific occurrence of the problem.",
            "example": "urn:request:local/JMOlctsKV8-000001"
          },
          "extensions": {
            "type": "object",
            "additionalProperties": {},
            "description": "Additional properties specific to the problem type may be present.",
            "example": {
              "validationErrors": [
                {
                  "code": "validation_error",
                  "message": "Validation error"
                }
              ],
              "otherAttribute": "otherValue"
            }
          }
        },
        "additionalProperties": {},
        "description": "A Problem Details object (RFC 7807).\nAdditional properties specific to the problem type may be present.",
        "x-go-type-import": {
          "path": "github.com/openmeterio/openmeter/pkg/models"
        },
        "x-go-type": "models.StatusProblem"
      },
      "UnitPrice": {
        "type": "object",
        "required": [
          "type",
          "amount"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "unit"
            ],
            "description": "The type of the price."
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The amount of the unit price."
          }
        },
        "description": "Unit price."
      },
      "UnitPriceWithCommitments": {
        "type": "object",
        "required": [
          "type",
          "amount"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "unit"
            ],
            "description": "The type of the price."
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The amount of the unit price."
          },
          "minimumAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The customer is committed to spend at least the amount.",
            "title": "Minimum amount"
          },
          "maximumAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Numeric"
              }
            ],
            "description": "The customer is limited to spend at most the amount.",
            "title": "Maximum amount"
          }
        },
        "description": "Unit price with spend commitments."
      },
      "ValidationError": {
        "type": "object",
        "required": [
          "field",
          "code",
          "message"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "The path to the field.",
            "example": "addons/pro/ratecards/token/featureKey",
            "readOnly": true
          },
          "code": {
            "type": "string",
            "description": "The machine readable description of the error.",
            "example": "invalid_feature_key",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "description": "The human readable description of the error.",
            "example": "not found feature by key",
            "readOnly": true
          },
          "attributes": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Annotations"
              }
            ],
            "description": "Additional attributes.",
            "readOnly": true
          }
        },
        "description": "Validation errors providing detailed description of the issue."
      },
      "ValidationErrorProblemResponse": {
        "type": "object",
        "required": [
          "type",
          "title",
          "detail",
          "instance"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "Type contains a URI that identifies the problem type.",
            "example": "about:blank",
            "default": "about:blank"
          },
          "title": {
            "type": "string",
            "description": "A a short, human-readable summary of the problem type.",
            "example": "Bad Request"
          },
          "status": {
            "type": "integer",
            "format": "int16",
            "minimum": 400,
            "maximum": 599,
            "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
            "example": 400
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "example": "The request body must be a JSON object."
          },
          "instance": {
            "type": "string",
            "format": "uri",
            "description": "A URI reference that identifies the specific occurrence of the problem.",
            "example": "urn:request:local/JMOlctsKV8-000001"
          },
          "extensions": {
            "type": "object",
            "properties": {
              "validationErrors": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation issues.",
            "readOnly": true
          }
        },
        "description": "A BadRequestError with a validationErrors extension."
      },
      "ValidationIssue": {
        "type": "object",
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "severity",
          "component",
          "message"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was created.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Creation Time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was last updated.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Last Update Time",
            "readOnly": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the resource was permanently deleted.",
            "example": "2024-01-01T01:01:01.001Z",
            "title": "Deletion Time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "ID of the charge or discount.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH",
            "readOnly": true
          },
          "severity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ValidationIssueSeverity"
              }
            ],
            "description": "The severity of the issue.",
            "readOnly": true
          },
          "field": {
            "type": "string",
            "description": "The field that the issue is related to, if available in JSON path format.",
            "readOnly": true
          },
          "code": {
            "type": "string",
            "description": "Machine indentifiable code for the issue, if available.",
            "readOnly": true
          },
          "component": {
            "type": "string",
            "description": "Component reporting the issue.",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "description": "A human-readable description of the issue.",
            "readOnly": true
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ],
            "description": "Additional context for the issue.",
            "readOnly": true
          }
        },
        "description": "ValidationIssue captures any validation issues related to the invoice.\n\nIssues with severity \"critical\" will prevent the invoice from being issued."
      },
      "ValidationIssueSeverity": {
        "type": "string",
        "enum": [
          "critical",
          "warning"
        ],
        "description": "ValidationIssueSeverity describes the severity of a validation issue.\n\nIssues with severity \"critical\" will prevent the invoice from being issued."
      },
      "VoidInvoiceActionCreate": {
        "type": "object",
        "required": [
          "percentage",
          "action"
        ],
        "properties": {
          "percentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Percentage"
              }
            ],
            "description": "How much of the total line items to be voided? (e.g. 100% means all charges are voided)"
          },
          "action": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VoidInvoiceLineActionCreate"
              }
            ],
            "description": "The action to take on the line items."
          }
        },
        "description": "InvoiceVoidAction describes how to handle the voided line items."
      },
      "VoidInvoiceActionCreateItem": {
        "type": "object",
        "required": [
          "percentage",
          "action"
        ],
        "properties": {
          "percentage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Percentage"
              }
            ],
            "description": "How much of the total line items to be voided? (e.g. 100% means all charges are voided)"
          },
          "action": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VoidInvoiceLineActionCreateItem"
              }
            ],
            "description": "The action to take on the line items."
          }
        },
        "description": "InvoiceVoidAction describes how to handle the voided line items."
      },
      "VoidInvoiceActionInput": {
        "type": "object",
        "required": [
          "action",
          "reason"
        ],
        "properties": {
          "action": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VoidInvoiceActionCreate"
              }
            ],
            "description": "The action to take on the voided line items."
          },
          "reason": {
            "type": "string",
            "description": "The reason for voiding the invoice."
          },
          "overrides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoidInvoiceActionLineOverride"
            },
            "nullable": true,
            "description": "Per line item overrides for the action.\n\nIf not specified, the `action` will be applied to all line items."
          }
        },
        "description": "Request to void an invoice"
      },
      "VoidInvoiceActionLineOverride": {
        "type": "object",
        "required": [
          "lineId",
          "action"
        ],
        "properties": {
          "lineId": {
            "type": "string",
            "pattern": "^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$",
            "description": "The line item ID to override.",
            "example": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "action": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VoidInvoiceActionCreateItem"
              }
            ],
            "description": "The action to take on the line item."
          }
        },
        "description": "VoidInvoiceLineOverride describes how to handle a specific line item in the invoice when voiding."
      },
      "VoidInvoiceLineActionCreate": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoidInvoiceLineDiscardAction"
          },
          {
            "$ref": "#/components/schemas/VoidInvoiceLinePendingActionCreate"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "discard": "#/components/schemas/VoidInvoiceLineDiscardAction",
            "pending": "#/components/schemas/VoidInvoiceLinePendingActionCreate"
          }
        },
        "description": "VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding."
      },
      "VoidInvoiceLineActionCreateItem": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoidInvoiceLineDiscardAction"
          },
          {
            "$ref": "#/components/schemas/VoidInvoiceLinePendingActionCreateItem"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "discard": "#/components/schemas/VoidInvoiceLineDiscardAction",
            "pending": "#/components/schemas/VoidInvoiceLinePendingActionCreateItem"
          }
        },
        "description": "VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding."
      },
      "VoidInvoiceLineActionType": {
        "type": "string",
        "enum": [
          "discard",
          "pending"
        ],
        "description": "VoidInvoiceLineActionType describes how to handle the voidied line item in the invoice."
      },
      "VoidInvoiceLineDiscardAction": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "discard"
            ],
            "description": "The action to take on the line item."
          }
        },
        "description": "VoidInvoiceLineDiscardAction describes how to handle the voidied line item in the invoice."
      },
      "VoidInvoiceLinePendingActionCreate": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "pending"
            ],
            "description": "The action to take on the line item."
          },
          "nextInvoiceAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time at which the line item should be invoiced again.\n\nIf not provided, the line item will be re-invoiced now.",
            "example": "2023-01-01T01:01:01.001Z"
          }
        },
        "description": "VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice."
      },
      "VoidInvoiceLinePendingActionCreateItem": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "pending"
            ],
            "description": "The action to take on the line item."
          },
          "nextInvoiceAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time at which the line item should be invoiced again.\n\nIf not provided, the line item will be re-invoiced now.",
            "example": "2023-01-01T01:01:01.001Z"
          }
        },
        "description": "VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice."
      },
      "WindowSize": {
        "type": "string",
        "enum": [
          "MINUTE",
          "HOUR",
          "DAY",
          "MONTH"
        ],
        "description": "Aggregation window size.",
        "x-enum-varnames": [
          "Minute",
          "Hour",
          "Day",
          "Month"
        ]
      },
      "WindowedBalanceHistory": {
        "type": "object",
        "required": [
          "windowedHistory",
          "burndownHistory"
        ],
        "properties": {
          "windowedHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceHistoryWindow"
            },
            "description": "The windowed balance history.\n- It only returns rows for windows where there was usage.\n- The windows are inclusive at their start and exclusive at their end.\n- The last window may be smaller than the window size and is inclusive at both ends."
          },
          "burndownHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrantBurnDownHistorySegment"
            },
            "description": "Grant burndown history."
          }
        },
        "description": "The windowed balance history."
      },
      "SubscriptionAccessUpdate": {
        "type": "object",
        "required": [
          "subscriptionId",
          "accessBlocked"
        ],
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The subscription ID whose access state was updated.",
            "readOnly": true
          },
          "accessBlocked": {
            "type": "boolean",
            "description": "The new access-blocked state.",
            "readOnly": true
          }
        },
        "description": "Response payload returned by the block-access and unblock-access endpoints."
      }
    },
    "securitySchemes": {
      "DeveloperApiKey": {
        "type": "http",
        "scheme": "Bearer",
        "description": "A scoped Zuplo account API key sent as a bearer token. Create account API keys in Account Settings and grant only the access required for the calling agent or automation. These credentials are distinct from consumer keys issued through the Zuplo API Key Service."
      },
      "PortalTokenAuth": {
        "type": "http",
        "scheme": "Bearer",
        "description": "Consumer portal token."
      }
    },
    "responses": {
      "RateLimitNoRetryAfter": {
        "description": "Rate Limiting Response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "type",
                "title",
                "status"
              ],
              "examples": [
                {
                  "type": "https://httpproblems.com/http-status/429",
                  "title": "Too Many Requests",
                  "status": 429,
                  "instance": "/foo/bar"
                }
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "example": "https://httpproblems.com/http-status/429",
                  "description": "A URI reference that identifies the problem."
                },
                "title": {
                  "type": "string",
                  "example": "Too Many Requests",
                  "description": "A short, human-readable summary of the problem."
                },
                "status": {
                  "type": "number",
                  "example": 429,
                  "description": "The HTTP status code."
                },
                "instance": {
                  "type": "string",
                  "example": "/foo/bar"
                }
              }
            }
          }
        }
      },
      "RateLimitWithRetryAfter": {
        "description": "Rate Limiting Response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "type",
                "title",
                "status"
              ],
              "examples": [
                {
                  "type": "https://httpproblems.com/http-status/429",
                  "title": "Too Many Requests",
                  "status": 429,
                  "instance": "/foo/bar"
                }
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "example": "https://httpproblems.com/http-status/429",
                  "description": "A URI reference that identifies the problem."
                },
                "title": {
                  "type": "string",
                  "example": "Too Many Requests",
                  "description": "A short, human-readable summary of the problem."
                },
                "status": {
                  "type": "number",
                  "example": 429,
                  "description": "The HTTP status code."
                },
                "instance": {
                  "type": "string",
                  "example": "/foo/bar"
                }
              }
            }
          }
        },
        "headers": {
          "retry-after": {
            "description": "The number of seconds to wait before making a new request.",
            "schema": {
              "type": "integer",
              "example": 60
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://dev.zuplo.com",
      "description": "Zuplo API"
    }
  ],
  "x-permissions": {
    "documentation": "https://zuplo.com/docs/articles/accounts/zuplo-api-keys",
    "guidance": "Create one Zuplo account API key per agent or automation and grant only the access required for its task.",
    "dimensions": [
      "project access",
      "environment access",
      "project permissions",
      "account permissions"
    ]
  }
}