C# Class ShopifySharp.ShopifyProductService

A service for manipulating Shopify products.
Inheritance: ShopifySharp.ShopifyService
Afficher le fichier Open project: nozzlegear/ShopifySharp

Méthodes publiques

Méthode Description
CountAsync ( ShopifySharp.Filters.ShopifyProductFilter filter = null ) : Task

Gets a count of all of the shop's products.

CreateAsync ( ShopifySharp.ShopifyProduct product, ShopifySharp.ShopifyProductCreateOptions options = null ) : Task

Creates a new ShopifyProduct on the store.

DeleteAsync ( long productId ) : System.Threading.Tasks.Task

Deletes a product with the given Id.

GetAsync ( long productId, string fields = null ) : Task

Retrieves the ShopifyProduct with the given id.

ListAsync ( ShopifySharp.Filters.ShopifyProductFilter options = null ) : Task>

Gets a list of up to 250 of the shop's products.

PublishAsync ( long id ) : Task

Publishes an unpublished ShopifyProduct.

ShopifyProductService ( string myShopifyUrl, string shopAccessToken ) : Newtonsoft.Json.Linq

Creates a new instance of ShopifyProductService.

UnpublishAsync ( long id ) : Task

Unpublishes an published ShopifyProduct.

UpdateAsync ( ShopifySharp.ShopifyProduct product ) : Task

Updates the given ShopifyProduct. Id must not be null.

Method Details

CountAsync() public méthode

Gets a count of all of the shop's products.
public CountAsync ( ShopifySharp.Filters.ShopifyProductFilter filter = null ) : Task
filter ShopifySharp.Filters.ShopifyProductFilter
Résultat Task

CreateAsync() public méthode

Creates a new ShopifyProduct on the store.
public CreateAsync ( ShopifySharp.ShopifyProduct product, ShopifySharp.ShopifyProductCreateOptions options = null ) : Task
product ShopifySharp.ShopifyProduct A new . Id should be set to null.
options ShopifySharp.ShopifyProductCreateOptions Options for creating the product.
Résultat Task

DeleteAsync() public méthode

Deletes a product with the given Id.
public DeleteAsync ( long productId ) : System.Threading.Tasks.Task
productId long The product object's Id.
Résultat System.Threading.Tasks.Task

GetAsync() public méthode

Retrieves the ShopifyProduct with the given id.
public GetAsync ( long productId, string fields = null ) : Task
productId long The id of the product to retrieve.
fields string A comma-separated list of fields to return.
Résultat Task

ListAsync() public méthode

Gets a list of up to 250 of the shop's products.
public ListAsync ( ShopifySharp.Filters.ShopifyProductFilter options = null ) : Task>
options ShopifySharp.Filters.ShopifyProductFilter
Résultat Task>

PublishAsync() public méthode

Publishes an unpublished ShopifyProduct.
public PublishAsync ( long id ) : Task
id long The product's id.
Résultat Task

ShopifyProductService() public méthode

Creates a new instance of ShopifyProductService.
public ShopifyProductService ( string myShopifyUrl, string shopAccessToken ) : Newtonsoft.Json.Linq
myShopifyUrl string The shop's *.myshopify.com URL.
shopAccessToken string An API access token for the shop.
Résultat Newtonsoft.Json.Linq

UnpublishAsync() public méthode

Unpublishes an published ShopifyProduct.
public UnpublishAsync ( long id ) : Task
id long The product's id.
Résultat Task

UpdateAsync() public méthode

Updates the given ShopifyProduct. Id must not be null.
public UpdateAsync ( ShopifySharp.ShopifyProduct product ) : Task
product ShopifySharp.ShopifyProduct The to update.
Résultat Task