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
37 lines • 1.48 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const NoCodesInternal_1 = __importDefault(require("./internal/NoCodesInternal"));
class NoCodes {
constructor() { }
static backingInstance;
/**
* Use this variable to get a current initialized instance of the NoCodes SDK.
* Please, use the property only after calling {@link NoCodes.initialize}.
* Otherwise, trying to access the variable will cause an exception.
*
* @return Current initialized instance of the NoCodes SDK.
* @throws error if the instance has not been initialized
*/
static getSharedInstance() {
if (!this.backingInstance) {
throw "No-Codes has not been initialized. You should call " +
"the initialize method before accessing the shared instance of NoCodes.";
}
return this.backingInstance;
}
/**
* An entry point to use No-Codes SDK. Call to initialize No-Codes SDK with required configs.
*
* @param config a config that contains key SDK settings.
* @return Initialized instance of the No-Codes SDK.
*/
static initialize(config) {
this.backingInstance = new NoCodesInternal_1.default(config);
return this.backingInstance;
}
}
exports.default = NoCodes;
//# sourceMappingURL=NoCodes.js.map