Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPromotion

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

Promotion specification.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaPromotion

Returns a new instance of GoogleCloudRetailV2betaPromotion.



6402
6403
6404
# File 'lib/google/apis/retail_v2beta/classes.rb', line 6402

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

Instance Attribute Details

#promotion_idString

Promotion identifier, which is the final component of name. For example, this field is "free_gift", if name is projects/*/locations/global/catalogs/ default_catalog/promotions/free_gift. The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to Google Merchant Center property promotion_id. Corresponds to the JSON property promotionId

Returns:

  • (String)


6400
6401
6402
# File 'lib/google/apis/retail_v2beta/classes.rb', line 6400

def promotion_id
  @promotion_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6407
6408
6409
# File 'lib/google/apis/retail_v2beta/classes.rb', line 6407

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