Class: GrowsurfRuby::Models::Campaign::RewardUpdateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/growsurf_ruby/models/campaign/reward_update_params.rb,
sig/growsurf_ruby/models/campaign/reward_update_params.rbs

Overview

See Also:

  • GrowsurfRuby::Resources::Campaign::Rewards#update

Defined Under Namespace

Modules: Event, LimitDuration

Constant Summary collapse

GrowsurfRuby =

Returns:

  • (:CommissionStructure)

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(id:, campaign_reward_id:, 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::RewardUpdateParams for more details.

Parameters:

  • id (String)
  • campaign_reward_id (String)
  • commission_structure (GrowsurfRuby::Models::CommissionStructure) (defaults to: nil)
  • conversions_required (Integer) (defaults to: nil)
  • coupon_code (String) (defaults to: nil)

    Legacy static coupon code shown to the referrer in the reward-won email and web

  • description (String) (defaults to: nil)
  • event (Symbol, GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event) (defaults to: nil)

    The referral event that earns this Campaign Reward.

  • image_url (String) (defaults to: nil)
  • is_unlimited (Boolean) (defaults to: nil)

    Whether the reward can be earned an unlimited number of times. Defaults to `true

  • is_visible (Boolean) (defaults to: nil)

    Whether the reward is enabled. When false the reward is disabled: hidden from

  • limit (Integer) (defaults to: nil)
  • limit_duration (Symbol, GrowsurfRuby::Models::Campaign::RewardUpdateParams::LimitDuration) (defaults to: nil)
  • metadata (Hash{Symbol=>Object}) (defaults to: nil)

    Custom key/value metadata (single-level; values are stored as strings).

  • next_milestone_prefix (String) (defaults to: nil)

    Text shown before a participant's referral count in milestone-progress copy. App

  • next_milestone_suffix (String) (defaults to: nil)

    Text shown after a participant's referral count in milestone-progress copy. Appl

  • number_of_winners (Integer) (defaults to: nil)

    The number of winners (LEADERBOARD rewards only). With limitDuration `PER_MO

  • order (Integer) (defaults to: nil)
  • referral_coupon_code (String) (defaults to: nil)

    Legacy static coupon code shown to the referred friend (double-sided rewards) in

  • referral_description (String) (defaults to: nil)
  • referred_reward_upfront (Boolean) (defaults to: nil)
  • referred_value (GrowsurfRuby::Models::RewardTaxValuation) (defaults to: nil)

    Tax treatment override for the referred friend's side of a double-sided reward. Defaults

  • title (String) (defaults to: nil)
  • value (GrowsurfRuby::Models::RewardTaxValuation) (defaults to: nil)

    Tax valuation for the reward (the referrer's side of a double-sided reward). Use

  • request_options (GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 160

Instance Attribute Details

#campaign_reward_idString

Parameters:

  • value (String)

Returns:

  • (String)


19
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 19

required :campaign_reward_id, String

#commission_structureGrowsurfRuby::Models::CommissionStructure?



24
25
26
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 24

optional :commission_structure,
-> { GrowsurfRuby::CommissionStructure },
api_name: :commissionStructure

#conversions_requiredInteger?

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


31
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 31

optional :conversions_required, Integer, api_name: :conversionsRequired

#coupon_codeString?

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


39
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 39

optional :coupon_code, String, api_name: :couponCode

#descriptionString?

Parameters:

  • (String)

Returns:

  • (String, nil)


44
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 44

optional :description, String

#eventSymbol, ...

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, the stored event is preserved.



53
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 53

optional :event, enum: -> { GrowsurfRuby::Campaign::RewardUpdateParams::Event }

#idString

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 14

required :id, String

#image_urlString?

Parameters:

  • (String)

Returns:

  • (String, nil)


58
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 58

optional :image_url, String, api_name: :imageUrl

#is_unlimitedBoolean?

Whether the reward can be earned an unlimited number of times. Defaults to true, except MILESTONE rewards, which can only be earned once.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


65
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 65

optional :is_unlimited, GrowsurfRuby::Internal::Type::Boolean, api_name: :isUnlimited

#is_visibleBoolean?

Whether the reward is enabled. When false the reward is disabled: hidden from participants and no longer awarded, including those who already earned it.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


72
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 72

optional :is_visible, GrowsurfRuby::Internal::Type::Boolean, api_name: :isVisible

#limitInteger?

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


77
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 77

optional :limit, Integer

#limit_durationSymbol, ...



82
83
84
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 82

optional :limit_duration,
enum: -> { GrowsurfRuby::Campaign::RewardUpdateParams::LimitDuration },
api_name: :limitDuration

#metadataHash{Symbol=>Object}?

Custom key/value metadata (single-level; values are stored as strings).

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


90
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 90

optional :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]

#next_milestone_prefixString?

Text shown before a participant's referral count in milestone-progress copy. Applies to MILESTONE rewards.

Parameters:

  • (String)

Returns:

  • (String, nil)


97
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 97

optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix

#next_milestone_suffixString?

Text shown after a participant's referral count in milestone-progress copy. Applies to MILESTONE rewards.

Parameters:

  • (String)

Returns:

  • (String, nil)


104
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 104

optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix

#number_of_winnersInteger?

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.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


112
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 112

optional :number_of_winners, Integer, api_name: :numberOfWinners

#orderInteger?

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


117
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 117

optional :order, Integer

#referral_coupon_codeString?

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


125
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 125

optional :referral_coupon_code, String, api_name: :referralCouponCode

#referral_descriptionString?

Parameters:

  • (String)

Returns:

  • (String, nil)


130
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 130

optional :referral_description, String, api_name: :referralDescription

#referred_reward_upfrontBoolean?

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


135
136
137
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 135

optional :referred_reward_upfront,
GrowsurfRuby::Internal::Type::Boolean,
api_name: :referredRewardUpfront

#referred_valueGrowsurfRuby::Models::RewardTaxValuation?

Tax treatment override for the referred friend's side of a double-sided reward. Defaults to the program's confirmed default.



144
145
146
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 144

optional :referred_value,
-> { GrowsurfRuby::RewardTaxValuation },
api_name: :referredValue

#titleString?

Parameters:

  • (String)

Returns:

  • (String, nil)


151
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 151

optional :title, String

#valueGrowsurfRuby::Models::RewardTaxValuation?

Tax valuation for the reward (the referrer's side of a double-sided reward). Used by tax documentation / 1099 reporting.



158
# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 158

optional :value, -> { GrowsurfRuby::RewardTaxValuation }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/growsurf_ruby/models/campaign/reward_update_params.rb', line 219

Instance Method Details

#to_hash{

Returns:

  • ({)


161
# File 'sig/growsurf_ruby/models/campaign/reward_update_params.rbs', line 161

def to_hash: -> {