cordova-plugin-qonversion
Version:
Qonversion Cordova Plugin
28 lines (27 loc) • 963 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PurchaseModel = void 0;
/**
* Used to provide all the necessary purchase data to the {@link Qonversion.purchase} method.
* Can be created manually or using the {@link Product.toPurchaseModel} method.
*
* If {@link offerId} is not specified for Android, then the default offer will be applied.
* To know how we choose the default offer, see {@link ProductStoreDetails.defaultSubscriptionOfferDetails}.
*
* If you want to remove any intro/trial offer from the purchase on Android (use only a bare base plan),
* call the {@link removeOffer} method.
*/
class PurchaseModel {
productId;
offerId = null;
applyOffer = true;
constructor(productId, offerId = null) {
this.productId = productId;
this.offerId = offerId;
}
removeOffer() {
this.applyOffer = false;
return this;
}
}
exports.PurchaseModel = PurchaseModel;