growsurf-ruby 1.3.0 → 1.5.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 +29 -0
- data/README.md +10 -7
- data/lib/growsurf_ruby/internal/transport/base_client.rb +6 -1
- data/lib/growsurf_ruby/internal/type/base_model.rb +26 -0
- data/lib/growsurf_ruby/internal/type/base_page.rb +6 -0
- data/lib/growsurf_ruby/models/account_create_response.rb +3 -3
- data/lib/growsurf_ruby/models/analytics_availability.rb +16 -0
- data/lib/growsurf_ruby/models/analytics_unavailable_reason.rb +20 -0
- data/lib/growsurf_ruby/models/campaign/delete_program_resource_response.rb +12 -0
- data/lib/growsurf_ruby/models/campaign/integration.rb +69 -0
- data/lib/growsurf_ruby/models/campaign/integration_list_response.rb +24 -0
- data/lib/growsurf_ruby/models/campaign/participant_activation_analytics.rb +75 -0
- data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +11 -0
- data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rb +17 -17
- data/lib/growsurf_ruby/models/campaign/participant_record_transaction_params.rb +9 -1
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +17 -1
- data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rb +8 -8
- data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +15 -11
- data/lib/growsurf_ruby/models/campaign/participant_reward.rb +16 -3
- data/lib/growsurf_ruby/models/campaign/program_resource.rb +51 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_create_params.rb +32 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_delete_params.rb +14 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_list_response.rb +12 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_update_params.rb +35 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_upload_result.rb +33 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_upload_ticket.rb +26 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rb +17 -0
- data/lib/growsurf_ruby/models/campaign/reward.rb +22 -1
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +32 -9
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +32 -9
- data/lib/growsurf_ruby/models/campaign.rb +25 -2
- data/lib/growsurf_ruby/models/campaign_activation_analytics_response.rb +186 -0
- data/lib/growsurf_ruby/models/campaign_create_params.rb +37 -1
- data/lib/growsurf_ruby/models/campaign_engagement_analytics.rb +174 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rb +35 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +37 -4
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +3 -0
- data/lib/growsurf_ruby/models/commission_structure.rb +19 -3
- data/lib/growsurf_ruby/models/participant_commission_list.rb +24 -6
- data/lib/growsurf_ruby/models/participant_payout_list.rb +5 -5
- data/lib/growsurf_ruby/models.rb +7 -0
- data/lib/growsurf_ruby/resources/account.rb +17 -11
- data/lib/growsurf_ruby/resources/campaign/design.rb +11 -5
- data/lib/growsurf_ruby/resources/campaign/emails.rb +2 -1
- data/lib/growsurf_ruby/resources/campaign/integrations.rb +41 -0
- data/lib/growsurf_ruby/resources/campaign/participant.rb +28 -25
- data/lib/growsurf_ruby/resources/campaign/program_resources.rb +112 -0
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +12 -6
- data/lib/growsurf_ruby/resources/campaign.rb +53 -7
- data/lib/growsurf_ruby/resources/team.rb +7 -5
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +19 -0
- data/rbi/growsurf_ruby/internal/type/base_model.rbi +10 -0
- data/rbi/growsurf_ruby/internal/type/base_page.rbi +3 -0
- data/rbi/growsurf_ruby/models/analytics_availability.rbi +19 -0
- data/rbi/growsurf_ruby/models/analytics_unavailable_reason.rbi +23 -0
- data/rbi/growsurf_ruby/models/campaign/delete_program_resource_response.rbi +33 -0
- data/rbi/growsurf_ruby/models/campaign/integration.rbi +93 -0
- data/rbi/growsurf_ruby/models/campaign/integration_list_response.rbi +46 -0
- data/rbi/growsurf_ruby/models/campaign/participant_activation_analytics.rbi +133 -0
- data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +35 -0
- data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbi +17 -23
- data/rbi/growsurf_ruby/models/campaign/participant_record_transaction_params.rbi +18 -0
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +18 -0
- data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbi +7 -9
- data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +16 -10
- data/rbi/growsurf_ruby/models/campaign/participant_reward.rbi +29 -6
- data/rbi/growsurf_ruby/models/campaign/program_resource.rbi +186 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_create_params.rbi +95 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_delete_params.rbi +37 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_list_response.rbi +29 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_update_params.rbi +105 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_upload_result.rbi +94 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_upload_ticket.rbi +57 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rbi +53 -0
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +55 -0
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +97 -24
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +97 -24
- data/rbi/growsurf_ruby/models/campaign.rbi +52 -3
- data/rbi/growsurf_ruby/models/campaign_activation_analytics_response.rbi +325 -0
- data/rbi/growsurf_ruby/models/campaign_create_params.rbi +91 -0
- data/rbi/growsurf_ruby/models/campaign_engagement_analytics.rbi +369 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rbi +59 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +56 -3
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +27 -7
- data/rbi/growsurf_ruby/models/commission_structure.rbi +36 -3
- data/rbi/growsurf_ruby/models/participant_commission_list.rbi +63 -15
- data/rbi/growsurf_ruby/models/participant_payout_list.rbi +15 -15
- data/rbi/growsurf_ruby/models.rbi +7 -0
- data/rbi/growsurf_ruby/resources/account.rbi +9 -6
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +32 -4
- data/rbi/growsurf_ruby/resources/campaign/emails.rbi +2 -1
- data/rbi/growsurf_ruby/resources/campaign/integrations.rbi +35 -0
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +38 -24
- data/rbi/growsurf_ruby/resources/campaign/program_resources.rbi +116 -0
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +35 -16
- data/rbi/growsurf_ruby/resources/campaign.rbi +53 -5
- data/rbi/growsurf_ruby/resources/team.rbi +7 -5
- data/sig/growsurf_ruby/internal/type/base_model.rbs +6 -0
- data/sig/growsurf_ruby/internal/type/base_page.rbs +2 -0
- data/sig/growsurf_ruby/models/analytics_availability.rbs +15 -0
- data/sig/growsurf_ruby/models/analytics_unavailable_reason.rbs +26 -0
- data/sig/growsurf_ruby/models/campaign/delete_program_resource_response.rbs +14 -0
- data/sig/growsurf_ruby/models/campaign/integration.rbs +47 -0
- data/sig/growsurf_ruby/models/campaign/integration_list_response.rbs +20 -0
- data/sig/growsurf_ruby/models/campaign/participant_activation_analytics.rbs +96 -0
- data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +22 -1
- data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbs +17 -22
- data/sig/growsurf_ruby/models/campaign/participant_record_transaction_params.rbs +15 -1
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +15 -1
- data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbs +8 -10
- data/sig/growsurf_ruby/models/campaign/participant_reward.rbs +24 -9
- data/sig/growsurf_ruby/models/campaign/program_resource.rbs +94 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_create_params.rbs +45 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_delete_params.rbs +22 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_list_response.rbs +14 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_update_params.rbs +48 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_upload_result.rbs +58 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_upload_ticket.rbs +29 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rbs +29 -0
- data/sig/growsurf_ruby/models/campaign/reward.rbs +16 -0
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +54 -34
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +54 -34
- data/sig/growsurf_ruby/models/campaign.rbs +23 -5
- data/sig/growsurf_ruby/models/campaign_activation_analytics_response.rbs +202 -0
- data/sig/growsurf_ruby/models/campaign_create_params.rbs +29 -0
- data/sig/growsurf_ruby/models/campaign_engagement_analytics.rbs +186 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rbs +45 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_params.rbs +30 -1
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +21 -3
- data/sig/growsurf_ruby/models/commission_structure.rbs +16 -4
- data/sig/growsurf_ruby/models/participant_commission_list.rbs +36 -20
- data/sig/growsurf_ruby/models/participant_payout_list.rbs +20 -20
- data/sig/growsurf_ruby/models.rbs +6 -0
- data/sig/growsurf_ruby/resources/campaign/design.rbs +19 -0
- data/sig/growsurf_ruby/resources/campaign/integrations.rbs +14 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +4 -0
- data/sig/growsurf_ruby/resources/campaign/program_resources.rbs +58 -0
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +14 -12
- data/sig/growsurf_ruby/resources/campaign.rbs +17 -0
- metadata +59 -2
|
@@ -57,7 +57,7 @@ module GrowsurfRuby
|
|
|
57
57
|
# @!attribute currency_iso
|
|
58
58
|
#
|
|
59
59
|
# @return [String, nil]
|
|
60
|
-
optional :currency_iso, String, api_name: :currencyISO
|
|
60
|
+
optional :currency_iso, String, api_name: :currencyISO, nil?: true
|
|
61
61
|
|
|
62
62
|
# @!method initialize(id:, impression_count:, invite_count:, name:, participant_count:, referral_count:, rewards:, status:, type:, winner_count:, currency_iso: nil)
|
|
63
63
|
# @param id [String]
|
|
@@ -120,6 +120,14 @@ module GrowsurfRuby
|
|
|
120
120
|
# @return [String, nil]
|
|
121
121
|
optional :description, String, nil?: true
|
|
122
122
|
|
|
123
|
+
# @!attribute event
|
|
124
|
+
# The referral event that earns this Campaign Reward. Present only for
|
|
125
|
+
# `SINGLE_SIDED`, `DOUBLE_SIDED`, and `MILESTONE` rewards. Legacy Campaign
|
|
126
|
+
# Rewards return `CONVERSION`.
|
|
127
|
+
#
|
|
128
|
+
# @return [Symbol, GrowsurfRuby::Models::CampaignAPI::Reward::Event, nil]
|
|
129
|
+
optional :event, enum: -> { GrowsurfRuby::CampaignAPI::Reward::Event }, nil?: true
|
|
130
|
+
|
|
123
131
|
# @!attribute image_url
|
|
124
132
|
#
|
|
125
133
|
# @return [String, nil]
|
|
@@ -200,7 +208,7 @@ module GrowsurfRuby
|
|
|
200
208
|
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
201
209
|
optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
|
|
202
210
|
|
|
203
|
-
# @!method initialize(id:, is_unlimited:, metadata:, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, image_url: nil, limit: nil, limit_duration: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, value: nil)
|
|
211
|
+
# @!method initialize(id:, is_unlimited:, metadata:, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, limit: nil, limit_duration: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, value: nil)
|
|
204
212
|
# @param id [String]
|
|
205
213
|
#
|
|
206
214
|
# @param is_unlimited [Boolean]
|
|
@@ -217,6 +225,8 @@ module GrowsurfRuby
|
|
|
217
225
|
#
|
|
218
226
|
# @param description [String, nil]
|
|
219
227
|
#
|
|
228
|
+
# @param event [Symbol, GrowsurfRuby::Models::CampaignAPI::Reward::Event, nil] The referral event that earns this Campaign Reward.
|
|
229
|
+
#
|
|
220
230
|
# @param image_url [String, nil]
|
|
221
231
|
#
|
|
222
232
|
# @param limit [Integer, nil] `-1` represents an unlimited reward in REST responses.
|
|
@@ -255,6 +265,17 @@ module GrowsurfRuby
|
|
|
255
265
|
# @return [Array<Symbol>]
|
|
256
266
|
end
|
|
257
267
|
|
|
268
|
+
# @see GrowsurfRuby::Models::CampaignAPI::Reward#event
|
|
269
|
+
module Event
|
|
270
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
271
|
+
|
|
272
|
+
LEAD = :LEAD
|
|
273
|
+
CONVERSION = :CONVERSION
|
|
274
|
+
|
|
275
|
+
# @!method self.values
|
|
276
|
+
# @return [Array<Symbol>]
|
|
277
|
+
end
|
|
278
|
+
|
|
258
279
|
# @see GrowsurfRuby::Models::CampaignAPI::Reward#limit_duration
|
|
259
280
|
module LimitDuration
|
|
260
281
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
@@ -272,8 +293,10 @@ module GrowsurfRuby
|
|
|
272
293
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
273
294
|
|
|
274
295
|
DRAFT = :DRAFT
|
|
296
|
+
PENDING = :PENDING
|
|
275
297
|
IN_PROGRESS = :IN_PROGRESS
|
|
276
298
|
COMPLETE = :COMPLETE
|
|
299
|
+
CANCELLED = :CANCELLED
|
|
277
300
|
DELETED = :DELETED
|
|
278
301
|
|
|
279
302
|
# @!method self.values
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
# Activation cohorts for eligible participants in a referral or affiliate program.
|
|
6
|
+
class CampaignActivationAnalyticsResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
required :coverage_start_at, Integer, api_name: :coverageStartAt, nil?: true
|
|
8
|
+
required :metric_contract_version, Integer, api_name: :metricContractVersion
|
|
9
|
+
required :program_type,
|
|
10
|
+
enum: -> { GrowsurfRuby::Models::CampaignActivationAnalyticsResponse::ProgramType },
|
|
11
|
+
api_name: :programType
|
|
12
|
+
required :timezone, String
|
|
13
|
+
required :cohort_interval,
|
|
14
|
+
enum: -> { GrowsurfRuby::Models::CampaignActivationAnalyticsResponse::CohortInterval },
|
|
15
|
+
api_name: :cohortInterval
|
|
16
|
+
required :observation_window_days, Integer, api_name: :observationWindowDays
|
|
17
|
+
required :portal_viewed_label,
|
|
18
|
+
enum: -> { GrowsurfRuby::Models::CampaignActivationAnalyticsResponse::PortalViewedLabel },
|
|
19
|
+
api_name: :portalViewedLabel
|
|
20
|
+
required :portal_viewed_helper_text, String, api_name: :portalViewedHelperText
|
|
21
|
+
required :aggregate, -> { GrowsurfRuby::Models::CampaignActivationAnalyticsResponse::CohortResult }
|
|
22
|
+
required :cohorts,
|
|
23
|
+
-> {
|
|
24
|
+
GrowsurfRuby::Internal::Type::ArrayOf[
|
|
25
|
+
GrowsurfRuby::Models::CampaignActivationAnalyticsResponse::CohortResult
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module ProgramType
|
|
30
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
31
|
+
|
|
32
|
+
REFERRAL = :REFERRAL
|
|
33
|
+
AFFILIATE = :AFFILIATE
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
module CohortInterval
|
|
37
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
38
|
+
|
|
39
|
+
DAY = :day
|
|
40
|
+
WEEK = :week
|
|
41
|
+
MONTH = :month
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
module PortalViewedLabel
|
|
45
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
46
|
+
|
|
47
|
+
REFERRAL = :"Referral portal viewed"
|
|
48
|
+
AFFILIATE = :"Affiliate portal viewed"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
module StageKey
|
|
52
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
53
|
+
|
|
54
|
+
ELIGIBLE = :ELIGIBLE
|
|
55
|
+
PORTAL_VIEWED = :PORTAL_VIEWED
|
|
56
|
+
SHARE_ACTION = :SHARE_ACTION
|
|
57
|
+
UNIQUE_REFERRAL_VISIT = :UNIQUE_REFERRAL_VISIT
|
|
58
|
+
LEAD = :LEAD
|
|
59
|
+
CREDITED_REFERRAL = :CREDITED_REFERRAL
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
module StalledSegmentKey
|
|
63
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
64
|
+
|
|
65
|
+
ELIGIBLE_NO_PORTAL_VIEW = :ELIGIBLE_NO_PORTAL_VIEW
|
|
66
|
+
PORTAL_VIEWED_NO_SHARE_ACTION = :PORTAL_VIEWED_NO_SHARE_ACTION
|
|
67
|
+
SHARED_NO_UNIQUE_REFERRAL_VISIT = :SHARED_NO_UNIQUE_REFERRAL_VISIT
|
|
68
|
+
UNIQUE_VISIT_NO_LEAD = :UNIQUE_VISIT_NO_LEAD
|
|
69
|
+
LEAD_NO_CREDITED_REFERRAL = :LEAD_NO_CREDITED_REFERRAL
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
module StalledSegmentFromStage
|
|
73
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
74
|
+
|
|
75
|
+
ELIGIBLE = :ELIGIBLE
|
|
76
|
+
PORTAL_VIEWED = :PORTAL_VIEWED
|
|
77
|
+
SHARE_ACTION = :SHARE_ACTION
|
|
78
|
+
UNIQUE_REFERRAL_VISIT = :UNIQUE_REFERRAL_VISIT
|
|
79
|
+
LEAD = :LEAD
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
module StalledSegmentToStage
|
|
83
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
84
|
+
|
|
85
|
+
PORTAL_VIEWED = :PORTAL_VIEWED
|
|
86
|
+
SHARE_ACTION = :SHARE_ACTION
|
|
87
|
+
UNIQUE_REFERRAL_VISIT = :UNIQUE_REFERRAL_VISIT
|
|
88
|
+
LEAD = :LEAD
|
|
89
|
+
CREDITED_REFERRAL = :CREDITED_REFERRAL
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
class Stage < GrowsurfRuby::Internal::Type::BaseModel
|
|
93
|
+
required :key, enum: -> { StageKey }
|
|
94
|
+
required :count, Integer
|
|
95
|
+
required :conversion_rate_from_prior, Float, api_name: :conversionRateFromPrior, nil?: true
|
|
96
|
+
required :conversion_rate_from_eligible, Float, api_name: :conversionRateFromEligible, nil?: true
|
|
97
|
+
required :drop_off_count, Integer, api_name: :dropOffCount, nil?: true
|
|
98
|
+
required :drop_off_rate, Float, api_name: :dropOffRate, nil?: true
|
|
99
|
+
required :median_time_to_stage_ms, Float, api_name: :medianTimeToStageMs, nil?: true
|
|
100
|
+
required :stalled_segment_key,
|
|
101
|
+
enum: -> { StalledSegmentKey },
|
|
102
|
+
api_name: :stalledSegmentKey,
|
|
103
|
+
nil?: true
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
class StageCounts < GrowsurfRuby::Internal::Type::BaseModel
|
|
107
|
+
required :eligible, Integer, api_name: :ELIGIBLE
|
|
108
|
+
required :portal_viewed, Integer, api_name: :PORTAL_VIEWED
|
|
109
|
+
required :share_action, Integer, api_name: :SHARE_ACTION
|
|
110
|
+
required :unique_referral_visit, Integer, api_name: :UNIQUE_REFERRAL_VISIT
|
|
111
|
+
required :lead, Integer, api_name: :LEAD
|
|
112
|
+
required :credited_referral, Integer, api_name: :CREDITED_REFERRAL
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
class StalledSegment < GrowsurfRuby::Internal::Type::BaseModel
|
|
116
|
+
required :key, enum: -> { StalledSegmentKey }
|
|
117
|
+
required :from_stage, enum: -> { StalledSegmentFromStage }, api_name: :fromStage
|
|
118
|
+
required :to_stage, enum: -> { StalledSegmentToStage }, api_name: :toStage
|
|
119
|
+
required :count, Integer
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
class OutcomeCount < GrowsurfRuby::Internal::Type::BaseModel
|
|
123
|
+
required :count, Integer
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
class Outcomes < GrowsurfRuby::Internal::Type::BaseModel
|
|
127
|
+
optional :first_reward, -> { OutcomeCount }, api_name: :FIRST_REWARD
|
|
128
|
+
optional :first_commission, -> { OutcomeCount }, api_name: :FIRST_COMMISSION
|
|
129
|
+
optional :payout_setup_completed, -> { OutcomeCount }, api_name: :PAYOUT_SETUP_COMPLETED
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
module ImprovementAreaKey
|
|
133
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
134
|
+
|
|
135
|
+
PORTAL_ACCESS = :PORTAL_ACCESS
|
|
136
|
+
SHARING_EXPERIENCE = :SHARING_EXPERIENCE
|
|
137
|
+
SHARE_EFFECTIVENESS = :SHARE_EFFECTIVENESS
|
|
138
|
+
VISITOR_SIGNUP = :VISITOR_SIGNUP
|
|
139
|
+
ATTRIBUTION_AND_QUALIFICATION = :ATTRIBUTION_AND_QUALIFICATION
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
class LargestDrop < GrowsurfRuby::Internal::Type::BaseModel
|
|
143
|
+
required :from_stage, String, api_name: :fromStage
|
|
144
|
+
required :to_stage, String, api_name: :toStage
|
|
145
|
+
required :count, Integer
|
|
146
|
+
required :rate, Float
|
|
147
|
+
required :stalled_segment_key, String, api_name: :stalledSegmentKey
|
|
148
|
+
required :improvement_area_key, enum: -> { ImprovementAreaKey }, api_name: :improvementAreaKey
|
|
149
|
+
required :improvement_area, String, api_name: :improvementArea
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
module AnchorField
|
|
153
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
154
|
+
|
|
155
|
+
ENROLLED_AS_ADVOCATE_AT = :enrolledAsAdvocateAt
|
|
156
|
+
APPROVED_AS_AFFILIATE_AT = :approvedAsAffiliateAt
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
class CohortBounds < GrowsurfRuby::Internal::Type::BaseModel
|
|
160
|
+
required :from, Integer
|
|
161
|
+
required :to, Integer
|
|
162
|
+
required :effective_from, Integer, api_name: :effectiveFrom, nil?: true
|
|
163
|
+
required :matured_at, Integer, api_name: :maturedAt
|
|
164
|
+
required :as_of, Integer, api_name: :asOf
|
|
165
|
+
required :anchor_field, enum: -> { AnchorField }, api_name: :anchorField
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
class CohortResult < GrowsurfRuby::Internal::Type::BaseModel
|
|
169
|
+
required :state, enum: -> { GrowsurfRuby::Models::AnalyticsAvailability }
|
|
170
|
+
required :reason, enum: -> { GrowsurfRuby::Models::AnalyticsUnavailableReason }, nil?: true
|
|
171
|
+
required :cohort, -> { CohortBounds }
|
|
172
|
+
required :strict_stages,
|
|
173
|
+
-> { GrowsurfRuby::Internal::Type::ArrayOf[Stage] },
|
|
174
|
+
api_name: :strictStages,
|
|
175
|
+
nil?: true
|
|
176
|
+
required :raw_stage_counts, -> { StageCounts }, api_name: :rawStageCounts, nil?: true
|
|
177
|
+
required :stalled_segments,
|
|
178
|
+
-> { GrowsurfRuby::Internal::Type::ArrayOf[StalledSegment] },
|
|
179
|
+
api_name: :stalledSegments,
|
|
180
|
+
nil?: true
|
|
181
|
+
required :outcomes, -> { Outcomes }, nil?: true
|
|
182
|
+
required :largest_drop, -> { LargestDrop }, api_name: :largestDrop, nil?: true
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
@@ -27,6 +27,19 @@ module GrowsurfRuby
|
|
|
27
27
|
# @return [String, nil]
|
|
28
28
|
optional :currency_iso, String, api_name: :currencyISO
|
|
29
29
|
|
|
30
|
+
# @!attribute goal
|
|
31
|
+
# What the program is for, which seeds share settings that suit that audience.
|
|
32
|
+
# Programs selling to businesses (`CUSTOMERS`, `USERS`, `B2B_SAAS_SELF_SERVICE`,
|
|
33
|
+
# `B2B_SAAS_ENTERPRISE`) start with the LinkedIn share button visible; consumer,
|
|
34
|
+
# financial, education, insurance, newsletter, and waitlist programs
|
|
35
|
+
# (`B2C_SUBSCRIPTIONS`, `FINANCIAL_SERVICES`, `ONLINE_EDUCATION`,
|
|
36
|
+
# `ONLINE_INSURANCE`, `SUBSCRIBERS`, `WAITLIST`) start with it hidden. Omit it and
|
|
37
|
+
# every share button keeps its standard default. Set only when the program is
|
|
38
|
+
# created; it is not accepted on update.
|
|
39
|
+
#
|
|
40
|
+
# @return [Symbol, GrowsurfRuby::Models::CampaignCreateParams::Goal, nil]
|
|
41
|
+
optional :goal, enum: -> { GrowsurfRuby::CampaignCreateParams::Goal }
|
|
42
|
+
|
|
30
43
|
# @!attribute name
|
|
31
44
|
#
|
|
32
45
|
# @return [String, nil]
|
|
@@ -38,7 +51,7 @@ module GrowsurfRuby
|
|
|
38
51
|
optional :rewards,
|
|
39
52
|
-> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::RewardCreateParams] }
|
|
40
53
|
|
|
41
|
-
# @!method initialize(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil, name: nil, rewards: nil, request_options: {})
|
|
54
|
+
# @!method initialize(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil, goal: nil, name: nil, rewards: nil, request_options: {})
|
|
42
55
|
# @param type [Symbol, GrowsurfRuby::Models::CampaignCreateParams::Type]
|
|
43
56
|
#
|
|
44
57
|
# @param company_logo_image_url [String]
|
|
@@ -47,6 +60,8 @@ module GrowsurfRuby
|
|
|
47
60
|
#
|
|
48
61
|
# @param currency_iso [String]
|
|
49
62
|
#
|
|
63
|
+
# @param goal [Symbol, GrowsurfRuby::Models::CampaignCreateParams::Goal] What the program is for, which seeds share settings that suit that audience.
|
|
64
|
+
#
|
|
50
65
|
# @param name [String]
|
|
51
66
|
#
|
|
52
67
|
# @param rewards [Array<GrowsurfRuby::Models::Campaign::RewardCreateParams>]
|
|
@@ -63,6 +78,27 @@ module GrowsurfRuby
|
|
|
63
78
|
# @!method self.values
|
|
64
79
|
# @return [Array<Symbol>]
|
|
65
80
|
end
|
|
81
|
+
|
|
82
|
+
# What the program is for, which seeds share settings that suit that audience.
|
|
83
|
+
#
|
|
84
|
+
# @see GrowsurfRuby::Models::CampaignCreateParams#goal
|
|
85
|
+
module Goal
|
|
86
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
87
|
+
|
|
88
|
+
CUSTOMERS = :CUSTOMERS
|
|
89
|
+
USERS = :USERS
|
|
90
|
+
SUBSCRIBERS = :SUBSCRIBERS
|
|
91
|
+
WAITLIST = :WAITLIST
|
|
92
|
+
B2B_SAAS_SELF_SERVICE = :B2B_SAAS_SELF_SERVICE
|
|
93
|
+
B2B_SAAS_ENTERPRISE = :B2B_SAAS_ENTERPRISE
|
|
94
|
+
B2C_SUBSCRIPTIONS = :B2C_SUBSCRIPTIONS
|
|
95
|
+
FINANCIAL_SERVICES = :FINANCIAL_SERVICES
|
|
96
|
+
ONLINE_EDUCATION = :ONLINE_EDUCATION
|
|
97
|
+
ONLINE_INSURANCE = :ONLINE_INSURANCE
|
|
98
|
+
|
|
99
|
+
# @!method self.values
|
|
100
|
+
# @return [Array<Symbol>]
|
|
101
|
+
end
|
|
66
102
|
end
|
|
67
103
|
end
|
|
68
104
|
end
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
# Current participant engagement for the selected program, period, and platform.
|
|
6
|
+
class CampaignEngagementAnalytics < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
required :coverage_start_at, Integer, api_name: :coverageStartAt, nil?: true
|
|
8
|
+
required :metric_contract_version, Integer, api_name: :metricContractVersion
|
|
9
|
+
required :program_type, enum: -> { GrowsurfRuby::Models::CampaignEngagementAnalytics::ProgramType }, api_name: :programType
|
|
10
|
+
required :timezone, String
|
|
11
|
+
required :interval, enum: -> { GrowsurfRuby::Models::CampaignEngagementAnalytics::Interval }
|
|
12
|
+
required :platform, -> { GrowsurfRuby::Models::CampaignEngagementAnalytics::PlatformFilter }
|
|
13
|
+
required :period, -> { GrowsurfRuby::Models::CampaignEngagementAnalytics::Period }
|
|
14
|
+
required :state, enum: -> { GrowsurfRuby::Models::AnalyticsAvailability }
|
|
15
|
+
required :reason, enum: -> { GrowsurfRuby::Models::AnalyticsUnavailableReason }, nil?: true
|
|
16
|
+
required :totals, -> { GrowsurfRuby::Models::CampaignEngagementAnalytics::Totals }
|
|
17
|
+
required :previous_period,
|
|
18
|
+
-> { GrowsurfRuby::Models::CampaignEngagementAnalytics::PreviousPeriod },
|
|
19
|
+
api_name: :previousPeriod
|
|
20
|
+
required :comparison, -> { GrowsurfRuby::Models::CampaignEngagementAnalytics::Comparison }
|
|
21
|
+
required :series,
|
|
22
|
+
-> {
|
|
23
|
+
GrowsurfRuby::Internal::Type::ArrayOf[
|
|
24
|
+
GrowsurfRuby::Models::CampaignEngagementAnalytics::SeriesPoint
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
required :breakdowns, -> { GrowsurfRuby::Models::CampaignEngagementAnalytics::Breakdowns }
|
|
28
|
+
|
|
29
|
+
module ProgramType
|
|
30
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
31
|
+
|
|
32
|
+
REFERRAL = :REFERRAL
|
|
33
|
+
AFFILIATE = :AFFILIATE
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
module Interval
|
|
37
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
38
|
+
|
|
39
|
+
DAY = :day
|
|
40
|
+
WEEK = :week
|
|
41
|
+
MONTH = :month
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
module Platform
|
|
45
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
46
|
+
|
|
47
|
+
ALL = :ALL
|
|
48
|
+
WEB = :WEB
|
|
49
|
+
IOS = :IOS
|
|
50
|
+
ANDROID = :ANDROID
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
module BreakdownPlatform
|
|
54
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
55
|
+
|
|
56
|
+
WEB = :WEB
|
|
57
|
+
IOS = :IOS
|
|
58
|
+
ANDROID = :ANDROID
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
class Metric < GrowsurfRuby::Internal::Type::BaseModel
|
|
62
|
+
required :state, enum: -> { GrowsurfRuby::Models::AnalyticsAvailability }
|
|
63
|
+
required :value, Float, nil?: true
|
|
64
|
+
required :reason, enum: -> { GrowsurfRuby::Models::AnalyticsUnavailableReason }, nil?: true
|
|
65
|
+
optional :delta, Float
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
class Totals < GrowsurfRuby::Internal::Type::BaseModel
|
|
69
|
+
required :active_participants, -> { Metric }, api_name: :activeParticipants
|
|
70
|
+
required :sharing_participants, -> { Metric }, api_name: :sharingParticipants
|
|
71
|
+
required :sharing_rate, -> { Metric }, api_name: :sharingRate
|
|
72
|
+
required :repeat_active_participants, -> { Metric }, api_name: :repeatActiveParticipants
|
|
73
|
+
required :repeat_sharing_participants, -> { Metric }, api_name: :repeatSharingParticipants
|
|
74
|
+
required :retained_active_participants, -> { Metric }, api_name: :retainedActiveParticipants
|
|
75
|
+
required :portal_views, -> { Metric }, api_name: :portalViews
|
|
76
|
+
required :share_actions, -> { Metric }, api_name: :shareActions
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
class Period < GrowsurfRuby::Internal::Type::BaseModel
|
|
80
|
+
required :from, Integer
|
|
81
|
+
required :to, Integer
|
|
82
|
+
required :effective_from, Integer, api_name: :effectiveFrom, nil?: true
|
|
83
|
+
required :previous_from, Integer, api_name: :previousFrom
|
|
84
|
+
required :previous_to, Integer, api_name: :previousTo
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
class PlatformFilter < GrowsurfRuby::Internal::Type::BaseModel
|
|
88
|
+
required :requested, enum: -> { Platform }
|
|
89
|
+
required :applied, enum: -> { Platform }
|
|
90
|
+
required :state, enum: -> { GrowsurfRuby::Models::AnalyticsAvailability }
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
class PreviousPeriod < GrowsurfRuby::Internal::Type::BaseModel
|
|
94
|
+
required :state, enum: -> { GrowsurfRuby::Models::AnalyticsAvailability }
|
|
95
|
+
required :reason, enum: -> { GrowsurfRuby::Models::AnalyticsUnavailableReason }, nil?: true
|
|
96
|
+
required :totals, -> { Totals }, nil?: true
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
class ComparisonMetrics < GrowsurfRuby::Internal::Type::BaseModel
|
|
100
|
+
optional :active_participants, -> { Metric }, api_name: :activeParticipants
|
|
101
|
+
optional :sharing_participants, -> { Metric }, api_name: :sharingParticipants
|
|
102
|
+
optional :repeat_active_participants, -> { Metric }, api_name: :repeatActiveParticipants
|
|
103
|
+
optional :repeat_sharing_participants, -> { Metric }, api_name: :repeatSharingParticipants
|
|
104
|
+
optional :portal_views, -> { Metric }, api_name: :portalViews
|
|
105
|
+
optional :share_actions, -> { Metric }, api_name: :shareActions
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
class Comparison < GrowsurfRuby::Internal::Type::BaseModel
|
|
109
|
+
required :state, enum: -> { GrowsurfRuby::Models::AnalyticsAvailability }
|
|
110
|
+
required :reason, enum: -> { GrowsurfRuby::Models::AnalyticsUnavailableReason }, nil?: true
|
|
111
|
+
required :metrics, -> { ComparisonMetrics }, nil?: true
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
class SeriesPoint < GrowsurfRuby::Internal::Type::BaseModel
|
|
115
|
+
required :from, Integer
|
|
116
|
+
required :to, Integer
|
|
117
|
+
required :active_participants, Integer, api_name: :activeParticipants
|
|
118
|
+
required :sharing_participants, Integer, api_name: :sharingParticipants
|
|
119
|
+
required :portal_views, Integer, api_name: :portalViews
|
|
120
|
+
required :share_actions, Integer, api_name: :shareActions
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
class PlatformBreakdown < GrowsurfRuby::Internal::Type::BaseModel
|
|
124
|
+
required :key, enum: -> { BreakdownPlatform }
|
|
125
|
+
required :active_participants, Integer, api_name: :activeParticipants
|
|
126
|
+
required :sharing_participants, Integer, api_name: :sharingParticipants
|
|
127
|
+
required :portal_views, Integer, api_name: :portalViews
|
|
128
|
+
required :share_actions, Integer, api_name: :shareActions
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
module PortalSource
|
|
132
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
133
|
+
|
|
134
|
+
DEFAULT_LAUNCHER = :DEFAULT_LAUNCHER
|
|
135
|
+
SDK_OPEN = :SDK_OPEN
|
|
136
|
+
CSS_CLASS = :CSS_CLASS
|
|
137
|
+
EMBEDDABLE_ELEMENT = :EMBEDDABLE_ELEMENT
|
|
138
|
+
HOSTED_PORTAL = :HOSTED_PORTAL
|
|
139
|
+
NATIVE_WINDOW = :NATIVE_WINDOW
|
|
140
|
+
UNKNOWN = :UNKNOWN
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
class PortalSourceBreakdown < GrowsurfRuby::Internal::Type::BaseModel
|
|
144
|
+
required :key, enum: -> { PortalSource }
|
|
145
|
+
required :active_participants, Integer, api_name: :activeParticipants
|
|
146
|
+
required :portal_views, Integer, api_name: :portalViews
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
class ShareChannelBreakdown < GrowsurfRuby::Internal::Type::BaseModel
|
|
150
|
+
required :key, String
|
|
151
|
+
required :sharing_participants, Integer, api_name: :sharingParticipants
|
|
152
|
+
required :share_actions, Integer, api_name: :shareActions
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
class FirstShareChannelBreakdown < GrowsurfRuby::Internal::Type::BaseModel
|
|
156
|
+
required :key, String
|
|
157
|
+
required :sharing_participants, Integer, api_name: :sharingParticipants
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
class Breakdowns < GrowsurfRuby::Internal::Type::BaseModel
|
|
161
|
+
required :platforms, -> { GrowsurfRuby::Internal::Type::ArrayOf[PlatformBreakdown] }
|
|
162
|
+
required :portal_view_sources,
|
|
163
|
+
-> { GrowsurfRuby::Internal::Type::ArrayOf[PortalSourceBreakdown] },
|
|
164
|
+
api_name: :portalViewSources
|
|
165
|
+
required :share_channels,
|
|
166
|
+
-> { GrowsurfRuby::Internal::Type::ArrayOf[ShareChannelBreakdown] },
|
|
167
|
+
api_name: :shareChannels
|
|
168
|
+
required :first_share_channels,
|
|
169
|
+
-> { GrowsurfRuby::Internal::Type::ArrayOf[FirstShareChannelBreakdown] },
|
|
170
|
+
api_name: :firstShareChannels
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
# @see GrowsurfRuby::Resources::Campaign#retrieve_activation_analytics
|
|
6
|
+
class CampaignRetrieveActivationAnalyticsParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
required :id, String
|
|
11
|
+
optional :cohort_from, Integer
|
|
12
|
+
optional :cohort_to, Integer
|
|
13
|
+
optional :cohort_interval,
|
|
14
|
+
enum: -> { GrowsurfRuby::Models::CampaignRetrieveActivationAnalyticsParams::CohortInterval }
|
|
15
|
+
optional :observation_window_days,
|
|
16
|
+
enum: -> { GrowsurfRuby::Models::CampaignRetrieveActivationAnalyticsParams::ObservationWindowDays }
|
|
17
|
+
optional :timezone, String
|
|
18
|
+
|
|
19
|
+
module CohortInterval
|
|
20
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
21
|
+
|
|
22
|
+
DAY = :day
|
|
23
|
+
WEEK = :week
|
|
24
|
+
MONTH = :month
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
module ObservationWindowDays
|
|
28
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
29
|
+
|
|
30
|
+
SEVEN = 7
|
|
31
|
+
THIRTY = 30
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -33,18 +33,27 @@ module GrowsurfRuby
|
|
|
33
33
|
# `clicked`, `bounced`, `spamComplaints`, and per-email-type metrics. When `email` and
|
|
34
34
|
# an interval are both requested, each `series` item also contains counts for emails
|
|
35
35
|
# sent during that period. Combine `email` with `previousPeriod` to include the same
|
|
36
|
-
# email metrics in both windows.
|
|
36
|
+
# email metrics in both windows. `engagement` adds covered participant activity
|
|
37
|
+
# totals, comparisons, series, and breakdowns.
|
|
37
38
|
#
|
|
38
39
|
# @return [String, nil]
|
|
39
40
|
optional :include, String
|
|
40
41
|
|
|
41
42
|
# @!attribute interval
|
|
42
43
|
# When set to `day`, `week`, or `month`, the response also includes a `series` array
|
|
43
|
-
# with per-period totals
|
|
44
|
+
# with per-period totals and uses the same bucket size for `engagement.series`.
|
|
45
|
+
# Defaults to `total` (no legacy series); `engagement.series` uses daily buckets when
|
|
46
|
+
# `interval` is `total` or omitted.
|
|
44
47
|
#
|
|
45
48
|
# @return [Symbol, GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams::Interval, nil]
|
|
46
49
|
optional :interval, enum: -> { GrowsurfRuby::CampaignRetrieveAnalyticsParams::Interval }
|
|
47
50
|
|
|
51
|
+
# @!attribute platform
|
|
52
|
+
# Participant platform used for `engagement`. Defaults to `ALL`.
|
|
53
|
+
#
|
|
54
|
+
# @return [Symbol, GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams::Platform, nil]
|
|
55
|
+
optional :platform, enum: -> { GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams::Platform }
|
|
56
|
+
|
|
48
57
|
# @!attribute start_date
|
|
49
58
|
# Start date of the analytics timeframe as a Unix timestamp in milliseconds.
|
|
50
59
|
# Required if `days` is not set.
|
|
@@ -52,7 +61,13 @@ module GrowsurfRuby
|
|
|
52
61
|
# @return [Integer, nil]
|
|
53
62
|
optional :start_date, Integer
|
|
54
63
|
|
|
55
|
-
# @!
|
|
64
|
+
# @!attribute timezone
|
|
65
|
+
# IANA timezone used for engagement periods and buckets. Defaults to `UTC`.
|
|
66
|
+
#
|
|
67
|
+
# @return [String, nil]
|
|
68
|
+
optional :timezone, String
|
|
69
|
+
|
|
70
|
+
# @!method initialize(id:, days: nil, end_date: nil, include: nil, interval: nil, platform: nil, start_date: nil, timezone: nil, request_options: {})
|
|
56
71
|
# Some parameter documentations has been truncated, see
|
|
57
72
|
# {GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams} for more details.
|
|
58
73
|
#
|
|
@@ -66,12 +81,18 @@ module GrowsurfRuby
|
|
|
66
81
|
#
|
|
67
82
|
# @param interval [Symbol, GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams::Interval] When set to `day`, `week`, or `month`, the response also includes a `series` array
|
|
68
83
|
#
|
|
84
|
+
# @param platform [Symbol, GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams::Platform] Participant platform used for `engagement`. Defaults to `ALL`.
|
|
85
|
+
#
|
|
69
86
|
# @param start_date [Integer] Start date of the analytics timeframe as a Unix timestamp in milliseconds. Requi
|
|
70
87
|
#
|
|
88
|
+
# @param timezone [String] IANA timezone used for engagement periods and buckets. Defaults to `UTC`.
|
|
89
|
+
#
|
|
71
90
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
72
91
|
|
|
73
92
|
# When set to `day`, `week`, or `month`, the response also includes a `series` array
|
|
74
|
-
# with per-period totals
|
|
93
|
+
# with per-period totals and uses the same bucket size for `engagement.series`.
|
|
94
|
+
# Defaults to `total` (no legacy series); `engagement.series` uses daily buckets when
|
|
95
|
+
# `interval` is `total` or omitted.
|
|
75
96
|
module Interval
|
|
76
97
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
77
98
|
|
|
@@ -83,6 +104,18 @@ module GrowsurfRuby
|
|
|
83
104
|
# @!method self.values
|
|
84
105
|
# @return [Array<Symbol>]
|
|
85
106
|
end
|
|
107
|
+
|
|
108
|
+
module Platform
|
|
109
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
110
|
+
|
|
111
|
+
ALL = :ALL
|
|
112
|
+
WEB = :WEB
|
|
113
|
+
IOS = :IOS
|
|
114
|
+
ANDROID = :ANDROID
|
|
115
|
+
|
|
116
|
+
# @!method self.values
|
|
117
|
+
# @return [Array<Symbol>]
|
|
118
|
+
end
|
|
86
119
|
end
|
|
87
120
|
end
|
|
88
121
|
end
|
|
@@ -22,6 +22,9 @@ module GrowsurfRuby
|
|
|
22
22
|
# Present only when `include` contains `email`.
|
|
23
23
|
optional :email, -> { GrowsurfRuby::Models::EmailAnalytics }
|
|
24
24
|
|
|
25
|
+
# Present only when `include` contains `engagement`.
|
|
26
|
+
optional :engagement, -> { GrowsurfRuby::Models::CampaignEngagementAnalytics }
|
|
27
|
+
|
|
25
28
|
# @!attribute previous_period
|
|
26
29
|
# Present only when `include` contains `previousPeriod`.
|
|
27
30
|
#
|
|
@@ -32,9 +32,13 @@ module GrowsurfRuby
|
|
|
32
32
|
optional :duration_in_months, Integer, api_name: :durationInMonths, nil?: true
|
|
33
33
|
|
|
34
34
|
# @!attribute event
|
|
35
|
+
# The event that generates a commission. `CLICK` and `LEAD` require `FIXED`
|
|
36
|
+
# with a positive `amount`; `amountISO` defaults to the program currency when
|
|
37
|
+
# omitted. `SALE` supports `FIXED` or `PERCENT`. Missing legacy values read as
|
|
38
|
+
# `SALE`.
|
|
35
39
|
#
|
|
36
|
-
# @return [
|
|
37
|
-
optional :event,
|
|
40
|
+
# @return [Symbol, GrowsurfRuby::Models::CommissionStructure::Event, nil]
|
|
41
|
+
optional :event, enum: -> { GrowsurfRuby::CommissionStructure::Event }, nil?: true
|
|
38
42
|
|
|
39
43
|
# @!attribute has_intro
|
|
40
44
|
#
|
|
@@ -112,7 +116,7 @@ module GrowsurfRuby
|
|
|
112
116
|
# @param approval_required [Boolean, nil]
|
|
113
117
|
# @param duration [String, nil]
|
|
114
118
|
# @param duration_in_months [Integer, nil]
|
|
115
|
-
# @param event [
|
|
119
|
+
# @param event [Symbol, GrowsurfRuby::Models::CommissionStructure::Event, nil]
|
|
116
120
|
# @param has_intro [Boolean, nil]
|
|
117
121
|
# @param has_max_amount [Boolean, nil]
|
|
118
122
|
# @param hold_duration [Integer, nil]
|
|
@@ -128,6 +132,18 @@ module GrowsurfRuby
|
|
|
128
132
|
# @param percent [Float, nil]
|
|
129
133
|
# @param type [Symbol, GrowsurfRuby::Models::CommissionStructure::Type, nil]
|
|
130
134
|
|
|
135
|
+
# @see GrowsurfRuby::Models::CommissionStructure#event
|
|
136
|
+
module Event
|
|
137
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
138
|
+
|
|
139
|
+
CLICK = :CLICK
|
|
140
|
+
LEAD = :LEAD
|
|
141
|
+
SALE = :SALE
|
|
142
|
+
|
|
143
|
+
# @!method self.values
|
|
144
|
+
# @return [Array<Symbol>]
|
|
145
|
+
end
|
|
146
|
+
|
|
131
147
|
# @see GrowsurfRuby::Models::CommissionStructure#type
|
|
132
148
|
module Type
|
|
133
149
|
extend GrowsurfRuby::Internal::Type::Enum
|