Class: Google::Apis::GanV1beta1::CcOffer::Reward

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/gan_v1beta1/classes.rb,
generated/google/apis/gan_v1beta1/representations.rb,
generated/google/apis/gan_v1beta1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Reward

Returns a new instance of Reward.



727
728
729
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 727

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

Instance Attribute Details

#additional_detailsString

Other limits, for example, if this rule only applies during an introductory period. Corresponds to the JSON property additionalDetails

Returns:

  • (String)


700
701
702
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 700

def additional_details
  @additional_details
end

#amountFloat

The number of units rewarded per purchase dollar. Corresponds to the JSON property amount

Returns:

  • (Float)


705
706
707
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 705

def amount
  @amount
end

#categoryString

The kind of purchases covered by this rule. Corresponds to the JSON property category

Returns:

  • (String)


710
711
712
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 710

def category
  @category
end

#expiration_monthsFloat

How long rewards granted by this rule last. Corresponds to the JSON property expirationMonths

Returns:

  • (Float)


715
716
717
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 715

def expiration_months
  @expiration_months
end

#max_reward_tierFloat

The maximum purchase amount in the given category for this rule to apply. Corresponds to the JSON property maxRewardTier

Returns:

  • (Float)


720
721
722
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 720

def max_reward_tier
  @max_reward_tier
end

#min_reward_tierFloat

The minimum purchase amount in the given category before this rule applies. Corresponds to the JSON property minRewardTier

Returns:

  • (Float)


725
726
727
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 725

def min_reward_tier
  @min_reward_tier
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



732
733
734
735
736
737
738
739
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 732

def update!(**args)
  @additional_details = args[:additional_details] if args.key?(:additional_details)
  @amount = args[:amount] if args.key?(:amount)
  @category = args[:category] if args.key?(:category)
  @expiration_months = args[:expiration_months] if args.key?(:expiration_months)
  @max_reward_tier = args[:max_reward_tier] if args.key?(:max_reward_tier)
  @min_reward_tier = args[:min_reward_tier] if args.key?(:min_reward_tier)
end