diff --git a/CHANGELOG.md b/CHANGELOG.md index 074d29e..a5fd9b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### v3.18.1 (2026-02-19) +* * * + +### Bug Fixes: +- corrected the response schema for [`add_item_entitlement`](https://apidocs.chargebee.com/docs/api/item_entitlements/upsert-or-remove-item-entitlements-for-a-feature). +- corrected the response schema for [`upsert_or_remove_item_entitlements_for_item`](https://apidocs.chargebee.com/docs/api/item_entitlements/upsert-or-remove-item-entitlements-for-an-item). + ### v3.18.1 (2026-02-16) * * * diff --git a/VERSION b/VERSION index d21858b..9f6a62d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.18.1 +3.18.2 diff --git a/chargebee/models/item_entitlement/responses.py b/chargebee/models/item_entitlement/responses.py index f3b52aa..d74e4db 100644 --- a/chargebee/models/item_entitlement/responses.py +++ b/chargebee/models/item_entitlement/responses.py @@ -38,13 +38,23 @@ class ItemEntitlementsForFeatureResponse(Response): next_offset: str = None +@dataclass +class AddItemEntitlementsItemEntitlementResponse: + item_entitlement: ItemEntitlementResponse + + @dataclass class AddItemEntitlementsResponse(Response): is_idempotency_replayed: bool + list: List[AddItemEntitlementsItemEntitlementResponse] + + +@dataclass +class UpsertOrRemoveItemEntitlementsForItemItemEntitlementResponse: item_entitlement: ItemEntitlementResponse @dataclass class UpsertOrRemoveItemEntitlementsForItemResponse(Response): is_idempotency_replayed: bool - item_entitlement: ItemEntitlementResponse + list: List[UpsertOrRemoveItemEntitlementsForItemItemEntitlementResponse] diff --git a/chargebee/version.py b/chargebee/version.py index f890bc7..836184b 100644 --- a/chargebee/version.py +++ b/chargebee/version.py @@ -1 +1 @@ -VERSION = "3.18.1" +VERSION = "3.18.2" diff --git a/tests/test_util.py b/tests/test_util.py index 9b97781..b1d9aa3 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -46,6 +46,7 @@ def test_serialize(self): def test_convert_to_serializable_with_enum(self): """Test that enums are converted to their values""" + class Status(Enum): ACTIVE = "active" INACTIVE = "inactive" @@ -55,6 +56,7 @@ class Status(Enum): def test_convert_to_serializable_with_dict_containing_enum(self): """Test that enums in dicts are converted to their values""" + class Status(Enum): ACTIVE = "active" INACTIVE = "inactive" @@ -75,6 +77,7 @@ class Status(Enum): def test_convert_to_serializable_with_nested_dict(self): """Test that nested dicts with enums are handled correctly""" + class Status(Enum): ACTIVE = "active" @@ -109,6 +112,7 @@ class Type(Enum): def test_convert_to_serializable_with_list(self): """Test that lists with enums are converted correctly""" + class Status(Enum): ACTIVE = "active" INACTIVE = "inactive" @@ -120,6 +124,7 @@ class Status(Enum): def test_convert_to_serializable_with_tuple(self): """Test that tuples with enums are converted correctly and remain tuples""" + class Status(Enum): ACTIVE = "active" INACTIVE = "inactive" @@ -132,6 +137,7 @@ class Status(Enum): def test_convert_to_serializable_with_list_of_dicts(self): """Test that lists of dicts with enums are converted correctly""" + class Status(Enum): ACTIVE = "active" INACTIVE = "inactive" @@ -150,6 +156,7 @@ class Status(Enum): def test_convert_to_serializable_with_complex_nested_structure(self): """Test complex nested structure with enums at various levels""" + class Status(Enum): ACTIVE = "active" @@ -216,6 +223,7 @@ def test_convert_to_serializable_with_empty_structures(self): def test_convert_to_serializable_with_integer_enum(self): """Test that enums with integer values are converted correctly""" + class Priority(Enum): LOW = 1 MEDIUM = 2