{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mammoth-io/json-schema/mammoth-io-update-plan-request-schema-schema.json",
  "title": "UpdatePlanRequestSchema",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mammoth-io-openapi.json#/components/schemas/UpdatePlanRequestSchema",
  "properties": {
    "name": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "maxLength": 128,
      "minLength": 2,
      "description": "Plan name"
    },
    "display_name": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "maxLength": 128,
      "minLength": 2,
      "description": "Plan display name"
    },
    "description": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "maxLength": 500,
      "description": "Plan description"
    },
    "monthly_price": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "description": "Monthly price in USD"
    },
    "annual_price": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "description": "Annual price in USD"
    },
    "annual_only": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether plan is annual only"
    },
    "is_self_serve": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether users can self-subscribe"
    },
    "trial_days": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "maximum": 365,
      "description": "Trial period in days"
    },
    "storage_amount": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Included storage in GB"
    },
    "max_storage": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Maximum storage in GB"
    },
    "max_users": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "minimum": 1,
      "description": "Maximum number of users"
    },
    "no_of_users": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Number of included users"
    },
    "seat_price": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "description": "Price per additional user seat"
    },
    "number_of_tiers": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "maximum": 10,
      "minimum": 1,
      "description": "Number of storage tiers"
    },
    "storage_block_size": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "minimum": 1,
      "description": "Storage block size in GB"
    },
    "tiers": {
      "oneOf": [
        {
          "items": {
            "$ref": "#/$defs/subscription_schemas_StorageTierSchema"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "description": "Storage pricing tiers"
    },
    "uses_inline_pricing": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Bill this plan with composed price_data (plan price plus the chosen storage option) instead of stored Stripe prices"
    },
    "storage_options": {
      "oneOf": [
        {
          "items": {
            "$ref": "#/$defs/StorageOptionRequestSchema"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "description": "Replaces the plan's active storage sizes; sizes left out are archived. Omit to leave the catalog alone."
    },
    "connector_profile_id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "minimum": 1,
      "description": "Connector profile ID"
    },
    "feature_profile_id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "minimum": 1,
      "description": "Feature profile ID"
    },
    "is_purchasable": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether a new customer may pick this plan"
    },
    "lifecycle": {
      "type": [
        "null",
        "string"
      ],
      "enum": [
        "current",
        "legacy",
        "system",
        null
      ],
      "description": "Catalog population: current, legacy or system"
    }
  },
  "type": "object",
  "required": [],
  "$defs": {
    "StorageOptionRequestSchema": {
      "properties": {
        "storage_gb": {
          "type": "integer",
          "maximum": 1000000.0,
          "exclusiveMinimum": 0.0,
          "description": "Total storage the option grants, in GB"
        },
        "monthly_price": {
          "type": "number",
          "minimum": 0.0,
          "description": "Monthly add in USD on top of the plan price"
        },
        "annual_price": {
          "type": "number",
          "minimum": 0.0,
          "description": "Annual add in USD on top of the plan price"
        }
      },
      "type": "object",
      "required": [
        "annual_price",
        "monthly_price",
        "storage_gb"
      ],
      "title": "StorageOptionRequestSchema"
    },
    "subscription_schemas_StorageTierSchema": {
      "properties": {
        "gb": {
          "type": "integer",
          "maximum": 10000.0,
          "minimum": 1.0,
          "exclusiveMinimum": 0.0,
          "description": "Storage amount in GB"
        },
        "price_per_gb": {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0,
          "description": "Price per GB in USD"
        }
      },
      "type": "object",
      "required": [
        "gb",
        "price_per_gb"
      ],
      "title": "StorageTierSchema"
    }
  }
}