{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/animgen-com/json-schema/animgen-com-billing-subscription-change-out-schema.json",
  "title": "BillingSubscriptionChangeOut",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/animgen-com-openapi.json#/components/schemas/BillingSubscriptionChangeOut",
  "properties": {
    "requestId": {
      "type": "string",
      "format": "uuid",
      "title": "Requestid"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "changeType": {
      "type": "string",
      "enum": [
        "upgrade",
        "downgrade"
      ],
      "title": "Changetype"
    },
    "applyMode": {
      "type": "string",
      "enum": [
        "immediate",
        "next_period"
      ],
      "title": "Applymode"
    },
    "currentPlanCode": {
      "type": "string",
      "title": "Currentplancode"
    },
    "targetPlanCode": {
      "type": "string",
      "title": "Targetplancode"
    },
    "requestedAt": {
      "type": "string",
      "title": "Requestedat"
    },
    "effectiveAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Effectiveat"
    },
    "processedAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Processedat"
    },
    "immediateChargeAmountMinor": {
      "type": "integer",
      "title": "Immediatechargeamountminor",
      "default": 0
    },
    "immediateChargeCurrency": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Immediatechargecurrency"
    },
    "settlementAmountMinor": {
      "type": "integer",
      "title": "Settlementamountminor",
      "default": 0
    },
    "settlementCurrency": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Settlementcurrency"
    },
    "reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reason"
    },
    "paymentFailed": {
      "type": "boolean",
      "title": "Paymentfailed",
      "default": false
    },
    "paymentFailureCode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Paymentfailurecode"
    },
    "submissionUnknown": {
      "type": "boolean",
      "title": "Submissionunknown",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "requestId",
    "status",
    "changeType",
    "applyMode",
    "currentPlanCode",
    "targetPlanCode",
    "requestedAt"
  ]
}