Class: Google::Apis::MerchantapiPromotionsV1beta::InsertPromotionRequest

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

Overview

Request message for the InsertPromotion method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InsertPromotionRequest

Returns a new instance of InsertPromotionRequest.



390
391
392
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 390

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

Instance Attribute Details

#data_sourceString

Required. The data source of the promotion Format: accounts/ account/dataSources/datasource`. Corresponds to the JSON propertydataSource`

Returns:

  • (String)


377
378
379
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 377

def data_source
  @data_source
end

#promotionGoogle::Apis::MerchantapiPromotionsV1beta::Promotion

Represents a promotion. See the following articles for more details. Required promotion input attributes to pass data validation checks are primarily defined below: * Promotions data specification * Local promotions data specification After inserting, updating a promotion input, it may take several minutes before the final promotion can be retrieved. Corresponds to the JSON property promotion



388
389
390
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 388

def promotion
  @promotion
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



395
396
397
398
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 395

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