Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfo
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfo
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/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.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2alphaPriceInfo
constructor
A new instance of GoogleCloudRetailV2alphaPriceInfo.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2alphaPriceInfo
Returns a new instance of GoogleCloudRetailV2alphaPriceInfo.
1190 1191 1192 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1190 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
1168 1169 1170 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1168 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.
Corresponds to the JSON property currencyCode
1175 1176 1177 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1175 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.
Corresponds to the JSON property originalPrice
1181 1182 1183 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1181 def original_price @original_price end |
#price ⇒ Float
Price of the product. Google Merchant Center property price. Schema.org property Offer.
priceSpecification.
Corresponds to the JSON property price
1188 1189 1190 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1188 def price @price end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1195 1196 1197 1198 1199 1200 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1195 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) end |