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 124
|
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?
45
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 45
optional :coupon_code, String, api_name: :couponCode, nil?: true
|
#description ⇒ String?
50
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 50
optional :description, String, nil?: true
|
#id ⇒ String
11
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 11
required :id, String
|
#image_url ⇒ String?
55
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 55
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.
61
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 61
optional :limit, Integer, nil?: true
|
#limit_duration ⇒ Symbol, ...
66
67
68
69
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 66
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?
74
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 74
optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix, nil?: true
|
#next_milestone_suffix ⇒ String?
79
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 79
optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix, nil?: true
|
#number_of_winners ⇒ Integer?
84
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 84
optional :number_of_winners, Integer, api_name: :numberOfWinners, nil?: true
|
#order ⇒ Integer?
89
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 89
optional :order, Integer, nil?: true
|
#referral_coupon_code ⇒ String?
The coupon code delivered to the referred friend (double-sided rewards).
95
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 95
optional :referral_coupon_code, String, api_name: :referralCouponCode, nil?: true
|
#referral_description ⇒ String?
100
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 100
optional :referral_description, String, api_name: :referralDescription, nil?: true
|
#referred_reward_upfront ⇒ Boolean?
105
106
107
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 105
optional :referred_reward_upfront,
GrowsurfRuby::Internal::Type::Boolean,
api_name: :referredRewardUpfront
|
Tax valuation for the referred friend's side of a double-sided reward.
113
114
115
116
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 113
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).
122
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 122
optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
|
Class Method Details
.values ⇒ Array<Symbol>
|
# File 'lib/growsurf_ruby/models/campaign/reward.rb', line 175
|
Instance Method Details
#to_hash ⇒ {
94
|
# File 'sig/growsurf_ruby/models/campaign/reward.rbs', line 94
def to_hash: -> {
|