Class: Google::Apis::ContentV2_1::Promotion

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Promotion

Returns a new instance of Promotion



7918
7919
7920
# File 'generated/google/apis/content_v2_1/classes.rb', line 7918

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

Instance Attribute Details

#promotion_amountGoogle::Apis::ContentV2_1::Amount

[required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts. Corresponds to the JSON property promotionAmount



7911
7912
7913
# File 'generated/google/apis/content_v2_1/classes.rb', line 7911

def promotion_amount
  @promotion_amount
end

#promotion_idString

[required] ID of the promotion. Corresponds to the JSON property promotionId

Returns:

  • (String)


7916
7917
7918
# File 'generated/google/apis/content_v2_1/classes.rb', line 7916

def promotion_id
  @promotion_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7923
7924
7925
7926
# File 'generated/google/apis/content_v2_1/classes.rb', line 7923

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