Class: Google::Apis::ContentV2_1::LoyaltyProgram
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::LoyaltyProgram
- 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
-
#cashback_for_future_use ⇒ Google::Apis::ContentV2_1::Price
Optional.
-
#loyalty_points ⇒ Fixnum
Optional.
-
#member_price_effective_date ⇒ String
Optional.
-
#price ⇒ Google::Apis::ContentV2_1::Price
Optional.
-
#program_label ⇒ String
Required.
-
#shipping_label ⇒ String
Optional.
-
#tier_label ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LoyaltyProgram
constructor
A new instance of LoyaltyProgram.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LoyaltyProgram
Returns a new instance of LoyaltyProgram.
6819 6820 6821 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6819 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cashback_for_future_use ⇒ Google::Apis::ContentV2_1::Price
Optional. The cashback that can be used for future purchases.
Corresponds to the JSON property cashbackForFutureUse
6776 6777 6778 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6776 def cashback_for_future_use @cashback_for_future_use end |
#loyalty_points ⇒ Fixnum
Optional. The amount of loyalty points earned on a purchase.
Corresponds to the JSON property loyaltyPoints
6781 6782 6783 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6781 def loyalty_points @loyalty_points end |
#member_price_effective_date ⇒ String
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
6788 6789 6790 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6788 def member_price_effective_date @member_price_effective_date end |
#price ⇒ Google::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
6794 6795 6796 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6794 def price @price end |
#program_label ⇒ String
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
6803 6804 6805 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6803 def program_label @program_label end |
#shipping_label ⇒ String
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
6811 6812 6813 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6811 def shipping_label @shipping_label end |
#tier_label ⇒ String
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
6817 6818 6819 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6817 def tier_label @tier_label end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6824 6825 6826 6827 6828 6829 6830 6831 6832 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6824 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 |