You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[MPT-14951] Integrated api client into product api service and flow (#159)
Integrated api client into product api service and flow
https://softwareone.atlassian.net/browse/MPT-18516
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
Closes [MPT-14951](https://softwareone.atlassian.net/browse/MPT-14951)
- Add create_api_mpt_client_from_account(account) and wire
api_mpt_client into account and product containers
- Replace direct MPT HTTP client usage with collection-service
abstractions (mpt_client.catalog.{products, items, price_lists, ...})
and update container wiring and service constructors
- APIService / RelatedAPIService now delegate to collection_service for
exists, get, list, post (form/json + files), post_action and update
(including sub-resource updates)
- Swap wrap_http_error for wrap_mpt_api_error across API and flow layers
for consistent error mapping
- Update product and price-list flows to use RQLQuery filtering and
collection.fetch_page pagination with explicit metadata validation
- Item API/service: new ItemAPIService ctor accepts collection_service
and mpt_client; UOM lookups switched to use api_mpt_client;
search_uom_by_name accepts optional name and returns clearer 404s
- Tests refactored to mock the new MPT API client and collection_service
behaviors (use mocker.Mock, model-based test data); fixtures and many
test cases adjusted accordingly
- Test utilities updated (ANSI-stripping helper, mock factories) and
small TODO comment added for settings-update handling
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
[MPT-14951]:
https://softwareone.atlassian.net/browse/MPT-14951?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
0 commit comments