growsurf-ruby 1.16.0 → 1.18.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/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.rb +1 -0
- 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/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 -0
- 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.rbi +5 -0
- 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/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/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.rbs +2 -1
- 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/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 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 64ae33b479cdfbee6f6593130a888fbe18a6f0a6b029dd169f7aabb12fc3f686
|
|
4
|
+
data.tar.gz: 628e6ce56e5ea2181d5bfbee258098d6db042955244f07f104fcf826ded987c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f58d073f01873b7ff363f03530d2bfead5625378e4109ff896beaf38911598eb0a7771b65ad669a4a133708c0dc50784580f66bf2a07cfaaab08e153df4e059
|
|
7
|
+
data.tar.gz: deeb34fe5482717bb74c8b73db2478c76543fc8e80668a3f8f09d05698a173c59a64afd9b1f0a7672fd5452f25fd031dc8f9d9f627dcb66c030cee9f8be08d87
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.18.0](https://github.com/growsurf/growsurf-ruby/compare/v1.17.0...v1.18.0) (2026-11-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add Tint and Glass program styles ([17170ee](https://github.com/growsurf/growsurf-ruby/commit/17170ee7a04128b5394a69d2692755c2aedbe4bb))
|
|
9
|
+
* **api:** sync REST v2 contract changes ([879b862](https://github.com/growsurf/growsurf-ruby/commit/879b862aab95002bbaa2a31bbc1e78ee0478f56c))
|
|
10
|
+
* expose documented error-body fields and sync campaign and participant models ([4ead9ab](https://github.com/growsurf/growsurf-ruby/commit/4ead9abf9598b6a881905d0645686438fda781c9))
|
|
11
|
+
* expose program visual style in campaign design ([0dec9da](https://github.com/growsurf/growsurf-ruby/commit/0dec9dac9039c5968c2debbc87c79ebeb100265b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **program_resources:** accept a String type in update ([c5b5ef6](https://github.com/growsurf/growsurf-ruby/commit/c5b5ef63eb0d31d8d721130cb91eae7dd2630db4))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
|
|
21
|
+
* **deps:** bump addressable to 2.9.1 ([bd2f5df](https://github.com/growsurf/growsurf-ruby/commit/bd2f5dff06b0a0c559cfbea3c40b7758b25c7d2e))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Documentation
|
|
25
|
+
|
|
26
|
+
* clarify Add Participant claim-offer wording and page title defaults ([1a3e4c1](https://github.com/growsurf/growsurf-ruby/commit/1a3e4c1a3866422a0c2907ee2f1255e4e3787c7e))
|
|
27
|
+
* clarify referral reward metadata amounts ([636f8b5](https://github.com/growsurf/growsurf-ruby/commit/636f8b5a34993b9118fdab2874bcab8e39771bae))
|
|
28
|
+
|
|
29
|
+
## [1.17.0](https://github.com/growsurf/growsurf-ruby/compare/v1.16.0...v1.17.0) (2026-10-20)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
* add PER_YEAR reward limit duration ([c3b68aa](https://github.com/growsurf/growsurf-ruby/commit/c3b68aa7131f5882b2a8f820ae9d87c53786edc7))
|
|
35
|
+
* add PER_YEAR reward limit duration ([42fbf20](https://github.com/growsurf/growsurf-ruby/commit/42fbf20d8568de9b5ac00c3eeafdb456f60a995b))
|
|
36
|
+
|
|
3
37
|
## [1.16.0](https://github.com/growsurf/growsurf-ruby/compare/v1.15.0...v1.16.0) (2026-10-19)
|
|
4
38
|
|
|
5
39
|
|
data/README.md
CHANGED
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
|
|
@@ -201,6 +201,14 @@ module GrowsurfRuby
|
|
|
201
201
|
# @return [Integer, nil]
|
|
202
202
|
optional :prev_monthly_referral_count, Integer, api_name: :prevMonthlyReferralCount
|
|
203
203
|
|
|
204
|
+
# @!attribute referral_lead_qualified_at
|
|
205
|
+
# When this referred signup counted as a lead for the referrer, in Unix
|
|
206
|
+
# milliseconds. Set only when the program's `referralTrigger` is `CUSTOM`.
|
|
207
|
+
# Lead-event Campaign Rewards and commissions use it.
|
|
208
|
+
#
|
|
209
|
+
# @return [Integer, nil]
|
|
210
|
+
optional :referral_lead_qualified_at, Integer, api_name: :referralLeadQualifiedAt, nil?: true
|
|
211
|
+
|
|
204
212
|
# @!attribute referrals
|
|
205
213
|
#
|
|
206
214
|
# @return [Array<String>, nil]
|
|
@@ -264,7 +272,7 @@ module GrowsurfRuby
|
|
|
264
272
|
# @return [Array<String>, nil]
|
|
265
273
|
optional :vanity_keys, GrowsurfRuby::Internal::Type::ArrayOf[String], api_name: :vanityKeys
|
|
266
274
|
|
|
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)
|
|
275
|
+
# @!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, referral_lead_qualified_at: 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)
|
|
268
276
|
# Some parameter documentations has been truncated, see
|
|
269
277
|
# {GrowsurfRuby::Models::Campaign::CampaignParticipant} for more details.
|
|
270
278
|
#
|
|
@@ -335,6 +343,8 @@ module GrowsurfRuby
|
|
|
335
343
|
#
|
|
336
344
|
# @param prev_monthly_referral_count [Integer]
|
|
337
345
|
#
|
|
346
|
+
# @param referral_lead_qualified_at [Integer, nil] When this referred signup counted as a lead for the referrer, in Unix
|
|
347
|
+
#
|
|
338
348
|
# @param referrals [Array<String>]
|
|
339
349
|
#
|
|
340
350
|
# @param referral_source [Symbol, GrowsurfRuby::Models::Campaign::ReferralSource]
|
|
@@ -389,221 +399,11 @@ module GrowsurfRuby
|
|
|
389
399
|
end
|
|
390
400
|
end
|
|
391
401
|
|
|
402
|
+
# The participant's referrer. It has the same fields as a `Participant`. Its own
|
|
403
|
+
# `referrer` is always `null`.
|
|
404
|
+
#
|
|
392
405
|
# @see GrowsurfRuby::Models::Campaign::CampaignParticipant#referrer
|
|
393
|
-
class Referrer < GrowsurfRuby::
|
|
394
|
-
# @!attribute id
|
|
395
|
-
#
|
|
396
|
-
# @return [String, nil]
|
|
397
|
-
optional :id, String
|
|
398
|
-
|
|
399
|
-
# @!attribute created_at
|
|
400
|
-
#
|
|
401
|
-
# @return [Integer, nil]
|
|
402
|
-
optional :created_at, Integer, api_name: :createdAt
|
|
403
|
-
|
|
404
|
-
# @!attribute email
|
|
405
|
-
#
|
|
406
|
-
# @return [String, nil]
|
|
407
|
-
optional :email, String
|
|
408
|
-
|
|
409
|
-
# @!attribute fingerprint
|
|
410
|
-
#
|
|
411
|
-
# @return [String, nil]
|
|
412
|
-
optional :fingerprint, String, nil?: true
|
|
413
|
-
|
|
414
|
-
# @!attribute first_name
|
|
415
|
-
#
|
|
416
|
-
# @return [String, nil]
|
|
417
|
-
optional :first_name, String, api_name: :firstName, nil?: true
|
|
418
|
-
|
|
419
|
-
# @!attribute fraud_reason_code
|
|
420
|
-
#
|
|
421
|
-
# @return [String, nil]
|
|
422
|
-
optional :fraud_reason_code, String, api_name: :fraudReasonCode
|
|
423
|
-
|
|
424
|
-
# @!attribute fraud_risk_level
|
|
425
|
-
#
|
|
426
|
-
# @return [Symbol, GrowsurfRuby::Models::Campaign::FraudRiskLevel, nil]
|
|
427
|
-
optional :fraud_risk_level,
|
|
428
|
-
enum: -> {
|
|
429
|
-
GrowsurfRuby::Campaign::FraudRiskLevel
|
|
430
|
-
},
|
|
431
|
-
api_name: :fraudRiskLevel
|
|
432
|
-
|
|
433
|
-
# @!attribute impression_count
|
|
434
|
-
#
|
|
435
|
-
# @return [Integer, nil]
|
|
436
|
-
optional :impression_count, Integer, api_name: :impressionCount
|
|
437
|
-
|
|
438
|
-
# @!attribute invite_count
|
|
439
|
-
#
|
|
440
|
-
# @return [Integer, nil]
|
|
441
|
-
optional :invite_count, Integer, api_name: :inviteCount
|
|
442
|
-
|
|
443
|
-
# @!attribute ip_address
|
|
444
|
-
#
|
|
445
|
-
# @return [String, nil]
|
|
446
|
-
optional :ip_address, String, api_name: :ipAddress, nil?: true
|
|
447
|
-
|
|
448
|
-
# @!attribute is_winner
|
|
449
|
-
#
|
|
450
|
-
# @return [Boolean, nil]
|
|
451
|
-
optional :is_winner, GrowsurfRuby::Internal::Type::Boolean, api_name: :isWinner
|
|
452
|
-
|
|
453
|
-
# @!attribute last_name
|
|
454
|
-
#
|
|
455
|
-
# @return [String, nil]
|
|
456
|
-
optional :last_name, String, api_name: :lastName, nil?: true
|
|
457
|
-
|
|
458
|
-
# @!attribute lead_count
|
|
459
|
-
# The number of pending referrals the participant made that have not converted
|
|
460
|
-
# into successful referrals yet.
|
|
461
|
-
#
|
|
462
|
-
# @return [Integer, nil]
|
|
463
|
-
optional :lead_count, Integer, api_name: :leadCount
|
|
464
|
-
|
|
465
|
-
# @!attribute metadata
|
|
466
|
-
# Shallow custom metadata object.
|
|
467
|
-
#
|
|
468
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
469
|
-
optional :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
470
|
-
|
|
471
|
-
# @!attribute monthly_rank
|
|
472
|
-
#
|
|
473
|
-
# @return [Integer, nil]
|
|
474
|
-
optional :monthly_rank, Integer, api_name: :monthlyRank
|
|
475
|
-
|
|
476
|
-
# @!attribute monthly_referral_count
|
|
477
|
-
#
|
|
478
|
-
# @return [Integer, nil]
|
|
479
|
-
optional :monthly_referral_count, Integer, api_name: :monthlyReferralCount
|
|
480
|
-
|
|
481
|
-
# @!attribute monthly_referrals
|
|
482
|
-
#
|
|
483
|
-
# @return [Array<String>, nil]
|
|
484
|
-
optional :monthly_referrals,
|
|
485
|
-
GrowsurfRuby::Internal::Type::ArrayOf[String],
|
|
486
|
-
api_name: :monthlyReferrals
|
|
487
|
-
|
|
488
|
-
# @!attribute prev_monthly_rank
|
|
489
|
-
#
|
|
490
|
-
# @return [Integer, nil]
|
|
491
|
-
optional :prev_monthly_rank, Integer, api_name: :prevMonthlyRank
|
|
492
|
-
|
|
493
|
-
# @!attribute prev_monthly_referral_count
|
|
494
|
-
#
|
|
495
|
-
# @return [Integer, nil]
|
|
496
|
-
optional :prev_monthly_referral_count, Integer, api_name: :prevMonthlyReferralCount
|
|
497
|
-
|
|
498
|
-
# @!attribute rank
|
|
499
|
-
#
|
|
500
|
-
# @return [Integer, nil]
|
|
501
|
-
optional :rank, Integer
|
|
502
|
-
|
|
503
|
-
# @!attribute referral_count
|
|
504
|
-
#
|
|
505
|
-
# @return [Integer, nil]
|
|
506
|
-
optional :referral_count, Integer, api_name: :referralCount
|
|
507
|
-
|
|
508
|
-
# @!attribute referrals
|
|
509
|
-
#
|
|
510
|
-
# @return [Array<String>, nil]
|
|
511
|
-
optional :referrals, GrowsurfRuby::Internal::Type::ArrayOf[String]
|
|
512
|
-
|
|
513
|
-
# @!attribute referral_source
|
|
514
|
-
#
|
|
515
|
-
# @return [Symbol, GrowsurfRuby::Models::Campaign::ReferralSource, nil]
|
|
516
|
-
optional :referral_source,
|
|
517
|
-
enum: -> {
|
|
518
|
-
GrowsurfRuby::Campaign::ReferralSource
|
|
519
|
-
},
|
|
520
|
-
api_name: :referralSource
|
|
521
|
-
|
|
522
|
-
# @!attribute referral_status
|
|
523
|
-
#
|
|
524
|
-
# @return [Symbol, GrowsurfRuby::Models::Campaign::ReferralStatus, nil]
|
|
525
|
-
optional :referral_status,
|
|
526
|
-
enum: -> {
|
|
527
|
-
GrowsurfRuby::Campaign::ReferralStatus
|
|
528
|
-
},
|
|
529
|
-
api_name: :referralStatus
|
|
530
|
-
|
|
531
|
-
# @!attribute share_count
|
|
532
|
-
#
|
|
533
|
-
# @return [Hash{Symbol=>Integer}, nil]
|
|
534
|
-
optional :share_count, GrowsurfRuby::Internal::Type::HashOf[Integer], api_name: :shareCount
|
|
535
|
-
|
|
536
|
-
# @!attribute share_url
|
|
537
|
-
#
|
|
538
|
-
# @return [String, nil]
|
|
539
|
-
optional :share_url, String, api_name: :shareUrl
|
|
540
|
-
|
|
541
|
-
# @!attribute unique_impression_count
|
|
542
|
-
#
|
|
543
|
-
# @return [Integer, nil]
|
|
544
|
-
optional :unique_impression_count, Integer, api_name: :uniqueImpressionCount
|
|
545
|
-
|
|
546
|
-
# @!attribute unsubscribed
|
|
547
|
-
#
|
|
548
|
-
# @return [Boolean, nil]
|
|
549
|
-
optional :unsubscribed, GrowsurfRuby::Internal::Type::Boolean
|
|
550
|
-
|
|
551
|
-
# @!method initialize(id: nil, created_at: nil, email: nil, fingerprint: nil, first_name: nil, fraud_reason_code: nil, fraud_risk_level: nil, impression_count: nil, invite_count: nil, ip_address: nil, is_winner: nil, last_name: nil, lead_count: nil, metadata: nil, monthly_rank: nil, monthly_referral_count: nil, monthly_referrals: nil, prev_monthly_rank: nil, prev_monthly_referral_count: nil, rank: nil, referral_count: nil, referrals: nil, referral_source: nil, referral_status: nil, share_count: nil, share_url: nil, unique_impression_count: nil, unsubscribed: nil)
|
|
552
|
-
# @param id [String]
|
|
553
|
-
#
|
|
554
|
-
# @param created_at [Integer]
|
|
555
|
-
#
|
|
556
|
-
# @param email [String]
|
|
557
|
-
#
|
|
558
|
-
# @param fingerprint [String, nil]
|
|
559
|
-
#
|
|
560
|
-
# @param first_name [String, nil]
|
|
561
|
-
#
|
|
562
|
-
# @param fraud_reason_code [String]
|
|
563
|
-
#
|
|
564
|
-
# @param fraud_risk_level [Symbol, GrowsurfRuby::Models::Campaign::FraudRiskLevel]
|
|
565
|
-
#
|
|
566
|
-
# @param impression_count [Integer]
|
|
567
|
-
#
|
|
568
|
-
# @param invite_count [Integer]
|
|
569
|
-
#
|
|
570
|
-
# @param ip_address [String, nil]
|
|
571
|
-
#
|
|
572
|
-
# @param is_winner [Boolean]
|
|
573
|
-
#
|
|
574
|
-
# @param last_name [String, nil]
|
|
575
|
-
#
|
|
576
|
-
# @param lead_count [Integer] The number of pending referrals the participant made that have not converted
|
|
577
|
-
#
|
|
578
|
-
# @param metadata [Hash{Symbol=>Object}] Shallow custom metadata object.
|
|
579
|
-
#
|
|
580
|
-
# @param monthly_rank [Integer]
|
|
581
|
-
#
|
|
582
|
-
# @param monthly_referral_count [Integer]
|
|
583
|
-
#
|
|
584
|
-
# @param monthly_referrals [Array<String>]
|
|
585
|
-
#
|
|
586
|
-
# @param prev_monthly_rank [Integer]
|
|
587
|
-
#
|
|
588
|
-
# @param prev_monthly_referral_count [Integer]
|
|
589
|
-
#
|
|
590
|
-
# @param rank [Integer]
|
|
591
|
-
#
|
|
592
|
-
# @param referral_count [Integer]
|
|
593
|
-
#
|
|
594
|
-
# @param referrals [Array<String>]
|
|
595
|
-
#
|
|
596
|
-
# @param referral_source [Symbol, GrowsurfRuby::Models::Campaign::ReferralSource]
|
|
597
|
-
#
|
|
598
|
-
# @param referral_status [Symbol, GrowsurfRuby::Models::Campaign::ReferralStatus]
|
|
599
|
-
#
|
|
600
|
-
# @param share_count [Hash{Symbol=>Integer}]
|
|
601
|
-
#
|
|
602
|
-
# @param share_url [String]
|
|
603
|
-
#
|
|
604
|
-
# @param unique_impression_count [Integer]
|
|
605
|
-
#
|
|
606
|
-
# @param unsubscribed [Boolean]
|
|
406
|
+
class Referrer < GrowsurfRuby::Models::Campaign::CampaignParticipant
|
|
607
407
|
end
|
|
608
408
|
end
|
|
609
409
|
end
|