{
  "schemaVersion": "wildflower.provider-billing-fixtures.v1",
  "cases": [
    {
      "id": "paginated_line_items_with_retry_duplicate",
      "sandboxId": "sandbox-a",
      "observedAt": "2026-07-28T12:00:00Z",
      "maximumLagSeconds": 3600,
      "granularity": "sandbox",
      "amountSemantics": "line_items",
      "access": {
        "status": "granted"
      },
      "pages": [
        {
          "records": [
            {
              "id": "line-1",
              "sandboxId": "sandbox-a",
              "currency": "USD",
              "amountUsd": "0.010000",
              "asOf": "2026-07-28T11:59:00Z"
            }
          ]
        },
        {
          "records": [
            {
              "id": "line-1",
              "sandboxId": "sandbox-a",
              "currency": "USD",
              "amountUsd": "0.010000",
              "asOf": "2026-07-28T11:59:00Z"
            },
            {
              "id": "line-2",
              "sandboxId": "sandbox-a",
              "currency": "USD",
              "amountUsd": "0.020000",
              "asOf": "2026-07-28T11:59:30Z"
            },
            {
              "id": "other-sandbox",
              "sandboxId": "sandbox-b",
              "currency": "USD",
              "amountUsd": "99.000000",
              "asOf": "2026-07-28T11:59:30Z"
            }
          ]
        }
      ],
      "expected": {
        "status": "provider_reported",
        "amountUsd": "0.030000",
        "recordCount": 2
      }
    },
    {
      "id": "aggregate_only",
      "sandboxId": "sandbox-a",
      "observedAt": "2026-07-28T12:00:00Z",
      "maximumLagSeconds": 3600,
      "granularity": "workspace",
      "amountSemantics": "latest_snapshot",
      "access": {
        "status": "granted"
      },
      "pages": [],
      "expected": {
        "status": "unavailable"
      }
    },
    {
      "id": "missing_scope",
      "sandboxId": "sandbox-a",
      "observedAt": "2026-07-28T12:00:00Z",
      "maximumLagSeconds": 3600,
      "granularity": "sandbox",
      "amountSemantics": "latest_snapshot",
      "access": {
        "status": "denied",
        "reason": "billing scope is missing"
      },
      "pages": [],
      "expected": {
        "status": "unavailable"
      }
    },
    {
      "id": "non_usd_without_exchange_source",
      "sandboxId": "sandbox-a",
      "observedAt": "2026-07-28T12:00:00Z",
      "maximumLagSeconds": 3600,
      "granularity": "sandbox",
      "amountSemantics": "latest_snapshot",
      "access": {
        "status": "granted"
      },
      "pages": [
        {
          "records": [
            {
              "id": "snapshot-1",
              "sandboxId": "sandbox-a",
              "currency": "EUR",
              "amountUsd": "0.010000",
              "asOf": "2026-07-28T11:59:00Z"
            }
          ]
        }
      ],
      "expected": {
        "status": "unavailable"
      }
    },
    {
      "id": "stale_snapshot",
      "sandboxId": "sandbox-a",
      "observedAt": "2026-07-28T12:00:00Z",
      "maximumLagSeconds": 300,
      "granularity": "sandbox",
      "amountSemantics": "latest_snapshot",
      "access": {
        "status": "granted"
      },
      "pages": [
        {
          "records": [
            {
              "id": "snapshot-1",
              "sandboxId": "sandbox-a",
              "currency": "USD",
              "amountUsd": "0.010000",
              "asOf": "2026-07-28T11:00:00Z"
            }
          ]
        }
      ],
      "expected": {
        "status": "unavailable"
      }
    },
    {
      "id": "conflicting_duplicate",
      "sandboxId": "sandbox-a",
      "observedAt": "2026-07-28T12:00:00Z",
      "maximumLagSeconds": 3600,
      "granularity": "sandbox",
      "amountSemantics": "line_items",
      "access": {
        "status": "granted"
      },
      "pages": [
        {
          "records": [
            {
              "id": "line-1",
              "sandboxId": "sandbox-a",
              "currency": "USD",
              "amountUsd": "0.010000",
              "asOf": "2026-07-28T11:59:00Z"
            }
          ]
        },
        {
          "records": [
            {
              "id": "line-1",
              "sandboxId": "sandbox-a",
              "currency": "USD",
              "amountUsd": "0.020000",
              "asOf": "2026-07-28T11:59:00Z"
            }
          ]
        }
      ],
      "expected": {
        "status": "unavailable"
      }
    }
  ]
}
