C# Class ShopifySharp.ShopifyProductService

A service for manipulating Shopify products.
Inheritance: ShopifySharp.ShopifyService
Mostrar archivo Open project: nozzlegear/ShopifySharp

Public Methods

Method 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 method

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

CreateAsync() public method

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.
return Task

DeleteAsync() public method

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

GetAsync() public method

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.
return Task

ListAsync() public method

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

PublishAsync() public method

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

ShopifyProductService() public method

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.
return Newtonsoft.Json.Linq

UnpublishAsync() public method

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

UpdateAsync() public method

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