diff --git a/README.rst b/README.rst index c9ee638..a133df1 100644 --- a/README.rst +++ b/README.rst @@ -66,10 +66,10 @@ Product configuration Changelog --------- -v4.9.3 (17 Aug 2026) +v4.9.4 (18 Aug 2026) ~~~~~~~~~~~~~~~~~~~~ -- Initial support for Kiwi TCMS Partner Store via FastSpring +- Support for Kiwi TCMS Partner Store via FastSpring v4.9.0 (18 Jul 2026) diff --git a/setup.py b/setup.py index 11e82b5..9b3f528 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def get_install_requires(path): setup( name="kiwitcms-github-marketplace", - version="4.9.3", + version="4.9.4", description="GitHub Marketplace integration for Kiwi TCMS", long_description=get_long_description(), author="Kiwi TCMS", diff --git a/tcms_github_marketplace/models.py b/tcms_github_marketplace/models.py index 789b6de..ae16ed2 100644 --- a/tcms_github_marketplace/models.py +++ b/tcms_github_marketplace/models.py @@ -102,7 +102,7 @@ def next_billing_date(self): return self.next_billing_date_from(self.payload) @property - def unit_count(self): + def unit_count(self): # pylint: disable=too-many-return-statements """ A value of zero/0 represent a case where the code wasn't able to find the actual value from the event payload! @@ -117,6 +117,11 @@ def unit_count(self): return self.payload["marketplace_purchase"].get("unit_count", 0) if self.vendor == "fastspring": + # Kiwi TCMS Partner Store + if "items" in self.payload: + return self.payload["items"][0].get("quantity", 0) + + # FastSpring direct sale if "data" not in self.payload: return 0