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

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

ParamTypeDescription
configTryNowConfigoptions

tryNow.getMyshopifyDomain() ⇒ string

Gets the myshopify domain of the store.

Kind: instance method of TryNow
Returns: string - domain

tryNow.getTrialPeriodDays() ⇒ Promise.<number>

Gets the number of trial period days.

Kind: instance method of TryNow
Returns: Promise.<number> - days

tryNow.getSellingPlanId() ⇒ Promise.<string>

Gets the selling plan ID number as a string.

Kind: instance method of TryNow
Returns: Promise.<string> - selling plan ID