From 7ea51fcf0616eaa9c107365fdf140a169547d9ce Mon Sep 17 00:00:00 2001 From: Cesar de la Vega Date: Fri, 19 Apr 2019 09:56:28 -0700 Subject: [PATCH] feat(purchases): update plugin to v0.0.5 (#2988) * Updates to Cordova plugin 0.0.5 * Makes underlyingErrorMessage optional --- src/@ionic-native/plugins/purchases/index.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/@ionic-native/plugins/purchases/index.ts b/src/@ionic-native/plugins/purchases/index.ts index b29a05f26..2c34c1249 100644 --- a/src/@ionic-native/plugins/purchases/index.ts +++ b/src/@ionic-native/plugins/purchases/index.ts @@ -52,7 +52,7 @@ import { Observable } from 'rxjs'; * * ```typescript * this.purchases.getEntitlements() - * .subscribe(entitlements => ) + * .subscribe(entitlements => , * error => ); * ``` * @@ -67,7 +67,7 @@ import { Observable } from 'rxjs'; * // Unlock content * } * }, - * error => // Error making purchase. You can check error.userCancelled to check if user cancelled the purchase + * ({ error, userCancelled }) => // Error making purchase. You can check error.userCancelled to check if user cancelled the purchase * ); * * ``` @@ -271,7 +271,7 @@ export class Purchases extends IonicNativePlugin { * @param oldSkus {string[]} Optional array of skus you wish to upgrade from. * @param type {String} Optional type of product, can be inapp or subs. Subs by default * - * @return {Observable} An [RCError] is thrown when user cancels. error.usercancelled will be true if user cancelled + * @return {Observable} An [RCError] is thrown when user cancels. On error `usercancelled` will be true if user cancelled */ @Cordova({ successIndex: 1, @@ -413,7 +413,6 @@ export interface RCMakePurchaseResponse { export interface RCError { code: number; - domain: string; message: string; - userCancelled?: string; + underlyingErrorMessage?: string; }