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
|
@@ -124,7 +124,10 @@ module GrowsurfRuby
|
|
|
124
124
|
end
|
|
125
125
|
|
|
126
126
|
# Adds a new participant to the program. If the email already exists, the existing
|
|
127
|
-
# participant is returned unchanged.
|
|
127
|
+
# participant is returned unchanged. One exception: if that participant claimed an
|
|
128
|
+
# offer in the Claim Offer Popup and the signup is not complete yet, this call completes
|
|
129
|
+
# the signup with the original referrer and saves any non-blank `firstName`,
|
|
130
|
+
# `lastName`, and `metadata` you send. For affiliate programs, set `isAffiliate` to
|
|
128
131
|
# `true` to enroll a new participant as an approved affiliate or `false` to create
|
|
129
132
|
# a non-affiliate. If you omit `isAffiliate`, a valid `referredBy` creates a
|
|
130
133
|
# referred non-affiliate; without a valid referrer, the new participant is enrolled
|
|
@@ -145,6 +148,7 @@ module GrowsurfRuby
|
|
|
145
148
|
mobile_instance_id: String,
|
|
146
149
|
referral_status:
|
|
147
150
|
GrowsurfRuby::Campaign::Create::ReferralStatus::OrSymbol,
|
|
151
|
+
referred_at: T.nilable(Integer),
|
|
148
152
|
referred_by: String,
|
|
149
153
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
150
154
|
).returns(GrowsurfRuby::Campaign::CampaignParticipant)
|
|
@@ -161,8 +165,11 @@ module GrowsurfRuby
|
|
|
161
165
|
# creates a non-affiliate without `affiliateStatus`. Existing participants are
|
|
162
166
|
# returned unchanged.
|
|
163
167
|
is_affiliate: nil,
|
|
164
|
-
# The language of the participant's portal and program emails.
|
|
165
|
-
# program's languages.
|
|
168
|
+
# The language of the participant's portal and program emails. Stored when it is
|
|
169
|
+
# one of the program's languages. A regional tag maps to its language (for
|
|
170
|
+
# example, `es-MX` is stored as `es`). Any other value is ignored and the
|
|
171
|
+
# program's base language applies. Applied only when this request creates the
|
|
172
|
+
# participant.
|
|
166
173
|
language: nil,
|
|
167
174
|
last_name: nil,
|
|
168
175
|
# Shallow custom metadata object.
|
|
@@ -176,6 +183,11 @@ module GrowsurfRuby
|
|
|
176
183
|
# (`CREDIT_AWARDED`, `CREDIT_PENDING`, or `CREDIT_EXPIRED`); left unset when no
|
|
177
184
|
# referrer resolves.
|
|
178
185
|
referral_status: nil,
|
|
186
|
+
# When the participant was referred, in Unix milliseconds. Used only with a valid
|
|
187
|
+
# `referredBy`. If you omit `referralStatus`, GrowSurf compares this time with
|
|
188
|
+
# the program's referral credit window to set it. Defaults to the time of the
|
|
189
|
+
# request.
|
|
190
|
+
referred_at: nil,
|
|
179
191
|
# Referrer participant ID or email address.
|
|
180
192
|
referred_by: nil,
|
|
181
193
|
request_options: {}
|
|
@@ -341,7 +353,7 @@ module GrowsurfRuby
|
|
|
341
353
|
total_tax_amounts: T::Array[T::Hash[Symbol, T.anything]],
|
|
342
354
|
total_taxes: T::Array[T::Hash[Symbol, T.anything]],
|
|
343
355
|
transaction_id: String,
|
|
344
|
-
payment_provider:
|
|
356
|
+
payment_provider: GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider::OrSymbol,
|
|
345
357
|
test_mode: T::Boolean,
|
|
346
358
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
347
359
|
).returns(
|
|
@@ -432,7 +444,7 @@ module GrowsurfRuby
|
|
|
432
444
|
refund_id: String,
|
|
433
445
|
refund_status: String,
|
|
434
446
|
transaction_id: String,
|
|
435
|
-
payment_provider:
|
|
447
|
+
payment_provider: GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider::OrSymbol,
|
|
436
448
|
test_mode: T::Boolean,
|
|
437
449
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
438
450
|
).returns(
|
|
@@ -591,16 +603,19 @@ module GrowsurfRuby
|
|
|
591
603
|
# dynamic text, inserting `{{...}}` tokens like `{{firstName}}` or `{{shareUrl}}`.
|
|
592
604
|
# See [Guide to using dynamic text in GrowSurf emails](https://support.growsurf.com/article/213-guide-to-using-dynamic-text-in-growsurf-emails).
|
|
593
605
|
body: nil,
|
|
594
|
-
# Body param: The program email template to
|
|
595
|
-
# camelCase key. The
|
|
596
|
-
# controls automatic sends.
|
|
597
|
-
#
|
|
598
|
-
#
|
|
599
|
-
#
|
|
600
|
-
# `welcomeNonReferred`, `referralLinkViewedFirstTime`, `
|
|
601
|
-
# `
|
|
602
|
-
# `
|
|
603
|
-
#
|
|
606
|
+
# Body param: The program email template to trigger (template mode). Send the
|
|
607
|
+
# camelCase email-type key. The available types depend on the program type;
|
|
608
|
+
# the template's `isEnabled` setting controls automatic sends only. This
|
|
609
|
+
# endpoint can trigger any sendable template. System and transactional types
|
|
610
|
+
# (login link, payout destination confirmation, tax notifications), the invite
|
|
611
|
+
# email, and the follow-up reminder cannot be sent. Referral programs:
|
|
612
|
+
# `welcomeNonReferred`, `referralLinkViewedFirstTime`, `referralLinkUsed`,
|
|
613
|
+
# `referredSignup`, `welcomeReferred`, `offerClaimed`, `goalAchieved`,
|
|
614
|
+
# `campaignEndedWinners`, `campaignEndedNonWinners`, `progressUpdateMonthly`.
|
|
615
|
+
# Affiliate programs: `welcomeNonReferred`, `referralLinkViewedFirstTime`,
|
|
616
|
+
# `referredSignup`, `offerClaimed`, `commissionGenerated`,
|
|
617
|
+
# `commissionAdjusted`, `payoutPending`, `payoutSentSuccess`,
|
|
618
|
+
# `progressUpdateMonthly`.
|
|
604
619
|
email_type: nil,
|
|
605
620
|
# Body param: Optional preheader text for a free-form email.
|
|
606
621
|
preheader: nil,
|
|
@@ -105,6 +105,18 @@ module GrowsurfRuby
|
|
|
105
105
|
limit_duration: nil,
|
|
106
106
|
# Body param: Custom key/value metadata (single-level; values are stored as
|
|
107
107
|
# strings).
|
|
108
|
+
# Each value must be a string, number, or boolean of up to 500 characters.
|
|
109
|
+
# Each key must have 1 to 40 characters once camelCased, and two keys that
|
|
110
|
+
# camelCase to the same key are rejected. Up to 50 keys. An entry that breaks
|
|
111
|
+
# these rules returns `400`.
|
|
112
|
+
#
|
|
113
|
+
# For `DOUBLE_SIDED` rewards in referral programs, `rewardAmount` is the
|
|
114
|
+
# referrer’s amount and `referredRewardAmount` is the friend’s amount. If
|
|
115
|
+
# `referredRewardAmount` is absent, both use `rewardAmount`. New or changed positive
|
|
116
|
+
# numeric amounts must use whole units for currencies without decimals, such as JPY, and
|
|
117
|
+
# no more than two decimal places for other currencies, including USD and KWD. Excess
|
|
118
|
+
# precision is rejected rather than rounded, including when you clone a program.
|
|
119
|
+
# Existing unchanged amounts and earned rewards keep their saved values.
|
|
108
120
|
metadata: nil,
|
|
109
121
|
# Body param: Text shown before a participant's referral count in
|
|
110
122
|
# milestone-progress copy. Applies to `MILESTONE` rewards.
|
|
@@ -145,8 +157,7 @@ module GrowsurfRuby
|
|
|
145
157
|
# the referencing fields. For an affiliate reward, `commissionStructure.event:
|
|
146
158
|
# LEAD` requires a `FIXED` commission with a positive `amount`.
|
|
147
159
|
# Changes to participant email content are checked before saving. Rejected content
|
|
148
|
-
# returns `400
|
|
149
|
-
# response saves the change. A concurrent edit can return `409`; reload the
|
|
160
|
+
# returns `400` and is not saved. A concurrent edit can return `409`; reload the
|
|
150
161
|
# program before retrying.
|
|
151
162
|
sig do
|
|
152
163
|
params(
|
|
@@ -223,6 +234,18 @@ module GrowsurfRuby
|
|
|
223
234
|
limit_duration: nil,
|
|
224
235
|
# Body param: Custom key/value metadata (single-level; values are stored as
|
|
225
236
|
# strings).
|
|
237
|
+
# Each value must be a string, number, or boolean of up to 500 characters.
|
|
238
|
+
# Each key must have 1 to 40 characters once camelCased, and two keys that
|
|
239
|
+
# camelCase to the same key are rejected. Up to 50 keys. An entry that breaks
|
|
240
|
+
# these rules returns `400`.
|
|
241
|
+
#
|
|
242
|
+
# For `DOUBLE_SIDED` rewards in referral programs, `rewardAmount` is the
|
|
243
|
+
# referrer’s amount and `referredRewardAmount` is the friend’s amount. If
|
|
244
|
+
# `referredRewardAmount` is absent, both use `rewardAmount`. New or changed positive
|
|
245
|
+
# numeric amounts must use whole units for currencies without decimals, such as JPY, and
|
|
246
|
+
# no more than two decimal places for other currencies, including USD and KWD. Excess
|
|
247
|
+
# precision is rejected rather than rounded, including when you clone a program.
|
|
248
|
+
# Existing unchanged amounts and earned rewards keep their saved values.
|
|
226
249
|
metadata: nil,
|
|
227
250
|
# Body param: Text shown before a participant's referral count in
|
|
228
251
|
# milestone-progress copy. Applies to `MILESTONE` rewards.
|
|
@@ -18,7 +18,13 @@ module GrowsurfRuby
|
|
|
18
18
|
)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
# Adds a webhook to the program.
|
|
21
|
+
# Adds a webhook to the program. A program can have only one saved Bask Health
|
|
22
|
+
# webhook across all `bask.ninja` hosts and paths, including disabled webhooks. A
|
|
23
|
+
# second Bask Health webhook returns `400`.
|
|
24
|
+
# A program can have up to 5 webhooks, counting the primary webhook slot, so you
|
|
25
|
+
# can create up to 4. Creating another returns `400`.
|
|
26
|
+
# A concurrent change to webhook settings can return `409`; reload the webhooks
|
|
27
|
+
# before retrying.
|
|
22
28
|
sig do
|
|
23
29
|
params(
|
|
24
30
|
id: String,
|
|
@@ -34,8 +40,15 @@ module GrowsurfRuby
|
|
|
34
40
|
id,
|
|
35
41
|
# Body param: The URL that receives webhook deliveries.
|
|
36
42
|
payload_url:,
|
|
37
|
-
# Body param: The events this webhook is subscribed to. When omitted,
|
|
38
|
-
# subscribed to
|
|
43
|
+
# Body param: The events this webhook is subscribed to. When omitted, the
|
|
44
|
+
# webhook is subscribed to every event its program type offers, like a webhook
|
|
45
|
+
# added in the dashboard: referral programs offer
|
|
46
|
+
# `PARTICIPANT_REACHED_A_GOAL`, `NEW_PARTICIPANT_ADDED`,
|
|
47
|
+
# `PARTICIPANT_FRAUD_STATUS_UPDATED`, and `CAMPAIGN_ENDED`; affiliate programs
|
|
48
|
+
# offer `NEW_COMMISSION_ADDED`, `COMMISSION_ADJUSTED`, `NEW_PAYOUT_ISSUED`,
|
|
49
|
+
# `NEW_PARTICIPANT_ADDED`, `PARTICIPANT_FRAUD_STATUS_UPDATED`, and
|
|
50
|
+
# `CAMPAIGN_ENDED`. Send `[]` to subscribe to no events. An event the program
|
|
51
|
+
# type does not offer returns `400`.
|
|
39
52
|
events: nil,
|
|
40
53
|
# Body param
|
|
41
54
|
is_enabled: nil,
|
|
@@ -46,7 +59,11 @@ module GrowsurfRuby
|
|
|
46
59
|
)
|
|
47
60
|
end
|
|
48
61
|
|
|
49
|
-
# Updates a webhook by id.
|
|
62
|
+
# Updates a webhook by id. A program can have only one saved Bask Health webhook
|
|
63
|
+
# across all `bask.ninja` hosts and paths, including disabled webhooks. An update
|
|
64
|
+
# that leaves more than one Bask Health webhook returns `400`.
|
|
65
|
+
# A concurrent change to webhook settings can return `409`; reload the webhooks
|
|
66
|
+
# before retrying.
|
|
50
67
|
sig do
|
|
51
68
|
params(
|
|
52
69
|
webhook_id: String,
|
|
@@ -26,6 +26,10 @@ module GrowsurfRuby
|
|
|
26
26
|
sig { returns(GrowsurfRuby::Resources::Campaign::Design) }
|
|
27
27
|
attr_reader :design
|
|
28
28
|
|
|
29
|
+
# Custom domain operations for a program's landing pages.
|
|
30
|
+
sig { returns(GrowsurfRuby::Resources::Campaign::CustomDomain) }
|
|
31
|
+
attr_reader :custom_domain
|
|
32
|
+
|
|
29
33
|
# Program Editor "Emails" tab configuration operations.
|
|
30
34
|
sig { returns(GrowsurfRuby::Resources::Campaign::Emails) }
|
|
31
35
|
attr_reader :emails
|
|
@@ -74,8 +78,8 @@ module GrowsurfRuby
|
|
|
74
78
|
sig do
|
|
75
79
|
params(
|
|
76
80
|
type: GrowsurfRuby::CampaignCreateParams::Type::OrSymbol,
|
|
77
|
-
company_logo_image_url: String,
|
|
78
|
-
company_name: String,
|
|
81
|
+
company_logo_image_url: T.nilable(String),
|
|
82
|
+
company_name: T.nilable(String),
|
|
79
83
|
currency_iso: String,
|
|
80
84
|
goal: GrowsurfRuby::CampaignCreateParams::Goal::OrSymbol,
|
|
81
85
|
name: String,
|
|
@@ -111,14 +115,13 @@ module GrowsurfRuby
|
|
|
111
115
|
# dedicated config sub-resources, not here. The program cannot be deleted via this
|
|
112
116
|
# endpoint.
|
|
113
117
|
# Changes to participant email content are checked before saving. Rejected content
|
|
114
|
-
# returns `400
|
|
115
|
-
#
|
|
116
|
-
# before retrying.
|
|
118
|
+
# returns `400` and is not saved. A concurrent edit can return `409`; reload the
|
|
119
|
+
# program before retrying.
|
|
117
120
|
sig do
|
|
118
121
|
params(
|
|
119
122
|
id: String,
|
|
120
|
-
company_logo_image_url: String,
|
|
121
|
-
company_name: String,
|
|
123
|
+
company_logo_image_url: T.nilable(String),
|
|
124
|
+
company_name: T.nilable(String),
|
|
122
125
|
name: String,
|
|
123
126
|
status: GrowsurfRuby::CampaignUpdateParams::Status::OrSymbol,
|
|
124
127
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
@@ -220,6 +223,7 @@ module GrowsurfRuby
|
|
|
220
223
|
mobile_instance_id: String,
|
|
221
224
|
referral_status:
|
|
222
225
|
GrowsurfRuby::Campaign::Create::ReferralStatus::OrSymbol,
|
|
226
|
+
referred_at: T.nilable(Integer),
|
|
223
227
|
referred_by: String,
|
|
224
228
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
225
229
|
).returns(
|
|
@@ -233,8 +237,11 @@ module GrowsurfRuby
|
|
|
233
237
|
fingerprint: nil,
|
|
234
238
|
first_name: nil,
|
|
235
239
|
ip_address: nil,
|
|
236
|
-
# The language of the participant's portal and program emails.
|
|
237
|
-
# program's languages.
|
|
240
|
+
# The language of the participant's portal and program emails. Stored when it is
|
|
241
|
+
# one of the program's languages. A regional tag maps to its language (for
|
|
242
|
+
# example, `es-MX` is stored as `es`). Any other value is ignored and the
|
|
243
|
+
# program's base language applies. Applied only when this request creates the
|
|
244
|
+
# participant.
|
|
238
245
|
language: nil,
|
|
239
246
|
last_name: nil,
|
|
240
247
|
# Shallow custom metadata object.
|
|
@@ -244,6 +251,11 @@ module GrowsurfRuby
|
|
|
244
251
|
# mobile SDKs generate this as a lowercase UUID.
|
|
245
252
|
mobile_instance_id: nil,
|
|
246
253
|
referral_status: nil,
|
|
254
|
+
# When the participant was referred, in Unix milliseconds. Used only with a valid
|
|
255
|
+
# `referredBy`. If you omit `referralStatus`, GrowSurf compares this time with
|
|
256
|
+
# the program's referral credit window to set it. Defaults to the time of the
|
|
257
|
+
# request.
|
|
258
|
+
referred_at: nil,
|
|
247
259
|
# Referrer participant ID or email address.
|
|
248
260
|
referred_by: nil,
|
|
249
261
|
request_options: {}
|
|
@@ -71,6 +71,38 @@ module GrowsurfRuby
|
|
|
71
71
|
?message: String?
|
|
72
72
|
) -> instance
|
|
73
73
|
|
|
74
|
+
attr_reader error_name: String?
|
|
75
|
+
|
|
76
|
+
attr_reader error_code: String?
|
|
77
|
+
|
|
78
|
+
attr_reader error_message: String?
|
|
79
|
+
|
|
80
|
+
attr_reader errors: ::Array[::Hash[Symbol, top]]?
|
|
81
|
+
|
|
82
|
+
attr_reader support_url: String?
|
|
83
|
+
|
|
84
|
+
attr_reader policy_name: String?
|
|
85
|
+
|
|
86
|
+
attr_reader level: String?
|
|
87
|
+
|
|
88
|
+
attr_reader timestamp: String?
|
|
89
|
+
|
|
90
|
+
attr_reader fraud_risk_level: String?
|
|
91
|
+
|
|
92
|
+
attr_reader fraud_reason_code: String?
|
|
93
|
+
|
|
94
|
+
attr_reader matched_participant_ids: ::Array[String]?
|
|
95
|
+
|
|
96
|
+
attr_reader email: String?
|
|
97
|
+
|
|
98
|
+
attr_reader referrer_id: String?
|
|
99
|
+
|
|
100
|
+
attr_reader ip_address: String?
|
|
101
|
+
|
|
102
|
+
attr_reader fingerprint: String?
|
|
103
|
+
|
|
104
|
+
attr_reader blocked_at: String?
|
|
105
|
+
|
|
74
106
|
def initialize: (
|
|
75
107
|
url: URI::Generic,
|
|
76
108
|
status: Integer,
|
|
@@ -80,6 +112,14 @@ module GrowsurfRuby
|
|
|
80
112
|
response: nil,
|
|
81
113
|
?message: String?
|
|
82
114
|
) -> void
|
|
115
|
+
|
|
116
|
+
private
|
|
117
|
+
|
|
118
|
+
def string_or_nil: (top value) -> String?
|
|
119
|
+
|
|
120
|
+
def string_list_or_nil: (top value) -> ::Array[String]?
|
|
121
|
+
|
|
122
|
+
def hash_list_or_nil: (top value) -> ::Array[::Hash[Symbol, top]]?
|
|
83
123
|
end
|
|
84
124
|
|
|
85
125
|
class BadRequestError < GrowsurfRuby::Errors::APIStatusError
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type campaign_custom_domain =
|
|
5
|
+
{
|
|
6
|
+
created_at: Integer?,
|
|
7
|
+
dns_record: GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord?,
|
|
8
|
+
domain: String?,
|
|
9
|
+
is_verified: bool,
|
|
10
|
+
updated_at: Integer?,
|
|
11
|
+
verified_at: Integer?
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class CampaignCustomDomain < GrowsurfRuby::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor created_at: Integer?
|
|
16
|
+
|
|
17
|
+
attr_accessor dns_record: GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord?
|
|
18
|
+
|
|
19
|
+
attr_accessor domain: String?
|
|
20
|
+
|
|
21
|
+
attr_accessor is_verified: bool
|
|
22
|
+
|
|
23
|
+
attr_accessor updated_at: Integer?
|
|
24
|
+
|
|
25
|
+
attr_accessor verified_at: Integer?
|
|
26
|
+
|
|
27
|
+
def initialize: (
|
|
28
|
+
created_at: Integer?,
|
|
29
|
+
dns_record: GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord?,
|
|
30
|
+
domain: String?,
|
|
31
|
+
is_verified: bool,
|
|
32
|
+
updated_at: Integer?,
|
|
33
|
+
verified_at: Integer?
|
|
34
|
+
) -> void
|
|
35
|
+
|
|
36
|
+
def to_hash: -> {
|
|
37
|
+
created_at: Integer?,
|
|
38
|
+
dns_record: GrowsurfRuby::Campaign::CampaignCustomDomain::DNSRecord?,
|
|
39
|
+
domain: String?,
|
|
40
|
+
is_verified: bool,
|
|
41
|
+
updated_at: Integer?,
|
|
42
|
+
verified_at: Integer?
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type dns_record =
|
|
46
|
+
{
|
|
47
|
+
name: String,
|
|
48
|
+
type: GrowsurfRuby::Models::Campaign::CampaignCustomDomain::DNSRecord::type_,
|
|
49
|
+
value: String
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
class DNSRecord < GrowsurfRuby::Internal::Type::BaseModel
|
|
53
|
+
attr_accessor name: String
|
|
54
|
+
|
|
55
|
+
attr_accessor type: GrowsurfRuby::Models::Campaign::CampaignCustomDomain::DNSRecord::type_
|
|
56
|
+
|
|
57
|
+
attr_accessor value: String
|
|
58
|
+
|
|
59
|
+
def initialize: (
|
|
60
|
+
name: String,
|
|
61
|
+
type: GrowsurfRuby::Models::Campaign::CampaignCustomDomain::DNSRecord::type_,
|
|
62
|
+
value: String
|
|
63
|
+
) -> void
|
|
64
|
+
|
|
65
|
+
def to_hash: -> {
|
|
66
|
+
name: String,
|
|
67
|
+
type: GrowsurfRuby::Models::Campaign::CampaignCustomDomain::DNSRecord::type_,
|
|
68
|
+
value: String
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type type_ = :CNAME
|
|
72
|
+
|
|
73
|
+
module Type
|
|
74
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
75
|
+
|
|
76
|
+
CNAME: :CNAME
|
|
77
|
+
|
|
78
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::CampaignCustomDomain::DNSRecord::type_]
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -13,6 +13,7 @@ module GrowsurfRuby
|
|
|
13
13
|
metadata: ::Hash[Symbol, top],
|
|
14
14
|
mobile_instance_id: String,
|
|
15
15
|
referral_status: GrowsurfRuby::Models::Campaign::Create::referral_status,
|
|
16
|
+
referred_at: Integer?,
|
|
16
17
|
referred_by: String
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -59,6 +60,8 @@ module GrowsurfRuby
|
|
|
59
60
|
GrowsurfRuby::Models::Campaign::Create::referral_status
|
|
60
61
|
) -> GrowsurfRuby::Models::Campaign::Create::referral_status
|
|
61
62
|
|
|
63
|
+
attr_accessor referred_at: Integer?
|
|
64
|
+
|
|
62
65
|
attr_reader referred_by: String?
|
|
63
66
|
|
|
64
67
|
def referred_by=: (String) -> String
|
|
@@ -74,6 +77,7 @@ module GrowsurfRuby
|
|
|
74
77
|
?metadata: ::Hash[Symbol, top],
|
|
75
78
|
?mobile_instance_id: String,
|
|
76
79
|
?referral_status: GrowsurfRuby::Models::Campaign::Create::referral_status,
|
|
80
|
+
?referred_at: Integer?,
|
|
77
81
|
?referred_by: String
|
|
78
82
|
) -> void
|
|
79
83
|
|
|
@@ -88,6 +92,7 @@ module GrowsurfRuby
|
|
|
88
92
|
metadata: ::Hash[Symbol, top],
|
|
89
93
|
mobile_instance_id: String,
|
|
90
94
|
referral_status: GrowsurfRuby::Models::Campaign::Create::referral_status,
|
|
95
|
+
referred_at: Integer?,
|
|
91
96
|
referred_by: String
|
|
92
97
|
}
|
|
93
98
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type custom_domain_set_params =
|
|
5
|
+
{ domain: String } & GrowsurfRuby::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class CustomDomainSetParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor domain: String
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
domain: String,
|
|
15
|
+
?request_options: GrowsurfRuby::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
domain: String,
|
|
20
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
module Campaign
|
|
4
|
+
type delete_campaign_custom_domain_response =
|
|
5
|
+
{ domain: String, success: bool }
|
|
6
|
+
|
|
7
|
+
class DeleteCampaignCustomDomainResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
attr_accessor domain: String
|
|
9
|
+
|
|
10
|
+
attr_accessor success: bool
|
|
11
|
+
|
|
12
|
+
def initialize: (domain: String, success: bool) -> void
|
|
13
|
+
|
|
14
|
+
def to_hash: -> { domain: String, success: bool }
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|