Class: GrowsurfRuby::Models::Campaign::Reward
Overview
Defined Under Namespace
Modules: LimitDuration, Type
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
-
#initialize(id:, is_unlimited:, metadata:, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, image_url: nil, limit: nil, limit_duration: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, value: nil) ⇒ Object
constructor
-
#to_hash ⇒ {
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, is_unlimited:, metadata:, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, image_url: nil, limit: nil, limit_duration: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, value: nil) ⇒ Object
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 135
|
Instance Attribute Details
32
33
34
35
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 32
optional :commission_structure,
-> { GrowsurfRuby::CommissionStructure },
api_name: :commissionStructure,
nil?: true
|
#conversions_required ⇒ Integer?
40
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 40
optional :conversions_required, Integer, api_name: :conversionsRequired, nil?: true
|
#coupon_code ⇒ String?
Legacy static coupon code shown to the referrer in the reward-won email and
webhook. Display text only; superseded by a connected billing integration's
issued coupon when one exists.
48
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 48
optional :coupon_code, String, api_name: :couponCode, nil?: true
|
#description ⇒ String?
53
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 53
optional :description, String, nil?: true
|
#id ⇒ String
11
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 11
required :id, String
|
#image_url ⇒ String?
58
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 58
optional :image_url, String, api_name: :imageUrl, nil?: true
|
#is_unlimited ⇒ Boolean
16
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 16
required :is_unlimited, GrowsurfRuby::Internal::Type::Boolean, api_name: :isUnlimited
|
#limit ⇒ Integer?
-1 represents an unlimited reward in REST responses.
64
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 64
optional :limit, Integer, nil?: true
|
#limit_duration ⇒ Symbol, ...
69
70
71
72
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 69
optional :limit_duration,
enum: -> { GrowsurfRuby::Campaign::Reward::LimitDuration },
api_name: :limitDuration,
nil?: true
|
Shallow custom metadata object.
22
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 22
required :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
#next_milestone_prefix ⇒ String?
Text shown before a participant's referral count in milestone-progress copy.
Applies to MILESTONE rewards.
79
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 79
optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix, nil?: true
|
#next_milestone_suffix ⇒ String?
Text shown after a participant's referral count in milestone-progress copy.
Applies to MILESTONE rewards.
86
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 86
optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix, nil?: true
|
#number_of_winners ⇒ Integer?
The number of winners (LEADERBOARD rewards only). With limitDuration
PER_MONTH this many win each month, otherwise this many win in total.
93
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 93
optional :number_of_winners, Integer, api_name: :numberOfWinners, nil?: true
|
#order ⇒ Integer?
98
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 98
optional :order, Integer, nil?: true
|
#referral_coupon_code ⇒ String?
Legacy static coupon code shown to the referred friend (double-sided rewards)
in the reward-won email and webhook. Display text only; superseded by a
connected billing integration's issued coupon when one exists.
106
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 106
optional :referral_coupon_code, String, api_name: :referralCouponCode, nil?: true
|
#referral_description ⇒ String?
111
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 111
optional :referral_description, String, api_name: :referralDescription, nil?: true
|
#referred_reward_upfront ⇒ Boolean?
116
117
118
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 116
optional :referred_reward_upfront,
GrowsurfRuby::Internal::Type::Boolean,
api_name: :referredRewardUpfront
|
Tax valuation for the referred friend's side of a double-sided reward.
124
125
126
127
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 124
optional :referred_value,
-> { GrowsurfRuby::RewardTaxValuation },
api_name: :referredValue,
nil?: true
|
27
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 27
required :type, enum: -> { GrowsurfRuby::Campaign::Reward::Type }
|
Tax valuation for the reward (the referrer's side of a double-sided reward).
133
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 133
optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
|
Class Method Details
.values ⇒ Array<Symbol>
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 186
|
Instance Method Details
#to_hash ⇒ {
94
|
# File 'sig/growsurf_ruby/models/campaign/reward.rbs', line 94
def to_hash: -> {
|