Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
* * *

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.18.1
3.18.2
12 changes: 11 additions & 1 deletion chargebee/models/item_entitlement/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
2 changes: 1 addition & 1 deletion chargebee/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "3.18.1"
VERSION = "3.18.2"
8 changes: 8 additions & 0 deletions tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"

Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"

Expand Down Expand Up @@ -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
Expand Down