Skip to content

Commit

Permalink
feat(in-app-purchase-2): update TypeScript definitions (#3037)
Browse files Browse the repository at this point in the history
  • Loading branch information
j3k0 authored and danielsogl committed Jun 3, 2019
1 parent bb7b516 commit 4ae35cb
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions src/@ionic-native/plugins/in-app-purchase-2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Injectable } from '@angular/core';
/**
* @name In App Purchase 2
* @description
* In-App Purchase for Cordova on iOS, Android and Windows
* In-App Purchase for Cordova on iOS, Android, Windows, macOS and XBox.
*
* @usage
* ```typescript
Expand Down Expand Up @@ -33,17 +33,17 @@ import { Injectable } from '@angular/core';
*
* // Updated
* this.store.when(productId).updated( (product: IAPProduct) => {
* console.log('Loaded' + JSON.stringify(product));
* console.log('Updated' + JSON.stringify(product));
* });
*
* // Issue with buying
* this.store.when(productId).cancelled( (product) => {
* alert('Purchase was Cancelled');
* console.error('Purchase was Cancelled');
* });
*
* // Track All Store Errors
* this.store.error( (err) => {
* alert('Store Error ' + JSON.stringify(err));
* console.error('Store Error ' + JSON.stringify(err));
* });
*
* this.store.ready(() => {
Expand All @@ -56,7 +56,7 @@ import { Injectable } from '@angular/core';
* // Errors
* this.store.when(productId).error( (error) => {
* this.loader.dismiss();
* alert('An Error Occured' + JSON.stringify(error));
* console.error('An Error Occured' + JSON.stringify(error));
* });
* // Refresh Starts Handlers
* console.log('Refresh Store');
Expand Down Expand Up @@ -126,6 +126,30 @@ export interface IAPProduct {

downloaded: boolean;

lastRenewalDate: Date;

expiryDate: Date;

introPrice: string;

introPriceMicros: number;

introPriceNumberOfPeriods: number;

introPriceSubscriptionPeriod: string;

introPricePaymentMode: string;

ineligibleForIntroPrice: boolean;

billingPeriod: number;

billingPeriodUnit: string;

trialPeriod: number;

trialPeriodUnit: string;

additionalData: any;

transaction: any;
Expand Down

0 comments on commit 4ae35cb

Please sign in to comment.