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
|
@@ -21,40 +21,37 @@ module GrowsurfRuby
|
|
|
21
21
|
sig { returns(String) }
|
|
22
22
|
attr_accessor :participant_id_or_email
|
|
23
23
|
|
|
24
|
-
# Last number of days
|
|
24
|
+
# Last number of days for optional `series` and `email` analytics. Defaults to 365.
|
|
25
|
+
# Maximum 1825. Does not filter the top-level all-time totals.
|
|
25
26
|
sig { returns(T.nilable(Integer)) }
|
|
26
27
|
attr_reader :days
|
|
27
28
|
|
|
28
29
|
sig { params(days: Integer).void }
|
|
29
30
|
attr_writer :days
|
|
30
31
|
|
|
31
|
-
# End
|
|
32
|
-
#
|
|
32
|
+
# End of a custom `series` and `email` analytics window as a Unix timestamp in
|
|
33
|
+
# milliseconds. Set it together with `startDate`. Does not filter the top-level
|
|
34
|
+
# all-time totals.
|
|
33
35
|
sig { returns(T.nilable(Integer)) }
|
|
34
36
|
attr_reader :end_date
|
|
35
37
|
|
|
36
38
|
sig { params(end_date: Integer).void }
|
|
37
39
|
attr_writer :end_date
|
|
38
40
|
|
|
39
|
-
#
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
end
|
|
41
|
+
# Comma-separated optional data. `series` returns this participant's own activity per
|
|
42
|
+
# period; `email` returns `sent`, `delivered`, `opened`, `clicked`, `bounced`,
|
|
43
|
+
# `spamComplaints`, and per-email-type metrics attributed to the participant for the
|
|
44
|
+
# requested analytics window (including invitations they sent). Request both in either
|
|
45
|
+
# order to add email counts to every series item for emails sent during that period. Only
|
|
46
|
+
# documented tokens are accepted; an unknown token returns `400`.
|
|
47
|
+
sig { returns(T.nilable(String)) }
|
|
47
48
|
attr_reader :include
|
|
48
49
|
|
|
49
|
-
sig
|
|
50
|
-
params(
|
|
51
|
-
include:
|
|
52
|
-
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Include::OrSymbol
|
|
53
|
-
).void
|
|
54
|
-
end
|
|
50
|
+
sig { params(include: String).void }
|
|
55
51
|
attr_writer :include
|
|
56
52
|
|
|
57
|
-
# Bucket size for the `series` (only used
|
|
53
|
+
# Bucket size for the `series` (only used when `include` contains `series`). Defaults to
|
|
54
|
+
# `day`.
|
|
58
55
|
sig do
|
|
59
56
|
returns(
|
|
60
57
|
T.nilable(
|
|
@@ -72,8 +69,9 @@ module GrowsurfRuby
|
|
|
72
69
|
end
|
|
73
70
|
attr_writer :interval
|
|
74
71
|
|
|
75
|
-
# Start
|
|
76
|
-
#
|
|
72
|
+
# Start of a custom `series` and `email` analytics window as a Unix timestamp in
|
|
73
|
+
# milliseconds. Set it together with `endDate`. Does not filter the top-level
|
|
74
|
+
# all-time totals.
|
|
77
75
|
sig { returns(T.nilable(Integer)) }
|
|
78
76
|
attr_reader :start_date
|
|
79
77
|
|
|
@@ -86,8 +84,7 @@ module GrowsurfRuby
|
|
|
86
84
|
participant_id_or_email: String,
|
|
87
85
|
days: Integer,
|
|
88
86
|
end_date: Integer,
|
|
89
|
-
include:
|
|
90
|
-
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Include::OrSymbol,
|
|
87
|
+
include: String,
|
|
91
88
|
interval:
|
|
92
89
|
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Interval::OrSymbol,
|
|
93
90
|
start_date: Integer,
|
|
@@ -97,17 +94,26 @@ module GrowsurfRuby
|
|
|
97
94
|
def self.new(
|
|
98
95
|
id:,
|
|
99
96
|
participant_id_or_email:,
|
|
100
|
-
# Last number of days
|
|
97
|
+
# Last number of days for optional `series` and `email` analytics. Defaults to 365.
|
|
98
|
+
# Maximum 1825. Does not filter the top-level all-time totals.
|
|
101
99
|
days: nil,
|
|
102
|
-
# End
|
|
103
|
-
#
|
|
100
|
+
# End of a custom `series` and `email` analytics window as a Unix timestamp in
|
|
101
|
+
# milliseconds. Set it together with `startDate`. Does not filter the top-level
|
|
102
|
+
# all-time totals.
|
|
104
103
|
end_date: nil,
|
|
105
|
-
#
|
|
104
|
+
# Comma-separated optional data. `series` returns this participant's own activity per
|
|
105
|
+
# period; `email` returns `sent`, `delivered`, `opened`, `clicked`, `bounced`,
|
|
106
|
+
# `spamComplaints`, and per-email-type metrics attributed to the participant for the
|
|
107
|
+
# requested analytics window (including invitations they sent). Request both in either
|
|
108
|
+
# order to add email counts to every series item for emails sent during that period.
|
|
109
|
+
# Only documented tokens are accepted; an unknown token returns `400`.
|
|
106
110
|
include: nil,
|
|
107
|
-
# Bucket size for the `series` (only used
|
|
111
|
+
# Bucket size for the `series` (only used when `include` contains `series`). Defaults to
|
|
112
|
+
# `day`.
|
|
108
113
|
interval: nil,
|
|
109
|
-
# Start
|
|
110
|
-
#
|
|
114
|
+
# Start of a custom `series` and `email` analytics window as a Unix timestamp in
|
|
115
|
+
# milliseconds. Set it together with `endDate`. Does not filter the top-level
|
|
116
|
+
# all-time totals.
|
|
111
117
|
start_date: nil,
|
|
112
118
|
request_options: {}
|
|
113
119
|
)
|
|
@@ -120,8 +126,7 @@ module GrowsurfRuby
|
|
|
120
126
|
participant_id_or_email: String,
|
|
121
127
|
days: Integer,
|
|
122
128
|
end_date: Integer,
|
|
123
|
-
include:
|
|
124
|
-
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Include::OrSymbol,
|
|
129
|
+
include: String,
|
|
125
130
|
interval:
|
|
126
131
|
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Interval::OrSymbol,
|
|
127
132
|
start_date: Integer,
|
|
@@ -132,37 +137,8 @@ module GrowsurfRuby
|
|
|
132
137
|
def to_hash
|
|
133
138
|
end
|
|
134
139
|
|
|
135
|
-
#
|
|
136
|
-
|
|
137
|
-
extend GrowsurfRuby::Internal::Type::Enum
|
|
138
|
-
|
|
139
|
-
TaggedSymbol =
|
|
140
|
-
T.type_alias do
|
|
141
|
-
T.all(
|
|
142
|
-
Symbol,
|
|
143
|
-
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Include
|
|
144
|
-
)
|
|
145
|
-
end
|
|
146
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
147
|
-
|
|
148
|
-
SERIES =
|
|
149
|
-
T.let(
|
|
150
|
-
:series,
|
|
151
|
-
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Include::TaggedSymbol
|
|
152
|
-
)
|
|
153
|
-
|
|
154
|
-
sig do
|
|
155
|
-
override.returns(
|
|
156
|
-
T::Array[
|
|
157
|
-
GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Include::TaggedSymbol
|
|
158
|
-
]
|
|
159
|
-
)
|
|
160
|
-
end
|
|
161
|
-
def self.values
|
|
162
|
-
end
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
# Bucket size for the `series` (only used with `include=series`). Defaults to `day`.
|
|
140
|
+
# Bucket size for the `series` (only used when `include` contains `series`). Defaults to
|
|
141
|
+
# `day`.
|
|
166
142
|
module Interval
|
|
167
143
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
168
144
|
|
|
@@ -168,6 +168,11 @@ module GrowsurfRuby
|
|
|
168
168
|
:FULFILLED,
|
|
169
169
|
GrowsurfRuby::Campaign::ParticipantReward::Status::TaggedSymbol
|
|
170
170
|
)
|
|
171
|
+
CANCELLED =
|
|
172
|
+
T.let(
|
|
173
|
+
:CANCELLED,
|
|
174
|
+
GrowsurfRuby::Campaign::ParticipantReward::Status::TaggedSymbol
|
|
175
|
+
)
|
|
171
176
|
|
|
172
177
|
sig do
|
|
173
178
|
override.returns(
|
|
@@ -21,6 +21,26 @@ module GrowsurfRuby
|
|
|
21
21
|
sig { returns(String) }
|
|
22
22
|
attr_accessor :participant_id_or_email
|
|
23
23
|
|
|
24
|
+
# Affiliate programs only. Sets the affiliate status. `APPROVED` also enrolls a
|
|
25
|
+
# participant who is not yet an affiliate. `SUSPENDED` and `BANNED` are rejected
|
|
26
|
+
# for non-affiliates.
|
|
27
|
+
sig do
|
|
28
|
+
returns(
|
|
29
|
+
T.nilable(
|
|
30
|
+
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol
|
|
31
|
+
)
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
attr_reader :affiliate_status
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
affiliate_status:
|
|
39
|
+
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol
|
|
40
|
+
).void
|
|
41
|
+
end
|
|
42
|
+
attr_writer :affiliate_status
|
|
43
|
+
|
|
24
44
|
sig { returns(T.nilable(String)) }
|
|
25
45
|
attr_reader :email
|
|
26
46
|
|
|
@@ -54,13 +74,6 @@ module GrowsurfRuby
|
|
|
54
74
|
sig { params(notes: String).void }
|
|
55
75
|
attr_writer :notes
|
|
56
76
|
|
|
57
|
-
# The participant's PayPal email address, used for affiliate payouts.
|
|
58
|
-
sig { returns(T.nilable(String)) }
|
|
59
|
-
attr_reader :paypal_email
|
|
60
|
-
|
|
61
|
-
sig { params(paypal_email: String).void }
|
|
62
|
-
attr_writer :paypal_email
|
|
63
|
-
|
|
64
77
|
sig do
|
|
65
78
|
returns(
|
|
66
79
|
T.nilable(
|
|
@@ -100,12 +113,13 @@ module GrowsurfRuby
|
|
|
100
113
|
params(
|
|
101
114
|
id: String,
|
|
102
115
|
participant_id_or_email: String,
|
|
116
|
+
affiliate_status:
|
|
117
|
+
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol,
|
|
103
118
|
email: String,
|
|
104
119
|
first_name: String,
|
|
105
120
|
last_name: String,
|
|
106
121
|
metadata: T::Hash[Symbol, T.anything],
|
|
107
122
|
notes: String,
|
|
108
|
-
paypal_email: String,
|
|
109
123
|
referral_status:
|
|
110
124
|
GrowsurfRuby::Campaign::ParticipantUpdateParams::ReferralStatus::OrSymbol,
|
|
111
125
|
referred_by: String,
|
|
@@ -117,6 +131,10 @@ module GrowsurfRuby
|
|
|
117
131
|
def self.new(
|
|
118
132
|
id:,
|
|
119
133
|
participant_id_or_email:,
|
|
134
|
+
# Affiliate programs only. Sets the affiliate status. `APPROVED` also enrolls a
|
|
135
|
+
# participant who is not yet an affiliate. `SUSPENDED` and `BANNED` are rejected
|
|
136
|
+
# for non-affiliates.
|
|
137
|
+
affiliate_status: nil,
|
|
120
138
|
email: nil,
|
|
121
139
|
first_name: nil,
|
|
122
140
|
last_name: nil,
|
|
@@ -125,8 +143,6 @@ module GrowsurfRuby
|
|
|
125
143
|
# Freeform internal notes about the participant (internal only, never exposed to
|
|
126
144
|
# participants).
|
|
127
145
|
notes: nil,
|
|
128
|
-
# The participant's PayPal email address, used for affiliate payouts.
|
|
129
|
-
paypal_email: nil,
|
|
130
146
|
referral_status: nil,
|
|
131
147
|
referred_by: nil,
|
|
132
148
|
unsubscribed: nil,
|
|
@@ -140,12 +156,13 @@ module GrowsurfRuby
|
|
|
140
156
|
{
|
|
141
157
|
id: String,
|
|
142
158
|
participant_id_or_email: String,
|
|
159
|
+
affiliate_status:
|
|
160
|
+
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol,
|
|
143
161
|
email: String,
|
|
144
162
|
first_name: String,
|
|
145
163
|
last_name: String,
|
|
146
164
|
metadata: T::Hash[Symbol, T.anything],
|
|
147
165
|
notes: String,
|
|
148
|
-
paypal_email: String,
|
|
149
166
|
referral_status:
|
|
150
167
|
GrowsurfRuby::Campaign::ParticipantUpdateParams::ReferralStatus::OrSymbol,
|
|
151
168
|
referred_by: String,
|
|
@@ -158,6 +175,45 @@ module GrowsurfRuby
|
|
|
158
175
|
def to_hash
|
|
159
176
|
end
|
|
160
177
|
|
|
178
|
+
module AffiliateStatus
|
|
179
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
180
|
+
|
|
181
|
+
TaggedSymbol =
|
|
182
|
+
T.type_alias do
|
|
183
|
+
T.all(
|
|
184
|
+
Symbol,
|
|
185
|
+
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus
|
|
186
|
+
)
|
|
187
|
+
end
|
|
188
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
189
|
+
|
|
190
|
+
APPROVED =
|
|
191
|
+
T.let(
|
|
192
|
+
:APPROVED,
|
|
193
|
+
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::TaggedSymbol
|
|
194
|
+
)
|
|
195
|
+
SUSPENDED =
|
|
196
|
+
T.let(
|
|
197
|
+
:SUSPENDED,
|
|
198
|
+
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::TaggedSymbol
|
|
199
|
+
)
|
|
200
|
+
BANNED =
|
|
201
|
+
T.let(
|
|
202
|
+
:BANNED,
|
|
203
|
+
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::TaggedSymbol
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
sig do
|
|
207
|
+
override.returns(
|
|
208
|
+
T::Array[
|
|
209
|
+
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::TaggedSymbol
|
|
210
|
+
]
|
|
211
|
+
)
|
|
212
|
+
end
|
|
213
|
+
def self.values
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
161
217
|
module ReferralStatus
|
|
162
218
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
163
219
|
|
|
@@ -17,6 +17,15 @@ module GrowsurfRuby
|
|
|
17
17
|
:PARTICIPANT,
|
|
18
18
|
GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol
|
|
19
19
|
)
|
|
20
|
+
DELETED_PARTICIPANT =
|
|
21
|
+
T.let(
|
|
22
|
+
:DELETED_PARTICIPANT,
|
|
23
|
+
GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol
|
|
24
|
+
)
|
|
25
|
+
IMPORT =
|
|
26
|
+
T.let(:IMPORT, GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol)
|
|
27
|
+
MANUAL =
|
|
28
|
+
T.let(:MANUAL, GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol)
|
|
20
29
|
|
|
21
30
|
sig do
|
|
22
31
|
override.returns(
|
|
@@ -50,9 +50,29 @@ module GrowsurfRuby
|
|
|
50
50
|
sig { returns(T.nilable(String)) }
|
|
51
51
|
attr_accessor :description
|
|
52
52
|
|
|
53
|
+
# The referral event that earns this Campaign Reward. Present only for
|
|
54
|
+
# `SINGLE_SIDED`, `DOUBLE_SIDED`, and `MILESTONE` rewards. Legacy Campaign
|
|
55
|
+
# Rewards return `CONVERSION`.
|
|
56
|
+
sig do
|
|
57
|
+
returns(
|
|
58
|
+
T.nilable(
|
|
59
|
+
GrowsurfRuby::Models::Campaign::Reward::Event::TaggedSymbol
|
|
60
|
+
)
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
attr_accessor :event
|
|
64
|
+
|
|
53
65
|
sig { returns(T.nilable(String)) }
|
|
54
66
|
attr_accessor :image_url
|
|
55
67
|
|
|
68
|
+
# Whether the reward is enabled. When `false` the reward is disabled: hidden from
|
|
69
|
+
# participants and no longer awarded, including those who already earned it.
|
|
70
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
71
|
+
attr_reader :is_visible
|
|
72
|
+
|
|
73
|
+
sig { params(is_visible: T::Boolean).void }
|
|
74
|
+
attr_writer :is_visible
|
|
75
|
+
|
|
56
76
|
# `-1` represents an unlimited reward in REST responses.
|
|
57
77
|
sig { returns(T.nilable(Integer)) }
|
|
58
78
|
attr_accessor :limit
|
|
@@ -99,7 +119,7 @@ module GrowsurfRuby
|
|
|
99
119
|
sig { params(referred_reward_upfront: T::Boolean).void }
|
|
100
120
|
attr_writer :referred_reward_upfront
|
|
101
121
|
|
|
102
|
-
# Tax
|
|
122
|
+
# Tax treatment override for the referred friend's side of a double-sided reward.
|
|
103
123
|
sig { returns(T.nilable(GrowsurfRuby::RewardTaxValuation)) }
|
|
104
124
|
attr_reader :referred_value
|
|
105
125
|
|
|
@@ -110,6 +130,10 @@ module GrowsurfRuby
|
|
|
110
130
|
end
|
|
111
131
|
attr_writer :referred_value
|
|
112
132
|
|
|
133
|
+
# The reward title (internal label).
|
|
134
|
+
sig { returns(T.nilable(String)) }
|
|
135
|
+
attr_accessor :title
|
|
136
|
+
|
|
113
137
|
# Tax valuation for the reward (the referrer's side of a double-sided reward).
|
|
114
138
|
sig { returns(T.nilable(GrowsurfRuby::RewardTaxValuation)) }
|
|
115
139
|
attr_reader :value
|
|
@@ -132,7 +156,12 @@ module GrowsurfRuby
|
|
|
132
156
|
conversions_required: T.nilable(Integer),
|
|
133
157
|
coupon_code: T.nilable(String),
|
|
134
158
|
description: T.nilable(String),
|
|
159
|
+
event:
|
|
160
|
+
T.nilable(
|
|
161
|
+
GrowsurfRuby::Models::Campaign::Reward::Event::OrSymbol
|
|
162
|
+
),
|
|
135
163
|
image_url: T.nilable(String),
|
|
164
|
+
is_visible: T::Boolean,
|
|
136
165
|
limit: T.nilable(Integer),
|
|
137
166
|
limit_duration:
|
|
138
167
|
T.nilable(
|
|
@@ -146,6 +175,7 @@ module GrowsurfRuby
|
|
|
146
175
|
referral_description: T.nilable(String),
|
|
147
176
|
referred_reward_upfront: T::Boolean,
|
|
148
177
|
referred_value: T.nilable(GrowsurfRuby::RewardTaxValuation::OrHash),
|
|
178
|
+
title: T.nilable(String),
|
|
149
179
|
value: T.nilable(GrowsurfRuby::RewardTaxValuation::OrHash)
|
|
150
180
|
).returns(T.attached_class)
|
|
151
181
|
end
|
|
@@ -162,7 +192,14 @@ module GrowsurfRuby
|
|
|
162
192
|
# issued coupon when one exists.
|
|
163
193
|
coupon_code: nil,
|
|
164
194
|
description: nil,
|
|
195
|
+
# The referral event that earns this Campaign Reward. Present only for
|
|
196
|
+
# `SINGLE_SIDED`, `DOUBLE_SIDED`, and `MILESTONE` rewards. Legacy Campaign
|
|
197
|
+
# Rewards return `CONVERSION`.
|
|
198
|
+
event: nil,
|
|
165
199
|
image_url: nil,
|
|
200
|
+
# Whether the reward is enabled. When `false` the reward is disabled: hidden from
|
|
201
|
+
# participants and no longer awarded, including those who already earned it.
|
|
202
|
+
is_visible: nil,
|
|
166
203
|
# `-1` represents an unlimited reward in REST responses.
|
|
167
204
|
limit: nil,
|
|
168
205
|
limit_duration: nil,
|
|
@@ -182,8 +219,10 @@ module GrowsurfRuby
|
|
|
182
219
|
referral_coupon_code: nil,
|
|
183
220
|
referral_description: nil,
|
|
184
221
|
referred_reward_upfront: nil,
|
|
185
|
-
# Tax
|
|
222
|
+
# Tax treatment override for the referred friend's side of a double-sided reward.
|
|
186
223
|
referred_value: nil,
|
|
224
|
+
# The reward title (internal label).
|
|
225
|
+
title: nil,
|
|
187
226
|
# Tax valuation for the reward (the referrer's side of a double-sided reward).
|
|
188
227
|
value: nil
|
|
189
228
|
)
|
|
@@ -201,7 +240,12 @@ module GrowsurfRuby
|
|
|
201
240
|
conversions_required: T.nilable(Integer),
|
|
202
241
|
coupon_code: T.nilable(String),
|
|
203
242
|
description: T.nilable(String),
|
|
243
|
+
event:
|
|
244
|
+
T.nilable(
|
|
245
|
+
GrowsurfRuby::Models::Campaign::Reward::Event::TaggedSymbol
|
|
246
|
+
),
|
|
204
247
|
image_url: T.nilable(String),
|
|
248
|
+
is_visible: T::Boolean,
|
|
205
249
|
limit: T.nilable(Integer),
|
|
206
250
|
limit_duration:
|
|
207
251
|
T.nilable(
|
|
@@ -215,6 +259,7 @@ module GrowsurfRuby
|
|
|
215
259
|
referral_description: T.nilable(String),
|
|
216
260
|
referred_reward_upfront: T::Boolean,
|
|
217
261
|
referred_value: T.nilable(GrowsurfRuby::RewardTaxValuation),
|
|
262
|
+
title: T.nilable(String),
|
|
218
263
|
value: T.nilable(GrowsurfRuby::RewardTaxValuation)
|
|
219
264
|
}
|
|
220
265
|
)
|
|
@@ -268,6 +313,37 @@ module GrowsurfRuby
|
|
|
268
313
|
end
|
|
269
314
|
end
|
|
270
315
|
|
|
316
|
+
module Event
|
|
317
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
318
|
+
|
|
319
|
+
TaggedSymbol =
|
|
320
|
+
T.type_alias do
|
|
321
|
+
T.all(Symbol, GrowsurfRuby::Models::Campaign::Reward::Event)
|
|
322
|
+
end
|
|
323
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
324
|
+
|
|
325
|
+
LEAD =
|
|
326
|
+
T.let(
|
|
327
|
+
:LEAD,
|
|
328
|
+
GrowsurfRuby::Models::Campaign::Reward::Event::TaggedSymbol
|
|
329
|
+
)
|
|
330
|
+
CONVERSION =
|
|
331
|
+
T.let(
|
|
332
|
+
:CONVERSION,
|
|
333
|
+
GrowsurfRuby::Models::Campaign::Reward::Event::TaggedSymbol
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
sig do
|
|
337
|
+
override.returns(
|
|
338
|
+
T::Array[
|
|
339
|
+
GrowsurfRuby::Models::Campaign::Reward::Event::TaggedSymbol
|
|
340
|
+
]
|
|
341
|
+
)
|
|
342
|
+
end
|
|
343
|
+
def self.values
|
|
344
|
+
end
|
|
345
|
+
end
|
|
346
|
+
|
|
271
347
|
module LimitDuration
|
|
272
348
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
273
349
|
|
|
@@ -53,6 +53,27 @@ module GrowsurfRuby
|
|
|
53
53
|
sig { params(description: String).void }
|
|
54
54
|
attr_writer :description
|
|
55
55
|
|
|
56
|
+
# The referral event that earns this Campaign Reward. Use `LEAD` or
|
|
57
|
+
# `CONVERSION`. `LEAD` requires the program installation's `referralTrigger` to
|
|
58
|
+
# be `CUSTOM`. This field applies only to `SINGLE_SIDED`, `DOUBLE_SIDED`, and
|
|
59
|
+
# `MILESTONE` rewards. When omitted, it defaults to `CONVERSION`.
|
|
60
|
+
sig do
|
|
61
|
+
returns(
|
|
62
|
+
T.nilable(
|
|
63
|
+
GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol
|
|
64
|
+
)
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
attr_reader :event
|
|
68
|
+
|
|
69
|
+
sig do
|
|
70
|
+
params(
|
|
71
|
+
event:
|
|
72
|
+
GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol
|
|
73
|
+
).void
|
|
74
|
+
end
|
|
75
|
+
attr_writer :event
|
|
76
|
+
|
|
56
77
|
sig { returns(T.nilable(String)) }
|
|
57
78
|
attr_reader :image_url
|
|
58
79
|
|
|
@@ -157,8 +178,8 @@ module GrowsurfRuby
|
|
|
157
178
|
sig { params(referred_reward_upfront: T::Boolean).void }
|
|
158
179
|
attr_writer :referred_reward_upfront
|
|
159
180
|
|
|
160
|
-
# Tax
|
|
161
|
-
# Defaults to
|
|
181
|
+
# Tax treatment override for the referred friend's side of a double-sided reward.
|
|
182
|
+
# Defaults to the program's confirmed default.
|
|
162
183
|
sig { returns(T.nilable(GrowsurfRuby::RewardTaxValuation)) }
|
|
163
184
|
attr_reader :referred_value
|
|
164
185
|
|
|
@@ -189,6 +210,8 @@ module GrowsurfRuby
|
|
|
189
210
|
conversions_required: Integer,
|
|
190
211
|
coupon_code: String,
|
|
191
212
|
description: String,
|
|
213
|
+
event:
|
|
214
|
+
GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol,
|
|
192
215
|
image_url: String,
|
|
193
216
|
is_unlimited: T::Boolean,
|
|
194
217
|
is_visible: T::Boolean,
|
|
@@ -218,6 +241,11 @@ module GrowsurfRuby
|
|
|
218
241
|
# issued coupon when one exists.
|
|
219
242
|
coupon_code: nil,
|
|
220
243
|
description: nil,
|
|
244
|
+
# The referral event that earns this Campaign Reward. Use `LEAD` or
|
|
245
|
+
# `CONVERSION`. `LEAD` requires the program installation's `referralTrigger` to
|
|
246
|
+
# be `CUSTOM`. This field applies only to `SINGLE_SIDED`, `DOUBLE_SIDED`, and
|
|
247
|
+
# `MILESTONE` rewards. When omitted, it defaults to `CONVERSION`.
|
|
248
|
+
event: nil,
|
|
221
249
|
image_url: nil,
|
|
222
250
|
# Whether the reward can be earned an unlimited number of times. Defaults to
|
|
223
251
|
# `true`, except `MILESTONE` rewards, which can only be earned once.
|
|
@@ -246,8 +274,8 @@ module GrowsurfRuby
|
|
|
246
274
|
referral_coupon_code: nil,
|
|
247
275
|
referral_description: nil,
|
|
248
276
|
referred_reward_upfront: nil,
|
|
249
|
-
# Tax
|
|
250
|
-
# Defaults to
|
|
277
|
+
# Tax treatment override for the referred friend's side of a double-sided reward.
|
|
278
|
+
# Defaults to the program's confirmed default.
|
|
251
279
|
referred_value: nil,
|
|
252
280
|
title: nil,
|
|
253
281
|
# Tax valuation for the reward (the referrer's side of a double-sided reward).
|
|
@@ -266,6 +294,8 @@ module GrowsurfRuby
|
|
|
266
294
|
conversions_required: Integer,
|
|
267
295
|
coupon_code: String,
|
|
268
296
|
description: String,
|
|
297
|
+
event:
|
|
298
|
+
GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol,
|
|
269
299
|
image_url: String,
|
|
270
300
|
is_unlimited: T::Boolean,
|
|
271
301
|
is_visible: T::Boolean,
|
|
@@ -339,6 +369,40 @@ module GrowsurfRuby
|
|
|
339
369
|
end
|
|
340
370
|
end
|
|
341
371
|
|
|
372
|
+
module Event
|
|
373
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
374
|
+
|
|
375
|
+
TaggedSymbol =
|
|
376
|
+
T.type_alias do
|
|
377
|
+
T.all(
|
|
378
|
+
Symbol,
|
|
379
|
+
GrowsurfRuby::Models::Campaign::RewardCreateParams::Event
|
|
380
|
+
)
|
|
381
|
+
end
|
|
382
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
383
|
+
|
|
384
|
+
LEAD =
|
|
385
|
+
T.let(
|
|
386
|
+
:LEAD,
|
|
387
|
+
GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::TaggedSymbol
|
|
388
|
+
)
|
|
389
|
+
CONVERSION =
|
|
390
|
+
T.let(
|
|
391
|
+
:CONVERSION,
|
|
392
|
+
GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::TaggedSymbol
|
|
393
|
+
)
|
|
394
|
+
|
|
395
|
+
sig do
|
|
396
|
+
override.returns(
|
|
397
|
+
T::Array[
|
|
398
|
+
GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::TaggedSymbol
|
|
399
|
+
]
|
|
400
|
+
)
|
|
401
|
+
end
|
|
402
|
+
def self.values
|
|
403
|
+
end
|
|
404
|
+
end
|
|
405
|
+
|
|
342
406
|
module LimitDuration
|
|
343
407
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
344
408
|
|