growsurf-ruby 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/lib/growsurf_ruby/models/campaign/campaign_reward_list_response.rb +21 -0
  5. data/lib/growsurf_ruby/models/campaign/delete_reward_response.rb +26 -0
  6. data/lib/growsurf_ruby/models/campaign/reward.rb +166 -0
  7. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +189 -0
  8. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +182 -0
  9. data/lib/growsurf_ruby/models/campaign_create_params.rb +82 -0
  10. data/lib/growsurf_ruby/models/campaign_update_params.rb +112 -0
  11. data/lib/growsurf_ruby/models.rb +4 -0
  12. data/lib/growsurf_ruby/resources/campaign/rewards.rb +191 -0
  13. data/lib/growsurf_ruby/resources/campaign.rb +105 -0
  14. data/lib/growsurf_ruby/version.rb +1 -1
  15. data/lib/growsurf_ruby.rb +8 -0
  16. data/rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi +41 -0
  17. data/rbi/growsurf_ruby/models/campaign/delete_reward_response.rbi +38 -0
  18. data/rbi/growsurf_ruby/models/campaign/reward.rbi +252 -0
  19. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +330 -0
  20. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +281 -0
  21. data/rbi/growsurf_ruby/models/campaign_create_params.rbi +143 -0
  22. data/rbi/growsurf_ruby/models/campaign_update_params.rbi +193 -0
  23. data/rbi/growsurf_ruby/models.rbi +4 -0
  24. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +200 -0
  25. data/rbi/growsurf_ruby/resources/campaign.rbi +99 -0
  26. data/sig/growsurf_ruby/models/campaign/campaign_reward_list_response.rbs +18 -0
  27. data/sig/growsurf_ruby/models/campaign/delete_reward_response.rbs +17 -0
  28. data/sig/growsurf_ruby/models/campaign/reward.rbs +131 -0
  29. data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +192 -0
  30. data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +182 -0
  31. data/sig/growsurf_ruby/models/campaign_create_params.rbs +88 -0
  32. data/sig/growsurf_ruby/models/campaign_update_params.rbs +119 -0
  33. data/sig/growsurf_ruby/models.rbs +4 -0
  34. data/sig/growsurf_ruby/resources/campaign/rewards.rbs +70 -0
  35. data/sig/growsurf_ruby/resources/campaign.rbs +35 -0
  36. metadata +26 -2
@@ -0,0 +1,200 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Resources
5
+ class Campaign
6
+ class Rewards
7
+ # Retrieves the active, visible, and enabled rewards configured for a program.
8
+ sig do
9
+ params(
10
+ id: String,
11
+ request_options: GrowsurfRuby::RequestOptions::OrHash
12
+ ).returns(GrowsurfRuby::Models::Campaign::CampaignRewardListResponse)
13
+ end
14
+ def list(
15
+ # GrowSurf program ID.
16
+ id,
17
+ request_options: {}
18
+ )
19
+ end
20
+
21
+ # Creates a reward for a program. The reward `type` must be compatible with the
22
+ # program type.
23
+ sig do
24
+ params(
25
+ id: String,
26
+ type:
27
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::Type::OrSymbol,
28
+ commission_structure: GrowsurfRuby::CommissionStructure::OrHash,
29
+ conversions_required: Integer,
30
+ coupon_code: String,
31
+ description: String,
32
+ image_url: String,
33
+ is_active: T::Boolean,
34
+ is_unlimited: T::Boolean,
35
+ is_visible: T::Boolean,
36
+ limit: Integer,
37
+ limit_duration:
38
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::LimitDuration::OrSymbol,
39
+ metadata: T::Hash[Symbol, T.anything],
40
+ next_milestone_prefix: String,
41
+ next_milestone_suffix: String,
42
+ number_of_winners: Integer,
43
+ order: Integer,
44
+ referral_coupon_code: String,
45
+ referral_description: String,
46
+ referred_reward_upfront: T::Boolean,
47
+ title: String,
48
+ request_options: GrowsurfRuby::RequestOptions::OrHash
49
+ ).returns(GrowsurfRuby::Models::Campaign::Reward)
50
+ end
51
+ def create(
52
+ # Path param: GrowSurf program ID.
53
+ id,
54
+ # Body param: The reward type. Immutable after creation.
55
+ type:,
56
+ # Body param
57
+ commission_structure: nil,
58
+ # Body param
59
+ conversions_required: nil,
60
+ # Body param
61
+ coupon_code: nil,
62
+ # Body param
63
+ description: nil,
64
+ # Body param
65
+ image_url: nil,
66
+ # Body param
67
+ is_active: nil,
68
+ # Body param
69
+ is_unlimited: nil,
70
+ # Body param
71
+ is_visible: nil,
72
+ # Body param
73
+ limit: nil,
74
+ # Body param
75
+ limit_duration: nil,
76
+ # Body param: Custom key/value metadata (single-level; values are stored as
77
+ # strings).
78
+ metadata: nil,
79
+ # Body param
80
+ next_milestone_prefix: nil,
81
+ # Body param
82
+ next_milestone_suffix: nil,
83
+ # Body param
84
+ number_of_winners: nil,
85
+ # Body param
86
+ order: nil,
87
+ # Body param
88
+ referral_coupon_code: nil,
89
+ # Body param
90
+ referral_description: nil,
91
+ # Body param
92
+ referred_reward_upfront: nil,
93
+ # Body param
94
+ title: nil,
95
+ request_options: {}
96
+ )
97
+ end
98
+
99
+ # Updates an existing program reward. Only the fields you send are changed; `type`
100
+ # is immutable and must not be supplied.
101
+ sig do
102
+ params(
103
+ reward_id: String,
104
+ id: String,
105
+ commission_structure: GrowsurfRuby::CommissionStructure::OrHash,
106
+ conversions_required: Integer,
107
+ coupon_code: String,
108
+ description: String,
109
+ image_url: String,
110
+ is_active: T::Boolean,
111
+ is_unlimited: T::Boolean,
112
+ is_visible: T::Boolean,
113
+ limit: Integer,
114
+ limit_duration:
115
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::LimitDuration::OrSymbol,
116
+ metadata: T::Hash[Symbol, T.anything],
117
+ next_milestone_prefix: String,
118
+ next_milestone_suffix: String,
119
+ number_of_winners: Integer,
120
+ order: Integer,
121
+ referral_coupon_code: String,
122
+ referral_description: String,
123
+ referred_reward_upfront: T::Boolean,
124
+ title: String,
125
+ request_options: GrowsurfRuby::RequestOptions::OrHash
126
+ ).returns(GrowsurfRuby::Models::Campaign::Reward)
127
+ end
128
+ def update(
129
+ # Path param: Program reward ID.
130
+ reward_id,
131
+ # Path param: GrowSurf program ID.
132
+ id:,
133
+ # Body param
134
+ commission_structure: nil,
135
+ # Body param
136
+ conversions_required: nil,
137
+ # Body param
138
+ coupon_code: nil,
139
+ # Body param
140
+ description: nil,
141
+ # Body param
142
+ image_url: nil,
143
+ # Body param
144
+ is_active: nil,
145
+ # Body param
146
+ is_unlimited: nil,
147
+ # Body param
148
+ is_visible: nil,
149
+ # Body param
150
+ limit: nil,
151
+ # Body param
152
+ limit_duration: nil,
153
+ # Body param: Custom key/value metadata (single-level; values are stored as
154
+ # strings).
155
+ metadata: nil,
156
+ # Body param
157
+ next_milestone_prefix: nil,
158
+ # Body param
159
+ next_milestone_suffix: nil,
160
+ # Body param
161
+ number_of_winners: nil,
162
+ # Body param
163
+ order: nil,
164
+ # Body param
165
+ referral_coupon_code: nil,
166
+ # Body param
167
+ referral_description: nil,
168
+ # Body param
169
+ referred_reward_upfront: nil,
170
+ # Body param
171
+ title: nil,
172
+ request_options: {}
173
+ )
174
+ end
175
+
176
+ # Deletes a program reward.
177
+ sig do
178
+ params(
179
+ reward_id: String,
180
+ id: String,
181
+ request_options: GrowsurfRuby::RequestOptions::OrHash
182
+ ).returns(GrowsurfRuby::Models::Campaign::DeleteRewardResponse)
183
+ end
184
+ def delete(
185
+ # Program reward ID.
186
+ reward_id,
187
+ # GrowSurf program ID.
188
+ id:,
189
+ request_options: {}
190
+ )
191
+ end
192
+
193
+ # @api private
194
+ sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
195
+ def self.new(client:)
196
+ end
197
+ end
198
+ end
199
+ end
200
+ end
@@ -14,6 +14,10 @@ module GrowsurfRuby
14
14
  sig { returns(GrowsurfRuby::Resources::Campaign::Commission) }
15
15
  attr_reader :commission
16
16
 
17
+ # Program reward configuration operations.
18
+ sig { returns(GrowsurfRuby::Resources::Campaign::Rewards) }
19
+ attr_reader :rewards
20
+
17
21
  # Retrieves a program for the given program ID.
18
22
  sig do
19
23
  params(
@@ -37,6 +41,101 @@ module GrowsurfRuby
37
41
  def list(request_options: {})
38
42
  end
39
43
 
44
+ # Creates a program. Only `type` is required; everything else is server-defaulted.
45
+ sig do
46
+ params(
47
+ type: GrowsurfRuby::CampaignCreateParams::Type::OrSymbol,
48
+ company_logo_image_url: String,
49
+ company_name: String,
50
+ currency_iso: String,
51
+ goal: String,
52
+ name: String,
53
+ options: T::Hash[Symbol, T.anything],
54
+ rewards: T::Array[GrowsurfRuby::Campaign::RewardCreateParams::OrHash],
55
+ request_options: GrowsurfRuby::RequestOptions::OrHash
56
+ ).returns(GrowsurfRuby::CampaignAPI)
57
+ end
58
+ def create(
59
+ # The program type. Immutable after creation.
60
+ type:,
61
+ company_logo_image_url: nil,
62
+ company_name: nil,
63
+ # ISO 4217 currency code. Defaults to USD.
64
+ currency_iso: nil,
65
+ goal: nil,
66
+ # The program name. Defaults to "Untitled Program".
67
+ name: nil,
68
+ # A curated subset of program options to shallow-merge onto the defaults.
69
+ options: nil,
70
+ # Optional inline rewards to create with the program.
71
+ rewards: nil,
72
+ request_options: {}
73
+ )
74
+ end
75
+
76
+ # Updates a program. Only the fields you send are changed. `type` and `urlId` are
77
+ # immutable.
78
+ sig do
79
+ params(
80
+ id: String,
81
+ company_logo_image_url: String,
82
+ company_name: String,
83
+ currency_iso: String,
84
+ design: T::Hash[Symbol, T.anything],
85
+ emails: T::Hash[Symbol, T.anything],
86
+ goal: String,
87
+ installation: T::Hash[Symbol, T.anything],
88
+ name: String,
89
+ notifications: T::Hash[Symbol, T.anything],
90
+ options: T::Hash[Symbol, T.anything],
91
+ status: GrowsurfRuby::CampaignUpdateParams::Status::OrSymbol,
92
+ request_options: GrowsurfRuby::RequestOptions::OrHash
93
+ ).returns(GrowsurfRuby::CampaignAPI)
94
+ end
95
+ def update(
96
+ # Path param: GrowSurf program ID.
97
+ id,
98
+ # Body param
99
+ company_logo_image_url: nil,
100
+ # Body param
101
+ company_name: nil,
102
+ # Body param
103
+ currency_iso: nil,
104
+ # Body param
105
+ design: nil,
106
+ # Body param
107
+ emails: nil,
108
+ # Body param
109
+ goal: nil,
110
+ # Body param
111
+ installation: nil,
112
+ # Body param
113
+ name: nil,
114
+ # Body param
115
+ notifications: nil,
116
+ # Body param
117
+ options: nil,
118
+ # Body param: The program status. Transitions are validated; DELETED is not
119
+ # allowed.
120
+ status: nil,
121
+ request_options: {}
122
+ )
123
+ end
124
+
125
+ # Clones an existing program, returning the newly created program.
126
+ sig do
127
+ params(
128
+ id: String,
129
+ request_options: GrowsurfRuby::RequestOptions::OrHash
130
+ ).returns(GrowsurfRuby::CampaignAPI)
131
+ end
132
+ def clone(
133
+ # GrowSurf program ID.
134
+ id,
135
+ request_options: {}
136
+ )
137
+ end
138
+
40
139
  # Creates or returns a participant using the same input behavior as Add
41
140
  # Participant, then returns a participant-scoped token for GrowSurf mobile SDK
42
141
  # participant endpoints. Use this endpoint from your backend after your mobile app
@@ -0,0 +1,18 @@
1
+ module GrowsurfRuby
2
+ module Models
3
+ module Campaign
4
+ type campaign_reward_list_response =
5
+ { rewards: ::Array[GrowsurfRuby::Campaign::Reward] }
6
+
7
+ class CampaignRewardListResponse < GrowsurfRuby::Internal::Type::BaseModel
8
+ attr_accessor rewards: ::Array[GrowsurfRuby::Campaign::Reward]
9
+
10
+ def initialize: (
11
+ rewards: ::Array[GrowsurfRuby::Campaign::Reward]
12
+ ) -> void
13
+
14
+ def to_hash: -> { rewards: ::Array[GrowsurfRuby::Campaign::Reward] }
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ module GrowsurfRuby
2
+ module Models
3
+ module Campaign
4
+ type delete_reward_response = { id: String, success: bool }
5
+
6
+ class DeleteRewardResponse < GrowsurfRuby::Internal::Type::BaseModel
7
+ attr_accessor id: String
8
+
9
+ attr_accessor success: bool
10
+
11
+ def initialize: (id: String, success: bool) -> void
12
+
13
+ def to_hash: -> { id: String, success: bool }
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,131 @@
1
+ module GrowsurfRuby
2
+ module Models
3
+ module Campaign
4
+ type reward =
5
+ {
6
+ id: String,
7
+ is_unlimited: bool,
8
+ metadata: ::Hash[Symbol, top],
9
+ type: GrowsurfRuby::Models::Campaign::Reward::type_,
10
+ commission_structure: GrowsurfRuby::CommissionStructure?,
11
+ conversions_required: Integer?,
12
+ coupon_code: String?,
13
+ description: String?,
14
+ image_url: String?,
15
+ limit: Integer?,
16
+ limit_duration: GrowsurfRuby::Models::Campaign::Reward::limit_duration?,
17
+ next_milestone_prefix: String?,
18
+ next_milestone_suffix: String?,
19
+ number_of_winners: Integer?,
20
+ order: Integer?,
21
+ referral_description: String?,
22
+ referred_reward_upfront: bool
23
+ }
24
+
25
+ class Reward < GrowsurfRuby::Internal::Type::BaseModel
26
+ attr_accessor id: String
27
+
28
+ attr_accessor is_unlimited: bool
29
+
30
+ attr_accessor metadata: ::Hash[Symbol, top]
31
+
32
+ attr_accessor type: GrowsurfRuby::Models::Campaign::Reward::type_
33
+
34
+ attr_accessor commission_structure: GrowsurfRuby::CommissionStructure?
35
+
36
+ attr_accessor conversions_required: Integer?
37
+
38
+ attr_accessor coupon_code: String?
39
+
40
+ attr_accessor description: String?
41
+
42
+ attr_accessor image_url: String?
43
+
44
+ attr_accessor limit: Integer?
45
+
46
+ attr_accessor limit_duration: GrowsurfRuby::Models::Campaign::Reward::limit_duration?
47
+
48
+ attr_accessor next_milestone_prefix: String?
49
+
50
+ attr_accessor next_milestone_suffix: String?
51
+
52
+ attr_accessor number_of_winners: Integer?
53
+
54
+ attr_accessor order: Integer?
55
+
56
+ attr_accessor referral_description: String?
57
+
58
+ attr_reader referred_reward_upfront: bool?
59
+
60
+ def referred_reward_upfront=: (bool) -> bool
61
+
62
+ def initialize: (
63
+ id: String,
64
+ is_unlimited: bool,
65
+ metadata: ::Hash[Symbol, top],
66
+ type: GrowsurfRuby::Models::Campaign::Reward::type_,
67
+ ?commission_structure: GrowsurfRuby::CommissionStructure?,
68
+ ?conversions_required: Integer?,
69
+ ?coupon_code: String?,
70
+ ?description: String?,
71
+ ?image_url: String?,
72
+ ?limit: Integer?,
73
+ ?limit_duration: GrowsurfRuby::Models::Campaign::Reward::limit_duration?,
74
+ ?next_milestone_prefix: String?,
75
+ ?next_milestone_suffix: String?,
76
+ ?number_of_winners: Integer?,
77
+ ?order: Integer?,
78
+ ?referral_description: String?,
79
+ ?referred_reward_upfront: bool
80
+ ) -> void
81
+
82
+ def to_hash: -> {
83
+ id: String,
84
+ is_unlimited: bool,
85
+ metadata: ::Hash[Symbol, top],
86
+ type: GrowsurfRuby::Models::Campaign::Reward::type_,
87
+ commission_structure: GrowsurfRuby::CommissionStructure?,
88
+ conversions_required: Integer?,
89
+ coupon_code: String?,
90
+ description: String?,
91
+ image_url: String?,
92
+ limit: Integer?,
93
+ limit_duration: GrowsurfRuby::Models::Campaign::Reward::limit_duration?,
94
+ next_milestone_prefix: String?,
95
+ next_milestone_suffix: String?,
96
+ number_of_winners: Integer?,
97
+ order: Integer?,
98
+ referral_description: String?,
99
+ referred_reward_upfront: bool
100
+ }
101
+
102
+ type type_ =
103
+ :SINGLE_SIDED | :DOUBLE_SIDED | :MILESTONE | :LEADERBOARD | :AFFILIATE
104
+
105
+ module Type
106
+ extend GrowsurfRuby::Internal::Type::Enum
107
+
108
+ SINGLE_SIDED: :SINGLE_SIDED
109
+ DOUBLE_SIDED: :DOUBLE_SIDED
110
+ MILESTONE: :MILESTONE
111
+ LEADERBOARD: :LEADERBOARD
112
+ AFFILIATE: :AFFILIATE
113
+
114
+ def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::Reward::type_]
115
+ end
116
+
117
+ type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
118
+
119
+ module LimitDuration
120
+ extend GrowsurfRuby::Internal::Type::Enum
121
+
122
+ IN_TOTAL: :IN_TOTAL
123
+ PER_MONTH: :PER_MONTH
124
+ PER_YEAR: :PER_YEAR
125
+
126
+ def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::Reward::limit_duration]
127
+ end
128
+ end
129
+ end
130
+ end
131
+ end
@@ -0,0 +1,192 @@
1
+ module GrowsurfRuby
2
+ module Models
3
+ module Campaign
4
+ type reward_create_params =
5
+ {
6
+ type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_,
7
+ commission_structure: GrowsurfRuby::CommissionStructure,
8
+ conversions_required: Integer,
9
+ coupon_code: String,
10
+ description: String,
11
+ image_url: String,
12
+ is_active: bool,
13
+ is_unlimited: bool,
14
+ is_visible: bool,
15
+ limit: Integer,
16
+ limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration,
17
+ metadata: ::Hash[Symbol, top],
18
+ next_milestone_prefix: String,
19
+ next_milestone_suffix: String,
20
+ number_of_winners: Integer,
21
+ order: Integer,
22
+ referral_coupon_code: String,
23
+ referral_description: String,
24
+ referred_reward_upfront: bool,
25
+ title: String
26
+ }
27
+ & GrowsurfRuby::Internal::Type::request_parameters
28
+
29
+ class RewardCreateParams < GrowsurfRuby::Internal::Type::BaseModel
30
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
31
+ include GrowsurfRuby::Internal::Type::RequestParameters
32
+
33
+ attr_accessor type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_
34
+
35
+ attr_reader commission_structure: GrowsurfRuby::CommissionStructure?
36
+
37
+ def commission_structure=: (
38
+ GrowsurfRuby::CommissionStructure
39
+ ) -> GrowsurfRuby::CommissionStructure
40
+
41
+ attr_reader conversions_required: Integer?
42
+
43
+ def conversions_required=: (Integer) -> Integer
44
+
45
+ attr_reader coupon_code: String?
46
+
47
+ def coupon_code=: (String) -> String
48
+
49
+ attr_reader description: String?
50
+
51
+ def description=: (String) -> String
52
+
53
+ attr_reader image_url: String?
54
+
55
+ def image_url=: (String) -> String
56
+
57
+ attr_reader is_active: bool?
58
+
59
+ def is_active=: (bool) -> bool
60
+
61
+ attr_reader is_unlimited: bool?
62
+
63
+ def is_unlimited=: (bool) -> bool
64
+
65
+ attr_reader is_visible: bool?
66
+
67
+ def is_visible=: (bool) -> bool
68
+
69
+ attr_reader limit: Integer?
70
+
71
+ def limit=: (Integer) -> Integer
72
+
73
+ attr_reader limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration?
74
+
75
+ def limit_duration=: (
76
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration
77
+ ) -> GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration
78
+
79
+ attr_reader metadata: ::Hash[Symbol, top]?
80
+
81
+ def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
82
+
83
+ attr_reader next_milestone_prefix: String?
84
+
85
+ def next_milestone_prefix=: (String) -> String
86
+
87
+ attr_reader next_milestone_suffix: String?
88
+
89
+ def next_milestone_suffix=: (String) -> String
90
+
91
+ attr_reader number_of_winners: Integer?
92
+
93
+ def number_of_winners=: (Integer) -> Integer
94
+
95
+ attr_reader order: Integer?
96
+
97
+ def order=: (Integer) -> Integer
98
+
99
+ attr_reader referral_coupon_code: String?
100
+
101
+ def referral_coupon_code=: (String) -> String
102
+
103
+ attr_reader referral_description: String?
104
+
105
+ def referral_description=: (String) -> String
106
+
107
+ attr_reader referred_reward_upfront: bool?
108
+
109
+ def referred_reward_upfront=: (bool) -> bool
110
+
111
+ attr_reader title: String?
112
+
113
+ def title=: (String) -> String
114
+
115
+ def initialize: (
116
+ type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_,
117
+ ?commission_structure: GrowsurfRuby::CommissionStructure,
118
+ ?conversions_required: Integer,
119
+ ?coupon_code: String,
120
+ ?description: String,
121
+ ?image_url: String,
122
+ ?is_active: bool,
123
+ ?is_unlimited: bool,
124
+ ?is_visible: bool,
125
+ ?limit: Integer,
126
+ ?limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration,
127
+ ?metadata: ::Hash[Symbol, top],
128
+ ?next_milestone_prefix: String,
129
+ ?next_milestone_suffix: String,
130
+ ?number_of_winners: Integer,
131
+ ?order: Integer,
132
+ ?referral_coupon_code: String,
133
+ ?referral_description: String,
134
+ ?referred_reward_upfront: bool,
135
+ ?title: String,
136
+ ?request_options: GrowsurfRuby::request_opts
137
+ ) -> void
138
+
139
+ def to_hash: -> {
140
+ type: GrowsurfRuby::Models::Campaign::RewardCreateParams::type_,
141
+ commission_structure: GrowsurfRuby::CommissionStructure,
142
+ conversions_required: Integer,
143
+ coupon_code: String,
144
+ description: String,
145
+ image_url: String,
146
+ is_active: bool,
147
+ is_unlimited: bool,
148
+ is_visible: bool,
149
+ limit: Integer,
150
+ limit_duration: GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration,
151
+ metadata: ::Hash[Symbol, top],
152
+ next_milestone_prefix: String,
153
+ next_milestone_suffix: String,
154
+ number_of_winners: Integer,
155
+ order: Integer,
156
+ referral_coupon_code: String,
157
+ referral_description: String,
158
+ referred_reward_upfront: bool,
159
+ title: String,
160
+ request_options: GrowsurfRuby::RequestOptions
161
+ }
162
+
163
+ type type_ =
164
+ :SINGLE_SIDED | :DOUBLE_SIDED | :MILESTONE | :LEADERBOARD | :AFFILIATE
165
+
166
+ module Type
167
+ extend GrowsurfRuby::Internal::Type::Enum
168
+
169
+ SINGLE_SIDED: :SINGLE_SIDED
170
+ DOUBLE_SIDED: :DOUBLE_SIDED
171
+ MILESTONE: :MILESTONE
172
+ LEADERBOARD: :LEADERBOARD
173
+ AFFILIATE: :AFFILIATE
174
+
175
+ def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardCreateParams::type_]
176
+ end
177
+
178
+ type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
179
+
180
+ module LimitDuration
181
+ extend GrowsurfRuby::Internal::Type::Enum
182
+
183
+ IN_TOTAL: :IN_TOTAL
184
+ PER_MONTH: :PER_MONTH
185
+ PER_YEAR: :PER_YEAR
186
+
187
+ def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardCreateParams::limit_duration]
188
+ end
189
+ end
190
+ end
191
+ end
192
+ end