@qonversion/capacitor-plugin
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
30 lines • 1.19 kB
JavaScript
import { NoCodesInternal } from './internal/NoCodesInternal';
export class NoCodes {
constructor() { }
/**
* 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(config);
return this.backingInstance;
}
}
//# sourceMappingURL=NoCodes.js.map