growsurf-ruby 1.17.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 +26 -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_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_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_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
|
@@ -22,7 +22,13 @@ module GrowsurfRuby
|
|
|
22
22
|
)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
# Adds a webhook to the program.
|
|
25
|
+
# Adds a webhook to the program. A program can have only one saved Bask Health
|
|
26
|
+
# webhook across all `bask.ninja` hosts and paths, including disabled webhooks. A
|
|
27
|
+
# second Bask Health webhook returns `400`.
|
|
28
|
+
# A program can have up to 5 webhooks, counting the primary webhook slot, so you
|
|
29
|
+
# can create up to 4. Creating another returns `400`.
|
|
30
|
+
# A concurrent change to webhook settings can return `409`; reload the webhooks
|
|
31
|
+
# before retrying.
|
|
26
32
|
#
|
|
27
33
|
# @overload create(id, payload_url:, events: nil, is_enabled: nil, secret: nil, request_options: {})
|
|
28
34
|
#
|
|
@@ -30,7 +36,7 @@ module GrowsurfRuby
|
|
|
30
36
|
#
|
|
31
37
|
# @param payload_url [String] Body param: The URL that receives webhook deliveries.
|
|
32
38
|
#
|
|
33
|
-
# @param events [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>] Body param: The events this webhook is subscribed to. When omitted,
|
|
39
|
+
# @param events [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>] Body param: The events this webhook is subscribed to. When omitted, the webhook i
|
|
34
40
|
#
|
|
35
41
|
# @param is_enabled [Boolean] Body param
|
|
36
42
|
#
|
|
@@ -52,7 +58,11 @@ module GrowsurfRuby
|
|
|
52
58
|
)
|
|
53
59
|
end
|
|
54
60
|
|
|
55
|
-
# Updates a webhook by id.
|
|
61
|
+
# Updates a webhook by id. A program can have only one saved Bask Health webhook
|
|
62
|
+
# across all `bask.ninja` hosts and paths, including disabled webhooks. An update
|
|
63
|
+
# that leaves more than one Bask Health webhook returns `400`.
|
|
64
|
+
# A concurrent change to webhook settings can return `409`; reload the webhooks
|
|
65
|
+
# before retrying.
|
|
56
66
|
#
|
|
57
67
|
# @overload update(webhook_id, id:, events: nil, is_enabled: nil, payload_url: nil, secret: nil, request_options: {})
|
|
58
68
|
#
|
|
@@ -26,6 +26,10 @@ module GrowsurfRuby
|
|
|
26
26
|
# @return [GrowsurfRuby::Resources::Campaign::Design]
|
|
27
27
|
attr_reader :design
|
|
28
28
|
|
|
29
|
+
# Custom domain operations for a program's landing pages.
|
|
30
|
+
# @return [GrowsurfRuby::Resources::Campaign::CustomDomain]
|
|
31
|
+
attr_reader :custom_domain
|
|
32
|
+
|
|
29
33
|
# Program Editor "Emails" tab configuration operations.
|
|
30
34
|
# @return [GrowsurfRuby::Resources::Campaign::Emails]
|
|
31
35
|
attr_reader :emails
|
|
@@ -91,9 +95,9 @@ module GrowsurfRuby
|
|
|
91
95
|
#
|
|
92
96
|
# @param type [Symbol, GrowsurfRuby::Models::CampaignCreateParams::Type] The program type. Immutable after creation.
|
|
93
97
|
#
|
|
94
|
-
# @param company_logo_image_url [String]
|
|
98
|
+
# @param company_logo_image_url [String, nil]
|
|
95
99
|
#
|
|
96
|
-
# @param company_name [String]
|
|
100
|
+
# @param company_name [String, nil]
|
|
97
101
|
#
|
|
98
102
|
# @param currency_iso [String] ISO 4217 currency code. Defaults to USD. Chosen when the program is created and immutable afterward — it cannot be changed on update.
|
|
99
103
|
#
|
|
@@ -125,17 +129,16 @@ module GrowsurfRuby
|
|
|
125
129
|
# dedicated config sub-resources, not here. The program cannot be deleted via this
|
|
126
130
|
# endpoint.
|
|
127
131
|
# Changes to participant email content are checked before saving. Rejected content
|
|
128
|
-
# returns `400
|
|
129
|
-
#
|
|
130
|
-
# before retrying.
|
|
132
|
+
# returns `400` and is not saved. A concurrent edit can return `409`; reload the
|
|
133
|
+
# program before retrying.
|
|
131
134
|
#
|
|
132
135
|
# @overload update(id, company_logo_image_url: nil, company_name: nil, name: nil, status: nil, request_options: {})
|
|
133
136
|
#
|
|
134
137
|
# @param id [String] Path param: GrowSurf program ID.
|
|
135
138
|
#
|
|
136
|
-
# @param company_logo_image_url [String] Body param
|
|
139
|
+
# @param company_logo_image_url [String, nil] Body param
|
|
137
140
|
#
|
|
138
|
-
# @param company_name [String] Body param
|
|
141
|
+
# @param company_name [String, nil] Body param
|
|
139
142
|
#
|
|
140
143
|
# @param name [String] Body param
|
|
141
144
|
#
|
|
@@ -240,7 +243,7 @@ module GrowsurfRuby
|
|
|
240
243
|
# participant endpoints. Use this endpoint from your backend after your mobile app
|
|
241
244
|
# authenticates a signed-in user. The program must have mobile SDK access enabled.
|
|
242
245
|
#
|
|
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: {})
|
|
246
|
+
# @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_at: nil, referred_by: nil, request_options: {})
|
|
244
247
|
#
|
|
245
248
|
# @param id [String] GrowSurf program ID.
|
|
246
249
|
#
|
|
@@ -252,7 +255,7 @@ module GrowsurfRuby
|
|
|
252
255
|
#
|
|
253
256
|
# @param ip_address [String]
|
|
254
257
|
#
|
|
255
|
-
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails.
|
|
258
|
+
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails. Stored when it is one of the program's languages. A regional tag maps to its language (for example, `es-MX` is stored as `es`). Any other value is ignored and the program's base language applies. Applied only when this request creates the participant.
|
|
256
259
|
#
|
|
257
260
|
# @param last_name [String]
|
|
258
261
|
#
|
|
@@ -262,6 +265,8 @@ module GrowsurfRuby
|
|
|
262
265
|
#
|
|
263
266
|
# @param referral_status [Symbol, GrowsurfRuby::Models::Campaign::Create::ReferralStatus]
|
|
264
267
|
#
|
|
268
|
+
# @param referred_at [Integer, nil] When the participant was referred, in Unix milliseconds. Used only with a valid `referredBy`. If you omit `referralStatus`, GrowSurf compares this time with the program's referral credit window to set it. Defaults to the time of the request.
|
|
269
|
+
#
|
|
265
270
|
# @param referred_by [String] Referrer participant ID or email address.
|
|
266
271
|
#
|
|
267
272
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -732,6 +737,7 @@ module GrowsurfRuby
|
|
|
732
737
|
@rewards = GrowsurfRuby::Resources::Campaign::Rewards.new(client: client)
|
|
733
738
|
@resources = GrowsurfRuby::Resources::Campaign::ProgramResources.new(client: client)
|
|
734
739
|
@design = GrowsurfRuby::Resources::Campaign::Design.new(client: client)
|
|
740
|
+
@custom_domain = GrowsurfRuby::Resources::Campaign::CustomDomain.new(client: client)
|
|
735
741
|
@emails = GrowsurfRuby::Resources::Campaign::Emails.new(client: client)
|
|
736
742
|
@options = GrowsurfRuby::Resources::Campaign::Options.new(client: client)
|
|
737
743
|
@installation = GrowsurfRuby::Resources::Campaign::Installation.new(client: client)
|
data/lib/growsurf_ruby.rb
CHANGED
|
@@ -59,6 +59,9 @@ require_relative "growsurf_ruby/models/campaign_engagement_analytics"
|
|
|
59
59
|
require_relative "growsurf_ruby/models/campaign/create"
|
|
60
60
|
require_relative "growsurf_ruby/models/campaign/participant"
|
|
61
61
|
require_relative "growsurf_ruby/models/campaign/campaign_reward_list_response"
|
|
62
|
+
require_relative "growsurf_ruby/models/campaign/campaign_custom_domain"
|
|
63
|
+
require_relative "growsurf_ruby/models/campaign/custom_domain_set_params"
|
|
64
|
+
require_relative "growsurf_ruby/models/campaign/delete_campaign_custom_domain_response"
|
|
62
65
|
require_relative "growsurf_ruby/models/campaign/commission_approve_params"
|
|
63
66
|
require_relative "growsurf_ruby/models/campaign/commission_approve_response"
|
|
64
67
|
require_relative "growsurf_ruby/models/campaign/commission_delete_params"
|
|
@@ -178,6 +181,7 @@ require_relative "growsurf_ruby/resources/account"
|
|
|
178
181
|
require_relative "growsurf_ruby/resources/team"
|
|
179
182
|
require_relative "growsurf_ruby/resources/campaign"
|
|
180
183
|
require_relative "growsurf_ruby/resources/campaign/commission"
|
|
184
|
+
require_relative "growsurf_ruby/resources/campaign/custom_domain"
|
|
181
185
|
require_relative "growsurf_ruby/resources/campaign/design"
|
|
182
186
|
require_relative "growsurf_ruby/resources/campaign/emails"
|
|
183
187
|
require_relative "growsurf_ruby/resources/campaign/installation"
|
|
@@ -146,6 +146,70 @@ module GrowsurfRuby
|
|
|
146
146
|
sig { returns(Integer) }
|
|
147
147
|
attr_accessor :status
|
|
148
148
|
|
|
149
|
+
# Error name returned for the failed request.
|
|
150
|
+
sig { returns(T.nilable(String)) }
|
|
151
|
+
attr_reader :error_name
|
|
152
|
+
|
|
153
|
+
# Stable machine-readable error code.
|
|
154
|
+
sig { returns(T.nilable(String)) }
|
|
155
|
+
attr_reader :error_code
|
|
156
|
+
|
|
157
|
+
# Human-readable error message.
|
|
158
|
+
sig { returns(T.nilable(String)) }
|
|
159
|
+
attr_reader :error_message
|
|
160
|
+
|
|
161
|
+
# Optional validation details for specific request fields.
|
|
162
|
+
sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) }
|
|
163
|
+
attr_reader :errors
|
|
164
|
+
|
|
165
|
+
# Support URL related to the error, when available.
|
|
166
|
+
sig { returns(T.nilable(String)) }
|
|
167
|
+
attr_reader :support_url
|
|
168
|
+
|
|
169
|
+
# Rate-limit policy name for `429` errors, when available.
|
|
170
|
+
sig { returns(T.nilable(String)) }
|
|
171
|
+
attr_reader :policy_name
|
|
172
|
+
|
|
173
|
+
# Error severity level, when available.
|
|
174
|
+
sig { returns(T.nilable(String)) }
|
|
175
|
+
attr_reader :level
|
|
176
|
+
|
|
177
|
+
# When the error response was created.
|
|
178
|
+
sig { returns(T.nilable(String)) }
|
|
179
|
+
attr_reader :timestamp
|
|
180
|
+
|
|
181
|
+
# Fraud risk level assigned to the blocked signup.
|
|
182
|
+
sig { returns(T.nilable(String)) }
|
|
183
|
+
attr_reader :fraud_risk_level
|
|
184
|
+
|
|
185
|
+
# Machine-readable reason code for the fraud decision.
|
|
186
|
+
sig { returns(T.nilable(String)) }
|
|
187
|
+
attr_reader :fraud_reason_code
|
|
188
|
+
|
|
189
|
+
# Existing participant IDs related to the fraud match.
|
|
190
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
191
|
+
attr_reader :matched_participant_ids
|
|
192
|
+
|
|
193
|
+
# Email address from the blocked signup attempt.
|
|
194
|
+
sig { returns(T.nilable(String)) }
|
|
195
|
+
attr_reader :email
|
|
196
|
+
|
|
197
|
+
# Referrer participant ID supplied with the blocked signup, or `null`.
|
|
198
|
+
sig { returns(T.nilable(String)) }
|
|
199
|
+
attr_reader :referrer_id
|
|
200
|
+
|
|
201
|
+
# IP address supplied with the blocked signup, or `null`.
|
|
202
|
+
sig { returns(T.nilable(String)) }
|
|
203
|
+
attr_reader :ip_address
|
|
204
|
+
|
|
205
|
+
# Browser fingerprint supplied with the blocked signup, or `null`.
|
|
206
|
+
sig { returns(T.nilable(String)) }
|
|
207
|
+
attr_reader :fingerprint
|
|
208
|
+
|
|
209
|
+
# When the signup was blocked.
|
|
210
|
+
sig { returns(T.nilable(String)) }
|
|
211
|
+
attr_reader :blocked_at
|
|
212
|
+
|
|
149
213
|
# @api private
|
|
150
214
|
sig do
|
|
151
215
|
params(
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class CampaignCustomDomain < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
GrowsurfRuby::Campaign::CampaignCustomDomain,
|
|
11
|
+
GrowsurfRuby::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# When the domain was set, in epoch milliseconds. `null` when no domain is set.
|
|
16
|
+
sig { returns(T.nilable(Integer)) }
|
|
17
|
+
attr_accessor :created_at
|
|
18
|
+
|
|
19
|
+
# The DNS record to add at your DNS provider. `null` when no domain is set.
|
|
20
|
+
sig do
|
|
21
|
+
returns(T.nilable(GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord))
|
|
22
|
+
end
|
|
23
|
+
attr_reader :dns_record
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
dns_record:
|
|
28
|
+
T.nilable(
|
|
29
|
+
GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord::OrHash
|
|
30
|
+
)
|
|
31
|
+
).void
|
|
32
|
+
end
|
|
33
|
+
attr_writer :dns_record
|
|
34
|
+
|
|
35
|
+
# The custom domain, such as `https://refer.piedpiper.com`, or `null` when none is
|
|
36
|
+
# set.
|
|
37
|
+
sig { returns(T.nilable(String)) }
|
|
38
|
+
attr_accessor :domain
|
|
39
|
+
|
|
40
|
+
# Whether the domain's `CNAME` record pointed to `dns_record.value` at the last
|
|
41
|
+
# check. Landing pages load on the domain only when this is `true`.
|
|
42
|
+
sig { returns(T::Boolean) }
|
|
43
|
+
attr_accessor :is_verified
|
|
44
|
+
|
|
45
|
+
# When the domain record last changed, in epoch milliseconds. `null` when no
|
|
46
|
+
# domain is set.
|
|
47
|
+
sig { returns(T.nilable(Integer)) }
|
|
48
|
+
attr_accessor :updated_at
|
|
49
|
+
|
|
50
|
+
# When the DNS check passed, in epoch milliseconds. `null` while unverified.
|
|
51
|
+
sig { returns(T.nilable(Integer)) }
|
|
52
|
+
attr_accessor :verified_at
|
|
53
|
+
|
|
54
|
+
# The custom domain that serves a program's landing pages.
|
|
55
|
+
sig do
|
|
56
|
+
params(
|
|
57
|
+
created_at: T.nilable(Integer),
|
|
58
|
+
dns_record:
|
|
59
|
+
T.nilable(
|
|
60
|
+
GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord::OrHash
|
|
61
|
+
),
|
|
62
|
+
domain: T.nilable(String),
|
|
63
|
+
is_verified: T::Boolean,
|
|
64
|
+
updated_at: T.nilable(Integer),
|
|
65
|
+
verified_at: T.nilable(Integer)
|
|
66
|
+
).returns(T.attached_class)
|
|
67
|
+
end
|
|
68
|
+
def self.new(
|
|
69
|
+
# When the domain was set, in epoch milliseconds. `null` when no domain is set.
|
|
70
|
+
created_at:,
|
|
71
|
+
# The DNS record to add at your DNS provider. `null` when no domain is set.
|
|
72
|
+
dns_record:,
|
|
73
|
+
# The custom domain, such as `https://refer.piedpiper.com`, or `null` when none is
|
|
74
|
+
# set.
|
|
75
|
+
domain:,
|
|
76
|
+
# Whether the domain's `CNAME` record pointed to `dns_record.value` at the last
|
|
77
|
+
# check. Landing pages load on the domain only when this is `true`.
|
|
78
|
+
is_verified:,
|
|
79
|
+
# When the domain record last changed, in epoch milliseconds. `null` when no
|
|
80
|
+
# domain is set.
|
|
81
|
+
updated_at:,
|
|
82
|
+
# When the DNS check passed, in epoch milliseconds. `null` while unverified.
|
|
83
|
+
verified_at:
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
sig do
|
|
88
|
+
override.returns(
|
|
89
|
+
{
|
|
90
|
+
created_at: T.nilable(Integer),
|
|
91
|
+
dns_record:
|
|
92
|
+
T.nilable(GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord),
|
|
93
|
+
domain: T.nilable(String),
|
|
94
|
+
is_verified: T::Boolean,
|
|
95
|
+
updated_at: T.nilable(Integer),
|
|
96
|
+
verified_at: T.nilable(Integer)
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
def to_hash
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
class DNSRecord < GrowsurfRuby::Internal::Type::BaseModel
|
|
104
|
+
OrHash =
|
|
105
|
+
T.type_alias do
|
|
106
|
+
T.any(
|
|
107
|
+
GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord,
|
|
108
|
+
GrowsurfRuby::Internal::AnyHash
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# The hostname the record is for, such as `refer.piedpiper.com`.
|
|
113
|
+
sig { returns(String) }
|
|
114
|
+
attr_accessor :name
|
|
115
|
+
|
|
116
|
+
# The record type. Always `CNAME`.
|
|
117
|
+
sig do
|
|
118
|
+
returns(
|
|
119
|
+
GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord::Type::TaggedSymbol
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
attr_accessor :type
|
|
123
|
+
|
|
124
|
+
# The record's target, such as `grow.surf`.
|
|
125
|
+
sig { returns(String) }
|
|
126
|
+
attr_accessor :value
|
|
127
|
+
|
|
128
|
+
# The DNS record to add at your DNS provider.
|
|
129
|
+
sig do
|
|
130
|
+
params(
|
|
131
|
+
name: String,
|
|
132
|
+
type:
|
|
133
|
+
GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord::Type::OrSymbol,
|
|
134
|
+
value: String
|
|
135
|
+
).returns(T.attached_class)
|
|
136
|
+
end
|
|
137
|
+
def self.new(
|
|
138
|
+
# The hostname the record is for, such as `refer.piedpiper.com`.
|
|
139
|
+
name:,
|
|
140
|
+
# The record type. Always `CNAME`.
|
|
141
|
+
type:,
|
|
142
|
+
# The record's target, such as `grow.surf`.
|
|
143
|
+
value:
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
sig do
|
|
148
|
+
override.returns(
|
|
149
|
+
{
|
|
150
|
+
name: String,
|
|
151
|
+
type:
|
|
152
|
+
GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord::Type::TaggedSymbol,
|
|
153
|
+
value: String
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
def to_hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# The record type. Always `CNAME`.
|
|
161
|
+
module Type
|
|
162
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
163
|
+
|
|
164
|
+
TaggedSymbol =
|
|
165
|
+
T.type_alias do
|
|
166
|
+
T.all(
|
|
167
|
+
Symbol,
|
|
168
|
+
GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord::Type
|
|
169
|
+
)
|
|
170
|
+
end
|
|
171
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
172
|
+
|
|
173
|
+
CNAME =
|
|
174
|
+
T.let(
|
|
175
|
+
:CNAME,
|
|
176
|
+
GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord::Type::TaggedSymbol
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
sig do
|
|
180
|
+
override.returns(
|
|
181
|
+
T::Array[
|
|
182
|
+
GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord::Type::TaggedSymbol
|
|
183
|
+
]
|
|
184
|
+
)
|
|
185
|
+
end
|
|
186
|
+
def self.values
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
@@ -43,8 +43,11 @@ 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.
|
|
47
|
-
# program's languages.
|
|
46
|
+
# The language of the participant's portal and program emails. Stored when it is
|
|
47
|
+
# one of the program's languages. A regional tag maps to its language (for
|
|
48
|
+
# example, `es-MX` is stored as `es`). Any other value is ignored and the
|
|
49
|
+
# program's base language applies. Applied only when this request creates the
|
|
50
|
+
# participant.
|
|
48
51
|
sig { returns(T.nilable(GrowsurfRuby::Campaign::Language::OrSymbol)) }
|
|
49
52
|
attr_reader :language
|
|
50
53
|
|
|
@@ -94,6 +97,13 @@ module GrowsurfRuby
|
|
|
94
97
|
end
|
|
95
98
|
attr_writer :referral_status
|
|
96
99
|
|
|
100
|
+
# When the participant was referred, in Unix milliseconds. Used only with a valid
|
|
101
|
+
# `referredBy`. If you omit `referralStatus`, GrowSurf compares this time with
|
|
102
|
+
# the program's referral credit window to set it. Defaults to the time of the
|
|
103
|
+
# request.
|
|
104
|
+
sig { returns(T.nilable(Integer)) }
|
|
105
|
+
attr_accessor :referred_at
|
|
106
|
+
|
|
97
107
|
# Referrer participant ID or email address.
|
|
98
108
|
sig { returns(T.nilable(String)) }
|
|
99
109
|
attr_reader :referred_by
|
|
@@ -114,6 +124,7 @@ module GrowsurfRuby
|
|
|
114
124
|
mobile_instance_id: String,
|
|
115
125
|
referral_status:
|
|
116
126
|
GrowsurfRuby::Campaign::Create::ReferralStatus::OrSymbol,
|
|
127
|
+
referred_at: T.nilable(Integer),
|
|
117
128
|
referred_by: String
|
|
118
129
|
).returns(T.attached_class)
|
|
119
130
|
end
|
|
@@ -127,8 +138,11 @@ module GrowsurfRuby
|
|
|
127
138
|
# a non-affiliate without `affiliateStatus`. Existing participants are returned
|
|
128
139
|
# unchanged.
|
|
129
140
|
is_affiliate: nil,
|
|
130
|
-
# The language of the participant's portal and program emails.
|
|
131
|
-
# program's languages.
|
|
141
|
+
# The language of the participant's portal and program emails. Stored when it is
|
|
142
|
+
# one of the program's languages. A regional tag maps to its language (for
|
|
143
|
+
# example, `es-MX` is stored as `es`). Any other value is ignored and the
|
|
144
|
+
# program's base language applies. Applied only when this request creates the
|
|
145
|
+
# participant.
|
|
132
146
|
language: nil,
|
|
133
147
|
last_name: nil,
|
|
134
148
|
# Shallow custom metadata object.
|
|
@@ -142,6 +156,11 @@ module GrowsurfRuby
|
|
|
142
156
|
# (`CREDIT_AWARDED`, `CREDIT_PENDING`, or `CREDIT_EXPIRED`); left unset when no
|
|
143
157
|
# referrer resolves.
|
|
144
158
|
referral_status: nil,
|
|
159
|
+
# When the participant was referred, in Unix milliseconds. Used only with a valid
|
|
160
|
+
# `referredBy`. If you omit `referralStatus`, GrowSurf compares this time with
|
|
161
|
+
# the program's referral credit window to set it. Defaults to the time of the
|
|
162
|
+
# request.
|
|
163
|
+
referred_at: nil,
|
|
145
164
|
# Referrer participant ID or email address.
|
|
146
165
|
referred_by: nil
|
|
147
166
|
)
|
|
@@ -161,6 +180,7 @@ module GrowsurfRuby
|
|
|
161
180
|
mobile_instance_id: String,
|
|
162
181
|
referral_status:
|
|
163
182
|
GrowsurfRuby::Campaign::Create::ReferralStatus::OrSymbol,
|
|
183
|
+
referred_at: T.nilable(Integer),
|
|
164
184
|
referred_by: String
|
|
165
185
|
}
|
|
166
186
|
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class CustomDomainSetParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
GrowsurfRuby::Campaign::CustomDomainSetParams,
|
|
14
|
+
GrowsurfRuby::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# The hostname to serve the program's landing pages from, with or without
|
|
19
|
+
# `https://`. Up to 255 characters.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :domain
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
domain: String,
|
|
26
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
27
|
+
).returns(T.attached_class)
|
|
28
|
+
end
|
|
29
|
+
def self.new(
|
|
30
|
+
# The hostname to serve the program's landing pages from, with or without
|
|
31
|
+
# `https://`. Up to 255 characters.
|
|
32
|
+
domain:,
|
|
33
|
+
request_options: {}
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
override.returns(
|
|
39
|
+
{ domain: String, request_options: GrowsurfRuby::RequestOptions }
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class DeleteCampaignCustomDomainResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
GrowsurfRuby::Models::Campaign::DeleteCampaignCustomDomainResponse,
|
|
11
|
+
GrowsurfRuby::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The custom domain that was removed, such as `https://refer.piedpiper.com`.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :domain
|
|
18
|
+
|
|
19
|
+
# Whether the custom domain was removed.
|
|
20
|
+
sig { returns(T::Boolean) }
|
|
21
|
+
attr_accessor :success
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(domain: String, success: T::Boolean).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(
|
|
27
|
+
# The custom domain that was removed, such as `https://refer.piedpiper.com`.
|
|
28
|
+
domain:,
|
|
29
|
+
# Whether the custom domain was removed.
|
|
30
|
+
success:
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig { override.returns({ domain: String, success: T::Boolean }) }
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|