{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/simcloud-co-za/json-schema/simcloud-co-za-electricity-accepted-schema.json",
  "title": "ElectricityAccepted",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/simcloud-co-za-openapi.yaml#/components/schemas/ElectricityAccepted",
  "type": "object",
  "required": [
    "status",
    "message",
    "order_id",
    "client_reference",
    "submitted_reference",
    "order_reference_id",
    "meter_number",
    "recipient",
    "send_sms",
    "sms_company_name",
    "amount",
    "electricity_amount",
    "fee",
    "process_status",
    "billing_status",
    "timestamp"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "success"
      ]
    },
    "message": {
      "type": "string"
    },
    "order_id": {
      "type": "integer",
      "minimum": 1
    },
    "client_reference": {
      "type": "string"
    },
    "submitted_reference": {
      "type": "string"
    },
    "order_reference_id": {
      "$ref": "#/$defs/SupplierOrderNumber"
    },
    "meter_number": {
      "type": "string"
    },
    "recipient": {
      "type": "string"
    },
    "send_sms": {
      "type": "boolean"
    },
    "sms_company_name": {
      "type": "string"
    },
    "amount": {
      "type": "integer"
    },
    "electricity_amount": {
      "type": "number"
    },
    "fee": {
      "type": "number"
    },
    "process_status": {
      "type": "string",
      "enum": [
        "Pending"
      ]
    },
    "billing_status": {
      "type": "string",
      "enum": [
        "pending"
      ]
    },
    "timestamp": {
      "$ref": "#/$defs/LocalTimestamp"
    }
  },
  "$defs": {
    "LocalTimestamp": {
      "type": "string",
      "description": "Local timestamp in Africa/Johannesburg, using YYYY-MM-DD HH:MM:SS."
    },
    "SupplierOrderNumber": {
      "description": "Platform order number. Treat it as an identifier.",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string",
          "pattern": "^[0-9]+$"
        }
      ]
    }
  }
}