{
  "name": "getPointsHistoryAll: все элементы всех страниц; повторённый курсор — ошибка",
  "description": "Первая страница — без cursor, следующие — с next_cursor предыдущей (последним параметром, «=» — %3D), пока он не null. Сервер вернул курсор, который уже запрашивался, — unexpected_response вместо бесконечного цикла.",
  "client": {
    "api": "runtime",
    "credential": {"terminalKey": "lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw"},
    "baseUrl": "https://api.example.com"
  },
  "calls": [
    {
      "operation": "getPointsHistoryAll",
      "args": {"member": "01929c1e-0040-7040-8040-000000000040", "limit": 2},
      "expect": {
        "result": [
          {
            "transaction_id": "01929c1e-0091-7091-8091-000000000091",
            "type": "accrual",
            "amount": 35,
            "member_delta": 35,
            "effective_at": "2026-10-11T12:00:01.250000Z",
            "created_at": "2026-10-11T12:00:01.250000Z",
            "reference_type": "receipt",
            "reference_id": "01929c1e-0050-7050-8050-000000000050",
            "reason_code": null
          },
          {
            "transaction_id": "01929c1e-0092-7092-8092-000000000092",
            "type": "capture",
            "amount": 300,
            "member_delta": -300,
            "effective_at": "2026-10-11T12:00:01.250000Z",
            "created_at": "2026-10-11T12:00:01.250000Z",
            "reference_type": "receipt",
            "reference_id": "01929c1e-0050-7050-8050-000000000050",
            "reason_code": null
          },
          {
            "transaction_id": "01929c1e-0093-7093-8093-000000000093",
            "type": "adjustment",
            "amount": 500,
            "member_delta": 500,
            "effective_at": "2026-10-01T09:30:00.000000Z",
            "created_at": "2026-10-01T09:30:00.000000Z",
            "reference_type": null,
            "reference_id": null,
            "reason_code": "goodwill"
          }
        ]
      }
    },
    {
      "operation": "getPointsHistoryAll",
      "args": {"member": "01929c1e-0040-7040-8040-000000000040"},
      "expect": {"error": {"class": "unexpected_response", "status": 200}}
    }
  ],
  "exchanges": [
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/members/01929c1e-0040-7040-8040-000000000040/history?limit=2",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 200,
        "headers": {
          "Content-Type": "application/json",
          "X-Request-Id": "01929c20-0001-7000-8000-000000000001",
          "Loyal-Environment": "sandbox"
        },
        "json": {
          "data": [
            {
              "transaction_id": "01929c1e-0091-7091-8091-000000000091",
              "type": "accrual",
              "amount": 35,
              "member_delta": 35,
              "effective_at": "2026-10-11T12:00:01.250000Z",
              "created_at": "2026-10-11T12:00:01.250000Z",
              "reference_type": "receipt",
              "reference_id": "01929c1e-0050-7050-8050-000000000050",
              "reason_code": null
            },
            {
              "transaction_id": "01929c1e-0092-7092-8092-000000000092",
              "type": "capture",
              "amount": 300,
              "member_delta": -300,
              "effective_at": "2026-10-11T12:00:01.250000Z",
              "created_at": "2026-10-11T12:00:01.250000Z",
              "reference_type": "receipt",
              "reference_id": "01929c1e-0050-7050-8050-000000000050",
              "reason_code": null
            }
          ],
          "next_cursor": "eyJpZCI6Mn0="
        }
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/members/01929c1e-0040-7040-8040-000000000040/history?limit=2&cursor=eyJpZCI6Mn0%3D",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 200,
        "headers": {
          "Content-Type": "application/json",
          "X-Request-Id": "01929c20-0002-7000-8000-000000000002",
          "Loyal-Environment": "sandbox"
        },
        "json": {
          "data": [
            {
              "transaction_id": "01929c1e-0093-7093-8093-000000000093",
              "type": "adjustment",
              "amount": 500,
              "member_delta": 500,
              "effective_at": "2026-10-01T09:30:00.000000Z",
              "created_at": "2026-10-01T09:30:00.000000Z",
              "reference_type": null,
              "reference_id": null,
              "reason_code": "goodwill"
            }
          ],
          "next_cursor": null
        }
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/members/01929c1e-0040-7040-8040-000000000040/history",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 200,
        "headers": {
          "Content-Type": "application/json",
          "X-Request-Id": "01929c20-0003-7000-8000-000000000003",
          "Loyal-Environment": "sandbox"
        },
        "json": {
          "data": [
            {
              "transaction_id": "01929c1e-0091-7091-8091-000000000091",
              "type": "accrual",
              "amount": 35,
              "member_delta": 35,
              "effective_at": "2026-10-11T12:00:01.250000Z",
              "created_at": "2026-10-11T12:00:01.250000Z",
              "reference_type": "receipt",
              "reference_id": "01929c1e-0050-7050-8050-000000000050",
              "reason_code": null
            }
          ],
          "next_cursor": "eyJpZCI6MX0="
        }
      }
    },
    {
      "request": {
        "method": "GET",
        "url": "https://api.example.com/api/v1/members/01929c1e-0040-7040-8040-000000000040/history?cursor=eyJpZCI6MX0%3D",
        "headers": {
          "authorization": "Bearer lk_test_k7m2p9q4r8s3.RqTvNAJirupwDOPZ8O48PZpsbGlZGfecp04FD7w06kw",
          "accept": "application/json",
          "content-type": null,
          "idempotency-key": null,
          "loyal-merchant": null
        }
      },
      "response": {
        "status": 200,
        "headers": {
          "Content-Type": "application/json",
          "X-Request-Id": "01929c20-0004-7000-8000-000000000004",
          "Loyal-Environment": "sandbox"
        },
        "json": {
          "data": [
            {
              "transaction_id": "01929c1e-0092-7092-8092-000000000092",
              "type": "capture",
              "amount": 300,
              "member_delta": -300,
              "effective_at": "2026-10-11T12:00:01.250000Z",
              "created_at": "2026-10-11T12:00:01.250000Z",
              "reference_type": "receipt",
              "reference_id": "01929c1e-0050-7050-8050-000000000050",
              "reason_code": null
            }
          ],
          "next_cursor": "eyJpZCI6MX0="
        }
      }
    }
  ],
  "sleeps": []
}
