From cbedebd383cee0b8f8ca5305294702088a05ef9f Mon Sep 17 00:00:00 2001 From: Jordy van den Aardweg Date: Wed, 4 Sep 2019 15:17:33 +0200 Subject: [PATCH 1/3] Add discounts array to Subscription type (iOS Only) --- index.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/index.d.ts b/index.d.ts index 6cf9b5d85..a37195271 100644 --- a/index.d.ts +++ b/index.d.ts @@ -12,6 +12,16 @@ interface Common { localizedPrice: string; } +export interface Discount { + identifier: string; + type: string; + numberOfPeriods: string; + price: string; + localizedPrice: string; + paymendMode: string; + subscriptionPeriods: string; +} + export interface Product extends Common { type: 'inapp' | 'iap'; productId: ID; @@ -20,6 +30,8 @@ export interface Product extends Common { export interface Subscription extends Common { type: 'subs' | 'sub'; productId: ID; + + discounts?: DiscountIOS[]; introductoryPrice?: string; introductoryPricePaymentModeIOS?: string; From e63c149ddbbc8a05f9748a19bb0adeac1a4733ac Mon Sep 17 00:00:00 2001 From: Jordy van den Aardweg Date: Wed, 4 Sep 2019 15:20:29 +0200 Subject: [PATCH 2/3] Rename DiscountIOS to Discount --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index a37195271..a1b21e72f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -31,7 +31,7 @@ export interface Subscription extends Common { type: 'subs' | 'sub'; productId: ID; - discounts?: DiscountIOS[]; + discounts?: Discount[]; introductoryPrice?: string; introductoryPricePaymentModeIOS?: string; From a4fe626a59a59e2e202513391b56442802422c2c Mon Sep 17 00:00:00 2001 From: Jordy van den Aardweg Date: Wed, 4 Sep 2019 15:22:35 +0200 Subject: [PATCH 3/3] Correctly name properties --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index a1b21e72f..52bab9cfe 100644 --- a/index.d.ts +++ b/index.d.ts @@ -18,8 +18,8 @@ export interface Discount { numberOfPeriods: string; price: string; localizedPrice: string; - paymendMode: string; - subscriptionPeriods: string; + paymentMode: string; + subscriptionPeriod: string; } export interface Product extends Common {