TryNow JavaScript SDK
TryNow
The public TryNow interface. Accessible via window.trynow
.
This class exposes public SDK methods for interacting with the TryNow Shopify Integration.
Kind: global class
- TryNow
- .initialize(config) ⇒
TryNow
- .getMyshopifyDomain() ⇒
string
- .getTrialPeriodDays() ⇒
Promise.<number>
- .getSellingPlanId() ⇒
Promise.<string>
- .initialize(config) ⇒
tryNow.initialize(config) ⇒ TryNow
TryNow
Initializes TryNow. This can be called manually or will automatically initialize when TryNow is enabled via the App Embed block in the Shopify Theme Customizer.
Kind: instance method of TryNow
Returns: TryNow
- the initialized TryNow instance
Param | Type | Description |
---|---|---|
config | TryNowConfig | options |
tryNow.getMyshopifyDomain() ⇒ string
string
Gets the myshopify domain of the store.
Kind: instance method of TryNow
Returns: string
- domain
tryNow.getTrialPeriodDays() ⇒ Promise.<number>
Promise.<number>
Gets the number of trial period days.
Kind: instance method of TryNow
Returns: Promise.<number>
- days
tryNow.getSellingPlanId() ⇒ Promise.<string>
Promise.<string>
Gets the selling plan ID number as a string.
Kind: instance method of TryNow
Returns: Promise.<string>
- selling plan ID