growsurf-ruby 1.2.0 → 1.2.1
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/resources/account.rb +13 -3
- data/lib/growsurf_ruby/resources/campaign/commission.rb +3 -2
- data/lib/growsurf_ruby/resources/campaign/design.rb +7 -11
- data/lib/growsurf_ruby/resources/campaign/emails.rb +9 -11
- data/lib/growsurf_ruby/resources/campaign/installation.rb +8 -12
- data/lib/growsurf_ruby/resources/campaign/options.rb +11 -13
- data/lib/growsurf_ruby/resources/campaign/participant.rb +45 -36
- data/lib/growsurf_ruby/resources/campaign/reward.rb +4 -3
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +18 -6
- data/lib/growsurf_ruby/resources/campaign.rb +16 -13
- data/lib/growsurf_ruby/resources/team.rb +22 -13
- data/lib/growsurf_ruby/version.rb +1 -1
- data/rbi/growsurf_ruby/resources/account.rbi +14 -0
- data/rbi/growsurf_ruby/resources/campaign/commission.rbi +3 -2
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +7 -5
- data/rbi/growsurf_ruby/resources/campaign/emails.rbi +9 -6
- data/rbi/growsurf_ruby/resources/campaign/installation.rbi +8 -8
- data/rbi/growsurf_ruby/resources/campaign/options.rbi +11 -8
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +45 -36
- data/rbi/growsurf_ruby/resources/campaign/reward.rbi +4 -3
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +18 -6
- data/rbi/growsurf_ruby/resources/campaign.rbi +16 -12
- data/rbi/growsurf_ruby/resources/team.rbi +23 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3f7355b6a4f09692cd4f02923eda76fe0887f88b647f0cfdc461b93e36337f6
|
|
4
|
+
data.tar.gz: 16ae21e1f33b5f0ffead7caf1f93d80758fbffce09c3d634d0350f5cde7e1e36
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c58b6e6dd858d7c7e419bd5d96d605b27d8de8518d3c9c2ff2c4dd121473404a6843f0e62dc6c4b0190c02ae7bed3821542b73ab5ebf9bf3646ee343783a92ee
|
|
7
|
+
data.tar.gz: d98124e2a70ebb54f25757c814342a2ee6f4d5595c3713ebb26386b9157474eaee6ad35825ad091f5b180455d89d9a334972fd37e53593c1c066d3d3d7b7f553
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.1](https://github.com/growsurf/growsurf-ruby/compare/v1.2.0...v1.2.1) (2026-07-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* align method docs with the REST v2 contract ([11967f2](https://github.com/growsurf/growsurf-ruby/commit/11967f2d1b95266e921775b921db970fc11e3cbb))
|
|
9
|
+
|
|
3
10
|
## [1.2.0](https://github.com/growsurf/growsurf-ruby/compare/v1.1.2...v1.2.0) (2026-07-13)
|
|
4
11
|
|
|
5
12
|
|
data/README.md
CHANGED
|
@@ -3,10 +3,20 @@
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
4
|
module Resources
|
|
5
5
|
class Account
|
|
6
|
-
# Creates a new GrowSurf account
|
|
7
|
-
#
|
|
8
|
-
#
|
|
6
|
+
# Creates a new GrowSurf account. This is the only endpoint that does not require
|
|
7
|
+
# an API key. The response includes an API key for the new account, shown once in
|
|
8
|
+
# the response. The key is locked until the team owner's email address is
|
|
9
|
+
# verified: authenticated program and resource endpoints return a `403` with error
|
|
10
|
+
# code `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
|
|
11
|
+
# /team/owner/verification-email`, then retry). A welcome email is sent to the
|
|
12
|
+
# address with the verification link and a set-password link for dashboard access.
|
|
9
13
|
# Accounts whose email is never verified are deleted automatically after 7 days.
|
|
14
|
+
# For security, the API key is rotated the first time the account owner signs in
|
|
15
|
+
# to the GrowSurf dashboard. Some actions (such as emailing participants)
|
|
16
|
+
# additionally require GrowSurf to verify the team first. By creating an account
|
|
17
|
+
# you agree, on behalf of the account holder, to GrowSurf's [Terms of
|
|
18
|
+
# Service](https://growsurf.com/terms) and [Privacy
|
|
19
|
+
# Policy](https://growsurf.com/privacy).
|
|
10
20
|
#
|
|
11
21
|
# @overload create(email:, company: nil, first_name: nil, last_name: nil, request_options: {})
|
|
12
22
|
#
|
|
@@ -5,7 +5,7 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
# Affiliate transaction, commission, and payout operations.
|
|
7
7
|
class Commission
|
|
8
|
-
# Removes a pending participant commission.
|
|
8
|
+
# **Affiliate programs only.** Removes a pending participant commission.
|
|
9
9
|
#
|
|
10
10
|
# @overload delete(commission_id, id:, request_options: {})
|
|
11
11
|
#
|
|
@@ -32,7 +32,8 @@ module GrowsurfRuby
|
|
|
32
32
|
)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# Approves a pending participant commission so it can
|
|
35
|
+
# **Affiliate programs only.** Approves a pending participant commission so it can
|
|
36
|
+
# become eligible for payout.
|
|
36
37
|
#
|
|
37
38
|
# @overload approve(commission_id, id:, request_options: {})
|
|
38
39
|
#
|
|
@@ -5,12 +5,11 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
class Design
|
|
7
7
|
# Retrieves a program's design configuration — the same surface as the dashboard
|
|
8
|
-
# Program Editor's **Design** tab
|
|
9
|
-
# form, portal/landing pages, theme styling, and
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
# is the same shape you send back on update.
|
|
8
|
+
# Program Editor's **Design** tab: the GrowSurf window layout, header, share
|
|
9
|
+
# channels + invite, signup form, portal/landing pages, theme styling, and the
|
|
10
|
+
# referral/affiliate summary + status sections. This is a large object whose
|
|
11
|
+
# available fields depend on the program type; the response includes every field
|
|
12
|
+
# and its current value, which is the same shape you send back on `PATCH`.
|
|
14
13
|
#
|
|
15
14
|
# @overload retrieve(id, request_options: {})
|
|
16
15
|
#
|
|
@@ -31,11 +30,8 @@ module GrowsurfRuby
|
|
|
31
30
|
# Updates a program's design configuration. Only the fields you send are changed;
|
|
32
31
|
# anything you leave out is untouched (arrays such as `signup.fields` replace
|
|
33
32
|
# wholesale). Unknown fields, fields not available for the program type, and
|
|
34
|
-
# invalid values return a `400`.
|
|
35
|
-
#
|
|
36
|
-
# The request body is a partial {CampaignDesign} object. To see the full object
|
|
37
|
-
# with every field and its current value, `GET` this resource, then `PATCH` back
|
|
38
|
-
# only the fields you want to change.
|
|
33
|
+
# invalid values return a `400`. Landing-page custom code and JavaScript are not
|
|
34
|
+
# editable via the API.
|
|
39
35
|
#
|
|
40
36
|
# @overload update(id, body, request_options: {})
|
|
41
37
|
#
|
|
@@ -5,11 +5,10 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
class Emails
|
|
7
7
|
# Retrieves a program's email configuration — the same surface as the dashboard
|
|
8
|
-
# Program Editor's **Emails** tab
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
# resource, then `PATCH` back only the fields you want to change.
|
|
8
|
+
# Program Editor's **Emails** tab. Returns each editable email template
|
|
9
|
+
# (`subject`, `preheader`, `body`, `isEnabled`) plus the `settings` block (sender,
|
|
10
|
+
# contact, and design). The set of email templates returned depends on the program
|
|
11
|
+
# type (referral vs affiliate).
|
|
13
12
|
#
|
|
14
13
|
# @overload retrieve(id, request_options: {})
|
|
15
14
|
#
|
|
@@ -28,12 +27,11 @@ module GrowsurfRuby
|
|
|
28
27
|
end
|
|
29
28
|
|
|
30
29
|
# Updates a program's email configuration. Only the fields you send are changed;
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
# only the fields you want to change.
|
|
30
|
+
# omitted fields are left untouched. You may only write the email templates the
|
|
31
|
+
# dashboard exposes for the program type — writing a template that is not
|
|
32
|
+
# available for the program type returns a `400`. Some fields are read-only
|
|
33
|
+
# (`settings.sender.fromEmail`, whose custom value requires dashboard domain
|
|
34
|
+
# verification).
|
|
37
35
|
#
|
|
38
36
|
# @overload update(id, body, request_options: {})
|
|
39
37
|
#
|
|
@@ -5,12 +5,9 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
class Installation
|
|
7
7
|
# Retrieves a program's installation configuration — the same surface as the
|
|
8
|
-
# dashboard Program Editor's **Installation** tab (
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
# This is a nested object whose available fields depend on the program type. To
|
|
12
|
-
# see the full object with every field and its current value, `GET` this
|
|
13
|
-
# resource, then `PATCH` back only the fields you want to change.
|
|
8
|
+
# dashboard Program Editor's **Installation** tab (plus the Mobile SDK settings).
|
|
9
|
+
# Includes the referral trigger (referral programs only), signup tracking method,
|
|
10
|
+
# share URL and whitelist, custom-form signup settings, and mobile SDK settings.
|
|
14
11
|
#
|
|
15
12
|
# @overload retrieve(id, request_options: {})
|
|
16
13
|
#
|
|
@@ -29,12 +26,11 @@ module GrowsurfRuby
|
|
|
29
26
|
end
|
|
30
27
|
|
|
31
28
|
# Updates a program's installation configuration. Only the fields you send are
|
|
32
|
-
# changed;
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
# `PATCH` back only the fields you want to change.
|
|
29
|
+
# changed; omitted fields are left untouched. `referralTrigger` is only available
|
|
30
|
+
# for referral programs. `mobile.publicKey` is read-only; if no key exists yet,
|
|
31
|
+
# enabling `mobile.isEnabled` creates one. Changing `shareUrl` re-resolves its
|
|
32
|
+
# redirect destinations, which may take a moment to complete. URLs must include an
|
|
33
|
+
# explicit `http://` or `https://` scheme.
|
|
38
34
|
#
|
|
39
35
|
# @overload update(id, body, request_options: {})
|
|
40
36
|
#
|
|
@@ -4,12 +4,11 @@ module GrowsurfRuby
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Campaign
|
|
6
6
|
class Options
|
|
7
|
-
# Retrieves a program's options
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
# resource, then `PATCH` back only the fields you want to change.
|
|
7
|
+
# Retrieves a program's options — the same surface as the dashboard Program
|
|
8
|
+
# Editor's **Options** tab. Includes reward/fraud approval, anti-fraud lists +
|
|
9
|
+
# toggles, referral cookie/credit windows, reCAPTCHA, payout threshold + tax
|
|
10
|
+
# settings (affiliate only), and notification-email settings.
|
|
11
|
+
# `fraud.recaptcha.secretKey` is never returned.
|
|
13
12
|
#
|
|
14
13
|
# @overload retrieve(id, request_options: {})
|
|
15
14
|
#
|
|
@@ -27,13 +26,12 @@ module GrowsurfRuby
|
|
|
27
26
|
)
|
|
28
27
|
end
|
|
29
28
|
|
|
30
|
-
# Updates a program's options
|
|
31
|
-
#
|
|
32
|
-
# `
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
# only the fields you want to change.
|
|
29
|
+
# Updates a program's options. Only the fields you send are changed. Some fields
|
|
30
|
+
# are program-type specific (`requireManualRewardApproval`/`autoFulfillRewards`
|
|
31
|
+
# are referral-only; `payoutThreshold`/`taxDocumentation` are affiliate-only, and
|
|
32
|
+
# affiliate programs require `requireParticipantAuth: true`).
|
|
33
|
+
# `fraud.recaptcha.secretKey` is write-only. `referralCreditWindowDays: null`
|
|
34
|
+
# means "never expires".
|
|
37
35
|
#
|
|
38
36
|
# @overload update(id, body, request_options: {})
|
|
39
37
|
#
|
|
@@ -110,12 +110,12 @@ module GrowsurfRuby
|
|
|
110
110
|
# {GrowsurfRuby::Models::Campaign::ParticipantBulkDeleteParams} for more details.
|
|
111
111
|
#
|
|
112
112
|
# Deletes a list of participants from a program in one request. Each entry in
|
|
113
|
-
# `participants` is a GrowSurf participant ID or an email address (mixed lists
|
|
114
|
-
#
|
|
115
|
-
#
|
|
116
|
-
#
|
|
117
|
-
#
|
|
118
|
-
#
|
|
113
|
+
# `participants` is a GrowSurf participant ID or an email address (mixed lists are
|
|
114
|
+
# allowed). Up to `200` entries per request — chunk larger lists across multiple
|
|
115
|
+
# calls. The response reports a per-row `status` for every submitted entry, so a
|
|
116
|
+
# `200` can include rows that were `NOT_FOUND` or failed. Deletion is permanent
|
|
117
|
+
# and removes the participants' referrals, rewards, commissions, and payout
|
|
118
|
+
# records.
|
|
119
119
|
#
|
|
120
120
|
# @overload bulk_delete(id, participants:, request_options: {})
|
|
121
121
|
#
|
|
@@ -183,7 +183,8 @@ module GrowsurfRuby
|
|
|
183
183
|
)
|
|
184
184
|
end
|
|
185
185
|
|
|
186
|
-
# Retrieves a paged list of commissions earned by a
|
|
186
|
+
# **Affiliate programs only.** Retrieves a paged list of commissions earned by a
|
|
187
|
+
# participant.
|
|
187
188
|
#
|
|
188
189
|
# @overload list_commissions(participant_id_or_email, id:, limit: nil, next_id: nil, status: nil, request_options: {})
|
|
189
190
|
#
|
|
@@ -218,7 +219,8 @@ module GrowsurfRuby
|
|
|
218
219
|
)
|
|
219
220
|
end
|
|
220
221
|
|
|
221
|
-
# Retrieves a paged list of payouts that belong to a
|
|
222
|
+
# **Affiliate programs only.** Retrieves a paged list of payouts that belong to a
|
|
223
|
+
# participant.
|
|
222
224
|
#
|
|
223
225
|
# @overload list_payouts(participant_id_or_email, id:, limit: nil, next_id: nil, status: nil, request_options: {})
|
|
224
226
|
#
|
|
@@ -339,15 +341,12 @@ module GrowsurfRuby
|
|
|
339
341
|
)
|
|
340
342
|
end
|
|
341
343
|
|
|
342
|
-
# Records a sale made by a referred customer and
|
|
343
|
-
# for their referrer when applicable.
|
|
344
|
-
#
|
|
345
|
-
#
|
|
346
|
-
#
|
|
347
|
-
#
|
|
348
|
-
# identify the customer or subscription rather than the specific transaction.
|
|
349
|
-
# Without an identifier, resending the same sale creates a duplicate commission
|
|
350
|
-
# and double-pays the referrer; the server rejects such requests with HTTP 400.
|
|
344
|
+
# **Affiliate programs only.** Records a sale made by a referred customer and
|
|
345
|
+
# generates affiliate commissions for their referrer when applicable. Requires at
|
|
346
|
+
# least one transaction identifier (externalId, transactionId, orderId, paymentId,
|
|
347
|
+
# invoiceId, paymentIntentId, or chargeId) so repeated requests can be
|
|
348
|
+
# de-duplicated — without one, a resent sale would create a second commission.
|
|
349
|
+
# Reuse the same identifier(s) when refunding.
|
|
351
350
|
#
|
|
352
351
|
# @overload record_transaction(participant_id_or_email, id:, currency:, gross_amount:, amount_cash_net: nil, amount_paid: nil, charge_id: nil, customer_id: nil, description: nil, external_id: nil, invoice_id: nil, invoice_subtotal_excluding_tax: nil, invoice_total: nil, invoice_total_excluding_tax: nil, net_amount: nil, order_id: nil, paid_at: nil, payment_id: nil, payment_intent_id: nil, subscription_id: nil, tax_amount: nil, total_tax_amount: nil, total_tax_amounts: nil, total_taxes: nil, transaction_id: nil, request_options: {})
|
|
353
352
|
#
|
|
@@ -421,9 +420,12 @@ module GrowsurfRuby
|
|
|
421
420
|
)
|
|
422
421
|
end
|
|
423
422
|
|
|
424
|
-
# Records an amendment (refund, partial refund,
|
|
425
|
-
# chargeback) against a previously recorded transaction
|
|
426
|
-
# the referrer's commission.
|
|
423
|
+
# **Affiliate programs only.** Records an amendment (refund, partial refund,
|
|
424
|
+
# refund cancellation, or chargeback) against a previously recorded transaction
|
|
425
|
+
# and reverses or adjusts the referrer's commission. The inverse of Record
|
|
426
|
+
# Affiliate Transaction. Identify the original transaction with the same
|
|
427
|
+
# identifier(s) you sent when recording it. Commissions already paid out to the
|
|
428
|
+
# affiliate are not clawed back; the amendment is recorded for tax reporting only.
|
|
427
429
|
#
|
|
428
430
|
# @overload refund_transaction(participant_id_or_email, id:, amendment_type: nil, amount: nil, amount_refunded: nil, charge_id: nil, currency: nil, description: nil, external_id: nil, invoice_id: nil, order_id: nil, payment_id: nil, payment_intent_id: nil, refund_amount: nil, refund_id: nil, refund_status: nil, transaction_id: nil, request_options: {})
|
|
429
431
|
#
|
|
@@ -482,7 +484,7 @@ module GrowsurfRuby
|
|
|
482
484
|
end
|
|
483
485
|
|
|
484
486
|
# Sends email invites on behalf of a participant to a list of email addresses.
|
|
485
|
-
# Sending invites via the API requires a verified custom email domain on the
|
|
487
|
+
# Sending invites via the API requires a **verified custom email domain** on the
|
|
486
488
|
# program; the request fails until one is verified.
|
|
487
489
|
#
|
|
488
490
|
# @overload send_invites(participant_id_or_email, id:, email_addresses:, message_text:, subject_text:, request_options: {})
|
|
@@ -522,7 +524,10 @@ module GrowsurfRuby
|
|
|
522
524
|
# details.
|
|
523
525
|
#
|
|
524
526
|
# Triggers referral credit for an existing referred participant by GrowSurf
|
|
525
|
-
# participant ID or email address.
|
|
527
|
+
# participant ID or email address. Optionally pass `delayInDays` to hold the
|
|
528
|
+
# credit for a number of days before it is awarded (for example, to cover your own
|
|
529
|
+
# refund window). A delayed trigger can be cancelled before it is awarded with the
|
|
530
|
+
# Cancel delayed referral trigger request (DELETE on this same path).
|
|
526
531
|
#
|
|
527
532
|
# @overload trigger_referral(participant_id_or_email, id:, delay_in_days: nil, request_options: {})
|
|
528
533
|
#
|
|
@@ -552,8 +557,11 @@ module GrowsurfRuby
|
|
|
552
557
|
)
|
|
553
558
|
end
|
|
554
559
|
|
|
555
|
-
# Cancels a pending delayed referral trigger for
|
|
556
|
-
#
|
|
560
|
+
# Cancels a pending delayed referral trigger for a participant (the companion to a
|
|
561
|
+
# delayed Trigger referral request). Use this to undo a scheduled referral credit
|
|
562
|
+
# before it is awarded, for example when a refund occurs inside your refund
|
|
563
|
+
# window. If the participant has no pending delayed trigger, `success` is returned
|
|
564
|
+
# as `false`.
|
|
557
565
|
#
|
|
558
566
|
# @overload cancel_delayed_referral(participant_id_or_email, id:, request_options: {})
|
|
559
567
|
#
|
|
@@ -580,15 +588,14 @@ module GrowsurfRuby
|
|
|
580
588
|
)
|
|
581
589
|
end
|
|
582
590
|
|
|
583
|
-
# Sends an email to a participant. Provide EITHER `
|
|
584
|
-
# program's configured email templates, OR `subject` + `body` for a free-form
|
|
585
|
-
# Free-form emails are sent with the same compliance handling (company
|
|
586
|
-
# postal address, and an unsubscribe link are added automatically, and
|
|
587
|
-
# participants are suppressed). Sending requires the team to be
|
|
588
|
-
# GrowSurf. Requires a verified custom email domain on the program
|
|
589
|
-
# in Campaign Editor > 3. Emails > Email Settings).
|
|
590
|
-
# verified.
|
|
591
|
-
# The email is accepted for delivery.
|
|
591
|
+
# Sends an email to a participant. Provide EITHER `emailType` to trigger one of
|
|
592
|
+
# the program's configured email templates, OR `subject` + `body` for a free-form
|
|
593
|
+
# email. Free-form emails are sent with the same compliance handling (company
|
|
594
|
+
# name, postal address, and an unsubscribe link are added automatically, and
|
|
595
|
+
# unsubscribed participants are suppressed). Sending requires the team to be
|
|
596
|
+
# verified by GrowSurf. Requires a **verified custom email domain** on the program
|
|
597
|
+
# (which can be completed in *Campaign Editor > 3. Emails > Email Settings*).
|
|
598
|
+
# Returns `400` until one is verified. The email is accepted for delivery.
|
|
592
599
|
#
|
|
593
600
|
# @overload email(participant_id_or_email, id:, body: nil, email_type: nil, preheader: nil, subject: nil, request_options: {})
|
|
594
601
|
#
|
|
@@ -624,7 +631,8 @@ module GrowsurfRuby
|
|
|
624
631
|
)
|
|
625
632
|
end
|
|
626
633
|
|
|
627
|
-
# Returns a participant's activity logs, most recent first (offset/limit
|
|
634
|
+
# Returns a participant's activity logs, most recent first (offset/limit
|
|
635
|
+
# paginated).
|
|
628
636
|
#
|
|
629
637
|
# @overload list_activity_logs(participant_id_or_email, id:, limit: nil, offset: nil, request_options: {})
|
|
630
638
|
#
|
|
@@ -662,8 +670,9 @@ module GrowsurfRuby
|
|
|
662
670
|
# details.
|
|
663
671
|
#
|
|
664
672
|
# Retrieves analytics for a single participant — all-time engagement counters,
|
|
665
|
-
# leaderboard ranks, and per-channel share counts (plus affiliate money metrics
|
|
666
|
-
# affiliate programs). Useful for segmenting and re-engaging participants.
|
|
673
|
+
# leaderboard ranks, and per-channel share counts (plus affiliate money metrics
|
|
674
|
+
# for affiliate programs). Useful for segmenting and re-engaging participants.
|
|
675
|
+
# Pass `include=series` to also get this participant's own activity over time.
|
|
667
676
|
#
|
|
668
677
|
# @overload retrieve_analytics(participant_id_or_email, id:, days: nil, end_date: nil, include: nil, interval: nil, start_date: nil, request_options: {})
|
|
669
678
|
#
|
|
@@ -33,8 +33,9 @@ module GrowsurfRuby
|
|
|
33
33
|
)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
# Approves a manually approved reward earned by a participant.
|
|
37
|
-
# `reward:write`.
|
|
36
|
+
# Approves a manually approved reward earned by a participant. This requires
|
|
37
|
+
# `reward:write`. When the request also sets `fulfill` to `true`, it additionally
|
|
38
|
+
# requires `reward:fulfill`.
|
|
38
39
|
#
|
|
39
40
|
# @overload approve(reward_id, id:, fulfill: nil, request_options: {})
|
|
40
41
|
#
|
|
@@ -64,7 +65,7 @@ module GrowsurfRuby
|
|
|
64
65
|
)
|
|
65
66
|
end
|
|
66
67
|
|
|
67
|
-
# Marks an approved participant reward as fulfilled.
|
|
68
|
+
# Marks an approved participant reward as fulfilled.
|
|
68
69
|
#
|
|
69
70
|
# @overload fulfill(reward_id, id:, request_options: {})
|
|
70
71
|
#
|
|
@@ -4,7 +4,9 @@ module GrowsurfRuby
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Campaign
|
|
6
6
|
class Rewards
|
|
7
|
-
# Retrieves the
|
|
7
|
+
# Retrieves the list of a program's configured rewards (`CampaignReward`s) — the
|
|
8
|
+
# same set embedded in the `rewards` array of the campaign response. Delete a
|
|
9
|
+
# reward with `DELETE /campaign/{id}/reward-configs/{campaignRewardId}`.
|
|
8
10
|
#
|
|
9
11
|
# @overload list(id, request_options: {})
|
|
10
12
|
#
|
|
@@ -22,8 +24,11 @@ module GrowsurfRuby
|
|
|
22
24
|
)
|
|
23
25
|
end
|
|
24
26
|
|
|
25
|
-
# Creates a
|
|
26
|
-
# program type
|
|
27
|
+
# Creates a new campaign reward (`CampaignReward`) with a GrowSurf-assigned ID.
|
|
28
|
+
# The reward type must be compatible with the program type (affiliate programs
|
|
29
|
+
# support only `AFFILIATE` rewards; referral programs support all other types).
|
|
30
|
+
# Enabling an active reward of a type automatically enables that reward type on
|
|
31
|
+
# the program.
|
|
27
32
|
#
|
|
28
33
|
# @overload create(id, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, image_url: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, title: nil, value: nil, request_options: {})
|
|
29
34
|
#
|
|
@@ -87,8 +92,11 @@ module GrowsurfRuby
|
|
|
87
92
|
)
|
|
88
93
|
end
|
|
89
94
|
|
|
90
|
-
# Updates an existing campaign reward.
|
|
91
|
-
#
|
|
95
|
+
# Updates an existing campaign reward (`CampaignReward`). The reward `type` is
|
|
96
|
+
# immutable and cannot be changed. When the update replaces `metadata`, renamed
|
|
97
|
+
# keys automatically rewrite any `{{campaignReward[…]}}` references in campaign
|
|
98
|
+
# copy; removing a key that campaign copy still references returns a `409` listing
|
|
99
|
+
# the referencing fields.
|
|
92
100
|
#
|
|
93
101
|
# @overload update(campaign_reward_id, id:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, image_url: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, title: nil, value: nil, request_options: {})
|
|
94
102
|
#
|
|
@@ -156,7 +164,11 @@ module GrowsurfRuby
|
|
|
156
164
|
)
|
|
157
165
|
end
|
|
158
166
|
|
|
159
|
-
# Deletes a campaign reward.
|
|
167
|
+
# Deletes a campaign reward (`CampaignReward`). The reward is deactivated, removed
|
|
168
|
+
# from the program's reward set, and any connected upfront-discount coupons are
|
|
169
|
+
# cleaned up. If campaign copy still references any of the reward's metadata keys
|
|
170
|
+
# via `{{campaignReward[…]}}` tokens, the delete returns a `409` listing the
|
|
171
|
+
# referencing fields — update those fields first.
|
|
160
172
|
#
|
|
161
173
|
# @overload delete(campaign_reward_id, id:, request_options: {})
|
|
162
174
|
#
|
|
@@ -76,10 +76,8 @@ module GrowsurfRuby
|
|
|
76
76
|
)
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
-
# Creates a program
|
|
80
|
-
#
|
|
81
|
-
# installation) is not accepted here — configure it via the config sub-resources
|
|
82
|
-
# (e.g. `campaign.options.update`) after the program is created.
|
|
79
|
+
# Creates a new program, plus any optional program rewards. The new program is
|
|
80
|
+
# created in `DRAFT` status and owned by the API key's bound team.
|
|
83
81
|
#
|
|
84
82
|
# @overload create(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil, name: nil, rewards: nil, request_options: {})
|
|
85
83
|
#
|
|
@@ -111,11 +109,11 @@ module GrowsurfRuby
|
|
|
111
109
|
)
|
|
112
110
|
end
|
|
113
111
|
|
|
114
|
-
# Updates a program's identity and lifecycle. Only the fields you send are
|
|
115
|
-
# `type`, `urlId`, and `currencyISO` are immutable. Editor-tab
|
|
116
|
-
# options, installation) is edited via the
|
|
117
|
-
#
|
|
118
|
-
#
|
|
112
|
+
# Updates a program's identity and lifecycle. Only the fields you send are
|
|
113
|
+
# changed. `type`, `urlId`, and `currencyISO` are immutable. Editor-tab
|
|
114
|
+
# configuration (design, emails, options, installation) is edited via the
|
|
115
|
+
# dedicated config sub-resources, not here. The program cannot be deleted via this
|
|
116
|
+
# endpoint.
|
|
119
117
|
#
|
|
120
118
|
# @overload update(id, company_logo_image_url: nil, company_name: nil, name: nil, status: nil, request_options: {})
|
|
121
119
|
#
|
|
@@ -145,7 +143,8 @@ module GrowsurfRuby
|
|
|
145
143
|
)
|
|
146
144
|
end
|
|
147
145
|
|
|
148
|
-
# Clones an existing program
|
|
146
|
+
# Clones an existing program into a new `DRAFT` program. Integrations and
|
|
147
|
+
# credentials are not copied; active rewards are cloned.
|
|
149
148
|
#
|
|
150
149
|
# @overload clone(id, request_options: {})
|
|
151
150
|
#
|
|
@@ -210,7 +209,8 @@ module GrowsurfRuby
|
|
|
210
209
|
)
|
|
211
210
|
end
|
|
212
211
|
|
|
213
|
-
# Retrieves a paged list of all participant
|
|
212
|
+
# **Affiliate programs only.** Retrieves a paged list of all participant
|
|
213
|
+
# commissions in an affiliate program.
|
|
214
214
|
#
|
|
215
215
|
# @overload list_commissions(id, limit: nil, next_id: nil, status: nil, request_options: {})
|
|
216
216
|
#
|
|
@@ -301,7 +301,8 @@ module GrowsurfRuby
|
|
|
301
301
|
)
|
|
302
302
|
end
|
|
303
303
|
|
|
304
|
-
# Retrieves a paged list of all participant payouts
|
|
304
|
+
# **Affiliate programs only.** Retrieves a paged list of all participant payouts
|
|
305
|
+
# in an affiliate program.
|
|
305
306
|
#
|
|
306
307
|
# @overload list_payouts(id, limit: nil, next_id: nil, status: nil, request_options: {})
|
|
307
308
|
#
|
|
@@ -381,7 +382,9 @@ module GrowsurfRuby
|
|
|
381
382
|
# Some parameter documentations has been truncated, see
|
|
382
383
|
# {GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams} for more details.
|
|
383
384
|
#
|
|
384
|
-
# Retrieves analytics for a program.
|
|
385
|
+
# Retrieves analytics for a program. Pass `interval` to also get a time-series
|
|
386
|
+
# (`series`) alongside the totals, and `include` to add previous-period totals,
|
|
387
|
+
# status breakdowns, or derived rates — useful for detecting trends over time.
|
|
385
388
|
#
|
|
386
389
|
# @overload retrieve_analytics(id, days: nil, end_date: nil, include: nil, interval: nil, start_date: nil, request_options: {})
|
|
387
390
|
#
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
4
|
module Resources
|
|
5
5
|
class Team
|
|
6
|
-
# Retrieves the team bound to the API key or OAuth connection.
|
|
7
|
-
#
|
|
8
|
-
#
|
|
6
|
+
# Retrieves the team bound to the API key or OAuth connection.
|
|
7
|
+
# `verificationStatus` is `VERIFIED` once GrowSurf has verified the team, which is
|
|
8
|
+
# required before a program can send participant emails.
|
|
9
9
|
#
|
|
10
10
|
# @overload retrieve(request_options: {})
|
|
11
11
|
#
|
|
@@ -21,8 +21,9 @@ module GrowsurfRuby
|
|
|
21
21
|
)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
# Updates the name of the team bound to the API key or OAuth connection. Any
|
|
25
|
-
#
|
|
24
|
+
# Updates the name of the team bound to the API key or OAuth connection. Any other
|
|
25
|
+
# property is rejected with a `400`. Personal profiles, billing, and team
|
|
26
|
+
# ownership are not editable here.
|
|
26
27
|
#
|
|
27
28
|
# @overload update(name:, request_options: {})
|
|
28
29
|
#
|
|
@@ -44,11 +45,15 @@ module GrowsurfRuby
|
|
|
44
45
|
)
|
|
45
46
|
end
|
|
46
47
|
|
|
47
|
-
# Generates a new API key and makes the key used on this request stop working
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
48
|
+
# Generates a new API key and makes the key used on this request stop working when
|
|
49
|
+
# rotation succeeds. Send a unique, random `Idempotency-Key`. If the response is
|
|
50
|
+
# interrupted, immediately retry with the original API key and the same
|
|
51
|
+
# `Idempotency-Key` to receive the same new key. Update every integration that
|
|
52
|
+
# used the old key. The team owner is notified by email whenever the key is
|
|
53
|
+
# rotated. GrowSurf SDKs generate the idempotency key automatically. This endpoint
|
|
54
|
+
# accepts an API key with `api_key:rotate`. If this scope is unavailable, rotate
|
|
55
|
+
# the key in the authenticated dashboard instead. This operation is available only
|
|
56
|
+
# through the REST API or a GrowSurf API SDK, not through MCP.
|
|
52
57
|
#
|
|
53
58
|
# @overload rotate_api_key(request_options: {})
|
|
54
59
|
#
|
|
@@ -64,8 +69,9 @@ module GrowsurfRuby
|
|
|
64
69
|
)
|
|
65
70
|
end
|
|
66
71
|
|
|
67
|
-
# Requests GrowSurf
|
|
68
|
-
#
|
|
72
|
+
# Requests GrowSurf to verify the bound team (required before a program can email
|
|
73
|
+
# its participants). Idempotent — calling it again while a request is pending does
|
|
74
|
+
# not create a duplicate. Returns the team with its updated `verificationStatus`.
|
|
69
75
|
#
|
|
70
76
|
# @overload request_verification(request_options: {})
|
|
71
77
|
#
|
|
@@ -82,7 +88,10 @@ module GrowsurfRuby
|
|
|
82
88
|
end
|
|
83
89
|
|
|
84
90
|
# Resends the email-verification message to the bound team's owner. The response
|
|
85
|
-
# never reveals the owner's email address.
|
|
91
|
+
# never reveals the owner's email address. A `200` with `status: SENT` is returned
|
|
92
|
+
# only when an email was actually dispatched. Returns `400` if the email is
|
|
93
|
+
# already verified, and `429` if a verification email was sent too recently — wait
|
|
94
|
+
# a moment, then retry.
|
|
86
95
|
#
|
|
87
96
|
# @overload resend_owner_verification_email(request_options: {})
|
|
88
97
|
#
|
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
4
|
module Resources
|
|
5
5
|
class Account
|
|
6
|
+
# Creates a new GrowSurf account. This is the only endpoint that does not require
|
|
7
|
+
# an API key. The response includes an API key for the new account, shown once in
|
|
8
|
+
# the response. The key is locked until the team owner's email address is
|
|
9
|
+
# verified: authenticated program and resource endpoints return a `403` with error
|
|
10
|
+
# code `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
|
|
11
|
+
# /team/owner/verification-email`, then retry). A welcome email is sent to the
|
|
12
|
+
# address with the verification link and a set-password link for dashboard access.
|
|
13
|
+
# Accounts whose email is never verified are deleted automatically after 7 days.
|
|
14
|
+
# For security, the API key is rotated the first time the account owner signs in
|
|
15
|
+
# to the GrowSurf dashboard. Some actions (such as emailing participants)
|
|
16
|
+
# additionally require GrowSurf to verify the team first. By creating an account
|
|
17
|
+
# you agree, on behalf of the account holder, to GrowSurf's [Terms of
|
|
18
|
+
# Service](https://growsurf.com/terms) and [Privacy
|
|
19
|
+
# Policy](https://growsurf.com/privacy).
|
|
6
20
|
sig do
|
|
7
21
|
params(
|
|
8
22
|
email: String,
|
|
@@ -5,7 +5,7 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
# Affiliate transaction, commission, and payout operations.
|
|
7
7
|
class Commission
|
|
8
|
-
# Removes a pending participant commission.
|
|
8
|
+
# **Affiliate programs only.** Removes a pending participant commission.
|
|
9
9
|
sig do
|
|
10
10
|
params(
|
|
11
11
|
commission_id: String,
|
|
@@ -22,7 +22,8 @@ module GrowsurfRuby
|
|
|
22
22
|
)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
# Approves a pending participant commission so it can
|
|
25
|
+
# **Affiliate programs only.** Approves a pending participant commission so it can
|
|
26
|
+
# become eligible for payout.
|
|
26
27
|
sig do
|
|
27
28
|
params(
|
|
28
29
|
commission_id: String,
|
|
@@ -5,9 +5,11 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
class Design
|
|
7
7
|
# Retrieves a program's design configuration — the same surface as the dashboard
|
|
8
|
-
# Program Editor's **Design** tab
|
|
8
|
+
# Program Editor's **Design** tab: the GrowSurf window layout, header, share
|
|
9
|
+
# channels + invite, signup form, portal/landing pages, theme styling, and the
|
|
10
|
+
# referral/affiliate summary + status sections. This is a large object whose
|
|
9
11
|
# available fields depend on the program type; the response includes every field
|
|
10
|
-
# and its current value, which is the same shape you send back on
|
|
12
|
+
# and its current value, which is the same shape you send back on `PATCH`.
|
|
11
13
|
sig do
|
|
12
14
|
params(
|
|
13
15
|
id: String,
|
|
@@ -23,9 +25,9 @@ module GrowsurfRuby
|
|
|
23
25
|
|
|
24
26
|
# Updates a program's design configuration. Only the fields you send are changed;
|
|
25
27
|
# anything you leave out is untouched (arrays such as `signup.fields` replace
|
|
26
|
-
# wholesale).
|
|
27
|
-
#
|
|
28
|
-
#
|
|
28
|
+
# wholesale). Unknown fields, fields not available for the program type, and
|
|
29
|
+
# invalid values return a `400`. Landing-page custom code and JavaScript are not
|
|
30
|
+
# editable via the API.
|
|
29
31
|
sig do
|
|
30
32
|
params(
|
|
31
33
|
id: String,
|
|
@@ -5,9 +5,10 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
class Emails
|
|
7
7
|
# Retrieves a program's email configuration — the same surface as the dashboard
|
|
8
|
-
# Program Editor's **Emails** tab.
|
|
9
|
-
#
|
|
10
|
-
#
|
|
8
|
+
# Program Editor's **Emails** tab. Returns each editable email template
|
|
9
|
+
# (`subject`, `preheader`, `body`, `isEnabled`) plus the `settings` block (sender,
|
|
10
|
+
# contact, and design). The set of email templates returned depends on the program
|
|
11
|
+
# type (referral vs affiliate).
|
|
11
12
|
sig do
|
|
12
13
|
params(
|
|
13
14
|
id: String,
|
|
@@ -22,9 +23,11 @@ module GrowsurfRuby
|
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
# Updates a program's email configuration. Only the fields you send are changed;
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
26
|
+
# omitted fields are left untouched. You may only write the email templates the
|
|
27
|
+
# dashboard exposes for the program type — writing a template that is not
|
|
28
|
+
# available for the program type returns a `400`. Some fields are read-only
|
|
29
|
+
# (`settings.sender.fromEmail`, whose custom value requires dashboard domain
|
|
30
|
+
# verification).
|
|
28
31
|
sig do
|
|
29
32
|
params(
|
|
30
33
|
id: String,
|
|
@@ -5,10 +5,9 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
class Installation
|
|
7
7
|
# Retrieves a program's installation configuration — the same surface as the
|
|
8
|
-
# dashboard Program Editor's **Installation** tab
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
# fields you want to change.
|
|
8
|
+
# dashboard Program Editor's **Installation** tab (plus the Mobile SDK settings).
|
|
9
|
+
# Includes the referral trigger (referral programs only), signup tracking method,
|
|
10
|
+
# share URL and whitelist, custom-form signup settings, and mobile SDK settings.
|
|
12
11
|
sig do
|
|
13
12
|
params(
|
|
14
13
|
id: String,
|
|
@@ -23,10 +22,11 @@ module GrowsurfRuby
|
|
|
23
22
|
end
|
|
24
23
|
|
|
25
24
|
# Updates a program's installation configuration. Only the fields you send are
|
|
26
|
-
# changed;
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
25
|
+
# changed; omitted fields are left untouched. `referralTrigger` is only available
|
|
26
|
+
# for referral programs. `mobile.publicKey` is read-only; if no key exists yet,
|
|
27
|
+
# enabling `mobile.isEnabled` creates one. Changing `shareUrl` re-resolves its
|
|
28
|
+
# redirect destinations, which may take a moment to complete. URLs must include an
|
|
29
|
+
# explicit `http://` or `https://` scheme.
|
|
30
30
|
sig do
|
|
31
31
|
params(
|
|
32
32
|
id: String,
|
|
@@ -4,10 +4,11 @@ module GrowsurfRuby
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Campaign
|
|
6
6
|
class Options
|
|
7
|
-
# Retrieves a program's options
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
7
|
+
# Retrieves a program's options — the same surface as the dashboard Program
|
|
8
|
+
# Editor's **Options** tab. Includes reward/fraud approval, anti-fraud lists +
|
|
9
|
+
# toggles, referral cookie/credit windows, reCAPTCHA, payout threshold + tax
|
|
10
|
+
# settings (affiliate only), and notification-email settings.
|
|
11
|
+
# `fraud.recaptcha.secretKey` is never returned.
|
|
11
12
|
sig do
|
|
12
13
|
params(
|
|
13
14
|
id: String,
|
|
@@ -21,10 +22,12 @@ module GrowsurfRuby
|
|
|
21
22
|
)
|
|
22
23
|
end
|
|
23
24
|
|
|
24
|
-
# Updates a program's options
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
25
|
+
# Updates a program's options. Only the fields you send are changed. Some fields
|
|
26
|
+
# are program-type specific (`requireManualRewardApproval`/`autoFulfillRewards`
|
|
27
|
+
# are referral-only; `payoutThreshold`/`taxDocumentation` are affiliate-only, and
|
|
28
|
+
# affiliate programs require `requireParticipantAuth: true`).
|
|
29
|
+
# `fraud.recaptcha.secretKey` is write-only. `referralCreditWindowDays: null`
|
|
30
|
+
# means "never expires".
|
|
28
31
|
sig do
|
|
29
32
|
params(
|
|
30
33
|
id: String,
|
|
@@ -88,12 +88,12 @@ module GrowsurfRuby
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Deletes a list of participants from a program in one request. Each entry in
|
|
91
|
-
# `participants` is a GrowSurf participant ID or an email address (mixed lists
|
|
92
|
-
#
|
|
93
|
-
#
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
#
|
|
91
|
+
# `participants` is a GrowSurf participant ID or an email address (mixed lists are
|
|
92
|
+
# allowed). Up to `200` entries per request — chunk larger lists across multiple
|
|
93
|
+
# calls. The response reports a per-row `status` for every submitted entry, so a
|
|
94
|
+
# `200` can include rows that were `NOT_FOUND` or failed. Deletion is permanent
|
|
95
|
+
# and removes the participants' referrals, rewards, commissions, and payout
|
|
96
|
+
# records.
|
|
97
97
|
sig do
|
|
98
98
|
params(
|
|
99
99
|
id: String,
|
|
@@ -156,7 +156,8 @@ module GrowsurfRuby
|
|
|
156
156
|
)
|
|
157
157
|
end
|
|
158
158
|
|
|
159
|
-
# Retrieves a paged list of commissions earned by a
|
|
159
|
+
# **Affiliate programs only.** Retrieves a paged list of commissions earned by a
|
|
160
|
+
# participant.
|
|
160
161
|
sig do
|
|
161
162
|
params(
|
|
162
163
|
participant_id_or_email: String,
|
|
@@ -183,7 +184,8 @@ module GrowsurfRuby
|
|
|
183
184
|
)
|
|
184
185
|
end
|
|
185
186
|
|
|
186
|
-
# Retrieves a paged list of payouts that belong to a
|
|
187
|
+
# **Affiliate programs only.** Retrieves a paged list of payouts that belong to a
|
|
188
|
+
# participant.
|
|
187
189
|
sig do
|
|
188
190
|
params(
|
|
189
191
|
participant_id_or_email: String,
|
|
@@ -280,15 +282,12 @@ module GrowsurfRuby
|
|
|
280
282
|
)
|
|
281
283
|
end
|
|
282
284
|
|
|
283
|
-
# Records a sale made by a referred customer and
|
|
284
|
-
# for their referrer when applicable.
|
|
285
|
-
#
|
|
286
|
-
#
|
|
287
|
-
#
|
|
288
|
-
#
|
|
289
|
-
# identify the customer or subscription rather than the specific transaction.
|
|
290
|
-
# Without an identifier, resending the same sale creates a duplicate commission
|
|
291
|
-
# and double-pays the referrer; the server rejects such requests with HTTP 400.
|
|
285
|
+
# **Affiliate programs only.** Records a sale made by a referred customer and
|
|
286
|
+
# generates affiliate commissions for their referrer when applicable. Requires at
|
|
287
|
+
# least one transaction identifier (externalId, transactionId, orderId, paymentId,
|
|
288
|
+
# invoiceId, paymentIntentId, or chargeId) so repeated requests can be
|
|
289
|
+
# de-duplicated — without one, a resent sale would create a second commission.
|
|
290
|
+
# Reuse the same identifier(s) when refunding.
|
|
292
291
|
sig do
|
|
293
292
|
params(
|
|
294
293
|
participant_id_or_email: String,
|
|
@@ -376,9 +375,12 @@ module GrowsurfRuby
|
|
|
376
375
|
)
|
|
377
376
|
end
|
|
378
377
|
|
|
379
|
-
# Records an amendment (refund, partial refund,
|
|
380
|
-
# chargeback) against a previously recorded transaction
|
|
381
|
-
# the referrer's commission.
|
|
378
|
+
# **Affiliate programs only.** Records an amendment (refund, partial refund,
|
|
379
|
+
# refund cancellation, or chargeback) against a previously recorded transaction
|
|
380
|
+
# and reverses or adjusts the referrer's commission. The inverse of Record
|
|
381
|
+
# Affiliate Transaction. Identify the original transaction with the same
|
|
382
|
+
# identifier(s) you sent when recording it. Commissions already paid out to the
|
|
383
|
+
# affiliate are not clawed back; the amendment is recorded for tax reporting only.
|
|
382
384
|
sig do
|
|
383
385
|
params(
|
|
384
386
|
participant_id_or_email: String,
|
|
@@ -444,7 +446,7 @@ module GrowsurfRuby
|
|
|
444
446
|
end
|
|
445
447
|
|
|
446
448
|
# Sends email invites on behalf of a participant to a list of email addresses.
|
|
447
|
-
# Sending invites via the API requires a verified custom email domain on the
|
|
449
|
+
# Sending invites via the API requires a **verified custom email domain** on the
|
|
448
450
|
# program; the request fails until one is verified.
|
|
449
451
|
sig do
|
|
450
452
|
params(
|
|
@@ -474,7 +476,10 @@ module GrowsurfRuby
|
|
|
474
476
|
end
|
|
475
477
|
|
|
476
478
|
# Triggers referral credit for an existing referred participant by GrowSurf
|
|
477
|
-
# participant ID or email address.
|
|
479
|
+
# participant ID or email address. Optionally pass `delayInDays` to hold the
|
|
480
|
+
# credit for a number of days before it is awarded (for example, to cover your own
|
|
481
|
+
# refund window). A delayed trigger can be cancelled before it is awarded with the
|
|
482
|
+
# Cancel delayed referral trigger request (DELETE on this same path).
|
|
478
483
|
sig do
|
|
479
484
|
params(
|
|
480
485
|
participant_id_or_email: String,
|
|
@@ -500,8 +505,11 @@ module GrowsurfRuby
|
|
|
500
505
|
)
|
|
501
506
|
end
|
|
502
507
|
|
|
503
|
-
# Cancels a pending delayed referral trigger for
|
|
504
|
-
#
|
|
508
|
+
# Cancels a pending delayed referral trigger for a participant (the companion to a
|
|
509
|
+
# delayed Trigger referral request). Use this to undo a scheduled referral credit
|
|
510
|
+
# before it is awarded, for example when a refund occurs inside your refund
|
|
511
|
+
# window. If the participant has no pending delayed trigger, `success` is returned
|
|
512
|
+
# as `false`.
|
|
505
513
|
sig do
|
|
506
514
|
params(
|
|
507
515
|
participant_id_or_email: String,
|
|
@@ -520,15 +528,14 @@ module GrowsurfRuby
|
|
|
520
528
|
)
|
|
521
529
|
end
|
|
522
530
|
|
|
523
|
-
# Sends an email to a participant. Provide EITHER `
|
|
524
|
-
# program's configured email templates, OR `subject` + `body` for a free-form
|
|
525
|
-
# Free-form emails are sent with the same compliance handling (company
|
|
526
|
-
# postal address, and an unsubscribe link are added automatically, and
|
|
527
|
-
# participants are suppressed). Sending requires the team to be
|
|
528
|
-
# GrowSurf. Requires a verified custom email domain on the program
|
|
529
|
-
# in Campaign Editor > 3. Emails > Email Settings).
|
|
530
|
-
# verified.
|
|
531
|
-
# The email is accepted for delivery.
|
|
531
|
+
# Sends an email to a participant. Provide EITHER `emailType` to trigger one of
|
|
532
|
+
# the program's configured email templates, OR `subject` + `body` for a free-form
|
|
533
|
+
# email. Free-form emails are sent with the same compliance handling (company
|
|
534
|
+
# name, postal address, and an unsubscribe link are added automatically, and
|
|
535
|
+
# unsubscribed participants are suppressed). Sending requires the team to be
|
|
536
|
+
# verified by GrowSurf. Requires a **verified custom email domain** on the program
|
|
537
|
+
# (which can be completed in *Campaign Editor > 3. Emails > Email Settings*).
|
|
538
|
+
# Returns `400` until one is verified. The email is accepted for delivery.
|
|
532
539
|
sig do
|
|
533
540
|
params(
|
|
534
541
|
participant_id_or_email: String,
|
|
@@ -569,7 +576,8 @@ module GrowsurfRuby
|
|
|
569
576
|
)
|
|
570
577
|
end
|
|
571
578
|
|
|
572
|
-
# Returns a participant's activity logs, most recent first (offset/limit
|
|
579
|
+
# Returns a participant's activity logs, most recent first (offset/limit
|
|
580
|
+
# paginated).
|
|
573
581
|
sig do
|
|
574
582
|
params(
|
|
575
583
|
participant_id_or_email: String,
|
|
@@ -595,8 +603,9 @@ module GrowsurfRuby
|
|
|
595
603
|
end
|
|
596
604
|
|
|
597
605
|
# Retrieves analytics for a single participant — all-time engagement counters,
|
|
598
|
-
# leaderboard ranks, and per-channel share counts (plus affiliate money metrics
|
|
599
|
-
# affiliate programs). Useful for segmenting and re-engaging participants.
|
|
606
|
+
# leaderboard ranks, and per-channel share counts (plus affiliate money metrics
|
|
607
|
+
# for affiliate programs). Useful for segmenting and re-engaging participants.
|
|
608
|
+
# Pass `include=series` to also get this participant's own activity over time.
|
|
600
609
|
sig do
|
|
601
610
|
params(
|
|
602
611
|
participant_id_or_email: String,
|
|
@@ -23,8 +23,9 @@ module GrowsurfRuby
|
|
|
23
23
|
)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
# Approves a manually approved reward earned by a participant.
|
|
27
|
-
# `reward:write`.
|
|
26
|
+
# Approves a manually approved reward earned by a participant. This requires
|
|
27
|
+
# `reward:write`. When the request also sets `fulfill` to `true`, it additionally
|
|
28
|
+
# requires `reward:fulfill`.
|
|
28
29
|
sig do
|
|
29
30
|
params(
|
|
30
31
|
reward_id: String,
|
|
@@ -44,7 +45,7 @@ module GrowsurfRuby
|
|
|
44
45
|
)
|
|
45
46
|
end
|
|
46
47
|
|
|
47
|
-
# Marks an approved participant reward as fulfilled.
|
|
48
|
+
# Marks an approved participant reward as fulfilled.
|
|
48
49
|
sig do
|
|
49
50
|
params(
|
|
50
51
|
reward_id: String,
|
|
@@ -4,7 +4,9 @@ module GrowsurfRuby
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Campaign
|
|
6
6
|
class Rewards
|
|
7
|
-
# Retrieves the
|
|
7
|
+
# Retrieves the list of a program's configured rewards (`CampaignReward`s) — the
|
|
8
|
+
# same set embedded in the `rewards` array of the campaign response. Delete a
|
|
9
|
+
# reward with `DELETE /campaign/{id}/reward-configs/{campaignRewardId}`.
|
|
8
10
|
sig do
|
|
9
11
|
params(
|
|
10
12
|
id: String,
|
|
@@ -18,8 +20,11 @@ module GrowsurfRuby
|
|
|
18
20
|
)
|
|
19
21
|
end
|
|
20
22
|
|
|
21
|
-
# Creates a
|
|
22
|
-
# program type
|
|
23
|
+
# Creates a new campaign reward (`CampaignReward`) with a GrowSurf-assigned ID.
|
|
24
|
+
# The reward type must be compatible with the program type (affiliate programs
|
|
25
|
+
# support only `AFFILIATE` rewards; referral programs support all other types).
|
|
26
|
+
# Enabling an active reward of a type automatically enables that reward type on
|
|
27
|
+
# the program.
|
|
23
28
|
sig do
|
|
24
29
|
params(
|
|
25
30
|
id: String,
|
|
@@ -112,8 +117,11 @@ module GrowsurfRuby
|
|
|
112
117
|
)
|
|
113
118
|
end
|
|
114
119
|
|
|
115
|
-
# Updates an existing campaign reward.
|
|
116
|
-
#
|
|
120
|
+
# Updates an existing campaign reward (`CampaignReward`). The reward `type` is
|
|
121
|
+
# immutable and cannot be changed. When the update replaces `metadata`, renamed
|
|
122
|
+
# keys automatically rewrite any `{{campaignReward[…]}}` references in campaign
|
|
123
|
+
# copy; removing a key that campaign copy still references returns a `409` listing
|
|
124
|
+
# the referencing fields.
|
|
117
125
|
sig do
|
|
118
126
|
params(
|
|
119
127
|
campaign_reward_id: String,
|
|
@@ -205,7 +213,11 @@ module GrowsurfRuby
|
|
|
205
213
|
)
|
|
206
214
|
end
|
|
207
215
|
|
|
208
|
-
# Deletes a campaign reward.
|
|
216
|
+
# Deletes a campaign reward (`CampaignReward`). The reward is deactivated, removed
|
|
217
|
+
# from the program's reward set, and any connected upfront-discount coupons are
|
|
218
|
+
# cleaned up. If campaign copy still references any of the reward's metadata keys
|
|
219
|
+
# via `{{campaignReward[…]}}` tokens, the delete returns a `409` listing the
|
|
220
|
+
# referencing fields — update those fields first.
|
|
209
221
|
sig do
|
|
210
222
|
params(
|
|
211
223
|
campaign_reward_id: String,
|
|
@@ -61,10 +61,8 @@ module GrowsurfRuby
|
|
|
61
61
|
def list(request_options: {})
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
# Creates a program
|
|
65
|
-
#
|
|
66
|
-
# (design, emails, options, installation) is not accepted here — configure it via
|
|
67
|
-
# the config sub-resources after the program is created.
|
|
64
|
+
# Creates a new program, plus any optional program rewards. The new program is
|
|
65
|
+
# created in `DRAFT` status and owned by the API key's bound team.
|
|
68
66
|
sig do
|
|
69
67
|
params(
|
|
70
68
|
type: GrowsurfRuby::CampaignCreateParams::Type::OrSymbol,
|
|
@@ -92,10 +90,11 @@ module GrowsurfRuby
|
|
|
92
90
|
)
|
|
93
91
|
end
|
|
94
92
|
|
|
95
|
-
# Updates a program's identity and lifecycle. Only the fields you send are
|
|
96
|
-
# `type`, `urlId`, and `currencyISO` are immutable. Editor-tab
|
|
97
|
-
# options, installation) is edited via the
|
|
98
|
-
# here.
|
|
93
|
+
# Updates a program's identity and lifecycle. Only the fields you send are
|
|
94
|
+
# changed. `type`, `urlId`, and `currencyISO` are immutable. Editor-tab
|
|
95
|
+
# configuration (design, emails, options, installation) is edited via the
|
|
96
|
+
# dedicated config sub-resources, not here. The program cannot be deleted via this
|
|
97
|
+
# endpoint.
|
|
99
98
|
sig do
|
|
100
99
|
params(
|
|
101
100
|
id: String,
|
|
@@ -122,7 +121,8 @@ module GrowsurfRuby
|
|
|
122
121
|
)
|
|
123
122
|
end
|
|
124
123
|
|
|
125
|
-
# Clones an existing program
|
|
124
|
+
# Clones an existing program into a new `DRAFT` program. Integrations and
|
|
125
|
+
# credentials are not copied; active rewards are cloned.
|
|
126
126
|
sig do
|
|
127
127
|
params(
|
|
128
128
|
id: String,
|
|
@@ -179,7 +179,8 @@ module GrowsurfRuby
|
|
|
179
179
|
)
|
|
180
180
|
end
|
|
181
181
|
|
|
182
|
-
# Retrieves a paged list of all participant
|
|
182
|
+
# **Affiliate programs only.** Retrieves a paged list of all participant
|
|
183
|
+
# commissions in an affiliate program.
|
|
183
184
|
sig do
|
|
184
185
|
params(
|
|
185
186
|
id: String,
|
|
@@ -249,7 +250,8 @@ module GrowsurfRuby
|
|
|
249
250
|
)
|
|
250
251
|
end
|
|
251
252
|
|
|
252
|
-
# Retrieves a paged list of all participant payouts
|
|
253
|
+
# **Affiliate programs only.** Retrieves a paged list of all participant payouts
|
|
254
|
+
# in an affiliate program.
|
|
253
255
|
sig do
|
|
254
256
|
params(
|
|
255
257
|
id: String,
|
|
@@ -313,7 +315,9 @@ module GrowsurfRuby
|
|
|
313
315
|
)
|
|
314
316
|
end
|
|
315
317
|
|
|
316
|
-
# Retrieves analytics for a program.
|
|
318
|
+
# Retrieves analytics for a program. Pass `interval` to also get a time-series
|
|
319
|
+
# (`series`) alongside the totals, and `include` to add previous-period totals,
|
|
320
|
+
# status breakdowns, or derived rates — useful for detecting trends over time.
|
|
317
321
|
sig do
|
|
318
322
|
params(
|
|
319
323
|
id: String,
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
4
|
module Resources
|
|
5
5
|
class Team
|
|
6
|
+
# Retrieves the team bound to the API key or OAuth connection.
|
|
7
|
+
# `verificationStatus` is `VERIFIED` once GrowSurf has verified the team, which is
|
|
8
|
+
# required before a program can send participant emails.
|
|
6
9
|
sig do
|
|
7
10
|
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
8
11
|
GrowsurfRuby::Models::Team
|
|
@@ -11,6 +14,9 @@ module GrowsurfRuby
|
|
|
11
14
|
def retrieve(request_options: {})
|
|
12
15
|
end
|
|
13
16
|
|
|
17
|
+
# Updates the name of the team bound to the API key or OAuth connection. Any other
|
|
18
|
+
# property is rejected with a `400`. Personal profiles, billing, and team
|
|
19
|
+
# ownership are not editable here.
|
|
14
20
|
sig do
|
|
15
21
|
params(
|
|
16
22
|
name: String,
|
|
@@ -20,6 +26,15 @@ module GrowsurfRuby
|
|
|
20
26
|
def update(name:, request_options: {})
|
|
21
27
|
end
|
|
22
28
|
|
|
29
|
+
# Generates a new API key and makes the key used on this request stop working when
|
|
30
|
+
# rotation succeeds. Send a unique, random `Idempotency-Key`. If the response is
|
|
31
|
+
# interrupted, immediately retry with the original API key and the same
|
|
32
|
+
# `Idempotency-Key` to receive the same new key. Update every integration that
|
|
33
|
+
# used the old key. The team owner is notified by email whenever the key is
|
|
34
|
+
# rotated. GrowSurf SDKs generate the idempotency key automatically. This endpoint
|
|
35
|
+
# accepts an API key with `api_key:rotate`. If this scope is unavailable, rotate
|
|
36
|
+
# the key in the authenticated dashboard instead. This operation is available only
|
|
37
|
+
# through the REST API or a GrowSurf API SDK, not through MCP.
|
|
23
38
|
sig do
|
|
24
39
|
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
25
40
|
GrowsurfRuby::Models::TeamRotateAPIKeyResponse
|
|
@@ -28,6 +43,9 @@ module GrowsurfRuby
|
|
|
28
43
|
def rotate_api_key(request_options: {})
|
|
29
44
|
end
|
|
30
45
|
|
|
46
|
+
# Requests GrowSurf to verify the bound team (required before a program can email
|
|
47
|
+
# its participants). Idempotent — calling it again while a request is pending does
|
|
48
|
+
# not create a duplicate. Returns the team with its updated `verificationStatus`.
|
|
31
49
|
sig do
|
|
32
50
|
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
33
51
|
GrowsurfRuby::Models::Team
|
|
@@ -36,6 +54,11 @@ module GrowsurfRuby
|
|
|
36
54
|
def request_verification(request_options: {})
|
|
37
55
|
end
|
|
38
56
|
|
|
57
|
+
# Resends the email-verification message to the bound team's owner. The response
|
|
58
|
+
# never reveals the owner's email address. A `200` with `status: SENT` is returned
|
|
59
|
+
# only when an email was actually dispatched. Returns `400` if the email is
|
|
60
|
+
# already verified, and `429` if a verification email was sent too recently — wait
|
|
61
|
+
# a moment, then retry.
|
|
39
62
|
sig do
|
|
40
63
|
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
41
64
|
GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: growsurf-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Growsurf
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|