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
|
@@ -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,19 @@ 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.
|
|
609
630
|
sig do
|
|
610
631
|
params(
|
|
611
632
|
participant_id_or_email: String,
|
|
612
633
|
id: String,
|
|
613
634
|
days: Integer,
|
|
614
635
|
end_date: Integer,
|
|
615
|
-
include:
|
|
616
|
-
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Include::OrSymbol,
|
|
636
|
+
include: String,
|
|
617
637
|
interval:
|
|
618
638
|
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Interval::OrSymbol,
|
|
619
639
|
start_date: Integer,
|
|
@@ -632,9 +652,15 @@ module GrowsurfRuby
|
|
|
632
652
|
# End date of the analytics timeframe as a Unix timestamp in milliseconds.
|
|
633
653
|
# Required if `days` is not set.
|
|
634
654
|
end_date: nil,
|
|
635
|
-
#
|
|
655
|
+
# Comma-separated optional data. `series` returns this participant's own activity per
|
|
656
|
+
# period; `email` returns `sent`, `delivered`, `opened`, `clicked`, `bounced`,
|
|
657
|
+
# `spamComplaints`, and per-email-type metrics attributed to the participant for the
|
|
658
|
+
# requested analytics window (including invitations they sent). Request both in either
|
|
659
|
+
# order to add email counts to every series item for emails sent during that period.
|
|
660
|
+
# Only documented tokens are accepted; an unknown token returns `400`.
|
|
636
661
|
include: nil,
|
|
637
|
-
# Bucket size for the `series` (only used
|
|
662
|
+
# Bucket size for the `series` (only used when `include` contains `series`). Defaults to
|
|
663
|
+
# `day`.
|
|
638
664
|
interval: nil,
|
|
639
665
|
# Start date of the analytics timeframe as a Unix timestamp in milliseconds.
|
|
640
666
|
# Required if `days` is not set.
|
|
@@ -643,6 +669,56 @@ module GrowsurfRuby
|
|
|
643
669
|
)
|
|
644
670
|
end
|
|
645
671
|
|
|
672
|
+
# Returns a participant's payout-destination status across every payout provider
|
|
673
|
+
# enabled for the program (PayPal and/or Wise). For each provider it reports the
|
|
674
|
+
# current status, the confirmed claim email, the legal recipient type, and — when a
|
|
675
|
+
# delivery bounced or a recipient was invalidated — the repair reason.
|
|
676
|
+
# `activeProvider` is the provider that currently gets paid, or `null` until the
|
|
677
|
+
# participant confirms one.
|
|
678
|
+
sig do
|
|
679
|
+
params(
|
|
680
|
+
participant_id_or_email: String,
|
|
681
|
+
id: String,
|
|
682
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
683
|
+
).returns(
|
|
684
|
+
GrowsurfRuby::Models::Campaign::ParticipantGetPayoutDestinationResponse
|
|
685
|
+
)
|
|
686
|
+
end
|
|
687
|
+
def get_payout_destination(
|
|
688
|
+
# GrowSurf participant ID or URL-encoded participant email address.
|
|
689
|
+
participant_id_or_email,
|
|
690
|
+
# GrowSurf program ID.
|
|
691
|
+
id:,
|
|
692
|
+
request_options: {}
|
|
693
|
+
)
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
# Sends the participant a one-time link to confirm their payout destination for
|
|
697
|
+
# the chosen provider. Only the participant can open the link and confirm — this
|
|
698
|
+
# endpoint just triggers the message. The provider must be enabled for the
|
|
699
|
+
# program.
|
|
700
|
+
sig do
|
|
701
|
+
params(
|
|
702
|
+
participant_id_or_email: String,
|
|
703
|
+
id: String,
|
|
704
|
+
provider:
|
|
705
|
+
GrowsurfRuby::Campaign::ParticipantRequestPayoutDestinationConfirmationParams::Provider::OrSymbol,
|
|
706
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
707
|
+
).returns(
|
|
708
|
+
GrowsurfRuby::Models::Campaign::ParticipantRequestPayoutDestinationConfirmationResponse
|
|
709
|
+
)
|
|
710
|
+
end
|
|
711
|
+
def request_payout_destination_confirmation(
|
|
712
|
+
# Path param: GrowSurf participant ID or URL-encoded participant email address.
|
|
713
|
+
participant_id_or_email,
|
|
714
|
+
# Path param: GrowSurf program ID.
|
|
715
|
+
id:,
|
|
716
|
+
# Body param: The payout provider the participant should confirm a destination for.
|
|
717
|
+
provider:,
|
|
718
|
+
request_options: {}
|
|
719
|
+
)
|
|
720
|
+
end
|
|
721
|
+
|
|
646
722
|
# @api private
|
|
647
723
|
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
648
724
|
def self.new(client:)
|
|
@@ -105,8 +105,8 @@ module GrowsurfRuby
|
|
|
105
105
|
referral_description: nil,
|
|
106
106
|
# Body param
|
|
107
107
|
referred_reward_upfront: nil,
|
|
108
|
-
# Body param: Tax
|
|
109
|
-
# reward. Defaults to
|
|
108
|
+
# Body param: Tax treatment override for the referred friend's side of a double-sided
|
|
109
|
+
# reward. Defaults to the program's confirmed default.
|
|
110
110
|
referred_value: nil,
|
|
111
111
|
# Body param
|
|
112
112
|
title: nil,
|
|
@@ -201,8 +201,8 @@ module GrowsurfRuby
|
|
|
201
201
|
referral_description: nil,
|
|
202
202
|
# Body param
|
|
203
203
|
referred_reward_upfront: nil,
|
|
204
|
-
# Body param: Tax
|
|
205
|
-
# reward. Defaults to
|
|
204
|
+
# Body param: Tax treatment override for the referred friend's side of a double-sided
|
|
205
|
+
# reward. Defaults to the program's confirmed default.
|
|
206
206
|
referred_value: nil,
|
|
207
207
|
# Body param
|
|
208
208
|
title: nil,
|