Shopify SDK for Unity
Public Member Functions | List of all members
Shopify.UIToolkit.IShop Interface Reference
Inheritance diagram for Shopify.UIToolkit.IShop:
Shopify.UIToolkit.IMultiProductShop Shopify.UIToolkit.ISingleProductShop Shopify.UIToolkit.Shops.Generic.GenericMultiProductShop Shopify.UIToolkit.Shops.DebugSingleProductShop Shopify.UIToolkit.Shops.GenericSingleProductShop

Public Member Functions

void OnLoadingStarted ()
 Called when the controller has started loading data from shopify. Shops can use this to know when to show loading states or spinners. More...
 
void OnLoadingFinished ()
 Called when the controller has finished loading data from shopify. Shops can use this to dismiss loading states or spinners. More...
 
void OnError (ShopifyError error)
 Called when a request initiated by the controller returns an error More...
 
void OnPurchaseStarted ()
 Called when a purchase has started in the controller. Useful for changing the UI when a purchase is ongoing. More...
 
void OnPurchaseCancelled ()
 Called when an ongoing purchase is cancelled. This either occurs when a native payment method is cancelled or the purchase is cancelled manually. More...
 
void OnPurchaseCompleted ()
 Called when an ongoing purchase completes. When using the Web purchase method, it's possible this will never be called if the player navigates away from the browser and doesn't complete the purchase. In this case you should always show a UI for cancelling the purchase in-game. More...
 
void OnPurchaseFailed (ShopifyError error)
 Called when an ongoing purchase fails to complete. This can occur if the cart is invalid and a checkout cannot be created from it. If it's a native payment (ie: Apple Pay), then this can also occur if the payment fails to process. More...
 
void OnCartQuantityChanged (int totalNumberOfCartItems)
 Called when there was a change in the total number of items in the cart. More...
 
void OnCartItemsChanged (List< CartItem > lineItems)
 Called when the Items in the cart have updated. More...
 

Member Function Documentation

◆ OnCartItemsChanged()

void Shopify.UIToolkit.IShop.OnCartItemsChanged ( List< CartItem lineItems)

Called when the Items in the cart have updated.

Parameters
lineItemsThe new line items in the cart

◆ OnCartQuantityChanged()

void Shopify.UIToolkit.IShop.OnCartQuantityChanged ( int  totalNumberOfCartItems)

Called when there was a change in the total number of items in the cart.

Parameters
totalNumberOfCartItems

◆ OnError()

void Shopify.UIToolkit.IShop.OnError ( ShopifyError  error)

Called when a request initiated by the controller returns an error

Parameters
errorThe error that occured

Implemented in Shopify.UIToolkit.Shops.DebugSingleProductShop.

◆ OnLoadingFinished()

void Shopify.UIToolkit.IShop.OnLoadingFinished ( )

Called when the controller has finished loading data from shopify. Shops can use this to dismiss loading states or spinners.

Implemented in Shopify.UIToolkit.Shops.DebugSingleProductShop.

◆ OnLoadingStarted()

void Shopify.UIToolkit.IShop.OnLoadingStarted ( )

Called when the controller has started loading data from shopify. Shops can use this to know when to show loading states or spinners.

Implemented in Shopify.UIToolkit.Shops.DebugSingleProductShop.

◆ OnPurchaseCancelled()

void Shopify.UIToolkit.IShop.OnPurchaseCancelled ( )

Called when an ongoing purchase is cancelled. This either occurs when a native payment method is cancelled or the purchase is cancelled manually.

Implemented in Shopify.UIToolkit.Shops.DebugSingleProductShop.

◆ OnPurchaseCompleted()

void Shopify.UIToolkit.IShop.OnPurchaseCompleted ( )

Called when an ongoing purchase completes. When using the Web purchase method, it's possible this will never be called if the player navigates away from the browser and doesn't complete the purchase. In this case you should always show a UI for cancelling the purchase in-game.

Implemented in Shopify.UIToolkit.Shops.DebugSingleProductShop.

◆ OnPurchaseFailed()

void Shopify.UIToolkit.IShop.OnPurchaseFailed ( ShopifyError  error)

Called when an ongoing purchase fails to complete. This can occur if the cart is invalid and a checkout cannot be created from it. If it's a native payment (ie: Apple Pay), then this can also occur if the payment fails to process.

Implemented in Shopify.UIToolkit.Shops.DebugSingleProductShop.

◆ OnPurchaseStarted()

void Shopify.UIToolkit.IShop.OnPurchaseStarted ( )

Called when a purchase has started in the controller. Useful for changing the UI when a purchase is ongoing.

Implemented in Shopify.UIToolkit.Shops.DebugSingleProductShop.


The documentation for this interface was generated from the following file: