growsurf-ruby 1.12.0 → 1.13.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 +17 -0
- data/README.md +4 -4
- data/SECURITY.md +4 -14
- data/lib/growsurf_ruby/internal/transport/base_client.rb +1 -1
- data/lib/growsurf_ruby/models/campaign/create.rb +10 -1
- data/lib/growsurf_ruby/models/campaign/language.rb +31 -0
- data/lib/growsurf_ruby/models/campaign/participant.rb +11 -1
- data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +11 -1
- data/lib/growsurf_ruby/resources/campaign/design.rb +4 -0
- data/lib/growsurf_ruby/resources/campaign/emails.rb +4 -0
- data/lib/growsurf_ruby/resources/campaign/installation.rb +4 -0
- data/lib/growsurf_ruby/resources/campaign/options.rb +12 -4
- data/lib/growsurf_ruby/resources/campaign/participant.rb +7 -3
- data/lib/growsurf_ruby/resources/campaign/reward.rb +3 -3
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +5 -0
- data/lib/growsurf_ruby/resources/campaign.rb +8 -1
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +1 -0
- data/rbi/growsurf_ruby/models/campaign/create.rbi +15 -0
- data/rbi/growsurf_ruby/models/campaign/language.rbi +40 -0
- data/rbi/growsurf_ruby/models/campaign/participant.rbi +19 -0
- data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +12 -0
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +4 -0
- data/rbi/growsurf_ruby/resources/campaign/emails.rbi +4 -0
- data/rbi/growsurf_ruby/resources/campaign/installation.rbi +4 -0
- data/rbi/growsurf_ruby/resources/campaign/options.rbi +12 -4
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +9 -0
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +5 -0
- data/rbi/growsurf_ruby/resources/campaign.rbi +9 -0
- data/sig/growsurf_ruby/models/campaign/create.rbs +9 -0
- data/sig/growsurf_ruby/models/campaign/language.rbs +42 -0
- data/sig/growsurf_ruby/models/campaign/participant.rbs +9 -0
- data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +5 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +2 -0
- data/sig/growsurf_ruby/resources/campaign.rbs +1 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6d2dc9919ceef21fe534f95e3b51189b4801902cb7d5b5e930145c3b38ab6d6
|
|
4
|
+
data.tar.gz: 0e63f2406c0c7767ea0fc0b22244ce13da2de1b93a34b1e19bc484de2fd72d02
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 223dd14d46675ed5fa185c8b75815d50eed2221bde317f2dbb20d11ba35f6d1d33b363af1e6a3b93c17bd0e9f080aa8443029db3dd25b6d9765a3e33545c4c30
|
|
7
|
+
data.tar.gz: d2d3d0de619f63a1786e63283d17ce998355e2834d1c976034ee579e502474a9951b989198cd99484abc988fe077e9ea35994124b75948f80c0be2da70810495
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.13.1](https://github.com/growsurf/growsurf-ruby/compare/v1.13.0...v1.13.1) (2026-10-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Documentation
|
|
7
|
+
|
|
8
|
+
* note Business plan covers any language change while languages are on ([10cb2ca](https://github.com/growsurf/growsurf-ruby/commit/10cb2ca8522e15e509b7a31774a7da0571859ebc))
|
|
9
|
+
* sync SDK comments with the REST API contract ([28ab4fd](https://github.com/growsurf/growsurf-ruby/commit/28ab4fddd5f58bb2234d018f10afdda047df3c00))
|
|
10
|
+
* sync SDK guidance with the REST API contract ([d2e01f5](https://github.com/growsurf/growsurf-ruby/commit/d2e01f53d729d54220b56c766160f15ff19e14d0))
|
|
11
|
+
|
|
12
|
+
## [1.13.0](https://github.com/growsurf/growsurf-ruby/compare/v1.12.0...v1.13.0) (2026-10-09)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add program and participant language support ([22ddc3e](https://github.com/growsurf/growsurf-ruby/commit/22ddc3e0b9ea5c63be36d5ebc1ffb49730712197))
|
|
18
|
+
* add program languages and update SDK maintenance guidance ([d7a8ec1](https://github.com/growsurf/growsurf-ruby/commit/d7a8ec1f4f0ef0ed4918312ba9ac6d698da2667c))
|
|
19
|
+
|
|
3
20
|
## [1.12.0](https://github.com/growsurf/growsurf-ruby/compare/v1.11.0...v1.12.0) (2026-10-07)
|
|
4
21
|
|
|
5
22
|
|
data/README.md
CHANGED
|
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
17
17
|
<!-- x-release-please-start-version -->
|
|
18
18
|
|
|
19
19
|
```ruby
|
|
20
|
-
gem "growsurf-ruby", "~> 1.
|
|
20
|
+
gem "growsurf-ruby", "~> 1.13.1"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
<!-- x-release-please-end -->
|
|
@@ -130,7 +130,7 @@ All parameter and response objects inherit from `GrowsurfRuby::Internal::Type::B
|
|
|
130
130
|
|
|
131
131
|
You can send undocumented parameters to any endpoint, and read undocumented response properties, like so:
|
|
132
132
|
|
|
133
|
-
Note: the `extra_` parameters of the same name
|
|
133
|
+
Note: the `extra_` parameters of the same name override the documented parameters.
|
|
134
134
|
|
|
135
135
|
```ruby
|
|
136
136
|
campaigns =
|
|
@@ -165,7 +165,7 @@ response = client.request(
|
|
|
165
165
|
|
|
166
166
|
### Concurrency & connection pooling
|
|
167
167
|
|
|
168
|
-
The `GrowsurfRuby::Client` instances are threadsafe, but are only
|
|
168
|
+
The `GrowsurfRuby::Client` instances are threadsafe, but are only fork-safe when there are no in-flight HTTP requests.
|
|
169
169
|
|
|
170
170
|
Each instance of `GrowsurfRuby::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.
|
|
171
171
|
|
|
@@ -196,7 +196,7 @@ growsurf.campaign.list(**params)
|
|
|
196
196
|
|
|
197
197
|
### Enums
|
|
198
198
|
|
|
199
|
-
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols"
|
|
199
|
+
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols", which are always primitives at runtime:
|
|
200
200
|
|
|
201
201
|
```ruby
|
|
202
202
|
# :CREDIT_PENDING
|
data/SECURITY.md
CHANGED
|
@@ -2,22 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Reporting Security Issues
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
To report a security issue, please contact the Stainless team at security@stainless.com.
|
|
5
|
+
GrowSurf maintains this SDK. If you believe you have found a security vulnerability in it, please report it to support@growsurf.com rather than opening a public issue.
|
|
8
6
|
|
|
9
7
|
## Responsible Disclosure
|
|
10
8
|
|
|
11
|
-
We appreciate the efforts of security researchers
|
|
12
|
-
SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible
|
|
13
|
-
disclosure practices by allowing us a reasonable amount of time to investigate and address the issue
|
|
14
|
-
before making any information public.
|
|
15
|
-
|
|
16
|
-
## Reporting Non-SDK Related Security Issues
|
|
17
|
-
|
|
18
|
-
If you encounter security issues that are not directly related to SDKs but pertain to the services
|
|
19
|
-
or products provided by Growsurf, please follow the respective company's security reporting guidelines.
|
|
9
|
+
Please give us a reasonable amount of time to investigate and address the issue before making any information public. We appreciate the efforts of security researchers who help keep this SDK and the systems it talks to secure.
|
|
20
10
|
|
|
21
|
-
|
|
11
|
+
## Other GrowSurf Security Issues
|
|
22
12
|
|
|
23
|
-
|
|
13
|
+
For security issues in GrowSurf products or services that are not related to this SDK, contact support@growsurf.com as well.
|
|
@@ -117,7 +117,7 @@ module GrowsurfRuby
|
|
|
117
117
|
|
|
118
118
|
case [url.scheme, location.scheme]
|
|
119
119
|
in ["https", "http"]
|
|
120
|
-
message = "Tried to redirect to
|
|
120
|
+
message = "Tried to redirect to an insecure URL"
|
|
121
121
|
raise GrowsurfRuby::Errors::APIConnectionError.new(
|
|
122
122
|
url: url,
|
|
123
123
|
response: response_headers,
|
|
@@ -33,6 +33,13 @@ module GrowsurfRuby
|
|
|
33
33
|
# @return [Boolean, nil]
|
|
34
34
|
optional :is_affiliate, GrowsurfRuby::Internal::Type::Boolean, api_name: :isAffiliate
|
|
35
35
|
|
|
36
|
+
# @!attribute language
|
|
37
|
+
# The language of the participant's portal and program emails. Must be one of the
|
|
38
|
+
# program's languages. Applied only when this request creates the participant.
|
|
39
|
+
#
|
|
40
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::Language, nil]
|
|
41
|
+
optional :language, enum: -> { GrowsurfRuby::Campaign::Language }
|
|
42
|
+
|
|
36
43
|
# @!attribute last_name
|
|
37
44
|
#
|
|
38
45
|
# @return [String, nil]
|
|
@@ -69,7 +76,7 @@ module GrowsurfRuby
|
|
|
69
76
|
# @return [String, nil]
|
|
70
77
|
optional :referred_by, String, api_name: :referredBy
|
|
71
78
|
|
|
72
|
-
# @!method initialize(email:, fingerprint: nil, first_name: nil, ip_address: nil, is_affiliate: nil, last_name: nil, metadata: nil, mobile_instance_id: nil, referral_status: nil, referred_by: nil)
|
|
79
|
+
# @!method initialize(email:, fingerprint: nil, first_name: nil, ip_address: nil, is_affiliate: nil, language: nil, last_name: nil, metadata: nil, mobile_instance_id: nil, referral_status: nil, referred_by: nil)
|
|
73
80
|
# Some parameter documentations has been truncated, see
|
|
74
81
|
# {GrowsurfRuby::Models::Campaign::Create} for more details.
|
|
75
82
|
#
|
|
@@ -83,6 +90,8 @@ module GrowsurfRuby
|
|
|
83
90
|
#
|
|
84
91
|
# @param is_affiliate [Boolean] Affiliate programs only. Controls affiliate enrollment for a new participant.
|
|
85
92
|
#
|
|
93
|
+
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails. Must be one of the
|
|
94
|
+
#
|
|
86
95
|
# @param last_name [String]
|
|
87
96
|
#
|
|
88
97
|
# @param metadata [Hash{Symbol=>Object}] Shallow custom metadata object.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# A language a program can run in. Participants see the portal and receive
|
|
7
|
+
# program emails in their language.
|
|
8
|
+
module Language
|
|
9
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
10
|
+
|
|
11
|
+
EN = :en
|
|
12
|
+
ES = :es
|
|
13
|
+
FR = :fr
|
|
14
|
+
DE = :de
|
|
15
|
+
IT = :it
|
|
16
|
+
PT_BR = :"pt-BR"
|
|
17
|
+
NL = :nl
|
|
18
|
+
PL = :pl
|
|
19
|
+
SV = :sv
|
|
20
|
+
TR = :tr
|
|
21
|
+
JA = :ja
|
|
22
|
+
KO = :ko
|
|
23
|
+
ZH_CN = :"zh-CN"
|
|
24
|
+
ID = :id
|
|
25
|
+
|
|
26
|
+
# @!method self.values
|
|
27
|
+
# @return [Array<Symbol>]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -130,6 +130,14 @@ module GrowsurfRuby
|
|
|
130
130
|
# @return [Boolean, nil]
|
|
131
131
|
optional :is_winner, GrowsurfRuby::Internal::Type::Boolean, api_name: :isWinner
|
|
132
132
|
|
|
133
|
+
# @!attribute language
|
|
134
|
+
# The language of the participant's portal and program emails. The program's base
|
|
135
|
+
# language unless the participant (or you) picked another of the program's
|
|
136
|
+
# languages.
|
|
137
|
+
#
|
|
138
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::Language, nil]
|
|
139
|
+
optional :language, enum: -> { GrowsurfRuby::Campaign::Language }
|
|
140
|
+
|
|
133
141
|
# @!attribute last_name
|
|
134
142
|
#
|
|
135
143
|
# @return [String, nil]
|
|
@@ -256,7 +264,7 @@ module GrowsurfRuby
|
|
|
256
264
|
# @return [Array<String>, nil]
|
|
257
265
|
optional :vanity_keys, GrowsurfRuby::Internal::Type::ArrayOf[String], api_name: :vanityKeys
|
|
258
266
|
|
|
259
|
-
# @!method initialize(id:, email:, monthly_rank:, monthly_referral_count:, rank:, referral_count:, rewards:, share_url: nil, affiliate_enrollment_source: nil, affiliate_status: nil, all_matching_fraudsters: nil, created_at: nil, fingerprint: nil, first_name: nil, fraud_reason_code: nil, fraud_risk_level: nil, impression_count: nil, invite_count: nil, ip_address: nil, is_affiliate: nil, is_new: nil, is_winner: nil, last_name: nil, lead_count: nil, metadata: nil, mobile_instance_id: nil, monthly_referrals: nil, notes: nil, payout_settings: nil, paypal_email_address: nil, prev_monthly_rank: nil, prev_monthly_referral_count: nil, referrals: nil, referral_source: nil, referral_status: nil, referred_by: nil, referrer: nil, share_count: nil, unique_impression_count: nil, unread_commissions_count: nil, unread_payouts_count: nil, unsubscribed: nil, vanity_keys: nil)
|
|
267
|
+
# @!method initialize(id:, email:, monthly_rank:, monthly_referral_count:, rank:, referral_count:, rewards:, share_url: nil, affiliate_enrollment_source: nil, affiliate_status: nil, all_matching_fraudsters: nil, created_at: nil, fingerprint: nil, first_name: nil, fraud_reason_code: nil, fraud_risk_level: nil, impression_count: nil, invite_count: nil, ip_address: nil, is_affiliate: nil, is_new: nil, is_winner: nil, language: nil, last_name: nil, lead_count: nil, metadata: nil, mobile_instance_id: nil, monthly_referrals: nil, notes: nil, payout_settings: nil, paypal_email_address: nil, prev_monthly_rank: nil, prev_monthly_referral_count: nil, referrals: nil, referral_source: nil, referral_status: nil, referred_by: nil, referrer: nil, share_count: nil, unique_impression_count: nil, unread_commissions_count: nil, unread_payouts_count: nil, unsubscribed: nil, vanity_keys: nil)
|
|
260
268
|
# Some parameter documentations has been truncated, see
|
|
261
269
|
# {GrowsurfRuby::Models::Campaign::CampaignParticipant} for more details.
|
|
262
270
|
#
|
|
@@ -305,6 +313,8 @@ module GrowsurfRuby
|
|
|
305
313
|
#
|
|
306
314
|
# @param is_winner [Boolean]
|
|
307
315
|
#
|
|
316
|
+
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails. The program's base
|
|
317
|
+
#
|
|
308
318
|
# @param last_name [String, nil]
|
|
309
319
|
#
|
|
310
320
|
# @param lead_count [Integer] The number of pending referrals the participant made that have not converted
|
|
@@ -38,6 +38,14 @@ module GrowsurfRuby
|
|
|
38
38
|
# @return [String, nil]
|
|
39
39
|
optional :first_name, String, api_name: :firstName
|
|
40
40
|
|
|
41
|
+
# @!attribute language
|
|
42
|
+
# The language of the participant's portal and program emails. Must be one of the
|
|
43
|
+
# program's languages (see `languages` in the program options). Send the base
|
|
44
|
+
# language or `null` to use the program's base language.
|
|
45
|
+
#
|
|
46
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::Language, nil]
|
|
47
|
+
optional :language, enum: -> { GrowsurfRuby::Campaign::Language }, nil?: true
|
|
48
|
+
|
|
41
49
|
# @!attribute last_name
|
|
42
50
|
#
|
|
43
51
|
# @return [String, nil]
|
|
@@ -78,7 +86,7 @@ module GrowsurfRuby
|
|
|
78
86
|
# @return [Array<String>, nil]
|
|
79
87
|
optional :vanity_keys, GrowsurfRuby::Internal::Type::ArrayOf[String], api_name: :vanityKeys
|
|
80
88
|
|
|
81
|
-
# @!method initialize(id:, participant_id_or_email:, affiliate_status: nil, email: nil, first_name: nil, last_name: nil, metadata: nil, notes: nil, referral_status: nil, referred_by: nil, unsubscribed: nil, vanity_keys: nil, request_options: {})
|
|
89
|
+
# @!method initialize(id:, participant_id_or_email:, affiliate_status: nil, email: nil, first_name: nil, language: nil, last_name: nil, metadata: nil, notes: nil, referral_status: nil, referred_by: nil, unsubscribed: nil, vanity_keys: nil, request_options: {})
|
|
82
90
|
# Some parameter documentations has been truncated, see
|
|
83
91
|
# {GrowsurfRuby::Models::Campaign::ParticipantUpdateParams} for more details.
|
|
84
92
|
#
|
|
@@ -92,6 +100,8 @@ module GrowsurfRuby
|
|
|
92
100
|
#
|
|
93
101
|
# @param first_name [String]
|
|
94
102
|
#
|
|
103
|
+
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language, nil] The language of the participant's portal and program emails. Must be one of the
|
|
104
|
+
#
|
|
95
105
|
# @param last_name [String]
|
|
96
106
|
#
|
|
97
107
|
# @param metadata [Hash{Symbol=>Object}] Shallow custom metadata object.
|
|
@@ -44,6 +44,10 @@ module GrowsurfRuby
|
|
|
44
44
|
# anything you leave out is untouched (arrays such as `signup.fields` replace wholesale).
|
|
45
45
|
# Unknown fields, fields not available for the program type, and invalid values return a
|
|
46
46
|
# `400`. Landing-page custom code and JavaScript are not editable via the API.
|
|
47
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
48
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
49
|
+
# response saves the change. A concurrent edit can return `409`; reload the
|
|
50
|
+
# program before retrying.
|
|
47
51
|
#
|
|
48
52
|
# @overload update(id, body, request_options: {})
|
|
49
53
|
#
|
|
@@ -39,6 +39,10 @@ module GrowsurfRuby
|
|
|
39
39
|
# available for the program type returns a `400`. Some fields are read-only
|
|
40
40
|
# (`settings.sender.fromEmail`, whose custom value requires dashboard domain
|
|
41
41
|
# verification).
|
|
42
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
43
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
44
|
+
# response saves the change. A concurrent edit can return `409`; reload the
|
|
45
|
+
# program before retrying.
|
|
42
46
|
#
|
|
43
47
|
# @overload update(id, body, request_options: {})
|
|
44
48
|
#
|
|
@@ -32,6 +32,10 @@ module GrowsurfRuby
|
|
|
32
32
|
# enabling `mobile.isEnabled` creates one. Changing `shareUrl` re-resolves its
|
|
33
33
|
# redirect destinations, which may take a moment to complete. URLs must include an
|
|
34
34
|
# explicit `http://` or `https://` scheme.
|
|
35
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
36
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
37
|
+
# response saves the change. A concurrent edit can return `409`; reload the
|
|
38
|
+
# program before retrying.
|
|
35
39
|
#
|
|
36
40
|
# @overload update(id, body, request_options: {})
|
|
37
41
|
#
|
|
@@ -5,10 +5,11 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
class Options
|
|
7
7
|
# Retrieves a program's options — the same surface as the dashboard Program
|
|
8
|
-
# Editor's **Options** tab. Includes reward/fraud approval,
|
|
9
|
-
# toggles, referral cookie/credit windows, reCAPTCHA, affiliate
|
|
10
|
-
# application review, payout threshold + tax settings (affiliate
|
|
11
|
-
# notification-email settings
|
|
8
|
+
# Editor's **Options** tab. Includes the attribution model, reward/fraud approval,
|
|
9
|
+
# anti-fraud lists + toggles, referral cookie/credit windows, reCAPTCHA, affiliate
|
|
10
|
+
# enrollment + application review, payout threshold + tax settings (affiliate
|
|
11
|
+
# only), notification-email settings, and the program's languages.
|
|
12
|
+
# `fraud.recaptcha.secretKey` is never returned.
|
|
12
13
|
#
|
|
13
14
|
# @overload retrieve(id, request_options: {})
|
|
14
15
|
#
|
|
@@ -32,6 +33,13 @@ module GrowsurfRuby
|
|
|
32
33
|
# and `payoutThreshold`/`taxDocumentation` are affiliate-only, and affiliate
|
|
33
34
|
# programs require `requireParticipantAuth: true`). `fraud.recaptcha.secretKey`
|
|
34
35
|
# is write-only. `referralCreditWindowDays: null` means "never expires".
|
|
36
|
+
# Turning on `languages.additionalLanguages` requires the Business plan or
|
|
37
|
+
# higher. While any are on, every `languages` change, including turning them
|
|
38
|
+
# off, requires it too (`403` otherwise).
|
|
39
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
40
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
41
|
+
# response saves the change. A concurrent edit can return `409`; reload the
|
|
42
|
+
# program before retrying.
|
|
35
43
|
#
|
|
36
44
|
# @overload update(id, body, request_options: {})
|
|
37
45
|
#
|
|
@@ -37,7 +37,7 @@ module GrowsurfRuby
|
|
|
37
37
|
# require an existing affiliate. This endpoint does not accept `isAffiliate`, and
|
|
38
38
|
# affiliate enrollment cannot be removed through REST.
|
|
39
39
|
#
|
|
40
|
-
# @overload update(participant_id_or_email, id:, affiliate_status: nil, email: nil, first_name: nil, last_name: nil, metadata: nil, notes: nil, referral_status: nil, referred_by: nil, unsubscribed: nil, vanity_keys: nil, request_options: {})
|
|
40
|
+
# @overload update(participant_id_or_email, id:, affiliate_status: nil, email: nil, first_name: nil, language: nil, last_name: nil, metadata: nil, notes: nil, referral_status: nil, referred_by: nil, unsubscribed: nil, vanity_keys: nil, request_options: {})
|
|
41
41
|
#
|
|
42
42
|
# @param participant_id_or_email [String] Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
43
43
|
#
|
|
@@ -49,6 +49,8 @@ module GrowsurfRuby
|
|
|
49
49
|
#
|
|
50
50
|
# @param first_name [String] Body param
|
|
51
51
|
#
|
|
52
|
+
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language, nil] Body param: The language of the participant's portal and program emails. Must be one of the program's languages (see `languages` in the program options). Send the base language or `null` to use the program's base language.
|
|
53
|
+
#
|
|
52
54
|
# @param last_name [String] Body param
|
|
53
55
|
#
|
|
54
56
|
# @param metadata [Hash{Symbol=>Object}] Body param: Shallow custom metadata object.
|
|
@@ -155,7 +157,7 @@ module GrowsurfRuby
|
|
|
155
157
|
# `isAffiliate: true` to keep the referral attribution and enroll the participant
|
|
156
158
|
# as an affiliate.
|
|
157
159
|
#
|
|
158
|
-
# @overload add(id, email:, fingerprint: nil, first_name: nil, ip_address: nil, is_affiliate: nil, last_name: nil, metadata: nil, mobile_instance_id: nil, referral_status: nil, referred_by: nil, request_options: {})
|
|
160
|
+
# @overload add(id, email:, fingerprint: nil, first_name: nil, ip_address: nil, is_affiliate: nil, language: nil, last_name: nil, metadata: nil, mobile_instance_id: nil, referral_status: nil, referred_by: nil, request_options: {})
|
|
159
161
|
#
|
|
160
162
|
# @param id [String] GrowSurf program ID.
|
|
161
163
|
#
|
|
@@ -169,6 +171,8 @@ module GrowsurfRuby
|
|
|
169
171
|
#
|
|
170
172
|
# @param is_affiliate [Boolean] Affiliate programs only. Controls affiliate enrollment for a new participant. `true` enrolls the participant with `affiliateStatus: APPROVED`; `false` creates a non-affiliate without `affiliateStatus`. Existing participants are returned unchanged.
|
|
171
173
|
#
|
|
174
|
+
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails. Must be one of the program's languages. Applied only when this request creates the participant.
|
|
175
|
+
#
|
|
172
176
|
# @param last_name [String]
|
|
173
177
|
#
|
|
174
178
|
# @param metadata [Hash{Symbol=>Object}] Shallow custom metadata object.
|
|
@@ -607,7 +611,7 @@ module GrowsurfRuby
|
|
|
607
611
|
# name, postal address, and an unsubscribe link are added automatically, and
|
|
608
612
|
# unsubscribed participants are suppressed). Sending requires the team to be
|
|
609
613
|
# verified by GrowSurf. Requires a **verified custom email domain** on the program
|
|
610
|
-
# (which can be completed in *
|
|
614
|
+
# (which can be completed in *Program Editor > 3. Emails > Email Settings*).
|
|
611
615
|
# Returns `400` until one is verified. The email is accepted for delivery.
|
|
612
616
|
#
|
|
613
617
|
# @overload email(participant_id_or_email, id:, body: nil, email_type: nil, preheader: nil, subject: nil, request_options: {})
|
|
@@ -5,8 +5,8 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
# Participant reward retrieval and manual reward operations.
|
|
7
7
|
class Reward
|
|
8
|
-
# Removes a
|
|
9
|
-
# approved.
|
|
8
|
+
# Removes a participant reward that requires manual approval and has not yet
|
|
9
|
+
# been approved.
|
|
10
10
|
#
|
|
11
11
|
# @overload delete(reward_id, id:, request_options: {})
|
|
12
12
|
#
|
|
@@ -33,7 +33,7 @@ module GrowsurfRuby
|
|
|
33
33
|
)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
# Approves a
|
|
36
|
+
# Approves a participant reward that requires manual approval. This requires
|
|
37
37
|
# `reward:write`. When the request also sets `fulfill` to `true`, it additionally
|
|
38
38
|
# requires `reward:fulfill`.
|
|
39
39
|
#
|
|
@@ -31,6 +31,7 @@ module GrowsurfRuby
|
|
|
31
31
|
# Enabling an active reward of a type automatically enables that reward type on
|
|
32
32
|
# the program. For an affiliate reward, `commissionStructure.event: LEAD`
|
|
33
33
|
# requires a `FIXED` commission with a positive `amount`.
|
|
34
|
+
# A concurrent edit can return `409`; reload the program before retrying.
|
|
34
35
|
#
|
|
35
36
|
# @overload create(id, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: 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: {})
|
|
36
37
|
#
|
|
@@ -102,6 +103,10 @@ module GrowsurfRuby
|
|
|
102
103
|
# copy; removing a key that campaign copy still references returns a `409` listing
|
|
103
104
|
# the referencing fields. For an affiliate reward, `commissionStructure.event:
|
|
104
105
|
# LEAD` requires a `FIXED` commission with a positive `amount`.
|
|
106
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
107
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
108
|
+
# response saves the change. A concurrent edit can return `409`; reload the
|
|
109
|
+
# program before retrying.
|
|
105
110
|
#
|
|
106
111
|
# @overload update(campaign_reward_id, id:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: 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: {})
|
|
107
112
|
#
|
|
@@ -124,6 +124,10 @@ module GrowsurfRuby
|
|
|
124
124
|
# configuration (design, emails, options, installation) is edited via the
|
|
125
125
|
# dedicated config sub-resources, not here. The program cannot be deleted via this
|
|
126
126
|
# endpoint.
|
|
127
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
128
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
129
|
+
# response saves the change. A concurrent edit can return `409`; reload the program
|
|
130
|
+
# before retrying.
|
|
127
131
|
#
|
|
128
132
|
# @overload update(id, company_logo_image_url: nil, company_name: nil, name: nil, status: nil, request_options: {})
|
|
129
133
|
#
|
|
@@ -155,6 +159,7 @@ module GrowsurfRuby
|
|
|
155
159
|
|
|
156
160
|
# Clones an existing program into a new `DRAFT` program. Integrations and
|
|
157
161
|
# credentials are not copied; active rewards are cloned.
|
|
162
|
+
# A concurrent edit to the program can return `409`; retry the clone.
|
|
158
163
|
#
|
|
159
164
|
# @overload clone(id, request_options: {})
|
|
160
165
|
#
|
|
@@ -235,7 +240,7 @@ module GrowsurfRuby
|
|
|
235
240
|
# participant endpoints. Use this endpoint from your backend after your mobile app
|
|
236
241
|
# authenticates a signed-in user. The program must have mobile SDK access enabled.
|
|
237
242
|
#
|
|
238
|
-
# @overload create_mobile_participant_token(id, email:, fingerprint: nil, first_name: nil, ip_address: nil, last_name: nil, metadata: nil, mobile_instance_id: nil, referral_status: nil, referred_by: nil, request_options: {})
|
|
243
|
+
# @overload create_mobile_participant_token(id, email:, fingerprint: nil, first_name: nil, ip_address: nil, language: nil, last_name: nil, metadata: nil, mobile_instance_id: nil, referral_status: nil, referred_by: nil, request_options: {})
|
|
239
244
|
#
|
|
240
245
|
# @param id [String] GrowSurf program ID.
|
|
241
246
|
#
|
|
@@ -247,6 +252,8 @@ module GrowsurfRuby
|
|
|
247
252
|
#
|
|
248
253
|
# @param ip_address [String]
|
|
249
254
|
#
|
|
255
|
+
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails. Must be one of the program's languages. Applied only when this request creates the participant.
|
|
256
|
+
#
|
|
250
257
|
# @param last_name [String]
|
|
251
258
|
#
|
|
252
259
|
# @param metadata [Hash{Symbol=>Object}] Shallow custom metadata object.
|
data/lib/growsurf_ruby.rb
CHANGED
|
@@ -65,6 +65,7 @@ require_relative "growsurf_ruby/models/campaign/commission_delete_params"
|
|
|
65
65
|
require_relative "growsurf_ruby/models/campaign/commission_delete_response"
|
|
66
66
|
require_relative "growsurf_ruby/models/campaign/delete_reward_response"
|
|
67
67
|
require_relative "growsurf_ruby/models/campaign/fraud_risk_level"
|
|
68
|
+
require_relative "growsurf_ruby/models/campaign/language"
|
|
68
69
|
require_relative "growsurf_ruby/models/campaign/participant_activity_logs_response"
|
|
69
70
|
require_relative "growsurf_ruby/models/campaign/participant_add_params"
|
|
70
71
|
require_relative "growsurf_ruby/models/campaign/participant_activation_analytics"
|
|
@@ -43,6 +43,16 @@ module GrowsurfRuby
|
|
|
43
43
|
sig { params(is_affiliate: T::Boolean).void }
|
|
44
44
|
attr_writer :is_affiliate
|
|
45
45
|
|
|
46
|
+
# The language of the participant's portal and program emails. Must be one of the
|
|
47
|
+
# program's languages. Applied only when this request creates the participant.
|
|
48
|
+
sig { returns(T.nilable(GrowsurfRuby::Campaign::Language::OrSymbol)) }
|
|
49
|
+
attr_reader :language
|
|
50
|
+
|
|
51
|
+
sig do
|
|
52
|
+
params(language: GrowsurfRuby::Campaign::Language::OrSymbol).void
|
|
53
|
+
end
|
|
54
|
+
attr_writer :language
|
|
55
|
+
|
|
46
56
|
sig { returns(T.nilable(String)) }
|
|
47
57
|
attr_reader :last_name
|
|
48
58
|
|
|
@@ -98,6 +108,7 @@ module GrowsurfRuby
|
|
|
98
108
|
first_name: String,
|
|
99
109
|
ip_address: String,
|
|
100
110
|
is_affiliate: T::Boolean,
|
|
111
|
+
language: GrowsurfRuby::Campaign::Language::OrSymbol,
|
|
101
112
|
last_name: String,
|
|
102
113
|
metadata: T::Hash[Symbol, T.anything],
|
|
103
114
|
mobile_instance_id: String,
|
|
@@ -116,6 +127,9 @@ module GrowsurfRuby
|
|
|
116
127
|
# a non-affiliate without `affiliateStatus`. Existing participants are returned
|
|
117
128
|
# unchanged.
|
|
118
129
|
is_affiliate: nil,
|
|
130
|
+
# The language of the participant's portal and program emails. Must be one of the
|
|
131
|
+
# program's languages. Applied only when this request creates the participant.
|
|
132
|
+
language: nil,
|
|
119
133
|
last_name: nil,
|
|
120
134
|
# Shallow custom metadata object.
|
|
121
135
|
metadata: nil,
|
|
@@ -141,6 +155,7 @@ module GrowsurfRuby
|
|
|
141
155
|
first_name: String,
|
|
142
156
|
ip_address: String,
|
|
143
157
|
is_affiliate: T::Boolean,
|
|
158
|
+
language: GrowsurfRuby::Campaign::Language::OrSymbol,
|
|
144
159
|
last_name: String,
|
|
145
160
|
metadata: T::Hash[Symbol, T.anything],
|
|
146
161
|
mobile_instance_id: String,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# A language a program can run in. Participants see the portal and receive
|
|
7
|
+
# program emails in their language.
|
|
8
|
+
module Language
|
|
9
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
10
|
+
|
|
11
|
+
TaggedSymbol =
|
|
12
|
+
T.type_alias { T.all(Symbol, GrowsurfRuby::Campaign::Language) }
|
|
13
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
14
|
+
|
|
15
|
+
EN = T.let(:en, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
16
|
+
ES = T.let(:es, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
17
|
+
FR = T.let(:fr, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
18
|
+
DE = T.let(:de, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
19
|
+
IT = T.let(:it, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
20
|
+
PT_BR = T.let(:"pt-BR", GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
21
|
+
NL = T.let(:nl, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
22
|
+
PL = T.let(:pl, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
23
|
+
SV = T.let(:sv, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
24
|
+
TR = T.let(:tr, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
25
|
+
JA = T.let(:ja, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
26
|
+
KO = T.let(:ko, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
27
|
+
ZH_CN = T.let(:"zh-CN", GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
28
|
+
ID = T.let(:id, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
T::Array[GrowsurfRuby::Campaign::Language::TaggedSymbol]
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def self.values
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -129,6 +129,19 @@ module GrowsurfRuby
|
|
|
129
129
|
sig { params(is_winner: T::Boolean).void }
|
|
130
130
|
attr_writer :is_winner
|
|
131
131
|
|
|
132
|
+
# The language of the participant's portal and program emails. The program's base
|
|
133
|
+
# language unless the participant (or you) picked another of the program's
|
|
134
|
+
# languages.
|
|
135
|
+
sig do
|
|
136
|
+
returns(T.nilable(GrowsurfRuby::Campaign::Language::TaggedSymbol))
|
|
137
|
+
end
|
|
138
|
+
attr_reader :language
|
|
139
|
+
|
|
140
|
+
sig do
|
|
141
|
+
params(language: GrowsurfRuby::Campaign::Language::OrSymbol).void
|
|
142
|
+
end
|
|
143
|
+
attr_writer :language
|
|
144
|
+
|
|
132
145
|
sig { returns(T.nilable(String)) }
|
|
133
146
|
attr_accessor :last_name
|
|
134
147
|
|
|
@@ -318,6 +331,7 @@ module GrowsurfRuby
|
|
|
318
331
|
is_affiliate: T::Boolean,
|
|
319
332
|
is_new: T::Boolean,
|
|
320
333
|
is_winner: T::Boolean,
|
|
334
|
+
language: GrowsurfRuby::Campaign::Language::OrSymbol,
|
|
321
335
|
last_name: T.nilable(String),
|
|
322
336
|
lead_count: Integer,
|
|
323
337
|
metadata: T::Hash[Symbol, T.anything],
|
|
@@ -377,6 +391,10 @@ module GrowsurfRuby
|
|
|
377
391
|
is_affiliate: nil,
|
|
378
392
|
is_new: nil,
|
|
379
393
|
is_winner: nil,
|
|
394
|
+
# The language of the participant's portal and program emails. The program's base
|
|
395
|
+
# language unless the participant (or you) picked another of the program's
|
|
396
|
+
# languages.
|
|
397
|
+
language: nil,
|
|
380
398
|
last_name: nil,
|
|
381
399
|
# The number of pending referrals the participant made that have not converted
|
|
382
400
|
# into successful referrals yet.
|
|
@@ -436,6 +454,7 @@ module GrowsurfRuby
|
|
|
436
454
|
is_affiliate: T::Boolean,
|
|
437
455
|
is_new: T::Boolean,
|
|
438
456
|
is_winner: T::Boolean,
|
|
457
|
+
language: GrowsurfRuby::Campaign::Language::TaggedSymbol,
|
|
439
458
|
last_name: T.nilable(String),
|
|
440
459
|
lead_count: Integer,
|
|
441
460
|
metadata: T::Hash[Symbol, T.anything],
|
|
@@ -53,6 +53,12 @@ module GrowsurfRuby
|
|
|
53
53
|
sig { params(first_name: String).void }
|
|
54
54
|
attr_writer :first_name
|
|
55
55
|
|
|
56
|
+
# The language of the participant's portal and program emails. Must be one of the
|
|
57
|
+
# program's languages (see `languages` in the program options). Send the base
|
|
58
|
+
# language or `null` to use the program's base language.
|
|
59
|
+
sig { returns(T.nilable(GrowsurfRuby::Campaign::Language::OrSymbol)) }
|
|
60
|
+
attr_accessor :language
|
|
61
|
+
|
|
56
62
|
sig { returns(T.nilable(String)) }
|
|
57
63
|
attr_reader :last_name
|
|
58
64
|
|
|
@@ -117,6 +123,7 @@ module GrowsurfRuby
|
|
|
117
123
|
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol,
|
|
118
124
|
email: String,
|
|
119
125
|
first_name: String,
|
|
126
|
+
language: T.nilable(GrowsurfRuby::Campaign::Language::OrSymbol),
|
|
120
127
|
last_name: String,
|
|
121
128
|
metadata: T::Hash[Symbol, T.anything],
|
|
122
129
|
notes: String,
|
|
@@ -137,6 +144,10 @@ module GrowsurfRuby
|
|
|
137
144
|
affiliate_status: nil,
|
|
138
145
|
email: nil,
|
|
139
146
|
first_name: nil,
|
|
147
|
+
# The language of the participant's portal and program emails. Must be one of the
|
|
148
|
+
# program's languages (see `languages` in the program options). Send the base
|
|
149
|
+
# language or `null` to use the program's base language.
|
|
150
|
+
language: nil,
|
|
140
151
|
last_name: nil,
|
|
141
152
|
# Shallow custom metadata object.
|
|
142
153
|
metadata: nil,
|
|
@@ -160,6 +171,7 @@ module GrowsurfRuby
|
|
|
160
171
|
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol,
|
|
161
172
|
email: String,
|
|
162
173
|
first_name: String,
|
|
174
|
+
language: T.nilable(GrowsurfRuby::Campaign::Language::OrSymbol),
|
|
163
175
|
last_name: String,
|
|
164
176
|
metadata: T::Hash[Symbol, T.anything],
|
|
165
177
|
notes: String,
|
|
@@ -63,6 +63,10 @@ module GrowsurfRuby
|
|
|
63
63
|
# wholesale). Unknown fields, fields not available for the program type, and invalid
|
|
64
64
|
# values return a `400`. Landing-page custom code and JavaScript are not editable via the
|
|
65
65
|
# API.
|
|
66
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
67
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
68
|
+
# response saves the change. A concurrent edit can return `409`; reload the
|
|
69
|
+
# program before retrying.
|
|
66
70
|
sig do
|
|
67
71
|
params(
|
|
68
72
|
id: String,
|
|
@@ -33,6 +33,10 @@ module GrowsurfRuby
|
|
|
33
33
|
# available for the program type returns a `400`. Some fields are read-only
|
|
34
34
|
# (`settings.sender.fromEmail`, whose custom value requires dashboard domain
|
|
35
35
|
# verification).
|
|
36
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
37
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
38
|
+
# response saves the change. A concurrent edit can return `409`; reload the
|
|
39
|
+
# program before retrying.
|
|
36
40
|
sig do
|
|
37
41
|
params(
|
|
38
42
|
id: String,
|
|
@@ -27,6 +27,10 @@ module GrowsurfRuby
|
|
|
27
27
|
# enabling `mobile.isEnabled` creates one. Changing `shareUrl` re-resolves its
|
|
28
28
|
# redirect destinations, which may take a moment to complete. URLs must include an
|
|
29
29
|
# explicit `http://` or `https://` scheme.
|
|
30
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
31
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
32
|
+
# response saves the change. A concurrent edit can return `409`; reload the
|
|
33
|
+
# program before retrying.
|
|
30
34
|
sig do
|
|
31
35
|
params(
|
|
32
36
|
id: String,
|
|
@@ -5,10 +5,11 @@ module GrowsurfRuby
|
|
|
5
5
|
class Campaign
|
|
6
6
|
class Options
|
|
7
7
|
# Retrieves a program's options — the same surface as the dashboard Program
|
|
8
|
-
# Editor's **Options** tab. Includes reward/fraud approval,
|
|
9
|
-
# toggles, referral cookie/credit windows, reCAPTCHA, affiliate
|
|
10
|
-
# application review, payout threshold + tax settings (affiliate
|
|
11
|
-
# notification-email settings
|
|
8
|
+
# Editor's **Options** tab. Includes the attribution model, reward/fraud approval,
|
|
9
|
+
# anti-fraud lists + toggles, referral cookie/credit windows, reCAPTCHA, affiliate
|
|
10
|
+
# enrollment + application review, payout threshold + tax settings (affiliate
|
|
11
|
+
# only), notification-email settings, and the program's languages.
|
|
12
|
+
# `fraud.recaptcha.secretKey` is never returned.
|
|
12
13
|
sig do
|
|
13
14
|
params(
|
|
14
15
|
id: String,
|
|
@@ -28,6 +29,13 @@ module GrowsurfRuby
|
|
|
28
29
|
# and `payoutThreshold`/`taxDocumentation` are affiliate-only, and affiliate
|
|
29
30
|
# programs require `requireParticipantAuth: true`). `fraud.recaptcha.secretKey`
|
|
30
31
|
# is write-only. `referralCreditWindowDays: null` means "never expires".
|
|
32
|
+
# Turning on `languages.additionalLanguages` requires the Business plan or
|
|
33
|
+
# higher. While any are on, every `languages` change, including turning them
|
|
34
|
+
# off, requires it too (`403` otherwise).
|
|
35
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
36
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
37
|
+
# response saves the change. A concurrent edit can return `409`; reload the
|
|
38
|
+
# program before retrying.
|
|
31
39
|
sig do
|
|
32
40
|
params(
|
|
33
41
|
id: String,
|
|
@@ -34,6 +34,7 @@ module GrowsurfRuby
|
|
|
34
34
|
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol,
|
|
35
35
|
email: String,
|
|
36
36
|
first_name: String,
|
|
37
|
+
language: T.nilable(GrowsurfRuby::Campaign::Language::OrSymbol),
|
|
37
38
|
last_name: String,
|
|
38
39
|
metadata: T::Hash[Symbol, T.anything],
|
|
39
40
|
notes: String,
|
|
@@ -58,6 +59,10 @@ module GrowsurfRuby
|
|
|
58
59
|
email: nil,
|
|
59
60
|
# Body param
|
|
60
61
|
first_name: nil,
|
|
62
|
+
# Body param: The language of the participant's portal and program emails. Must be
|
|
63
|
+
# one of the program's languages (see `languages` in the program options). Send the
|
|
64
|
+
# base language or `null` to use the program's base language.
|
|
65
|
+
language: nil,
|
|
61
66
|
# Body param
|
|
62
67
|
last_name: nil,
|
|
63
68
|
# Body param: Shallow custom metadata object.
|
|
@@ -136,6 +141,7 @@ module GrowsurfRuby
|
|
|
136
141
|
first_name: String,
|
|
137
142
|
ip_address: String,
|
|
138
143
|
is_affiliate: T::Boolean,
|
|
144
|
+
language: GrowsurfRuby::Campaign::Language::OrSymbol,
|
|
139
145
|
last_name: String,
|
|
140
146
|
metadata: T::Hash[Symbol, T.anything],
|
|
141
147
|
mobile_instance_id: String,
|
|
@@ -157,6 +163,9 @@ module GrowsurfRuby
|
|
|
157
163
|
# creates a non-affiliate without `affiliateStatus`. Existing participants are
|
|
158
164
|
# returned unchanged.
|
|
159
165
|
is_affiliate: nil,
|
|
166
|
+
# The language of the participant's portal and program emails. Must be one of the
|
|
167
|
+
# program's languages. Applied only when this request creates the participant.
|
|
168
|
+
language: nil,
|
|
160
169
|
last_name: nil,
|
|
161
170
|
# Shallow custom metadata object.
|
|
162
171
|
metadata: nil,
|
|
@@ -27,6 +27,7 @@ module GrowsurfRuby
|
|
|
27
27
|
# Enabling an active reward of a type automatically enables that reward type on
|
|
28
28
|
# the program. For an affiliate reward, `commissionStructure.event: LEAD`
|
|
29
29
|
# requires a `FIXED` commission with a positive `amount`.
|
|
30
|
+
# A concurrent edit can return `409`; reload the program before retrying.
|
|
30
31
|
sig do
|
|
31
32
|
params(
|
|
32
33
|
id: String,
|
|
@@ -134,6 +135,10 @@ module GrowsurfRuby
|
|
|
134
135
|
# copy; removing a key that campaign copy still references returns a `409` listing
|
|
135
136
|
# the referencing fields. For an affiliate reward, `commissionStructure.event:
|
|
136
137
|
# LEAD` requires a `FIXED` commission with a positive `amount`.
|
|
138
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
139
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
140
|
+
# response saves the change. A concurrent edit can return `409`; reload the
|
|
141
|
+
# program before retrying.
|
|
137
142
|
sig do
|
|
138
143
|
params(
|
|
139
144
|
campaign_reward_id: String,
|
|
@@ -110,6 +110,10 @@ module GrowsurfRuby
|
|
|
110
110
|
# configuration (design, emails, options, installation) is edited via the
|
|
111
111
|
# dedicated config sub-resources, not here. The program cannot be deleted via this
|
|
112
112
|
# endpoint.
|
|
113
|
+
# Changes to participant email content are checked before saving. Rejected content
|
|
114
|
+
# returns `400`; if the check is unavailable, `503` asks you to retry. Neither
|
|
115
|
+
# response saves the change. A concurrent edit can return `409`; reload the program
|
|
116
|
+
# before retrying.
|
|
113
117
|
sig do
|
|
114
118
|
params(
|
|
115
119
|
id: String,
|
|
@@ -138,6 +142,7 @@ module GrowsurfRuby
|
|
|
138
142
|
|
|
139
143
|
# Clones an existing program into a new `DRAFT` program. Integrations and
|
|
140
144
|
# credentials are not copied; active rewards are cloned.
|
|
145
|
+
# A concurrent edit to the program can return `409`; retry the clone.
|
|
141
146
|
sig do
|
|
142
147
|
params(
|
|
143
148
|
id: String,
|
|
@@ -209,6 +214,7 @@ module GrowsurfRuby
|
|
|
209
214
|
fingerprint: String,
|
|
210
215
|
first_name: String,
|
|
211
216
|
ip_address: String,
|
|
217
|
+
language: GrowsurfRuby::Campaign::Language::OrSymbol,
|
|
212
218
|
last_name: String,
|
|
213
219
|
metadata: T::Hash[Symbol, T.anything],
|
|
214
220
|
mobile_instance_id: String,
|
|
@@ -227,6 +233,9 @@ module GrowsurfRuby
|
|
|
227
233
|
fingerprint: nil,
|
|
228
234
|
first_name: nil,
|
|
229
235
|
ip_address: nil,
|
|
236
|
+
# The language of the participant's portal and program emails. Must be one of the
|
|
237
|
+
# program's languages. Applied only when this request creates the participant.
|
|
238
|
+
language: nil,
|
|
230
239
|
last_name: nil,
|
|
231
240
|
# Shallow custom metadata object.
|
|
232
241
|
metadata: nil,
|
|
@@ -8,6 +8,7 @@ module GrowsurfRuby
|
|
|
8
8
|
first_name: String,
|
|
9
9
|
ip_address: String,
|
|
10
10
|
is_affiliate: bool,
|
|
11
|
+
language: GrowsurfRuby::Models::Campaign::language,
|
|
11
12
|
last_name: String,
|
|
12
13
|
metadata: ::Hash[Symbol, top],
|
|
13
14
|
mobile_instance_id: String,
|
|
@@ -34,6 +35,12 @@ module GrowsurfRuby
|
|
|
34
35
|
|
|
35
36
|
def is_affiliate=: (bool) -> bool
|
|
36
37
|
|
|
38
|
+
attr_reader language: GrowsurfRuby::Models::Campaign::language?
|
|
39
|
+
|
|
40
|
+
def language=: (
|
|
41
|
+
GrowsurfRuby::Models::Campaign::language
|
|
42
|
+
) -> GrowsurfRuby::Models::Campaign::language
|
|
43
|
+
|
|
37
44
|
attr_reader last_name: String?
|
|
38
45
|
|
|
39
46
|
def last_name=: (String) -> String
|
|
@@ -62,6 +69,7 @@ module GrowsurfRuby
|
|
|
62
69
|
?first_name: String,
|
|
63
70
|
?ip_address: String,
|
|
64
71
|
?is_affiliate: bool,
|
|
72
|
+
?language: GrowsurfRuby::Models::Campaign::language,
|
|
65
73
|
?last_name: String,
|
|
66
74
|
?metadata: ::Hash[Symbol, top],
|
|
67
75
|
?mobile_instance_id: String,
|
|
@@ -75,6 +83,7 @@ module GrowsurfRuby
|
|
|
75
83
|
first_name: String,
|
|
76
84
|
ip_address: String,
|
|
77
85
|
is_affiliate: bool,
|
|
86
|
+
language: GrowsurfRuby::Models::Campaign::language,
|
|
78
87
|
last_name: String,
|
|
79
88
|
metadata: ::Hash[Symbol, top],
|
|
80
89
|
mobile_instance_id: String,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type language =
|
|
5
|
+
:en
|
|
6
|
+
| :es
|
|
7
|
+
| :fr
|
|
8
|
+
| :de
|
|
9
|
+
| :it
|
|
10
|
+
| :"pt-BR"
|
|
11
|
+
| :nl
|
|
12
|
+
| :pl
|
|
13
|
+
| :sv
|
|
14
|
+
| :tr
|
|
15
|
+
| :ja
|
|
16
|
+
| :ko
|
|
17
|
+
| :"zh-CN"
|
|
18
|
+
| :id
|
|
19
|
+
|
|
20
|
+
module Language
|
|
21
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
22
|
+
|
|
23
|
+
EN: :en
|
|
24
|
+
ES: :es
|
|
25
|
+
FR: :fr
|
|
26
|
+
DE: :de
|
|
27
|
+
IT: :it
|
|
28
|
+
PT_BR: :"pt-BR"
|
|
29
|
+
NL: :nl
|
|
30
|
+
PL: :pl
|
|
31
|
+
SV: :sv
|
|
32
|
+
TR: :tr
|
|
33
|
+
JA: :ja
|
|
34
|
+
KO: :ko
|
|
35
|
+
ZH_CN: :"zh-CN"
|
|
36
|
+
ID: :id
|
|
37
|
+
|
|
38
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::language]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -25,6 +25,7 @@ module GrowsurfRuby
|
|
|
25
25
|
is_affiliate: bool,
|
|
26
26
|
is_new: bool,
|
|
27
27
|
is_winner: bool,
|
|
28
|
+
language: GrowsurfRuby::Models::Campaign::language,
|
|
28
29
|
last_name: String?,
|
|
29
30
|
lead_count: Integer,
|
|
30
31
|
metadata: ::Hash[Symbol, top],
|
|
@@ -117,6 +118,12 @@ module GrowsurfRuby
|
|
|
117
118
|
|
|
118
119
|
def is_winner=: (bool) -> bool
|
|
119
120
|
|
|
121
|
+
attr_reader language: GrowsurfRuby::Models::Campaign::language?
|
|
122
|
+
|
|
123
|
+
def language=: (
|
|
124
|
+
GrowsurfRuby::Models::Campaign::language
|
|
125
|
+
) -> GrowsurfRuby::Models::Campaign::language
|
|
126
|
+
|
|
120
127
|
attr_accessor last_name: String?
|
|
121
128
|
|
|
122
129
|
|
|
@@ -224,6 +231,7 @@ module GrowsurfRuby
|
|
|
224
231
|
?is_affiliate: bool,
|
|
225
232
|
?is_new: bool,
|
|
226
233
|
?is_winner: bool,
|
|
234
|
+
?language: GrowsurfRuby::Models::Campaign::language,
|
|
227
235
|
?last_name: String?,
|
|
228
236
|
?lead_count: Integer,
|
|
229
237
|
?metadata: ::Hash[Symbol, top],
|
|
@@ -270,6 +278,7 @@ module GrowsurfRuby
|
|
|
270
278
|
is_affiliate: bool,
|
|
271
279
|
is_new: bool,
|
|
272
280
|
is_winner: bool,
|
|
281
|
+
language: GrowsurfRuby::Models::Campaign::language,
|
|
273
282
|
last_name: String?,
|
|
274
283
|
lead_count: Integer,
|
|
275
284
|
metadata: ::Hash[Symbol, top],
|
|
@@ -8,6 +8,7 @@ module GrowsurfRuby
|
|
|
8
8
|
affiliate_status: GrowsurfRuby::Models::Campaign::ParticipantUpdateParams::affiliate_status,
|
|
9
9
|
email: String,
|
|
10
10
|
first_name: String,
|
|
11
|
+
language: GrowsurfRuby::Models::Campaign::language?,
|
|
11
12
|
last_name: String,
|
|
12
13
|
metadata: ::Hash[Symbol, top],
|
|
13
14
|
notes: String,
|
|
@@ -40,6 +41,8 @@ module GrowsurfRuby
|
|
|
40
41
|
|
|
41
42
|
def first_name=: (String) -> String
|
|
42
43
|
|
|
44
|
+
attr_accessor language: GrowsurfRuby::Models::Campaign::language?
|
|
45
|
+
|
|
43
46
|
attr_reader last_name: String?
|
|
44
47
|
|
|
45
48
|
def last_name=: (String) -> String
|
|
@@ -76,6 +79,7 @@ module GrowsurfRuby
|
|
|
76
79
|
?affiliate_status: GrowsurfRuby::Models::Campaign::ParticipantUpdateParams::affiliate_status,
|
|
77
80
|
?email: String,
|
|
78
81
|
?first_name: String,
|
|
82
|
+
?language: GrowsurfRuby::Models::Campaign::language?,
|
|
79
83
|
?last_name: String,
|
|
80
84
|
?metadata: ::Hash[Symbol, top],
|
|
81
85
|
?notes: String,
|
|
@@ -92,6 +96,7 @@ module GrowsurfRuby
|
|
|
92
96
|
affiliate_status: GrowsurfRuby::Models::Campaign::ParticipantUpdateParams::affiliate_status,
|
|
93
97
|
email: String,
|
|
94
98
|
first_name: String,
|
|
99
|
+
language: GrowsurfRuby::Models::Campaign::language?,
|
|
95
100
|
last_name: String,
|
|
96
101
|
metadata: ::Hash[Symbol, top],
|
|
97
102
|
notes: String,
|
|
@@ -14,6 +14,7 @@ module GrowsurfRuby
|
|
|
14
14
|
?affiliate_status: GrowsurfRuby::Models::Campaign::ParticipantUpdateParams::affiliate_status,
|
|
15
15
|
?email: String,
|
|
16
16
|
?first_name: String,
|
|
17
|
+
?language: GrowsurfRuby::Models::Campaign::language?,
|
|
17
18
|
?last_name: String,
|
|
18
19
|
?metadata: ::Hash[Symbol, top],
|
|
19
20
|
?notes: String,
|
|
@@ -43,6 +44,7 @@ module GrowsurfRuby
|
|
|
43
44
|
?first_name: String,
|
|
44
45
|
?ip_address: String,
|
|
45
46
|
?is_affiliate: bool,
|
|
47
|
+
?language: GrowsurfRuby::Models::Campaign::language,
|
|
46
48
|
?last_name: String,
|
|
47
49
|
?metadata: ::Hash[Symbol, top],
|
|
48
50
|
?mobile_instance_id: String,
|
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.
|
|
4
|
+
version: 1.13.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-10-
|
|
11
|
+
date: 2026-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -91,6 +91,7 @@ files:
|
|
|
91
91
|
- lib/growsurf_ruby/models/campaign/fraud_risk_level.rb
|
|
92
92
|
- lib/growsurf_ruby/models/campaign/integration.rb
|
|
93
93
|
- lib/growsurf_ruby/models/campaign/integration_list_response.rb
|
|
94
|
+
- lib/growsurf_ruby/models/campaign/language.rb
|
|
94
95
|
- lib/growsurf_ruby/models/campaign/participant.rb
|
|
95
96
|
- lib/growsurf_ruby/models/campaign/participant_activation_analytics.rb
|
|
96
97
|
- lib/growsurf_ruby/models/campaign/participant_activity_logs_response.rb
|
|
@@ -247,6 +248,7 @@ files:
|
|
|
247
248
|
- rbi/growsurf_ruby/models/campaign/fraud_risk_level.rbi
|
|
248
249
|
- rbi/growsurf_ruby/models/campaign/integration.rbi
|
|
249
250
|
- rbi/growsurf_ruby/models/campaign/integration_list_response.rbi
|
|
251
|
+
- rbi/growsurf_ruby/models/campaign/language.rbi
|
|
250
252
|
- rbi/growsurf_ruby/models/campaign/participant.rbi
|
|
251
253
|
- rbi/growsurf_ruby/models/campaign/participant_activation_analytics.rbi
|
|
252
254
|
- rbi/growsurf_ruby/models/campaign/participant_activity_logs_response.rbi
|
|
@@ -402,6 +404,7 @@ files:
|
|
|
402
404
|
- sig/growsurf_ruby/models/campaign/fraud_risk_level.rbs
|
|
403
405
|
- sig/growsurf_ruby/models/campaign/integration.rbs
|
|
404
406
|
- sig/growsurf_ruby/models/campaign/integration_list_response.rbs
|
|
407
|
+
- sig/growsurf_ruby/models/campaign/language.rbs
|
|
405
408
|
- sig/growsurf_ruby/models/campaign/participant.rbs
|
|
406
409
|
- sig/growsurf_ruby/models/campaign/participant_activation_analytics.rbs
|
|
407
410
|
- sig/growsurf_ruby/models/campaign/participant_activity_logs_response.rbs
|