class Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPriceInfo

The price information of a Product.

Attributes

cost[RW]

The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [ cost_of_goods_sold](support.google.com/merchants/answer/9017895). Corresponds to the JSON property `cost` @return [Float]

currency_code[RW]

The 3-letter currency code defined in [ISO 4217](www.iso.org/iso-4217- currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. Corresponds to the JSON property `currencyCode` @return [String]

original_price[RW]

Price of the product without any discount. If zero, by default set to be the price. Corresponds to the JSON property `originalPrice` @return [Float]

price[RW]

Price of the product. Google Merchant Center property [price](support. google.com/merchants/answer/6324371). Schema.org property [Offer. priceSpecification](schema.org/priceSpecification). Corresponds to the JSON property `price` @return [Float]

price_effective_time[RW]

The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search. Corresponds to the JSON property `priceEffectiveTime` @return [String]

price_expire_time[RW]

The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search. Corresponds to the JSON property `priceExpireTime` @return [String]

price_range[RW]

The price range of all variant Product having the same Product. primary_product_id. Corresponds to the JSON property `priceRange` @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPriceInfoPriceRange]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/retail_v2beta/classes.rb, line 2348
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/retail_v2beta/classes.rb, line 2353
def update!(**args)
  @cost = args[:cost] if args.key?(:cost)
  @currency_code = args[:currency_code] if args.key?(:currency_code)
  @original_price = args[:original_price] if args.key?(:original_price)
  @price = args[:price] if args.key?(:price)
  @price_effective_time = args[:price_effective_time] if args.key?(:price_effective_time)
  @price_expire_time = args[:price_expire_time] if args.key?(:price_expire_time)
  @price_range = args[:price_range] if args.key?(:price_range)
end