react-native-qonversion
Version:
Qonversion provides full in-app purchases infrastructure, so you do not need to build your own server for receipt validation. Implement in-app subscriptions, validate user receipts, check subscription status, and provide access to your app features and co
114 lines • 4.11 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* This class contains all the information about the concrete Google product,
* either subscription or in-app. In case of a subscription also determines concrete base plan.
*/
class ProductStoreDetails {
/**
* Identifier of the base plan to which these details relate.
* Null for in-app products.
*/
basePlanId;
/**
* Identifier of the subscription or the in-app product.
*/
productId;
/**
* Name of the subscription or the in-app product.
*/
name;
/**
* Title of the subscription or the in-app product.
* The title includes the name of the app.
*/
title;
/**
* Description of the subscription or the in-app product.
*/
description;
/**
* Offer details for the subscription.
* Offer details contain all the available variations of purchase offers,
* including both base plan and eligible base plan + offer combinations
* from Google Play Console for current {@link basePlanId}.
* Null for in-app products.
*/
subscriptionOfferDetails;
/**
* The most profitable subscription offer for the client in our opinion from all the available offers.
* We calculate the cheapest price for the client by comparing all the trial or intro phases
* and the base plan.
*/
defaultSubscriptionOfferDetails;
/**
* Subscription offer details containing only the base plan without any offer.
*/
basePlanSubscriptionOfferDetails;
/**
* Offer details for the in-app product.
* Null for subscriptions.
*/
inAppOfferDetails;
/**
* True, if there is any eligible offer with a trial
* for this subscription and base plan combination.
* False otherwise or for an in-app product.
*/
hasTrialOffer;
/**
* True, if there is any eligible offer with an intro price
* for this subscription and base plan combination.
* False otherwise or for an in-app product.
*/
hasIntroOffer;
/**
* True, if there is any eligible offer with a trial or an intro price
* for this subscription and base plan combination.
* False otherwise or for an in-app product.
*/
hasTrialOrIntroOffer;
/**
* The calculated type of the current product.
*/
productType;
/**
* True, if the product type is InApp.
*/
isInApp;
/**
* True, if the product type is Subscription.
*/
isSubscription;
/**
* True, if the subscription product is prepaid, which means that users pay in advance -
* they will need to make a new payment to extend their plan.
*/
isPrepaid;
/**
* True, if the subscription product is installment, which means that users commit
* to pay for a specified amount of periods every month.
*/
isInstallment;
constructor(basePlanId, productId, name, title, description, subscriptionOfferDetails, defaultSubscriptionOfferDetails, basePlanSubscriptionOfferDetails, inAppOfferDetails, hasTrialOffer, hasIntroOffer, hasTrialOrIntroOffer, productType, isInApp, isSubscription, isPrepaid, isInstallment) {
this.basePlanId = basePlanId;
this.productId = productId;
this.name = name;
this.title = title;
this.description = description;
this.subscriptionOfferDetails = subscriptionOfferDetails;
this.defaultSubscriptionOfferDetails = defaultSubscriptionOfferDetails;
this.basePlanSubscriptionOfferDetails = basePlanSubscriptionOfferDetails;
this.inAppOfferDetails = inAppOfferDetails;
this.hasTrialOffer = hasTrialOffer;
this.hasIntroOffer = hasIntroOffer;
this.hasTrialOrIntroOffer = hasTrialOrIntroOffer;
this.productType = productType;
this.isInApp = isInApp;
this.isSubscription = isSubscription;
this.isPrepaid = isPrepaid;
this.isInstallment = isInstallment;
}
}
exports.default = ProductStoreDetails;
//# sourceMappingURL=ProductStoreDetails.js.map