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
|
@@ -19,6 +19,9 @@ module GrowsurfRuby
|
|
|
19
19
|
# @return [Integer]
|
|
20
20
|
required :start_date, Integer, api_name: :startDate
|
|
21
21
|
|
|
22
|
+
# Present only when `include` contains `email`.
|
|
23
|
+
optional :email, -> { GrowsurfRuby::Models::EmailAnalytics }
|
|
24
|
+
|
|
22
25
|
# @!attribute previous_period
|
|
23
26
|
# Present only when `include` contains `previousPeriod`.
|
|
24
27
|
#
|
|
@@ -199,6 +202,13 @@ module GrowsurfRuby
|
|
|
199
202
|
# @return [Integer, nil]
|
|
200
203
|
optional :twitter_shares, Integer, api_name: :twitterShares
|
|
201
204
|
|
|
205
|
+
# @!attribute unique_commission_referrals
|
|
206
|
+
# Affiliate programs only. Number of unique referred participants represented by
|
|
207
|
+
# commissions in the requested timeframe.
|
|
208
|
+
#
|
|
209
|
+
# @return [Integer, nil]
|
|
210
|
+
optional :unique_commission_referrals, Integer, api_name: :uniqueCommissionReferrals
|
|
211
|
+
|
|
202
212
|
# @!attribute unique_impressions
|
|
203
213
|
#
|
|
204
214
|
# @return [Integer, nil]
|
|
@@ -214,7 +224,7 @@ module GrowsurfRuby
|
|
|
214
224
|
# @return [Integer, nil]
|
|
215
225
|
optional :whats_app_shares, Integer, api_name: :whatsAppShares
|
|
216
226
|
|
|
217
|
-
# @!method initialize(android_native_shares: nil, bluesky_shares: nil, copy_ref_link_shares: nil, email_shares: nil, facebook_shares: nil, impressions: nil, invites: nil, ios_native_shares: nil, linked_in_shares: nil, messenger_shares: nil, participants: nil, pinterest_shares: nil, qrcode_shares: nil, reddit_shares: nil, referral_credit_expireds: nil, referral_credit_pendings: nil, referrals: nil, sms_shares: nil, telegram_shares: nil, threads_shares: nil, total_commission_count: nil, total_commissions: nil, total_revenue: nil, tumblr_shares: nil, twitter_shares: nil, unique_impressions: nil, wechat_shares: nil, whats_app_shares: nil)
|
|
227
|
+
# @!method initialize(android_native_shares: nil, bluesky_shares: nil, copy_ref_link_shares: nil, email_shares: nil, facebook_shares: nil, impressions: nil, invites: nil, ios_native_shares: nil, linked_in_shares: nil, messenger_shares: nil, participants: nil, pinterest_shares: nil, qrcode_shares: nil, reddit_shares: nil, referral_credit_expireds: nil, referral_credit_pendings: nil, referrals: nil, sms_shares: nil, telegram_shares: nil, threads_shares: nil, total_commission_count: nil, total_commissions: nil, total_revenue: nil, tumblr_shares: nil, twitter_shares: nil, unique_commission_referrals: nil, unique_impressions: nil, wechat_shares: nil, whats_app_shares: nil)
|
|
218
228
|
# Some parameter documentations has been truncated, see
|
|
219
229
|
# {GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::Analytics} for more
|
|
220
230
|
# details.
|
|
@@ -269,6 +279,8 @@ module GrowsurfRuby
|
|
|
269
279
|
#
|
|
270
280
|
# @param twitter_shares [Integer]
|
|
271
281
|
#
|
|
282
|
+
# @param unique_commission_referrals [Integer] Affiliate programs only. Number of unique referred participants represented by commissions in the requested timeframe.
|
|
283
|
+
#
|
|
272
284
|
# @param unique_impressions [Integer]
|
|
273
285
|
#
|
|
274
286
|
# @param wechat_shares [Integer]
|
|
@@ -283,6 +295,9 @@ module GrowsurfRuby
|
|
|
283
295
|
# @return [GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::Analytics]
|
|
284
296
|
required :analytics, -> { GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::Analytics }
|
|
285
297
|
|
|
298
|
+
# Present when the parent request includes both `previousPeriod` and `email`.
|
|
299
|
+
optional :email, -> { GrowsurfRuby::Models::EmailAnalytics }
|
|
300
|
+
|
|
286
301
|
# @!attribute end_date
|
|
287
302
|
#
|
|
288
303
|
# @return [Integer]
|
|
@@ -355,6 +370,9 @@ module GrowsurfRuby
|
|
|
355
370
|
# @return [Integer, nil]
|
|
356
371
|
optional :email_shares, Integer, api_name: :emailShares
|
|
357
372
|
|
|
373
|
+
# Per-period email counts. Present only when `include` contains `email`.
|
|
374
|
+
optional :email, -> { GrowsurfRuby::Models::EmailAnalytics::Counts }
|
|
375
|
+
|
|
358
376
|
# @!attribute facebook_shares
|
|
359
377
|
#
|
|
360
378
|
# @return [Integer, nil]
|
|
@@ -470,6 +488,13 @@ module GrowsurfRuby
|
|
|
470
488
|
# @return [Integer, nil]
|
|
471
489
|
optional :twitter_shares, Integer, api_name: :twitterShares
|
|
472
490
|
|
|
491
|
+
# @!attribute unique_commission_referrals
|
|
492
|
+
# Affiliate programs only. Number of unique referred participants represented by
|
|
493
|
+
# commissions in the requested timeframe.
|
|
494
|
+
#
|
|
495
|
+
# @return [Integer, nil]
|
|
496
|
+
optional :unique_commission_referrals, Integer, api_name: :uniqueCommissionReferrals
|
|
497
|
+
|
|
473
498
|
# @!attribute unique_impressions
|
|
474
499
|
#
|
|
475
500
|
# @return [Integer, nil]
|
|
@@ -485,7 +510,7 @@ module GrowsurfRuby
|
|
|
485
510
|
# @return [Integer, nil]
|
|
486
511
|
optional :whats_app_shares, Integer, api_name: :whatsAppShares
|
|
487
512
|
|
|
488
|
-
# @!method initialize(android_native_shares: nil, bluesky_shares: nil, copy_ref_link_shares: nil, email_shares: nil, facebook_shares: nil, impressions: nil, invites: nil, ios_native_shares: nil, linked_in_shares: nil, messenger_shares: nil, participants: nil, period_start: nil, pinterest_shares: nil, qrcode_shares: nil, reddit_shares: nil, referral_credit_expireds: nil, referral_credit_pendings: nil, referrals: nil, sms_shares: nil, telegram_shares: nil, threads_shares: nil, total_commission_count: nil, total_commissions: nil, total_revenue: nil, tumblr_shares: nil, twitter_shares: nil, unique_impressions: nil, wechat_shares: nil, whats_app_shares: nil)
|
|
513
|
+
# @!method initialize(android_native_shares: nil, bluesky_shares: nil, copy_ref_link_shares: nil, email_shares: nil, facebook_shares: nil, impressions: nil, invites: nil, ios_native_shares: nil, linked_in_shares: nil, messenger_shares: nil, participants: nil, period_start: nil, pinterest_shares: nil, qrcode_shares: nil, reddit_shares: nil, referral_credit_expireds: nil, referral_credit_pendings: nil, referrals: nil, sms_shares: nil, telegram_shares: nil, threads_shares: nil, total_commission_count: nil, total_commissions: nil, total_revenue: nil, tumblr_shares: nil, twitter_shares: nil, unique_commission_referrals: nil, unique_impressions: nil, wechat_shares: nil, whats_app_shares: nil)
|
|
489
514
|
# Some parameter documentations has been truncated, see
|
|
490
515
|
# {GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::Series} for more
|
|
491
516
|
# details.
|
|
@@ -542,6 +567,8 @@ module GrowsurfRuby
|
|
|
542
567
|
#
|
|
543
568
|
# @param twitter_shares [Integer]
|
|
544
569
|
#
|
|
570
|
+
# @param unique_commission_referrals [Integer] Affiliate programs only. Number of unique referred participants represented by commissions in the requested timeframe.
|
|
571
|
+
#
|
|
545
572
|
# @param unique_impressions [Integer]
|
|
546
573
|
#
|
|
547
574
|
# @param wechat_shares [Integer]
|
|
@@ -711,6 +738,14 @@ module GrowsurfRuby
|
|
|
711
738
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric
|
|
712
739
|
}
|
|
713
740
|
|
|
741
|
+
# @!attribute reversed
|
|
742
|
+
#
|
|
743
|
+
# @return [GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric, nil]
|
|
744
|
+
optional :reversed,
|
|
745
|
+
-> {
|
|
746
|
+
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric
|
|
747
|
+
}
|
|
748
|
+
|
|
714
749
|
# @!attribute upcoming
|
|
715
750
|
#
|
|
716
751
|
# @return [GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric, nil]
|
|
@@ -719,7 +754,7 @@ module GrowsurfRuby
|
|
|
719
754
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric
|
|
720
755
|
}
|
|
721
756
|
|
|
722
|
-
# @!method initialize(failed: nil, issued: nil, queued: nil, upcoming: nil)
|
|
757
|
+
# @!method initialize(failed: nil, issued: nil, queued: nil, reversed: nil, upcoming: nil)
|
|
723
758
|
# Affiliate only. Payout counts and amounts by status.
|
|
724
759
|
#
|
|
725
760
|
# @param failed [GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric]
|
|
@@ -728,6 +763,8 @@ module GrowsurfRuby
|
|
|
728
763
|
#
|
|
729
764
|
# @param queued [GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric]
|
|
730
765
|
#
|
|
766
|
+
# @param reversed [GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric]
|
|
767
|
+
#
|
|
731
768
|
# @param upcoming [GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric]
|
|
732
769
|
|
|
733
770
|
class PayoutStatusMetric < GrowsurfRuby::Internal::Type::BaseModel
|
|
@@ -751,21 +788,32 @@ module GrowsurfRuby
|
|
|
751
788
|
|
|
752
789
|
# @see GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts#reward_status
|
|
753
790
|
class RewardStatus < GrowsurfRuby::Internal::Type::BaseModel
|
|
754
|
-
# @!attribute
|
|
791
|
+
# @!attribute completed
|
|
792
|
+
# Approved rewards that are fulfilled.
|
|
755
793
|
#
|
|
756
794
|
# @return [Integer, nil]
|
|
757
|
-
optional :
|
|
795
|
+
optional :completed, Integer
|
|
758
796
|
|
|
759
|
-
# @!attribute
|
|
760
|
-
# Unapproved rewards awaiting
|
|
797
|
+
# @!attribute unapproved
|
|
798
|
+
# Unapproved rewards awaiting review.
|
|
799
|
+
#
|
|
800
|
+
# @return [Integer, nil]
|
|
801
|
+
optional :unapproved, Integer
|
|
802
|
+
|
|
803
|
+
# @!attribute unfulfilled
|
|
804
|
+
# Rewards that are approved but not fulfilled.
|
|
761
805
|
#
|
|
762
806
|
# @return [Integer, nil]
|
|
763
|
-
optional :
|
|
807
|
+
optional :unfulfilled, Integer
|
|
764
808
|
|
|
765
|
-
# @!method initialize(
|
|
766
|
-
#
|
|
809
|
+
# @!method initialize(completed: nil, unapproved: nil, unfulfilled: nil)
|
|
810
|
+
# Reward counts grouped by review and fulfillment status.
|
|
811
|
+
#
|
|
812
|
+
# @param completed [Integer] Approved rewards that are fulfilled.
|
|
813
|
+
#
|
|
814
|
+
# @param unapproved [Integer] Unapproved rewards awaiting review.
|
|
767
815
|
#
|
|
768
|
-
# @param
|
|
816
|
+
# @param unfulfilled [Integer] Rewards that are approved but not fulfilled.
|
|
769
817
|
end
|
|
770
818
|
end
|
|
771
819
|
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
# @see GrowsurfRuby::Resources::Campaign#review_affiliate_application
|
|
6
|
+
# Either decide a pending application with `status`, or move a denied application's
|
|
7
|
+
# reapplication window with `reapply_allowed_at`. Provide exactly one of those
|
|
8
|
+
# fields.
|
|
9
|
+
class CampaignReviewAffiliateApplicationParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
10
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
11
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
12
|
+
|
|
13
|
+
# @!attribute id
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :id, String
|
|
17
|
+
|
|
18
|
+
# @!attribute application_id
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
required :application_id, String
|
|
22
|
+
|
|
23
|
+
# @!attribute allow_immediate_reapply
|
|
24
|
+
# When denying, let the applicant reapply right away instead of waiting out the
|
|
25
|
+
# program's reapplication cooldown. Only valid when `status` is `DENIED`.
|
|
26
|
+
#
|
|
27
|
+
# @return [Boolean, nil]
|
|
28
|
+
optional :allow_immediate_reapply,
|
|
29
|
+
GrowsurfRuby::Internal::Type::Boolean,
|
|
30
|
+
api_name: :allowImmediateReapply
|
|
31
|
+
|
|
32
|
+
# @!attribute reapply_allowed_at
|
|
33
|
+
# For an already-denied application, move the reapplication window to this earlier
|
|
34
|
+
# time, in Unix milliseconds. Send without `status`.
|
|
35
|
+
#
|
|
36
|
+
# @return [Integer, nil]
|
|
37
|
+
optional :reapply_allowed_at, Integer, api_name: :reapplyAllowedAt
|
|
38
|
+
|
|
39
|
+
# @!attribute rejection_reason
|
|
40
|
+
# Short reason recorded with a denial. Only valid when `status` is `DENIED`.
|
|
41
|
+
# Maximum 255 characters.
|
|
42
|
+
#
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :rejection_reason, String, api_name: :rejectionReason
|
|
45
|
+
|
|
46
|
+
# @!attribute review_note
|
|
47
|
+
# Private note recorded with a denial. Only valid when `status` is `DENIED`; never
|
|
48
|
+
# shown to the applicant. Maximum 500 characters.
|
|
49
|
+
#
|
|
50
|
+
# @return [String, nil]
|
|
51
|
+
optional :review_note, String, api_name: :reviewNote
|
|
52
|
+
|
|
53
|
+
# @!attribute status
|
|
54
|
+
# The decision. `APPROVED` enrolls the applicant as an affiliate; `DENIED` closes
|
|
55
|
+
# the application.
|
|
56
|
+
#
|
|
57
|
+
# @return [Symbol, GrowsurfRuby::Models::CampaignReviewAffiliateApplicationParams::Status, nil]
|
|
58
|
+
optional :status, enum: -> { GrowsurfRuby::CampaignReviewAffiliateApplicationParams::Status }
|
|
59
|
+
|
|
60
|
+
# @!method initialize(id:, application_id:, allow_immediate_reapply: nil, reapply_allowed_at: nil, rejection_reason: nil, review_note: nil, status: nil, request_options: {})
|
|
61
|
+
# Some parameter documentations has been truncated, see
|
|
62
|
+
# {GrowsurfRuby::Models::CampaignReviewAffiliateApplicationParams} for more
|
|
63
|
+
# details.
|
|
64
|
+
#
|
|
65
|
+
# @param id [String]
|
|
66
|
+
#
|
|
67
|
+
# @param application_id [String]
|
|
68
|
+
#
|
|
69
|
+
# @param allow_immediate_reapply [Boolean] When denying, let the applicant reapply right away instead of waiting out the
|
|
70
|
+
#
|
|
71
|
+
# @param reapply_allowed_at [Integer] For an already-denied application, move the reapplication window to this earlier
|
|
72
|
+
#
|
|
73
|
+
# @param rejection_reason [String] Short reason recorded with a denial. Only valid when `status` is `DENIED`.
|
|
74
|
+
#
|
|
75
|
+
# @param review_note [String] Private note recorded with a denial. Only valid when `status` is `DENIED`;
|
|
76
|
+
#
|
|
77
|
+
# @param status [Symbol, GrowsurfRuby::Models::CampaignReviewAffiliateApplicationParams::Status] The decision. `APPROVED` enrolls the applicant as an affiliate; `DENIED` closes
|
|
78
|
+
#
|
|
79
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
80
|
+
|
|
81
|
+
# The decision. `APPROVED` enrolls the applicant as an affiliate; `DENIED` closes
|
|
82
|
+
# the application.
|
|
83
|
+
module Status
|
|
84
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
85
|
+
|
|
86
|
+
APPROVED = :APPROVED
|
|
87
|
+
DENIED = :DENIED
|
|
88
|
+
|
|
89
|
+
# @!method self.values
|
|
90
|
+
# @return [Array<Symbol>]
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
# @see GrowsurfRuby::Resources::Campaign#revoke_affiliate_invite
|
|
6
|
+
class CampaignRevokeAffiliateInviteParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute invite_id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :invite_id, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(id:, invite_id:, request_options: {})
|
|
21
|
+
# @param id [String]
|
|
22
|
+
# @param invite_id [String]
|
|
23
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
# Accepted-send and lifecycle metrics for program emails in a requested window.
|
|
6
|
+
class EmailAnalytics < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
required :sent, Integer
|
|
8
|
+
required :delivered, Integer
|
|
9
|
+
required :opened, Integer
|
|
10
|
+
required :clicked, Integer
|
|
11
|
+
required :bounced, Integer
|
|
12
|
+
required :spam_complaints, Integer, api_name: :spamComplaints
|
|
13
|
+
required :delivery_rate, Float, api_name: :deliveryRate
|
|
14
|
+
required :open_rate, Float, api_name: :openRate
|
|
15
|
+
required :click_rate, Float, api_name: :clickRate
|
|
16
|
+
required :bounce_rate, Float, api_name: :bounceRate
|
|
17
|
+
required :by_type,
|
|
18
|
+
-> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Models::EmailAnalytics::ByType] },
|
|
19
|
+
api_name: :byType
|
|
20
|
+
required :coverage_start_date, Integer, api_name: :coverageStartDate, nil?: true
|
|
21
|
+
required :is_partial, GrowsurfRuby::Internal::Type::Boolean, api_name: :isPartial
|
|
22
|
+
|
|
23
|
+
class Counts < GrowsurfRuby::Internal::Type::BaseModel
|
|
24
|
+
required :sent, Integer
|
|
25
|
+
required :delivered, Integer
|
|
26
|
+
required :opened, Integer
|
|
27
|
+
required :clicked, Integer
|
|
28
|
+
required :bounced, Integer
|
|
29
|
+
required :spam_complaints, Integer, api_name: :spamComplaints
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
class ByType < Counts
|
|
33
|
+
required :email_type, String, api_name: :emailType
|
|
34
|
+
required :delivery_rate, Float, api_name: :deliveryRate
|
|
35
|
+
required :open_rate, Float, api_name: :openRate
|
|
36
|
+
required :click_rate, Float, api_name: :clickRate
|
|
37
|
+
required :bounce_rate, Float, api_name: :bounceRate
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -106,7 +106,12 @@ module GrowsurfRuby
|
|
|
106
106
|
# @return [Integer, nil]
|
|
107
107
|
optional :queued_at, Integer, api_name: :queuedAt
|
|
108
108
|
|
|
109
|
-
# @!
|
|
109
|
+
# @!attribute reversed_at
|
|
110
|
+
#
|
|
111
|
+
# @return [Integer, nil]
|
|
112
|
+
optional :reversed_at, Integer, api_name: :reversedAt
|
|
113
|
+
|
|
114
|
+
# @!method initialize(id:, amount:, commission_ids:, created_at:, currency_iso:, participant_id:, status:, amount_in_campaign_currency: nil, campaign_currency_iso: nil, exchange_rate: nil, exchange_rate_at: nil, failed_at: nil, fx_error: nil, issued_at: nil, provider: nil, queued_at: nil, reversed_at: nil)
|
|
110
115
|
# @param id [String]
|
|
111
116
|
# @param amount [Integer]
|
|
112
117
|
# @param commission_ids [Array<String>]
|
|
@@ -123,6 +128,7 @@ module GrowsurfRuby
|
|
|
123
128
|
# @param issued_at [Integer]
|
|
124
129
|
# @param provider [String, nil]
|
|
125
130
|
# @param queued_at [Integer]
|
|
131
|
+
# @param reversed_at [Integer]
|
|
126
132
|
|
|
127
133
|
# @see GrowsurfRuby::Models::ParticipantPayoutList::Payout#status
|
|
128
134
|
module Status
|
|
@@ -132,6 +138,7 @@ module GrowsurfRuby
|
|
|
132
138
|
QUEUED = :QUEUED
|
|
133
139
|
ISSUED = :ISSUED
|
|
134
140
|
FAILED = :FAILED
|
|
141
|
+
REVERSED = :REVERSED
|
|
135
142
|
|
|
136
143
|
# @!method self.values
|
|
137
144
|
# @return [Array<Symbol>]
|
|
@@ -10,17 +10,18 @@ module GrowsurfRuby
|
|
|
10
10
|
# @return [Float, nil]
|
|
11
11
|
optional :fair_market_value_usd, Float, api_name: :fairMarketValueUSD, nil?: true
|
|
12
12
|
|
|
13
|
-
# @!attribute
|
|
14
|
-
#
|
|
15
|
-
#
|
|
13
|
+
# @!attribute tax_character
|
|
14
|
+
# The reason the recipient earns this reward. `null` inherits the program's
|
|
15
|
+
# confirmed tax treatment for configurable non-commission rewards. Commission
|
|
16
|
+
# rewards always use `NONEMPLOYEE_SERVICES`.
|
|
16
17
|
#
|
|
17
|
-
# @return [
|
|
18
|
-
optional :
|
|
19
|
-
GrowsurfRuby::
|
|
20
|
-
api_name: :
|
|
18
|
+
# @return [Symbol, GrowsurfRuby::Models::RewardTaxValuation::TaxCharacter, nil]
|
|
19
|
+
optional :tax_character,
|
|
20
|
+
enum: -> { GrowsurfRuby::RewardTaxValuation::TaxCharacter },
|
|
21
|
+
api_name: :taxCharacter,
|
|
21
22
|
nil?: true
|
|
22
23
|
|
|
23
|
-
# @!method initialize(fair_market_value_usd: nil,
|
|
24
|
+
# @!method initialize(fair_market_value_usd: nil, tax_character: nil)
|
|
24
25
|
# Some parameter documentations has been truncated, see
|
|
25
26
|
# {GrowsurfRuby::Models::RewardTaxValuation} for more details.
|
|
26
27
|
#
|
|
@@ -29,7 +30,21 @@ module GrowsurfRuby
|
|
|
29
30
|
#
|
|
30
31
|
# @param fair_market_value_usd [Float, nil] Manual fair-market value in USD (major units) used as the fallback when the rewa
|
|
31
32
|
#
|
|
32
|
-
# @param
|
|
33
|
+
# @param tax_character [Symbol, GrowsurfRuby::Models::RewardTaxValuation::TaxCharacter, nil] The reason the recipient earns this reward. `null` inherits the program's
|
|
34
|
+
|
|
35
|
+
# The U.S. federal tax character of a reward.
|
|
36
|
+
module TaxCharacter
|
|
37
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
38
|
+
|
|
39
|
+
NONEMPLOYEE_SERVICES = :NONEMPLOYEE_SERVICES
|
|
40
|
+
PRIZE_OR_AWARD = :PRIZE_OR_AWARD
|
|
41
|
+
PURCHASE_REBATE = :PURCHASE_REBATE
|
|
42
|
+
OTHER_INCOME = :OTHER_INCOME
|
|
43
|
+
REVIEW_REQUIRED = :REVIEW_REQUIRED
|
|
44
|
+
|
|
45
|
+
# @!method self.values
|
|
46
|
+
# @return [Array<Symbol>]
|
|
47
|
+
end
|
|
33
48
|
end
|
|
34
49
|
end
|
|
35
50
|
end
|
data/lib/growsurf_ruby/models.rb
CHANGED
|
@@ -41,6 +41,10 @@ module GrowsurfRuby
|
|
|
41
41
|
|
|
42
42
|
AccountCreateParams = GrowsurfRuby::Models::AccountCreateParams
|
|
43
43
|
|
|
44
|
+
AffiliateApplication = GrowsurfRuby::Models::AffiliateApplication
|
|
45
|
+
|
|
46
|
+
AffiliateInvite = GrowsurfRuby::Models::AffiliateInvite
|
|
47
|
+
|
|
44
48
|
Team = GrowsurfRuby::Models::Team
|
|
45
49
|
|
|
46
50
|
TeamUpdateParams = GrowsurfRuby::Models::TeamUpdateParams
|
|
@@ -49,11 +53,17 @@ module GrowsurfRuby
|
|
|
49
53
|
|
|
50
54
|
CampaignAPI = GrowsurfRuby::Models::CampaignAPI
|
|
51
55
|
|
|
56
|
+
CampaignCreateAffiliateInviteParams = GrowsurfRuby::Models::CampaignCreateAffiliateInviteParams
|
|
57
|
+
|
|
52
58
|
CampaignCreateMobileParticipantTokenParams =
|
|
53
59
|
GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenParams
|
|
54
60
|
|
|
55
61
|
CampaignCreateParams = GrowsurfRuby::Models::CampaignCreateParams
|
|
56
62
|
|
|
63
|
+
CampaignListAffiliateApplicationsParams = GrowsurfRuby::Models::CampaignListAffiliateApplicationsParams
|
|
64
|
+
|
|
65
|
+
CampaignListAffiliateInvitesParams = GrowsurfRuby::Models::CampaignListAffiliateInvitesParams
|
|
66
|
+
|
|
57
67
|
CampaignListCommissionsParams = GrowsurfRuby::Models::CampaignListCommissionsParams
|
|
58
68
|
|
|
59
69
|
CampaignListLeaderboardParams = GrowsurfRuby::Models::CampaignListLeaderboardParams
|
|
@@ -66,10 +76,19 @@ module GrowsurfRuby
|
|
|
66
76
|
|
|
67
77
|
CampaignListReferralsParams = GrowsurfRuby::Models::CampaignListReferralsParams
|
|
68
78
|
|
|
79
|
+
CampaignResendAffiliateInviteParams = GrowsurfRuby::Models::CampaignResendAffiliateInviteParams
|
|
80
|
+
|
|
81
|
+
CampaignRetrieveAffiliateApplicationParams =
|
|
82
|
+
GrowsurfRuby::Models::CampaignRetrieveAffiliateApplicationParams
|
|
83
|
+
|
|
69
84
|
CampaignRetrieveAnalyticsParams = GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams
|
|
70
85
|
|
|
71
86
|
CampaignRetrieveParams = GrowsurfRuby::Models::CampaignRetrieveParams
|
|
72
87
|
|
|
88
|
+
CampaignReviewAffiliateApplicationParams = GrowsurfRuby::Models::CampaignReviewAffiliateApplicationParams
|
|
89
|
+
|
|
90
|
+
CampaignRevokeAffiliateInviteParams = GrowsurfRuby::Models::CampaignRevokeAffiliateInviteParams
|
|
91
|
+
|
|
73
92
|
CampaignUpdateParams = GrowsurfRuby::Models::CampaignUpdateParams
|
|
74
93
|
|
|
75
94
|
CommissionStructure = GrowsurfRuby::Models::CommissionStructure
|
|
@@ -4,12 +4,13 @@ module GrowsurfRuby
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Campaign
|
|
6
6
|
class Design
|
|
7
|
-
# Retrieves a program's design
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
# available fields depend on the program type
|
|
12
|
-
#
|
|
7
|
+
# Retrieves a program's configured design fields: the dashboard Program Editor's **Design**
|
|
8
|
+
# tab plus the payout-destination confirmation page copy configured from payout integration
|
|
9
|
+
# cards. This includes the GrowSurf window layout, header, share channels and invites,
|
|
10
|
+
# signup form, portal and landing pages, theme styling, and referral or affiliate summary
|
|
11
|
+
# and status sections. The available fields depend on the program type.
|
|
12
|
+
# `payoutDestinationConfirmation` is omitted when no confirmation fields are stored. Stored
|
|
13
|
+
# `null` fields are returned as `null`; omitted and `null` fields use localized defaults.
|
|
13
14
|
#
|
|
14
15
|
# @overload retrieve(id, request_options: {})
|
|
15
16
|
#
|
|
@@ -27,17 +28,18 @@ module GrowsurfRuby
|
|
|
27
28
|
)
|
|
28
29
|
end
|
|
29
30
|
|
|
30
|
-
# Updates a program's design configuration
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
# editable via the API.
|
|
31
|
+
# Updates a program's design configuration, including the payout-destination confirmation
|
|
32
|
+
# page copy configured from payout integration cards. Only the fields you send are changed;
|
|
33
|
+
# anything you leave out is untouched (arrays such as `signup.fields` replace wholesale).
|
|
34
|
+
# Unknown fields, fields not available for the program type, and invalid values return a
|
|
35
|
+
# `400`. Landing-page custom code and JavaScript are not editable via the API.
|
|
35
36
|
#
|
|
36
37
|
# @overload update(id, body, request_options: {})
|
|
37
38
|
#
|
|
38
39
|
# @param id [String] GrowSurf program ID.
|
|
39
40
|
#
|
|
40
|
-
# @param body [Hash{Symbol=>Object}] Partial design configuration to merge
|
|
41
|
+
# @param body [Hash{Symbol=>Object}] Partial design configuration to merge, such as
|
|
42
|
+
# `{ payoutDestinationConfirmation: { headline: "Confirm your {{payoutProvider}} payout email" } }`.
|
|
41
43
|
#
|
|
42
44
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
43
45
|
#
|
|
@@ -6,9 +6,9 @@ module GrowsurfRuby
|
|
|
6
6
|
class Options
|
|
7
7
|
# Retrieves a program's options — the same surface as the dashboard Program
|
|
8
8
|
# Editor's **Options** tab. Includes reward/fraud approval, anti-fraud lists +
|
|
9
|
-
# toggles, referral cookie/credit windows, reCAPTCHA,
|
|
10
|
-
# settings (affiliate only), and
|
|
11
|
-
# `fraud.recaptcha.secretKey` is never returned.
|
|
9
|
+
# toggles, referral cookie/credit windows, reCAPTCHA, affiliate enrollment +
|
|
10
|
+
# application review, payout threshold + tax settings (affiliate only), and
|
|
11
|
+
# notification-email settings. `fraud.recaptcha.secretKey` is never returned.
|
|
12
12
|
#
|
|
13
13
|
# @overload retrieve(id, request_options: {})
|
|
14
14
|
#
|
|
@@ -28,10 +28,10 @@ module GrowsurfRuby
|
|
|
28
28
|
|
|
29
29
|
# Updates a program's options. Only the fields you send are changed. Some fields
|
|
30
30
|
# are program-type specific (`requireManualRewardApproval`/`autoFulfillRewards`
|
|
31
|
-
# are referral-only; `
|
|
32
|
-
#
|
|
33
|
-
# `fraud.recaptcha.secretKey`
|
|
34
|
-
# means "never expires".
|
|
31
|
+
# are referral-only; `affiliateApplicationMode`/`affiliateReapplicationPolicy`
|
|
32
|
+
# and `payoutThreshold`/`taxDocumentation` are affiliate-only, and affiliate
|
|
33
|
+
# programs require `requireParticipantAuth: true`). `fraud.recaptcha.secretKey`
|
|
34
|
+
# is write-only. `referralCreditWindowDays: null` means "never expires".
|
|
35
35
|
#
|
|
36
36
|
# @overload update(id, body, request_options: {})
|
|
37
37
|
#
|