The JS Buy SDK is deprecated as of January, 2025. For more information, please see the README.

Class: ShopResource

ShopResource()

The JS Buy SDK shop resource

Constructor

new ShopResource()

Source:

Methods

fetchInfo() → {Promise|GraphModel}

Fetches shop information (currencyCode, description, moneyFormat, name, and primaryDomain). See the Storefront API reference for more information.

Source:
Returns:

A promise resolving with a GraphModel of the shop.

Type
Promise | GraphModel
Example
client.shop.fetchInfo().then((shop) => {
  // Do something with the shop
});

fetchPolicies() → {Promise|GraphModel}

Fetches shop policies (privacy policy, terms of service and refund policy).

Source:
Returns:

A promise resolving with a GraphModel of the shop.

Type
Promise | GraphModel
Example
client.shop.fetchPolicies().then((shop) => {
  // Do something with the shop
});