{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openrush-com/json-schema/openrush-com-auto-recharge-settings-response-schema.json",
  "title": "AutoRechargeSettingsResponse",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openrush-com-openapi.json#/components/schemas/AutoRechargeSettingsResponse",
  "properties": {
    "enabled": {
      "type": "boolean",
      "title": "Enabled"
    },
    "threshold_credits": {
      "type": "integer",
      "title": "Threshold Credits"
    },
    "recharge_dollars": {
      "type": "integer",
      "title": "Recharge Dollars"
    },
    "monthly_limit_dollars": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Monthly Limit Dollars"
    },
    "month_to_date_dollars": {
      "type": "integer",
      "title": "Month To Date Dollars"
    },
    "pending_recharge_dollars": {
      "type": "integer",
      "title": "Pending Recharge Dollars"
    },
    "remaining_monthly_dollars": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Remaining Monthly Dollars"
    },
    "monthly_limit_reached": {
      "type": "boolean",
      "title": "Monthly Limit Reached"
    },
    "monthly_limit_resets_at": {
      "type": "string",
      "format": "date-time",
      "title": "Monthly Limit Resets At"
    },
    "status": {
      "type": "string",
      "enum": [
        "idle",
        "pending",
        "retry_wait",
        "suspended",
        "monthly_cap_reached"
      ],
      "title": "Status"
    },
    "next_retry_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Retry At"
    },
    "failure_message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Failure Message"
    },
    "last_successful_recharge_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Successful Recharge At"
    },
    "card": {
      "anyOf": [
        {
          "$ref": "#/$defs/SavedCardPublic"
        },
        {
          "type": "null"
        }
      ]
    },
    "recent_attempts": {
      "items": {
        "$ref": "#/$defs/AutoRechargeAttemptPublic"
      },
      "type": "array",
      "title": "Recent Attempts"
    }
  },
  "type": "object",
  "required": [
    "enabled",
    "threshold_credits",
    "recharge_dollars",
    "monthly_limit_dollars",
    "month_to_date_dollars",
    "pending_recharge_dollars",
    "remaining_monthly_dollars",
    "monthly_limit_reached",
    "monthly_limit_resets_at",
    "status",
    "next_retry_at",
    "failure_message",
    "last_successful_recharge_at",
    "card",
    "recent_attempts"
  ],
  "$defs": {
    "AutoRechargeAttemptPublic": {
      "properties": {
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "dollars": {
          "type": "integer",
          "title": "Dollars"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "succeeded",
            "failed"
          ],
          "title": "Status"
        },
        "message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Message"
        }
      },
      "type": "object",
      "required": [
        "created_at",
        "dollars",
        "status"
      ],
      "title": "AutoRechargeAttemptPublic"
    },
    "SavedCardPublic": {
      "properties": {
        "brand": {
          "type": "string",
          "title": "Brand"
        },
        "last4": {
          "type": "string",
          "title": "Last4"
        },
        "exp_month": {
          "type": "integer",
          "title": "Exp Month"
        },
        "exp_year": {
          "type": "integer",
          "title": "Exp Year"
        }
      },
      "type": "object",
      "required": [
        "brand",
        "last4",
        "exp_month",
        "exp_year"
      ],
      "title": "SavedCardPublic"
    }
  }
}