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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class CampaignRetrieveAffiliateApplicationParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
GrowsurfRuby::CampaignRetrieveAffiliateApplicationParams,
|
|
13
|
+
GrowsurfRuby::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :application_id
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
id: String,
|
|
26
|
+
application_id: String,
|
|
27
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(id:, application_id:, request_options: {})
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
override.returns(
|
|
35
|
+
{
|
|
36
|
+
id: String,
|
|
37
|
+
application_id: String,
|
|
38
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -32,11 +32,13 @@ module GrowsurfRuby
|
|
|
32
32
|
sig { params(end_date: Integer).void }
|
|
33
33
|
attr_writer :end_date
|
|
34
34
|
|
|
35
|
-
# Comma-separated list of optional
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
35
|
+
# Comma-separated list of optional data to include: `previousPeriod` adds totals for the
|
|
36
|
+
# equal-length window immediately before the requested one; `statusCounts` adds reward (and,
|
|
37
|
+
# for affiliate programs, affiliate/commission/payout) status breakdowns; `rates` adds
|
|
38
|
+
# derived referral rates; `email` adds `sent`, `delivered`, `opened`, `clicked`, `bounced`,
|
|
39
|
+
# `spamComplaints`, and per-email-type metrics. When `email` and an interval are both
|
|
40
|
+
# requested, each `series` item also contains counts for emails sent during that period.
|
|
41
|
+
# Combine `email` with `previousPeriod` to include the same email metrics in both windows.
|
|
40
42
|
sig { returns(T.nilable(String)) }
|
|
41
43
|
attr_reader :include
|
|
42
44
|
|
|
@@ -89,11 +91,14 @@ module GrowsurfRuby
|
|
|
89
91
|
# End date of the analytics timeframe as a Unix timestamp in milliseconds.
|
|
90
92
|
# Required if `days` is not set.
|
|
91
93
|
end_date: nil,
|
|
92
|
-
# Comma-separated list of optional
|
|
93
|
-
#
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
#
|
|
94
|
+
# Comma-separated list of optional data to include: `previousPeriod` adds totals for the
|
|
95
|
+
# equal-length window immediately before the requested one; `statusCounts` adds reward
|
|
96
|
+
# (and, for affiliate programs, affiliate/commission/payout) status breakdowns; `rates`
|
|
97
|
+
# adds derived referral rates; `email` adds `sent`, `delivered`, `opened`, `clicked`,
|
|
98
|
+
# `bounced`, `spamComplaints`, and per-email-type metrics. When `email` and an interval
|
|
99
|
+
# are both requested, each `series` item also contains counts for emails sent during that
|
|
100
|
+
# period. Combine `email` with `previousPeriod` to include the same email metrics in both
|
|
101
|
+
# windows.
|
|
97
102
|
include: nil,
|
|
98
103
|
# When set to `day`, `week`, or `month`, the response also includes a `series` array
|
|
99
104
|
# with per-period totals. Defaults to `total` (no series).
|
|
@@ -329,6 +329,12 @@ module GrowsurfRuby
|
|
|
329
329
|
sig { params(twitter_shares: Integer).void }
|
|
330
330
|
attr_writer :twitter_shares
|
|
331
331
|
|
|
332
|
+
sig { returns(T.nilable(Integer)) }
|
|
333
|
+
attr_reader :unique_commission_referrals
|
|
334
|
+
|
|
335
|
+
sig { params(unique_commission_referrals: Integer).void }
|
|
336
|
+
attr_writer :unique_commission_referrals
|
|
337
|
+
|
|
332
338
|
sig { returns(T.nilable(Integer)) }
|
|
333
339
|
attr_reader :unique_impressions
|
|
334
340
|
|
|
@@ -374,6 +380,7 @@ module GrowsurfRuby
|
|
|
374
380
|
total_revenue: Integer,
|
|
375
381
|
tumblr_shares: Integer,
|
|
376
382
|
twitter_shares: Integer,
|
|
383
|
+
unique_commission_referrals: Integer,
|
|
377
384
|
unique_impressions: Integer,
|
|
378
385
|
wechat_shares: Integer,
|
|
379
386
|
whats_app_shares: Integer
|
|
@@ -409,6 +416,7 @@ module GrowsurfRuby
|
|
|
409
416
|
total_revenue: nil,
|
|
410
417
|
tumblr_shares: nil,
|
|
411
418
|
twitter_shares: nil,
|
|
419
|
+
unique_commission_referrals: nil,
|
|
412
420
|
unique_impressions: nil,
|
|
413
421
|
wechat_shares: nil,
|
|
414
422
|
whats_app_shares: nil
|
|
@@ -443,6 +451,7 @@ module GrowsurfRuby
|
|
|
443
451
|
total_revenue: Integer,
|
|
444
452
|
tumblr_shares: Integer,
|
|
445
453
|
twitter_shares: Integer,
|
|
454
|
+
unique_commission_referrals: Integer,
|
|
446
455
|
unique_impressions: Integer,
|
|
447
456
|
wechat_shares: Integer,
|
|
448
457
|
whats_app_shares: Integer
|
|
@@ -741,6 +750,12 @@ module GrowsurfRuby
|
|
|
741
750
|
sig { params(twitter_shares: Integer).void }
|
|
742
751
|
attr_writer :twitter_shares
|
|
743
752
|
|
|
753
|
+
sig { returns(T.nilable(Integer)) }
|
|
754
|
+
attr_reader :unique_commission_referrals
|
|
755
|
+
|
|
756
|
+
sig { params(unique_commission_referrals: Integer).void }
|
|
757
|
+
attr_writer :unique_commission_referrals
|
|
758
|
+
|
|
744
759
|
sig { returns(T.nilable(Integer)) }
|
|
745
760
|
attr_reader :unique_impressions
|
|
746
761
|
|
|
@@ -787,6 +802,7 @@ module GrowsurfRuby
|
|
|
787
802
|
total_revenue: Integer,
|
|
788
803
|
tumblr_shares: Integer,
|
|
789
804
|
twitter_shares: Integer,
|
|
805
|
+
unique_commission_referrals: Integer,
|
|
790
806
|
unique_impressions: Integer,
|
|
791
807
|
wechat_shares: Integer,
|
|
792
808
|
whats_app_shares: Integer
|
|
@@ -824,6 +840,7 @@ module GrowsurfRuby
|
|
|
824
840
|
total_revenue: nil,
|
|
825
841
|
tumblr_shares: nil,
|
|
826
842
|
twitter_shares: nil,
|
|
843
|
+
unique_commission_referrals: nil,
|
|
827
844
|
unique_impressions: nil,
|
|
828
845
|
wechat_shares: nil,
|
|
829
846
|
whats_app_shares: nil
|
|
@@ -859,6 +876,7 @@ module GrowsurfRuby
|
|
|
859
876
|
total_revenue: Integer,
|
|
860
877
|
tumblr_shares: Integer,
|
|
861
878
|
twitter_shares: Integer,
|
|
879
|
+
unique_commission_referrals: Integer,
|
|
862
880
|
unique_impressions: Integer,
|
|
863
881
|
wechat_shares: Integer,
|
|
864
882
|
whats_app_shares: Integer
|
|
@@ -1219,6 +1237,23 @@ module GrowsurfRuby
|
|
|
1219
1237
|
end
|
|
1220
1238
|
attr_writer :queued
|
|
1221
1239
|
|
|
1240
|
+
sig do
|
|
1241
|
+
returns(
|
|
1242
|
+
T.nilable(
|
|
1243
|
+
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric
|
|
1244
|
+
)
|
|
1245
|
+
)
|
|
1246
|
+
end
|
|
1247
|
+
attr_reader :reversed
|
|
1248
|
+
|
|
1249
|
+
sig do
|
|
1250
|
+
params(
|
|
1251
|
+
reversed:
|
|
1252
|
+
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric::OrHash
|
|
1253
|
+
).void
|
|
1254
|
+
end
|
|
1255
|
+
attr_writer :reversed
|
|
1256
|
+
|
|
1222
1257
|
sig do
|
|
1223
1258
|
returns(
|
|
1224
1259
|
T.nilable(
|
|
@@ -1245,11 +1280,19 @@ module GrowsurfRuby
|
|
|
1245
1280
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric::OrHash,
|
|
1246
1281
|
queued:
|
|
1247
1282
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric::OrHash,
|
|
1283
|
+
reversed:
|
|
1284
|
+
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric::OrHash,
|
|
1248
1285
|
upcoming:
|
|
1249
1286
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric::OrHash
|
|
1250
1287
|
).returns(T.attached_class)
|
|
1251
1288
|
end
|
|
1252
|
-
def self.new(
|
|
1289
|
+
def self.new(
|
|
1290
|
+
failed: nil,
|
|
1291
|
+
issued: nil,
|
|
1292
|
+
queued: nil,
|
|
1293
|
+
reversed: nil,
|
|
1294
|
+
upcoming: nil
|
|
1295
|
+
)
|
|
1253
1296
|
end
|
|
1254
1297
|
|
|
1255
1298
|
sig do
|
|
@@ -1261,6 +1304,8 @@ module GrowsurfRuby
|
|
|
1261
1304
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric,
|
|
1262
1305
|
queued:
|
|
1263
1306
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric,
|
|
1307
|
+
reversed:
|
|
1308
|
+
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric,
|
|
1264
1309
|
upcoming:
|
|
1265
1310
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::StatusCounts::PayoutStatus::PayoutStatusMetric
|
|
1266
1311
|
}
|
|
@@ -1303,9 +1348,7 @@ module GrowsurfRuby
|
|
|
1303
1348
|
)
|
|
1304
1349
|
end
|
|
1305
1350
|
|
|
1306
|
-
sig
|
|
1307
|
-
override.returns({ count: Integer, total_amount: Integer })
|
|
1308
|
-
end
|
|
1351
|
+
sig { override.returns({ count: Integer, total_amount: Integer }) }
|
|
1309
1352
|
def to_hash
|
|
1310
1353
|
end
|
|
1311
1354
|
end
|
|
@@ -1320,32 +1363,39 @@ module GrowsurfRuby
|
|
|
1320
1363
|
)
|
|
1321
1364
|
end
|
|
1322
1365
|
|
|
1366
|
+
# Approved rewards that are fulfilled.
|
|
1323
1367
|
sig { returns(T.nilable(Integer)) }
|
|
1324
|
-
attr_reader :
|
|
1368
|
+
attr_reader :completed
|
|
1325
1369
|
|
|
1326
|
-
sig { params(
|
|
1327
|
-
attr_writer :
|
|
1370
|
+
sig { params(completed: Integer).void }
|
|
1371
|
+
attr_writer :completed
|
|
1328
1372
|
|
|
1329
|
-
# Unapproved rewards awaiting
|
|
1373
|
+
# Unapproved rewards awaiting review.
|
|
1330
1374
|
sig { returns(T.nilable(Integer)) }
|
|
1331
|
-
attr_reader :
|
|
1375
|
+
attr_reader :unapproved
|
|
1332
1376
|
|
|
1333
|
-
sig { params(
|
|
1334
|
-
attr_writer :
|
|
1377
|
+
sig { params(unapproved: Integer).void }
|
|
1378
|
+
attr_writer :unapproved
|
|
1335
1379
|
|
|
1380
|
+
# Rewards that are approved but not fulfilled.
|
|
1381
|
+
sig { returns(T.nilable(Integer)) }
|
|
1382
|
+
attr_reader :unfulfilled
|
|
1383
|
+
|
|
1384
|
+
sig { params(unfulfilled: Integer).void }
|
|
1385
|
+
attr_writer :unfulfilled
|
|
1386
|
+
|
|
1387
|
+
# Reward counts grouped by review and fulfillment status.
|
|
1336
1388
|
sig do
|
|
1337
|
-
params(
|
|
1338
|
-
T.attached_class
|
|
1339
|
-
)
|
|
1389
|
+
params(completed: Integer, unapproved: Integer, unfulfilled: Integer).returns(T.attached_class)
|
|
1340
1390
|
end
|
|
1341
1391
|
def self.new(
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1392
|
+
completed: nil,
|
|
1393
|
+
unapproved: nil,
|
|
1394
|
+
unfulfilled: nil
|
|
1345
1395
|
)
|
|
1346
1396
|
end
|
|
1347
1397
|
|
|
1348
|
-
sig { override.returns({
|
|
1398
|
+
sig { override.returns({ completed: Integer, unapproved: Integer, unfulfilled: Integer }) }
|
|
1349
1399
|
def to_hash
|
|
1350
1400
|
end
|
|
1351
1401
|
end
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
# Either decide a pending application with `status`, or move a denied application's
|
|
6
|
+
# reapplication window with `reapply_allowed_at`. Provide exactly one of those
|
|
7
|
+
# fields.
|
|
8
|
+
class CampaignReviewAffiliateApplicationParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
9
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
OrHash =
|
|
13
|
+
T.type_alias do
|
|
14
|
+
T.any(
|
|
15
|
+
GrowsurfRuby::CampaignReviewAffiliateApplicationParams,
|
|
16
|
+
GrowsurfRuby::Internal::AnyHash
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :id
|
|
22
|
+
|
|
23
|
+
sig { returns(String) }
|
|
24
|
+
attr_accessor :application_id
|
|
25
|
+
|
|
26
|
+
# When denying, let the applicant reapply right away instead of waiting out the
|
|
27
|
+
# program's reapplication cooldown. Only valid when `status` is `DENIED`.
|
|
28
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
29
|
+
attr_reader :allow_immediate_reapply
|
|
30
|
+
|
|
31
|
+
sig { params(allow_immediate_reapply: T::Boolean).void }
|
|
32
|
+
attr_writer :allow_immediate_reapply
|
|
33
|
+
|
|
34
|
+
# For an already-denied application, move the reapplication window to this earlier
|
|
35
|
+
# time, in Unix milliseconds. Send without `status`.
|
|
36
|
+
sig { returns(T.nilable(Integer)) }
|
|
37
|
+
attr_reader :reapply_allowed_at
|
|
38
|
+
|
|
39
|
+
sig { params(reapply_allowed_at: Integer).void }
|
|
40
|
+
attr_writer :reapply_allowed_at
|
|
41
|
+
|
|
42
|
+
# Short reason recorded with a denial. Only valid when `status` is `DENIED`.
|
|
43
|
+
# Maximum 255 characters.
|
|
44
|
+
sig { returns(T.nilable(String)) }
|
|
45
|
+
attr_reader :rejection_reason
|
|
46
|
+
|
|
47
|
+
sig { params(rejection_reason: String).void }
|
|
48
|
+
attr_writer :rejection_reason
|
|
49
|
+
|
|
50
|
+
# Private note recorded with a denial. Only valid when `status` is `DENIED`; never
|
|
51
|
+
# shown to the applicant. Maximum 500 characters.
|
|
52
|
+
sig { returns(T.nilable(String)) }
|
|
53
|
+
attr_reader :review_note
|
|
54
|
+
|
|
55
|
+
sig { params(review_note: String).void }
|
|
56
|
+
attr_writer :review_note
|
|
57
|
+
|
|
58
|
+
# The decision. `APPROVED` enrolls the applicant as an affiliate; `DENIED` closes
|
|
59
|
+
# the application.
|
|
60
|
+
sig do
|
|
61
|
+
returns(
|
|
62
|
+
T.nilable(
|
|
63
|
+
GrowsurfRuby::CampaignReviewAffiliateApplicationParams::Status::OrSymbol
|
|
64
|
+
)
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
attr_reader :status
|
|
68
|
+
|
|
69
|
+
sig do
|
|
70
|
+
params(
|
|
71
|
+
status:
|
|
72
|
+
GrowsurfRuby::CampaignReviewAffiliateApplicationParams::Status::OrSymbol
|
|
73
|
+
).void
|
|
74
|
+
end
|
|
75
|
+
attr_writer :status
|
|
76
|
+
|
|
77
|
+
sig do
|
|
78
|
+
params(
|
|
79
|
+
id: String,
|
|
80
|
+
application_id: String,
|
|
81
|
+
allow_immediate_reapply: T::Boolean,
|
|
82
|
+
reapply_allowed_at: Integer,
|
|
83
|
+
rejection_reason: String,
|
|
84
|
+
review_note: String,
|
|
85
|
+
status:
|
|
86
|
+
GrowsurfRuby::CampaignReviewAffiliateApplicationParams::Status::OrSymbol,
|
|
87
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
88
|
+
).returns(T.attached_class)
|
|
89
|
+
end
|
|
90
|
+
def self.new(
|
|
91
|
+
id:,
|
|
92
|
+
application_id:,
|
|
93
|
+
# When denying, let the applicant reapply right away instead of waiting out the
|
|
94
|
+
# program's reapplication cooldown.
|
|
95
|
+
allow_immediate_reapply: nil,
|
|
96
|
+
# For an already-denied application, move the reapplication window to this earlier
|
|
97
|
+
# time, in Unix milliseconds. Send without `status`.
|
|
98
|
+
reapply_allowed_at: nil,
|
|
99
|
+
# Short reason recorded with a denial. Only valid when `status` is `DENIED`.
|
|
100
|
+
# Maximum 255 characters.
|
|
101
|
+
rejection_reason: nil,
|
|
102
|
+
# Private note recorded with a denial. Only valid when `status` is `DENIED`; never
|
|
103
|
+
# shown to the applicant. Maximum 500 characters.
|
|
104
|
+
review_note: nil,
|
|
105
|
+
# The decision. `APPROVED` enrolls the applicant as an affiliate; `DENIED` closes
|
|
106
|
+
# the application.
|
|
107
|
+
status: nil,
|
|
108
|
+
request_options: {}
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
sig do
|
|
113
|
+
override.returns(
|
|
114
|
+
{
|
|
115
|
+
id: String,
|
|
116
|
+
application_id: String,
|
|
117
|
+
allow_immediate_reapply: T::Boolean,
|
|
118
|
+
reapply_allowed_at: Integer,
|
|
119
|
+
rejection_reason: String,
|
|
120
|
+
review_note: String,
|
|
121
|
+
status:
|
|
122
|
+
GrowsurfRuby::CampaignReviewAffiliateApplicationParams::Status::OrSymbol,
|
|
123
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
end
|
|
127
|
+
def to_hash
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# The decision. `APPROVED` enrolls the applicant as an affiliate; `DENIED` closes
|
|
131
|
+
# the application.
|
|
132
|
+
module Status
|
|
133
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
134
|
+
|
|
135
|
+
TaggedSymbol =
|
|
136
|
+
T.type_alias do
|
|
137
|
+
T.all(
|
|
138
|
+
Symbol,
|
|
139
|
+
GrowsurfRuby::CampaignReviewAffiliateApplicationParams::Status
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
143
|
+
|
|
144
|
+
APPROVED =
|
|
145
|
+
T.let(
|
|
146
|
+
:APPROVED,
|
|
147
|
+
GrowsurfRuby::CampaignReviewAffiliateApplicationParams::Status::TaggedSymbol
|
|
148
|
+
)
|
|
149
|
+
DENIED =
|
|
150
|
+
T.let(
|
|
151
|
+
:DENIED,
|
|
152
|
+
GrowsurfRuby::CampaignReviewAffiliateApplicationParams::Status::TaggedSymbol
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
sig do
|
|
156
|
+
override.returns(
|
|
157
|
+
T::Array[
|
|
158
|
+
GrowsurfRuby::CampaignReviewAffiliateApplicationParams::Status::TaggedSymbol
|
|
159
|
+
]
|
|
160
|
+
)
|
|
161
|
+
end
|
|
162
|
+
def self.values
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class CampaignRevokeAffiliateInviteParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
GrowsurfRuby::CampaignRevokeAffiliateInviteParams,
|
|
13
|
+
GrowsurfRuby::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :invite_id
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
id: String,
|
|
26
|
+
invite_id: String,
|
|
27
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(id:, invite_id:, request_options: {})
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
override.returns(
|
|
35
|
+
{
|
|
36
|
+
id: String,
|
|
37
|
+
invite_id: String,
|
|
38
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class EmailAnalytics < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
GrowsurfRuby::Models::EmailAnalytics,
|
|
10
|
+
GrowsurfRuby::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(Integer) }
|
|
15
|
+
attr_accessor :sent
|
|
16
|
+
|
|
17
|
+
sig { returns(Integer) }
|
|
18
|
+
attr_accessor :delivered
|
|
19
|
+
|
|
20
|
+
sig { returns(Integer) }
|
|
21
|
+
attr_accessor :opened
|
|
22
|
+
|
|
23
|
+
sig { returns(Integer) }
|
|
24
|
+
attr_accessor :clicked
|
|
25
|
+
|
|
26
|
+
sig { returns(Integer) }
|
|
27
|
+
attr_accessor :bounced
|
|
28
|
+
|
|
29
|
+
sig { returns(Integer) }
|
|
30
|
+
attr_accessor :spam_complaints
|
|
31
|
+
|
|
32
|
+
sig { returns(Float) }
|
|
33
|
+
attr_accessor :delivery_rate
|
|
34
|
+
|
|
35
|
+
sig { returns(Float) }
|
|
36
|
+
attr_accessor :open_rate
|
|
37
|
+
|
|
38
|
+
sig { returns(Float) }
|
|
39
|
+
attr_accessor :click_rate
|
|
40
|
+
|
|
41
|
+
sig { returns(Float) }
|
|
42
|
+
attr_accessor :bounce_rate
|
|
43
|
+
|
|
44
|
+
sig { returns(T::Array[GrowsurfRuby::Models::EmailAnalytics::ByType]) }
|
|
45
|
+
attr_reader :by_type
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
params(
|
|
49
|
+
by_type:
|
|
50
|
+
T::Array[GrowsurfRuby::Models::EmailAnalytics::ByType::OrHash]
|
|
51
|
+
).void
|
|
52
|
+
end
|
|
53
|
+
attr_writer :by_type
|
|
54
|
+
|
|
55
|
+
sig { returns(T.nilable(Integer)) }
|
|
56
|
+
attr_accessor :coverage_start_date
|
|
57
|
+
|
|
58
|
+
sig { returns(T::Boolean) }
|
|
59
|
+
attr_accessor :is_partial
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
params(
|
|
63
|
+
sent: Integer,
|
|
64
|
+
delivered: Integer,
|
|
65
|
+
opened: Integer,
|
|
66
|
+
clicked: Integer,
|
|
67
|
+
bounced: Integer,
|
|
68
|
+
spam_complaints: Integer,
|
|
69
|
+
delivery_rate: Float,
|
|
70
|
+
open_rate: Float,
|
|
71
|
+
click_rate: Float,
|
|
72
|
+
bounce_rate: Float,
|
|
73
|
+
by_type:
|
|
74
|
+
T::Array[GrowsurfRuby::Models::EmailAnalytics::ByType::OrHash],
|
|
75
|
+
coverage_start_date: T.nilable(Integer),
|
|
76
|
+
is_partial: T::Boolean
|
|
77
|
+
).returns(T.attached_class)
|
|
78
|
+
end
|
|
79
|
+
def self.new(
|
|
80
|
+
sent:,
|
|
81
|
+
delivered:,
|
|
82
|
+
opened:,
|
|
83
|
+
clicked:,
|
|
84
|
+
bounced:,
|
|
85
|
+
spam_complaints:,
|
|
86
|
+
delivery_rate:,
|
|
87
|
+
open_rate:,
|
|
88
|
+
click_rate:,
|
|
89
|
+
bounce_rate:,
|
|
90
|
+
by_type:,
|
|
91
|
+
coverage_start_date:,
|
|
92
|
+
is_partial:
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
class Counts < GrowsurfRuby::Internal::Type::BaseModel
|
|
97
|
+
OrHash =
|
|
98
|
+
T.type_alias do
|
|
99
|
+
T.any(
|
|
100
|
+
GrowsurfRuby::Models::EmailAnalytics::Counts,
|
|
101
|
+
GrowsurfRuby::Internal::AnyHash
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
sig { returns(Integer) }
|
|
106
|
+
attr_accessor :sent
|
|
107
|
+
|
|
108
|
+
sig { returns(Integer) }
|
|
109
|
+
attr_accessor :delivered
|
|
110
|
+
|
|
111
|
+
sig { returns(Integer) }
|
|
112
|
+
attr_accessor :opened
|
|
113
|
+
|
|
114
|
+
sig { returns(Integer) }
|
|
115
|
+
attr_accessor :clicked
|
|
116
|
+
|
|
117
|
+
sig { returns(Integer) }
|
|
118
|
+
attr_accessor :bounced
|
|
119
|
+
|
|
120
|
+
sig { returns(Integer) }
|
|
121
|
+
attr_accessor :spam_complaints
|
|
122
|
+
|
|
123
|
+
sig do
|
|
124
|
+
params(
|
|
125
|
+
sent: Integer,
|
|
126
|
+
delivered: Integer,
|
|
127
|
+
opened: Integer,
|
|
128
|
+
clicked: Integer,
|
|
129
|
+
bounced: Integer,
|
|
130
|
+
spam_complaints: Integer
|
|
131
|
+
).returns(T.attached_class)
|
|
132
|
+
end
|
|
133
|
+
def self.new(
|
|
134
|
+
sent:,
|
|
135
|
+
delivered:,
|
|
136
|
+
opened:,
|
|
137
|
+
clicked:,
|
|
138
|
+
bounced:,
|
|
139
|
+
spam_complaints:
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
class ByType < GrowsurfRuby::Models::EmailAnalytics::Counts
|
|
145
|
+
OrHash =
|
|
146
|
+
T.type_alias do
|
|
147
|
+
T.any(
|
|
148
|
+
GrowsurfRuby::Models::EmailAnalytics::ByType,
|
|
149
|
+
GrowsurfRuby::Internal::AnyHash
|
|
150
|
+
)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
sig { returns(String) }
|
|
154
|
+
attr_accessor :email_type
|
|
155
|
+
|
|
156
|
+
sig { returns(Float) }
|
|
157
|
+
attr_accessor :delivery_rate
|
|
158
|
+
|
|
159
|
+
sig { returns(Float) }
|
|
160
|
+
attr_accessor :open_rate
|
|
161
|
+
|
|
162
|
+
sig { returns(Float) }
|
|
163
|
+
attr_accessor :click_rate
|
|
164
|
+
|
|
165
|
+
sig { returns(Float) }
|
|
166
|
+
attr_accessor :bounce_rate
|
|
167
|
+
|
|
168
|
+
sig do
|
|
169
|
+
params(
|
|
170
|
+
sent: Integer,
|
|
171
|
+
delivered: Integer,
|
|
172
|
+
opened: Integer,
|
|
173
|
+
clicked: Integer,
|
|
174
|
+
bounced: Integer,
|
|
175
|
+
spam_complaints: Integer,
|
|
176
|
+
email_type: String,
|
|
177
|
+
delivery_rate: Float,
|
|
178
|
+
open_rate: Float,
|
|
179
|
+
click_rate: Float,
|
|
180
|
+
bounce_rate: Float
|
|
181
|
+
).returns(T.attached_class)
|
|
182
|
+
end
|
|
183
|
+
def self.new(
|
|
184
|
+
sent:,
|
|
185
|
+
delivered:,
|
|
186
|
+
opened:,
|
|
187
|
+
clicked:,
|
|
188
|
+
bounced:,
|
|
189
|
+
spam_complaints:,
|
|
190
|
+
email_type:,
|
|
191
|
+
delivery_rate:,
|
|
192
|
+
open_rate:,
|
|
193
|
+
click_rate:,
|
|
194
|
+
bounce_rate:
|
|
195
|
+
)
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|