Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPriceInfo

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaPriceInfo

Returns a new instance of GoogleCloudRetailV2betaPriceInfo.



1507
1508
1509
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1507

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#costFloat

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

Returns:

  • (Float)


1485
1486
1487
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1485

def cost
  @cost
end

#currency_codeString

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

Returns:

  • (String)


1492
1493
1494
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1492

def currency_code
  @currency_code
end

#original_priceFloat

Price of the product without any discount. If zero, by default set to be the price. Corresponds to the JSON property originalPrice

Returns:

  • (Float)


1498
1499
1500
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1498

def original_price
  @original_price
end

#priceFloat

Price of the product. Google Merchant Center property price. Schema.org property Offer. priceSpecification. Corresponds to the JSON property price

Returns:

  • (Float)


1505
1506
1507
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1505

def price
  @price
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1512
1513
1514
1515
1516
1517
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1512

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