Class: Google::Apis::ContentV2::OrderPromotion

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/content_v2/classes.rb,
generated/google/apis/content_v2/representations.rb,
generated/google/apis/content_v2/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) ⇒ OrderPromotion

Returns a new instance of OrderPromotion.


3459
3460
3461
# File 'generated/google/apis/content_v2/classes.rb', line 3459

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

Instance Attribute Details

#benefitsArray<Google::Apis::ContentV2::OrderPromotionBenefit>

Corresponds to the JSON property benefits


3420
3421
3422
# File 'generated/google/apis/content_v2/classes.rb', line 3420

def benefits
  @benefits
end

#effective_datesString

The date and time frame when the promotion is active and ready for validation review. Note that the promotion live time may be delayed for a few hours due to the validation review. Start date and end date are separated by a forward slash (/). The start date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when the sale starts (in Greenwich Mean Time, GMT), followed by an expression of the time zone for the sale. The end date is in the same format. Corresponds to the JSON property effectiveDates

Returns:

  • (String)

3431
3432
3433
# File 'generated/google/apis/content_v2/classes.rb', line 3431

def effective_dates
  @effective_dates
end

#generic_redemption_codeString

Optional. The text code that corresponds to the promotion when applied on the retailer?s website. Corresponds to the JSON property genericRedemptionCode

Returns:

  • (String)

3437
3438
3439
# File 'generated/google/apis/content_v2/classes.rb', line 3437

def generic_redemption_code
  @generic_redemption_code
end

#idString

The unique ID of the promotion. Corresponds to the JSON property id

Returns:

  • (String)

3442
3443
3444
# File 'generated/google/apis/content_v2/classes.rb', line 3442

def id
  @id
end

#long_titleString

The full title of the promotion. Corresponds to the JSON property longTitle

Returns:

  • (String)

3447
3448
3449
# File 'generated/google/apis/content_v2/classes.rb', line 3447

def long_title
  @long_title
end

#product_applicabilityString

Whether the promotion is applicable to all products or only specific products. Corresponds to the JSON property productApplicability

Returns:

  • (String)

3452
3453
3454
# File 'generated/google/apis/content_v2/classes.rb', line 3452

def product_applicability
  @product_applicability
end

#redemption_channelString

Indicates that the promotion is valid online. Corresponds to the JSON property redemptionChannel

Returns:

  • (String)

3457
3458
3459
# File 'generated/google/apis/content_v2/classes.rb', line 3457

def redemption_channel
  @redemption_channel
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


3464
3465
3466
3467
3468
3469
3470
3471
3472
# File 'generated/google/apis/content_v2/classes.rb', line 3464

def update!(**args)
  @benefits = args[:benefits] if args.key?(:benefits)
  @effective_dates = args[:effective_dates] if args.key?(:effective_dates)
  @generic_redemption_code = args[:generic_redemption_code] if args.key?(:generic_redemption_code)
  @id = args[:id] if args.key?(:id)
  @long_title = args[:long_title] if args.key?(:long_title)
  @product_applicability = args[:product_applicability] if args.key?(:product_applicability)
  @redemption_channel = args[:redemption_channel] if args.key?(:redemption_channel)
end