growsurf-ruby 1.0.0 → 1.1.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 +7 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/client.rb +4 -0
- data/lib/growsurf_ruby/models/account.rb +90 -0
- data/lib/growsurf_ruby/models/account_create_params.rb +46 -0
- data/lib/growsurf_ruby/models/account_create_response.rb +64 -0
- data/lib/growsurf_ruby/models/account_resend_verification_email_response.rb +33 -0
- data/lib/growsurf_ruby/models/account_rotate_api_key_response.rb +17 -0
- data/lib/growsurf_ruby/models/account_update_params.rb +35 -0
- data/lib/growsurf_ruby/models/campaign/campaign_reward_list_response.rb +2 -2
- data/lib/growsurf_ruby/models/campaign/create.rb +5 -1
- data/lib/growsurf_ruby/models/campaign/participant_activity_logs_response.rb +65 -0
- data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +421 -0
- data/lib/growsurf_ruby/models/campaign/participant_bulk_delete_params.rb +35 -0
- data/lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb +151 -0
- data/lib/growsurf_ruby/models/campaign/participant_email_params.rb +76 -0
- data/lib/growsurf_ruby/models/campaign/participant_email_response.rb +38 -0
- data/lib/growsurf_ruby/models/campaign/participant_list_activity_logs_params.rb +46 -0
- data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +98 -0
- data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +21 -1
- data/lib/growsurf_ruby/models/campaign/reward.rb +17 -6
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +25 -15
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +25 -15
- data/lib/growsurf_ruby/models/campaign/webhook.rb +72 -0
- data/lib/growsurf_ruby/models/campaign/webhook_create_params.rb +52 -0
- data/lib/growsurf_ruby/models/campaign/webhook_delete_params.rb +28 -0
- data/lib/growsurf_ruby/models/campaign/webhook_delete_response.rb +24 -0
- data/lib/growsurf_ruby/models/campaign/webhook_event.rb +23 -0
- data/lib/growsurf_ruby/models/campaign/webhook_list_response.rb +18 -0
- data/lib/growsurf_ruby/models/campaign/webhook_test_params.rb +42 -0
- data/lib/growsurf_ruby/models/campaign/webhook_test_response.rb +50 -0
- data/lib/growsurf_ruby/models/campaign/webhook_update_params.rb +59 -0
- data/lib/growsurf_ruby/models/campaign.rb +17 -6
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +36 -1
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +538 -1
- data/lib/growsurf_ruby/models/campaign_update_params.rb +0 -3
- data/lib/growsurf_ruby/models/commission_structure.rb +8 -2
- data/lib/growsurf_ruby/models/referral_flow_screenshots_response.rb +72 -0
- data/lib/growsurf_ruby/models.rb +8 -0
- data/lib/growsurf_ruby/resources/account.rb +159 -0
- data/lib/growsurf_ruby/resources/campaign/design.rb +9 -7
- data/lib/growsurf_ruby/resources/campaign/emails.rb +8 -5
- data/lib/growsurf_ruby/resources/campaign/installation.rb +8 -6
- data/lib/growsurf_ruby/resources/campaign/options.rb +8 -5
- data/lib/growsurf_ruby/resources/campaign/participant.rb +170 -2
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +17 -21
- data/lib/growsurf_ruby/resources/campaign/webhooks.rb +157 -0
- data/lib/growsurf_ruby/resources/campaign.rb +30 -2
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +26 -0
- data/rbi/growsurf_ruby/client.rbi +3 -0
- data/rbi/growsurf_ruby/models/account.rbi +125 -0
- data/rbi/growsurf_ruby/models/account_create_params.rbi +73 -0
- data/rbi/growsurf_ruby/models/account_create_response.rbi +115 -0
- data/rbi/growsurf_ruby/models/account_resend_verification_email_response.rbi +76 -0
- data/rbi/growsurf_ruby/models/account_rotate_api_key_response.rbi +30 -0
- data/rbi/growsurf_ruby/models/account_update_params.rbi +65 -0
- data/rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi +2 -2
- data/rbi/growsurf_ruby/models/campaign/create.rbi +8 -0
- data/rbi/growsurf_ruby/models/campaign/participant_activity_logs_response.rbi +111 -0
- data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +630 -0
- data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_params.rbi +56 -0
- data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbi +285 -0
- data/rbi/growsurf_ruby/models/campaign/participant_email_params.rbi +118 -0
- data/rbi/growsurf_ruby/models/campaign/participant_email_response.rbi +84 -0
- data/rbi/growsurf_ruby/models/campaign/participant_list_activity_logs_params.rbi +74 -0
- data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +207 -0
- data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +24 -0
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +25 -4
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +34 -9
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +34 -9
- data/rbi/growsurf_ruby/models/campaign/webhook.rbi +93 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_create_params.rbi +91 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_delete_params.rbi +48 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_delete_response.rbi +33 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_event.rbi +60 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_list_response.rbi +36 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_test_params.rbi +69 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_test_response.rbi +102 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_update_params.rbi +98 -0
- data/rbi/growsurf_ruby/models/campaign.rbi +25 -4
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +91 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +1011 -3
- data/rbi/growsurf_ruby/models/campaign_update_params.rbi +0 -15
- data/rbi/growsurf_ruby/models/commission_structure.rbi +8 -2
- data/rbi/growsurf_ruby/models/referral_flow_screenshots_response.rbi +94 -0
- data/rbi/growsurf_ruby/models.rbi +9 -0
- data/rbi/growsurf_ruby/resources/account.rbi +112 -0
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +7 -5
- data/rbi/growsurf_ruby/resources/campaign/emails.rbi +7 -5
- data/rbi/growsurf_ruby/resources/campaign/installation.rbi +7 -4
- data/rbi/growsurf_ruby/resources/campaign/options.rbi +7 -5
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +160 -0
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +37 -21
- data/rbi/growsurf_ruby/resources/campaign/webhooks.rbi +123 -0
- data/rbi/growsurf_ruby/resources/campaign.rbi +33 -2
- data/sig/growsurf_ruby/client.rbs +2 -0
- data/sig/growsurf_ruby/models/account.rbs +67 -0
- data/sig/growsurf_ruby/models/account_create_params.rbs +42 -0
- data/sig/growsurf_ruby/models/account_create_response.rbs +47 -0
- data/sig/growsurf_ruby/models/account_resend_verification_email_response.rbs +35 -0
- data/sig/growsurf_ruby/models/account_rotate_api_key_response.rbs +13 -0
- data/sig/growsurf_ruby/models/account_update_params.rbs +42 -0
- data/sig/growsurf_ruby/models/campaign/participant_activity_logs_response.rbs +59 -0
- data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +407 -0
- data/sig/growsurf_ruby/models/campaign/participant_bulk_delete_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbs +125 -0
- data/sig/growsurf_ruby/models/campaign/participant_email_params.rbs +61 -0
- data/sig/growsurf_ruby/models/campaign/participant_email_response.rbs +37 -0
- data/sig/growsurf_ruby/models/campaign/participant_list_activity_logs_params.rbs +47 -0
- data/sig/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbs +90 -0
- data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +14 -0
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +0 -7
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +0 -7
- data/sig/growsurf_ruby/models/campaign/webhook.rbs +52 -0
- data/sig/growsurf_ruby/models/campaign/webhook_create_params.rbs +51 -0
- data/sig/growsurf_ruby/models/campaign/webhook_delete_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/webhook_delete_response.rbs +17 -0
- data/sig/growsurf_ruby/models/campaign/webhook_event.rbs +28 -0
- data/sig/growsurf_ruby/models/campaign/webhook_list_response.rbs +18 -0
- data/sig/growsurf_ruby/models/campaign/webhook_test_params.rbs +42 -0
- data/sig/growsurf_ruby/models/campaign/webhook_test_response.rbs +54 -0
- data/sig/growsurf_ruby/models/campaign/webhook_update_params.rbs +63 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_params.rbs +35 -1
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +533 -3
- data/sig/growsurf_ruby/models/campaign_update_params.rbs +1 -4
- data/sig/growsurf_ruby/models/commission_structure.rbs +7 -2
- data/sig/growsurf_ruby/models/referral_flow_screenshots_response.rbs +54 -0
- data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +4 -1
- data/sig/growsurf_ruby/models.rbs +8 -0
- data/sig/growsurf_ruby/resources/account.rbs +38 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +37 -0
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +0 -2
- data/sig/growsurf_ruby/resources/campaign/webhooks.rbs +46 -0
- data/sig/growsurf_ruby/resources/campaign.rbs +9 -0
- metadata +80 -2
|
@@ -4,7 +4,7 @@ module GrowsurfRuby
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Campaign
|
|
6
6
|
class Rewards
|
|
7
|
-
# Retrieves the
|
|
7
|
+
# Retrieves the rewards configured for a program.
|
|
8
8
|
sig do
|
|
9
9
|
params(
|
|
10
10
|
id: String,
|
|
@@ -30,7 +30,6 @@ module GrowsurfRuby
|
|
|
30
30
|
coupon_code: String,
|
|
31
31
|
description: String,
|
|
32
32
|
image_url: String,
|
|
33
|
-
is_active: T::Boolean,
|
|
34
33
|
is_unlimited: T::Boolean,
|
|
35
34
|
is_visible: T::Boolean,
|
|
36
35
|
limit: Integer,
|
|
@@ -59,17 +58,20 @@ module GrowsurfRuby
|
|
|
59
58
|
commission_structure: nil,
|
|
60
59
|
# Body param
|
|
61
60
|
conversions_required: nil,
|
|
62
|
-
# Body param
|
|
61
|
+
# Body param: Legacy static coupon code shown to the referrer in the reward-won
|
|
62
|
+
# email and webhook. Display text only; superseded by a connected billing
|
|
63
|
+
# integration's issued coupon when one exists.
|
|
63
64
|
coupon_code: nil,
|
|
64
65
|
# Body param
|
|
65
66
|
description: nil,
|
|
66
67
|
# Body param
|
|
67
68
|
image_url: nil,
|
|
68
|
-
# Body param
|
|
69
|
-
|
|
70
|
-
# Body param
|
|
69
|
+
# Body param: Whether the reward can be earned an unlimited number of times.
|
|
70
|
+
# Defaults to `true`, except `MILESTONE` rewards, which can only be earned once.
|
|
71
71
|
is_unlimited: nil,
|
|
72
|
-
# Body param
|
|
72
|
+
# Body param: Whether the reward is enabled. When `false` the reward is disabled:
|
|
73
|
+
# hidden from participants and no longer awarded, including those who already
|
|
74
|
+
# earned it.
|
|
73
75
|
is_visible: nil,
|
|
74
76
|
# Body param
|
|
75
77
|
limit: nil,
|
|
@@ -78,15 +80,21 @@ module GrowsurfRuby
|
|
|
78
80
|
# Body param: Custom key/value metadata (single-level; values are stored as
|
|
79
81
|
# strings).
|
|
80
82
|
metadata: nil,
|
|
81
|
-
# Body param
|
|
83
|
+
# Body param: Text shown before a participant's referral count in
|
|
84
|
+
# milestone-progress copy. Applies to `MILESTONE` rewards.
|
|
82
85
|
next_milestone_prefix: nil,
|
|
83
|
-
# Body param
|
|
86
|
+
# Body param: Text shown after a participant's referral count in
|
|
87
|
+
# milestone-progress copy. Applies to `MILESTONE` rewards.
|
|
84
88
|
next_milestone_suffix: nil,
|
|
85
|
-
# Body param
|
|
89
|
+
# Body param: The number of winners (`LEADERBOARD` rewards only). With
|
|
90
|
+
# `limitDuration` `PER_MONTH` this many win each month, otherwise this many win
|
|
91
|
+
# in total; omitting it defaults to `3`.
|
|
86
92
|
number_of_winners: nil,
|
|
87
93
|
# Body param
|
|
88
94
|
order: nil,
|
|
89
|
-
# Body param
|
|
95
|
+
# Body param: Legacy static coupon code shown to the referred friend
|
|
96
|
+
# (double-sided rewards) in the reward-won email and webhook. Display text only;
|
|
97
|
+
# superseded by a connected billing integration's issued coupon when one exists.
|
|
90
98
|
referral_coupon_code: nil,
|
|
91
99
|
# Body param
|
|
92
100
|
referral_description: nil,
|
|
@@ -115,7 +123,6 @@ module GrowsurfRuby
|
|
|
115
123
|
coupon_code: String,
|
|
116
124
|
description: String,
|
|
117
125
|
image_url: String,
|
|
118
|
-
is_active: T::Boolean,
|
|
119
126
|
is_unlimited: T::Boolean,
|
|
120
127
|
is_visible: T::Boolean,
|
|
121
128
|
limit: Integer,
|
|
@@ -144,17 +151,20 @@ module GrowsurfRuby
|
|
|
144
151
|
commission_structure: nil,
|
|
145
152
|
# Body param
|
|
146
153
|
conversions_required: nil,
|
|
147
|
-
# Body param
|
|
154
|
+
# Body param: Legacy static coupon code shown to the referrer in the reward-won
|
|
155
|
+
# email and webhook. Display text only; superseded by a connected billing
|
|
156
|
+
# integration's issued coupon when one exists.
|
|
148
157
|
coupon_code: nil,
|
|
149
158
|
# Body param
|
|
150
159
|
description: nil,
|
|
151
160
|
# Body param
|
|
152
161
|
image_url: nil,
|
|
153
|
-
# Body param
|
|
154
|
-
|
|
155
|
-
# Body param
|
|
162
|
+
# Body param: Whether the reward can be earned an unlimited number of times.
|
|
163
|
+
# Defaults to `true`, except `MILESTONE` rewards, which can only be earned once.
|
|
156
164
|
is_unlimited: nil,
|
|
157
|
-
# Body param
|
|
165
|
+
# Body param: Whether the reward is enabled. When `false` the reward is disabled:
|
|
166
|
+
# hidden from participants and no longer awarded, including those who already
|
|
167
|
+
# earned it.
|
|
158
168
|
is_visible: nil,
|
|
159
169
|
# Body param
|
|
160
170
|
limit: nil,
|
|
@@ -163,15 +173,21 @@ module GrowsurfRuby
|
|
|
163
173
|
# Body param: Custom key/value metadata (single-level; values are stored as
|
|
164
174
|
# strings).
|
|
165
175
|
metadata: nil,
|
|
166
|
-
# Body param
|
|
176
|
+
# Body param: Text shown before a participant's referral count in
|
|
177
|
+
# milestone-progress copy. Applies to `MILESTONE` rewards.
|
|
167
178
|
next_milestone_prefix: nil,
|
|
168
|
-
# Body param
|
|
179
|
+
# Body param: Text shown after a participant's referral count in
|
|
180
|
+
# milestone-progress copy. Applies to `MILESTONE` rewards.
|
|
169
181
|
next_milestone_suffix: nil,
|
|
170
|
-
# Body param
|
|
182
|
+
# Body param: The number of winners (`LEADERBOARD` rewards only). With
|
|
183
|
+
# `limitDuration` `PER_MONTH` this many win each month, otherwise this many win
|
|
184
|
+
# in total; omitting it defaults to `3`.
|
|
171
185
|
number_of_winners: nil,
|
|
172
186
|
# Body param
|
|
173
187
|
order: nil,
|
|
174
|
-
# Body param
|
|
188
|
+
# Body param: Legacy static coupon code shown to the referred friend
|
|
189
|
+
# (double-sided rewards) in the reward-won email and webhook. Display text only;
|
|
190
|
+
# superseded by a connected billing integration's issued coupon when one exists.
|
|
175
191
|
referral_coupon_code: nil,
|
|
176
192
|
# Body param
|
|
177
193
|
referral_description: nil,
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Resources
|
|
5
|
+
class Campaign
|
|
6
|
+
class Webhooks
|
|
7
|
+
# Lists a program's webhooks (secrets are never returned).
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
id: String,
|
|
11
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
12
|
+
).returns(GrowsurfRuby::Models::Campaign::WebhookListResponse)
|
|
13
|
+
end
|
|
14
|
+
def list(
|
|
15
|
+
# GrowSurf program ID.
|
|
16
|
+
id,
|
|
17
|
+
request_options: {}
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Adds a webhook to the program.
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
id: String,
|
|
25
|
+
payload_url: String,
|
|
26
|
+
events: T::Array[GrowsurfRuby::Campaign::WebhookEvent::OrSymbol],
|
|
27
|
+
is_enabled: T::Boolean,
|
|
28
|
+
secret: String,
|
|
29
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
30
|
+
).returns(GrowsurfRuby::Models::Campaign::Webhook)
|
|
31
|
+
end
|
|
32
|
+
def create(
|
|
33
|
+
# Path param: GrowSurf program ID.
|
|
34
|
+
id,
|
|
35
|
+
# Body param: The URL that receives webhook deliveries.
|
|
36
|
+
payload_url:,
|
|
37
|
+
# Body param: The events this webhook is subscribed to. When omitted, it is
|
|
38
|
+
# subscribed to no events.
|
|
39
|
+
events: nil,
|
|
40
|
+
# Body param
|
|
41
|
+
is_enabled: nil,
|
|
42
|
+
# Body param: Write-only. Used to sign deliveries (the `GrowSurf-Signature` HMAC
|
|
43
|
+
# header). Never returned.
|
|
44
|
+
secret: nil,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Updates a webhook by id.
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
webhook_id: String,
|
|
53
|
+
id: String,
|
|
54
|
+
events: T::Array[GrowsurfRuby::Campaign::WebhookEvent::OrSymbol],
|
|
55
|
+
is_enabled: T::Boolean,
|
|
56
|
+
payload_url: String,
|
|
57
|
+
secret: String,
|
|
58
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
59
|
+
).returns(GrowsurfRuby::Models::Campaign::Webhook)
|
|
60
|
+
end
|
|
61
|
+
def update(
|
|
62
|
+
# Path param: The webhook id (`primary` for the program's primary webhook).
|
|
63
|
+
webhook_id,
|
|
64
|
+
# Path param: GrowSurf program ID.
|
|
65
|
+
id:,
|
|
66
|
+
# Body param
|
|
67
|
+
events: nil,
|
|
68
|
+
# Body param
|
|
69
|
+
is_enabled: nil,
|
|
70
|
+
# Body param
|
|
71
|
+
payload_url: nil,
|
|
72
|
+
# Body param: Write-only.
|
|
73
|
+
secret: nil,
|
|
74
|
+
request_options: {}
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Removes a webhook by id.
|
|
79
|
+
sig do
|
|
80
|
+
params(
|
|
81
|
+
webhook_id: String,
|
|
82
|
+
id: String,
|
|
83
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
84
|
+
).returns(GrowsurfRuby::Models::Campaign::WebhookDeleteResponse)
|
|
85
|
+
end
|
|
86
|
+
def delete(
|
|
87
|
+
# The webhook id (`primary` for the program's primary webhook).
|
|
88
|
+
webhook_id,
|
|
89
|
+
# GrowSurf program ID.
|
|
90
|
+
id:,
|
|
91
|
+
request_options: {}
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Sends a live test event to a webhook using its stored URL and secret.
|
|
96
|
+
sig do
|
|
97
|
+
params(
|
|
98
|
+
webhook_id: String,
|
|
99
|
+
id: String,
|
|
100
|
+
event: GrowsurfRuby::Campaign::WebhookEvent::OrSymbol,
|
|
101
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
102
|
+
).returns(GrowsurfRuby::Models::Campaign::WebhookTestResponse)
|
|
103
|
+
end
|
|
104
|
+
def test(
|
|
105
|
+
# Path param: The webhook id (`primary` for the program's primary webhook).
|
|
106
|
+
webhook_id,
|
|
107
|
+
# Path param: GrowSurf program ID.
|
|
108
|
+
id:,
|
|
109
|
+
# Body param: The event to simulate. When omitted, the webhook's first enabled
|
|
110
|
+
# event is used (returns `400` if it has no enabled events).
|
|
111
|
+
event: nil,
|
|
112
|
+
request_options: {}
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# @api private
|
|
117
|
+
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
118
|
+
def self.new(client:)
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
@@ -34,6 +34,10 @@ module GrowsurfRuby
|
|
|
34
34
|
sig { returns(GrowsurfRuby::Resources::Campaign::Installation) }
|
|
35
35
|
attr_reader :installation
|
|
36
36
|
|
|
37
|
+
# Program webhook configuration operations.
|
|
38
|
+
sig { returns(GrowsurfRuby::Resources::Campaign::Webhooks) }
|
|
39
|
+
attr_reader :webhooks
|
|
40
|
+
|
|
37
41
|
# Retrieves a program for the given program ID.
|
|
38
42
|
sig do
|
|
39
43
|
params(
|
|
@@ -110,8 +114,8 @@ module GrowsurfRuby
|
|
|
110
114
|
company_name: nil,
|
|
111
115
|
# Body param
|
|
112
116
|
name: nil,
|
|
113
|
-
# Body param: The program status.
|
|
114
|
-
#
|
|
117
|
+
# Body param: The requested program status. `IN_PROGRESS` publishes or resumes
|
|
118
|
+
# the program; `COMPLETE` ends it. Any other value returns a `400`.
|
|
115
119
|
status: nil,
|
|
116
120
|
request_options: {}
|
|
117
121
|
)
|
|
@@ -131,6 +135,21 @@ module GrowsurfRuby
|
|
|
131
135
|
)
|
|
132
136
|
end
|
|
133
137
|
|
|
138
|
+
# Captures two preview screenshots for the program: the authenticated referrer
|
|
139
|
+
# view and the referred-friend view.
|
|
140
|
+
sig do
|
|
141
|
+
params(
|
|
142
|
+
id: String,
|
|
143
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
144
|
+
).returns(GrowsurfRuby::Models::ReferralFlowScreenshotsResponse)
|
|
145
|
+
end
|
|
146
|
+
def get_referral_flow_screenshots(
|
|
147
|
+
# GrowSurf program ID.
|
|
148
|
+
id,
|
|
149
|
+
request_options: {}
|
|
150
|
+
)
|
|
151
|
+
end
|
|
152
|
+
|
|
134
153
|
# Creates or returns a participant using the same input behavior as Add
|
|
135
154
|
# Participant, then returns a participant-scoped token for GrowSurf mobile SDK
|
|
136
155
|
# participant endpoints. Use this endpoint from your backend after your mobile app
|
|
@@ -314,6 +333,9 @@ module GrowsurfRuby
|
|
|
314
333
|
id: String,
|
|
315
334
|
days: Integer,
|
|
316
335
|
end_date: Integer,
|
|
336
|
+
include: String,
|
|
337
|
+
interval:
|
|
338
|
+
GrowsurfRuby::CampaignRetrieveAnalyticsParams::Interval::OrSymbol,
|
|
317
339
|
start_date: Integer,
|
|
318
340
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
319
341
|
).returns(GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse)
|
|
@@ -326,6 +348,15 @@ module GrowsurfRuby
|
|
|
326
348
|
# End date of the analytics timeframe as a Unix timestamp in milliseconds.
|
|
327
349
|
# Required if `days` is not set.
|
|
328
350
|
end_date: nil,
|
|
351
|
+
# Comma-separated list of optional enrichments (opt-in to keep the default response
|
|
352
|
+
# lean): `previousPeriod` adds totals for the equal-length window immediately before
|
|
353
|
+
# the requested one; `statusCounts` adds reward (and, for affiliate programs,
|
|
354
|
+
# affiliate/commission/payout) status breakdowns; `rates` adds derived referral
|
|
355
|
+
# rates.
|
|
356
|
+
include: nil,
|
|
357
|
+
# When set to `day`, `week`, or `month`, the response also includes a `series` array
|
|
358
|
+
# with per-period totals. Defaults to `total` (no series).
|
|
359
|
+
interval: nil,
|
|
329
360
|
# Start date of the analytics timeframe as a Unix timestamp in milliseconds.
|
|
330
361
|
# Required if `days` is not set.
|
|
331
362
|
start_date: nil,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type account =
|
|
4
|
+
{
|
|
5
|
+
email: String,
|
|
6
|
+
id: String,
|
|
7
|
+
verification_status: GrowsurfRuby::Models::Account::verification_status,
|
|
8
|
+
company: String?,
|
|
9
|
+
created_at: Integer?,
|
|
10
|
+
first_name: String?,
|
|
11
|
+
last_name: String?,
|
|
12
|
+
verification_requested_at: Integer?
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
class Account < GrowsurfRuby::Internal::Type::BaseModel
|
|
16
|
+
attr_accessor email: String
|
|
17
|
+
|
|
18
|
+
attr_accessor id: String
|
|
19
|
+
|
|
20
|
+
attr_accessor verification_status: GrowsurfRuby::Models::Account::verification_status
|
|
21
|
+
|
|
22
|
+
attr_accessor company: String?
|
|
23
|
+
|
|
24
|
+
attr_accessor created_at: Integer?
|
|
25
|
+
|
|
26
|
+
attr_accessor first_name: String?
|
|
27
|
+
|
|
28
|
+
attr_accessor last_name: String?
|
|
29
|
+
|
|
30
|
+
attr_accessor verification_requested_at: Integer?
|
|
31
|
+
|
|
32
|
+
def initialize: (
|
|
33
|
+
email: String,
|
|
34
|
+
id: String,
|
|
35
|
+
verification_status: GrowsurfRuby::Models::Account::verification_status,
|
|
36
|
+
?company: String?,
|
|
37
|
+
?created_at: Integer?,
|
|
38
|
+
?first_name: String?,
|
|
39
|
+
?last_name: String?,
|
|
40
|
+
?verification_requested_at: Integer?
|
|
41
|
+
) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> {
|
|
44
|
+
email: String,
|
|
45
|
+
id: String,
|
|
46
|
+
verification_status: GrowsurfRuby::Models::Account::verification_status,
|
|
47
|
+
company: String?,
|
|
48
|
+
created_at: Integer?,
|
|
49
|
+
first_name: String?,
|
|
50
|
+
last_name: String?,
|
|
51
|
+
verification_requested_at: Integer?
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type verification_status = :NOT_REQUESTED | :REQUESTED | :VERIFIED
|
|
55
|
+
|
|
56
|
+
module VerificationStatus
|
|
57
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
58
|
+
|
|
59
|
+
NOT_REQUESTED: :NOT_REQUESTED
|
|
60
|
+
REQUESTED: :REQUESTED
|
|
61
|
+
VERIFIED: :VERIFIED
|
|
62
|
+
|
|
63
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Account::verification_status]
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type account_create_params =
|
|
4
|
+
{ email: String, company: String, first_name: String, last_name: String }
|
|
5
|
+
& GrowsurfRuby::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class AccountCreateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor email: String
|
|
12
|
+
|
|
13
|
+
attr_reader company: String?
|
|
14
|
+
|
|
15
|
+
def company=: (String) -> String
|
|
16
|
+
|
|
17
|
+
attr_reader first_name: String?
|
|
18
|
+
|
|
19
|
+
def first_name=: (String) -> String
|
|
20
|
+
|
|
21
|
+
attr_reader last_name: String?
|
|
22
|
+
|
|
23
|
+
def last_name=: (String) -> String
|
|
24
|
+
|
|
25
|
+
def initialize: (
|
|
26
|
+
email: String,
|
|
27
|
+
?company: String,
|
|
28
|
+
?first_name: String,
|
|
29
|
+
?last_name: String,
|
|
30
|
+
?request_options: GrowsurfRuby::request_opts
|
|
31
|
+
) -> void
|
|
32
|
+
|
|
33
|
+
def to_hash: -> {
|
|
34
|
+
email: String,
|
|
35
|
+
company: String,
|
|
36
|
+
first_name: String,
|
|
37
|
+
last_name: String,
|
|
38
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type account_create_response =
|
|
4
|
+
{
|
|
5
|
+
api_key: String,
|
|
6
|
+
email: String,
|
|
7
|
+
id: String,
|
|
8
|
+
verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class AccountCreateResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor api_key: String
|
|
13
|
+
|
|
14
|
+
attr_accessor email: String
|
|
15
|
+
|
|
16
|
+
attr_accessor id: String
|
|
17
|
+
|
|
18
|
+
attr_accessor verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
api_key: String,
|
|
22
|
+
email: String,
|
|
23
|
+
id: String,
|
|
24
|
+
verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> {
|
|
28
|
+
api_key: String,
|
|
29
|
+
email: String,
|
|
30
|
+
id: String,
|
|
31
|
+
verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type verification_status = :NOT_REQUESTED | :REQUESTED | :VERIFIED
|
|
35
|
+
|
|
36
|
+
module VerificationStatus
|
|
37
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
38
|
+
|
|
39
|
+
NOT_REQUESTED: :NOT_REQUESTED
|
|
40
|
+
REQUESTED: :REQUESTED
|
|
41
|
+
VERIFIED: :VERIFIED
|
|
42
|
+
|
|
43
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::AccountCreateResponse::verification_status]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type account_resend_verification_email_response =
|
|
4
|
+
{
|
|
5
|
+
status: GrowsurfRuby::Models::AccountResendVerificationEmailResponse::status,
|
|
6
|
+
success: bool
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
class AccountResendVerificationEmailResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor status: GrowsurfRuby::Models::AccountResendVerificationEmailResponse::status
|
|
11
|
+
|
|
12
|
+
attr_accessor success: bool
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
status: GrowsurfRuby::Models::AccountResendVerificationEmailResponse::status,
|
|
16
|
+
success: bool
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
status: GrowsurfRuby::Models::AccountResendVerificationEmailResponse::status,
|
|
21
|
+
success: bool
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type status = :SENT
|
|
25
|
+
|
|
26
|
+
module Status
|
|
27
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
28
|
+
|
|
29
|
+
SENT: :SENT
|
|
30
|
+
|
|
31
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::AccountResendVerificationEmailResponse::status]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type account_rotate_api_key_response = { api_key: String }
|
|
4
|
+
|
|
5
|
+
class AccountRotateAPIKeyResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor api_key: String
|
|
7
|
+
|
|
8
|
+
def initialize: (api_key: String) -> void
|
|
9
|
+
|
|
10
|
+
def to_hash: -> { api_key: String }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type account_update_params =
|
|
4
|
+
{
|
|
5
|
+
company: String,
|
|
6
|
+
first_name: String,
|
|
7
|
+
last_name: String
|
|
8
|
+
}
|
|
9
|
+
& GrowsurfRuby::Internal::Type::request_parameters
|
|
10
|
+
|
|
11
|
+
class AccountUpdateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
12
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
13
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
14
|
+
|
|
15
|
+
attr_reader company: String?
|
|
16
|
+
|
|
17
|
+
def company=: (String) -> String
|
|
18
|
+
|
|
19
|
+
attr_reader first_name: String?
|
|
20
|
+
|
|
21
|
+
def first_name=: (String) -> String
|
|
22
|
+
|
|
23
|
+
attr_reader last_name: String?
|
|
24
|
+
|
|
25
|
+
def last_name=: (String) -> String
|
|
26
|
+
|
|
27
|
+
def initialize: (
|
|
28
|
+
?company: String,
|
|
29
|
+
?first_name: String,
|
|
30
|
+
?last_name: String,
|
|
31
|
+
?request_options: GrowsurfRuby::request_opts
|
|
32
|
+
) -> void
|
|
33
|
+
|
|
34
|
+
def to_hash: -> {
|
|
35
|
+
company: String,
|
|
36
|
+
first_name: String,
|
|
37
|
+
last_name: String,
|
|
38
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type participant_activity_logs_response =
|
|
5
|
+
{
|
|
6
|
+
activity_logs: ::Array[GrowsurfRuby::Models::Campaign::ParticipantActivityLogsResponse::ActivityLog],
|
|
7
|
+
limit: Integer,
|
|
8
|
+
offset: Integer?
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class ParticipantActivityLogsResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor activity_logs: ::Array[GrowsurfRuby::Models::Campaign::ParticipantActivityLogsResponse::ActivityLog]
|
|
13
|
+
|
|
14
|
+
attr_accessor limit: Integer
|
|
15
|
+
|
|
16
|
+
attr_accessor offset: Integer?
|
|
17
|
+
|
|
18
|
+
def initialize: (
|
|
19
|
+
activity_logs: ::Array[GrowsurfRuby::Models::Campaign::ParticipantActivityLogsResponse::ActivityLog],
|
|
20
|
+
limit: Integer,
|
|
21
|
+
?offset: Integer?
|
|
22
|
+
) -> void
|
|
23
|
+
|
|
24
|
+
def to_hash: -> {
|
|
25
|
+
activity_logs: ::Array[GrowsurfRuby::Models::Campaign::ParticipantActivityLogsResponse::ActivityLog],
|
|
26
|
+
limit: Integer,
|
|
27
|
+
offset: Integer?
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
type activity_log =
|
|
31
|
+
{
|
|
32
|
+
created_at: Integer,
|
|
33
|
+
text: String,
|
|
34
|
+
type: String
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
class ActivityLog < GrowsurfRuby::Internal::Type::BaseModel
|
|
38
|
+
attr_accessor created_at: Integer
|
|
39
|
+
|
|
40
|
+
attr_accessor text: String
|
|
41
|
+
|
|
42
|
+
attr_accessor type: String
|
|
43
|
+
|
|
44
|
+
def initialize: (
|
|
45
|
+
created_at: Integer,
|
|
46
|
+
text: String,
|
|
47
|
+
type: String
|
|
48
|
+
) -> void
|
|
49
|
+
|
|
50
|
+
def to_hash: -> {
|
|
51
|
+
created_at: Integer,
|
|
52
|
+
text: String,
|
|
53
|
+
type: String
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|