Retail v2 API - Class PriceInfo (2.6.0)

public sealed class PriceInfo : IMessage<PriceInfo>, IEquatable<PriceInfo>, IDeepCloneable<PriceInfo>, IBufferMessage, IMessage

Reference documentation and code samples for the Retail v2 API class PriceInfo.

The price information of a [Product][google.cloud.retail.v2.Product].

Inheritance

object > PriceInfo

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Constructors

PriceInfo()

public PriceInfo()

PriceInfo(PriceInfo)

public PriceInfo(PriceInfo other)
Parameter
NameDescription
otherPriceInfo

Properties

Cost

public float Cost { get; set; }

The costs associated with the sale of a particular product. Used for gross profit reporting.

  • Profit = [price][google.cloud.retail.v2.PriceInfo.price] - [cost][google.cloud.retail.v2.PriceInfo.cost]

Google Merchant Center property cost_of_goods_sold.

Property Value
TypeDescription
float

CurrencyCode

public string CurrencyCode { get; set; }

The 3-letter currency code defined in ISO 4217.

If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned.

The [Product.Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] [Product][google.cloud.retail.v2.Product]s with the same [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id] must share the same [currency_code][google.cloud.retail.v2.PriceInfo.currency_code]. Otherwise, a FAILED_PRECONDITION error is returned.

Property Value
TypeDescription
string

OriginalPrice

public float OriginalPrice { get; set; }

Price of the product without any discount. If zero, by default set to be the [price][google.cloud.retail.v2.PriceInfo.price]. If set, [original_price][google.cloud.retail.v2.PriceInfo.original_price] should be greater than or equal to [price][google.cloud.retail.v2.PriceInfo.price], otherwise an INVALID_ARGUMENT error is thrown.

Property Value
TypeDescription
float

Price

public float Price { get; set; }

Price of the product.

Google Merchant Center property price. Schema.org property Offer.price.

Property Value
TypeDescription
float

PriceEffectiveTime

public Timestamp PriceEffectiveTime { get; set; }

The timestamp when the [price][google.cloud.retail.v2.PriceInfo.price] starts to be effective. This can be set as a future timestamp, and the [price][google.cloud.retail.v2.PriceInfo.price] is only used for search after [price_effective_time][google.cloud.retail.v2.PriceInfo.price_effective_time]. If so, the [original_price][google.cloud.retail.v2.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2.PriceInfo.original_price] is used before [price_effective_time][google.cloud.retail.v2.PriceInfo.price_effective_time].

Do not set if [price][google.cloud.retail.v2.PriceInfo.price] is always effective because it will cause additional latency during search.

Property Value
TypeDescription
Timestamp

PriceExpireTime

public Timestamp PriceExpireTime { get; set; }

The timestamp when the [price][google.cloud.retail.v2.PriceInfo.price] stops to be effective. The [price][google.cloud.retail.v2.PriceInfo.price] is used for search before [price_expire_time][google.cloud.retail.v2.PriceInfo.price_expire_time]. If this field is set, the [original_price][google.cloud.retail.v2.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2.PriceInfo.original_price] is used after [price_expire_time][google.cloud.retail.v2.PriceInfo.price_expire_time].

Do not set if [price][google.cloud.retail.v2.PriceInfo.price] is always effective because it will cause additional latency during search.

Property Value
TypeDescription
Timestamp

PriceRange

public PriceInfo.Types.PriceRange PriceRange { get; set; }

Output only. The price range of all the child [Product.Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] [Product][google.cloud.retail.v2.Product]s grouped together on the [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] [Product][google.cloud.retail.v2.Product]. Only populated for [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] [Product][google.cloud.retail.v2.Product]s.

Note: This field is OUTPUT_ONLY for [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]. Do not set this field in API requests.

Property Value
TypeDescription
PriceInfoTypesPriceRange