MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / get_subscription_metadata

Method get_subscription_metadata

api/organisations/models.py:386–397  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

384 return None
385
386 def get_subscription_metadata(self) -> BaseSubscriptionMetadata:
387 if self.is_free_plan:
388 # Free plan is the default everywhere, we should prevent
389 # increased access for all deployment types on the free
390 # plan.
391 return FREE_PLAN_SUBSCRIPTION_METADATA
392
393 return (
394 self._get_subscription_metadata_for_saas()
395 if is_saas()
396 else self._get_subscription_metadata_for_self_hosted()
397 )
398
399 def _get_subscription_metadata_for_saas(self) -> BaseSubscriptionMetadata:
400 if self.payment_method == CHARGEBEE and self.subscription_id: