From a8a7ff883058da1e072c0c9ba275c245932bc37a Mon Sep 17 00:00:00 2001 From: "mojo-machine[bot]" <111131124+mojo-machine[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 09:31:05 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20Sync=20from=20monorepo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/wearemojo/mojo/commit/1b5e273bd231a5c2fed71f494bfc61be78a87fac --- lib/revenuecat/revenuecat.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/revenuecat/revenuecat.go b/lib/revenuecat/revenuecat.go index c7f4da1..9a74188 100644 --- a/lib/revenuecat/revenuecat.go +++ b/lib/revenuecat/revenuecat.go @@ -35,13 +35,14 @@ type UserInfoResponse struct { } type Subscriber struct { - Entitlements map[string]Entitlement `json:"entitlements"` - Subscriptions map[string]Subscription `json:"subscriptions"` + Entitlements map[string]Entitlement `json:"entitlements"` + Subscriptions map[string]Subscription `json:"subscriptions"` + NonSubscriptions map[string][]NonSubscription `json:"non_subscriptions"` } type Entitlement struct { - ExpiresDate time.Time `json:"expires_date"` - ProductIdentifier string `json:"product_identifier"` + ExpiresDate *time.Time `json:"expires_date"` + ProductIdentifier string `json:"product_identifier"` } type Subscription struct { @@ -50,6 +51,10 @@ type Subscription struct { Store StoreType `json:"store"` } +type NonSubscription struct { + Store StoreType `json:"store"` +} + type PeriodType string const (