growsurf-ruby 1.3.0 → 1.4.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 (33) 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/participant_retrieve_analytics_params.rb +11 -8
  5. data/lib/growsurf_ruby/models/campaign/participant_reward.rb +1 -0
  6. data/lib/growsurf_ruby/models/campaign/reward.rb +22 -1
  7. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +23 -1
  8. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +23 -1
  9. data/lib/growsurf_ruby/models/campaign.rb +22 -1
  10. data/lib/growsurf_ruby/models/commission_structure.rb +16 -3
  11. data/lib/growsurf_ruby/models/participant_commission_list.rb +19 -1
  12. data/lib/growsurf_ruby/resources/campaign/participant.rb +6 -4
  13. data/lib/growsurf_ruby/resources/campaign/rewards.rb +6 -2
  14. data/lib/growsurf_ruby/version.rb +1 -1
  15. data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +16 -10
  16. data/rbi/growsurf_ruby/models/campaign/participant_reward.rbi +5 -0
  17. data/rbi/growsurf_ruby/models/campaign/reward.rbi +55 -0
  18. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +64 -0
  19. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +64 -0
  20. data/rbi/growsurf_ruby/models/campaign.rbi +46 -0
  21. data/rbi/growsurf_ruby/models/commission_structure.rbi +34 -3
  22. data/rbi/growsurf_ruby/models/participant_commission_list.rbi +48 -0
  23. data/rbi/growsurf_ruby/resources/campaign/participant.rbi +11 -6
  24. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +14 -0
  25. data/sig/growsurf_ruby/models/campaign/participant_reward.rbs +2 -1
  26. data/sig/growsurf_ruby/models/campaign/reward.rbs +16 -0
  27. data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +20 -0
  28. data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +20 -0
  29. data/sig/growsurf_ruby/models/campaign.rbs +16 -0
  30. data/sig/growsurf_ruby/models/commission_structure.rbs +16 -4
  31. data/sig/growsurf_ruby/models/participant_commission_list.rbs +16 -0
  32. data/sig/growsurf_ruby/resources/campaign/rewards.rbs +2 -0
  33. metadata +2 -2
@@ -53,6 +53,27 @@ module GrowsurfRuby
53
53
  sig { params(description: String).void }
54
54
  attr_writer :description
55
55
 
56
+ # The referral event that earns this Campaign Reward. Use `LEAD` or
57
+ # `CONVERSION`. `LEAD` requires the program installation's `referralTrigger` to
58
+ # be `CUSTOM`. This field applies only to `SINGLE_SIDED`, `DOUBLE_SIDED`, and
59
+ # `MILESTONE` rewards. When omitted, it defaults to `CONVERSION`.
60
+ sig do
61
+ returns(
62
+ T.nilable(
63
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol
64
+ )
65
+ )
66
+ end
67
+ attr_reader :event
68
+
69
+ sig do
70
+ params(
71
+ event:
72
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol
73
+ ).void
74
+ end
75
+ attr_writer :event
76
+
56
77
  sig { returns(T.nilable(String)) }
57
78
  attr_reader :image_url
58
79
 
@@ -189,6 +210,8 @@ module GrowsurfRuby
189
210
  conversions_required: Integer,
190
211
  coupon_code: String,
191
212
  description: String,
213
+ event:
214
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol,
192
215
  image_url: String,
193
216
  is_unlimited: T::Boolean,
194
217
  is_visible: T::Boolean,
@@ -218,6 +241,11 @@ module GrowsurfRuby
218
241
  # issued coupon when one exists.
219
242
  coupon_code: nil,
220
243
  description: nil,
244
+ # The referral event that earns this Campaign Reward. Use `LEAD` or
245
+ # `CONVERSION`. `LEAD` requires the program installation's `referralTrigger` to
246
+ # be `CUSTOM`. This field applies only to `SINGLE_SIDED`, `DOUBLE_SIDED`, and
247
+ # `MILESTONE` rewards. When omitted, it defaults to `CONVERSION`.
248
+ event: nil,
221
249
  image_url: nil,
222
250
  # Whether the reward can be earned an unlimited number of times. Defaults to
223
251
  # `true`, except `MILESTONE` rewards, which can only be earned once.
@@ -266,6 +294,8 @@ module GrowsurfRuby
266
294
  conversions_required: Integer,
267
295
  coupon_code: String,
268
296
  description: String,
297
+ event:
298
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol,
269
299
  image_url: String,
270
300
  is_unlimited: T::Boolean,
271
301
  is_visible: T::Boolean,
@@ -339,6 +369,40 @@ module GrowsurfRuby
339
369
  end
340
370
  end
341
371
 
372
+ module Event
373
+ extend GrowsurfRuby::Internal::Type::Enum
374
+
375
+ TaggedSymbol =
376
+ T.type_alias do
377
+ T.all(
378
+ Symbol,
379
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::Event
380
+ )
381
+ end
382
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
383
+
384
+ LEAD =
385
+ T.let(
386
+ :LEAD,
387
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::TaggedSymbol
388
+ )
389
+ CONVERSION =
390
+ T.let(
391
+ :CONVERSION,
392
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::TaggedSymbol
393
+ )
394
+
395
+ sig do
396
+ override.returns(
397
+ T::Array[
398
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::TaggedSymbol
399
+ ]
400
+ )
401
+ end
402
+ def self.values
403
+ end
404
+ end
405
+
342
406
  module LimitDuration
343
407
  extend GrowsurfRuby::Internal::Type::Enum
344
408
 
@@ -52,6 +52,27 @@ module GrowsurfRuby
52
52
  sig { params(description: String).void }
53
53
  attr_writer :description
54
54
 
55
+ # The referral event that earns this Campaign Reward. Use `LEAD` or
56
+ # `CONVERSION`. `LEAD` requires the program installation's `referralTrigger` to
57
+ # be `CUSTOM`. This field applies only to `SINGLE_SIDED`, `DOUBLE_SIDED`, and
58
+ # `MILESTONE` rewards. When omitted, the stored event is preserved.
59
+ sig do
60
+ returns(
61
+ T.nilable(
62
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event::OrSymbol
63
+ )
64
+ )
65
+ end
66
+ attr_reader :event
67
+
68
+ sig do
69
+ params(
70
+ event:
71
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event::OrSymbol
72
+ ).void
73
+ end
74
+ attr_writer :event
75
+
55
76
  sig { returns(T.nilable(String)) }
56
77
  attr_reader :image_url
57
78
 
@@ -188,6 +209,8 @@ module GrowsurfRuby
188
209
  conversions_required: Integer,
189
210
  coupon_code: String,
190
211
  description: String,
212
+ event:
213
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event::OrSymbol,
191
214
  image_url: String,
192
215
  is_unlimited: T::Boolean,
193
216
  is_visible: T::Boolean,
@@ -218,6 +241,11 @@ module GrowsurfRuby
218
241
  # issued coupon when one exists.
219
242
  coupon_code: nil,
220
243
  description: nil,
244
+ # The referral event that earns this Campaign Reward. Use `LEAD` or
245
+ # `CONVERSION`. `LEAD` requires the program installation's `referralTrigger` to
246
+ # be `CUSTOM`. This field applies only to `SINGLE_SIDED`, `DOUBLE_SIDED`, and
247
+ # `MILESTONE` rewards. When omitted, the stored event is preserved.
248
+ event: nil,
221
249
  image_url: nil,
222
250
  # Whether the reward can be earned an unlimited number of times. Defaults to
223
251
  # `true`, except `MILESTONE` rewards, which can only be earned once.
@@ -266,6 +294,8 @@ module GrowsurfRuby
266
294
  conversions_required: Integer,
267
295
  coupon_code: String,
268
296
  description: String,
297
+ event:
298
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event::OrSymbol,
269
299
  image_url: String,
270
300
  is_unlimited: T::Boolean,
271
301
  is_visible: T::Boolean,
@@ -290,6 +320,40 @@ module GrowsurfRuby
290
320
  def to_hash
291
321
  end
292
322
 
323
+ module Event
324
+ extend GrowsurfRuby::Internal::Type::Enum
325
+
326
+ TaggedSymbol =
327
+ T.type_alias do
328
+ T.all(
329
+ Symbol,
330
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event
331
+ )
332
+ end
333
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
334
+
335
+ LEAD =
336
+ T.let(
337
+ :LEAD,
338
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event::TaggedSymbol
339
+ )
340
+ CONVERSION =
341
+ T.let(
342
+ :CONVERSION,
343
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event::TaggedSymbol
344
+ )
345
+
346
+ sig do
347
+ override.returns(
348
+ T::Array[
349
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event::TaggedSymbol
350
+ ]
351
+ )
352
+ end
353
+ def self.values
354
+ end
355
+ end
356
+
293
357
  module LimitDuration
294
358
  extend GrowsurfRuby::Internal::Type::Enum
295
359
 
@@ -139,6 +139,16 @@ module GrowsurfRuby
139
139
  sig { returns(T.nilable(String)) }
140
140
  attr_accessor :description
141
141
 
142
+ # The referral event that earns this Campaign Reward. Present only for
143
+ # `SINGLE_SIDED`, `DOUBLE_SIDED`, and `MILESTONE` rewards. Legacy Campaign
144
+ # Rewards return `CONVERSION`.
145
+ sig do
146
+ returns(
147
+ T.nilable(GrowsurfRuby::CampaignAPI::Reward::Event::TaggedSymbol)
148
+ )
149
+ end
150
+ attr_accessor :event
151
+
142
152
  sig { returns(T.nilable(String)) }
143
153
  attr_accessor :image_url
144
154
 
@@ -221,6 +231,8 @@ module GrowsurfRuby
221
231
  conversions_required: T.nilable(Integer),
222
232
  coupon_code: T.nilable(String),
223
233
  description: T.nilable(String),
234
+ event:
235
+ T.nilable(GrowsurfRuby::CampaignAPI::Reward::Event::OrSymbol),
224
236
  image_url: T.nilable(String),
225
237
  limit: T.nilable(Integer),
226
238
  limit_duration:
@@ -251,6 +263,10 @@ module GrowsurfRuby
251
263
  # issued coupon when one exists.
252
264
  coupon_code: nil,
253
265
  description: nil,
266
+ # The referral event that earns this Campaign Reward. Present only for
267
+ # `SINGLE_SIDED`, `DOUBLE_SIDED`, and `MILESTONE` rewards. Legacy Campaign
268
+ # Rewards return `CONVERSION`.
269
+ event: nil,
254
270
  image_url: nil,
255
271
  # `-1` represents an unlimited reward in REST responses.
256
272
  limit: nil,
@@ -290,6 +306,10 @@ module GrowsurfRuby
290
306
  conversions_required: T.nilable(Integer),
291
307
  coupon_code: T.nilable(String),
292
308
  description: T.nilable(String),
309
+ event:
310
+ T.nilable(
311
+ GrowsurfRuby::CampaignAPI::Reward::Event::TaggedSymbol
312
+ ),
293
313
  image_url: T.nilable(String),
294
314
  limit: T.nilable(Integer),
295
315
  limit_duration:
@@ -355,6 +375,32 @@ module GrowsurfRuby
355
375
  end
356
376
  end
357
377
 
378
+ module Event
379
+ extend GrowsurfRuby::Internal::Type::Enum
380
+
381
+ TaggedSymbol =
382
+ T.type_alias do
383
+ T.all(Symbol, GrowsurfRuby::CampaignAPI::Reward::Event)
384
+ end
385
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
386
+
387
+ LEAD =
388
+ T.let(:LEAD, GrowsurfRuby::CampaignAPI::Reward::Event::TaggedSymbol)
389
+ CONVERSION =
390
+ T.let(
391
+ :CONVERSION,
392
+ GrowsurfRuby::CampaignAPI::Reward::Event::TaggedSymbol
393
+ )
394
+
395
+ sig do
396
+ override.returns(
397
+ T::Array[GrowsurfRuby::CampaignAPI::Reward::Event::TaggedSymbol]
398
+ )
399
+ end
400
+ def self.values
401
+ end
402
+ end
403
+
358
404
  module LimitDuration
359
405
  extend GrowsurfRuby::Internal::Type::Enum
360
406
 
@@ -26,7 +26,12 @@ module GrowsurfRuby
26
26
  sig { returns(T.nilable(Integer)) }
27
27
  attr_accessor :duration_in_months
28
28
 
29
- sig { returns(T.nilable(String)) }
29
+ # The event that generates a commission. Missing legacy values read as `SALE`.
30
+ sig do
31
+ returns(
32
+ T.nilable(GrowsurfRuby::CommissionStructure::Event::TaggedSymbol)
33
+ )
34
+ end
30
35
  attr_accessor :event
31
36
 
32
37
  sig { returns(T.nilable(T::Boolean)) }
@@ -82,7 +87,7 @@ module GrowsurfRuby
82
87
  approval_required: T.nilable(T::Boolean),
83
88
  duration: T.nilable(String),
84
89
  duration_in_months: T.nilable(Integer),
85
- event: T.nilable(String),
90
+ event: T.nilable(GrowsurfRuby::CommissionStructure::Event::OrSymbol),
86
91
  has_intro: T.nilable(T::Boolean),
87
92
  has_max_amount: T.nilable(T::Boolean),
88
93
  hold_duration: T.nilable(Integer),
@@ -131,7 +136,8 @@ module GrowsurfRuby
131
136
  approval_required: T.nilable(T::Boolean),
132
137
  duration: T.nilable(String),
133
138
  duration_in_months: T.nilable(Integer),
134
- event: T.nilable(String),
139
+ event:
140
+ T.nilable(GrowsurfRuby::CommissionStructure::Event::TaggedSymbol),
135
141
  has_intro: T.nilable(T::Boolean),
136
142
  has_max_amount: T.nilable(T::Boolean),
137
143
  hold_duration: T.nilable(Integer),
@@ -153,6 +159,31 @@ module GrowsurfRuby
153
159
  def to_hash
154
160
  end
155
161
 
162
+ module Event
163
+ extend GrowsurfRuby::Internal::Type::Enum
164
+
165
+ TaggedSymbol =
166
+ T.type_alias do
167
+ T.all(Symbol, GrowsurfRuby::CommissionStructure::Event)
168
+ end
169
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
170
+
171
+ CLICK =
172
+ T.let(:CLICK, GrowsurfRuby::CommissionStructure::Event::TaggedSymbol)
173
+ LEAD =
174
+ T.let(:LEAD, GrowsurfRuby::CommissionStructure::Event::TaggedSymbol)
175
+ SALE =
176
+ T.let(:SALE, GrowsurfRuby::CommissionStructure::Event::TaggedSymbol)
177
+
178
+ sig do
179
+ override.returns(
180
+ T::Array[GrowsurfRuby::CommissionStructure::Event::TaggedSymbol]
181
+ )
182
+ end
183
+ def self.values
184
+ end
185
+ end
186
+
156
187
  module Type
157
188
  extend GrowsurfRuby::Internal::Type::Enum
158
189
 
@@ -69,6 +69,14 @@ module GrowsurfRuby
69
69
  sig { returns(String) }
70
70
  attr_accessor :currency_iso
71
71
 
72
+ # The event that generated this commission. Legacy commissions return `SALE`.
73
+ sig do
74
+ returns(
75
+ GrowsurfRuby::ParticipantCommissionList::Commission::Event::TaggedSymbol
76
+ )
77
+ end
78
+ attr_accessor :event
79
+
72
80
  sig { returns(String) }
73
81
  attr_accessor :referred_id
74
82
 
@@ -142,6 +150,8 @@ module GrowsurfRuby
142
150
  amount: T.nilable(Integer),
143
151
  created_at: Integer,
144
152
  currency_iso: String,
153
+ event:
154
+ GrowsurfRuby::ParticipantCommissionList::Commission::Event::OrSymbol,
145
155
  referred_id: String,
146
156
  referrer_id: String,
147
157
  sale_amount: T.nilable(Integer),
@@ -166,6 +176,8 @@ module GrowsurfRuby
166
176
  amount:,
167
177
  created_at:,
168
178
  currency_iso:,
179
+ # The event that generated this commission. Legacy commissions return `SALE`.
180
+ event:,
169
181
  referred_id:,
170
182
  referrer_id:,
171
183
  sale_amount:,
@@ -192,6 +204,8 @@ module GrowsurfRuby
192
204
  amount: T.nilable(Integer),
193
205
  created_at: Integer,
194
206
  currency_iso: String,
207
+ event:
208
+ GrowsurfRuby::ParticipantCommissionList::Commission::Event::TaggedSymbol,
195
209
  referred_id: String,
196
210
  referrer_id: String,
197
211
  sale_amount: T.nilable(Integer),
@@ -215,6 +229,40 @@ module GrowsurfRuby
215
229
  def to_hash
216
230
  end
217
231
 
232
+ module Event
233
+ extend GrowsurfRuby::Internal::Type::Enum
234
+
235
+ TaggedSymbol =
236
+ T.type_alias do
237
+ T.all(
238
+ Symbol,
239
+ GrowsurfRuby::ParticipantCommissionList::Commission::Event
240
+ )
241
+ end
242
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
243
+
244
+ LEAD =
245
+ T.let(
246
+ :LEAD,
247
+ GrowsurfRuby::ParticipantCommissionList::Commission::Event::TaggedSymbol
248
+ )
249
+ SALE =
250
+ T.let(
251
+ :SALE,
252
+ GrowsurfRuby::ParticipantCommissionList::Commission::Event::TaggedSymbol
253
+ )
254
+
255
+ sig do
256
+ override.returns(
257
+ T::Array[
258
+ GrowsurfRuby::ParticipantCommissionList::Commission::Event::TaggedSymbol
259
+ ]
260
+ )
261
+ end
262
+ def self.values
263
+ end
264
+ end
265
+
218
266
  module Status
219
267
  extend GrowsurfRuby::Internal::Type::Enum
220
268
 
@@ -626,7 +626,9 @@ module GrowsurfRuby
626
626
  # metrics for affiliate programs). Pass `include=email` for `sent` (accepted for
627
627
  # delivery), `delivered`, `opened`, `clicked`, `bounced`, and `spamComplaints` metrics
628
628
  # attributed to this participant, including invitations they sent. Use
629
- # `include=email,series` to include the same counts in each UTC series bucket.
629
+ # `include=email,series` to include the same counts in each UTC series bucket. `days`,
630
+ # `startDate`, and `endDate` filter only the optional `series` and `email` data. They do
631
+ # not filter the top-level `analytics`, `ranks`, or `shareCount` values.
630
632
  sig do
631
633
  params(
632
634
  participant_id_or_email: String,
@@ -647,10 +649,12 @@ module GrowsurfRuby
647
649
  participant_id_or_email,
648
650
  # GrowSurf program ID.
649
651
  id:,
650
- # Last number of days to retrieve analytics for. Defaults to 365. Maximum 1825.
652
+ # Last number of days for optional `series` and `email` analytics. Defaults to 365.
653
+ # Maximum 1825. Does not filter the top-level all-time totals.
651
654
  days: nil,
652
- # End date of the analytics timeframe as a Unix timestamp in milliseconds.
653
- # Required if `days` is not set.
655
+ # End of a custom `series` and `email` analytics window as a Unix timestamp in
656
+ # milliseconds. Set it together with `startDate`. Does not filter the top-level
657
+ # all-time totals.
654
658
  end_date: nil,
655
659
  # Comma-separated optional data. `series` returns this participant's own activity per
656
660
  # period; `email` returns `sent`, `delivered`, `opened`, `clicked`, `bounced`,
@@ -662,8 +666,9 @@ module GrowsurfRuby
662
666
  # Bucket size for the `series` (only used when `include` contains `series`). Defaults to
663
667
  # `day`.
664
668
  interval: nil,
665
- # Start date of the analytics timeframe as a Unix timestamp in milliseconds.
666
- # Required if `days` is not set.
669
+ # Start of a custom `series` and `email` analytics window as a Unix timestamp in
670
+ # milliseconds. Set it together with `endDate`. Does not filter the top-level
671
+ # all-time totals.
667
672
  start_date: nil,
668
673
  request_options: {}
669
674
  )
@@ -34,6 +34,8 @@ module GrowsurfRuby
34
34
  conversions_required: Integer,
35
35
  coupon_code: String,
36
36
  description: String,
37
+ event:
38
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol,
37
39
  image_url: String,
38
40
  is_unlimited: T::Boolean,
39
41
  is_visible: T::Boolean,
@@ -69,6 +71,11 @@ module GrowsurfRuby
69
71
  coupon_code: nil,
70
72
  # Body param
71
73
  description: nil,
74
+ # Body param: The referral event that earns this Campaign Reward. Use `LEAD` or
75
+ # `CONVERSION`. `LEAD` requires the program installation's `referralTrigger` to
76
+ # be `CUSTOM`. This field applies only to `SINGLE_SIDED`, `DOUBLE_SIDED`, and
77
+ # `MILESTONE` rewards. When omitted, it defaults to `CONVERSION`.
78
+ event: nil,
72
79
  # Body param
73
80
  image_url: nil,
74
81
  # Body param: Whether the reward can be earned an unlimited number of times.
@@ -130,6 +137,8 @@ module GrowsurfRuby
130
137
  conversions_required: Integer,
131
138
  coupon_code: String,
132
139
  description: String,
140
+ event:
141
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event::OrSymbol,
133
142
  image_url: String,
134
143
  is_unlimited: T::Boolean,
135
144
  is_visible: T::Boolean,
@@ -165,6 +174,11 @@ module GrowsurfRuby
165
174
  coupon_code: nil,
166
175
  # Body param
167
176
  description: nil,
177
+ # Body param: The referral event that earns this Campaign Reward. Use `LEAD` or
178
+ # `CONVERSION`. `LEAD` requires the program installation's `referralTrigger` to
179
+ # be `CUSTOM`. This field applies only to `SINGLE_SIDED`, `DOUBLE_SIDED`, and
180
+ # `MILESTONE` rewards. When omitted, the stored event is preserved.
181
+ event: nil,
168
182
  # Body param
169
183
  image_url: nil,
170
184
  # Body param: Whether the reward can be earned an unlimited number of times.
@@ -95,13 +95,14 @@ module GrowsurfRuby
95
95
  unread: bool
96
96
  }
97
97
 
98
- type status = :PENDING | :FULFILLED
98
+ type status = :PENDING | :FULFILLED | :CANCELLED
99
99
 
100
100
  module Status
101
101
  extend GrowsurfRuby::Internal::Type::Enum
102
102
 
103
103
  PENDING: :PENDING
104
104
  FULFILLED: :FULFILLED
105
+ CANCELLED: :CANCELLED
105
106
 
106
107
  def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::ParticipantReward::status]
107
108
  end
@@ -11,6 +11,7 @@ module GrowsurfRuby
11
11
  conversions_required: Integer?,
12
12
  coupon_code: String?,
13
13
  description: String?,
14
+ event: GrowsurfRuby::Models::Campaign::Reward::event?,
14
15
  image_url: String?,
15
16
  is_visible: bool,
16
17
  limit: Integer?,
@@ -44,6 +45,8 @@ module GrowsurfRuby
44
45
 
45
46
  attr_accessor description: String?
46
47
 
48
+ attr_accessor event: GrowsurfRuby::Models::Campaign::Reward::event?
49
+
47
50
  attr_accessor image_url: String?
48
51
 
49
52
  attr_reader is_visible: bool?
@@ -85,6 +88,7 @@ module GrowsurfRuby
85
88
  ?conversions_required: Integer?,
86
89
  ?coupon_code: String?,
87
90
  ?description: String?,
91
+ ?event: GrowsurfRuby::Models::Campaign::Reward::event?,
88
92
  ?image_url: String?,
89
93
  ?is_visible: bool,
90
94
  ?limit: Integer?,
@@ -110,6 +114,7 @@ module GrowsurfRuby
110
114
  conversions_required: Integer?,
111
115
  coupon_code: String?,
112
116
  description: String?,
117
+ event: GrowsurfRuby::Models::Campaign::Reward::event?,
113
118
  image_url: String?,
114
119
  is_visible: bool,
115
120
  limit: Integer?,
@@ -141,6 +146,17 @@ module GrowsurfRuby
141
146
  def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::Reward::type_]
142
147
  end
143
148
 
149
+ type event = :LEAD | :CONVERSION
150
+
151
+ module Event
152
+ extend GrowsurfRuby::Internal::Type::Enum
153
+
154
+ LEAD: :LEAD
155
+ CONVERSION: :CONVERSION
156
+
157
+ def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::Reward::event]
158
+ end
159
+
144
160
  type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
145
161
 
146
162
  module LimitDuration
@@ -8,6 +8,7 @@ module GrowsurfRuby
8
8
  conversions_required: Integer,
9
9
  coupon_code: String,
10
10
  description: String,
11
+ event: GrowsurfRuby::Models::Campaign::RewardCreateParams::event,
11
12
  image_url: String,
12
13
  is_unlimited: bool,
13
14
  is_visible: bool,
@@ -51,6 +52,12 @@ module GrowsurfRuby
51
52
 
52
53
  def description=: (String) -> String
53
54
 
55
+ attr_reader event: GrowsurfRuby::Models::Campaign::RewardCreateParams::event?
56
+
57
+ def event=: (
58
+ GrowsurfRuby::Models::Campaign::RewardCreateParams::event
59
+ ) -> GrowsurfRuby::Models::Campaign::RewardCreateParams::event
60
+
54
61
  attr_reader image_url: String?
55
62
 
56
63
  def image_url=: (String) -> String
@@ -127,6 +134,7 @@ module GrowsurfRuby
127
134
  ?conversions_required: Integer,
128
135
  ?coupon_code: String,
129
136
  ?description: String,
137
+ ?event: GrowsurfRuby::Models::Campaign::RewardCreateParams::event,
130
138
  ?image_url: String,
131
139
  ?is_unlimited: bool,
132
140
  ?is_visible: bool,
@@ -152,6 +160,7 @@ module GrowsurfRuby
152
160
  conversions_required: Integer,
153
161
  coupon_code: String,
154
162
  description: String,
163
+ event: GrowsurfRuby::Models::Campaign::RewardCreateParams::event,
155
164
  image_url: String,
156
165
  is_unlimited: bool,
157
166
  is_visible: bool,
@@ -186,6 +195,17 @@ module GrowsurfRuby
186
195
  def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardCreateParams::type_]
187
196
  end
188
197
 
198
+ type event = :LEAD | :CONVERSION
199
+
200
+ module Event
201
+ extend GrowsurfRuby::Internal::Type::Enum
202
+
203
+ LEAD: :LEAD
204
+ CONVERSION: :CONVERSION
205
+
206
+ def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardCreateParams::event]
207
+ end
208
+
189
209
  type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
190
210
 
191
211
  module LimitDuration
@@ -9,6 +9,7 @@ module GrowsurfRuby
9
9
  conversions_required: Integer,
10
10
  coupon_code: String,
11
11
  description: String,
12
+ event: GrowsurfRuby::Models::Campaign::RewardUpdateParams::event,
12
13
  image_url: String,
13
14
  is_unlimited: bool,
14
15
  is_visible: bool,
@@ -54,6 +55,12 @@ module GrowsurfRuby
54
55
 
55
56
  def description=: (String) -> String
56
57
 
58
+ attr_reader event: GrowsurfRuby::Models::Campaign::RewardUpdateParams::event?
59
+
60
+ def event=: (
61
+ GrowsurfRuby::Models::Campaign::RewardUpdateParams::event
62
+ ) -> GrowsurfRuby::Models::Campaign::RewardUpdateParams::event
63
+
57
64
  attr_reader image_url: String?
58
65
 
59
66
  def image_url=: (String) -> String
@@ -131,6 +138,7 @@ module GrowsurfRuby
131
138
  ?conversions_required: Integer,
132
139
  ?coupon_code: String,
133
140
  ?description: String,
141
+ ?event: GrowsurfRuby::Models::Campaign::RewardUpdateParams::event,
134
142
  ?image_url: String,
135
143
  ?is_unlimited: bool,
136
144
  ?is_visible: bool,
@@ -157,6 +165,7 @@ module GrowsurfRuby
157
165
  conversions_required: Integer,
158
166
  coupon_code: String,
159
167
  description: String,
168
+ event: GrowsurfRuby::Models::Campaign::RewardUpdateParams::event,
160
169
  image_url: String,
161
170
  is_unlimited: bool,
162
171
  is_visible: bool,
@@ -176,6 +185,17 @@ module GrowsurfRuby
176
185
  request_options: GrowsurfRuby::RequestOptions
177
186
  }
178
187
 
188
+ type event = :LEAD | :CONVERSION
189
+
190
+ module Event
191
+ extend GrowsurfRuby::Internal::Type::Enum
192
+
193
+ LEAD: :LEAD
194
+ CONVERSION: :CONVERSION
195
+
196
+ def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::RewardUpdateParams::event]
197
+ end
198
+
179
199
  type limit_duration = :IN_TOTAL | :PER_MONTH | :PER_YEAR
180
200
 
181
201
  module LimitDuration