Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPriceInfo
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPriceInfo
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2beta/classes.rb,
lib/google/apis/retail_v2beta/representations.rb,
lib/google/apis/retail_v2beta/representations.rb
Overview
The price information of a Product.
Instance Attribute Summary collapse
-
#cost ⇒ Float
The costs associated with the sale of a particular product.
-
#currency_code ⇒ String
The 3-letter currency code defined in ISO 4217.
-
#original_price ⇒ Float
Price of the product without any discount.
-
#price ⇒ Float
Price of the product.
-
#price_effective_time ⇒ String
The timestamp when the price starts to be effective.
-
#price_expire_time ⇒ String
The timestamp when the price stops to be effective.
-
#price_range ⇒ Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPriceInfoPriceRange
The price range of all variant Product having the same Product.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2betaPriceInfo
constructor
A new instance of GoogleCloudRetailV2betaPriceInfo.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2betaPriceInfo
Returns a new instance of GoogleCloudRetailV2betaPriceInfo.
3972 3973 3974 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3972 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cost ⇒ Float
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.
Corresponds to the JSON property cost
3924 3925 3926 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3924 def cost @cost end |
#currency_code ⇒ 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 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
3933 3934 3935 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3933 def currency_code @currency_code end |
#original_price ⇒ 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.
Corresponds to the JSON property originalPrice
3940 3941 3942 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3940 def original_price @original_price end |
#price ⇒ Float
Price of the product. Google Merchant Center property price. Schema.org property Offer.price.
Corresponds to the JSON property price
3947 3948 3949 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3947 def price @price end |
#price_effective_time ⇒ String
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
3956 3957 3958 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3956 def price_effective_time @price_effective_time end |
#price_expire_time ⇒ String
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
3964 3965 3966 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3964 def price_expire_time @price_expire_time end |
#price_range ⇒ Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPriceInfoPriceRange
The price range of all variant Product having the same Product.
primary_product_id.
Corresponds to the JSON property priceRange
3970 3971 3972 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3970 def price_range @price_range end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3977 3978 3979 3980 3981 3982 3983 3984 3985 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 3977 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 |