{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cadencz-com/json-schema/cadencz-com-plan-change-preview-read-schema.json",
  "title": "PlanChangePreviewRead",
  "description": "Dodo's own quote for a switch, shown before the customer authorises it.\n\nAmounts are provider minor units in `currency`. When `needs_resume` is set\nthere are no amounts to show: Dodo will not quote a subscription that is on\nits way out, so the switch resumes it first and the figures then come from\nDodo's own payment page.",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cadencz-com-openapi.json#/components/schemas/PlanChangePreviewRead",
  "properties": {
    "tier": {
      "type": "string",
      "title": "Tier"
    },
    "tier_name": {
      "type": "string",
      "title": "Tier Name"
    },
    "billing_period": {
      "type": "string",
      "enum": [
        "monthly",
        "yearly"
      ],
      "title": "Billing Period"
    },
    "effective_at": {
      "type": "string",
      "enum": [
        "immediately",
        "next_billing_date"
      ],
      "title": "Effective At"
    },
    "charges_today": {
      "type": "boolean",
      "title": "Charges Today"
    },
    "immediate_total_minor": {
      "type": "integer",
      "title": "Immediate Total Minor"
    },
    "currency": {
      "type": "string",
      "title": "Currency"
    },
    "tax_minor": {
      "type": "integer",
      "title": "Tax Minor"
    },
    "customer_credits_minor": {
      "type": "integer",
      "title": "Customer Credits Minor"
    },
    "recurring_pre_tax_minor": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Recurring Pre Tax Minor"
    },
    "recurring_currency": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Recurring Currency"
    },
    "next_billing_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Billing Date"
    },
    "needs_resume": {
      "type": "boolean",
      "title": "Needs Resume",
      "default": false
    },
    "resumes_current_plan": {
      "type": "boolean",
      "title": "Resumes Current Plan",
      "default": false
    },
    "needs_fresh_checkout": {
      "type": "boolean",
      "title": "Needs Fresh Checkout",
      "default": false
    },
    "needs_payment_fix": {
      "type": "boolean",
      "title": "Needs Payment Fix",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "tier",
    "tier_name",
    "billing_period",
    "effective_at",
    "charges_today",
    "immediate_total_minor",
    "currency",
    "tax_minor",
    "customer_credits_minor",
    "recurring_pre_tax_minor",
    "recurring_currency",
    "next_billing_date"
  ]
}