Class: GrowsurfRuby::Models::Campaign::RewardCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- GrowsurfRuby::Models::Campaign::RewardCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/growsurf_ruby/models/campaign/reward_create_params.rb,
sig/growsurf_ruby/models/campaign/reward_create_params.rbs
Overview
Defined Under Namespace
Modules: Event, LimitDuration, Type
Constant Summary collapse
- GrowsurfRuby =
Instance Attribute Summary collapse
- #commission_structure ⇒ GrowsurfRuby::Models::CommissionStructure?
- #conversions_required ⇒ Integer?
-
#coupon_code ⇒ String?
Legacy static coupon code shown to the referrer in the reward-won email and webhook.
- #description ⇒ String?
-
#event ⇒ Symbol, ...
The referral event that earns this Campaign Reward.
- #image_url ⇒ String?
-
#is_unlimited ⇒ Boolean?
Whether the reward can be earned an unlimited number of times.
-
#is_visible ⇒ Boolean?
Whether the reward is enabled.
- #limit ⇒ Integer?
- #limit_duration ⇒ Symbol, ...
-
#metadata ⇒ Hash{Symbol=>Object}?
Custom key/value metadata (single-level; values are stored as strings).
-
#next_milestone_prefix ⇒ String?
Text shown before a participant's referral count in milestone-progress copy.
-
#next_milestone_suffix ⇒ String?
Text shown after a participant's referral count in milestone-progress copy.
-
#number_of_winners ⇒ Integer?
The number of winners (
LEADERBOARDrewards only). - #order ⇒ Integer?
-
#referral_coupon_code ⇒ String?
Legacy static coupon code shown to the referred friend (double-sided rewards) in the reward-won email and webhook.
- #referral_description ⇒ String?
- #referred_reward_upfront ⇒ Boolean?
-
#referred_value ⇒ GrowsurfRuby::Models::RewardTaxValuation?
Tax treatment override for the referred friend's side of a double-sided reward.
- #title ⇒ String?
- #type ⇒ Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::Type
-
#value ⇒ GrowsurfRuby::Models::RewardTaxValuation?
Tax valuation for the reward (the referrer's side of a double-sided reward).
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: 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, title: nil, value: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see RewardCreateParams for more details.
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], 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
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: 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, title: nil, value: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see GrowsurfRuby::Models::Campaign::RewardCreateParams for more details.
|
|
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 155
|
Instance Attribute Details
#commission_structure ⇒ GrowsurfRuby::Models::CommissionStructure?
19 20 21 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 19 optional :commission_structure, -> { GrowsurfRuby::CommissionStructure }, api_name: :commissionStructure |
#conversions_required ⇒ Integer?
26 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 26 optional :conversions_required, Integer, api_name: :conversionsRequired |
#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.
34 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 34 optional :coupon_code, String, api_name: :couponCode |
#description ⇒ String?
39 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 39 optional :description, String |
#event ⇒ Symbol, ...
The referral event that earns this Campaign Reward. Use LEAD or
CONVERSION. LEAD requires the program installation's referralTrigger to
be CUSTOM. This field applies only to SINGLE_SIDED, DOUBLE_SIDED, and
MILESTONE rewards. When omitted, it defaults to CONVERSION.
48 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 48 optional :event, enum: -> { GrowsurfRuby::Campaign::RewardCreateParams::Event } |
#image_url ⇒ String?
53 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 53 optional :image_url, String, api_name: :imageUrl |
#is_unlimited ⇒ Boolean?
Whether the reward can be earned an unlimited number of times. Defaults to
true, except MILESTONE rewards, which can only be earned once.
60 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 60 optional :is_unlimited, GrowsurfRuby::Internal::Type::Boolean, api_name: :isUnlimited |
#is_visible ⇒ Boolean?
Whether the reward is enabled. When false the reward is disabled: hidden from
participants and no longer awarded, including those who already earned it.
67 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 67 optional :is_visible, GrowsurfRuby::Internal::Type::Boolean, api_name: :isVisible |
#limit ⇒ Integer?
72 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 72 optional :limit, Integer |
#limit_duration ⇒ Symbol, ...
77 78 79 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 77 optional :limit_duration, enum: -> { GrowsurfRuby::Campaign::RewardCreateParams::LimitDuration }, api_name: :limitDuration |
#metadata ⇒ Hash{Symbol=>Object}?
Custom key/value metadata (single-level; values are stored as strings).
85 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 85 optional :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.
92 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 92 optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix |
#next_milestone_suffix ⇒ String?
Text shown after a participant's referral count in milestone-progress copy.
Applies to MILESTONE rewards.
99 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 99 optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix |
#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;
omitting it defaults to 3.
107 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 107 optional :number_of_winners, Integer, api_name: :numberOfWinners |
#order ⇒ Integer?
112 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 112 optional :order, Integer |
#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.
120 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 120 optional :referral_coupon_code, String, api_name: :referralCouponCode |
#referral_description ⇒ String?
125 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 125 optional :referral_description, String, api_name: :referralDescription |
#referred_reward_upfront ⇒ Boolean?
130 131 132 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 130 optional :referred_reward_upfront, GrowsurfRuby::Internal::Type::Boolean, api_name: :referredRewardUpfront |
#referred_value ⇒ GrowsurfRuby::Models::RewardTaxValuation?
Tax treatment override for the referred friend's side of a double-sided reward. Defaults to the program's confirmed default.
139 140 141 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 139 optional :referred_value, -> { GrowsurfRuby::RewardTaxValuation }, api_name: :referredValue |
#title ⇒ String?
146 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 146 optional :title, String |
#type ⇒ Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::Type
14 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 14 required :type, enum: -> { GrowsurfRuby::Campaign::RewardCreateParams::Type } |
#value ⇒ GrowsurfRuby::Models::RewardTaxValuation?
Tax valuation for the reward (the referrer's side of a double-sided reward). Used by tax documentation / 1099 reporting.
153 |
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 153 optional :value, -> { GrowsurfRuby::RewardTaxValuation } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/growsurf_ruby/models/campaign/reward_create_params.rb', line 215
|
Instance Method Details
#to_hash ⇒ {
157 |
# File 'sig/growsurf_ruby/models/campaign/reward_create_params.rbs', line 157
def to_hash: -> {
|