Class ECommerceSystem

Inheritance Relationships

Base Type

Class Documentation

class ECommerceSystem : public csp::systems::SystemBase

Public facing system that allows interfacing with CSP’s concept of a ECommerce platform.

Offers methods for utilising Ecommerce through CSP

Public Functions

void GetProductInformation(const common::String &SpaceId, const common::String &ProductId, ProductInfoResultCallback Callback)

Get product information from a shopify store within a space.

Parameters
void GetProductInfoCollectionByVariantIds(const common::String &SpaceId, const csp::common::Array<csp::common::String> &VariantIds, ProductInfoCollectionResultCallback Callback)

Get product information from a shopify store within a space, by providing an array of VariantIds.

Parameters
void GetCheckoutInformation(const common::String &SpaceId, const common::String &CartId, CheckoutInfoResultCallback Callback)

Get checkout information from a shopify store within a space.

Parameters
void CreateCart(const common::String &SpaceId, CartInfoResultCallback Callback)

Creates a cart for the current user in the given space.

Parameters
void GetCart(const common::String &SpaceId, const common::String &CartId, CartInfoResultCallback Callback)

Gets a cart for the current user in the given space.

Parameters
void GetShopifyStores(const csp::common::Optional<bool> &IsActive, GetShopifyStoresResultCallback Callback)

Gets all shopify stores for the given user.

Parameters
void AddShopifyStore(const common::String &StoreName, const common::String &SpaceId, const bool IsEcommerceActive, const common::String &PrivateAccessToken, AddShopifyStoreResultCallback Callback)

Adds a Shopify store to a space.

Parameters
  • StoreNamecsp::common::String : The store name (URL) to the Shopify store. Do not include the ‘.shopify.com’ part of the url.

  • SpaceIdcsp::common::String : ID of the space to link the store to.

  • IsEcommerceActive – bool : Bool to set the ecommerce system status on creation.

  • PrivateAccessTokencsp::common::String : The access token for the shopify storefront.

  • CallbackAddShopifyStoreResultCallback : Callback when asynchronous task finishes

void SetECommerceActiveInSpace(const common::String &StoreName, const common::String &SpaceId, const bool IsEcommerceActive, SetECommerceActiveResultCallback Callback)

Sets a store to be enabled or disabled in a space.

Parameters
  • StoreNamecsp::common::String : The store name (URL) to the Shopify store. Do not include the ‘.shopify.com’ part of the url.

  • SpaceIdcsp::common::String : ID of the space the store links to.

  • IsEcommerceActive – bool : Bool to set the ecommerce system status to.

  • CallbackSetECommerceActiveResultCallback : Callback when asynchronous task finishes

void ValidateShopifyStore(const common::String &StoreName, const common::String &PrivateAccessToken, ValidateShopifyStoreResultCallback Callback)

Validates a shopify store given a store name and an access token.

Parameters
void UpdateCartInformation(const CartInfo &CartInformation, CartInfoResultCallback Callback)

Update cart information from a shopify store within a space.

Parameters