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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -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 +14 -17
- 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 +20 -3
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +3 -3
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +3 -3
- data/lib/growsurf_ruby/models/campaign.rb +2 -2
- 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/email_analytics.rb +41 -0
- 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 +96 -11
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +2 -2
- 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 +22 -52
- 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 +23 -2
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +4 -4
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +4 -4
- data/rbi/growsurf_ruby/models/campaign.rbi +2 -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/email_analytics.rbi +200 -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 +89 -13
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +4 -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_update_params.rbs +21 -7
- data/sig/growsurf_ruby/models/campaign/referral_source.rbs +4 -1
- data/sig/growsurf_ruby/models/campaign/reward.rbs +12 -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/email_analytics.rbs +92 -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.rbs +53 -0
- metadata +54 -3
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class AffiliateInviteListResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
GrowsurfRuby::Models::AffiliateInviteListResponse,
|
|
10
|
+
GrowsurfRuby::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# One page of the program's invites, newest first.
|
|
15
|
+
sig { returns(T::Array[GrowsurfRuby::AffiliateInvite]) }
|
|
16
|
+
attr_accessor :invites
|
|
17
|
+
|
|
18
|
+
# Total number of invites matching the filter.
|
|
19
|
+
sig { returns(Integer) }
|
|
20
|
+
attr_accessor :total
|
|
21
|
+
|
|
22
|
+
# The page size used.
|
|
23
|
+
sig { returns(T.nilable(Integer)) }
|
|
24
|
+
attr_reader :limit
|
|
25
|
+
|
|
26
|
+
sig { params(limit: Integer).void }
|
|
27
|
+
attr_writer :limit
|
|
28
|
+
|
|
29
|
+
# The offset this page started at.
|
|
30
|
+
sig { returns(T.nilable(Integer)) }
|
|
31
|
+
attr_reader :offset
|
|
32
|
+
|
|
33
|
+
sig { params(offset: Integer).void }
|
|
34
|
+
attr_writer :offset
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
invites: T::Array[GrowsurfRuby::AffiliateInvite::OrHash],
|
|
39
|
+
total: Integer,
|
|
40
|
+
limit: Integer,
|
|
41
|
+
offset: Integer
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
# One page of the program's invites, newest first.
|
|
46
|
+
invites:,
|
|
47
|
+
# Total number of invites matching the filter.
|
|
48
|
+
total:,
|
|
49
|
+
# The page size used.
|
|
50
|
+
limit: nil,
|
|
51
|
+
# The offset this page started at.
|
|
52
|
+
offset: nil
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
override.returns(
|
|
58
|
+
{
|
|
59
|
+
invites: T::Array[GrowsurfRuby::AffiliateInvite],
|
|
60
|
+
total: Integer,
|
|
61
|
+
limit: Integer,
|
|
62
|
+
offset: Integer
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
def to_hash
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -33,6 +33,16 @@ module GrowsurfRuby
|
|
|
33
33
|
sig { params(ip_address: String).void }
|
|
34
34
|
attr_writer :ip_address
|
|
35
35
|
|
|
36
|
+
# Affiliate programs only. Controls affiliate enrollment for a new participant.
|
|
37
|
+
# `true` enrolls the participant with `affiliateStatus: APPROVED`; `false` creates
|
|
38
|
+
# a non-affiliate without `affiliateStatus`. Existing participants are returned
|
|
39
|
+
# unchanged.
|
|
40
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
41
|
+
attr_reader :is_affiliate
|
|
42
|
+
|
|
43
|
+
sig { params(is_affiliate: T::Boolean).void }
|
|
44
|
+
attr_writer :is_affiliate
|
|
45
|
+
|
|
36
46
|
sig { returns(T.nilable(String)) }
|
|
37
47
|
attr_reader :last_name
|
|
38
48
|
|
|
@@ -87,6 +97,7 @@ module GrowsurfRuby
|
|
|
87
97
|
fingerprint: String,
|
|
88
98
|
first_name: String,
|
|
89
99
|
ip_address: String,
|
|
100
|
+
is_affiliate: T::Boolean,
|
|
90
101
|
last_name: String,
|
|
91
102
|
metadata: T::Hash[Symbol, T.anything],
|
|
92
103
|
mobile_instance_id: String,
|
|
@@ -100,6 +111,11 @@ module GrowsurfRuby
|
|
|
100
111
|
fingerprint: nil,
|
|
101
112
|
first_name: nil,
|
|
102
113
|
ip_address: nil,
|
|
114
|
+
# Affiliate programs only. Controls affiliate enrollment for a new participant.
|
|
115
|
+
# `true` enrolls the participant with `affiliateStatus: APPROVED`; `false` creates
|
|
116
|
+
# a non-affiliate without `affiliateStatus`. Existing participants are returned
|
|
117
|
+
# unchanged.
|
|
118
|
+
is_affiliate: nil,
|
|
103
119
|
last_name: nil,
|
|
104
120
|
# Shallow custom metadata object.
|
|
105
121
|
metadata: nil,
|
|
@@ -124,6 +140,7 @@ module GrowsurfRuby
|
|
|
124
140
|
fingerprint: String,
|
|
125
141
|
first_name: String,
|
|
126
142
|
ip_address: String,
|
|
143
|
+
is_affiliate: T::Boolean,
|
|
127
144
|
last_name: String,
|
|
128
145
|
metadata: T::Hash[Symbol, T.anything],
|
|
129
146
|
mobile_instance_id: String,
|
|
@@ -33,8 +33,24 @@ module GrowsurfRuby
|
|
|
33
33
|
sig { returns(T::Array[GrowsurfRuby::Campaign::ParticipantReward]) }
|
|
34
34
|
attr_accessor :rewards
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
# The unique share URL of the participant. Omitted for affiliate program
|
|
37
|
+
# participants who are not approved affiliates.
|
|
38
|
+
sig { returns(T.nilable(String)) }
|
|
39
|
+
attr_reader :share_url
|
|
40
|
+
|
|
41
|
+
sig { params(share_url: String).void }
|
|
42
|
+
attr_writer :share_url
|
|
43
|
+
|
|
44
|
+
# Affiliate programs only. How the affiliate enrolled (`OPEN_ENROLLMENT`,
|
|
45
|
+
# `APPLICATION`, `PARTICIPANT_AUTH`, `INVITE`, `REST_API`, `CSV`, or `DASHBOARD`).
|
|
46
|
+
# `null` when not recorded.
|
|
47
|
+
sig { returns(T.nilable(String)) }
|
|
48
|
+
attr_accessor :affiliate_enrollment_source
|
|
49
|
+
|
|
50
|
+
# Affiliate programs only. The enrolled affiliate's status (`APPROVED`,
|
|
51
|
+
# `SUSPENDED`, or `BANNED`). `null` for participants who are not affiliates.
|
|
52
|
+
sig { returns(T.nilable(String)) }
|
|
53
|
+
attr_accessor :affiliate_status
|
|
38
54
|
|
|
39
55
|
sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) }
|
|
40
56
|
attr_reader :all_matching_fraudsters
|
|
@@ -93,6 +109,14 @@ module GrowsurfRuby
|
|
|
93
109
|
sig { returns(T.nilable(String)) }
|
|
94
110
|
attr_accessor :ip_address
|
|
95
111
|
|
|
112
|
+
# Affiliate programs only. Whether this participant is an enrolled affiliate. A
|
|
113
|
+
# referred customer who has not joined the program is `false`.
|
|
114
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
115
|
+
attr_reader :is_affiliate
|
|
116
|
+
|
|
117
|
+
sig { params(is_affiliate: T::Boolean).void }
|
|
118
|
+
attr_writer :is_affiliate
|
|
119
|
+
|
|
96
120
|
sig { returns(T.nilable(T::Boolean)) }
|
|
97
121
|
attr_reader :is_new
|
|
98
122
|
|
|
@@ -130,6 +154,26 @@ module GrowsurfRuby
|
|
|
130
154
|
sig { returns(T.nilable(String)) }
|
|
131
155
|
attr_accessor :notes
|
|
132
156
|
|
|
157
|
+
# Payout-related actions the participant must complete before a payout can be
|
|
158
|
+
# released (e.g. configuring a payout destination or submitting a W-9/W-8 tax form).
|
|
159
|
+
# Always present; the requiredActions array is empty when no action is required.
|
|
160
|
+
sig do
|
|
161
|
+
returns(
|
|
162
|
+
T.nilable(
|
|
163
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings
|
|
164
|
+
)
|
|
165
|
+
)
|
|
166
|
+
end
|
|
167
|
+
attr_reader :payout_settings
|
|
168
|
+
|
|
169
|
+
sig do
|
|
170
|
+
params(
|
|
171
|
+
payout_settings:
|
|
172
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings::OrHash
|
|
173
|
+
).void
|
|
174
|
+
end
|
|
175
|
+
attr_writer :payout_settings
|
|
176
|
+
|
|
133
177
|
sig { returns(T.nilable(String)) }
|
|
134
178
|
attr_reader :paypal_email_address
|
|
135
179
|
|
|
@@ -252,6 +296,8 @@ module GrowsurfRuby
|
|
|
252
296
|
rewards:
|
|
253
297
|
T::Array[GrowsurfRuby::Campaign::ParticipantReward::OrHash],
|
|
254
298
|
share_url: String,
|
|
299
|
+
affiliate_enrollment_source: T.nilable(String),
|
|
300
|
+
affiliate_status: T.nilable(String),
|
|
255
301
|
all_matching_fraudsters: T::Array[T::Hash[Symbol, T.anything]],
|
|
256
302
|
created_at: Integer,
|
|
257
303
|
fingerprint: T.nilable(String),
|
|
@@ -261,6 +307,7 @@ module GrowsurfRuby
|
|
|
261
307
|
impression_count: Integer,
|
|
262
308
|
invite_count: Integer,
|
|
263
309
|
ip_address: T.nilable(String),
|
|
310
|
+
is_affiliate: T::Boolean,
|
|
264
311
|
is_new: T::Boolean,
|
|
265
312
|
is_winner: T::Boolean,
|
|
266
313
|
last_name: T.nilable(String),
|
|
@@ -268,6 +315,8 @@ module GrowsurfRuby
|
|
|
268
315
|
mobile_instance_id: T.nilable(String),
|
|
269
316
|
monthly_referrals: T::Array[String],
|
|
270
317
|
notes: T.nilable(String),
|
|
318
|
+
payout_settings:
|
|
319
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings::OrHash,
|
|
271
320
|
paypal_email_address: String,
|
|
272
321
|
prev_monthly_rank: Integer,
|
|
273
322
|
prev_monthly_referral_count: Integer,
|
|
@@ -295,7 +344,16 @@ module GrowsurfRuby
|
|
|
295
344
|
rank:,
|
|
296
345
|
referral_count:,
|
|
297
346
|
rewards:,
|
|
298
|
-
|
|
347
|
+
# The unique share URL of the participant. Omitted for affiliate program
|
|
348
|
+
# participants who are not approved affiliates.
|
|
349
|
+
share_url: nil,
|
|
350
|
+
# Affiliate programs only. How the affiliate enrolled (`OPEN_ENROLLMENT`,
|
|
351
|
+
# `APPLICATION`, `PARTICIPANT_AUTH`, `INVITE`, `REST_API`, `CSV`, or `DASHBOARD`).
|
|
352
|
+
# `null` when not recorded.
|
|
353
|
+
affiliate_enrollment_source: nil,
|
|
354
|
+
# Affiliate programs only. The enrolled affiliate's status (`APPROVED`,
|
|
355
|
+
# `SUSPENDED`, or `BANNED`). `null` for participants who are not affiliates.
|
|
356
|
+
affiliate_status: nil,
|
|
299
357
|
all_matching_fraudsters: nil,
|
|
300
358
|
created_at: nil,
|
|
301
359
|
fingerprint: nil,
|
|
@@ -305,6 +363,9 @@ module GrowsurfRuby
|
|
|
305
363
|
impression_count: nil,
|
|
306
364
|
invite_count: nil,
|
|
307
365
|
ip_address: nil,
|
|
366
|
+
# Affiliate programs only. Whether this participant is an enrolled affiliate. A
|
|
367
|
+
# referred customer who has not joined the program is `false`.
|
|
368
|
+
is_affiliate: nil,
|
|
308
369
|
is_new: nil,
|
|
309
370
|
is_winner: nil,
|
|
310
371
|
last_name: nil,
|
|
@@ -316,6 +377,10 @@ module GrowsurfRuby
|
|
|
316
377
|
mobile_instance_id: nil,
|
|
317
378
|
monthly_referrals: nil,
|
|
318
379
|
notes: nil,
|
|
380
|
+
# Payout-related actions the participant must complete before a payout can be
|
|
381
|
+
# released (e.g. configuring a payout destination or submitting a W-9/W-8 tax form).
|
|
382
|
+
# Always present; the requiredActions array is empty when no action is required.
|
|
383
|
+
payout_settings: nil,
|
|
319
384
|
paypal_email_address: nil,
|
|
320
385
|
prev_monthly_rank: nil,
|
|
321
386
|
prev_monthly_referral_count: nil,
|
|
@@ -344,6 +409,8 @@ module GrowsurfRuby
|
|
|
344
409
|
referral_count: Integer,
|
|
345
410
|
rewards: T::Array[GrowsurfRuby::Campaign::ParticipantReward],
|
|
346
411
|
share_url: String,
|
|
412
|
+
affiliate_enrollment_source: T.nilable(String),
|
|
413
|
+
affiliate_status: T.nilable(String),
|
|
347
414
|
all_matching_fraudsters: T::Array[T::Hash[Symbol, T.anything]],
|
|
348
415
|
created_at: Integer,
|
|
349
416
|
fingerprint: T.nilable(String),
|
|
@@ -354,6 +421,7 @@ module GrowsurfRuby
|
|
|
354
421
|
impression_count: Integer,
|
|
355
422
|
invite_count: Integer,
|
|
356
423
|
ip_address: T.nilable(String),
|
|
424
|
+
is_affiliate: T::Boolean,
|
|
357
425
|
is_new: T::Boolean,
|
|
358
426
|
is_winner: T::Boolean,
|
|
359
427
|
last_name: T.nilable(String),
|
|
@@ -361,6 +429,8 @@ module GrowsurfRuby
|
|
|
361
429
|
mobile_instance_id: T.nilable(String),
|
|
362
430
|
monthly_referrals: T::Array[String],
|
|
363
431
|
notes: T.nilable(String),
|
|
432
|
+
payout_settings:
|
|
433
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings,
|
|
364
434
|
paypal_email_address: String,
|
|
365
435
|
prev_monthly_rank: Integer,
|
|
366
436
|
prev_monthly_referral_count: Integer,
|
|
@@ -386,6 +456,102 @@ module GrowsurfRuby
|
|
|
386
456
|
def to_hash
|
|
387
457
|
end
|
|
388
458
|
|
|
459
|
+
class PayoutSettings < GrowsurfRuby::Internal::Type::BaseModel
|
|
460
|
+
OrHash =
|
|
461
|
+
T.type_alias do
|
|
462
|
+
T.any(
|
|
463
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings,
|
|
464
|
+
GrowsurfRuby::Internal::AnyHash
|
|
465
|
+
)
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
# Actions the participant must complete before payouts can be sent.
|
|
469
|
+
sig do
|
|
470
|
+
returns(
|
|
471
|
+
T.nilable(
|
|
472
|
+
T::Array[
|
|
473
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings::RequiredAction::TaggedSymbol
|
|
474
|
+
]
|
|
475
|
+
)
|
|
476
|
+
)
|
|
477
|
+
end
|
|
478
|
+
attr_reader :required_actions
|
|
479
|
+
|
|
480
|
+
sig do
|
|
481
|
+
params(
|
|
482
|
+
required_actions:
|
|
483
|
+
T::Array[
|
|
484
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings::RequiredAction::OrSymbol
|
|
485
|
+
]
|
|
486
|
+
).void
|
|
487
|
+
end
|
|
488
|
+
attr_writer :required_actions
|
|
489
|
+
|
|
490
|
+
# Payout-related actions the participant must complete before a payout can be
|
|
491
|
+
# released (e.g. configuring a payout destination or submitting a W-9/W-8 tax form).
|
|
492
|
+
# Always present; the requiredActions array is empty when no action is required.
|
|
493
|
+
sig do
|
|
494
|
+
params(
|
|
495
|
+
required_actions:
|
|
496
|
+
T::Array[
|
|
497
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings::RequiredAction::OrSymbol
|
|
498
|
+
]
|
|
499
|
+
).returns(T.attached_class)
|
|
500
|
+
end
|
|
501
|
+
def self.new(
|
|
502
|
+
# Actions the participant must complete before payouts can be sent.
|
|
503
|
+
required_actions: nil
|
|
504
|
+
)
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
sig do
|
|
508
|
+
override.returns(
|
|
509
|
+
{
|
|
510
|
+
required_actions:
|
|
511
|
+
T::Array[
|
|
512
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings::RequiredAction::TaggedSymbol
|
|
513
|
+
]
|
|
514
|
+
}
|
|
515
|
+
)
|
|
516
|
+
end
|
|
517
|
+
def to_hash
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
module RequiredAction
|
|
521
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
522
|
+
|
|
523
|
+
TaggedSymbol =
|
|
524
|
+
T.type_alias do
|
|
525
|
+
T.all(
|
|
526
|
+
Symbol,
|
|
527
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings::RequiredAction
|
|
528
|
+
)
|
|
529
|
+
end
|
|
530
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
531
|
+
|
|
532
|
+
PAYOUT_DESTINATION =
|
|
533
|
+
T.let(
|
|
534
|
+
:PAYOUT_DESTINATION,
|
|
535
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings::RequiredAction::TaggedSymbol
|
|
536
|
+
)
|
|
537
|
+
TAX_INFO =
|
|
538
|
+
T.let(
|
|
539
|
+
:TAX_INFO,
|
|
540
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings::RequiredAction::TaggedSymbol
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
sig do
|
|
544
|
+
override.returns(
|
|
545
|
+
T::Array[
|
|
546
|
+
GrowsurfRuby::Campaign::CampaignParticipant::PayoutSettings::RequiredAction::TaggedSymbol
|
|
547
|
+
]
|
|
548
|
+
)
|
|
549
|
+
end
|
|
550
|
+
def self.values
|
|
551
|
+
end
|
|
552
|
+
end
|
|
553
|
+
end
|
|
554
|
+
|
|
389
555
|
class Referrer < GrowsurfRuby::Internal::Type::BaseModel
|
|
390
556
|
OrHash =
|
|
391
557
|
T.type_alias do
|
|
@@ -82,11 +82,9 @@ module GrowsurfRuby
|
|
|
82
82
|
attr_accessor :type
|
|
83
83
|
|
|
84
84
|
sig do
|
|
85
|
-
params(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
type: String
|
|
89
|
-
).returns(T.attached_class)
|
|
85
|
+
params(created_at: Integer, text: String, type: String).returns(
|
|
86
|
+
T.attached_class
|
|
87
|
+
)
|
|
90
88
|
end
|
|
91
89
|
def self.new(
|
|
92
90
|
# When the activity occurred, as a Unix timestamp in milliseconds.
|
|
@@ -28,7 +28,7 @@ module GrowsurfRuby
|
|
|
28
28
|
sig { returns(T::Hash[Symbol, Integer]) }
|
|
29
29
|
attr_accessor :share_count
|
|
30
30
|
|
|
31
|
-
# Present only
|
|
31
|
+
# Present only when `include` contains `series` or `email`. Window end (Unix ms).
|
|
32
32
|
sig { returns(T.nilable(Integer)) }
|
|
33
33
|
attr_reader :end_date
|
|
34
34
|
|
|
@@ -59,7 +59,7 @@ module GrowsurfRuby
|
|
|
59
59
|
end
|
|
60
60
|
attr_writer :series
|
|
61
61
|
|
|
62
|
-
# Present only
|
|
62
|
+
# Present only when `include` contains `series` or `email`. Window start (Unix ms).
|
|
63
63
|
sig { returns(T.nilable(Integer)) }
|
|
64
64
|
attr_reader :start_date
|
|
65
65
|
|
|
@@ -86,13 +86,13 @@ module GrowsurfRuby
|
|
|
86
86
|
ranks:,
|
|
87
87
|
# Per-channel share counts (e.g. `email`, `facebook`, `twitter`, ...).
|
|
88
88
|
share_count:,
|
|
89
|
-
# Present only
|
|
89
|
+
# Present only when `include` contains `series` or `email`. Window end (Unix ms).
|
|
90
90
|
end_date: nil,
|
|
91
91
|
# Present only when `include=series`. This participant's own referral-link activity
|
|
92
92
|
# per period (ascending), windowed by `days`/`startDate`/`endDate` and bucketed by
|
|
93
93
|
# `interval`.
|
|
94
94
|
series: nil,
|
|
95
|
-
# Present only
|
|
95
|
+
# Present only when `include` contains `series` or `email`. Window start (Unix ms).
|
|
96
96
|
start_date: nil
|
|
97
97
|
)
|
|
98
98
|
end
|
|
@@ -162,11 +162,23 @@ module GrowsurfRuby
|
|
|
162
162
|
sig { params(monthly_referrals: Integer).void }
|
|
163
163
|
attr_writer :monthly_referrals
|
|
164
164
|
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
# This participant's reward counts grouped by review and fulfillment status.
|
|
166
|
+
sig do
|
|
167
|
+
returns(
|
|
168
|
+
T.nilable(
|
|
169
|
+
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::RewardStatus
|
|
170
|
+
)
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
attr_reader :reward_status
|
|
167
174
|
|
|
168
|
-
sig
|
|
169
|
-
|
|
175
|
+
sig do
|
|
176
|
+
params(
|
|
177
|
+
reward_status:
|
|
178
|
+
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::RewardStatus
|
|
179
|
+
).void
|
|
180
|
+
end
|
|
181
|
+
attr_writer :reward_status
|
|
170
182
|
|
|
171
183
|
# Affiliate only. Revenue attributed to this participant's referrals, in minor
|
|
172
184
|
# currency units.
|
|
@@ -182,12 +194,6 @@ module GrowsurfRuby
|
|
|
182
194
|
sig { params(referrals: Integer).void }
|
|
183
195
|
attr_writer :referrals
|
|
184
196
|
|
|
185
|
-
sig { returns(T.nilable(Integer)) }
|
|
186
|
-
attr_reader :rewards_earned
|
|
187
|
-
|
|
188
|
-
sig { params(rewards_earned: Integer).void }
|
|
189
|
-
attr_writer :rewards_earned
|
|
190
|
-
|
|
191
197
|
# Affiliate only. Total commissions earned, in minor currency units.
|
|
192
198
|
sig { returns(T.nilable(Integer)) }
|
|
193
199
|
attr_reader :total_commissions
|
|
@@ -223,10 +229,10 @@ module GrowsurfRuby
|
|
|
223
229
|
invites_sent: Integer,
|
|
224
230
|
leads: Integer,
|
|
225
231
|
monthly_referrals: Integer,
|
|
226
|
-
pending_rewards: Integer,
|
|
227
232
|
referral_revenue: Integer,
|
|
228
233
|
referrals: Integer,
|
|
229
|
-
|
|
234
|
+
reward_status:
|
|
235
|
+
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::RewardStatus,
|
|
230
236
|
total_commissions: Integer,
|
|
231
237
|
total_paid_out: Integer,
|
|
232
238
|
unique_impressions: Integer,
|
|
@@ -240,12 +246,12 @@ module GrowsurfRuby
|
|
|
240
246
|
invites_sent: nil,
|
|
241
247
|
leads: nil,
|
|
242
248
|
monthly_referrals: nil,
|
|
243
|
-
pending_rewards: nil,
|
|
244
249
|
# Affiliate only. Revenue attributed to this participant's referrals, in minor
|
|
245
250
|
# currency units.
|
|
246
251
|
referral_revenue: nil,
|
|
247
252
|
referrals: nil,
|
|
248
|
-
|
|
253
|
+
# This participant's reward counts grouped by review and fulfillment status.
|
|
254
|
+
reward_status: nil,
|
|
249
255
|
# Affiliate only. Total commissions earned, in minor currency units.
|
|
250
256
|
total_commissions: nil,
|
|
251
257
|
# Affiliate only. Total paid out, in minor currency units.
|
|
@@ -265,10 +271,10 @@ module GrowsurfRuby
|
|
|
265
271
|
invites_sent: Integer,
|
|
266
272
|
leads: Integer,
|
|
267
273
|
monthly_referrals: Integer,
|
|
268
|
-
pending_rewards: Integer,
|
|
269
274
|
referral_revenue: Integer,
|
|
270
275
|
referrals: Integer,
|
|
271
|
-
|
|
276
|
+
reward_status:
|
|
277
|
+
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::RewardStatus,
|
|
272
278
|
total_commissions: Integer,
|
|
273
279
|
total_paid_out: Integer,
|
|
274
280
|
unique_impressions: Integer,
|
|
@@ -497,6 +503,12 @@ module GrowsurfRuby
|
|
|
497
503
|
sig { params(twitter_shares: Integer).void }
|
|
498
504
|
attr_writer :twitter_shares
|
|
499
505
|
|
|
506
|
+
sig { returns(T.nilable(Integer)) }
|
|
507
|
+
attr_reader :unique_commission_referrals
|
|
508
|
+
|
|
509
|
+
sig { params(unique_commission_referrals: Integer).void }
|
|
510
|
+
attr_writer :unique_commission_referrals
|
|
511
|
+
|
|
500
512
|
sig { returns(T.nilable(Integer)) }
|
|
501
513
|
attr_reader :unique_impressions
|
|
502
514
|
|
|
@@ -543,6 +555,7 @@ module GrowsurfRuby
|
|
|
543
555
|
total_revenue: Integer,
|
|
544
556
|
tumblr_shares: Integer,
|
|
545
557
|
twitter_shares: Integer,
|
|
558
|
+
unique_commission_referrals: Integer,
|
|
546
559
|
unique_impressions: Integer,
|
|
547
560
|
wechat_shares: Integer,
|
|
548
561
|
whats_app_shares: Integer
|
|
@@ -580,6 +593,7 @@ module GrowsurfRuby
|
|
|
580
593
|
total_revenue: nil,
|
|
581
594
|
tumblr_shares: nil,
|
|
582
595
|
twitter_shares: nil,
|
|
596
|
+
unique_commission_referrals: nil,
|
|
583
597
|
unique_impressions: nil,
|
|
584
598
|
wechat_shares: nil,
|
|
585
599
|
whats_app_shares: nil
|
|
@@ -615,6 +629,7 @@ module GrowsurfRuby
|
|
|
615
629
|
total_revenue: Integer,
|
|
616
630
|
tumblr_shares: Integer,
|
|
617
631
|
twitter_shares: Integer,
|
|
632
|
+
unique_commission_referrals: Integer,
|
|
618
633
|
unique_impressions: Integer,
|
|
619
634
|
wechat_shares: Integer,
|
|
620
635
|
whats_app_shares: Integer
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ParticipantGetPayoutDestinationParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
GrowsurfRuby::Campaign::ParticipantGetPayoutDestinationParams,
|
|
14
|
+
GrowsurfRuby::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :participant_id_or_email
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
id: String,
|
|
27
|
+
participant_id_or_email: String,
|
|
28
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(id:, participant_id_or_email:, request_options: {})
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
id: String,
|
|
38
|
+
participant_id_or_email: String,
|
|
39
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|