growsurf-ruby 1.16.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/errors.rb +128 -0
- data/lib/growsurf_ruby/models/campaign/campaign_custom_domain.rb +109 -0
- data/lib/growsurf_ruby/models/campaign/create.rb +18 -4
- data/lib/growsurf_ruby/models/campaign/custom_domain_set_params.rb +25 -0
- data/lib/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rb +27 -0
- data/lib/growsurf_ruby/models/campaign/participant.rb +15 -215
- data/lib/growsurf_ruby/models/campaign/participant_email_params.rb +12 -8
- data/lib/growsurf_ruby/models/campaign/participant_list_referrals_params.rb +0 -3
- data/lib/growsurf_ruby/models/campaign/participant_record_transaction_params.rb +16 -2
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +16 -2
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +20 -0
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +20 -0
- data/lib/growsurf_ruby/models/campaign/webhook_create_params.rb +10 -3
- data/lib/growsurf_ruby/models/campaign.rb +1 -0
- data/lib/growsurf_ruby/models/campaign_create_params.rb +10 -5
- data/lib/growsurf_ruby/models/campaign_list_referrals_params.rb +0 -3
- data/lib/growsurf_ruby/models/campaign_update_params.rb +4 -4
- data/lib/growsurf_ruby/models/commission_structure.rb +3 -0
- data/lib/growsurf_ruby/models/referral_list.rb +17 -1
- data/lib/growsurf_ruby/resources/campaign/custom_domain.rb +111 -0
- data/lib/growsurf_ruby/resources/campaign/design.rb +3 -3
- data/lib/growsurf_ruby/resources/campaign/emails.rb +1 -2
- data/lib/growsurf_ruby/resources/campaign/installation.rb +1 -2
- data/lib/growsurf_ruby/resources/campaign/options.rb +4 -5
- data/lib/growsurf_ruby/resources/campaign/participant.rb +9 -4
- data/lib/growsurf_ruby/resources/campaign/program_resources.rb +1 -0
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +17 -2
- data/lib/growsurf_ruby/resources/campaign/webhooks.rb +13 -3
- data/lib/growsurf_ruby/resources/campaign.rb +15 -9
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +4 -0
- data/rbi/growsurf_ruby/errors.rbi +64 -0
- data/rbi/growsurf_ruby/models/campaign/campaign_custom_domain.rbi +193 -0
- data/rbi/growsurf_ruby/models/campaign/create.rbi +24 -4
- data/rbi/growsurf_ruby/models/campaign/custom_domain_set_params.rbi +47 -0
- data/rbi/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rbi +40 -0
- data/rbi/growsurf_ruby/models/campaign/participant.rbi +15 -292
- data/rbi/growsurf_ruby/models/campaign/participant_email_params.rbi +23 -16
- data/rbi/growsurf_ruby/models/campaign/participant_list_referrals_params.rbi +0 -15
- data/rbi/growsurf_ruby/models/campaign/participant_record_transaction_params.rbi +23 -4
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +23 -4
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +24 -0
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +24 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_create_params.rbi +18 -4
- data/rbi/growsurf_ruby/models/campaign.rbi +5 -0
- data/rbi/growsurf_ruby/models/campaign_create_params.rbi +6 -12
- data/rbi/growsurf_ruby/models/campaign_list_referrals_params.rbi +0 -15
- data/rbi/growsurf_ruby/models/campaign_update_params.rbi +6 -12
- data/rbi/growsurf_ruby/models/commission_structure.rbi +3 -0
- data/rbi/growsurf_ruby/models/referral_list.rbi +19 -3
- data/rbi/growsurf_ruby/resources/campaign/custom_domain.rbi +91 -0
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +3 -3
- data/rbi/growsurf_ruby/resources/campaign/emails.rbi +1 -2
- data/rbi/growsurf_ruby/resources/campaign/installation.rbi +1 -2
- data/rbi/growsurf_ruby/resources/campaign/options.rbi +4 -5
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +30 -15
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +25 -2
- data/rbi/growsurf_ruby/resources/campaign/webhooks.rbi +21 -4
- data/rbi/growsurf_ruby/resources/campaign.rbi +21 -9
- data/sig/growsurf_ruby/errors.rbs +40 -0
- data/sig/growsurf_ruby/models/campaign/campaign_custom_domain.rbs +84 -0
- data/sig/growsurf_ruby/models/campaign/create.rbs +5 -0
- data/sig/growsurf_ruby/models/campaign/custom_domain_set_params.rbs +25 -0
- data/sig/growsurf_ruby/models/campaign/delete_campaign_custom_domain_response.rbs +18 -0
- data/sig/growsurf_ruby/models/campaign/participant.rbs +7 -205
- data/sig/growsurf_ruby/models/campaign/participant_list_referrals_params.rbs +0 -6
- data/sig/growsurf_ruby/models/campaign/participant_record_transaction_params.rbs +19 -5
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +19 -5
- data/sig/growsurf_ruby/models/campaign.rbs +2 -1
- data/sig/growsurf_ruby/models/campaign_create_params.rbs +8 -12
- data/sig/growsurf_ruby/models/campaign_list_referrals_params.rbs +0 -6
- data/sig/growsurf_ruby/models/campaign_update_params.rbs +8 -12
- data/sig/growsurf_ruby/models/referral_list.rbs +13 -3
- data/sig/growsurf_ruby/resources/campaign/custom_domain.rbs +30 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +3 -2
- data/sig/growsurf_ruby/resources/campaign.rbs +7 -4
- metadata +14 -2
|
@@ -213,6 +213,12 @@ module GrowsurfRuby
|
|
|
213
213
|
sig { params(prev_monthly_referral_count: Integer).void }
|
|
214
214
|
attr_writer :prev_monthly_referral_count
|
|
215
215
|
|
|
216
|
+
# When this referred signup counted as a lead for the referrer, in Unix
|
|
217
|
+
# milliseconds. Set only when the program's `referralTrigger` is `CUSTOM`.
|
|
218
|
+
# Lead-event Campaign Rewards and commissions use it.
|
|
219
|
+
sig { returns(T.nilable(Integer)) }
|
|
220
|
+
attr_accessor :referral_lead_qualified_at
|
|
221
|
+
|
|
216
222
|
sig { returns(T.nilable(T::Array[String])) }
|
|
217
223
|
attr_reader :referrals
|
|
218
224
|
|
|
@@ -343,6 +349,7 @@ module GrowsurfRuby
|
|
|
343
349
|
paypal_email_address: String,
|
|
344
350
|
prev_monthly_rank: Integer,
|
|
345
351
|
prev_monthly_referral_count: Integer,
|
|
352
|
+
referral_lead_qualified_at: T.nilable(Integer),
|
|
346
353
|
referrals: T::Array[String],
|
|
347
354
|
referral_source: GrowsurfRuby::Campaign::ReferralSource::OrSymbol,
|
|
348
355
|
referral_status: GrowsurfRuby::Campaign::ReferralStatus::OrSymbol,
|
|
@@ -414,6 +421,10 @@ module GrowsurfRuby
|
|
|
414
421
|
paypal_email_address: nil,
|
|
415
422
|
prev_monthly_rank: nil,
|
|
416
423
|
prev_monthly_referral_count: nil,
|
|
424
|
+
# When this referred signup counted as a lead for the referrer, in Unix
|
|
425
|
+
# milliseconds. Set only when the program's `referralTrigger` is `CUSTOM`.
|
|
426
|
+
# Lead-event Campaign Rewards and commissions use it.
|
|
427
|
+
referral_lead_qualified_at: nil,
|
|
417
428
|
referrals: nil,
|
|
418
429
|
referral_source: nil,
|
|
419
430
|
referral_status: nil,
|
|
@@ -466,6 +477,7 @@ module GrowsurfRuby
|
|
|
466
477
|
paypal_email_address: String,
|
|
467
478
|
prev_monthly_rank: Integer,
|
|
468
479
|
prev_monthly_referral_count: Integer,
|
|
480
|
+
referral_lead_qualified_at: T.nilable(Integer),
|
|
469
481
|
referrals: T::Array[String],
|
|
470
482
|
referral_source:
|
|
471
483
|
GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol,
|
|
@@ -584,7 +596,9 @@ module GrowsurfRuby
|
|
|
584
596
|
end
|
|
585
597
|
end
|
|
586
598
|
|
|
587
|
-
|
|
599
|
+
# The participant's referrer. It has the same fields as a `Participant`. Its own
|
|
600
|
+
# `referrer` is always `null`.
|
|
601
|
+
class Referrer < GrowsurfRuby::Models::Campaign::CampaignParticipant
|
|
588
602
|
OrHash =
|
|
589
603
|
T.type_alias do
|
|
590
604
|
T.any(
|
|
@@ -592,297 +606,6 @@ module GrowsurfRuby
|
|
|
592
606
|
GrowsurfRuby::Internal::AnyHash
|
|
593
607
|
)
|
|
594
608
|
end
|
|
595
|
-
|
|
596
|
-
sig { returns(T.nilable(String)) }
|
|
597
|
-
attr_reader :id
|
|
598
|
-
|
|
599
|
-
sig { params(id: String).void }
|
|
600
|
-
attr_writer :id
|
|
601
|
-
|
|
602
|
-
sig { returns(T.nilable(Integer)) }
|
|
603
|
-
attr_reader :created_at
|
|
604
|
-
|
|
605
|
-
sig { params(created_at: Integer).void }
|
|
606
|
-
attr_writer :created_at
|
|
607
|
-
|
|
608
|
-
sig { returns(T.nilable(String)) }
|
|
609
|
-
attr_reader :email
|
|
610
|
-
|
|
611
|
-
sig { params(email: String).void }
|
|
612
|
-
attr_writer :email
|
|
613
|
-
|
|
614
|
-
sig { returns(T.nilable(String)) }
|
|
615
|
-
attr_accessor :fingerprint
|
|
616
|
-
|
|
617
|
-
sig { returns(T.nilable(String)) }
|
|
618
|
-
attr_accessor :first_name
|
|
619
|
-
|
|
620
|
-
sig { returns(T.nilable(String)) }
|
|
621
|
-
attr_reader :fraud_reason_code
|
|
622
|
-
|
|
623
|
-
sig { params(fraud_reason_code: String).void }
|
|
624
|
-
attr_writer :fraud_reason_code
|
|
625
|
-
|
|
626
|
-
sig do
|
|
627
|
-
returns(
|
|
628
|
-
T.nilable(GrowsurfRuby::Campaign::FraudRiskLevel::TaggedSymbol)
|
|
629
|
-
)
|
|
630
|
-
end
|
|
631
|
-
attr_reader :fraud_risk_level
|
|
632
|
-
|
|
633
|
-
sig do
|
|
634
|
-
params(
|
|
635
|
-
fraud_risk_level: GrowsurfRuby::Campaign::FraudRiskLevel::OrSymbol
|
|
636
|
-
).void
|
|
637
|
-
end
|
|
638
|
-
attr_writer :fraud_risk_level
|
|
639
|
-
|
|
640
|
-
sig { returns(T.nilable(Integer)) }
|
|
641
|
-
attr_reader :impression_count
|
|
642
|
-
|
|
643
|
-
sig { params(impression_count: Integer).void }
|
|
644
|
-
attr_writer :impression_count
|
|
645
|
-
|
|
646
|
-
sig { returns(T.nilable(Integer)) }
|
|
647
|
-
attr_reader :invite_count
|
|
648
|
-
|
|
649
|
-
sig { params(invite_count: Integer).void }
|
|
650
|
-
attr_writer :invite_count
|
|
651
|
-
|
|
652
|
-
sig { returns(T.nilable(String)) }
|
|
653
|
-
attr_accessor :ip_address
|
|
654
|
-
|
|
655
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
656
|
-
attr_reader :is_winner
|
|
657
|
-
|
|
658
|
-
sig { params(is_winner: T::Boolean).void }
|
|
659
|
-
attr_writer :is_winner
|
|
660
|
-
|
|
661
|
-
sig { returns(T.nilable(String)) }
|
|
662
|
-
attr_accessor :last_name
|
|
663
|
-
|
|
664
|
-
# The number of pending referrals the participant made that have not converted
|
|
665
|
-
# into successful referrals yet.
|
|
666
|
-
sig { returns(T.nilable(Integer)) }
|
|
667
|
-
attr_reader :lead_count
|
|
668
|
-
|
|
669
|
-
sig { params(lead_count: Integer).void }
|
|
670
|
-
attr_writer :lead_count
|
|
671
|
-
|
|
672
|
-
# Shallow custom metadata object.
|
|
673
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
674
|
-
attr_reader :metadata
|
|
675
|
-
|
|
676
|
-
sig { params(metadata: T::Hash[Symbol, T.anything]).void }
|
|
677
|
-
attr_writer :metadata
|
|
678
|
-
|
|
679
|
-
sig { returns(T.nilable(Integer)) }
|
|
680
|
-
attr_reader :monthly_rank
|
|
681
|
-
|
|
682
|
-
sig { params(monthly_rank: Integer).void }
|
|
683
|
-
attr_writer :monthly_rank
|
|
684
|
-
|
|
685
|
-
sig { returns(T.nilable(Integer)) }
|
|
686
|
-
attr_reader :monthly_referral_count
|
|
687
|
-
|
|
688
|
-
sig { params(monthly_referral_count: Integer).void }
|
|
689
|
-
attr_writer :monthly_referral_count
|
|
690
|
-
|
|
691
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
692
|
-
attr_reader :monthly_referrals
|
|
693
|
-
|
|
694
|
-
sig { params(monthly_referrals: T::Array[String]).void }
|
|
695
|
-
attr_writer :monthly_referrals
|
|
696
|
-
|
|
697
|
-
sig { returns(T.nilable(Integer)) }
|
|
698
|
-
attr_reader :prev_monthly_rank
|
|
699
|
-
|
|
700
|
-
sig { params(prev_monthly_rank: Integer).void }
|
|
701
|
-
attr_writer :prev_monthly_rank
|
|
702
|
-
|
|
703
|
-
sig { returns(T.nilable(Integer)) }
|
|
704
|
-
attr_reader :prev_monthly_referral_count
|
|
705
|
-
|
|
706
|
-
sig { params(prev_monthly_referral_count: Integer).void }
|
|
707
|
-
attr_writer :prev_monthly_referral_count
|
|
708
|
-
|
|
709
|
-
sig { returns(T.nilable(Integer)) }
|
|
710
|
-
attr_reader :rank
|
|
711
|
-
|
|
712
|
-
sig { params(rank: Integer).void }
|
|
713
|
-
attr_writer :rank
|
|
714
|
-
|
|
715
|
-
sig { returns(T.nilable(Integer)) }
|
|
716
|
-
attr_reader :referral_count
|
|
717
|
-
|
|
718
|
-
sig { params(referral_count: Integer).void }
|
|
719
|
-
attr_writer :referral_count
|
|
720
|
-
|
|
721
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
722
|
-
attr_reader :referrals
|
|
723
|
-
|
|
724
|
-
sig { params(referrals: T::Array[String]).void }
|
|
725
|
-
attr_writer :referrals
|
|
726
|
-
|
|
727
|
-
sig do
|
|
728
|
-
returns(
|
|
729
|
-
T.nilable(GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol)
|
|
730
|
-
)
|
|
731
|
-
end
|
|
732
|
-
attr_reader :referral_source
|
|
733
|
-
|
|
734
|
-
sig do
|
|
735
|
-
params(
|
|
736
|
-
referral_source: GrowsurfRuby::Campaign::ReferralSource::OrSymbol
|
|
737
|
-
).void
|
|
738
|
-
end
|
|
739
|
-
attr_writer :referral_source
|
|
740
|
-
|
|
741
|
-
sig do
|
|
742
|
-
returns(
|
|
743
|
-
T.nilable(GrowsurfRuby::Campaign::ReferralStatus::TaggedSymbol)
|
|
744
|
-
)
|
|
745
|
-
end
|
|
746
|
-
attr_reader :referral_status
|
|
747
|
-
|
|
748
|
-
sig do
|
|
749
|
-
params(
|
|
750
|
-
referral_status: GrowsurfRuby::Campaign::ReferralStatus::OrSymbol
|
|
751
|
-
).void
|
|
752
|
-
end
|
|
753
|
-
attr_writer :referral_status
|
|
754
|
-
|
|
755
|
-
sig { returns(T.nilable(T::Hash[Symbol, Integer])) }
|
|
756
|
-
attr_reader :share_count
|
|
757
|
-
|
|
758
|
-
sig { params(share_count: T::Hash[Symbol, Integer]).void }
|
|
759
|
-
attr_writer :share_count
|
|
760
|
-
|
|
761
|
-
sig { returns(T.nilable(String)) }
|
|
762
|
-
attr_reader :share_url
|
|
763
|
-
|
|
764
|
-
sig { params(share_url: String).void }
|
|
765
|
-
attr_writer :share_url
|
|
766
|
-
|
|
767
|
-
sig { returns(T.nilable(Integer)) }
|
|
768
|
-
attr_reader :unique_impression_count
|
|
769
|
-
|
|
770
|
-
sig { params(unique_impression_count: Integer).void }
|
|
771
|
-
attr_writer :unique_impression_count
|
|
772
|
-
|
|
773
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
774
|
-
attr_reader :unsubscribed
|
|
775
|
-
|
|
776
|
-
sig { params(unsubscribed: T::Boolean).void }
|
|
777
|
-
attr_writer :unsubscribed
|
|
778
|
-
|
|
779
|
-
sig do
|
|
780
|
-
params(
|
|
781
|
-
id: String,
|
|
782
|
-
created_at: Integer,
|
|
783
|
-
email: String,
|
|
784
|
-
fingerprint: T.nilable(String),
|
|
785
|
-
first_name: T.nilable(String),
|
|
786
|
-
fraud_reason_code: String,
|
|
787
|
-
fraud_risk_level:
|
|
788
|
-
GrowsurfRuby::Campaign::FraudRiskLevel::OrSymbol,
|
|
789
|
-
impression_count: Integer,
|
|
790
|
-
invite_count: Integer,
|
|
791
|
-
ip_address: T.nilable(String),
|
|
792
|
-
is_winner: T::Boolean,
|
|
793
|
-
last_name: T.nilable(String),
|
|
794
|
-
lead_count: Integer,
|
|
795
|
-
metadata: T::Hash[Symbol, T.anything],
|
|
796
|
-
monthly_rank: Integer,
|
|
797
|
-
monthly_referral_count: Integer,
|
|
798
|
-
monthly_referrals: T::Array[String],
|
|
799
|
-
prev_monthly_rank: Integer,
|
|
800
|
-
prev_monthly_referral_count: Integer,
|
|
801
|
-
rank: Integer,
|
|
802
|
-
referral_count: Integer,
|
|
803
|
-
referrals: T::Array[String],
|
|
804
|
-
referral_source: GrowsurfRuby::Campaign::ReferralSource::OrSymbol,
|
|
805
|
-
referral_status: GrowsurfRuby::Campaign::ReferralStatus::OrSymbol,
|
|
806
|
-
share_count: T::Hash[Symbol, Integer],
|
|
807
|
-
share_url: String,
|
|
808
|
-
unique_impression_count: Integer,
|
|
809
|
-
unsubscribed: T::Boolean
|
|
810
|
-
).returns(T.attached_class)
|
|
811
|
-
end
|
|
812
|
-
def self.new(
|
|
813
|
-
id: nil,
|
|
814
|
-
created_at: nil,
|
|
815
|
-
email: nil,
|
|
816
|
-
fingerprint: nil,
|
|
817
|
-
first_name: nil,
|
|
818
|
-
fraud_reason_code: nil,
|
|
819
|
-
fraud_risk_level: nil,
|
|
820
|
-
impression_count: nil,
|
|
821
|
-
invite_count: nil,
|
|
822
|
-
ip_address: nil,
|
|
823
|
-
is_winner: nil,
|
|
824
|
-
last_name: nil,
|
|
825
|
-
# The number of pending referrals the participant made that have not converted
|
|
826
|
-
# into successful referrals yet.
|
|
827
|
-
lead_count: nil,
|
|
828
|
-
# Shallow custom metadata object.
|
|
829
|
-
metadata: nil,
|
|
830
|
-
monthly_rank: nil,
|
|
831
|
-
monthly_referral_count: nil,
|
|
832
|
-
monthly_referrals: nil,
|
|
833
|
-
prev_monthly_rank: nil,
|
|
834
|
-
prev_monthly_referral_count: nil,
|
|
835
|
-
rank: nil,
|
|
836
|
-
referral_count: nil,
|
|
837
|
-
referrals: nil,
|
|
838
|
-
referral_source: nil,
|
|
839
|
-
referral_status: nil,
|
|
840
|
-
share_count: nil,
|
|
841
|
-
share_url: nil,
|
|
842
|
-
unique_impression_count: nil,
|
|
843
|
-
unsubscribed: nil
|
|
844
|
-
)
|
|
845
|
-
end
|
|
846
|
-
|
|
847
|
-
sig do
|
|
848
|
-
override.returns(
|
|
849
|
-
{
|
|
850
|
-
id: String,
|
|
851
|
-
created_at: Integer,
|
|
852
|
-
email: String,
|
|
853
|
-
fingerprint: T.nilable(String),
|
|
854
|
-
first_name: T.nilable(String),
|
|
855
|
-
fraud_reason_code: String,
|
|
856
|
-
fraud_risk_level:
|
|
857
|
-
GrowsurfRuby::Campaign::FraudRiskLevel::TaggedSymbol,
|
|
858
|
-
impression_count: Integer,
|
|
859
|
-
invite_count: Integer,
|
|
860
|
-
ip_address: T.nilable(String),
|
|
861
|
-
is_winner: T::Boolean,
|
|
862
|
-
last_name: T.nilable(String),
|
|
863
|
-
lead_count: Integer,
|
|
864
|
-
metadata: T::Hash[Symbol, T.anything],
|
|
865
|
-
monthly_rank: Integer,
|
|
866
|
-
monthly_referral_count: Integer,
|
|
867
|
-
monthly_referrals: T::Array[String],
|
|
868
|
-
prev_monthly_rank: Integer,
|
|
869
|
-
prev_monthly_referral_count: Integer,
|
|
870
|
-
rank: Integer,
|
|
871
|
-
referral_count: Integer,
|
|
872
|
-
referrals: T::Array[String],
|
|
873
|
-
referral_source:
|
|
874
|
-
GrowsurfRuby::Campaign::ReferralSource::TaggedSymbol,
|
|
875
|
-
referral_status:
|
|
876
|
-
GrowsurfRuby::Campaign::ReferralStatus::TaggedSymbol,
|
|
877
|
-
share_count: T::Hash[Symbol, Integer],
|
|
878
|
-
share_url: String,
|
|
879
|
-
unique_impression_count: Integer,
|
|
880
|
-
unsubscribed: T::Boolean
|
|
881
|
-
}
|
|
882
|
-
)
|
|
883
|
-
end
|
|
884
|
-
def to_hash
|
|
885
|
-
end
|
|
886
609
|
end
|
|
887
610
|
end
|
|
888
611
|
end
|
|
@@ -30,15 +30,18 @@ module GrowsurfRuby
|
|
|
30
30
|
sig { params(body: String).void }
|
|
31
31
|
attr_writer :body
|
|
32
32
|
|
|
33
|
-
# The program email template to
|
|
34
|
-
# The
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
# `
|
|
40
|
-
# `
|
|
41
|
-
#
|
|
33
|
+
# The program email template to trigger (template mode). Send the camelCase
|
|
34
|
+
# email-type key. The available types depend on the program type; the template's
|
|
35
|
+
# `isEnabled` setting controls automatic sends only. This endpoint can trigger
|
|
36
|
+
# any sendable template. System and transactional types (login link, payout
|
|
37
|
+
# destination confirmation, tax notifications), the invite email, and the
|
|
38
|
+
# follow-up reminder cannot be sent. Referral programs: `welcomeNonReferred`,
|
|
39
|
+
# `referralLinkViewedFirstTime`, `referralLinkUsed`, `referredSignup`,
|
|
40
|
+
# `welcomeReferred`, `offerClaimed`, `goalAchieved`, `campaignEndedWinners`,
|
|
41
|
+
# `campaignEndedNonWinners`, `progressUpdateMonthly`. Affiliate programs:
|
|
42
|
+
# `welcomeNonReferred`, `referralLinkViewedFirstTime`, `referredSignup`,
|
|
43
|
+
# `offerClaimed`, `commissionGenerated`, `commissionAdjusted`, `payoutPending`,
|
|
44
|
+
# `payoutSentSuccess`, `progressUpdateMonthly`.
|
|
42
45
|
sig { returns(T.nilable(String)) }
|
|
43
46
|
attr_reader :email_type
|
|
44
47
|
|
|
@@ -78,15 +81,19 @@ module GrowsurfRuby
|
|
|
78
81
|
# inserting `{{...}}` tokens like `{{firstName}}` or `{{shareUrl}}`. See
|
|
79
82
|
# [Guide to using dynamic text in GrowSurf emails](https://support.growsurf.com/article/213-guide-to-using-dynamic-text-in-growsurf-emails).
|
|
80
83
|
body: nil,
|
|
81
|
-
# The program email template to
|
|
82
|
-
# The
|
|
83
|
-
#
|
|
84
|
-
#
|
|
84
|
+
# The program email template to trigger (template mode). Send the camelCase
|
|
85
|
+
# email-type key. The available types depend on the program type; the
|
|
86
|
+
# template's `isEnabled` setting controls automatic sends only. This endpoint
|
|
87
|
+
# can trigger any sendable template. System and transactional types (login
|
|
88
|
+
# link, payout destination confirmation, tax notifications), the invite email,
|
|
89
|
+
# and the follow-up reminder cannot be sent. Referral programs:
|
|
90
|
+
# `welcomeNonReferred`, `referralLinkViewedFirstTime`, `referralLinkUsed`,
|
|
91
|
+
# `referredSignup`, `welcomeReferred`, `offerClaimed`, `goalAchieved`,
|
|
85
92
|
# `campaignEndedWinners`, `campaignEndedNonWinners`, `progressUpdateMonthly`.
|
|
86
93
|
# Affiliate programs: `welcomeNonReferred`, `referralLinkViewedFirstTime`,
|
|
87
|
-
# `referredSignup`, `
|
|
88
|
-
# `
|
|
89
|
-
#
|
|
94
|
+
# `referredSignup`, `offerClaimed`, `commissionGenerated`,
|
|
95
|
+
# `commissionAdjusted`, `payoutPending`, `payoutSentSuccess`,
|
|
96
|
+
# `progressUpdateMonthly`.
|
|
90
97
|
email_type: nil,
|
|
91
98
|
# Optional preheader text for a free-form email.
|
|
92
99
|
preheader: nil,
|
|
@@ -191,21 +191,6 @@ module GrowsurfRuby
|
|
|
191
191
|
:email,
|
|
192
192
|
GrowsurfRuby::Campaign::ParticipantListReferralsParams::SortBy::TaggedSymbol
|
|
193
193
|
)
|
|
194
|
-
FIRST_NAME =
|
|
195
|
-
T.let(
|
|
196
|
-
:firstName,
|
|
197
|
-
GrowsurfRuby::Campaign::ParticipantListReferralsParams::SortBy::TaggedSymbol
|
|
198
|
-
)
|
|
199
|
-
LAST_NAME =
|
|
200
|
-
T.let(
|
|
201
|
-
:lastName,
|
|
202
|
-
GrowsurfRuby::Campaign::ParticipantListReferralsParams::SortBy::TaggedSymbol
|
|
203
|
-
)
|
|
204
|
-
REFERRAL_STATUS =
|
|
205
|
-
T.let(
|
|
206
|
-
:referralStatus,
|
|
207
|
-
GrowsurfRuby::Campaign::ParticipantListReferralsParams::SortBy::TaggedSymbol
|
|
208
|
-
)
|
|
209
194
|
REFERRAL_TRIGGERED_AT =
|
|
210
195
|
T.let(
|
|
211
196
|
:referralTriggeredAt,
|
|
@@ -155,10 +155,10 @@ module GrowsurfRuby
|
|
|
155
155
|
sig { params(transaction_id: String).void }
|
|
156
156
|
attr_writer :transaction_id
|
|
157
157
|
|
|
158
|
-
sig { returns(T.nilable(
|
|
158
|
+
sig { returns(T.nilable(GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider::OrSymbol)) }
|
|
159
159
|
attr_reader :payment_provider
|
|
160
160
|
|
|
161
|
-
sig { params(payment_provider:
|
|
161
|
+
sig { params(payment_provider: GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider::OrSymbol).void }
|
|
162
162
|
attr_writer :payment_provider
|
|
163
163
|
|
|
164
164
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -194,7 +194,7 @@ module GrowsurfRuby
|
|
|
194
194
|
total_tax_amounts: T::Array[T::Hash[Symbol, T.anything]],
|
|
195
195
|
total_taxes: T::Array[T::Hash[Symbol, T.anything]],
|
|
196
196
|
transaction_id: String,
|
|
197
|
-
payment_provider:
|
|
197
|
+
payment_provider: GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider::OrSymbol,
|
|
198
198
|
test_mode: T::Boolean,
|
|
199
199
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
200
200
|
).returns(T.attached_class)
|
|
@@ -259,7 +259,7 @@ module GrowsurfRuby
|
|
|
259
259
|
total_tax_amounts: T::Array[T::Hash[Symbol, T.anything]],
|
|
260
260
|
total_taxes: T::Array[T::Hash[Symbol, T.anything]],
|
|
261
261
|
transaction_id: String,
|
|
262
|
-
payment_provider:
|
|
262
|
+
payment_provider: GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider::OrSymbol,
|
|
263
263
|
test_mode: T::Boolean,
|
|
264
264
|
request_options: GrowsurfRuby::RequestOptions
|
|
265
265
|
}
|
|
@@ -267,6 +267,25 @@ module GrowsurfRuby
|
|
|
267
267
|
end
|
|
268
268
|
def to_hash
|
|
269
269
|
end
|
|
270
|
+
|
|
271
|
+
# Connected payment provider.
|
|
272
|
+
module PaymentProvider
|
|
273
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
274
|
+
|
|
275
|
+
TaggedSymbol =
|
|
276
|
+
T.type_alias do
|
|
277
|
+
T.all(Symbol, GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider)
|
|
278
|
+
end
|
|
279
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
280
|
+
|
|
281
|
+
STRIPE = T.let(:stripe, GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider::TaggedSymbol)
|
|
282
|
+
CHARGEBEE = T.let(:chargebee, GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider::TaggedSymbol)
|
|
283
|
+
RECURLY = T.let(:recurly, GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider::TaggedSymbol)
|
|
284
|
+
|
|
285
|
+
sig { override.returns(T::Array[GrowsurfRuby::Campaign::ParticipantRecordTransactionParams::PaymentProvider::TaggedSymbol]) }
|
|
286
|
+
def self.values
|
|
287
|
+
end
|
|
288
|
+
end
|
|
270
289
|
end
|
|
271
290
|
end
|
|
272
291
|
end
|
|
@@ -122,10 +122,10 @@ module GrowsurfRuby
|
|
|
122
122
|
sig { params(transaction_id: String).void }
|
|
123
123
|
attr_writer :transaction_id
|
|
124
124
|
|
|
125
|
-
sig { returns(T.nilable(
|
|
125
|
+
sig { returns(T.nilable(GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider::OrSymbol)) }
|
|
126
126
|
attr_reader :payment_provider
|
|
127
127
|
|
|
128
|
-
sig { params(payment_provider:
|
|
128
|
+
sig { params(payment_provider: GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider::OrSymbol).void }
|
|
129
129
|
attr_writer :payment_provider
|
|
130
130
|
|
|
131
131
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -154,7 +154,7 @@ module GrowsurfRuby
|
|
|
154
154
|
refund_id: String,
|
|
155
155
|
refund_status: String,
|
|
156
156
|
transaction_id: String,
|
|
157
|
-
payment_provider:
|
|
157
|
+
payment_provider: GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider::OrSymbol,
|
|
158
158
|
test_mode: T::Boolean,
|
|
159
159
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
160
160
|
).returns(T.attached_class)
|
|
@@ -204,7 +204,7 @@ module GrowsurfRuby
|
|
|
204
204
|
refund_id: String,
|
|
205
205
|
refund_status: String,
|
|
206
206
|
transaction_id: String,
|
|
207
|
-
payment_provider:
|
|
207
|
+
payment_provider: GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider::OrSymbol,
|
|
208
208
|
test_mode: T::Boolean,
|
|
209
209
|
request_options: GrowsurfRuby::RequestOptions
|
|
210
210
|
}
|
|
@@ -246,6 +246,25 @@ module GrowsurfRuby
|
|
|
246
246
|
def self.values
|
|
247
247
|
end
|
|
248
248
|
end
|
|
249
|
+
|
|
250
|
+
# Connected payment provider.
|
|
251
|
+
module PaymentProvider
|
|
252
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
253
|
+
|
|
254
|
+
TaggedSymbol =
|
|
255
|
+
T.type_alias do
|
|
256
|
+
T.all(Symbol, GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider)
|
|
257
|
+
end
|
|
258
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
259
|
+
|
|
260
|
+
STRIPE = T.let(:stripe, GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider::TaggedSymbol)
|
|
261
|
+
CHARGEBEE = T.let(:chargebee, GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider::TaggedSymbol)
|
|
262
|
+
RECURLY = T.let(:recurly, GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider::TaggedSymbol)
|
|
263
|
+
|
|
264
|
+
sig { override.returns(T::Array[GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::PaymentProvider::TaggedSymbol]) }
|
|
265
|
+
def self.values
|
|
266
|
+
end
|
|
267
|
+
end
|
|
249
268
|
end
|
|
250
269
|
end
|
|
251
270
|
end
|
|
@@ -143,6 +143,18 @@ module GrowsurfRuby
|
|
|
143
143
|
attr_writer :limit_duration
|
|
144
144
|
|
|
145
145
|
# Custom key/value metadata (single-level; values are stored as strings).
|
|
146
|
+
# Each value must be a string, number, or boolean of up to 500 characters. Each
|
|
147
|
+
# key must have 1 to 40 characters once camelCased, and two keys that camelCase
|
|
148
|
+
# to the same key are rejected. Up to 50 keys. An entry that breaks these rules
|
|
149
|
+
# returns `400`.
|
|
150
|
+
#
|
|
151
|
+
# For `DOUBLE_SIDED` rewards in referral programs, `rewardAmount` is the
|
|
152
|
+
# referrer’s amount and `referredRewardAmount` is the friend’s amount. If
|
|
153
|
+
# `referredRewardAmount` is absent, both use `rewardAmount`. New or changed positive
|
|
154
|
+
# numeric amounts must use whole units for currencies without decimals, such as JPY, and
|
|
155
|
+
# no more than two decimal places for other currencies, including USD and KWD. Excess
|
|
156
|
+
# precision is rejected rather than rounded, including when you clone a program. Existing
|
|
157
|
+
# unchanged amounts and earned rewards keep their saved values.
|
|
146
158
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
147
159
|
attr_reader :metadata
|
|
148
160
|
|
|
@@ -296,6 +308,18 @@ module GrowsurfRuby
|
|
|
296
308
|
limit: nil,
|
|
297
309
|
limit_duration: nil,
|
|
298
310
|
# Custom key/value metadata (single-level; values are stored as strings).
|
|
311
|
+
# Each value must be a string, number, or boolean of up to 500 characters.
|
|
312
|
+
# Each key must have 1 to 40 characters once camelCased, and two keys that
|
|
313
|
+
# camelCase to the same key are rejected. Up to 50 keys. An entry that breaks
|
|
314
|
+
# these rules returns `400`.
|
|
315
|
+
#
|
|
316
|
+
# For `DOUBLE_SIDED` rewards in referral programs, `rewardAmount` is the
|
|
317
|
+
# referrer’s amount and `referredRewardAmount` is the friend’s amount. If
|
|
318
|
+
# `referredRewardAmount` is absent, both use `rewardAmount`. New or changed positive
|
|
319
|
+
# numeric amounts must use whole units for currencies without decimals, such as JPY, and
|
|
320
|
+
# no more than two decimal places for other currencies, including USD and KWD. Excess
|
|
321
|
+
# precision is rejected rather than rounded, including when you clone a program.
|
|
322
|
+
# Existing unchanged amounts and earned rewards keep their saved values.
|
|
299
323
|
metadata: nil,
|
|
300
324
|
# Text shown before a participant's referral count in milestone-progress copy.
|
|
301
325
|
# Applies to `MILESTONE` rewards.
|
|
@@ -142,6 +142,18 @@ module GrowsurfRuby
|
|
|
142
142
|
attr_writer :limit_duration
|
|
143
143
|
|
|
144
144
|
# Custom key/value metadata (single-level; values are stored as strings).
|
|
145
|
+
# Each value must be a string, number, or boolean of up to 500 characters. Each
|
|
146
|
+
# key must have 1 to 40 characters once camelCased, and two keys that camelCase
|
|
147
|
+
# to the same key are rejected. Up to 50 keys. An entry that breaks these rules
|
|
148
|
+
# returns `400`.
|
|
149
|
+
#
|
|
150
|
+
# For `DOUBLE_SIDED` rewards in referral programs, `rewardAmount` is the
|
|
151
|
+
# referrer’s amount and `referredRewardAmount` is the friend’s amount. If
|
|
152
|
+
# `referredRewardAmount` is absent, both use `rewardAmount`. New or changed positive
|
|
153
|
+
# numeric amounts must use whole units for currencies without decimals, such as JPY, and
|
|
154
|
+
# no more than two decimal places for other currencies, including USD and KWD. Excess
|
|
155
|
+
# precision is rejected rather than rounded, including when you clone a program. Existing
|
|
156
|
+
# unchanged amounts and earned rewards keep their saved values.
|
|
145
157
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
146
158
|
attr_reader :metadata
|
|
147
159
|
|
|
@@ -296,6 +308,18 @@ module GrowsurfRuby
|
|
|
296
308
|
limit: nil,
|
|
297
309
|
limit_duration: nil,
|
|
298
310
|
# Custom key/value metadata (single-level; values are stored as strings).
|
|
311
|
+
# Each value must be a string, number, or boolean of up to 500 characters.
|
|
312
|
+
# Each key must have 1 to 40 characters once camelCased, and two keys that
|
|
313
|
+
# camelCase to the same key are rejected. Up to 50 keys. An entry that breaks
|
|
314
|
+
# these rules returns `400`.
|
|
315
|
+
#
|
|
316
|
+
# For `DOUBLE_SIDED` rewards in referral programs, `rewardAmount` is the
|
|
317
|
+
# referrer’s amount and `referredRewardAmount` is the friend’s amount. If
|
|
318
|
+
# `referredRewardAmount` is absent, both use `rewardAmount`. New or changed positive
|
|
319
|
+
# numeric amounts must use whole units for currencies without decimals, such as JPY, and
|
|
320
|
+
# no more than two decimal places for other currencies, including USD and KWD. Excess
|
|
321
|
+
# precision is rejected rather than rounded, including when you clone a program.
|
|
322
|
+
# Existing unchanged amounts and earned rewards keep their saved values.
|
|
299
323
|
metadata: nil,
|
|
300
324
|
# Text shown before a participant's referral count in milestone-progress copy.
|
|
301
325
|
# Applies to `MILESTONE` rewards.
|
|
@@ -19,8 +19,15 @@ module GrowsurfRuby
|
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :payload_url
|
|
21
21
|
|
|
22
|
-
# The events this webhook is subscribed to. When omitted,
|
|
23
|
-
#
|
|
22
|
+
# The events this webhook is subscribed to. When omitted, the webhook is
|
|
23
|
+
# subscribed to every event its program type offers, like a webhook added in the
|
|
24
|
+
# dashboard: referral programs offer `PARTICIPANT_REACHED_A_GOAL`,
|
|
25
|
+
# `NEW_PARTICIPANT_ADDED`, `PARTICIPANT_FRAUD_STATUS_UPDATED`, and
|
|
26
|
+
# `CAMPAIGN_ENDED`; affiliate programs offer `NEW_COMMISSION_ADDED`,
|
|
27
|
+
# `COMMISSION_ADJUSTED`, `NEW_PAYOUT_ISSUED`, `NEW_PARTICIPANT_ADDED`,
|
|
28
|
+
# `PARTICIPANT_FRAUD_STATUS_UPDATED`, and `CAMPAIGN_ENDED`. Send `[]` to
|
|
29
|
+
# subscribe to no events. An event the program type does not offer returns
|
|
30
|
+
# `400`.
|
|
24
31
|
sig do
|
|
25
32
|
returns(
|
|
26
33
|
T.nilable(T::Array[GrowsurfRuby::Campaign::WebhookEvent::OrSymbol])
|
|
@@ -61,8 +68,15 @@ module GrowsurfRuby
|
|
|
61
68
|
def self.new(
|
|
62
69
|
# The URL that receives webhook deliveries.
|
|
63
70
|
payload_url:,
|
|
64
|
-
# The events this webhook is subscribed to. When omitted,
|
|
65
|
-
#
|
|
71
|
+
# The events this webhook is subscribed to. When omitted, the webhook is
|
|
72
|
+
# subscribed to every event its program type offers, like a webhook added in
|
|
73
|
+
# the dashboard: referral programs offer `PARTICIPANT_REACHED_A_GOAL`,
|
|
74
|
+
# `NEW_PARTICIPANT_ADDED`, `PARTICIPANT_FRAUD_STATUS_UPDATED`, and
|
|
75
|
+
# `CAMPAIGN_ENDED`; affiliate programs offer `NEW_COMMISSION_ADDED`,
|
|
76
|
+
# `COMMISSION_ADJUSTED`, `NEW_PAYOUT_ISSUED`, `NEW_PARTICIPANT_ADDED`,
|
|
77
|
+
# `PARTICIPANT_FRAUD_STATUS_UPDATED`, and `CAMPAIGN_ENDED`. Send `[]` to
|
|
78
|
+
# subscribe to no events. An event the program type does not offer returns
|
|
79
|
+
# `400`.
|
|
66
80
|
events: nil,
|
|
67
81
|
is_enabled: nil,
|
|
68
82
|
# Write-only. Used to sign deliveries (the `GrowSurf-Signature` HMAC header). Never
|
|
@@ -442,6 +442,11 @@ module GrowsurfRuby
|
|
|
442
442
|
:PER_MONTH,
|
|
443
443
|
GrowsurfRuby::CampaignAPI::Reward::LimitDuration::TaggedSymbol
|
|
444
444
|
)
|
|
445
|
+
PER_YEAR =
|
|
446
|
+
T.let(
|
|
447
|
+
:PER_YEAR,
|
|
448
|
+
GrowsurfRuby::CampaignAPI::Reward::LimitDuration::TaggedSymbol
|
|
449
|
+
)
|
|
445
450
|
|
|
446
451
|
sig do
|
|
447
452
|
override.returns(
|