-------------------
- Update the request builder pattern to match the commercetools SDK's for other languages.
This means that the old pattern:
python
from commercetools.client import Client
client = Client()
product = client.products.get_by_id("00633d11-c5bb-434e-b132-73f7e130b4e3")
is replaced with the new pattern:
python
from commercetools.platform.client import Client
client = Client()
product = (
client
.with_project_key("<your-project-key>")
.products()
.with_id("00633d11-c5bb-434e-b132-73f7e130b4e3")
.get())
The old pattern is deprecated but will remain backwards compatible for now
- Regenerated code with latest commercetools api specs as of march 2022. This
means that new features like the product selections api's are now available.
- Allow passing custom HTTP adapter to BaseClient (lime-green)
- Add support for custom address fields and update actions
- Testing: Add support for `Order` imports
- Testing: fixed issues with `get_by_key` lookups in certain testing backends
- Testing: Added missing actions for Cart Discounts, Discount Codes and Extensions
- Testing: Add `datetime` and `list` updater utils
- Testing: Add `setLocalizedDescription` action for shipping_method
- Testing: Add `changeAttributeConstraint` action for product_type
- Testing: Add `setLineItemCustomField` action for cart and order
- Testing: Fix helper function to set enum fields giving an error on fields that have no value
Notes on code generation
We moved our code generation to the code generation tool from Commercetools,
see https://github.com/commercetools/rmf-codegen
Reason for this is two-fold:
1. We can now generate the code for the `imporapi` and the `ml` api
specifications next to the `platform` sdk.
2. It makes it easier for us to keep the code generation in sync with
changes to the API specification.
The major difference is that it now also use the request builder pattern,
matching the SDK's for the other languages (e.g. TypeScript).
The package is backwards compatible for now, although deprecation warnings are
shown.