Class: GrowsurfRuby::Models::CampaignAPI::Reward
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- GrowsurfRuby::Models::CampaignAPI::Reward
- Defined in:
- lib/growsurf_ruby/models/campaign.rb
Defined Under Namespace
Modules: LimitDuration, Type
Instance Attribute Summary collapse
- #commission_structure ⇒ GrowsurfRuby::Models::CommissionStructure?
- #conversions_required ⇒ Integer?
- #coupon_code ⇒ String?
- #description ⇒ String?
- #id ⇒ String
- #image_url ⇒ String?
- #is_unlimited ⇒ Boolean
-
#limit ⇒ Integer?
‘-1` represents an unlimited reward in REST responses.
- #limit_duration ⇒ Symbol, ...
-
#metadata ⇒ Hash{Symbol=>Object}
Shallow custom metadata object.
- #next_milestone_prefix ⇒ String?
- #next_milestone_suffix ⇒ String?
- #number_of_winners ⇒ Integer?
- #order ⇒ Integer?
- #referral_description ⇒ String?
- #referred_reward_upfront ⇒ Boolean?
- #type ⇒ Symbol, GrowsurfRuby::Models::CampaignAPI::Reward::Type
Class Method Summary collapse
Instance Method Summary collapse
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:, 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_description: nil, referred_reward_upfront: nil) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 75 class Reward < GrowsurfRuby::Internal::Type::BaseModel # @!attribute id # # @return [String] required :id, String # @!attribute is_unlimited # # @return [Boolean] required :is_unlimited, GrowsurfRuby::Internal::Type::Boolean, api_name: :isUnlimited # @!attribute metadata # Shallow custom metadata object. # # @return [Hash{Symbol=>Object}] required :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown] # @!attribute type # # @return [Symbol, GrowsurfRuby::Models::CampaignAPI::Reward::Type] required :type, enum: -> { GrowsurfRuby::CampaignAPI::Reward::Type } # @!attribute commission_structure # # @return [GrowsurfRuby::Models::CommissionStructure, nil] optional :commission_structure, -> { GrowsurfRuby::CommissionStructure }, api_name: :commissionStructure, nil?: true # @!attribute conversions_required # # @return [Integer, nil] optional :conversions_required, Integer, api_name: :conversionsRequired, nil?: true # @!attribute coupon_code # # @return [String, nil] optional :coupon_code, String, api_name: :couponCode, nil?: true # @!attribute description # # @return [String, nil] optional :description, String, nil?: true # @!attribute image_url # # @return [String, nil] optional :image_url, String, api_name: :imageUrl, nil?: true # @!attribute limit # `-1` represents an unlimited reward in REST responses. # # @return [Integer, nil] optional :limit, Integer, nil?: true # @!attribute limit_duration # # @return [Symbol, GrowsurfRuby::Models::CampaignAPI::Reward::LimitDuration, nil] optional :limit_duration, enum: -> { GrowsurfRuby::CampaignAPI::Reward::LimitDuration }, api_name: :limitDuration, nil?: true # @!attribute next_milestone_prefix # # @return [String, nil] optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix, nil?: true # @!attribute next_milestone_suffix # # @return [String, nil] optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix, nil?: true # @!attribute number_of_winners # # @return [Integer, nil] optional :number_of_winners, Integer, api_name: :numberOfWinners, nil?: true # @!attribute order # # @return [Integer, nil] optional :order, Integer, nil?: true # @!attribute referral_description # # @return [String, nil] optional :referral_description, String, api_name: :referralDescription, nil?: true # @!attribute referred_reward_upfront # # @return [Boolean, nil] optional :referred_reward_upfront, GrowsurfRuby::Internal::Type::Boolean, api_name: :referredRewardUpfront # @!method 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_description: nil, referred_reward_upfront: nil) # @param id [String] # # @param is_unlimited [Boolean] # # @param metadata [Hash{Symbol=>Object}] Shallow custom metadata object. # # @param type [Symbol, GrowsurfRuby::Models::CampaignAPI::Reward::Type] # # @param commission_structure [GrowsurfRuby::Models::CommissionStructure, nil] # # @param conversions_required [Integer, nil] # # @param coupon_code [String, nil] # # @param description [String, nil] # # @param image_url [String, nil] # # @param limit [Integer, nil] `-1` represents an unlimited reward in REST responses. # # @param limit_duration [Symbol, GrowsurfRuby::Models::CampaignAPI::Reward::LimitDuration, nil] # # @param next_milestone_prefix [String, nil] # # @param next_milestone_suffix [String, nil] # # @param number_of_winners [Integer, nil] # # @param order [Integer, nil] # # @param referral_description [String, nil] # # @param referred_reward_upfront [Boolean] # @see GrowsurfRuby::Models::CampaignAPI::Reward#type module Type extend GrowsurfRuby::Internal::Type::Enum SINGLE_SIDED = :SINGLE_SIDED DOUBLE_SIDED = :DOUBLE_SIDED MILESTONE = :MILESTONE LEADERBOARD = :LEADERBOARD AFFILIATE = :AFFILIATE # @!method self.values # @return [Array<Symbol>] end # @see GrowsurfRuby::Models::CampaignAPI::Reward#limit_duration module LimitDuration extend GrowsurfRuby::Internal::Type::Enum IN_TOTAL = :IN_TOTAL PER_MONTH = :PER_MONTH # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#commission_structure ⇒ GrowsurfRuby::Models::CommissionStructure?
100 101 102 103 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 100 optional :commission_structure, -> { GrowsurfRuby::CommissionStructure }, api_name: :commissionStructure, nil?: true |
#conversions_required ⇒ Integer?
108 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 108 optional :conversions_required, Integer, api_name: :conversionsRequired, nil?: true |
#coupon_code ⇒ String?
113 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 113 optional :coupon_code, String, api_name: :couponCode, nil?: true |
#description ⇒ String?
118 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 118 optional :description, String, nil?: true |
#id ⇒ String
79 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 79 required :id, String |
#image_url ⇒ String?
123 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 123 optional :image_url, String, api_name: :imageUrl, nil?: true |
#is_unlimited ⇒ Boolean
84 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 84 required :is_unlimited, GrowsurfRuby::Internal::Type::Boolean, api_name: :isUnlimited |
#limit ⇒ Integer?
‘-1` represents an unlimited reward in REST responses.
129 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 129 optional :limit, Integer, nil?: true |
#limit_duration ⇒ Symbol, ...
134 135 136 137 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 134 optional :limit_duration, enum: -> { GrowsurfRuby::CampaignAPI::Reward::LimitDuration }, api_name: :limitDuration, nil?: true |
#metadata ⇒ Hash{Symbol=>Object}
Shallow custom metadata object.
90 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 90 required :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown] |
#next_milestone_prefix ⇒ String?
142 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 142 optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix, nil?: true |
#next_milestone_suffix ⇒ String?
147 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 147 optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix, nil?: true |
#number_of_winners ⇒ Integer?
152 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 152 optional :number_of_winners, Integer, api_name: :numberOfWinners, nil?: true |
#order ⇒ Integer?
157 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 157 optional :order, Integer, nil?: true |
#referral_description ⇒ String?
162 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 162 optional :referral_description, String, api_name: :referralDescription, nil?: true |
#referred_reward_upfront ⇒ Boolean?
167 168 169 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 167 optional :referred_reward_upfront, GrowsurfRuby::Internal::Type::Boolean, api_name: :referredRewardUpfront |
#type ⇒ Symbol, GrowsurfRuby::Models::CampaignAPI::Reward::Type
95 |
# File 'lib/growsurf_ruby/models/campaign.rb', line 95 required :type, enum: -> { GrowsurfRuby::CampaignAPI::Reward::Type } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/growsurf_ruby/models/campaign.rb', line 216
|