Class: Google::Apis::ContentV2_1::RepricingRuleCostOfGoodsSaleRule

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb

Overview

A repricing rule that changes the sale price based on cost of goods sale.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RepricingRuleCostOfGoodsSaleRule

Returns a new instance of RepricingRuleCostOfGoodsSaleRule.



11830
11831
11832
# File 'lib/google/apis/content_v2_1/classes.rb', line 11830

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

Instance Attribute Details

#percentage_deltaFixnum

The percent change against the COGS. Ex: 20 would mean to set the adjusted price 1.2X of the COGS data. Corresponds to the JSON property percentageDelta

Returns:

  • (Fixnum)


11823
11824
11825
# File 'lib/google/apis/content_v2_1/classes.rb', line 11823

def percentage_delta
  @percentage_delta
end

#price_deltaString

The price delta against the COGS. E.g. 2 means $2 more of the COGS. Corresponds to the JSON property priceDelta

Returns:

  • (String)


11828
11829
11830
# File 'lib/google/apis/content_v2_1/classes.rb', line 11828

def price_delta
  @price_delta
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11835
11836
11837
11838
# File 'lib/google/apis/content_v2_1/classes.rb', line 11835

def update!(**args)
  @percentage_delta = args[:percentage_delta] if args.key?(:percentage_delta)
  @price_delta = args[:price_delta] if args.key?(:price_delta)
end