growsurf-ruby 1.2.1 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/LICENSE +201 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/internal/transport/base_client.rb +21 -4
- data/lib/growsurf_ruby/models/affiliate_application.rb +249 -0
- data/lib/growsurf_ruby/models/affiliate_application_list_response.rb +42 -0
- data/lib/growsurf_ruby/models/affiliate_invite.rb +109 -0
- data/lib/growsurf_ruby/models/affiliate_invite_list_response.rb +41 -0
- data/lib/growsurf_ruby/models/campaign/create.rb +12 -1
- data/lib/growsurf_ruby/models/campaign/participant.rb +79 -4
- data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +28 -17
- data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rb +28 -0
- data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rb +126 -0
- data/lib/growsurf_ruby/models/campaign/participant_list_payouts_params.rb +1 -0
- data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rb +50 -0
- data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rb +56 -0
- data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +25 -25
- data/lib/growsurf_ruby/models/campaign/participant_reward.rb +1 -0
- data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +25 -9
- data/lib/growsurf_ruby/models/campaign/referral_source.rb +3 -0
- data/lib/growsurf_ruby/models/campaign/reward.rb +41 -3
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +26 -4
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +26 -4
- data/lib/growsurf_ruby/models/campaign.rb +24 -3
- data/lib/growsurf_ruby/models/campaign_create_affiliate_invite_params.rb +45 -0
- data/lib/growsurf_ruby/models/campaign_list_affiliate_applications_params.rb +57 -0
- data/lib/growsurf_ruby/models/campaign_list_affiliate_invites_params.rb +58 -0
- data/lib/growsurf_ruby/models/campaign_list_payouts_params.rb +1 -0
- data/lib/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rb +26 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rb +26 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +9 -6
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +59 -11
- data/lib/growsurf_ruby/models/campaign_review_affiliate_application_params.rb +94 -0
- data/lib/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rb +26 -0
- data/lib/growsurf_ruby/models/commission_structure.rb +16 -3
- data/lib/growsurf_ruby/models/email_analytics.rb +41 -0
- data/lib/growsurf_ruby/models/participant_commission_list.rb +19 -1
- data/lib/growsurf_ruby/models/participant_payout_list.rb +8 -1
- data/lib/growsurf_ruby/models/reward_tax_valuation.rb +24 -9
- data/lib/growsurf_ruby/models.rb +19 -0
- data/lib/growsurf_ruby/resources/campaign/design.rb +14 -12
- data/lib/growsurf_ruby/resources/campaign/options.rb +7 -7
- data/lib/growsurf_ruby/resources/campaign/participant.rb +101 -14
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +8 -4
- data/lib/growsurf_ruby/resources/campaign.rb +231 -4
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +16 -0
- data/rbi/growsurf_ruby/models/affiliate_application.rbi +431 -0
- data/rbi/growsurf_ruby/models/affiliate_application_list_response.rbi +70 -0
- data/rbi/growsurf_ruby/models/affiliate_invite.rbi +167 -0
- data/rbi/growsurf_ruby/models/affiliate_invite_list_response.rbi +70 -0
- data/rbi/growsurf_ruby/models/campaign/create.rbi +17 -0
- data/rbi/growsurf_ruby/models/campaign/participant.rbi +169 -3
- data/rbi/growsurf_ruby/models/campaign/participant_activity_logs_response.rbi +3 -5
- data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +35 -20
- data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbi +3 -1
- data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rbi +48 -0
- data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbi +243 -0
- data/rbi/growsurf_ruby/models/campaign/participant_list_payouts_params.rbi +5 -0
- data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbi +100 -0
- data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbi +118 -0
- data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +38 -62
- data/rbi/growsurf_ruby/models/campaign/participant_reward.rbi +5 -0
- data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +67 -11
- data/rbi/growsurf_ruby/models/campaign/referral_source.rbi +9 -0
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +78 -2
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +68 -4
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +68 -4
- data/rbi/growsurf_ruby/models/campaign.rbi +48 -2
- data/rbi/growsurf_ruby/models/campaign_create_affiliate_invite_params.rbi +74 -0
- data/rbi/growsurf_ruby/models/campaign_list_affiliate_applications_params.rbi +130 -0
- data/rbi/growsurf_ruby/models/campaign_list_affiliate_invites_params.rbi +135 -0
- data/rbi/growsurf_ruby/models/campaign_list_payouts_params.rbi +5 -0
- data/rbi/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rbi +46 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rbi +46 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +15 -10
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +68 -18
- data/rbi/growsurf_ruby/models/campaign_review_affiliate_application_params.rbi +167 -0
- data/rbi/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rbi +46 -0
- data/rbi/growsurf_ruby/models/commission_structure.rbi +34 -3
- data/rbi/growsurf_ruby/models/email_analytics.rbi +200 -0
- data/rbi/growsurf_ruby/models/participant_commission_list.rbi +48 -0
- data/rbi/growsurf_ruby/models/participant_payout_list.rbi +17 -3
- data/rbi/growsurf_ruby/models/reward_tax_valuation.rbi +66 -9
- data/rbi/growsurf_ruby/models.rbi +25 -0
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +9 -8
- data/rbi/growsurf_ruby/resources/campaign/options.rbi +7 -7
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +99 -18
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +18 -4
- data/rbi/growsurf_ruby/resources/campaign.rbi +188 -10
- data/sig/growsurf_ruby/models/affiliate_application.rbs +192 -0
- data/sig/growsurf_ruby/models/affiliate_application_list_response.rbs +39 -0
- data/sig/growsurf_ruby/models/affiliate_invite.rbs +92 -0
- data/sig/growsurf_ruby/models/affiliate_invite_list_response.rbs +39 -0
- data/sig/growsurf_ruby/models/campaign/create.rbs +7 -0
- data/sig/growsurf_ruby/models/campaign/participant.rbs +62 -2
- data/sig/growsurf_ruby/models/campaign/participant_activity_logs_response.rbs +2 -11
- data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +12 -12
- data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbs +107 -0
- data/sig/growsurf_ruby/models/campaign/participant_list_payouts_params.rbs +2 -1
- data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbs +49 -0
- data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbs +57 -0
- data/sig/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbs +5 -13
- data/sig/growsurf_ruby/models/campaign/participant_reward.rbs +2 -1
- data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +21 -7
- data/sig/growsurf_ruby/models/campaign/referral_source.rbs +4 -1
- data/sig/growsurf_ruby/models/campaign/reward.rbs +28 -0
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +20 -0
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +20 -0
- data/sig/growsurf_ruby/models/campaign.rbs +16 -0
- data/sig/growsurf_ruby/models/campaign_create_affiliate_invite_params.rbs +40 -0
- data/sig/growsurf_ruby/models/campaign_list_affiliate_applications_params.rbs +61 -0
- data/sig/growsurf_ruby/models/campaign_list_affiliate_invites_params.rbs +62 -0
- data/sig/growsurf_ruby/models/campaign_list_payouts_params.rbs +2 -1
- data/sig/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rbs +28 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rbs +28 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +36 -16
- data/sig/growsurf_ruby/models/campaign_review_affiliate_application_params.rbs +79 -0
- data/sig/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rbs +28 -0
- data/sig/growsurf_ruby/models/commission_structure.rbs +16 -4
- data/sig/growsurf_ruby/models/email_analytics.rbs +92 -0
- data/sig/growsurf_ruby/models/participant_commission_list.rbs +16 -0
- data/sig/growsurf_ruby/models/participant_payout_list.rbs +12 -4
- data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +26 -4
- data/sig/growsurf_ruby/models.rbs +18 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +16 -2
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +2 -0
- data/sig/growsurf_ruby/resources/campaign.rbs +53 -0
- metadata +54 -3
|
@@ -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
|
|
|
@@ -115,6 +115,12 @@ module GrowsurfRuby
|
|
|
115
115
|
sig { params(queued_at: Integer).void }
|
|
116
116
|
attr_writer :queued_at
|
|
117
117
|
|
|
118
|
+
sig { returns(T.nilable(Integer)) }
|
|
119
|
+
attr_reader :reversed_at
|
|
120
|
+
|
|
121
|
+
sig { params(reversed_at: Integer).void }
|
|
122
|
+
attr_writer :reversed_at
|
|
123
|
+
|
|
118
124
|
sig do
|
|
119
125
|
params(
|
|
120
126
|
id: String,
|
|
@@ -133,7 +139,8 @@ module GrowsurfRuby
|
|
|
133
139
|
fx_error: T.nilable(String),
|
|
134
140
|
issued_at: Integer,
|
|
135
141
|
provider: T.nilable(String),
|
|
136
|
-
queued_at: Integer
|
|
142
|
+
queued_at: Integer,
|
|
143
|
+
reversed_at: Integer
|
|
137
144
|
).returns(T.attached_class)
|
|
138
145
|
end
|
|
139
146
|
def self.new(
|
|
@@ -152,7 +159,8 @@ module GrowsurfRuby
|
|
|
152
159
|
fx_error: nil,
|
|
153
160
|
issued_at: nil,
|
|
154
161
|
provider: nil,
|
|
155
|
-
queued_at: nil
|
|
162
|
+
queued_at: nil,
|
|
163
|
+
reversed_at: nil
|
|
156
164
|
)
|
|
157
165
|
end
|
|
158
166
|
|
|
@@ -175,7 +183,8 @@ module GrowsurfRuby
|
|
|
175
183
|
fx_error: T.nilable(String),
|
|
176
184
|
issued_at: Integer,
|
|
177
185
|
provider: T.nilable(String),
|
|
178
|
-
queued_at: Integer
|
|
186
|
+
queued_at: Integer,
|
|
187
|
+
reversed_at: Integer
|
|
179
188
|
}
|
|
180
189
|
)
|
|
181
190
|
end
|
|
@@ -211,6 +220,11 @@ module GrowsurfRuby
|
|
|
211
220
|
:FAILED,
|
|
212
221
|
GrowsurfRuby::ParticipantPayoutList::Payout::Status::TaggedSymbol
|
|
213
222
|
)
|
|
223
|
+
REVERSED =
|
|
224
|
+
T.let(
|
|
225
|
+
:REVERSED,
|
|
226
|
+
GrowsurfRuby::ParticipantPayoutList::Payout::Status::TaggedSymbol
|
|
227
|
+
)
|
|
214
228
|
|
|
215
229
|
sig do
|
|
216
230
|
override.returns(
|
|
@@ -18,26 +18,33 @@ module GrowsurfRuby
|
|
|
18
18
|
sig { returns(T.nilable(Float)) }
|
|
19
19
|
attr_accessor :fair_market_value_usd
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
# The reason the recipient earns this reward. `null` inherits the program's
|
|
22
|
+
# confirmed tax treatment for configurable non-commission rewards. Commission
|
|
23
|
+
# rewards always use `NONEMPLOYEE_SERVICES`.
|
|
24
|
+
sig do
|
|
25
|
+
returns(
|
|
26
|
+
T.nilable(GrowsurfRuby::RewardTaxValuation::TaxCharacter::OrSymbol)
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
attr_accessor :tax_character
|
|
25
30
|
|
|
26
31
|
# Tax valuation settings for a reward. Only relevant when the program collects
|
|
27
32
|
# tax documentation.
|
|
28
33
|
sig do
|
|
29
34
|
params(
|
|
30
35
|
fair_market_value_usd: T.nilable(Float),
|
|
31
|
-
|
|
36
|
+
tax_character:
|
|
37
|
+
T.nilable(GrowsurfRuby::RewardTaxValuation::TaxCharacter::OrSymbol)
|
|
32
38
|
).returns(T.attached_class)
|
|
33
39
|
end
|
|
34
40
|
def self.new(
|
|
35
41
|
# Manual fair-market value in USD (major units) used as the fallback when the
|
|
36
42
|
# reward value cannot be resolved automatically. `null` = no manual value.
|
|
37
43
|
fair_market_value_usd: nil,
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
|
|
44
|
+
# The reason the recipient earns this reward. `null` inherits the program's
|
|
45
|
+
# confirmed tax treatment for configurable non-commission rewards. Commission
|
|
46
|
+
# rewards always use `NONEMPLOYEE_SERVICES`.
|
|
47
|
+
tax_character: nil
|
|
41
48
|
)
|
|
42
49
|
end
|
|
43
50
|
|
|
@@ -45,12 +52,62 @@ module GrowsurfRuby
|
|
|
45
52
|
override.returns(
|
|
46
53
|
{
|
|
47
54
|
fair_market_value_usd: T.nilable(Float),
|
|
48
|
-
|
|
55
|
+
tax_character:
|
|
56
|
+
T.nilable(
|
|
57
|
+
GrowsurfRuby::RewardTaxValuation::TaxCharacter::OrSymbol
|
|
58
|
+
)
|
|
49
59
|
}
|
|
50
60
|
)
|
|
51
61
|
end
|
|
52
62
|
def to_hash
|
|
53
63
|
end
|
|
64
|
+
|
|
65
|
+
# The U.S. federal tax character of a reward.
|
|
66
|
+
module TaxCharacter
|
|
67
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
68
|
+
|
|
69
|
+
TaggedSymbol =
|
|
70
|
+
T.type_alias do
|
|
71
|
+
T.all(Symbol, GrowsurfRuby::RewardTaxValuation::TaxCharacter)
|
|
72
|
+
end
|
|
73
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
74
|
+
|
|
75
|
+
NONEMPLOYEE_SERVICES =
|
|
76
|
+
T.let(
|
|
77
|
+
:NONEMPLOYEE_SERVICES,
|
|
78
|
+
GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
|
|
79
|
+
)
|
|
80
|
+
PRIZE_OR_AWARD =
|
|
81
|
+
T.let(
|
|
82
|
+
:PRIZE_OR_AWARD,
|
|
83
|
+
GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
|
|
84
|
+
)
|
|
85
|
+
PURCHASE_REBATE =
|
|
86
|
+
T.let(
|
|
87
|
+
:PURCHASE_REBATE,
|
|
88
|
+
GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
|
|
89
|
+
)
|
|
90
|
+
OTHER_INCOME =
|
|
91
|
+
T.let(
|
|
92
|
+
:OTHER_INCOME,
|
|
93
|
+
GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
|
|
94
|
+
)
|
|
95
|
+
REVIEW_REQUIRED =
|
|
96
|
+
T.let(
|
|
97
|
+
:REVIEW_REQUIRED,
|
|
98
|
+
GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
sig do
|
|
102
|
+
override.returns(
|
|
103
|
+
T::Array[
|
|
104
|
+
GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
|
|
105
|
+
]
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
def self.values
|
|
109
|
+
end
|
|
110
|
+
end
|
|
54
111
|
end
|
|
55
112
|
end
|
|
56
113
|
end
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
4
|
AccountCreateParams = GrowsurfRuby::Models::AccountCreateParams
|
|
5
5
|
|
|
6
|
+
AffiliateApplication = GrowsurfRuby::Models::AffiliateApplication
|
|
7
|
+
|
|
8
|
+
AffiliateInvite = GrowsurfRuby::Models::AffiliateInvite
|
|
9
|
+
|
|
6
10
|
Team = GrowsurfRuby::Models::Team
|
|
7
11
|
|
|
8
12
|
TeamUpdateParams = GrowsurfRuby::Models::TeamUpdateParams
|
|
@@ -11,11 +15,20 @@ module GrowsurfRuby
|
|
|
11
15
|
|
|
12
16
|
CampaignAPI = GrowsurfRuby::Models::CampaignAPI
|
|
13
17
|
|
|
18
|
+
CampaignCreateAffiliateInviteParams =
|
|
19
|
+
GrowsurfRuby::Models::CampaignCreateAffiliateInviteParams
|
|
20
|
+
|
|
14
21
|
CampaignCreateMobileParticipantTokenParams =
|
|
15
22
|
GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenParams
|
|
16
23
|
|
|
17
24
|
CampaignCreateParams = GrowsurfRuby::Models::CampaignCreateParams
|
|
18
25
|
|
|
26
|
+
CampaignListAffiliateApplicationsParams =
|
|
27
|
+
GrowsurfRuby::Models::CampaignListAffiliateApplicationsParams
|
|
28
|
+
|
|
29
|
+
CampaignListAffiliateInvitesParams =
|
|
30
|
+
GrowsurfRuby::Models::CampaignListAffiliateInvitesParams
|
|
31
|
+
|
|
19
32
|
CampaignListCommissionsParams =
|
|
20
33
|
GrowsurfRuby::Models::CampaignListCommissionsParams
|
|
21
34
|
|
|
@@ -32,11 +45,23 @@ module GrowsurfRuby
|
|
|
32
45
|
CampaignListReferralsParams =
|
|
33
46
|
GrowsurfRuby::Models::CampaignListReferralsParams
|
|
34
47
|
|
|
48
|
+
CampaignResendAffiliateInviteParams =
|
|
49
|
+
GrowsurfRuby::Models::CampaignResendAffiliateInviteParams
|
|
50
|
+
|
|
51
|
+
CampaignRetrieveAffiliateApplicationParams =
|
|
52
|
+
GrowsurfRuby::Models::CampaignRetrieveAffiliateApplicationParams
|
|
53
|
+
|
|
35
54
|
CampaignRetrieveAnalyticsParams =
|
|
36
55
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams
|
|
37
56
|
|
|
38
57
|
CampaignRetrieveParams = GrowsurfRuby::Models::CampaignRetrieveParams
|
|
39
58
|
|
|
59
|
+
CampaignReviewAffiliateApplicationParams =
|
|
60
|
+
GrowsurfRuby::Models::CampaignReviewAffiliateApplicationParams
|
|
61
|
+
|
|
62
|
+
CampaignRevokeAffiliateInviteParams =
|
|
63
|
+
GrowsurfRuby::Models::CampaignRevokeAffiliateInviteParams
|
|
64
|
+
|
|
40
65
|
CampaignUpdateParams = GrowsurfRuby::Models::CampaignUpdateParams
|
|
41
66
|
|
|
42
67
|
CommissionStructure = GrowsurfRuby::Models::CommissionStructure
|
|
@@ -7,9 +7,9 @@ module GrowsurfRuby
|
|
|
7
7
|
# Retrieves a program's design configuration — the same surface as the dashboard
|
|
8
8
|
# Program Editor's **Design** tab: the GrowSurf window layout, header, share
|
|
9
9
|
# channels + invite, signup form, portal/landing pages, theme styling, and the
|
|
10
|
-
# referral/affiliate summary + status sections.
|
|
11
|
-
#
|
|
12
|
-
#
|
|
10
|
+
# referral/affiliate summary + status sections. Available fields depend on the program type.
|
|
11
|
+
# `payoutDestinationConfirmation` is omitted when no confirmation fields are stored. Stored
|
|
12
|
+
# `null` fields are returned as `null`; omitted and `null` fields use localized defaults.
|
|
13
13
|
sig do
|
|
14
14
|
params(
|
|
15
15
|
id: String,
|
|
@@ -23,11 +23,12 @@ module GrowsurfRuby
|
|
|
23
23
|
)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
# Updates a program's design configuration
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
# editable via the
|
|
26
|
+
# Updates a program's design configuration, including the payout-destination confirmation
|
|
27
|
+
# page copy configured from payout integration cards. Only the fields you send are
|
|
28
|
+
# changed; anything you leave out is untouched (arrays such as `signup.fields` replace
|
|
29
|
+
# wholesale). Unknown fields, fields not available for the program type, and invalid
|
|
30
|
+
# values return a `400`. Landing-page custom code and JavaScript are not editable via the
|
|
31
|
+
# API.
|
|
31
32
|
sig do
|
|
32
33
|
params(
|
|
33
34
|
id: String,
|
|
@@ -6,9 +6,9 @@ module GrowsurfRuby
|
|
|
6
6
|
class Options
|
|
7
7
|
# Retrieves a program's options — the same surface as the dashboard Program
|
|
8
8
|
# Editor's **Options** tab. Includes reward/fraud approval, anti-fraud lists +
|
|
9
|
-
# toggles, referral cookie/credit windows, reCAPTCHA,
|
|
10
|
-
# settings (affiliate only), and
|
|
11
|
-
# `fraud.recaptcha.secretKey` is never returned.
|
|
9
|
+
# toggles, referral cookie/credit windows, reCAPTCHA, affiliate enrollment +
|
|
10
|
+
# application review, payout threshold + tax settings (affiliate only), and
|
|
11
|
+
# notification-email settings. `fraud.recaptcha.secretKey` is never returned.
|
|
12
12
|
sig do
|
|
13
13
|
params(
|
|
14
14
|
id: String,
|
|
@@ -24,10 +24,10 @@ module GrowsurfRuby
|
|
|
24
24
|
|
|
25
25
|
# Updates a program's options. Only the fields you send are changed. Some fields
|
|
26
26
|
# are program-type specific (`requireManualRewardApproval`/`autoFulfillRewards`
|
|
27
|
-
# are referral-only; `
|
|
28
|
-
#
|
|
29
|
-
# `fraud.recaptcha.secretKey`
|
|
30
|
-
# means "never expires".
|
|
27
|
+
# are referral-only; `affiliateApplicationMode`/`affiliateReapplicationPolicy`
|
|
28
|
+
# and `payoutThreshold`/`taxDocumentation` are affiliate-only, and affiliate
|
|
29
|
+
# programs require `requireParticipantAuth: true`). `fraud.recaptcha.secretKey`
|
|
30
|
+
# is write-only. `referralCreditWindowDays: null` means "never expires".
|
|
31
31
|
sig do
|
|
32
32
|
params(
|
|
33
33
|
id: String,
|
|
@@ -21,17 +21,22 @@ module GrowsurfRuby
|
|
|
21
21
|
)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
# Updates a participant by GrowSurf participant ID or email address.
|
|
24
|
+
# Updates a participant by GrowSurf participant ID or email address. For affiliate
|
|
25
|
+
# programs, set `affiliateStatus` to `APPROVED`, `SUSPENDED`, or `BANNED`.
|
|
26
|
+
# `APPROVED` enrolls the participant as an affiliate. `SUSPENDED` and `BANNED`
|
|
27
|
+
# require an existing affiliate. This endpoint does not accept `isAffiliate`, and
|
|
28
|
+
# affiliate enrollment cannot be removed through REST.
|
|
25
29
|
sig do
|
|
26
30
|
params(
|
|
27
31
|
participant_id_or_email: String,
|
|
28
32
|
id: String,
|
|
33
|
+
affiliate_status:
|
|
34
|
+
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol,
|
|
29
35
|
email: String,
|
|
30
36
|
first_name: String,
|
|
31
37
|
last_name: String,
|
|
32
38
|
metadata: T::Hash[Symbol, T.anything],
|
|
33
39
|
notes: String,
|
|
34
|
-
paypal_email: String,
|
|
35
40
|
referral_status:
|
|
36
41
|
GrowsurfRuby::Campaign::ParticipantUpdateParams::ReferralStatus::OrSymbol,
|
|
37
42
|
referred_by: String,
|
|
@@ -45,6 +50,10 @@ module GrowsurfRuby
|
|
|
45
50
|
participant_id_or_email,
|
|
46
51
|
# Path param: GrowSurf program ID.
|
|
47
52
|
id:,
|
|
53
|
+
# Body param: Affiliate programs only. Sets the affiliate status. `APPROVED` also
|
|
54
|
+
# enrolls a participant who is not yet an affiliate. `SUSPENDED` and `BANNED`
|
|
55
|
+
# are rejected for non-affiliates.
|
|
56
|
+
affiliate_status: nil,
|
|
48
57
|
# Body param
|
|
49
58
|
email: nil,
|
|
50
59
|
# Body param
|
|
@@ -56,8 +65,6 @@ module GrowsurfRuby
|
|
|
56
65
|
# Body param: Freeform internal notes about the participant (internal only, never
|
|
57
66
|
# exposed to participants).
|
|
58
67
|
notes: nil,
|
|
59
|
-
# Body param: The participant's PayPal email address, used for affiliate payouts.
|
|
60
|
-
paypal_email: nil,
|
|
61
68
|
# Body param
|
|
62
69
|
referral_status: nil,
|
|
63
70
|
# Body param
|
|
@@ -114,7 +121,13 @@ module GrowsurfRuby
|
|
|
114
121
|
end
|
|
115
122
|
|
|
116
123
|
# Adds a new participant to the program. If the email already exists, the existing
|
|
117
|
-
# participant is returned.
|
|
124
|
+
# participant is returned unchanged. For affiliate programs, set `isAffiliate` to
|
|
125
|
+
# `true` to enroll a new participant as an approved affiliate or `false` to create
|
|
126
|
+
# a non-affiliate. If you omit `isAffiliate`, a valid `referredBy` creates a
|
|
127
|
+
# referred non-affiliate; without a valid referrer, the new participant is enrolled
|
|
128
|
+
# as an approved affiliate. You can send a valid `referredBy` with
|
|
129
|
+
# `isAffiliate: true` to keep the referral attribution and enroll the participant
|
|
130
|
+
# as an affiliate.
|
|
118
131
|
sig do
|
|
119
132
|
params(
|
|
120
133
|
id: String,
|
|
@@ -122,6 +135,7 @@ module GrowsurfRuby
|
|
|
122
135
|
fingerprint: String,
|
|
123
136
|
first_name: String,
|
|
124
137
|
ip_address: String,
|
|
138
|
+
is_affiliate: T::Boolean,
|
|
125
139
|
last_name: String,
|
|
126
140
|
metadata: T::Hash[Symbol, T.anything],
|
|
127
141
|
mobile_instance_id: String,
|
|
@@ -138,6 +152,11 @@ module GrowsurfRuby
|
|
|
138
152
|
fingerprint: nil,
|
|
139
153
|
first_name: nil,
|
|
140
154
|
ip_address: nil,
|
|
155
|
+
# Affiliate programs only. Controls affiliate enrollment for a new participant.
|
|
156
|
+
# `true` enrolls the participant with `affiliateStatus: APPROVED`; `false`
|
|
157
|
+
# creates a non-affiliate without `affiliateStatus`. Existing participants are
|
|
158
|
+
# returned unchanged.
|
|
159
|
+
is_affiliate: nil,
|
|
141
160
|
last_name: nil,
|
|
142
161
|
# Shallow custom metadata object.
|
|
143
162
|
metadata: nil,
|
|
@@ -602,18 +621,21 @@ module GrowsurfRuby
|
|
|
602
621
|
)
|
|
603
622
|
end
|
|
604
623
|
|
|
605
|
-
# Retrieves analytics for a single participant — all-time engagement counters,
|
|
606
|
-
#
|
|
607
|
-
# for affiliate programs).
|
|
608
|
-
#
|
|
624
|
+
# Retrieves analytics for a single participant — all-time engagement counters, leaderboard
|
|
625
|
+
# ranks, and per-channel share counts (plus affiliate revenue, commission, and payout
|
|
626
|
+
# metrics for affiliate programs). Pass `include=email` for `sent` (accepted for
|
|
627
|
+
# delivery), `delivered`, `opened`, `clicked`, `bounced`, and `spamComplaints` metrics
|
|
628
|
+
# attributed to this participant, including invitations they sent. Use
|
|
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.
|
|
609
632
|
sig do
|
|
610
633
|
params(
|
|
611
634
|
participant_id_or_email: String,
|
|
612
635
|
id: String,
|
|
613
636
|
days: Integer,
|
|
614
637
|
end_date: Integer,
|
|
615
|
-
include:
|
|
616
|
-
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Include::OrSymbol,
|
|
638
|
+
include: String,
|
|
617
639
|
interval:
|
|
618
640
|
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Interval::OrSymbol,
|
|
619
641
|
start_date: Integer,
|
|
@@ -627,22 +649,81 @@ module GrowsurfRuby
|
|
|
627
649
|
participant_id_or_email,
|
|
628
650
|
# GrowSurf program ID.
|
|
629
651
|
id:,
|
|
630
|
-
# Last number of days
|
|
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.
|
|
631
654
|
days: nil,
|
|
632
|
-
# End
|
|
633
|
-
#
|
|
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.
|
|
634
658
|
end_date: nil,
|
|
635
|
-
#
|
|
659
|
+
# Comma-separated optional data. `series` returns this participant's own activity per
|
|
660
|
+
# period; `email` returns `sent`, `delivered`, `opened`, `clicked`, `bounced`,
|
|
661
|
+
# `spamComplaints`, and per-email-type metrics attributed to the participant for the
|
|
662
|
+
# requested analytics window (including invitations they sent). Request both in either
|
|
663
|
+
# order to add email counts to every series item for emails sent during that period.
|
|
664
|
+
# Only documented tokens are accepted; an unknown token returns `400`.
|
|
636
665
|
include: nil,
|
|
637
|
-
# Bucket size for the `series` (only used
|
|
666
|
+
# Bucket size for the `series` (only used when `include` contains `series`). Defaults to
|
|
667
|
+
# `day`.
|
|
638
668
|
interval: nil,
|
|
639
|
-
# Start
|
|
640
|
-
#
|
|
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.
|
|
641
672
|
start_date: nil,
|
|
642
673
|
request_options: {}
|
|
643
674
|
)
|
|
644
675
|
end
|
|
645
676
|
|
|
677
|
+
# Returns a participant's payout-destination status across every payout provider
|
|
678
|
+
# enabled for the program (PayPal and/or Wise). For each provider it reports the
|
|
679
|
+
# current status, the confirmed claim email, the legal recipient type, and — when a
|
|
680
|
+
# delivery bounced or a recipient was invalidated — the repair reason.
|
|
681
|
+
# `activeProvider` is the provider that currently gets paid, or `null` until the
|
|
682
|
+
# participant confirms one.
|
|
683
|
+
sig do
|
|
684
|
+
params(
|
|
685
|
+
participant_id_or_email: String,
|
|
686
|
+
id: String,
|
|
687
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
688
|
+
).returns(
|
|
689
|
+
GrowsurfRuby::Models::Campaign::ParticipantGetPayoutDestinationResponse
|
|
690
|
+
)
|
|
691
|
+
end
|
|
692
|
+
def get_payout_destination(
|
|
693
|
+
# GrowSurf participant ID or URL-encoded participant email address.
|
|
694
|
+
participant_id_or_email,
|
|
695
|
+
# GrowSurf program ID.
|
|
696
|
+
id:,
|
|
697
|
+
request_options: {}
|
|
698
|
+
)
|
|
699
|
+
end
|
|
700
|
+
|
|
701
|
+
# Sends the participant a one-time link to confirm their payout destination for
|
|
702
|
+
# the chosen provider. Only the participant can open the link and confirm — this
|
|
703
|
+
# endpoint just triggers the message. The provider must be enabled for the
|
|
704
|
+
# program.
|
|
705
|
+
sig do
|
|
706
|
+
params(
|
|
707
|
+
participant_id_or_email: String,
|
|
708
|
+
id: String,
|
|
709
|
+
provider:
|
|
710
|
+
GrowsurfRuby::Campaign::ParticipantRequestPayoutDestinationConfirmationParams::Provider::OrSymbol,
|
|
711
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
712
|
+
).returns(
|
|
713
|
+
GrowsurfRuby::Models::Campaign::ParticipantRequestPayoutDestinationConfirmationResponse
|
|
714
|
+
)
|
|
715
|
+
end
|
|
716
|
+
def request_payout_destination_confirmation(
|
|
717
|
+
# Path param: GrowSurf participant ID or URL-encoded participant email address.
|
|
718
|
+
participant_id_or_email,
|
|
719
|
+
# Path param: GrowSurf program ID.
|
|
720
|
+
id:,
|
|
721
|
+
# Body param: The payout provider the participant should confirm a destination for.
|
|
722
|
+
provider:,
|
|
723
|
+
request_options: {}
|
|
724
|
+
)
|
|
725
|
+
end
|
|
726
|
+
|
|
646
727
|
# @api private
|
|
647
728
|
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
648
729
|
def self.new(client:)
|
|
@@ -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.
|
|
@@ -105,8 +112,8 @@ module GrowsurfRuby
|
|
|
105
112
|
referral_description: nil,
|
|
106
113
|
# Body param
|
|
107
114
|
referred_reward_upfront: nil,
|
|
108
|
-
# Body param: Tax
|
|
109
|
-
# reward. Defaults to
|
|
115
|
+
# Body param: Tax treatment override for the referred friend's side of a double-sided
|
|
116
|
+
# reward. Defaults to the program's confirmed default.
|
|
110
117
|
referred_value: nil,
|
|
111
118
|
# Body param
|
|
112
119
|
title: nil,
|
|
@@ -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.
|
|
@@ -201,8 +215,8 @@ module GrowsurfRuby
|
|
|
201
215
|
referral_description: nil,
|
|
202
216
|
# Body param
|
|
203
217
|
referred_reward_upfront: nil,
|
|
204
|
-
# Body param: Tax
|
|
205
|
-
# reward. Defaults to
|
|
218
|
+
# Body param: Tax treatment override for the referred friend's side of a double-sided
|
|
219
|
+
# reward. Defaults to the program's confirmed default.
|
|
206
220
|
referred_value: nil,
|
|
207
221
|
# Body param
|
|
208
222
|
title: nil,
|