growsurf-ruby 1.2.1 → 1.3.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 (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/LICENSE +201 -0
  4. data/README.md +1 -1
  5. data/lib/growsurf_ruby/internal/transport/base_client.rb +21 -4
  6. data/lib/growsurf_ruby/models/affiliate_application.rb +249 -0
  7. data/lib/growsurf_ruby/models/affiliate_application_list_response.rb +42 -0
  8. data/lib/growsurf_ruby/models/affiliate_invite.rb +109 -0
  9. data/lib/growsurf_ruby/models/affiliate_invite_list_response.rb +41 -0
  10. data/lib/growsurf_ruby/models/campaign/create.rb +12 -1
  11. data/lib/growsurf_ruby/models/campaign/participant.rb +79 -4
  12. data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +28 -17
  13. data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rb +28 -0
  14. data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rb +126 -0
  15. data/lib/growsurf_ruby/models/campaign/participant_list_payouts_params.rb +1 -0
  16. data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rb +50 -0
  17. data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rb +56 -0
  18. data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +14 -17
  19. data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +25 -9
  20. data/lib/growsurf_ruby/models/campaign/referral_source.rb +3 -0
  21. data/lib/growsurf_ruby/models/campaign/reward.rb +20 -3
  22. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +3 -3
  23. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +3 -3
  24. data/lib/growsurf_ruby/models/campaign.rb +2 -2
  25. data/lib/growsurf_ruby/models/campaign_create_affiliate_invite_params.rb +45 -0
  26. data/lib/growsurf_ruby/models/campaign_list_affiliate_applications_params.rb +57 -0
  27. data/lib/growsurf_ruby/models/campaign_list_affiliate_invites_params.rb +58 -0
  28. data/lib/growsurf_ruby/models/campaign_list_payouts_params.rb +1 -0
  29. data/lib/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rb +26 -0
  30. data/lib/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rb +26 -0
  31. data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +9 -6
  32. data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +59 -11
  33. data/lib/growsurf_ruby/models/campaign_review_affiliate_application_params.rb +94 -0
  34. data/lib/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rb +26 -0
  35. data/lib/growsurf_ruby/models/email_analytics.rb +41 -0
  36. data/lib/growsurf_ruby/models/participant_payout_list.rb +8 -1
  37. data/lib/growsurf_ruby/models/reward_tax_valuation.rb +24 -9
  38. data/lib/growsurf_ruby/models.rb +19 -0
  39. data/lib/growsurf_ruby/resources/campaign/design.rb +14 -12
  40. data/lib/growsurf_ruby/resources/campaign/options.rb +7 -7
  41. data/lib/growsurf_ruby/resources/campaign/participant.rb +96 -11
  42. data/lib/growsurf_ruby/resources/campaign/rewards.rb +2 -2
  43. data/lib/growsurf_ruby/resources/campaign.rb +231 -4
  44. data/lib/growsurf_ruby/version.rb +1 -1
  45. data/lib/growsurf_ruby.rb +16 -0
  46. data/rbi/growsurf_ruby/models/affiliate_application.rbi +431 -0
  47. data/rbi/growsurf_ruby/models/affiliate_application_list_response.rbi +70 -0
  48. data/rbi/growsurf_ruby/models/affiliate_invite.rbi +167 -0
  49. data/rbi/growsurf_ruby/models/affiliate_invite_list_response.rbi +70 -0
  50. data/rbi/growsurf_ruby/models/campaign/create.rbi +17 -0
  51. data/rbi/growsurf_ruby/models/campaign/participant.rbi +169 -3
  52. data/rbi/growsurf_ruby/models/campaign/participant_activity_logs_response.rbi +3 -5
  53. data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +35 -20
  54. data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbi +3 -1
  55. data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rbi +48 -0
  56. data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbi +243 -0
  57. data/rbi/growsurf_ruby/models/campaign/participant_list_payouts_params.rbi +5 -0
  58. data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbi +100 -0
  59. data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbi +118 -0
  60. data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +22 -52
  61. data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +67 -11
  62. data/rbi/growsurf_ruby/models/campaign/referral_source.rbi +9 -0
  63. data/rbi/growsurf_ruby/models/campaign/reward.rbi +23 -2
  64. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +4 -4
  65. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +4 -4
  66. data/rbi/growsurf_ruby/models/campaign.rbi +2 -2
  67. data/rbi/growsurf_ruby/models/campaign_create_affiliate_invite_params.rbi +74 -0
  68. data/rbi/growsurf_ruby/models/campaign_list_affiliate_applications_params.rbi +130 -0
  69. data/rbi/growsurf_ruby/models/campaign_list_affiliate_invites_params.rbi +135 -0
  70. data/rbi/growsurf_ruby/models/campaign_list_payouts_params.rbi +5 -0
  71. data/rbi/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rbi +46 -0
  72. data/rbi/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rbi +46 -0
  73. data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +15 -10
  74. data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +68 -18
  75. data/rbi/growsurf_ruby/models/campaign_review_affiliate_application_params.rbi +167 -0
  76. data/rbi/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rbi +46 -0
  77. data/rbi/growsurf_ruby/models/email_analytics.rbi +200 -0
  78. data/rbi/growsurf_ruby/models/participant_payout_list.rbi +17 -3
  79. data/rbi/growsurf_ruby/models/reward_tax_valuation.rbi +66 -9
  80. data/rbi/growsurf_ruby/models.rbi +25 -0
  81. data/rbi/growsurf_ruby/resources/campaign/design.rbi +9 -8
  82. data/rbi/growsurf_ruby/resources/campaign/options.rbi +7 -7
  83. data/rbi/growsurf_ruby/resources/campaign/participant.rbi +89 -13
  84. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +4 -4
  85. data/rbi/growsurf_ruby/resources/campaign.rbi +188 -10
  86. data/sig/growsurf_ruby/models/affiliate_application.rbs +192 -0
  87. data/sig/growsurf_ruby/models/affiliate_application_list_response.rbs +39 -0
  88. data/sig/growsurf_ruby/models/affiliate_invite.rbs +92 -0
  89. data/sig/growsurf_ruby/models/affiliate_invite_list_response.rbs +39 -0
  90. data/sig/growsurf_ruby/models/campaign/create.rbs +7 -0
  91. data/sig/growsurf_ruby/models/campaign/participant.rbs +62 -2
  92. data/sig/growsurf_ruby/models/campaign/participant_activity_logs_response.rbs +2 -11
  93. data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +12 -12
  94. data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rbs +30 -0
  95. data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbs +107 -0
  96. data/sig/growsurf_ruby/models/campaign/participant_list_payouts_params.rbs +2 -1
  97. data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbs +49 -0
  98. data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbs +57 -0
  99. data/sig/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbs +5 -13
  100. data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +21 -7
  101. data/sig/growsurf_ruby/models/campaign/referral_source.rbs +4 -1
  102. data/sig/growsurf_ruby/models/campaign/reward.rbs +12 -0
  103. data/sig/growsurf_ruby/models/campaign_create_affiliate_invite_params.rbs +40 -0
  104. data/sig/growsurf_ruby/models/campaign_list_affiliate_applications_params.rbs +61 -0
  105. data/sig/growsurf_ruby/models/campaign_list_affiliate_invites_params.rbs +62 -0
  106. data/sig/growsurf_ruby/models/campaign_list_payouts_params.rbs +2 -1
  107. data/sig/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rbs +28 -0
  108. data/sig/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rbs +28 -0
  109. data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +36 -16
  110. data/sig/growsurf_ruby/models/campaign_review_affiliate_application_params.rbs +79 -0
  111. data/sig/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rbs +28 -0
  112. data/sig/growsurf_ruby/models/email_analytics.rbs +92 -0
  113. data/sig/growsurf_ruby/models/participant_payout_list.rbs +12 -4
  114. data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +26 -4
  115. data/sig/growsurf_ruby/models.rbs +18 -0
  116. data/sig/growsurf_ruby/resources/campaign/participant.rbs +16 -2
  117. data/sig/growsurf_ruby/resources/campaign.rbs +53 -0
  118. metadata +54 -3
@@ -21,6 +21,26 @@ module GrowsurfRuby
21
21
  sig { returns(String) }
22
22
  attr_accessor :participant_id_or_email
23
23
 
24
+ # Affiliate programs only. Sets the affiliate status. `APPROVED` also enrolls a
25
+ # participant who is not yet an affiliate. `SUSPENDED` and `BANNED` are rejected
26
+ # for non-affiliates.
27
+ sig do
28
+ returns(
29
+ T.nilable(
30
+ GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol
31
+ )
32
+ )
33
+ end
34
+ attr_reader :affiliate_status
35
+
36
+ sig do
37
+ params(
38
+ affiliate_status:
39
+ GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol
40
+ ).void
41
+ end
42
+ attr_writer :affiliate_status
43
+
24
44
  sig { returns(T.nilable(String)) }
25
45
  attr_reader :email
26
46
 
@@ -54,13 +74,6 @@ module GrowsurfRuby
54
74
  sig { params(notes: String).void }
55
75
  attr_writer :notes
56
76
 
57
- # The participant's PayPal email address, used for affiliate payouts.
58
- sig { returns(T.nilable(String)) }
59
- attr_reader :paypal_email
60
-
61
- sig { params(paypal_email: String).void }
62
- attr_writer :paypal_email
63
-
64
77
  sig do
65
78
  returns(
66
79
  T.nilable(
@@ -100,12 +113,13 @@ module GrowsurfRuby
100
113
  params(
101
114
  id: String,
102
115
  participant_id_or_email: String,
116
+ affiliate_status:
117
+ GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol,
103
118
  email: String,
104
119
  first_name: String,
105
120
  last_name: String,
106
121
  metadata: T::Hash[Symbol, T.anything],
107
122
  notes: String,
108
- paypal_email: String,
109
123
  referral_status:
110
124
  GrowsurfRuby::Campaign::ParticipantUpdateParams::ReferralStatus::OrSymbol,
111
125
  referred_by: String,
@@ -117,6 +131,10 @@ module GrowsurfRuby
117
131
  def self.new(
118
132
  id:,
119
133
  participant_id_or_email:,
134
+ # Affiliate programs only. Sets the affiliate status. `APPROVED` also enrolls a
135
+ # participant who is not yet an affiliate. `SUSPENDED` and `BANNED` are rejected
136
+ # for non-affiliates.
137
+ affiliate_status: nil,
120
138
  email: nil,
121
139
  first_name: nil,
122
140
  last_name: nil,
@@ -125,8 +143,6 @@ module GrowsurfRuby
125
143
  # Freeform internal notes about the participant (internal only, never exposed to
126
144
  # participants).
127
145
  notes: nil,
128
- # The participant's PayPal email address, used for affiliate payouts.
129
- paypal_email: nil,
130
146
  referral_status: nil,
131
147
  referred_by: nil,
132
148
  unsubscribed: nil,
@@ -140,12 +156,13 @@ module GrowsurfRuby
140
156
  {
141
157
  id: String,
142
158
  participant_id_or_email: String,
159
+ affiliate_status:
160
+ GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol,
143
161
  email: String,
144
162
  first_name: String,
145
163
  last_name: String,
146
164
  metadata: T::Hash[Symbol, T.anything],
147
165
  notes: String,
148
- paypal_email: String,
149
166
  referral_status:
150
167
  GrowsurfRuby::Campaign::ParticipantUpdateParams::ReferralStatus::OrSymbol,
151
168
  referred_by: String,
@@ -158,6 +175,45 @@ module GrowsurfRuby
158
175
  def to_hash
159
176
  end
160
177
 
178
+ module AffiliateStatus
179
+ extend GrowsurfRuby::Internal::Type::Enum
180
+
181
+ TaggedSymbol =
182
+ T.type_alias do
183
+ T.all(
184
+ Symbol,
185
+ GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus
186
+ )
187
+ end
188
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
189
+
190
+ APPROVED =
191
+ T.let(
192
+ :APPROVED,
193
+ GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::TaggedSymbol
194
+ )
195
+ SUSPENDED =
196
+ T.let(
197
+ :SUSPENDED,
198
+ GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::TaggedSymbol
199
+ )
200
+ BANNED =
201
+ T.let(
202
+ :BANNED,
203
+ GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::TaggedSymbol
204
+ )
205
+
206
+ sig do
207
+ override.returns(
208
+ T::Array[
209
+ GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::TaggedSymbol
210
+ ]
211
+ )
212
+ end
213
+ def self.values
214
+ end
215
+ end
216
+
161
217
  module ReferralStatus
162
218
  extend GrowsurfRuby::Internal::Type::Enum
163
219
 
@@ -17,6 +17,15 @@ module GrowsurfRuby
17
17
  :PARTICIPANT,
18
18
  GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol
19
19
  )
20
+ DELETED_PARTICIPANT =
21
+ T.let(
22
+ :DELETED_PARTICIPANT,
23
+ GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol
24
+ )
25
+ IMPORT =
26
+ T.let(:IMPORT, GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol)
27
+ MANUAL =
28
+ T.let(:MANUAL, GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol)
20
29
 
21
30
  sig do
22
31
  override.returns(
@@ -53,6 +53,14 @@ module GrowsurfRuby
53
53
  sig { returns(T.nilable(String)) }
54
54
  attr_accessor :image_url
55
55
 
56
+ # Whether the reward is enabled. When `false` the reward is disabled: hidden from
57
+ # participants and no longer awarded, including those who already earned it.
58
+ sig { returns(T.nilable(T::Boolean)) }
59
+ attr_reader :is_visible
60
+
61
+ sig { params(is_visible: T::Boolean).void }
62
+ attr_writer :is_visible
63
+
56
64
  # `-1` represents an unlimited reward in REST responses.
57
65
  sig { returns(T.nilable(Integer)) }
58
66
  attr_accessor :limit
@@ -99,7 +107,7 @@ module GrowsurfRuby
99
107
  sig { params(referred_reward_upfront: T::Boolean).void }
100
108
  attr_writer :referred_reward_upfront
101
109
 
102
- # Tax valuation for the referred friend's side of a double-sided reward.
110
+ # Tax treatment override for the referred friend's side of a double-sided reward.
103
111
  sig { returns(T.nilable(GrowsurfRuby::RewardTaxValuation)) }
104
112
  attr_reader :referred_value
105
113
 
@@ -110,6 +118,10 @@ module GrowsurfRuby
110
118
  end
111
119
  attr_writer :referred_value
112
120
 
121
+ # The reward title (internal label).
122
+ sig { returns(T.nilable(String)) }
123
+ attr_accessor :title
124
+
113
125
  # Tax valuation for the reward (the referrer's side of a double-sided reward).
114
126
  sig { returns(T.nilable(GrowsurfRuby::RewardTaxValuation)) }
115
127
  attr_reader :value
@@ -133,6 +145,7 @@ module GrowsurfRuby
133
145
  coupon_code: T.nilable(String),
134
146
  description: T.nilable(String),
135
147
  image_url: T.nilable(String),
148
+ is_visible: T::Boolean,
136
149
  limit: T.nilable(Integer),
137
150
  limit_duration:
138
151
  T.nilable(
@@ -146,6 +159,7 @@ module GrowsurfRuby
146
159
  referral_description: T.nilable(String),
147
160
  referred_reward_upfront: T::Boolean,
148
161
  referred_value: T.nilable(GrowsurfRuby::RewardTaxValuation::OrHash),
162
+ title: T.nilable(String),
149
163
  value: T.nilable(GrowsurfRuby::RewardTaxValuation::OrHash)
150
164
  ).returns(T.attached_class)
151
165
  end
@@ -163,6 +177,9 @@ module GrowsurfRuby
163
177
  coupon_code: nil,
164
178
  description: nil,
165
179
  image_url: nil,
180
+ # Whether the reward is enabled. When `false` the reward is disabled: hidden from
181
+ # participants and no longer awarded, including those who already earned it.
182
+ is_visible: nil,
166
183
  # `-1` represents an unlimited reward in REST responses.
167
184
  limit: nil,
168
185
  limit_duration: nil,
@@ -182,8 +199,10 @@ module GrowsurfRuby
182
199
  referral_coupon_code: nil,
183
200
  referral_description: nil,
184
201
  referred_reward_upfront: nil,
185
- # Tax valuation for the referred friend's side of a double-sided reward.
202
+ # Tax treatment override for the referred friend's side of a double-sided reward.
186
203
  referred_value: nil,
204
+ # The reward title (internal label).
205
+ title: nil,
187
206
  # Tax valuation for the reward (the referrer's side of a double-sided reward).
188
207
  value: nil
189
208
  )
@@ -202,6 +221,7 @@ module GrowsurfRuby
202
221
  coupon_code: T.nilable(String),
203
222
  description: T.nilable(String),
204
223
  image_url: T.nilable(String),
224
+ is_visible: T::Boolean,
205
225
  limit: T.nilable(Integer),
206
226
  limit_duration:
207
227
  T.nilable(
@@ -215,6 +235,7 @@ module GrowsurfRuby
215
235
  referral_description: T.nilable(String),
216
236
  referred_reward_upfront: T::Boolean,
217
237
  referred_value: T.nilable(GrowsurfRuby::RewardTaxValuation),
238
+ title: T.nilable(String),
218
239
  value: T.nilable(GrowsurfRuby::RewardTaxValuation)
219
240
  }
220
241
  )
@@ -157,8 +157,8 @@ module GrowsurfRuby
157
157
  sig { params(referred_reward_upfront: T::Boolean).void }
158
158
  attr_writer :referred_reward_upfront
159
159
 
160
- # Tax valuation for the referred friend's side of a double-sided reward.
161
- # Defaults to not tax-reportable (a purchase rebate).
160
+ # Tax treatment override for the referred friend's side of a double-sided reward.
161
+ # Defaults to the program's confirmed default.
162
162
  sig { returns(T.nilable(GrowsurfRuby::RewardTaxValuation)) }
163
163
  attr_reader :referred_value
164
164
 
@@ -246,8 +246,8 @@ module GrowsurfRuby
246
246
  referral_coupon_code: nil,
247
247
  referral_description: nil,
248
248
  referred_reward_upfront: nil,
249
- # Tax valuation for the referred friend's side of a double-sided reward.
250
- # Defaults to not tax-reportable (a purchase rebate).
249
+ # Tax treatment override for the referred friend's side of a double-sided reward.
250
+ # Defaults to the program's confirmed default.
251
251
  referred_value: nil,
252
252
  title: nil,
253
253
  # Tax valuation for the reward (the referrer's side of a double-sided reward).
@@ -156,8 +156,8 @@ module GrowsurfRuby
156
156
  sig { params(referred_reward_upfront: T::Boolean).void }
157
157
  attr_writer :referred_reward_upfront
158
158
 
159
- # Tax valuation for the referred friend's side of a double-sided reward.
160
- # Defaults to not tax-reportable (a purchase rebate).
159
+ # Tax treatment override for the referred friend's side of a double-sided reward.
160
+ # Defaults to the program's confirmed default.
161
161
  sig { returns(T.nilable(GrowsurfRuby::RewardTaxValuation)) }
162
162
  attr_reader :referred_value
163
163
 
@@ -246,8 +246,8 @@ module GrowsurfRuby
246
246
  referral_coupon_code: nil,
247
247
  referral_description: nil,
248
248
  referred_reward_upfront: nil,
249
- # Tax valuation for the referred friend's side of a double-sided reward.
250
- # Defaults to not tax-reportable (a purchase rebate).
249
+ # Tax treatment override for the referred friend's side of a double-sided reward.
250
+ # Defaults to the program's confirmed default.
251
251
  referred_value: nil,
252
252
  title: nil,
253
253
  # Tax valuation for the reward (the referrer's side of a double-sided reward).
@@ -188,7 +188,7 @@ module GrowsurfRuby
188
188
  sig { params(referred_reward_upfront: T::Boolean).void }
189
189
  attr_writer :referred_reward_upfront
190
190
 
191
- # Tax valuation for the referred friend's side of a double-sided reward.
191
+ # Tax treatment override for the referred friend's side of a double-sided reward.
192
192
  sig { returns(T.nilable(GrowsurfRuby::RewardTaxValuation)) }
193
193
  attr_reader :referred_value
194
194
 
@@ -271,7 +271,7 @@ module GrowsurfRuby
271
271
  referral_coupon_code: nil,
272
272
  referral_description: nil,
273
273
  referred_reward_upfront: nil,
274
- # Tax valuation for the referred friend's side of a double-sided reward.
274
+ # Tax treatment override for the referred friend's side of a double-sided reward.
275
275
  referred_value: nil,
276
276
  # Tax valuation for the reward (the referrer's side of a double-sided reward).
277
277
  value: nil
@@ -0,0 +1,74 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ class CampaignCreateAffiliateInviteParams < GrowsurfRuby::Internal::Type::BaseModel
6
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
7
+ include GrowsurfRuby::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ GrowsurfRuby::CampaignCreateAffiliateInviteParams,
13
+ GrowsurfRuby::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :id
19
+
20
+ # Valid email address to invite. Maximum 255 characters.
21
+ sig { returns(String) }
22
+ attr_accessor :email
23
+
24
+ # Invitee first name, used in the invite email. Maximum 255 characters.
25
+ sig { returns(T.nilable(String)) }
26
+ attr_reader :first_name
27
+
28
+ sig { params(first_name: String).void }
29
+ attr_writer :first_name
30
+
31
+ # Invitee last name. Maximum 255 characters.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_reader :last_name
34
+
35
+ sig { params(last_name: String).void }
36
+ attr_writer :last_name
37
+
38
+ sig do
39
+ params(
40
+ id: String,
41
+ email: String,
42
+ first_name: String,
43
+ last_name: String,
44
+ request_options: GrowsurfRuby::RequestOptions::OrHash
45
+ ).returns(T.attached_class)
46
+ end
47
+ def self.new(
48
+ id:,
49
+ # Valid email address to invite. Maximum 255 characters.
50
+ email:,
51
+ # Invitee first name, used in the invite email. Maximum 255 characters.
52
+ first_name: nil,
53
+ # Invitee last name. Maximum 255 characters.
54
+ last_name: nil,
55
+ request_options: {}
56
+ )
57
+ end
58
+
59
+ sig do
60
+ override.returns(
61
+ {
62
+ id: String,
63
+ email: String,
64
+ first_name: String,
65
+ last_name: String,
66
+ request_options: GrowsurfRuby::RequestOptions
67
+ }
68
+ )
69
+ end
70
+ def to_hash
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,130 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ class CampaignListAffiliateApplicationsParams < GrowsurfRuby::Internal::Type::BaseModel
6
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
7
+ include GrowsurfRuby::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ GrowsurfRuby::CampaignListAffiliateApplicationsParams,
13
+ GrowsurfRuby::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :id
19
+
20
+ # How many applications to return per page (1-100).
21
+ sig { returns(T.nilable(Integer)) }
22
+ attr_reader :limit
23
+
24
+ sig { params(limit: Integer).void }
25
+ attr_writer :limit
26
+
27
+ # Offset number used to skip through a result set.
28
+ sig { returns(T.nilable(Integer)) }
29
+ attr_reader :offset
30
+
31
+ sig { params(offset: Integer).void }
32
+ attr_writer :offset
33
+
34
+ # Only return applications with this status.
35
+ sig do
36
+ returns(
37
+ T.nilable(
38
+ GrowsurfRuby::CampaignListAffiliateApplicationsParams::Status::OrSymbol
39
+ )
40
+ )
41
+ end
42
+ attr_reader :status
43
+
44
+ sig do
45
+ params(
46
+ status:
47
+ GrowsurfRuby::CampaignListAffiliateApplicationsParams::Status::OrSymbol
48
+ ).void
49
+ end
50
+ attr_writer :status
51
+
52
+ sig do
53
+ params(
54
+ id: String,
55
+ limit: Integer,
56
+ offset: Integer,
57
+ status:
58
+ GrowsurfRuby::CampaignListAffiliateApplicationsParams::Status::OrSymbol,
59
+ request_options: GrowsurfRuby::RequestOptions::OrHash
60
+ ).returns(T.attached_class)
61
+ end
62
+ def self.new(
63
+ id:,
64
+ # How many applications to return per page (1-100).
65
+ limit: nil,
66
+ # Offset number used to skip through a result set.
67
+ offset: nil,
68
+ # Only return applications with this status.
69
+ status: nil,
70
+ request_options: {}
71
+ )
72
+ end
73
+
74
+ sig do
75
+ override.returns(
76
+ {
77
+ id: String,
78
+ limit: Integer,
79
+ offset: Integer,
80
+ status:
81
+ GrowsurfRuby::CampaignListAffiliateApplicationsParams::Status::OrSymbol,
82
+ request_options: GrowsurfRuby::RequestOptions
83
+ }
84
+ )
85
+ end
86
+ def to_hash
87
+ end
88
+
89
+ # Only return applications with this status.
90
+ module Status
91
+ extend GrowsurfRuby::Internal::Type::Enum
92
+
93
+ TaggedSymbol =
94
+ T.type_alias do
95
+ T.all(
96
+ Symbol,
97
+ GrowsurfRuby::CampaignListAffiliateApplicationsParams::Status
98
+ )
99
+ end
100
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
101
+
102
+ PENDING =
103
+ T.let(
104
+ :PENDING,
105
+ GrowsurfRuby::CampaignListAffiliateApplicationsParams::Status::TaggedSymbol
106
+ )
107
+ APPROVED =
108
+ T.let(
109
+ :APPROVED,
110
+ GrowsurfRuby::CampaignListAffiliateApplicationsParams::Status::TaggedSymbol
111
+ )
112
+ DENIED =
113
+ T.let(
114
+ :DENIED,
115
+ GrowsurfRuby::CampaignListAffiliateApplicationsParams::Status::TaggedSymbol
116
+ )
117
+
118
+ sig do
119
+ override.returns(
120
+ T::Array[
121
+ GrowsurfRuby::CampaignListAffiliateApplicationsParams::Status::TaggedSymbol
122
+ ]
123
+ )
124
+ end
125
+ def self.values
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,135 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ class CampaignListAffiliateInvitesParams < GrowsurfRuby::Internal::Type::BaseModel
6
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
7
+ include GrowsurfRuby::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ GrowsurfRuby::CampaignListAffiliateInvitesParams,
13
+ GrowsurfRuby::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :id
19
+
20
+ # How many invites to return per page (1-100).
21
+ sig { returns(T.nilable(Integer)) }
22
+ attr_reader :limit
23
+
24
+ sig { params(limit: Integer).void }
25
+ attr_writer :limit
26
+
27
+ # Offset number used to skip through a result set.
28
+ sig { returns(T.nilable(Integer)) }
29
+ attr_reader :offset
30
+
31
+ sig { params(offset: Integer).void }
32
+ attr_writer :offset
33
+
34
+ # Only return invites with this status.
35
+ sig do
36
+ returns(
37
+ T.nilable(
38
+ GrowsurfRuby::CampaignListAffiliateInvitesParams::Status::OrSymbol
39
+ )
40
+ )
41
+ end
42
+ attr_reader :status
43
+
44
+ sig do
45
+ params(
46
+ status:
47
+ GrowsurfRuby::CampaignListAffiliateInvitesParams::Status::OrSymbol
48
+ ).void
49
+ end
50
+ attr_writer :status
51
+
52
+ sig do
53
+ params(
54
+ id: String,
55
+ limit: Integer,
56
+ offset: Integer,
57
+ status:
58
+ GrowsurfRuby::CampaignListAffiliateInvitesParams::Status::OrSymbol,
59
+ request_options: GrowsurfRuby::RequestOptions::OrHash
60
+ ).returns(T.attached_class)
61
+ end
62
+ def self.new(
63
+ id:,
64
+ # How many invites to return per page (1-100).
65
+ limit: nil,
66
+ # Offset number used to skip through a result set.
67
+ offset: nil,
68
+ # Only return invites with this status.
69
+ status: nil,
70
+ request_options: {}
71
+ )
72
+ end
73
+
74
+ sig do
75
+ override.returns(
76
+ {
77
+ id: String,
78
+ limit: Integer,
79
+ offset: Integer,
80
+ status:
81
+ GrowsurfRuby::CampaignListAffiliateInvitesParams::Status::OrSymbol,
82
+ request_options: GrowsurfRuby::RequestOptions
83
+ }
84
+ )
85
+ end
86
+ def to_hash
87
+ end
88
+
89
+ # Only return invites with this status.
90
+ module Status
91
+ extend GrowsurfRuby::Internal::Type::Enum
92
+
93
+ TaggedSymbol =
94
+ T.type_alias do
95
+ T.all(
96
+ Symbol,
97
+ GrowsurfRuby::CampaignListAffiliateInvitesParams::Status
98
+ )
99
+ end
100
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
101
+
102
+ PENDING =
103
+ T.let(
104
+ :PENDING,
105
+ GrowsurfRuby::CampaignListAffiliateInvitesParams::Status::TaggedSymbol
106
+ )
107
+ ACCEPTED =
108
+ T.let(
109
+ :ACCEPTED,
110
+ GrowsurfRuby::CampaignListAffiliateInvitesParams::Status::TaggedSymbol
111
+ )
112
+ EXPIRED =
113
+ T.let(
114
+ :EXPIRED,
115
+ GrowsurfRuby::CampaignListAffiliateInvitesParams::Status::TaggedSymbol
116
+ )
117
+ REVOKED =
118
+ T.let(
119
+ :REVOKED,
120
+ GrowsurfRuby::CampaignListAffiliateInvitesParams::Status::TaggedSymbol
121
+ )
122
+
123
+ sig do
124
+ override.returns(
125
+ T::Array[
126
+ GrowsurfRuby::CampaignListAffiliateInvitesParams::Status::TaggedSymbol
127
+ ]
128
+ )
129
+ end
130
+ def self.values
131
+ end
132
+ end
133
+ end
134
+ end
135
+ end
@@ -111,6 +111,11 @@ module GrowsurfRuby
111
111
  :FAILED,
112
112
  GrowsurfRuby::CampaignListPayoutsParams::Status::TaggedSymbol
113
113
  )
114
+ REVERSED =
115
+ T.let(
116
+ :REVERSED,
117
+ GrowsurfRuby::CampaignListPayoutsParams::Status::TaggedSymbol
118
+ )
114
119
 
115
120
  sig do
116
121
  override.returns(
@@ -0,0 +1,46 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ class CampaignResendAffiliateInviteParams < GrowsurfRuby::Internal::Type::BaseModel
6
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
7
+ include GrowsurfRuby::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ GrowsurfRuby::CampaignResendAffiliateInviteParams,
13
+ GrowsurfRuby::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :id
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :invite_id
22
+
23
+ sig do
24
+ params(
25
+ id: String,
26
+ invite_id: String,
27
+ request_options: GrowsurfRuby::RequestOptions::OrHash
28
+ ).returns(T.attached_class)
29
+ end
30
+ def self.new(id:, invite_id:, request_options: {})
31
+ end
32
+
33
+ sig do
34
+ override.returns(
35
+ {
36
+ id: String,
37
+ invite_id: String,
38
+ request_options: GrowsurfRuby::RequestOptions
39
+ }
40
+ )
41
+ end
42
+ def to_hash
43
+ end
44
+ end
45
+ end
46
+ end