@qonversion/react-native-sdk
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
34 lines (30 loc) • 1.11 kB
text/typescript
import Product from "./Product";
import {PurchaseUpdatePolicy} from "./enums";
import PromotionalOffer from './PromotionalOffer';
class PurchaseOptions {
public readonly offerId: string | null;
public readonly applyOffer: boolean;
public readonly oldProduct: Product | null;
public readonly updatePolicy: PurchaseUpdatePolicy | null;
public readonly contextKeys: string[] | null;
public readonly quantity: number;
public readonly promotionalOffer: PromotionalOffer | null;
constructor (
offerId: string | null,
applyOffer: boolean,
oldProduct: Product | null,
updatePolicy: PurchaseUpdatePolicy | null,
contextKeys: string[] | null,
quantity: number,
promotionalOffer: PromotionalOffer | null
) {
this.offerId = offerId;
this.applyOffer = applyOffer;
this.oldProduct = oldProduct;
this.updatePolicy = updatePolicy;
this.contextKeys = contextKeys;
this.quantity = quantity;
this.promotionalOffer = promotionalOffer;
}
}
export default PurchaseOptions;