Retail V2 API - Class Google::Cloud::Retail::V2::PriceInfo (v0.15.0)

Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::PriceInfo.

The price information of a Product.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#cost

def cost() -> ::Float
Returns
  • (::Float) — The costs associated with the sale of a particular product. Used for gross profit reporting.

    Google Merchant Center property cost_of_goods_sold.

#cost=

def cost=(value) -> ::Float
Parameter
  • value (::Float) — The costs associated with the sale of a particular product. Used for gross profit reporting.

    Google Merchant Center property cost_of_goods_sold.

Returns
  • (::Float) — The costs associated with the sale of a particular product. Used for gross profit reporting.

    Google Merchant Center property cost_of_goods_sold.

#currency_code

def currency_code() -> ::String
Returns
  • (::String) — 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 Product}s with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.

#currency_code=

def currency_code=(value) -> ::String
Parameter
  • value (::String) — 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 Product}s with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.

Returns
  • (::String) — 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 Product}s with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.

#original_price

def original_price() -> ::Float
Returns
  • (::Float) — Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.

#original_price=

def original_price=(value) -> ::Float
Parameter
  • value (::Float) — Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.
Returns
  • (::Float) — Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.

#price

def price() -> ::Float
Returns
  • (::Float) — Price of the product.

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

#price=

def price=(value) -> ::Float
Parameter
  • value (::Float) — Price of the product.

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

Returns
  • (::Float) — Price of the product.

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

#price_effective_time

def price_effective_time() -> ::Google::Protobuf::Timestamp
Returns

#price_effective_time=

def price_effective_time=(value) -> ::Google::Protobuf::Timestamp
Parameter
Returns

#price_expire_time

def price_expire_time() -> ::Google::Protobuf::Timestamp
Returns

#price_expire_time=

def price_expire_time=(value) -> ::Google::Protobuf::Timestamp
Parameter
Returns

#price_range

def price_range() -> ::Google::Cloud::Retail::V2::PriceInfo::PriceRange
Returns