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.
-
#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.
6763 6764 6765 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6763 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
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_points ⇒ Fixnum
Optional. The amount of loyalty points earned on a purchase.
Corresponds to the JSON property loyaltyPoints
6733 6734 6735 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6733 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
6740 6741 6742 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6740 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
6746 6747 6748 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6746 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
6755 6756 6757 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6755 def program_label @program_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
6761 6762 6763 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6761 def tier_label @tier_label end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6768 6769 6770 6771 6772 6773 6774 6775 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 6768 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) @tier_label = args[:tier_label] if args.key?(:tier_label) end |