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
|
@@ -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
|
|
@@ -27,15 +27,19 @@ module GrowsurfRuby
|
|
|
27
27
|
optional :body, String
|
|
28
28
|
|
|
29
29
|
# @!attribute email_type
|
|
30
|
-
# The program email template to
|
|
31
|
-
# The
|
|
32
|
-
#
|
|
33
|
-
#
|
|
30
|
+
# The program email template to trigger (template mode). Send the camelCase
|
|
31
|
+
# email-type key. The available types depend on the program type; the
|
|
32
|
+
# template's `isEnabled` setting controls automatic sends only. This endpoint
|
|
33
|
+
# can trigger any sendable template. System and transactional types (login
|
|
34
|
+
# link, payout destination confirmation, tax notifications), the invite email,
|
|
35
|
+
# and the follow-up reminder cannot be sent. Referral programs:
|
|
36
|
+
# `welcomeNonReferred`, `referralLinkViewedFirstTime`, `referralLinkUsed`,
|
|
37
|
+
# `referredSignup`, `welcomeReferred`, `offerClaimed`, `goalAchieved`,
|
|
34
38
|
# `campaignEndedWinners`, `campaignEndedNonWinners`, `progressUpdateMonthly`.
|
|
35
39
|
# Affiliate programs: `welcomeNonReferred`, `referralLinkViewedFirstTime`,
|
|
36
|
-
# `referredSignup`, `
|
|
37
|
-
# `
|
|
38
|
-
#
|
|
40
|
+
# `referredSignup`, `offerClaimed`, `commissionGenerated`,
|
|
41
|
+
# `commissionAdjusted`, `payoutPending`, `payoutSentSuccess`,
|
|
42
|
+
# `progressUpdateMonthly`.
|
|
39
43
|
# `welcomeNonReferred` can only be sent to advocates or approved, enrolled affiliates in a
|
|
40
44
|
# program that has not ended.
|
|
41
45
|
#
|
|
@@ -65,7 +69,7 @@ module GrowsurfRuby
|
|
|
65
69
|
#
|
|
66
70
|
# @param body [String] HTML body for a free-form email. You can personalize it with dynamic text, inserting `{{...}}` tokens like `{{firstName}}` or `{{shareUrl}}`. See [Guide to using dynamic text in GrowSurf emails](https://support.growsurf.com/article/213-guide-to-using-dynamic-text-in-growsurf-emails).
|
|
67
71
|
#
|
|
68
|
-
# @param email_type [String] The program email template to
|
|
72
|
+
# @param email_type [String] The program email template to trigger (template mode). Send the camelCase email-
|
|
69
73
|
#
|
|
70
74
|
# @param preheader [String] Optional preheader text for a free-form email.
|
|
71
75
|
#
|
|
@@ -103,9 +103,6 @@ module GrowsurfRuby
|
|
|
103
103
|
UPDATED_AT = :updatedAt
|
|
104
104
|
CREATED_AT = :createdAt
|
|
105
105
|
EMAIL = :email
|
|
106
|
-
FIRST_NAME = :firstName
|
|
107
|
-
LAST_NAME = :lastName
|
|
108
|
-
REFERRAL_STATUS = :referralStatus
|
|
109
106
|
REFERRAL_TRIGGERED_AT = :referralTriggeredAt
|
|
110
107
|
|
|
111
108
|
# @!method self.values
|
|
@@ -138,7 +138,9 @@ module GrowsurfRuby
|
|
|
138
138
|
optional :transaction_id, String, api_name: :transactionId
|
|
139
139
|
|
|
140
140
|
# Connected provider: `stripe`, `chargebee` or `recurly`. Requires `transactionId` and `testMode`.
|
|
141
|
-
optional :payment_provider,
|
|
141
|
+
optional :payment_provider,
|
|
142
|
+
enum: -> { GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider },
|
|
143
|
+
api_name: :paymentProvider
|
|
142
144
|
|
|
143
145
|
# `true` for test or `false` for live. Requires `paymentProvider`.
|
|
144
146
|
optional :test_mode, GrowsurfRuby::Internal::Type::Boolean, api_name: :testMode
|
|
@@ -169,9 +171,21 @@ module GrowsurfRuby
|
|
|
169
171
|
# @param total_tax_amounts [Array<Hash{Symbol=>Object}>]
|
|
170
172
|
# @param total_taxes [Array<Hash{Symbol=>Object}>]
|
|
171
173
|
# @param transaction_id [String]
|
|
172
|
-
# @param payment_provider [
|
|
174
|
+
# @param payment_provider [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRecordTransactionParams::PaymentProvider]
|
|
173
175
|
# @param test_mode [Boolean]
|
|
174
176
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
177
|
+
|
|
178
|
+
# Connected payment provider.
|
|
179
|
+
module PaymentProvider
|
|
180
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
181
|
+
|
|
182
|
+
STRIPE = :stripe
|
|
183
|
+
CHARGEBEE = :chargebee
|
|
184
|
+
RECURLY = :recurly
|
|
185
|
+
|
|
186
|
+
# @!method self.values
|
|
187
|
+
# @return [Array<Symbol>]
|
|
188
|
+
end
|
|
175
189
|
end
|
|
176
190
|
end
|
|
177
191
|
end
|
|
@@ -103,7 +103,9 @@ module GrowsurfRuby
|
|
|
103
103
|
optional :transaction_id, String, api_name: :transactionId
|
|
104
104
|
|
|
105
105
|
# Connected provider: `stripe`, `chargebee` or `recurly`. Requires `transactionId` and `testMode`.
|
|
106
|
-
optional :payment_provider,
|
|
106
|
+
optional :payment_provider,
|
|
107
|
+
enum: -> { GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider },
|
|
108
|
+
api_name: :paymentProvider
|
|
107
109
|
|
|
108
110
|
# `true` for test or `false` for live. Requires `paymentProvider`.
|
|
109
111
|
optional :test_mode, GrowsurfRuby::Internal::Type::Boolean, api_name: :testMode
|
|
@@ -127,7 +129,7 @@ module GrowsurfRuby
|
|
|
127
129
|
# @param refund_id [String]
|
|
128
130
|
# @param refund_status [String]
|
|
129
131
|
# @param transaction_id [String]
|
|
130
|
-
# @param payment_provider [
|
|
132
|
+
# @param payment_provider [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionParams::PaymentProvider]
|
|
131
133
|
# @param test_mode [Boolean]
|
|
132
134
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
133
135
|
|
|
@@ -140,6 +142,18 @@ module GrowsurfRuby
|
|
|
140
142
|
# @!method self.values
|
|
141
143
|
# @return [Array<Symbol>]
|
|
142
144
|
end
|
|
145
|
+
|
|
146
|
+
# Connected payment provider.
|
|
147
|
+
module PaymentProvider
|
|
148
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
149
|
+
|
|
150
|
+
STRIPE = :stripe
|
|
151
|
+
CHARGEBEE = :chargebee
|
|
152
|
+
RECURLY = :recurly
|
|
153
|
+
|
|
154
|
+
# @!method self.values
|
|
155
|
+
# @return [Array<Symbol>]
|
|
156
|
+
end
|
|
143
157
|
end
|
|
144
158
|
end
|
|
145
159
|
end
|
|
@@ -92,6 +92,18 @@ module GrowsurfRuby
|
|
|
92
92
|
|
|
93
93
|
# @!attribute metadata
|
|
94
94
|
# Custom key/value metadata (single-level; values are stored as strings).
|
|
95
|
+
# Each value must be a string, number, or boolean of up to 500 characters.
|
|
96
|
+
# Each key must have 1 to 40 characters once camelCased, and two keys that
|
|
97
|
+
# camelCase to the same key are rejected. Up to 50 keys. An entry that breaks
|
|
98
|
+
# these rules returns `400`.
|
|
99
|
+
#
|
|
100
|
+
# For `DOUBLE_SIDED` rewards in referral programs, `rewardAmount` is the
|
|
101
|
+
# referrer’s amount and `referredRewardAmount` is the friend’s amount. If
|
|
102
|
+
# `referredRewardAmount` is absent, both use `rewardAmount`. New or changed positive
|
|
103
|
+
# numeric amounts must use whole units for currencies without decimals, such as JPY, and
|
|
104
|
+
# no more than two decimal places for other currencies, including USD and KWD. Excess
|
|
105
|
+
# precision is rejected rather than rounded, including when you clone a program. Existing
|
|
106
|
+
# unchanged amounts and earned rewards keep their saved values.
|
|
95
107
|
#
|
|
96
108
|
# @return [Hash{Symbol=>Object}, nil]
|
|
97
109
|
optional :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
@@ -195,6 +207,14 @@ module GrowsurfRuby
|
|
|
195
207
|
#
|
|
196
208
|
# @param metadata [Hash{Symbol=>Object}] Custom key/value metadata (single-level; values are stored as strings).
|
|
197
209
|
#
|
|
210
|
+
# For `DOUBLE_SIDED` rewards in referral programs, `rewardAmount` is the
|
|
211
|
+
# referrer’s amount and `referredRewardAmount` is the friend’s amount. If
|
|
212
|
+
# `referredRewardAmount` is absent, both use `rewardAmount`. New or changed positive
|
|
213
|
+
# numeric amounts must use whole units for currencies without decimals, such as JPY, and
|
|
214
|
+
# no more than two decimal places for other currencies, including USD and KWD. Excess
|
|
215
|
+
# precision is rejected rather than rounded, including when you clone a program. Existing
|
|
216
|
+
# unchanged amounts and earned rewards keep their saved values.
|
|
217
|
+
#
|
|
198
218
|
# @param next_milestone_prefix [String] Text shown before a participant's referral count in milestone-progress copy. App
|
|
199
219
|
#
|
|
200
220
|
# @param next_milestone_suffix [String] Text shown after a participant's referral count in milestone-progress copy. Appl
|
|
@@ -97,6 +97,18 @@ module GrowsurfRuby
|
|
|
97
97
|
|
|
98
98
|
# @!attribute metadata
|
|
99
99
|
# Custom key/value metadata (single-level; values are stored as strings).
|
|
100
|
+
# Each value must be a string, number, or boolean of up to 500 characters.
|
|
101
|
+
# Each key must have 1 to 40 characters once camelCased, and two keys that
|
|
102
|
+
# camelCase to the same key are rejected. Up to 50 keys. An entry that breaks
|
|
103
|
+
# these rules returns `400`.
|
|
104
|
+
#
|
|
105
|
+
# For `DOUBLE_SIDED` rewards in referral programs, `rewardAmount` is the
|
|
106
|
+
# referrer’s amount and `referredRewardAmount` is the friend’s amount. If
|
|
107
|
+
# `referredRewardAmount` is absent, both use `rewardAmount`. New or changed positive
|
|
108
|
+
# numeric amounts must use whole units for currencies without decimals, such as JPY, and
|
|
109
|
+
# no more than two decimal places for other currencies, including USD and KWD. Excess
|
|
110
|
+
# precision is rejected rather than rounded, including when you clone a program. Existing
|
|
111
|
+
# unchanged amounts and earned rewards keep their saved values.
|
|
100
112
|
#
|
|
101
113
|
# @return [Hash{Symbol=>Object}, nil]
|
|
102
114
|
optional :metadata, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
@@ -202,6 +214,14 @@ module GrowsurfRuby
|
|
|
202
214
|
#
|
|
203
215
|
# @param metadata [Hash{Symbol=>Object}] Custom key/value metadata (single-level; values are stored as strings).
|
|
204
216
|
#
|
|
217
|
+
# For `DOUBLE_SIDED` rewards in referral programs, `rewardAmount` is the
|
|
218
|
+
# referrer’s amount and `referredRewardAmount` is the friend’s amount. If
|
|
219
|
+
# `referredRewardAmount` is absent, both use `rewardAmount`. New or changed positive
|
|
220
|
+
# numeric amounts must use whole units for currencies without decimals, such as JPY, and
|
|
221
|
+
# no more than two decimal places for other currencies, including USD and KWD. Excess
|
|
222
|
+
# precision is rejected rather than rounded, including when you clone a program. Existing
|
|
223
|
+
# unchanged amounts and earned rewards keep their saved values.
|
|
224
|
+
#
|
|
205
225
|
# @param next_milestone_prefix [String] Text shown before a participant's referral count in milestone-progress copy. App
|
|
206
226
|
#
|
|
207
227
|
# @param next_milestone_suffix [String] Text shown after a participant's referral count in milestone-progress copy. Appl
|
|
@@ -15,8 +15,15 @@ module GrowsurfRuby
|
|
|
15
15
|
required :payload_url, String, api_name: :payloadUrl
|
|
16
16
|
|
|
17
17
|
# @!attribute events
|
|
18
|
-
# The events this webhook is subscribed to. When omitted,
|
|
19
|
-
#
|
|
18
|
+
# The events this webhook is subscribed to. When omitted, the webhook is
|
|
19
|
+
# subscribed to every event its program type offers, like a webhook added in
|
|
20
|
+
# the dashboard: referral programs offer `PARTICIPANT_REACHED_A_GOAL`,
|
|
21
|
+
# `NEW_PARTICIPANT_ADDED`, `PARTICIPANT_FRAUD_STATUS_UPDATED`, and
|
|
22
|
+
# `CAMPAIGN_ENDED`; affiliate programs offer `NEW_COMMISSION_ADDED`,
|
|
23
|
+
# `COMMISSION_ADJUSTED`, `NEW_PAYOUT_ISSUED`, `NEW_PARTICIPANT_ADDED`,
|
|
24
|
+
# `PARTICIPANT_FRAUD_STATUS_UPDATED`, and `CAMPAIGN_ENDED`. Send `[]` to
|
|
25
|
+
# subscribe to no events. An event the program type does not offer returns
|
|
26
|
+
# `400`.
|
|
20
27
|
#
|
|
21
28
|
# @return [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>, nil]
|
|
22
29
|
optional :events, -> { GrowsurfRuby::Internal::Type::ArrayOf[enum: GrowsurfRuby::Campaign::WebhookEvent] }
|
|
@@ -39,7 +46,7 @@ module GrowsurfRuby
|
|
|
39
46
|
#
|
|
40
47
|
# @param payload_url [String] The URL that receives webhook deliveries.
|
|
41
48
|
#
|
|
42
|
-
# @param events [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>] The events this webhook is subscribed to. When omitted,
|
|
49
|
+
# @param events [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>] The events this webhook is subscribed to. When omitted, the webhook is subscribed
|
|
43
50
|
#
|
|
44
51
|
# @param is_enabled [Boolean]
|
|
45
52
|
#
|
|
@@ -15,12 +15,12 @@ module GrowsurfRuby
|
|
|
15
15
|
# @!attribute company_logo_image_url
|
|
16
16
|
#
|
|
17
17
|
# @return [String, nil]
|
|
18
|
-
optional :company_logo_image_url, String, api_name: :companyLogoImageUrl
|
|
18
|
+
optional :company_logo_image_url, String, api_name: :companyLogoImageUrl, nil?: true
|
|
19
19
|
|
|
20
20
|
# @!attribute company_name
|
|
21
21
|
#
|
|
22
22
|
# @return [String, nil]
|
|
23
|
-
optional :company_name, String, api_name: :companyName
|
|
23
|
+
optional :company_name, String, api_name: :companyName, nil?: true
|
|
24
24
|
|
|
25
25
|
# @!attribute currency_iso
|
|
26
26
|
#
|
|
@@ -44,7 +44,12 @@ module GrowsurfRuby
|
|
|
44
44
|
# arrives switched off with a placeholder name, so the program awards nothing
|
|
45
45
|
# until you set the amount and turn one on. `TELEHEALTH` is for consumer
|
|
46
46
|
# telehealth and wellness subscriptions; `HEALTHCARE_PROVIDERS` is for provider
|
|
47
|
-
# networks and clinician-facing products. `
|
|
47
|
+
# networks and clinician-facing products. A `TELEHEALTH` program also starts
|
|
48
|
+
# with `useGrowSurfHostedLinks` on, so each referral link is a GrowSurf-hosted
|
|
49
|
+
# link; turn it off with `PATCH /campaign/{id}/installation`. It also starts
|
|
50
|
+
# with `offerPageRedirectSeconds` set to `10` and with starter offer-page
|
|
51
|
+
# content (`referredExperience.offerPageDescription` and `offerPageSteps`).
|
|
52
|
+
# Values you send in the create request are kept. `INSURANCE` replaces
|
|
48
53
|
# `ONLINE_INSURANCE`, which is still accepted. Omit it and every share button
|
|
49
54
|
# keeps its standard default. Set only when the program is created; it is not
|
|
50
55
|
# accepted on update.
|
|
@@ -66,9 +71,9 @@ module GrowsurfRuby
|
|
|
66
71
|
# @!method initialize(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil, goal: nil, name: nil, rewards: nil, request_options: {})
|
|
67
72
|
# @param type [Symbol, GrowsurfRuby::Models::CampaignCreateParams::Type]
|
|
68
73
|
#
|
|
69
|
-
# @param company_logo_image_url [String]
|
|
74
|
+
# @param company_logo_image_url [String, nil]
|
|
70
75
|
#
|
|
71
|
-
# @param company_name [String]
|
|
76
|
+
# @param company_name [String, nil]
|
|
72
77
|
#
|
|
73
78
|
# @param currency_iso [String]
|
|
74
79
|
#
|
|
@@ -95,9 +95,6 @@ module GrowsurfRuby
|
|
|
95
95
|
UPDATED_AT = :updatedAt
|
|
96
96
|
CREATED_AT = :createdAt
|
|
97
97
|
EMAIL = :email
|
|
98
|
-
FIRST_NAME = :firstName
|
|
99
|
-
LAST_NAME = :lastName
|
|
100
|
-
REFERRAL_STATUS = :referralStatus
|
|
101
98
|
REFERRAL_TRIGGERED_AT = :referralTriggeredAt
|
|
102
99
|
|
|
103
100
|
# @!method self.values
|
|
@@ -15,12 +15,12 @@ module GrowsurfRuby
|
|
|
15
15
|
# @!attribute company_logo_image_url
|
|
16
16
|
#
|
|
17
17
|
# @return [String, nil]
|
|
18
|
-
optional :company_logo_image_url, String, api_name: :companyLogoImageUrl
|
|
18
|
+
optional :company_logo_image_url, String, api_name: :companyLogoImageUrl, nil?: true
|
|
19
19
|
|
|
20
20
|
# @!attribute company_name
|
|
21
21
|
#
|
|
22
22
|
# @return [String, nil]
|
|
23
|
-
optional :company_name, String, api_name: :companyName
|
|
23
|
+
optional :company_name, String, api_name: :companyName, nil?: true
|
|
24
24
|
|
|
25
25
|
# @!attribute name
|
|
26
26
|
#
|
|
@@ -35,9 +35,9 @@ module GrowsurfRuby
|
|
|
35
35
|
# @!method initialize(id:, company_logo_image_url: nil, company_name: nil, name: nil, status: nil, request_options: {})
|
|
36
36
|
# @param id [String]
|
|
37
37
|
#
|
|
38
|
-
# @param company_logo_image_url [String]
|
|
38
|
+
# @param company_logo_image_url [String, nil]
|
|
39
39
|
#
|
|
40
|
-
# @param company_name [String]
|
|
40
|
+
# @param company_name [String, nil]
|
|
41
41
|
#
|
|
42
42
|
# @param name [String]
|
|
43
43
|
#
|
|
@@ -4,6 +4,9 @@ module GrowsurfRuby
|
|
|
4
4
|
module Models
|
|
5
5
|
class CommissionStructure < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute amount
|
|
7
|
+
# Fixed commission amount in the currency's smallest denomination, used when
|
|
8
|
+
# `type` is `FIXED`. The maximum is `100000000` (1,000,000.00) for USD, EUR,
|
|
9
|
+
# and GBP. `null` for percentage-based commissions.
|
|
7
10
|
#
|
|
8
11
|
# @return [Integer, nil]
|
|
9
12
|
optional :amount, Integer, nil?: true
|
|
@@ -81,7 +81,19 @@ module GrowsurfRuby
|
|
|
81
81
|
# @return [String, nil]
|
|
82
82
|
optional :last_name, String, api_name: :lastName, nil?: true
|
|
83
83
|
|
|
84
|
-
# @!
|
|
84
|
+
# @!attribute referral_credit_expired_at
|
|
85
|
+
# When the referrer's credit for this referral expired, as a Unix timestamp in milliseconds. `null` when the credit has not expired.
|
|
86
|
+
#
|
|
87
|
+
# @return [Integer, nil]
|
|
88
|
+
optional :referral_credit_expired_at, Integer, api_name: :referralCreditExpiredAt, nil?: true
|
|
89
|
+
|
|
90
|
+
# @!attribute referral_triggered_at
|
|
91
|
+
# When the referral was triggered, as a Unix timestamp in milliseconds. `null` until the referral is triggered, and for invites.
|
|
92
|
+
#
|
|
93
|
+
# @return [Integer, nil]
|
|
94
|
+
optional :referral_triggered_at, Integer, api_name: :referralTriggeredAt, nil?: true
|
|
95
|
+
|
|
96
|
+
# @!method initialize(id:, created_at:, email:, referral_status:, referred_by:, updated_at:, first_name: nil, last_name: nil, referral_credit_expired_at: nil, referral_triggered_at: nil)
|
|
85
97
|
# @param id [String]
|
|
86
98
|
# @param created_at [Integer]
|
|
87
99
|
# @param email [String]
|
|
@@ -90,6 +102,10 @@ module GrowsurfRuby
|
|
|
90
102
|
# @param updated_at [Integer]
|
|
91
103
|
# @param first_name [String, nil]
|
|
92
104
|
# @param last_name [String, nil]
|
|
105
|
+
#
|
|
106
|
+
# @param referral_credit_expired_at [Integer, nil] When the referrer's credit for this referral expired, as a Unix timestamp in milliseconds. `null` when the credit has not expired.
|
|
107
|
+
#
|
|
108
|
+
# @param referral_triggered_at [Integer, nil] When the referral was triggered, as a Unix timestamp in milliseconds. `null` until the referral is triggered, and for invites.
|
|
93
109
|
end
|
|
94
110
|
end
|
|
95
111
|
end
|
data/lib/growsurf_ruby/models.rb
CHANGED
|
@@ -39,8 +39,6 @@ module GrowsurfRuby
|
|
|
39
39
|
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
AccountCreateParams = GrowsurfRuby::Models::AccountCreateParams
|
|
43
|
-
|
|
44
42
|
AnalyticsAvailability = GrowsurfRuby::Models::AnalyticsAvailability
|
|
45
43
|
|
|
46
44
|
AnalyticsUnavailableReason = GrowsurfRuby::Models::AnalyticsUnavailableReason
|