Class ECommerceSystem
Defined in File ECommerceSystem.h
Inheritance Relationships
Base Type
public csp::systems::SystemBase
(Class SystemBase)
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
SpaceId – csp::common::String : space id of product
ProductId – csp::common::String : Product id of product
Callback – ProductInfoResultCallback : callback when asynchronous task finishes
-
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
SpaceId – csp::common::String : space id of product
VariantIds – csp::common::Array<csp::common::String> : Variant ids to search for
Callback – ProductInfoCollectionResultCallback : callback containing collection of product info when asynchronous task finishes
-
void GetCheckoutInformation(const common::String &SpaceId, const common::String &CartId, CheckoutInfoResultCallback Callback)
Get checkout information from a shopify store within a space.
- Parameters
SpaceId – csp::common::String : space id of the cart
CartId – csp::common::String : id of Cart being checked out
Callback – NullResultCallback : callback when asynchronous task finishes
-
void CreateCart(const common::String &SpaceId, CartInfoResultCallback Callback)
Creates a cart for the current user in the given space.
- Parameters
SpaceId – csp::common::String : ID of the space to create the cart for.
Callback – CartInfoResultCallback : Callback when asynchronous task finishes
-
void GetCart(const common::String &SpaceId, const common::String &CartId, CartInfoResultCallback Callback)
Gets a cart for the current user in the given space.
- Parameters
SpaceId – csp::common::String : ID of the space the cart belongs to.
CartId – csp::common::String : ID of the cart.
Callback – CartInfoResultCallback : Callback when asynchronous task finishes
-
void GetShopifyStores(const csp::common::Optional<bool> &IsActive, GetShopifyStoresResultCallback Callback)
Gets all shopify stores for the given user.
- Parameters
IsActive – csp::common::Optional<bool> : optional bool for filtering returned stores by active status.
Callback – GetShopifyStoresResultCallback : Callback when asynchronous task finishes
-
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
StoreName – csp::common::String : The store name (URL) to the Shopify store. Do not include the ‘.shopify.com’ part of the url.
SpaceId – csp::common::String : ID of the space to link the store to.
IsEcommerceActive – bool : Bool to set the ecommerce system status on creation.
PrivateAccessToken – csp::common::String : The access token for the shopify storefront.
Callback – AddShopifyStoreResultCallback : 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
StoreName – csp::common::String : The store name (URL) to the Shopify store. Do not include the ‘.shopify.com’ part of the url.
SpaceId – csp::common::String : ID of the space the store links to.
IsEcommerceActive – bool : Bool to set the ecommerce system status to.
Callback – SetECommerceActiveResultCallback : 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
StoreName – csp::common::String : The store name (URL) to the Shopify store. Do not include the ‘.shopify.com’ part of the url.
PrivateAccessToken – csp::common::String : The access token for the shopify storefront.
Callback – ValidateShopifyStoreResultCallback : Callback when asynchronous task finishes
-
void UpdateCartInformation(const CartInfo &CartInformation, CartInfoResultCallback Callback)
Update cart information from a shopify store within a space.
- Parameters
CartInformation – CartInfo : Updated Cart Object.
Callback – CartInfoResultCallback : Callback when asynchronous task finishes
-
void GetProductInformation(const common::String &SpaceId, const common::String &ProductId, ProductInfoResultCallback Callback)