@chargebee/react-native-chargebee
Version:
Package for Chargebee In-App Purchases
29 lines (27 loc) • 967 B
JavaScript
import { Platform } from 'react-native';
/**
* Chargebee SDK Config parameters.
*/
export let ProductType;
(function (ProductType) {
ProductType["UNKNOWN"] = "unknown";
ProductType["CONSUMABLE"] = "consumable";
ProductType["NON_CONSUMABLE"] = "non_consumable";
ProductType["NON_RENEWING_SUBSCRIPTION"] = "non_renewing_subscription";
})(ProductType || (ProductType = {}));
export let StoreStatus;
(function (StoreStatus) {
StoreStatus[StoreStatus["ACTIVE"] = 0] = "ACTIVE";
StoreStatus[StoreStatus["IN_TRIAL"] = 1] = "IN_TRIAL";
StoreStatus[StoreStatus["CANCELLED"] = 2] = "CANCELLED";
StoreStatus[StoreStatus["PAUSED"] = 3] = "PAUSED";
})(StoreStatus || (StoreStatus = {}));
export function sdkKeyForPlatform(androidSdkKey, iOsSdkKey) {
if (Platform.OS === 'ios') {
return iOsSdkKey;
} else if (Platform.OS === 'android') {
return androidSdkKey;
}
throw new Error('Platform not supported.');
}
//# sourceMappingURL=Purchases.js.map