growsurf-ruby 1.17.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/client.rb +0 -4
- data/lib/growsurf_ruby/errors.rb +128 -0
- data/lib/growsurf_ruby/models/campaign/campaign_custom_domain.rb +109 -0
- data/lib/growsurf_ruby/models/campaign/create.rb +18 -4
- data/lib/growsurf_ruby/models/campaign/custom_domain_set_params.rb +25 -0
- data/lib/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rb +27 -0
- data/lib/growsurf_ruby/models/campaign/participant.rb +15 -215
- data/lib/growsurf_ruby/models/campaign/participant_email_params.rb +12 -8
- data/lib/growsurf_ruby/models/campaign/participant_list_referrals_params.rb +0 -3
- data/lib/growsurf_ruby/models/campaign/participant_record_transaction_params.rb +16 -2
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +16 -2
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +20 -0
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +20 -0
- data/lib/growsurf_ruby/models/campaign/webhook_create_params.rb +10 -3
- data/lib/growsurf_ruby/models/campaign_create_params.rb +10 -5
- data/lib/growsurf_ruby/models/campaign_list_referrals_params.rb +0 -3
- data/lib/growsurf_ruby/models/campaign_update_params.rb +4 -4
- data/lib/growsurf_ruby/models/commission_structure.rb +3 -0
- data/lib/growsurf_ruby/models/referral_list.rb +17 -1
- data/lib/growsurf_ruby/models.rb +0 -2
- data/lib/growsurf_ruby/resources/campaign/custom_domain.rb +111 -0
- data/lib/growsurf_ruby/resources/campaign/design.rb +3 -3
- data/lib/growsurf_ruby/resources/campaign/emails.rb +1 -2
- data/lib/growsurf_ruby/resources/campaign/installation.rb +1 -2
- data/lib/growsurf_ruby/resources/campaign/options.rb +4 -5
- data/lib/growsurf_ruby/resources/campaign/participant.rb +9 -4
- data/lib/growsurf_ruby/resources/campaign/program_resources.rb +1 -0
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +17 -2
- data/lib/growsurf_ruby/resources/campaign/webhooks.rb +13 -3
- data/lib/growsurf_ruby/resources/campaign.rb +15 -9
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +4 -3
- data/rbi/growsurf_ruby/client.rbi +0 -3
- data/rbi/growsurf_ruby/errors.rbi +64 -0
- data/rbi/growsurf_ruby/models/campaign/campaign_custom_domain.rbi +193 -0
- data/rbi/growsurf_ruby/models/campaign/create.rbi +24 -4
- data/rbi/growsurf_ruby/models/campaign/custom_domain_set_params.rbi +47 -0
- data/rbi/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rbi +40 -0
- data/rbi/growsurf_ruby/models/campaign/participant.rbi +15 -292
- data/rbi/growsurf_ruby/models/campaign/participant_email_params.rbi +23 -16
- data/rbi/growsurf_ruby/models/campaign/participant_list_referrals_params.rbi +0 -15
- data/rbi/growsurf_ruby/models/campaign/participant_record_transaction_params.rbi +23 -4
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +23 -4
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +24 -0
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +24 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_create_params.rbi +18 -4
- data/rbi/growsurf_ruby/models/campaign_create_params.rbi +6 -12
- data/rbi/growsurf_ruby/models/campaign_list_referrals_params.rbi +0 -15
- data/rbi/growsurf_ruby/models/campaign_update_params.rbi +6 -12
- data/rbi/growsurf_ruby/models/commission_structure.rbi +3 -0
- data/rbi/growsurf_ruby/models/referral_list.rbi +19 -3
- data/rbi/growsurf_ruby/models.rbi +0 -2
- data/rbi/growsurf_ruby/resources/campaign/custom_domain.rbi +91 -0
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +3 -3
- data/rbi/growsurf_ruby/resources/campaign/emails.rbi +1 -2
- data/rbi/growsurf_ruby/resources/campaign/installation.rbi +1 -2
- data/rbi/growsurf_ruby/resources/campaign/options.rbi +4 -5
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +30 -15
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +25 -2
- data/rbi/growsurf_ruby/resources/campaign/webhooks.rbi +21 -4
- data/rbi/growsurf_ruby/resources/campaign.rbi +21 -9
- data/sig/growsurf_ruby/client.rbs +0 -2
- data/sig/growsurf_ruby/errors.rbs +40 -0
- data/sig/growsurf_ruby/models/campaign/campaign_custom_domain.rbs +84 -0
- data/sig/growsurf_ruby/models/campaign/create.rbs +5 -0
- data/sig/growsurf_ruby/models/campaign/custom_domain_set_params.rbs +25 -0
- data/sig/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rbs +18 -0
- data/sig/growsurf_ruby/models/campaign/participant.rbs +7 -205
- data/sig/growsurf_ruby/models/campaign/participant_list_referrals_params.rbs +0 -6
- data/sig/growsurf_ruby/models/campaign/participant_record_transaction_params.rbs +19 -5
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +19 -5
- data/sig/growsurf_ruby/models/campaign_create_params.rbs +8 -12
- data/sig/growsurf_ruby/models/campaign_list_referrals_params.rbs +0 -6
- data/sig/growsurf_ruby/models/campaign_update_params.rbs +8 -12
- data/sig/growsurf_ruby/models/referral_list.rbs +13 -3
- data/sig/growsurf_ruby/models.rbs +0 -2
- data/sig/growsurf_ruby/resources/campaign/custom_domain.rbs +30 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +3 -2
- data/sig/growsurf_ruby/resources/campaign.rbs +7 -4
- metadata +14 -11
- data/lib/growsurf_ruby/models/account_create_params.rb +0 -46
- data/lib/growsurf_ruby/models/account_create_response.rb +0 -57
- data/lib/growsurf_ruby/resources/account.rb +0 -66
- data/rbi/growsurf_ruby/models/account_create_params.rbi +0 -73
- data/rbi/growsurf_ruby/models/account_create_response.rbi +0 -107
- data/rbi/growsurf_ruby/resources/account.rbi +0 -46
- data/sig/growsurf_ruby/models/account_create_params.rbs +0 -42
- data/sig/growsurf_ruby/models/account_create_response.rbs +0 -42
- data/sig/growsurf_ruby/resources/account.rbs +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cb5322069ad1249eb6561ab8e6f74be6aa5207eab5e2d6144a6359cf8290b0e1
|
|
4
|
+
data.tar.gz: 9147161a1a6ee5e78d08797615c432daa5296b79eeccb8aa9f29078819217ef7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b587eab078cbc2565a6a5102977b72b2ae92c024c1d95767d88a3162eafc949a01137041ea2ed9e2acb18662f50fd98d2cc58d57fe085c7ae6175a647fa89863
|
|
7
|
+
data.tar.gz: e4b2f0e1a31dd8555295cb55b241c135cb528c440c02f15b2311016166afbcd5643a974c3429878427883bd5483ef857213779c64561280c576c6548163c14b3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.19.0](https://github.com/growsurf/growsurf-ruby/compare/v1.18.0...v1.19.0) (2026-11-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* remove account create method (endpoint retired) ([cd591fb](https://github.com/growsurf/growsurf-ruby/commit/cd591fb6b2f2c2511063c120aed1ce992ebb8370))
|
|
9
|
+
* remove account create method (endpoint retired) ([b156301](https://github.com/growsurf/growsurf-ruby/commit/b15630131c85037c933542b4d5d600c797bf7599))
|
|
10
|
+
|
|
11
|
+
## [1.18.0](https://github.com/growsurf/growsurf-ruby/compare/v1.17.0...v1.18.0) (2026-11-03)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* add Tint and Glass program styles ([17170ee](https://github.com/growsurf/growsurf-ruby/commit/17170ee7a04128b5394a69d2692755c2aedbe4bb))
|
|
17
|
+
* **api:** sync REST v2 contract changes ([879b862](https://github.com/growsurf/growsurf-ruby/commit/879b862aab95002bbaa2a31bbc1e78ee0478f56c))
|
|
18
|
+
* expose documented error-body fields and sync campaign and participant models ([4ead9ab](https://github.com/growsurf/growsurf-ruby/commit/4ead9abf9598b6a881905d0645686438fda781c9))
|
|
19
|
+
* expose program visual style in campaign design ([0dec9da](https://github.com/growsurf/growsurf-ruby/commit/0dec9dac9039c5968c2debbc87c79ebeb100265b))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **program_resources:** accept a String type in update ([c5b5ef6](https://github.com/growsurf/growsurf-ruby/commit/c5b5ef63eb0d31d8d721130cb91eae7dd2630db4))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Chores
|
|
28
|
+
|
|
29
|
+
* **deps:** bump addressable to 2.9.1 ([bd2f5df](https://github.com/growsurf/growsurf-ruby/commit/bd2f5dff06b0a0c559cfbea3c40b7758b25c7d2e))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Documentation
|
|
33
|
+
|
|
34
|
+
* clarify Add Participant claim-offer wording and page title defaults ([1a3e4c1](https://github.com/growsurf/growsurf-ruby/commit/1a3e4c1a3866422a0c2907ee2f1255e4e3787c7e))
|
|
35
|
+
* clarify referral reward metadata amounts ([636f8b5](https://github.com/growsurf/growsurf-ruby/commit/636f8b5a34993b9118fdab2874bcab8e39771bae))
|
|
36
|
+
|
|
3
37
|
## [1.17.0](https://github.com/growsurf/growsurf-ruby/compare/v1.16.0...v1.17.0) (2026-10-20)
|
|
4
38
|
|
|
5
39
|
|
data/README.md
CHANGED
data/lib/growsurf_ruby/client.rb
CHANGED
|
@@ -19,9 +19,6 @@ module GrowsurfRuby
|
|
|
19
19
|
# @return [String]
|
|
20
20
|
attr_reader :api_key
|
|
21
21
|
|
|
22
|
-
# @return [GrowsurfRuby::Resources::Account]
|
|
23
|
-
attr_reader :account
|
|
24
|
-
|
|
25
22
|
# @return [GrowsurfRuby::Resources::Team]
|
|
26
23
|
attr_reader :team
|
|
27
24
|
|
|
@@ -87,7 +84,6 @@ module GrowsurfRuby
|
|
|
87
84
|
headers: headers
|
|
88
85
|
)
|
|
89
86
|
|
|
90
|
-
@account = GrowsurfRuby::Resources::Account.new(client: self)
|
|
91
87
|
@team = GrowsurfRuby::Resources::Team.new(client: self)
|
|
92
88
|
@campaign = GrowsurfRuby::Resources::Campaign.new(client: self)
|
|
93
89
|
end
|
data/lib/growsurf_ruby/errors.rb
CHANGED
|
@@ -170,6 +170,89 @@ module GrowsurfRuby
|
|
|
170
170
|
# # @return [Integer]
|
|
171
171
|
# attr_accessor :status
|
|
172
172
|
|
|
173
|
+
# Documented error-body fields. Each is `nil` when the body omits it or sends
|
|
174
|
+
# another type; `body` keeps the complete body, including fields added later.
|
|
175
|
+
|
|
176
|
+
# Error name returned for the failed request.
|
|
177
|
+
#
|
|
178
|
+
# @return [String, nil]
|
|
179
|
+
attr_reader :error_name
|
|
180
|
+
|
|
181
|
+
# Stable machine-readable error code.
|
|
182
|
+
#
|
|
183
|
+
# @return [String, nil]
|
|
184
|
+
attr_reader :error_code
|
|
185
|
+
|
|
186
|
+
# Human-readable error message.
|
|
187
|
+
#
|
|
188
|
+
# @return [String, nil]
|
|
189
|
+
attr_reader :error_message
|
|
190
|
+
|
|
191
|
+
# Optional validation details for specific request fields.
|
|
192
|
+
#
|
|
193
|
+
# @return [Array<Hash{Symbol=>Object}>, nil]
|
|
194
|
+
attr_reader :errors
|
|
195
|
+
|
|
196
|
+
# Support URL related to the error, when available.
|
|
197
|
+
#
|
|
198
|
+
# @return [String, nil]
|
|
199
|
+
attr_reader :support_url
|
|
200
|
+
|
|
201
|
+
# Rate-limit policy name for `429` errors, when available.
|
|
202
|
+
#
|
|
203
|
+
# @return [String, nil]
|
|
204
|
+
attr_reader :policy_name
|
|
205
|
+
|
|
206
|
+
# Error severity level, when available.
|
|
207
|
+
#
|
|
208
|
+
# @return [String, nil]
|
|
209
|
+
attr_reader :level
|
|
210
|
+
|
|
211
|
+
# When the error response was created.
|
|
212
|
+
#
|
|
213
|
+
# @return [String, nil]
|
|
214
|
+
attr_reader :timestamp
|
|
215
|
+
|
|
216
|
+
# Fraud risk level assigned to the blocked signup.
|
|
217
|
+
#
|
|
218
|
+
# @return [String, nil]
|
|
219
|
+
attr_reader :fraud_risk_level
|
|
220
|
+
|
|
221
|
+
# Machine-readable reason code for the fraud decision.
|
|
222
|
+
#
|
|
223
|
+
# @return [String, nil]
|
|
224
|
+
attr_reader :fraud_reason_code
|
|
225
|
+
|
|
226
|
+
# Existing participant IDs related to the fraud match.
|
|
227
|
+
#
|
|
228
|
+
# @return [Array<String>, nil]
|
|
229
|
+
attr_reader :matched_participant_ids
|
|
230
|
+
|
|
231
|
+
# Email address from the blocked signup attempt.
|
|
232
|
+
#
|
|
233
|
+
# @return [String, nil]
|
|
234
|
+
attr_reader :email
|
|
235
|
+
|
|
236
|
+
# Referrer participant ID supplied with the blocked signup, or `null`.
|
|
237
|
+
#
|
|
238
|
+
# @return [String, nil]
|
|
239
|
+
attr_reader :referrer_id
|
|
240
|
+
|
|
241
|
+
# IP address supplied with the blocked signup, or `null`.
|
|
242
|
+
#
|
|
243
|
+
# @return [String, nil]
|
|
244
|
+
attr_reader :ip_address
|
|
245
|
+
|
|
246
|
+
# Browser fingerprint supplied with the blocked signup, or `null`.
|
|
247
|
+
#
|
|
248
|
+
# @return [String, nil]
|
|
249
|
+
attr_reader :fingerprint
|
|
250
|
+
|
|
251
|
+
# When the signup was blocked.
|
|
252
|
+
#
|
|
253
|
+
# @return [String, nil]
|
|
254
|
+
attr_reader :blocked_at
|
|
255
|
+
|
|
173
256
|
# @api private
|
|
174
257
|
#
|
|
175
258
|
# @param url [URI::Generic]
|
|
@@ -190,6 +273,51 @@ module GrowsurfRuby
|
|
|
190
273
|
response: response,
|
|
191
274
|
message: message&.to_s
|
|
192
275
|
)
|
|
276
|
+
|
|
277
|
+
fields = body.is_a?(Hash) ? body : {}
|
|
278
|
+
@error_name = string_or_nil(fields[:name])
|
|
279
|
+
@error_code = string_or_nil(fields[:code])
|
|
280
|
+
@error_message = string_or_nil(fields[:message])
|
|
281
|
+
@errors = hash_list_or_nil(fields[:errors])
|
|
282
|
+
@support_url = string_or_nil(fields[:supportUrl])
|
|
283
|
+
@policy_name = string_or_nil(fields[:policyName])
|
|
284
|
+
@level = string_or_nil(fields[:level])
|
|
285
|
+
@timestamp = string_or_nil(fields[:timestamp])
|
|
286
|
+
@fraud_risk_level = string_or_nil(fields[:fraudRiskLevel])
|
|
287
|
+
@fraud_reason_code = string_or_nil(fields[:fraudReasonCode])
|
|
288
|
+
@matched_participant_ids = string_list_or_nil(fields[:matchedParticipantIds])
|
|
289
|
+
@email = string_or_nil(fields[:email])
|
|
290
|
+
@referrer_id = string_or_nil(fields[:referrerId])
|
|
291
|
+
@ip_address = string_or_nil(fields[:ipAddress])
|
|
292
|
+
@fingerprint = string_or_nil(fields[:fingerprint])
|
|
293
|
+
@blocked_at = string_or_nil(fields[:blockedAt])
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
private
|
|
297
|
+
|
|
298
|
+
# @api private
|
|
299
|
+
#
|
|
300
|
+
# @param value [Object]
|
|
301
|
+
#
|
|
302
|
+
# @return [String, nil]
|
|
303
|
+
def string_or_nil(value) = value.is_a?(String) ? value : nil
|
|
304
|
+
|
|
305
|
+
# @api private
|
|
306
|
+
#
|
|
307
|
+
# @param value [Object]
|
|
308
|
+
#
|
|
309
|
+
# @return [Array<String>, nil]
|
|
310
|
+
def string_list_or_nil(value)
|
|
311
|
+
value.is_a?(Array) && value.all?(String) ? value : nil
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# @api private
|
|
315
|
+
#
|
|
316
|
+
# @param value [Object]
|
|
317
|
+
#
|
|
318
|
+
# @return [Array<Hash{Symbol=>Object}>, nil]
|
|
319
|
+
def hash_list_or_nil(value)
|
|
320
|
+
value.is_a?(Array) && value.all?(Hash) ? value : nil
|
|
193
321
|
end
|
|
194
322
|
end
|
|
195
323
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::CustomDomain#retrieve
|
|
7
|
+
class CampaignCustomDomain < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute created_at
|
|
9
|
+
# When the domain was set, in epoch milliseconds. `null` when no domain is set.
|
|
10
|
+
#
|
|
11
|
+
# @return [Integer, nil]
|
|
12
|
+
required :created_at, Integer, api_name: :createdAt, nil?: true
|
|
13
|
+
|
|
14
|
+
# @!attribute dns_record
|
|
15
|
+
# The DNS record to add at your DNS provider. `null` when no domain is set.
|
|
16
|
+
#
|
|
17
|
+
# @return [GrowsurfRuby::Models::Campaign::CampaignCustomDomain::DNSRecord, nil]
|
|
18
|
+
required :dns_record,
|
|
19
|
+
-> { GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord },
|
|
20
|
+
api_name: :dnsRecord,
|
|
21
|
+
nil?: true
|
|
22
|
+
|
|
23
|
+
# @!attribute domain
|
|
24
|
+
# The custom domain, such as `https://refer.piedpiper.com`, or `null` when none is
|
|
25
|
+
# set.
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
required :domain, String, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute is_verified
|
|
31
|
+
# Whether the domain's `CNAME` record pointed to `dns_record.value` at the last
|
|
32
|
+
# check. Landing pages load on the domain only when this is `true`.
|
|
33
|
+
#
|
|
34
|
+
# @return [Boolean]
|
|
35
|
+
required :is_verified, GrowsurfRuby::Internal::Type::Boolean, api_name: :isVerified
|
|
36
|
+
|
|
37
|
+
# @!attribute updated_at
|
|
38
|
+
# When the domain record last changed, in epoch milliseconds. `null` when no
|
|
39
|
+
# domain is set.
|
|
40
|
+
#
|
|
41
|
+
# @return [Integer, nil]
|
|
42
|
+
required :updated_at, Integer, api_name: :updatedAt, nil?: true
|
|
43
|
+
|
|
44
|
+
# @!attribute verified_at
|
|
45
|
+
# When the DNS check passed, in epoch milliseconds. `null` while unverified.
|
|
46
|
+
#
|
|
47
|
+
# @return [Integer, nil]
|
|
48
|
+
required :verified_at, Integer, api_name: :verifiedAt, nil?: true
|
|
49
|
+
|
|
50
|
+
# @!method initialize(created_at:, dns_record:, domain:, is_verified:, updated_at:, verified_at:)
|
|
51
|
+
# The custom domain that serves a program's landing pages.
|
|
52
|
+
#
|
|
53
|
+
# @param created_at [Integer, nil] When the domain was set, in epoch milliseconds. `null` when no domain is set.
|
|
54
|
+
#
|
|
55
|
+
# @param dns_record [GrowsurfRuby::Models::Campaign::CampaignCustomDomain::DNSRecord, nil] The DNS record to add at your DNS provider. `null` when no domain is set.
|
|
56
|
+
#
|
|
57
|
+
# @param domain [String, nil] The custom domain, such as `https://refer.piedpiper.com`, or `null` when none is set.
|
|
58
|
+
#
|
|
59
|
+
# @param is_verified [Boolean] Whether the domain's `CNAME` record pointed to `dns_record.value` at the last check.
|
|
60
|
+
#
|
|
61
|
+
# @param updated_at [Integer, nil] When the domain record last changed, in epoch milliseconds. `null` when no domain is set.
|
|
62
|
+
#
|
|
63
|
+
# @param verified_at [Integer, nil] When the DNS check passed, in epoch milliseconds. `null` while unverified.
|
|
64
|
+
|
|
65
|
+
# @see GrowsurfRuby::Models::Campaign::CampaignCustomDomain#dns_record
|
|
66
|
+
class DNSRecord < GrowsurfRuby::Internal::Type::BaseModel
|
|
67
|
+
# @!attribute name
|
|
68
|
+
# The hostname the record is for, such as `refer.piedpiper.com`.
|
|
69
|
+
#
|
|
70
|
+
# @return [String]
|
|
71
|
+
required :name, String
|
|
72
|
+
|
|
73
|
+
# @!attribute type
|
|
74
|
+
# The record type. Always `CNAME`.
|
|
75
|
+
#
|
|
76
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::CampaignCustomDomain::DNSRecord::Type]
|
|
77
|
+
required :type, enum: -> { GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord::Type }
|
|
78
|
+
|
|
79
|
+
# @!attribute value
|
|
80
|
+
# The record's target, such as `grow.surf`.
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
required :value, String
|
|
84
|
+
|
|
85
|
+
# @!method initialize(name:, type:, value:)
|
|
86
|
+
# The DNS record to add at your DNS provider.
|
|
87
|
+
#
|
|
88
|
+
# @param name [String] The hostname the record is for, such as `refer.piedpiper.com`.
|
|
89
|
+
#
|
|
90
|
+
# @param type [Symbol, GrowsurfRuby::Models::Campaign::CampaignCustomDomain::DNSRecord::Type] The record type. Always `CNAME`.
|
|
91
|
+
#
|
|
92
|
+
# @param value [String] The record's target, such as `grow.surf`.
|
|
93
|
+
|
|
94
|
+
# The record type. Always `CNAME`.
|
|
95
|
+
#
|
|
96
|
+
# @see GrowsurfRuby::Models::Campaign::CampaignCustomDomain::DNSRecord#type
|
|
97
|
+
module Type
|
|
98
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
99
|
+
|
|
100
|
+
CNAME = :CNAME
|
|
101
|
+
|
|
102
|
+
# @!method self.values
|
|
103
|
+
# @return [Array<Symbol>]
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
@@ -34,8 +34,11 @@ module GrowsurfRuby
|
|
|
34
34
|
optional :is_affiliate, GrowsurfRuby::Internal::Type::Boolean, api_name: :isAffiliate
|
|
35
35
|
|
|
36
36
|
# @!attribute language
|
|
37
|
-
# The language of the participant's portal and program emails.
|
|
38
|
-
# program's languages.
|
|
37
|
+
# The language of the participant's portal and program emails. Stored when it is
|
|
38
|
+
# one of the program's languages. A regional tag maps to its language (for
|
|
39
|
+
# example, `es-MX` is stored as `es`). Any other value is ignored and the
|
|
40
|
+
# program's base language applies. Applied only when this request creates the
|
|
41
|
+
# participant.
|
|
39
42
|
#
|
|
40
43
|
# @return [Symbol, GrowsurfRuby::Models::Campaign::Language, nil]
|
|
41
44
|
optional :language, enum: -> { GrowsurfRuby::Campaign::Language }
|
|
@@ -70,13 +73,22 @@ module GrowsurfRuby
|
|
|
70
73
|
enum: -> { GrowsurfRuby::Campaign::Create::ReferralStatus },
|
|
71
74
|
api_name: :referralStatus
|
|
72
75
|
|
|
76
|
+
# @!attribute referred_at
|
|
77
|
+
# When the participant was referred, in Unix milliseconds. Used only with a valid
|
|
78
|
+
# `referredBy`. If you omit `referralStatus`, GrowSurf compares this time with
|
|
79
|
+
# the program's referral credit window to set it. Defaults to the time of the
|
|
80
|
+
# request.
|
|
81
|
+
#
|
|
82
|
+
# @return [Integer, nil]
|
|
83
|
+
optional :referred_at, Integer, api_name: :referredAt, nil?: true
|
|
84
|
+
|
|
73
85
|
# @!attribute referred_by
|
|
74
86
|
# Referrer participant ID or email address.
|
|
75
87
|
#
|
|
76
88
|
# @return [String, nil]
|
|
77
89
|
optional :referred_by, String, api_name: :referredBy
|
|
78
90
|
|
|
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)
|
|
91
|
+
# @!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_at: nil, referred_by: nil)
|
|
80
92
|
# Some parameter documentations has been truncated, see
|
|
81
93
|
# {GrowsurfRuby::Models::Campaign::Create} for more details.
|
|
82
94
|
#
|
|
@@ -90,7 +102,7 @@ module GrowsurfRuby
|
|
|
90
102
|
#
|
|
91
103
|
# @param is_affiliate [Boolean] Affiliate programs only. Controls affiliate enrollment for a new participant.
|
|
92
104
|
#
|
|
93
|
-
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails.
|
|
105
|
+
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails. Stored when it is
|
|
94
106
|
#
|
|
95
107
|
# @param last_name [String]
|
|
96
108
|
#
|
|
@@ -100,6 +112,8 @@ module GrowsurfRuby
|
|
|
100
112
|
#
|
|
101
113
|
# @param referral_status [Symbol, GrowsurfRuby::Models::Campaign::Create::ReferralStatus] The referral credit status; only meaningful when `referred_by` resolves to a ref
|
|
102
114
|
#
|
|
115
|
+
# @param referred_at [Integer, nil] When the participant was referred, in Unix milliseconds. Used only with a valid
|
|
116
|
+
#
|
|
103
117
|
# @param referred_by [String] Referrer participant ID or email address.
|
|
104
118
|
|
|
105
119
|
# @see GrowsurfRuby::Models::Campaign::Create#referral_status
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::CustomDomain#set
|
|
7
|
+
class CustomDomainSetParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute domain
|
|
12
|
+
# The hostname to serve the program's landing pages from, with or without
|
|
13
|
+
# `https://`. Up to 255 characters.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :domain, String
|
|
17
|
+
|
|
18
|
+
# @!method initialize(domain:, request_options: {})
|
|
19
|
+
# @param domain [String] The hostname to serve the program's landing pages from, with or without `https://`. Up to 255 characters.
|
|
20
|
+
#
|
|
21
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::CustomDomain#delete
|
|
7
|
+
class DeleteCampaignCustomDomainResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute domain
|
|
9
|
+
# The custom domain that was removed, such as `https://refer.piedpiper.com`.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :domain, String
|
|
13
|
+
|
|
14
|
+
# @!attribute success
|
|
15
|
+
# Whether the custom domain was removed.
|
|
16
|
+
#
|
|
17
|
+
# @return [Boolean]
|
|
18
|
+
required :success, GrowsurfRuby::Internal::Type::Boolean
|
|
19
|
+
|
|
20
|
+
# @!method initialize(domain:, success:)
|
|
21
|
+
# @param domain [String] The custom domain that was removed, such as `https://refer.piedpiper.com`.
|
|
22
|
+
#
|
|
23
|
+
# @param success [Boolean] Whether the custom domain was removed.
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|