Shopify SDK for Unity
Public Member Functions | List of all members
Shopify.Unity.ProductVariant Class Reference

A product variant represents a different version of a product, such as differing sizes or differing colors. More...

Inheritance diagram for Shopify.Unity.ProductVariant:
Shopify.Unity.SDK.AbstractResponse Shopify.Unity.HasMetafields Shopify.Unity.Node

Public Member Functions

 ProductVariant (Dictionary< string, object > dataJSON)
 Accepts deserialized json data. Will further parse passed in data. More...
 
bool? available ()
 Indicates if the product variant is in stock. More...
 
bool availableForSale ()
 Indicates if the product variant is available for sale. More...
 
decimal compareAtPrice ()
 The compare at price of the variant. This can be used to mark a variant as on sale, when compareAtPrice is higher than price. More...
 
MoneyV2 compareAtPriceV2 ()
 The compare at price of the variant. This can be used to mark a variant as on sale, when compareAtPriceV2 is higher than priceV2. More...
 
string id ()
 Globally unique identifier. More...
 
Image image (string alias=null)
 Image associated with the product variant. This field falls back to the product image if no image is available. More...
 
Metafield metafield (string alias=null)
 The metafield associated with the resource. More...
 
MetafieldConnection metafields (string alias=null)
 A paginated list of metafields associated with the resource. More...
 
ProductVariantPricePairConnection presentmentPrices (string alias=null)
 List of prices and compare-at prices in the presentment currencies for this shop. More...
 
MoneyV2connection presentmentUnitPrices (string alias=null)
 List of unit prices in the presentment currencies for this shop. More...
 
decimal price ()
 The product variant’s price. More...
 
MoneyV2 priceV2 ()
 The product variant’s price. More...
 
Product product ()
 The product object that the product variant belongs to. More...
 
bool requiresShipping ()
 Whether a customer needs to provide a shipping address when placing an order for the product variant. More...
 
List< SelectedOptionselectedOptions ()
 List of product options applied to the variant. More...
 
string sku ()
 The SKU (stock keeping unit) associated with the variant. More...
 
string title ()
 The product variant’s title. More...
 
MoneyV2 unitPrice ()
 The unit price value for the variant based on the variant's measurement. More...
 
UnitPriceMeasurement unitPriceMeasurement ()
 The unit price measurement for the variant. More...
 
double? weight ()
 The weight of the product variant in the unit system specified with weight_unit. More...
 
WeightUnit weightUnit ()
 Unit of measurement for weight. More...
 
object Clone ()
 

Additional Inherited Members

- Protected Member Functions inherited from Shopify.Unity.SDK.AbstractResponse
Get< T > (string field, string alias=null)
 
- Protected Attributes inherited from Shopify.Unity.SDK.AbstractResponse
Dictionary< string, object > Data
 
- Properties inherited from Shopify.Unity.SDK.AbstractResponse
Dictionary< string, object > DataJSON [get, protected set]
 

Detailed Description

A product variant represents a different version of a product, such as differing sizes or differing colors.

Constructor & Destructor Documentation

◆ ProductVariant()

Shopify.Unity.ProductVariant.ProductVariant ( Dictionary< string, object >  dataJSON)
inline

Accepts deserialized json data. Will further parse passed in data.

Parameters
dataJSONDeserialized JSON data for ProductVariant

Member Function Documentation

◆ available()

bool? Shopify.Unity.ProductVariant.available ( )
inline

Indicates if the product variant is in stock.

Deprecated:
Use availableForSale instead

◆ availableForSale()

bool Shopify.Unity.ProductVariant.availableForSale ( )
inline

Indicates if the product variant is available for sale.

◆ compareAtPrice()

decimal Shopify.Unity.ProductVariant.compareAtPrice ( )
inline

The compare at price of the variant. This can be used to mark a variant as on sale, when compareAtPrice is higher than price.

Deprecated:
Use compareAtPriceV2 instead

◆ compareAtPriceV2()

MoneyV2 Shopify.Unity.ProductVariant.compareAtPriceV2 ( )
inline

The compare at price of the variant. This can be used to mark a variant as on sale, when compareAtPriceV2 is higher than priceV2.

◆ id()

string Shopify.Unity.ProductVariant.id ( )
inline

Globally unique identifier.

Implements Shopify.Unity.Node.

◆ image()

Image Shopify.Unity.ProductVariant.image ( string  alias = null)
inline

Image associated with the product variant. This field falls back to the product image if no image is available.

Parameters
aliasIf the original field queried was queried using an alias, then pass the matching string.

◆ metafield()

Metafield Shopify.Unity.ProductVariant.metafield ( string  alias = null)
inline

The metafield associated with the resource.

Parameters
aliasIf the original field queried was queried using an alias, then pass the matching string.

Implements Shopify.Unity.HasMetafields.

◆ metafields()

MetafieldConnection Shopify.Unity.ProductVariant.metafields ( string  alias = null)
inline

A paginated list of metafields associated with the resource.

Parameters
aliasIf the original field queried was queried using an alias, then pass the matching string.

Implements Shopify.Unity.HasMetafields.

◆ presentmentPrices()

ProductVariantPricePairConnection Shopify.Unity.ProductVariant.presentmentPrices ( string  alias = null)
inline

List of prices and compare-at prices in the presentment currencies for this shop.

Parameters
aliasIf the original field queried was queried using an alias, then pass the matching string.

◆ presentmentUnitPrices()

MoneyV2connection Shopify.Unity.ProductVariant.presentmentUnitPrices ( string  alias = null)
inline

List of unit prices in the presentment currencies for this shop.

Parameters
aliasIf the original field queried was queried using an alias, then pass the matching string.

◆ price()

decimal Shopify.Unity.ProductVariant.price ( )
inline

The product variant’s price.

Deprecated:
Use priceV2 instead

◆ priceV2()

MoneyV2 Shopify.Unity.ProductVariant.priceV2 ( )
inline

The product variant’s price.

◆ product()

Product Shopify.Unity.ProductVariant.product ( )
inline

The product object that the product variant belongs to.

◆ requiresShipping()

bool Shopify.Unity.ProductVariant.requiresShipping ( )
inline

Whether a customer needs to provide a shipping address when placing an order for the product variant.

◆ selectedOptions()

List<SelectedOption> Shopify.Unity.ProductVariant.selectedOptions ( )
inline

List of product options applied to the variant.

◆ sku()

string Shopify.Unity.ProductVariant.sku ( )
inline

The SKU (stock keeping unit) associated with the variant.

◆ title()

string Shopify.Unity.ProductVariant.title ( )
inline

The product variant’s title.

◆ unitPrice()

MoneyV2 Shopify.Unity.ProductVariant.unitPrice ( )
inline

The unit price value for the variant based on the variant's measurement.

◆ unitPriceMeasurement()

UnitPriceMeasurement Shopify.Unity.ProductVariant.unitPriceMeasurement ( )
inline

The unit price measurement for the variant.

◆ weight()

double? Shopify.Unity.ProductVariant.weight ( )
inline

The weight of the product variant in the unit system specified with weight_unit.

◆ weightUnit()

WeightUnit Shopify.Unity.ProductVariant.weightUnit ( )
inline

Unit of measurement for weight.


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