growsurf-ruby 1.2.1 → 1.3.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 +14 -0
- data/LICENSE +201 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/internal/transport/base_client.rb +21 -4
- data/lib/growsurf_ruby/models/affiliate_application.rb +249 -0
- data/lib/growsurf_ruby/models/affiliate_application_list_response.rb +42 -0
- data/lib/growsurf_ruby/models/affiliate_invite.rb +109 -0
- data/lib/growsurf_ruby/models/affiliate_invite_list_response.rb +41 -0
- data/lib/growsurf_ruby/models/campaign/create.rb +12 -1
- data/lib/growsurf_ruby/models/campaign/participant.rb +79 -4
- data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +28 -17
- data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rb +28 -0
- data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rb +126 -0
- data/lib/growsurf_ruby/models/campaign/participant_list_payouts_params.rb +1 -0
- data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rb +50 -0
- data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rb +56 -0
- data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +14 -17
- data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +25 -9
- data/lib/growsurf_ruby/models/campaign/referral_source.rb +3 -0
- data/lib/growsurf_ruby/models/campaign/reward.rb +20 -3
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +3 -3
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +3 -3
- data/lib/growsurf_ruby/models/campaign.rb +2 -2
- data/lib/growsurf_ruby/models/campaign_create_affiliate_invite_params.rb +45 -0
- data/lib/growsurf_ruby/models/campaign_list_affiliate_applications_params.rb +57 -0
- data/lib/growsurf_ruby/models/campaign_list_affiliate_invites_params.rb +58 -0
- data/lib/growsurf_ruby/models/campaign_list_payouts_params.rb +1 -0
- data/lib/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rb +26 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rb +26 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +9 -6
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +59 -11
- data/lib/growsurf_ruby/models/campaign_review_affiliate_application_params.rb +94 -0
- data/lib/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rb +26 -0
- data/lib/growsurf_ruby/models/email_analytics.rb +41 -0
- data/lib/growsurf_ruby/models/participant_payout_list.rb +8 -1
- data/lib/growsurf_ruby/models/reward_tax_valuation.rb +24 -9
- data/lib/growsurf_ruby/models.rb +19 -0
- data/lib/growsurf_ruby/resources/campaign/design.rb +14 -12
- data/lib/growsurf_ruby/resources/campaign/options.rb +7 -7
- data/lib/growsurf_ruby/resources/campaign/participant.rb +96 -11
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +2 -2
- data/lib/growsurf_ruby/resources/campaign.rb +231 -4
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +16 -0
- data/rbi/growsurf_ruby/models/affiliate_application.rbi +431 -0
- data/rbi/growsurf_ruby/models/affiliate_application_list_response.rbi +70 -0
- data/rbi/growsurf_ruby/models/affiliate_invite.rbi +167 -0
- data/rbi/growsurf_ruby/models/affiliate_invite_list_response.rbi +70 -0
- data/rbi/growsurf_ruby/models/campaign/create.rbi +17 -0
- data/rbi/growsurf_ruby/models/campaign/participant.rbi +169 -3
- data/rbi/growsurf_ruby/models/campaign/participant_activity_logs_response.rbi +3 -5
- data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +35 -20
- data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbi +3 -1
- data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rbi +48 -0
- data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbi +243 -0
- data/rbi/growsurf_ruby/models/campaign/participant_list_payouts_params.rbi +5 -0
- data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbi +100 -0
- data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbi +118 -0
- data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +22 -52
- data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +67 -11
- data/rbi/growsurf_ruby/models/campaign/referral_source.rbi +9 -0
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +23 -2
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +4 -4
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +4 -4
- data/rbi/growsurf_ruby/models/campaign.rbi +2 -2
- data/rbi/growsurf_ruby/models/campaign_create_affiliate_invite_params.rbi +74 -0
- data/rbi/growsurf_ruby/models/campaign_list_affiliate_applications_params.rbi +130 -0
- data/rbi/growsurf_ruby/models/campaign_list_affiliate_invites_params.rbi +135 -0
- data/rbi/growsurf_ruby/models/campaign_list_payouts_params.rbi +5 -0
- data/rbi/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rbi +46 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rbi +46 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +15 -10
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +68 -18
- data/rbi/growsurf_ruby/models/campaign_review_affiliate_application_params.rbi +167 -0
- data/rbi/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rbi +46 -0
- data/rbi/growsurf_ruby/models/email_analytics.rbi +200 -0
- data/rbi/growsurf_ruby/models/participant_payout_list.rbi +17 -3
- data/rbi/growsurf_ruby/models/reward_tax_valuation.rbi +66 -9
- data/rbi/growsurf_ruby/models.rbi +25 -0
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +9 -8
- data/rbi/growsurf_ruby/resources/campaign/options.rbi +7 -7
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +89 -13
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +4 -4
- data/rbi/growsurf_ruby/resources/campaign.rbi +188 -10
- data/sig/growsurf_ruby/models/affiliate_application.rbs +192 -0
- data/sig/growsurf_ruby/models/affiliate_application_list_response.rbs +39 -0
- data/sig/growsurf_ruby/models/affiliate_invite.rbs +92 -0
- data/sig/growsurf_ruby/models/affiliate_invite_list_response.rbs +39 -0
- data/sig/growsurf_ruby/models/campaign/create.rbs +7 -0
- data/sig/growsurf_ruby/models/campaign/participant.rbs +62 -2
- data/sig/growsurf_ruby/models/campaign/participant_activity_logs_response.rbs +2 -11
- data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +12 -12
- data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbs +107 -0
- data/sig/growsurf_ruby/models/campaign/participant_list_payouts_params.rbs +2 -1
- data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbs +49 -0
- data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbs +57 -0
- data/sig/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbs +5 -13
- data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +21 -7
- data/sig/growsurf_ruby/models/campaign/referral_source.rbs +4 -1
- data/sig/growsurf_ruby/models/campaign/reward.rbs +12 -0
- data/sig/growsurf_ruby/models/campaign_create_affiliate_invite_params.rbs +40 -0
- data/sig/growsurf_ruby/models/campaign_list_affiliate_applications_params.rbs +61 -0
- data/sig/growsurf_ruby/models/campaign_list_affiliate_invites_params.rbs +62 -0
- data/sig/growsurf_ruby/models/campaign_list_payouts_params.rbs +2 -1
- data/sig/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rbs +28 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rbs +28 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +36 -16
- data/sig/growsurf_ruby/models/campaign_review_affiliate_application_params.rbs +79 -0
- data/sig/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rbs +28 -0
- data/sig/growsurf_ruby/models/email_analytics.rbs +92 -0
- data/sig/growsurf_ruby/models/participant_payout_list.rbs +12 -4
- data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +26 -4
- data/sig/growsurf_ruby/models.rbs +18 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +16 -2
- data/sig/growsurf_ruby/resources/campaign.rbs +53 -0
- metadata +54 -3
|
@@ -61,7 +61,7 @@ module GrowsurfRuby
|
|
|
61
61
|
def list(request_options: {})
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
# Creates a new program, plus any optional
|
|
64
|
+
# Creates a new program, plus any optional campaign rewards. The new program is
|
|
65
65
|
# created in `DRAFT` status and owned by the API key's bound team.
|
|
66
66
|
sig do
|
|
67
67
|
params(
|
|
@@ -82,7 +82,7 @@ module GrowsurfRuby
|
|
|
82
82
|
# ISO 4217 currency code. Defaults to USD. Chosen when the program is created and
|
|
83
83
|
# immutable afterward — it cannot be changed on update.
|
|
84
84
|
currency_iso: nil,
|
|
85
|
-
# The program name. Defaults to
|
|
85
|
+
# The program name. Defaults to a generated friendly label plus the creation date.
|
|
86
86
|
name: nil,
|
|
87
87
|
# Optional inline rewards to create with the program.
|
|
88
88
|
rewards: nil,
|
|
@@ -136,6 +136,31 @@ module GrowsurfRuby
|
|
|
136
136
|
)
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
+
# Invites someone to join the affiliate program. GrowSurf emails them a single-use
|
|
140
|
+
# accept link; accepting it enrolls them as an approved affiliate without going
|
|
141
|
+
# through the public application. One active invite can exist per email address.
|
|
142
|
+
sig do
|
|
143
|
+
params(
|
|
144
|
+
id: String,
|
|
145
|
+
email: String,
|
|
146
|
+
first_name: String,
|
|
147
|
+
last_name: String,
|
|
148
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
149
|
+
).returns(GrowsurfRuby::AffiliateInvite)
|
|
150
|
+
end
|
|
151
|
+
def create_affiliate_invite(
|
|
152
|
+
# GrowSurf program ID.
|
|
153
|
+
id,
|
|
154
|
+
# Valid email address to invite. Maximum 255 characters.
|
|
155
|
+
email:,
|
|
156
|
+
# Invitee first name, used in the invite email. Maximum 255 characters.
|
|
157
|
+
first_name: nil,
|
|
158
|
+
# Invitee last name. Maximum 255 characters.
|
|
159
|
+
last_name: nil,
|
|
160
|
+
request_options: {}
|
|
161
|
+
)
|
|
162
|
+
end
|
|
163
|
+
|
|
139
164
|
# Creates or returns a participant using the same input behavior as Add
|
|
140
165
|
# Participant, then returns a participant-scoped token for GrowSurf mobile SDK
|
|
141
166
|
# participant endpoints. Use this endpoint from your backend after your mobile app
|
|
@@ -179,6 +204,57 @@ module GrowsurfRuby
|
|
|
179
204
|
)
|
|
180
205
|
end
|
|
181
206
|
|
|
207
|
+
# Lists an affiliate program's applications, newest first. Applications exist on
|
|
208
|
+
# programs that review public signups (an `affiliateApplicationMode` of
|
|
209
|
+
# `MANUAL_REVIEW` or `AUTO_APPROVE`). A pending applicant is not a participant
|
|
210
|
+
# until their application is approved.
|
|
211
|
+
sig do
|
|
212
|
+
params(
|
|
213
|
+
id: String,
|
|
214
|
+
limit: Integer,
|
|
215
|
+
offset: Integer,
|
|
216
|
+
status:
|
|
217
|
+
GrowsurfRuby::CampaignListAffiliateApplicationsParams::Status::OrSymbol,
|
|
218
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
219
|
+
).returns(GrowsurfRuby::Models::AffiliateApplicationListResponse)
|
|
220
|
+
end
|
|
221
|
+
def list_affiliate_applications(
|
|
222
|
+
# GrowSurf program ID.
|
|
223
|
+
id,
|
|
224
|
+
# How many applications to return per page (1-100).
|
|
225
|
+
limit: nil,
|
|
226
|
+
# Offset number used to skip through a result set.
|
|
227
|
+
offset: nil,
|
|
228
|
+
# Only return applications with this status.
|
|
229
|
+
status: nil,
|
|
230
|
+
request_options: {}
|
|
231
|
+
)
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Lists an affiliate program's enrollment invites, newest first.
|
|
235
|
+
sig do
|
|
236
|
+
params(
|
|
237
|
+
id: String,
|
|
238
|
+
limit: Integer,
|
|
239
|
+
offset: Integer,
|
|
240
|
+
status:
|
|
241
|
+
GrowsurfRuby::CampaignListAffiliateInvitesParams::Status::OrSymbol,
|
|
242
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
243
|
+
).returns(GrowsurfRuby::Models::AffiliateInviteListResponse)
|
|
244
|
+
end
|
|
245
|
+
def list_affiliate_invites(
|
|
246
|
+
# GrowSurf program ID.
|
|
247
|
+
id,
|
|
248
|
+
# How many invites to return per page (1-100).
|
|
249
|
+
limit: nil,
|
|
250
|
+
# Offset number used to skip through a result set.
|
|
251
|
+
offset: nil,
|
|
252
|
+
# Only return invites with this status.
|
|
253
|
+
status: nil,
|
|
254
|
+
request_options: {}
|
|
255
|
+
)
|
|
256
|
+
end
|
|
257
|
+
|
|
182
258
|
# **Affiliate programs only.** Retrieves a paged list of all participant
|
|
183
259
|
# commissions in an affiliate program.
|
|
184
260
|
sig do
|
|
@@ -315,9 +391,47 @@ module GrowsurfRuby
|
|
|
315
391
|
)
|
|
316
392
|
end
|
|
317
393
|
|
|
318
|
-
#
|
|
319
|
-
#
|
|
320
|
-
|
|
394
|
+
# Re-sends a pending invite with a fresh accept link (the previous link stops working).
|
|
395
|
+
# Resends are rate limited per invite; retry after a few minutes if a resend was just sent.
|
|
396
|
+
sig do
|
|
397
|
+
params(
|
|
398
|
+
invite_id: String,
|
|
399
|
+
id: String,
|
|
400
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
401
|
+
).returns(GrowsurfRuby::AffiliateInvite)
|
|
402
|
+
end
|
|
403
|
+
def resend_affiliate_invite(
|
|
404
|
+
# Affiliate invite ID.
|
|
405
|
+
invite_id,
|
|
406
|
+
# GrowSurf program ID.
|
|
407
|
+
id:,
|
|
408
|
+
request_options: {}
|
|
409
|
+
)
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# Returns one affiliate application, including its submitted form answers.
|
|
413
|
+
sig do
|
|
414
|
+
params(
|
|
415
|
+
application_id: String,
|
|
416
|
+
id: String,
|
|
417
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
418
|
+
).returns(GrowsurfRuby::AffiliateApplication)
|
|
419
|
+
end
|
|
420
|
+
def retrieve_affiliate_application(
|
|
421
|
+
# Affiliate application ID.
|
|
422
|
+
application_id,
|
|
423
|
+
# GrowSurf program ID.
|
|
424
|
+
id:,
|
|
425
|
+
request_options: {}
|
|
426
|
+
)
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# Retrieves analytics for a program. Pass `interval` to also get a time-series (`series`)
|
|
430
|
+
# alongside the totals, and `include` to add previous-period totals, status breakdowns,
|
|
431
|
+
# derived rates, or email performance. Add `email` to `include` for `sent` (accepted for
|
|
432
|
+
# delivery), `delivered`, `opened`, `clicked`, `bounced`, and `spamComplaints` metrics plus
|
|
433
|
+
# per-email-type breakdowns. Email rates are ratios from `0` to `1`, and `isPartial`
|
|
434
|
+
# identifies windows that begin before complete coverage.
|
|
321
435
|
sig do
|
|
322
436
|
params(
|
|
323
437
|
id: String,
|
|
@@ -338,11 +452,14 @@ module GrowsurfRuby
|
|
|
338
452
|
# End date of the analytics timeframe as a Unix timestamp in milliseconds.
|
|
339
453
|
# Required if `days` is not set.
|
|
340
454
|
end_date: nil,
|
|
341
|
-
# Comma-separated list of optional
|
|
342
|
-
#
|
|
343
|
-
#
|
|
344
|
-
#
|
|
345
|
-
#
|
|
455
|
+
# Comma-separated list of optional data to include: `previousPeriod` adds totals for the
|
|
456
|
+
# equal-length window immediately before the requested one; `statusCounts` adds reward
|
|
457
|
+
# (and, for affiliate programs, affiliate/commission/payout) status breakdowns; `rates`
|
|
458
|
+
# adds derived referral rates; `email` adds `sent`, `delivered`, `opened`, `clicked`,
|
|
459
|
+
# `bounced`, `spamComplaints`, and per-email-type metrics. When `email` and an interval
|
|
460
|
+
# are both requested, each `series` item also contains counts for emails sent during that
|
|
461
|
+
# period. Combine `email` with `previousPeriod` to include the same email metrics in both
|
|
462
|
+
# windows.
|
|
346
463
|
include: nil,
|
|
347
464
|
# When set to `day`, `week`, or `month`, the response also includes a `series` array
|
|
348
465
|
# with per-period totals. Defaults to `total` (no series).
|
|
@@ -354,6 +471,67 @@ module GrowsurfRuby
|
|
|
354
471
|
)
|
|
355
472
|
end
|
|
356
473
|
|
|
474
|
+
# Decides a pending application. Set `status` to `APPROVED` to enroll the applicant
|
|
475
|
+
# (this creates the participant, or upgrades an existing participant with the same
|
|
476
|
+
# email), or to `DENIED` with an optional `rejectionReason`. A denied applicant may
|
|
477
|
+
# reapply after the program's reapplication cooldown; send an earlier
|
|
478
|
+
# `reapplyAllowedAt` (without `status`) to shorten that wait for one applicant.
|
|
479
|
+
# Provide exactly one of `status` or `reapplyAllowedAt`. Denial-only fields are
|
|
480
|
+
# only valid with `status` set to `DENIED`. Approval is idempotent: repeating it
|
|
481
|
+
# returns the same participant.
|
|
482
|
+
sig do
|
|
483
|
+
params(
|
|
484
|
+
application_id: String,
|
|
485
|
+
id: String,
|
|
486
|
+
allow_immediate_reapply: T::Boolean,
|
|
487
|
+
reapply_allowed_at: Integer,
|
|
488
|
+
rejection_reason: String,
|
|
489
|
+
review_note: String,
|
|
490
|
+
status:
|
|
491
|
+
GrowsurfRuby::CampaignReviewAffiliateApplicationParams::Status::OrSymbol,
|
|
492
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
493
|
+
).returns(GrowsurfRuby::AffiliateApplication)
|
|
494
|
+
end
|
|
495
|
+
def review_affiliate_application(
|
|
496
|
+
# Affiliate application ID.
|
|
497
|
+
application_id,
|
|
498
|
+
# GrowSurf program ID.
|
|
499
|
+
id:,
|
|
500
|
+
# Only valid when `status` is `DENIED`; let the applicant reapply right away.
|
|
501
|
+
allow_immediate_reapply: nil,
|
|
502
|
+
# For an already-denied application, move the reapplication window to this earlier
|
|
503
|
+
# time, in Unix milliseconds. Send without `status`.
|
|
504
|
+
reapply_allowed_at: nil,
|
|
505
|
+
# Short reason recorded with a denial. Only valid when `status` is `DENIED`.
|
|
506
|
+
# Maximum 255 characters.
|
|
507
|
+
rejection_reason: nil,
|
|
508
|
+
# Private note recorded with a denial. Only valid when `status` is `DENIED`; never
|
|
509
|
+
# shown to the applicant. Maximum 500 characters.
|
|
510
|
+
review_note: nil,
|
|
511
|
+
# The decision. `APPROVED` enrolls the applicant as an affiliate; `DENIED` closes
|
|
512
|
+
# the application.
|
|
513
|
+
status: nil,
|
|
514
|
+
request_options: {}
|
|
515
|
+
)
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# Revokes a pending invite. Its emailed accept link stops working immediately.
|
|
519
|
+
sig do
|
|
520
|
+
params(
|
|
521
|
+
invite_id: String,
|
|
522
|
+
id: String,
|
|
523
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
524
|
+
).returns(GrowsurfRuby::AffiliateInvite)
|
|
525
|
+
end
|
|
526
|
+
def revoke_affiliate_invite(
|
|
527
|
+
# Affiliate invite ID.
|
|
528
|
+
invite_id,
|
|
529
|
+
# GrowSurf program ID.
|
|
530
|
+
id:,
|
|
531
|
+
request_options: {}
|
|
532
|
+
)
|
|
533
|
+
end
|
|
534
|
+
|
|
357
535
|
# @api private
|
|
358
536
|
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
359
537
|
def self.new(client:)
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type affiliate_application =
|
|
4
|
+
{
|
|
5
|
+
answers: ::Array[GrowsurfRuby::AffiliateApplication::Answer],
|
|
6
|
+
created_at: Integer,
|
|
7
|
+
decided_at: Integer?,
|
|
8
|
+
email: String?,
|
|
9
|
+
first_name: String?,
|
|
10
|
+
id: String,
|
|
11
|
+
last_name: String?,
|
|
12
|
+
participant_id: String?,
|
|
13
|
+
reapply_allowed_at: Integer?,
|
|
14
|
+
rejection_reason: String?,
|
|
15
|
+
reviewed_at: Integer?,
|
|
16
|
+
risk_level: GrowsurfRuby::Models::AffiliateApplication::risk_level?,
|
|
17
|
+
status: GrowsurfRuby::Models::AffiliateApplication::status,
|
|
18
|
+
terms_accepted_at: Integer?
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
class AffiliateApplication < GrowsurfRuby::Internal::Type::BaseModel
|
|
22
|
+
attr_reader answers: ::Array[GrowsurfRuby::AffiliateApplication::Answer]
|
|
23
|
+
|
|
24
|
+
def answers=: (
|
|
25
|
+
::Array[GrowsurfRuby::AffiliateApplication::Answer]
|
|
26
|
+
) -> ::Array[GrowsurfRuby::AffiliateApplication::Answer]
|
|
27
|
+
|
|
28
|
+
attr_reader created_at: Integer
|
|
29
|
+
|
|
30
|
+
def created_at=: (Integer) -> Integer
|
|
31
|
+
|
|
32
|
+
attr_accessor decided_at: Integer?
|
|
33
|
+
|
|
34
|
+
attr_accessor email: String?
|
|
35
|
+
|
|
36
|
+
attr_accessor first_name: String?
|
|
37
|
+
|
|
38
|
+
attr_reader id: String
|
|
39
|
+
|
|
40
|
+
def id=: (String) -> String
|
|
41
|
+
|
|
42
|
+
attr_accessor last_name: String?
|
|
43
|
+
|
|
44
|
+
attr_accessor participant_id: String?
|
|
45
|
+
|
|
46
|
+
attr_accessor reapply_allowed_at: Integer?
|
|
47
|
+
|
|
48
|
+
attr_accessor rejection_reason: String?
|
|
49
|
+
|
|
50
|
+
attr_accessor reviewed_at: Integer?
|
|
51
|
+
|
|
52
|
+
attr_accessor risk_level: GrowsurfRuby::Models::AffiliateApplication::risk_level?
|
|
53
|
+
|
|
54
|
+
attr_reader status: GrowsurfRuby::Models::AffiliateApplication::status
|
|
55
|
+
|
|
56
|
+
def status=: (
|
|
57
|
+
GrowsurfRuby::Models::AffiliateApplication::status
|
|
58
|
+
) -> GrowsurfRuby::Models::AffiliateApplication::status
|
|
59
|
+
|
|
60
|
+
attr_reader terms_accepted_at: Integer?
|
|
61
|
+
|
|
62
|
+
def terms_accepted_at=: (Integer?) -> Integer?
|
|
63
|
+
|
|
64
|
+
def initialize: (
|
|
65
|
+
answers: ::Array[GrowsurfRuby::AffiliateApplication::Answer],
|
|
66
|
+
created_at: Integer,
|
|
67
|
+
decided_at: Integer?,
|
|
68
|
+
email: String?,
|
|
69
|
+
first_name: String?,
|
|
70
|
+
id: String,
|
|
71
|
+
last_name: String?,
|
|
72
|
+
participant_id: String?,
|
|
73
|
+
reapply_allowed_at: Integer?,
|
|
74
|
+
rejection_reason: String?,
|
|
75
|
+
reviewed_at: Integer?,
|
|
76
|
+
risk_level: GrowsurfRuby::Models::AffiliateApplication::risk_level?,
|
|
77
|
+
status: GrowsurfRuby::Models::AffiliateApplication::status,
|
|
78
|
+
terms_accepted_at: Integer?
|
|
79
|
+
) -> void
|
|
80
|
+
|
|
81
|
+
def to_hash: -> {
|
|
82
|
+
answers: ::Array[GrowsurfRuby::AffiliateApplication::Answer],
|
|
83
|
+
created_at: Integer,
|
|
84
|
+
decided_at: Integer?,
|
|
85
|
+
email: String?,
|
|
86
|
+
first_name: String?,
|
|
87
|
+
id: String,
|
|
88
|
+
last_name: String?,
|
|
89
|
+
participant_id: String?,
|
|
90
|
+
reapply_allowed_at: Integer?,
|
|
91
|
+
rejection_reason: String?,
|
|
92
|
+
reviewed_at: Integer?,
|
|
93
|
+
risk_level: GrowsurfRuby::Models::AffiliateApplication::risk_level?,
|
|
94
|
+
status: GrowsurfRuby::Models::AffiliateApplication::status,
|
|
95
|
+
terms_accepted_at: Integer?
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
type answer =
|
|
99
|
+
{
|
|
100
|
+
field_id: String,
|
|
101
|
+
label: String,
|
|
102
|
+
type: GrowsurfRuby::Models::AffiliateApplication::answer_type,
|
|
103
|
+
value: String | Integer | Float | bool
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
class Answer < GrowsurfRuby::Internal::Type::BaseModel
|
|
107
|
+
attr_reader field_id: String
|
|
108
|
+
|
|
109
|
+
def field_id=: (String) -> String
|
|
110
|
+
|
|
111
|
+
attr_reader label: String
|
|
112
|
+
|
|
113
|
+
def label=: (String) -> String
|
|
114
|
+
|
|
115
|
+
attr_reader type: GrowsurfRuby::Models::AffiliateApplication::answer_type
|
|
116
|
+
|
|
117
|
+
def type=: (
|
|
118
|
+
GrowsurfRuby::Models::AffiliateApplication::answer_type
|
|
119
|
+
) -> GrowsurfRuby::Models::AffiliateApplication::answer_type
|
|
120
|
+
|
|
121
|
+
attr_reader value: String | Integer | Float | bool
|
|
122
|
+
|
|
123
|
+
def value=: (
|
|
124
|
+
String | Integer | Float | bool
|
|
125
|
+
) -> (String | Integer | Float | bool)
|
|
126
|
+
|
|
127
|
+
def initialize: (
|
|
128
|
+
field_id: String,
|
|
129
|
+
label: String,
|
|
130
|
+
type: GrowsurfRuby::Models::AffiliateApplication::answer_type,
|
|
131
|
+
value: String | Integer | Float | bool
|
|
132
|
+
) -> void
|
|
133
|
+
|
|
134
|
+
def to_hash: -> {
|
|
135
|
+
field_id: String,
|
|
136
|
+
label: String,
|
|
137
|
+
type: GrowsurfRuby::Models::AffiliateApplication::answer_type,
|
|
138
|
+
value: String | Integer | Float | bool
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
module Type
|
|
142
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
143
|
+
|
|
144
|
+
TEXT: :text
|
|
145
|
+
TEXTAREA: :textarea
|
|
146
|
+
URL: :url
|
|
147
|
+
COUNTRY: :country
|
|
148
|
+
NUMBER: :number
|
|
149
|
+
DROPDOWN: :dropdown
|
|
150
|
+
RADIO: :radio
|
|
151
|
+
CHECKBOX: :checkbox
|
|
152
|
+
|
|
153
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::AffiliateApplication::answer_type]
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
type answer_type =
|
|
158
|
+
:text
|
|
159
|
+
| :textarea
|
|
160
|
+
| :url
|
|
161
|
+
| :country
|
|
162
|
+
| :number
|
|
163
|
+
| :dropdown
|
|
164
|
+
| :radio
|
|
165
|
+
| :checkbox
|
|
166
|
+
|
|
167
|
+
type risk_level = :LOW | :MEDIUM | :HIGH
|
|
168
|
+
|
|
169
|
+
module RiskLevel
|
|
170
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
171
|
+
|
|
172
|
+
LOW: :LOW
|
|
173
|
+
MEDIUM: :MEDIUM
|
|
174
|
+
HIGH: :HIGH
|
|
175
|
+
|
|
176
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::AffiliateApplication::risk_level]
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
type status = :PENDING | :APPROVED | :DENIED
|
|
180
|
+
|
|
181
|
+
module Status
|
|
182
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
183
|
+
|
|
184
|
+
PENDING: :PENDING
|
|
185
|
+
APPROVED: :APPROVED
|
|
186
|
+
DENIED: :DENIED
|
|
187
|
+
|
|
188
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::AffiliateApplication::status]
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type affiliate_application_list_response =
|
|
4
|
+
{
|
|
5
|
+
applications: ::Array[GrowsurfRuby::AffiliateApplication],
|
|
6
|
+
total: Integer,
|
|
7
|
+
limit: Integer,
|
|
8
|
+
offset: Integer
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class AffiliateApplicationListResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor applications: ::Array[GrowsurfRuby::AffiliateApplication]
|
|
13
|
+
|
|
14
|
+
attr_accessor total: Integer
|
|
15
|
+
|
|
16
|
+
attr_reader limit: Integer?
|
|
17
|
+
|
|
18
|
+
def limit=: (Integer) -> Integer
|
|
19
|
+
|
|
20
|
+
attr_reader offset: Integer?
|
|
21
|
+
|
|
22
|
+
def offset=: (Integer) -> Integer
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
applications: ::Array[GrowsurfRuby::AffiliateApplication],
|
|
26
|
+
total: Integer,
|
|
27
|
+
?limit: Integer,
|
|
28
|
+
?offset: Integer
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
applications: ::Array[GrowsurfRuby::AffiliateApplication],
|
|
33
|
+
total: Integer,
|
|
34
|
+
limit: Integer,
|
|
35
|
+
offset: Integer
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type affiliate_invite =
|
|
4
|
+
{
|
|
5
|
+
accepted_at: Integer?,
|
|
6
|
+
created_at: Integer,
|
|
7
|
+
email: String,
|
|
8
|
+
expires_at: Integer,
|
|
9
|
+
first_name: String?,
|
|
10
|
+
id: String,
|
|
11
|
+
last_name: String?,
|
|
12
|
+
last_sent_at: Integer,
|
|
13
|
+
revoked_at: Integer?,
|
|
14
|
+
status: GrowsurfRuby::Models::AffiliateInvite::status
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class AffiliateInvite < GrowsurfRuby::Internal::Type::BaseModel
|
|
18
|
+
attr_accessor accepted_at: Integer?
|
|
19
|
+
|
|
20
|
+
attr_reader created_at: Integer?
|
|
21
|
+
|
|
22
|
+
def created_at=: (Integer) -> Integer
|
|
23
|
+
|
|
24
|
+
attr_reader email: String?
|
|
25
|
+
|
|
26
|
+
def email=: (String) -> String
|
|
27
|
+
|
|
28
|
+
attr_reader expires_at: Integer?
|
|
29
|
+
|
|
30
|
+
def expires_at=: (Integer) -> Integer
|
|
31
|
+
|
|
32
|
+
attr_accessor first_name: String?
|
|
33
|
+
|
|
34
|
+
attr_reader id: String?
|
|
35
|
+
|
|
36
|
+
def id=: (String) -> String
|
|
37
|
+
|
|
38
|
+
attr_accessor last_name: String?
|
|
39
|
+
|
|
40
|
+
attr_reader last_sent_at: Integer?
|
|
41
|
+
|
|
42
|
+
def last_sent_at=: (Integer) -> Integer
|
|
43
|
+
|
|
44
|
+
attr_accessor revoked_at: Integer?
|
|
45
|
+
|
|
46
|
+
attr_reader status: GrowsurfRuby::Models::AffiliateInvite::status?
|
|
47
|
+
|
|
48
|
+
def status=: (
|
|
49
|
+
GrowsurfRuby::Models::AffiliateInvite::status
|
|
50
|
+
) -> GrowsurfRuby::Models::AffiliateInvite::status
|
|
51
|
+
|
|
52
|
+
def initialize: (
|
|
53
|
+
?accepted_at: Integer?,
|
|
54
|
+
?created_at: Integer,
|
|
55
|
+
?email: String,
|
|
56
|
+
?expires_at: Integer,
|
|
57
|
+
?first_name: String?,
|
|
58
|
+
?id: String,
|
|
59
|
+
?last_name: String?,
|
|
60
|
+
?last_sent_at: Integer,
|
|
61
|
+
?revoked_at: Integer?,
|
|
62
|
+
?status: GrowsurfRuby::Models::AffiliateInvite::status
|
|
63
|
+
) -> void
|
|
64
|
+
|
|
65
|
+
def to_hash: -> {
|
|
66
|
+
accepted_at: Integer?,
|
|
67
|
+
created_at: Integer,
|
|
68
|
+
email: String,
|
|
69
|
+
expires_at: Integer,
|
|
70
|
+
first_name: String?,
|
|
71
|
+
id: String,
|
|
72
|
+
last_name: String?,
|
|
73
|
+
last_sent_at: Integer,
|
|
74
|
+
revoked_at: Integer?,
|
|
75
|
+
status: GrowsurfRuby::Models::AffiliateInvite::status
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
type status = :PENDING | :ACCEPTED | :EXPIRED | :REVOKED
|
|
79
|
+
|
|
80
|
+
module Status
|
|
81
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
82
|
+
|
|
83
|
+
PENDING: :PENDING
|
|
84
|
+
ACCEPTED: :ACCEPTED
|
|
85
|
+
EXPIRED: :EXPIRED
|
|
86
|
+
REVOKED: :REVOKED
|
|
87
|
+
|
|
88
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::AffiliateInvite::status]
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type affiliate_invite_list_response =
|
|
4
|
+
{
|
|
5
|
+
invites: ::Array[GrowsurfRuby::AffiliateInvite],
|
|
6
|
+
total: Integer,
|
|
7
|
+
limit: Integer,
|
|
8
|
+
offset: Integer
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class AffiliateInviteListResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor invites: ::Array[GrowsurfRuby::AffiliateInvite]
|
|
13
|
+
|
|
14
|
+
attr_accessor total: Integer
|
|
15
|
+
|
|
16
|
+
attr_reader limit: Integer?
|
|
17
|
+
|
|
18
|
+
def limit=: (Integer) -> Integer
|
|
19
|
+
|
|
20
|
+
attr_reader offset: Integer?
|
|
21
|
+
|
|
22
|
+
def offset=: (Integer) -> Integer
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
invites: ::Array[GrowsurfRuby::AffiliateInvite],
|
|
26
|
+
total: Integer,
|
|
27
|
+
?limit: Integer,
|
|
28
|
+
?offset: Integer
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
invites: ::Array[GrowsurfRuby::AffiliateInvite],
|
|
33
|
+
total: Integer,
|
|
34
|
+
limit: Integer,
|
|
35
|
+
offset: Integer
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -7,6 +7,7 @@ module GrowsurfRuby
|
|
|
7
7
|
fingerprint: String,
|
|
8
8
|
first_name: String,
|
|
9
9
|
ip_address: String,
|
|
10
|
+
is_affiliate: bool,
|
|
10
11
|
last_name: String,
|
|
11
12
|
metadata: ::Hash[Symbol, top],
|
|
12
13
|
mobile_instance_id: String,
|
|
@@ -29,6 +30,10 @@ module GrowsurfRuby
|
|
|
29
30
|
|
|
30
31
|
def ip_address=: (String) -> String
|
|
31
32
|
|
|
33
|
+
attr_reader is_affiliate: bool?
|
|
34
|
+
|
|
35
|
+
def is_affiliate=: (bool) -> bool
|
|
36
|
+
|
|
32
37
|
attr_reader last_name: String?
|
|
33
38
|
|
|
34
39
|
def last_name=: (String) -> String
|
|
@@ -56,6 +61,7 @@ module GrowsurfRuby
|
|
|
56
61
|
?fingerprint: String,
|
|
57
62
|
?first_name: String,
|
|
58
63
|
?ip_address: String,
|
|
64
|
+
?is_affiliate: bool,
|
|
59
65
|
?last_name: String,
|
|
60
66
|
?metadata: ::Hash[Symbol, top],
|
|
61
67
|
?mobile_instance_id: String,
|
|
@@ -68,6 +74,7 @@ module GrowsurfRuby
|
|
|
68
74
|
fingerprint: String,
|
|
69
75
|
first_name: String,
|
|
70
76
|
ip_address: String,
|
|
77
|
+
is_affiliate: bool,
|
|
71
78
|
last_name: String,
|
|
72
79
|
metadata: ::Hash[Symbol, top],
|
|
73
80
|
mobile_instance_id: String,
|