Class: Google::Apis::MerchantapiProductsV1beta::LoyaltyProgram
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiProductsV1beta::LoyaltyProgram
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/merchantapi_products_v1beta/classes.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb
Overview
A message that represents loyalty program.
Instance Attribute Summary collapse
-
#cashback_for_future_use ⇒ Google::Apis::MerchantapiProductsV1beta::Price
The price represented as a number and currency.
-
#loyalty_points ⇒ Fixnum
The amount of loyalty points earned on a purchase.
-
#member_price_effective_date ⇒ Google::Apis::MerchantapiProductsV1beta::Interval
Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).
-
#price ⇒ Google::Apis::MerchantapiProductsV1beta::Price
The price represented as a number and currency.
-
#program_label ⇒ String
The label of the loyalty program.
-
#tier_label ⇒ String
The label of the tier within the loyalty program.
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.
1102 1103 1104 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1102 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cashback_for_future_use ⇒ Google::Apis::MerchantapiProductsV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property cashbackForFutureUse
1067 1068 1069 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1067 def cashback_for_future_use @cashback_for_future_use end |
#loyalty_points ⇒ Fixnum
The amount of loyalty points earned on a purchase.
Corresponds to the JSON property loyaltyPoints
1072 1073 1074 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1072 def loyalty_points @loyalty_points end |
#member_price_effective_date ⇒ Google::Apis::MerchantapiProductsV1beta::Interval
Represents a time interval, encoded as a Timestamp start (inclusive) and a
Timestamp end (exclusive). The start must be less than or equal to the end.
When the start equals the end, the interval is empty (matches no time). When
both start and end are unspecified, the interval matches any time.
Corresponds to the JSON property memberPriceEffectiveDate
1080 1081 1082 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1080 def member_price_effective_date @member_price_effective_date end |
#price ⇒ Google::Apis::MerchantapiProductsV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property price
1085 1086 1087 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1085 def price @price end |
#program_label ⇒ String
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. The label must be provided so that the 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
1094 1095 1096 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1094 def program_label @program_label end |
#tier_label ⇒ String
The label of the tier within the loyalty program. Must match one of the labels
within the program.
Corresponds to the JSON property tierLabel
1100 1101 1102 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1100 def tier_label @tier_label end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1107 1108 1109 1110 1111 1112 1113 1114 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1107 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 |