feat(fbo): add FBOTransport group — transport cargoes (14 methods) — 0.86.0#6
Merged
Conversation
…0.86.0
Implements the new Ozon Seller API "FBOTransport" surface (swagger +14 ops)
inside the fbo_supply_request group:
New methods (11 × v1 + 3 × v2 canonical):
- /v1/cargoes/transport/create[/status], /activate[/status], /bind[/status]
- /v1/cargoes/supplies/get
- /v1/cargoes/label/transport/{create,status}
- /v1/cargoes/label/transport-by-order/{create,status}
- /v2/cargoes/get, /v2/cargoes/delete, /v2/cargoes/delete/status (canonical)
Version-collision rule: the colliding v1 endpoints (cargoes_get, cargoes_delete,
cargoes_delete_status) are demoted to *_v1() (mixins/methods/Request/Response
classes carry a V1 infix); the new v2 versions become the canonical unsuffixed
methods. All response status/error enums typed as open-set str (group is
access-gated, modelled strictly from swagger; tests mock the transport).
Docs: readme catalogue 447 -> 461 (section "Создание и управление заявками на
поставку FBO" 29 -> 43; 3 demoted v1 rows flagged "устар."). Version bumped in
pyproject.toml and src/ozonapi/__init__.py.
Tests: 579 passed. mypy: clean (0 net new).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что и зачем
Ozon добавил в live-спецификацию 14 новых операций с тегом FBOTransport (работа с
транспортными грузоместами FBO). Эта ветка реализует всю группу внутри
fbo_supply_request.Новые методы (11 × v1 + 3 × v2 канонические)
/v1/cargoes/transport/create+/status/v1/cargoes/transport/activate+/status/v1/cargoes/transport/bind+/status/v1/cargoes/supplies/get/v1/cargoes/label/transport/create+/status/v1/cargoes/label/transport-by-order/create+/status/v2/cargoes/get,/v2/cargoes/delete,/v2/cargoes/delete/status— каноническиеКоллизия версий (правило проекта: новее = канон без суффикса)
Старые v1-методы понижены до
*_v1():cargoes_get()→cargoes_get_v1()(канон =/v2/cargoes/get)cargoes_delete()→cargoes_delete_v1()(канон =/v2/cargoes/delete)cargoes_delete_status()→cargoes_delete_status_v1()(канон =/v2/cargoes/delete/status)Миксины/методы/классы Request/Response старых версий получили инфикс
V1; их README-строкипомечены
⚠️ устар. →. Канонические v2-имена остаются без суффикса.Замечания по моделированию
Группа access-gated (FBOTransport), живой проверки нет — схемы строго по swagger,
response status/error-энумы как открытый
str, тесты только на моках (_requestмокируется).Версия
Бамп 0.85.1 → 0.86.0 (minor, новые методы) в
pyproject.tomlиsrc/ozonapi/__init__.py.Документация
README-каталог 447 → 461; секция «Создание и управление заявками на поставку FBO» 29 → 43;
добавлены 14 строк, 3 v1-строки помечены устаревшими. Счётчики пересчитаны из строк.
Проверки
pytest: 579 passed (локально, транспорт мокируется — без сети).mypy --config-file .claude/linters/mypy.ini: чисто, 0 net new.