Class: Google::Apis::ContentV2_1::LoyaltyProgram

Inherits:
Object
  • Object
show all
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

Allows the setting up of loyalty program benefits (for example price or points) . https://support.google.com/merchants/answer/12922446

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LoyaltyProgram

Returns a new instance of LoyaltyProgram.



6771
6772
6773
# File 'lib/google/apis/content_v2_1/classes.rb', line 6771

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

Instance Attribute Details

#cashback_for_future_useGoogle::Apis::ContentV2_1::Price

Optional. The cashback that can be used for future purchases. Corresponds to the JSON property cashbackForFutureUse



6728
6729
6730
# File 'lib/google/apis/content_v2_1/classes.rb', line 6728

def cashback_for_future_use
  @cashback_for_future_use
end

#loyalty_pointsFixnum

Optional. The amount of loyalty points earned on a purchase. Corresponds to the JSON property loyaltyPoints

Returns:

  • (Fixnum)


6733
6734
6735
# File 'lib/google/apis/content_v2_1/classes.rb', line 6733

def loyalty_points
  @loyalty_points
end

#member_price_effective_dateString

Optional. A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Corresponds to the JSON property memberPriceEffectiveDate

Returns:

  • (String)


6740
6741
6742
# File 'lib/google/apis/content_v2_1/classes.rb', line 6740

def member_price_effective_date
  @member_price_effective_date
end

#priceGoogle::Apis::ContentV2_1::Price

Optional. The price for members of the given tier (instant discount price). Must be smaller or equal to the regular price. Corresponds to the JSON property price



6746
6747
6748
# File 'lib/google/apis/content_v2_1/classes.rb', line 6746

def price
  @price
end

#program_labelString

Required. The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. It must be provided so that system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account. Corresponds to the JSON property programLabel

Returns:

  • (String)


6755
6756
6757
# File 'lib/google/apis/content_v2_1/classes.rb', line 6755

def program_label
  @program_label
end

#shipping_labelString

Optional. The shipping label for the loyalty program. You can use this label to indicate whether this offer has the loyalty shipping benefit. If not specified, the item is not eligible for loyalty shipping for the given loyalty tier. Corresponds to the JSON property shippingLabel

Returns:

  • (String)


6763
6764
6765
# File 'lib/google/apis/content_v2_1/classes.rb', line 6763

def shipping_label
  @shipping_label
end

#tier_labelString

Required. The label of the tier within the loyalty program. Must match one of the labels within the program. Corresponds to the JSON property tierLabel

Returns:

  • (String)


6769
6770
6771
# File 'lib/google/apis/content_v2_1/classes.rb', line 6769

def tier_label
  @tier_label
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6776
6777
6778
6779
6780
6781
6782
6783
6784
# File 'lib/google/apis/content_v2_1/classes.rb', line 6776

def update!(**args)
  @cashback_for_future_use = args[:cashback_for_future_use] if args.key?(:cashback_for_future_use)
  @loyalty_points = args[:loyalty_points] if args.key?(:loyalty_points)
  @member_price_effective_date = args[:member_price_effective_date] if args.key?(:member_price_effective_date)
  @price = args[:price] if args.key?(:price)
  @program_label = args[:program_label] if args.key?(:program_label)
  @shipping_label = args[:shipping_label] if args.key?(:shipping_label)
  @tier_label = args[:tier_label] if args.key?(:tier_label)
end