Skip to content

fix: align with the regenerated API spec (2.1.1) - #4

Merged
s00d merged 1 commit into
masterfrom
fix/spec-2026-11
Nov 20, 2026
Merged

s00d merged 1 commit into
masterfrom
fix/spec-2026-11

Conversation

@s00d

@s00d s00d commented Nov 20, 2026

Copy link
Copy Markdown
Owner
  • waitCode: getState response may be absent (no number issued yet) — keep polling instead of an "Undefined array key" warning (src/Numbers.php).
  • waitCode retries ApiError TRY_AGAIN_LATER (HTTP 429), ERROR_UNDEFINED, INTERVAL_CONCURRENT_REQUESTS_ERROR until the deadline; other ApiError at once.
  • PHPStan types: Profile number int|null / country string|null (were swapped), optional Operation.response, RentSms.code string|int (integer 0 for notify, kept as sent), nullable country_text/country_original, order currency/form_text. paylist as a JSON array is kept as the list.
  • Error table: "0", ACCOUNT_CLEANED, USER_NOT_ACTIVATED, ERROR_UNDEFINED, FORWARD_NOT_SUPPORTED added; ERROR_NO_KEY, NO_NUMBER_FOR_FORWARD, ACCOUNT_IDENTIFICATION_REQUIRED, API_DISABLED dropped; NoNumberError only for NO_NUMBER; HTTP 429 → ApiError test.
  • MockOnlineSim mirrors the JS reference: setOperationRevise / setOperationOk tzid rules, missing key 200 vs wrong key 456, getNum extra fields, rent reservation + first non-notify SMS charges, sum number vs string, extend refusals TRY_AGAIN_LATER, closeRentNum rules, webhook-log params, any scheme:// URL, payment history forms/buttons, free list 44-first / count clamp / ISO created_at / ignore / content.
  • Docs (rent, numbers, user, free, webhooks, testing, index, changelog), README available formula, CHANGELOG 2.1.1.

Proposed version: 2.1.1 (patch). Not released.

🤖 Generated with Claude Code

- waitCode: getState `response` may be absent (no number issued yet) — keep
  polling instead of an "Undefined array key" warning; retry ApiError
  TRY_AGAIN_LATER / ERROR_UNDEFINED / INTERVAL_CONCURRENT_REQUESTS_ERROR.
- PHPStan types: Profile number int|null / country string|null, optional
  Operation response, RentSms code string|int, nullable free-list and
  payment-order fields.
- Error table: add "0", ACCOUNT_CLEANED, USER_NOT_ACTIVATED, ERROR_UNDEFINED,
  FORWARD_NOT_SUPPORTED; drop dead codes; NoNumberError only for NO_NUMBER.
- MockOnlineSim follows the backend (rent reservation, revise/close answers,
  missing vs wrong key, webhook params, free list, payment history).
- Docs and CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@s00d
s00d merged commit 6f0c289 into master Nov 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant