Class: Google::Apis::ContentV2_1::RepricingRule
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::RepricingRule
- 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
Represents a repricing rule. A repricing rule is used by shopping serving to adjust transactable offer prices if conditions are met. Next ID: 24
Instance Attribute Summary collapse
-
#cogs_based_rule ⇒ Google::Apis::ContentV2_1::RepricingRuleCostOfGoodsSaleRule
A repricing rule that changes the sale price based on cost of goods sale.
-
#country_code ⇒ String
Required.
-
#effective_time_period ⇒ Google::Apis::ContentV2_1::RepricingRuleEffectiveTime
Required.
-
#eligible_offer_matcher ⇒ Google::Apis::ContentV2_1::RepricingRuleEligibleOfferMatcher
Matcher that specifies eligible offers.
-
#language_code ⇒ String
Required.
-
#merchant_id ⇒ Fixnum
Output only.
-
#paused ⇒ Boolean
(also: #paused?)
Represents whether a rule is paused.
-
#restriction ⇒ Google::Apis::ContentV2_1::RepricingRuleRestriction
Definition of a rule restriction.
-
#rule_id ⇒ String
Output only.
-
#stats_based_rule ⇒ Google::Apis::ContentV2_1::RepricingRuleStatsBasedRule
Definition of stats based rule.
-
#title ⇒ String
The title for the rule.
-
#type ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RepricingRule
constructor
A new instance of RepricingRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RepricingRule
Returns a new instance of RepricingRule.
11575 11576 11577 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11575 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cogs_based_rule ⇒ Google::Apis::ContentV2_1::RepricingRuleCostOfGoodsSaleRule
A repricing rule that changes the sale price based on cost of goods sale.
Corresponds to the JSON property cogsBasedRule
11501 11502 11503 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11501 def cogs_based_rule @cogs_based_rule end |
#country_code ⇒ String
Required. Immutable. CLDR country code (e.g. "US").
Corresponds to the JSON property countryCode
11506 11507 11508 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11506 def country_code @country_code end |
#effective_time_period ⇒ Google::Apis::ContentV2_1::RepricingRuleEffectiveTime
Required. Time period when the rule should take effect.
Corresponds to the JSON property effectiveTimePeriod
11511 11512 11513 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11511 def effective_time_period @effective_time_period end |
#eligible_offer_matcher ⇒ Google::Apis::ContentV2_1::RepricingRuleEligibleOfferMatcher
Matcher that specifies eligible offers. When the USE_FEED_ATTRIBUTE option is
selected, only the repricing_rule_id attribute on the product feed is used to
specify offer-rule mapping. When the CUSTOM_FILTER option is selected, only
the *_matcher fields are used to filter the offers for offer-rule mapping. If
the CUSTOM_FILTER option is selected, an offer needs to satisfy each custom
filter matcher to be eligible for a rule. Size limit: the sum of the number of
entries in all the matchers should not exceed 20. For example, there can be 15
product ids and 5 brands, but not 10 product ids and 11 brands.
Corresponds to the JSON property eligibleOfferMatcher
11523 11524 11525 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11523 def eligible_offer_matcher @eligible_offer_matcher end |
#language_code ⇒ String
Required. Immutable. The two-letter ISO 639-1 language code associated with
the repricing rule.
Corresponds to the JSON property languageCode
11529 11530 11531 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11529 def language_code @language_code end |
#merchant_id ⇒ Fixnum
Output only. Immutable. Merchant that owns the repricing rule.
Corresponds to the JSON property merchantId
11534 11535 11536 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11534 def merchant_id @merchant_id end |
#paused ⇒ Boolean Also known as: paused?
Represents whether a rule is paused. A paused rule will behave like a non-
paused rule within CRUD operations, with the major difference that a paused
rule will not be evaluated and will have no effect on offers.
Corresponds to the JSON property paused
11541 11542 11543 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11541 def paused @paused end |
#restriction ⇒ Google::Apis::ContentV2_1::RepricingRuleRestriction
Definition of a rule restriction. At least one of the following needs to be
true: (1) use_auto_pricing_min_price is true (2) floor.price_delta exists (3)
floor.percentage_delta exists If floor.price_delta and floor.percentage_delta
are both set on a rule, the highest value will be chosen by the Repricer. In
other words, for a product with a price of $50, if the floor.percentage_delta
is "-10" and the floor.price_delta is "-12", the offer price will only be
lowered $5 (10% lower than the original offer price).
Corresponds to the JSON property restriction
11553 11554 11555 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11553 def restriction @restriction end |
#rule_id ⇒ String
Output only. Immutable. The ID to uniquely identify each repricing rule.
Corresponds to the JSON property ruleId
11558 11559 11560 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11558 def rule_id @rule_id end |
#stats_based_rule ⇒ Google::Apis::ContentV2_1::RepricingRuleStatsBasedRule
Definition of stats based rule.
Corresponds to the JSON property statsBasedRule
11563 11564 11565 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11563 def stats_based_rule @stats_based_rule end |
#title ⇒ String
The title for the rule.
Corresponds to the JSON property title
11568 11569 11570 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11568 def title @title end |
#type ⇒ String
Required. Immutable. The type of the rule.
Corresponds to the JSON property type
11573 11574 11575 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11573 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11580 def update!(**args) @cogs_based_rule = args[:cogs_based_rule] if args.key?(:cogs_based_rule) @country_code = args[:country_code] if args.key?(:country_code) @effective_time_period = args[:effective_time_period] if args.key?(:effective_time_period) @eligible_offer_matcher = args[:eligible_offer_matcher] if args.key?(:eligible_offer_matcher) @language_code = args[:language_code] if args.key?(:language_code) @merchant_id = args[:merchant_id] if args.key?(:merchant_id) @paused = args[:paused] if args.key?(:paused) @restriction = args[:restriction] if args.key?(:restriction) @rule_id = args[:rule_id] if args.key?(:rule_id) @stats_based_rule = args[:stats_based_rule] if args.key?(:stats_based_rule) @title = args[:title] if args.key?(:title) @type = args[:type] if args.key?(:type) end |