async def _generate_subscription_entities(
        self, client: httpx.AsyncClient
    ) -> AsyncGenerator[ChunkEntity, None]:
        """Retrieve a list of subscriptions.

        GET https://api.stripe.com/v1/subscriptions
        Paginated, yields StripeSubscriptionEntity objects.
        """
        base_url = "https://api.stripe.com/v1/subscriptions?limit=100"
        url = base_url

        while url:
            data = await self._get_with_auth(client, url)
            for sub in data.get("data", []):
                # Handle metadata as a complex field
                yield StripeSubscriptionEntity(
                    entity_id=sub["id"],
                    customer_id=sub.get("customer"),
                    status=sub.get("status"),
                    current_period_start=sub.get("current_period_start"),
                    current_period_end=sub.get("current_period_end"),
                    cancel_at_period_end=sub.get("cancel_at_period_end", False),
                    canceled_at=sub.get("canceled_at"),
                    created_at=sub.get("created"),
                    metadata=sub.get("metadata", {}),
                )

            has_more = data.get("has_more")
            if not has_more:
                url = None
            else:
                last_id = data["data"][-1]["id"]
                url = f"{base_url}&starting_after={last_id}"
Retrieve a list of subscriptions.

        GET https://api.stripe.com/v1/subscriptions
        Paginated, yields StripeSubscriptionEntity objects.
        
backend/airweave/platform/sources/stripe.py