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
|
@@ -9,28 +9,28 @@ module GrowsurfRuby
|
|
|
9
9
|
# When the confirmation link expires, as a Unix timestamp in milliseconds.
|
|
10
10
|
#
|
|
11
11
|
# @return [Integer, nil]
|
|
12
|
-
|
|
12
|
+
required :expires_at, Integer, api_name: :expiresAt, nil?: true
|
|
13
13
|
|
|
14
14
|
# @!attribute provider
|
|
15
15
|
# The provider the participant was asked to confirm.
|
|
16
16
|
#
|
|
17
|
-
# @return [String
|
|
18
|
-
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :provider, String
|
|
19
19
|
|
|
20
20
|
# @!attribute provider_display_name
|
|
21
21
|
# The customer-facing provider name (e.g. "PayPal", "Wise").
|
|
22
22
|
#
|
|
23
|
-
# @return [String
|
|
24
|
-
|
|
23
|
+
# @return [String]
|
|
24
|
+
required :provider_display_name, String, api_name: :providerDisplayName
|
|
25
25
|
|
|
26
26
|
# @!attribute status
|
|
27
27
|
# Confirms the message was requested.
|
|
28
28
|
#
|
|
29
|
-
# @return [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRequestPayoutDestinationConfirmationResponse::Status
|
|
30
|
-
|
|
29
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRequestPayoutDestinationConfirmationResponse::Status]
|
|
30
|
+
required :status,
|
|
31
31
|
enum: -> { GrowsurfRuby::Campaign::ParticipantRequestPayoutDestinationConfirmationResponse::Status }
|
|
32
32
|
|
|
33
|
-
# @!method initialize(expires_at
|
|
33
|
+
# @!method initialize(expires_at:, provider:, provider_display_name:, status:)
|
|
34
34
|
# @param expires_at [Integer, nil] When the confirmation link expires, as a Unix timestamp in milliseconds.
|
|
35
35
|
#
|
|
36
36
|
# @param provider [String] The provider the participant was asked to confirm.
|
|
@@ -19,14 +19,16 @@ module GrowsurfRuby
|
|
|
19
19
|
required :participant_id_or_email, String
|
|
20
20
|
|
|
21
21
|
# @!attribute days
|
|
22
|
-
# Last number of days
|
|
22
|
+
# Last number of days for optional `series` and `email` analytics. Defaults to
|
|
23
|
+
# 365. Maximum 1825. Does not filter the top-level all-time totals.
|
|
23
24
|
#
|
|
24
25
|
# @return [Integer, nil]
|
|
25
26
|
optional :days, Integer
|
|
26
27
|
|
|
27
28
|
# @!attribute end_date
|
|
28
|
-
# End
|
|
29
|
-
#
|
|
29
|
+
# End of a custom `series` and `email` analytics window as a Unix timestamp in
|
|
30
|
+
# milliseconds. Set it together with `startDate`. Does not filter the top-level
|
|
31
|
+
# all-time totals.
|
|
30
32
|
#
|
|
31
33
|
# @return [Integer, nil]
|
|
32
34
|
optional :end_date, Integer
|
|
@@ -35,9 +37,10 @@ module GrowsurfRuby
|
|
|
35
37
|
# Comma-separated optional data. `series` returns this participant's own activity
|
|
36
38
|
# per period; `email` returns `sent`, `delivered`, `opened`, `clicked`, `bounced`,
|
|
37
39
|
# `spamComplaints`, and per-email-type metrics attributed to the participant for
|
|
38
|
-
# the requested analytics window (including invitations they sent)
|
|
39
|
-
#
|
|
40
|
-
#
|
|
40
|
+
# the requested analytics window (including invitations they sent); `activation`
|
|
41
|
+
# returns the cohort anchor and covered first milestones. Request
|
|
42
|
+
# `activation,series` to add covered portal-view and share-action counts to every
|
|
43
|
+
# series item. Only documented tokens are accepted; an unknown token returns `400`.
|
|
41
44
|
#
|
|
42
45
|
# @return [String, nil]
|
|
43
46
|
optional :include, String
|
|
@@ -50,8 +53,9 @@ module GrowsurfRuby
|
|
|
50
53
|
optional :interval, enum: -> { GrowsurfRuby::Campaign::ParticipantRetrieveAnalyticsParams::Interval }
|
|
51
54
|
|
|
52
55
|
# @!attribute start_date
|
|
53
|
-
# Start
|
|
54
|
-
#
|
|
56
|
+
# Start of a custom `series` and `email` analytics window as a Unix timestamp in
|
|
57
|
+
# milliseconds. Set it together with `endDate`. Does not filter the top-level
|
|
58
|
+
# all-time totals.
|
|
55
59
|
#
|
|
56
60
|
# @return [Integer, nil]
|
|
57
61
|
optional :start_date, Integer
|
|
@@ -65,15 +69,15 @@ module GrowsurfRuby
|
|
|
65
69
|
#
|
|
66
70
|
# @param participant_id_or_email [String]
|
|
67
71
|
#
|
|
68
|
-
# @param days [Integer] Last number of days
|
|
72
|
+
# @param days [Integer] Last number of days for optional `series` and `email` analytics. Defaults to 365. Maxi
|
|
69
73
|
#
|
|
70
|
-
# @param end_date [Integer] End
|
|
74
|
+
# @param end_date [Integer] End of a custom `series` and `email` analytics window as a Unix timestamp in milli
|
|
71
75
|
#
|
|
72
76
|
# @param include [String] Comma-separated optional data. `series` returns this participant's own activity
|
|
73
77
|
#
|
|
74
78
|
# @param interval [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRetrieveAnalyticsParams::Interval] Bucket size for the `series` (only used when `include` contains `series`).
|
|
75
79
|
#
|
|
76
|
-
# @param start_date [Integer] Start
|
|
80
|
+
# @param start_date [Integer] Start of a custom `series` and `email` analytics window as a Unix timestamp in mi
|
|
77
81
|
#
|
|
78
82
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
79
83
|
|
|
@@ -27,7 +27,12 @@ module GrowsurfRuby
|
|
|
27
27
|
# @!attribute approved_at
|
|
28
28
|
#
|
|
29
29
|
# @return [Integer, nil]
|
|
30
|
-
optional :approved_at, Integer, api_name: :approvedAt
|
|
30
|
+
optional :approved_at, Integer, api_name: :approvedAt, nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute amount
|
|
33
|
+
#
|
|
34
|
+
# @return [Float, nil]
|
|
35
|
+
optional :amount, Float, nil?: true
|
|
31
36
|
|
|
32
37
|
# @!attribute commission_structure
|
|
33
38
|
#
|
|
@@ -37,10 +42,15 @@ module GrowsurfRuby
|
|
|
37
42
|
api_name: :commissionStructure,
|
|
38
43
|
nil?: true
|
|
39
44
|
|
|
45
|
+
# @!attribute currency_iso
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :currency_iso, String, api_name: :currencyISO, nil?: true
|
|
49
|
+
|
|
40
50
|
# @!attribute fulfilled_at
|
|
41
51
|
#
|
|
42
52
|
# @return [Integer, nil]
|
|
43
|
-
optional :fulfilled_at, Integer, api_name: :fulfilledAt
|
|
53
|
+
optional :fulfilled_at, Integer, api_name: :fulfilledAt, nil?: true
|
|
44
54
|
|
|
45
55
|
# @!attribute is_available
|
|
46
56
|
#
|
|
@@ -72,13 +82,15 @@ module GrowsurfRuby
|
|
|
72
82
|
# @return [Boolean, nil]
|
|
73
83
|
optional :unread, GrowsurfRuby::Internal::Type::Boolean
|
|
74
84
|
|
|
75
|
-
# @!method initialize(id:, reward_id:, status:, approved: nil, approved_at: nil, commission_structure: nil, fulfilled_at: nil, is_available: nil, is_fulfilled: nil, is_referrer: nil, referred_id: nil, referrer_id: nil, unread: nil)
|
|
85
|
+
# @!method initialize(id:, reward_id:, status:, approved: nil, approved_at: nil, amount: nil, commission_structure: nil, currency_iso: nil, fulfilled_at: nil, is_available: nil, is_fulfilled: nil, is_referrer: nil, referred_id: nil, referrer_id: nil, unread: nil)
|
|
76
86
|
# @param id [String]
|
|
77
87
|
# @param reward_id [String]
|
|
78
88
|
# @param status [Symbol, GrowsurfRuby::Models::Campaign::ParticipantReward::Status]
|
|
79
89
|
# @param approved [Boolean]
|
|
80
90
|
# @param approved_at [Integer]
|
|
91
|
+
# @param amount [Float]
|
|
81
92
|
# @param commission_structure [GrowsurfRuby::Models::CommissionStructure, nil]
|
|
93
|
+
# @param currency_iso [String]
|
|
82
94
|
# @param fulfilled_at [Integer]
|
|
83
95
|
# @param is_available [Boolean]
|
|
84
96
|
# @param is_fulfilled [Boolean]
|
|
@@ -93,6 +105,7 @@ module GrowsurfRuby
|
|
|
93
105
|
|
|
94
106
|
PENDING = :PENDING
|
|
95
107
|
FULFILLED = :FULFILLED
|
|
108
|
+
CANCELLED = :CANCELLED
|
|
96
109
|
|
|
97
110
|
# @!method self.values
|
|
98
111
|
# @return [Array<Symbol>]
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ProgramResourceFile < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
required :file_name, String, api_name: :fileName
|
|
8
|
+
required :mime_type, String, api_name: :mimeType
|
|
9
|
+
required :bytes, Integer
|
|
10
|
+
required :format, String
|
|
11
|
+
required :moderation_status,
|
|
12
|
+
enum: -> { GrowsurfRuby::Campaign::ProgramResourceFile::ModerationStatus },
|
|
13
|
+
api_name: :moderationStatus
|
|
14
|
+
|
|
15
|
+
module ModerationStatus
|
|
16
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
17
|
+
|
|
18
|
+
PENDING = :PENDING
|
|
19
|
+
APPROVED = :APPROVED
|
|
20
|
+
REJECTED = :REJECTED
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# A program-owned participant resource returned by the REST API.
|
|
25
|
+
class ProgramResource < GrowsurfRuby::Internal::Type::BaseModel
|
|
26
|
+
required :id, String
|
|
27
|
+
required :type, enum: -> { GrowsurfRuby::Campaign::ProgramResource::Type }
|
|
28
|
+
required :title, String
|
|
29
|
+
required :description, String, nil?: true
|
|
30
|
+
required :category, String, nil?: true
|
|
31
|
+
required :url, String, nil?: true
|
|
32
|
+
required :text, String, nil?: true
|
|
33
|
+
required :file, -> { GrowsurfRuby::Campaign::ProgramResourceFile }, nil?: true
|
|
34
|
+
required :is_published, GrowsurfRuby::Internal::Type::Boolean, api_name: :isPublished
|
|
35
|
+
required :position, Integer
|
|
36
|
+
# Unix time in milliseconds when the resource was created.
|
|
37
|
+
required :created_at, Integer, api_name: :createdAt
|
|
38
|
+
# Unix time in milliseconds when the resource was last updated.
|
|
39
|
+
required :updated_at, Integer, api_name: :updatedAt
|
|
40
|
+
|
|
41
|
+
module Type
|
|
42
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
43
|
+
|
|
44
|
+
FILE = :FILE
|
|
45
|
+
LINK = :LINK
|
|
46
|
+
TEXT = :TEXT
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ProgramResourceCreateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
required :type, enum: -> { GrowsurfRuby::Campaign::ProgramResourceCreateParams::Type }
|
|
11
|
+
required :title, String
|
|
12
|
+
optional :description, String, nil?: true
|
|
13
|
+
optional :category, String, nil?: true
|
|
14
|
+
optional :is_published, GrowsurfRuby::Internal::Type::Boolean, api_name: :isPublished
|
|
15
|
+
optional :url, String
|
|
16
|
+
optional :text, String
|
|
17
|
+
optional :upload_ticket, String, api_name: :uploadTicket
|
|
18
|
+
optional :upload_result,
|
|
19
|
+
GrowsurfRuby::Models::Campaign::ProgramResourceUploadResult,
|
|
20
|
+
api_name: :uploadResult
|
|
21
|
+
|
|
22
|
+
module Type
|
|
23
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
24
|
+
|
|
25
|
+
FILE = :FILE
|
|
26
|
+
LINK = :LINK
|
|
27
|
+
TEXT = :TEXT
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ProgramResourceDeleteParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
required :id, String
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ProgramResourceListResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
required :resources,
|
|
8
|
+
-> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::ProgramResource] }
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ProgramResourceUpdateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
required :id, String
|
|
11
|
+
optional :type, enum: -> { GrowsurfRuby::Campaign::ProgramResourceUpdateParams::Type }
|
|
12
|
+
optional :title, String
|
|
13
|
+
optional :description, String, nil?: true
|
|
14
|
+
optional :category, String, nil?: true
|
|
15
|
+
optional :is_published, GrowsurfRuby::Internal::Type::Boolean, api_name: :isPublished
|
|
16
|
+
# Zero-based destination. Must be from 0 through 99 and within the current Resource list.
|
|
17
|
+
optional :position, Integer
|
|
18
|
+
optional :url, String
|
|
19
|
+
optional :text, String
|
|
20
|
+
optional :upload_ticket, String, api_name: :uploadTicket
|
|
21
|
+
optional :upload_result,
|
|
22
|
+
GrowsurfRuby::Models::Campaign::ProgramResourceUploadResult,
|
|
23
|
+
api_name: :uploadResult
|
|
24
|
+
|
|
25
|
+
module Type
|
|
26
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
27
|
+
|
|
28
|
+
FILE = :FILE
|
|
29
|
+
LINK = :LINK
|
|
30
|
+
TEXT = :TEXT
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# The unmodified signed result returned after uploading with a GrowSurf ticket.
|
|
7
|
+
class ProgramResourceUploadResult < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
optional :asset_id, String
|
|
9
|
+
required :public_id, String
|
|
10
|
+
required :version, Integer
|
|
11
|
+
required :signature, String
|
|
12
|
+
required :resource_type, enum: -> { GrowsurfRuby::Models::Campaign::ProgramResourceUploadResult::ResourceType }
|
|
13
|
+
required :type, enum: -> { GrowsurfRuby::Models::Campaign::ProgramResourceUploadResult::Type }
|
|
14
|
+
required :bytes, Integer
|
|
15
|
+
required :secure_url, String
|
|
16
|
+
optional :format, String
|
|
17
|
+
|
|
18
|
+
module ResourceType
|
|
19
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
20
|
+
|
|
21
|
+
IMAGE = :image
|
|
22
|
+
RAW = :raw
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
module Type
|
|
26
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
27
|
+
|
|
28
|
+
AUTHENTICATED = :authenticated
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
module ProgramResourceUploadParameter
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::Union
|
|
8
|
+
|
|
9
|
+
variant GrowsurfRuby::Internal::Type::Boolean
|
|
10
|
+
variant String
|
|
11
|
+
variant Integer
|
|
12
|
+
variant Float
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class ProgramResourceUploadTicket < GrowsurfRuby::Internal::Type::BaseModel
|
|
16
|
+
required :ticket, String
|
|
17
|
+
required :expires_in, Integer, api_name: :expiresIn
|
|
18
|
+
required :upload_url, String, api_name: :uploadUrl
|
|
19
|
+
# Opaque signed scalar fields that must be sent unchanged with the file upload.
|
|
20
|
+
required :upload_parameters,
|
|
21
|
+
GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Models::Campaign::ProgramResourceUploadParameter],
|
|
22
|
+
api_name: :uploadParameters
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ProgramResourceUploadTicketParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# File name sent to GrowSurf. Must contain 1 through 120 characters.
|
|
11
|
+
required :file_name, String, api_name: :fileName
|
|
12
|
+
required :mime_type, String, api_name: :mimeType
|
|
13
|
+
required :bytes, Integer
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -52,6 +52,14 @@ module GrowsurfRuby
|
|
|
52
52
|
# @return [String, nil]
|
|
53
53
|
optional :description, String, nil?: true
|
|
54
54
|
|
|
55
|
+
# @!attribute event
|
|
56
|
+
# The referral event that earns this Campaign Reward. Present only for
|
|
57
|
+
# `SINGLE_SIDED`, `DOUBLE_SIDED`, and `MILESTONE` rewards. Legacy Campaign
|
|
58
|
+
# Rewards return `CONVERSION`.
|
|
59
|
+
#
|
|
60
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::Reward::Event, nil]
|
|
61
|
+
optional :event, enum: -> { GrowsurfRuby::Campaign::Reward::Event }, nil?: true
|
|
62
|
+
|
|
55
63
|
# @!attribute image_url
|
|
56
64
|
#
|
|
57
65
|
# @return [String, nil]
|
|
@@ -145,7 +153,7 @@ module GrowsurfRuby
|
|
|
145
153
|
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
146
154
|
optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
|
|
147
155
|
|
|
148
|
-
# @!method initialize(id:, is_unlimited:, metadata:, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, image_url: nil, is_visible: 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, title: nil, value: nil)
|
|
156
|
+
# @!method initialize(id:, is_unlimited:, metadata:, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, is_visible: 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, title: nil, value: nil)
|
|
149
157
|
# @param id [String]
|
|
150
158
|
#
|
|
151
159
|
# @param is_unlimited [Boolean]
|
|
@@ -162,6 +170,8 @@ module GrowsurfRuby
|
|
|
162
170
|
#
|
|
163
171
|
# @param description [String, nil]
|
|
164
172
|
#
|
|
173
|
+
# @param event [Symbol, GrowsurfRuby::Models::Campaign::Reward::Event, nil] The referral event that earns this Campaign Reward.
|
|
174
|
+
#
|
|
165
175
|
# @param image_url [String, nil]
|
|
166
176
|
#
|
|
167
177
|
# @param is_visible [Boolean] Whether the reward is enabled. When `false` the reward is disabled: hidden from
|
|
@@ -204,6 +214,17 @@ module GrowsurfRuby
|
|
|
204
214
|
# @return [Array<Symbol>]
|
|
205
215
|
end
|
|
206
216
|
|
|
217
|
+
# @see GrowsurfRuby::Models::Campaign::Reward#event
|
|
218
|
+
module Event
|
|
219
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
220
|
+
|
|
221
|
+
LEAD = :LEAD
|
|
222
|
+
CONVERSION = :CONVERSION
|
|
223
|
+
|
|
224
|
+
# @!method self.values
|
|
225
|
+
# @return [Array<Symbol>]
|
|
226
|
+
end
|
|
227
|
+
|
|
207
228
|
# @see GrowsurfRuby::Models::Campaign::Reward#limit_duration
|
|
208
229
|
module LimitDuration
|
|
209
230
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
@@ -31,17 +31,26 @@ module GrowsurfRuby
|
|
|
31
31
|
# issued coupon when one exists.
|
|
32
32
|
#
|
|
33
33
|
# @return [String, nil]
|
|
34
|
-
optional :coupon_code, String, api_name: :couponCode
|
|
34
|
+
optional :coupon_code, String, api_name: :couponCode, nil?: true
|
|
35
35
|
|
|
36
36
|
# @!attribute description
|
|
37
37
|
#
|
|
38
38
|
# @return [String, nil]
|
|
39
39
|
optional :description, String
|
|
40
40
|
|
|
41
|
+
# @!attribute event
|
|
42
|
+
# The referral event that earns this Campaign Reward. Use `LEAD` or
|
|
43
|
+
# `CONVERSION`. `LEAD` requires the program installation's `referralTrigger` to
|
|
44
|
+
# be `CUSTOM`. This field applies only to `SINGLE_SIDED`, `DOUBLE_SIDED`, and
|
|
45
|
+
# `MILESTONE` rewards. When omitted, it defaults to `CONVERSION`.
|
|
46
|
+
#
|
|
47
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::Event, nil]
|
|
48
|
+
optional :event, enum: -> { GrowsurfRuby::Campaign::RewardCreateParams::Event }
|
|
49
|
+
|
|
41
50
|
# @!attribute image_url
|
|
42
51
|
#
|
|
43
52
|
# @return [String, nil]
|
|
44
|
-
optional :image_url, String, api_name: :imageUrl
|
|
53
|
+
optional :image_url, String, api_name: :imageUrl, nil?: true
|
|
45
54
|
|
|
46
55
|
# @!attribute is_unlimited
|
|
47
56
|
# Whether the reward can be earned an unlimited number of times. Defaults to
|
|
@@ -80,14 +89,14 @@ module GrowsurfRuby
|
|
|
80
89
|
# Applies to `MILESTONE` rewards.
|
|
81
90
|
#
|
|
82
91
|
# @return [String, nil]
|
|
83
|
-
optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix
|
|
92
|
+
optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix, nil?: true
|
|
84
93
|
|
|
85
94
|
# @!attribute next_milestone_suffix
|
|
86
95
|
# Text shown after a participant's referral count in milestone-progress copy.
|
|
87
96
|
# Applies to `MILESTONE` rewards.
|
|
88
97
|
#
|
|
89
98
|
# @return [String, nil]
|
|
90
|
-
optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix
|
|
99
|
+
optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix, nil?: true
|
|
91
100
|
|
|
92
101
|
# @!attribute number_of_winners
|
|
93
102
|
# The number of winners (`LEADERBOARD` rewards only). With `limitDuration`
|
|
@@ -108,12 +117,12 @@ module GrowsurfRuby
|
|
|
108
117
|
# connected billing integration's issued coupon when one exists.
|
|
109
118
|
#
|
|
110
119
|
# @return [String, nil]
|
|
111
|
-
optional :referral_coupon_code, String, api_name: :referralCouponCode
|
|
120
|
+
optional :referral_coupon_code, String, api_name: :referralCouponCode, nil?: true
|
|
112
121
|
|
|
113
122
|
# @!attribute referral_description
|
|
114
123
|
#
|
|
115
124
|
# @return [String, nil]
|
|
116
|
-
optional :referral_description, String, api_name: :referralDescription
|
|
125
|
+
optional :referral_description, String, api_name: :referralDescription, nil?: true
|
|
117
126
|
|
|
118
127
|
# @!attribute referred_reward_upfront
|
|
119
128
|
#
|
|
@@ -129,7 +138,8 @@ module GrowsurfRuby
|
|
|
129
138
|
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
130
139
|
optional :referred_value,
|
|
131
140
|
-> { GrowsurfRuby::RewardTaxValuation },
|
|
132
|
-
api_name: :referredValue
|
|
141
|
+
api_name: :referredValue,
|
|
142
|
+
nil?: true
|
|
133
143
|
|
|
134
144
|
# @!attribute title
|
|
135
145
|
#
|
|
@@ -141,9 +151,9 @@ module GrowsurfRuby
|
|
|
141
151
|
# Used by tax documentation / 1099 reporting.
|
|
142
152
|
#
|
|
143
153
|
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
144
|
-
optional :value, -> { GrowsurfRuby::RewardTaxValuation }
|
|
154
|
+
optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
|
|
145
155
|
|
|
146
|
-
# @!method initialize(type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, image_url: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: 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, title: nil, value: nil, request_options: {})
|
|
156
|
+
# @!method initialize(type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: 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, title: nil, value: nil, request_options: {})
|
|
147
157
|
# Some parameter documentations has been truncated, see
|
|
148
158
|
# {GrowsurfRuby::Models::Campaign::RewardCreateParams} for more details.
|
|
149
159
|
#
|
|
@@ -157,6 +167,8 @@ module GrowsurfRuby
|
|
|
157
167
|
#
|
|
158
168
|
# @param description [String]
|
|
159
169
|
#
|
|
170
|
+
# @param event [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::Event] The referral event that earns this Campaign Reward.
|
|
171
|
+
#
|
|
160
172
|
# @param image_url [String]
|
|
161
173
|
#
|
|
162
174
|
# @param is_unlimited [Boolean] Whether the reward can be earned an unlimited number of times. Defaults to `true
|
|
@@ -205,6 +217,17 @@ module GrowsurfRuby
|
|
|
205
217
|
# @return [Array<Symbol>]
|
|
206
218
|
end
|
|
207
219
|
|
|
220
|
+
# @see GrowsurfRuby::Models::Campaign::RewardCreateParams#event
|
|
221
|
+
module Event
|
|
222
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
223
|
+
|
|
224
|
+
LEAD = :LEAD
|
|
225
|
+
CONVERSION = :CONVERSION
|
|
226
|
+
|
|
227
|
+
# @!method self.values
|
|
228
|
+
# @return [Array<Symbol>]
|
|
229
|
+
end
|
|
230
|
+
|
|
208
231
|
# @see GrowsurfRuby::Models::Campaign::RewardCreateParams#limit_duration
|
|
209
232
|
module LimitDuration
|
|
210
233
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
@@ -36,17 +36,26 @@ module GrowsurfRuby
|
|
|
36
36
|
# issued coupon when one exists.
|
|
37
37
|
#
|
|
38
38
|
# @return [String, nil]
|
|
39
|
-
optional :coupon_code, String, api_name: :couponCode
|
|
39
|
+
optional :coupon_code, String, api_name: :couponCode, nil?: true
|
|
40
40
|
|
|
41
41
|
# @!attribute description
|
|
42
42
|
#
|
|
43
43
|
# @return [String, nil]
|
|
44
44
|
optional :description, String
|
|
45
45
|
|
|
46
|
+
# @!attribute event
|
|
47
|
+
# The referral event that earns this Campaign Reward. Use `LEAD` or
|
|
48
|
+
# `CONVERSION`. `LEAD` requires the program installation's `referralTrigger` to
|
|
49
|
+
# be `CUSTOM`. This field applies only to `SINGLE_SIDED`, `DOUBLE_SIDED`, and
|
|
50
|
+
# `MILESTONE` rewards. When omitted, the stored event is preserved.
|
|
51
|
+
#
|
|
52
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event, nil]
|
|
53
|
+
optional :event, enum: -> { GrowsurfRuby::Campaign::RewardUpdateParams::Event }
|
|
54
|
+
|
|
46
55
|
# @!attribute image_url
|
|
47
56
|
#
|
|
48
57
|
# @return [String, nil]
|
|
49
|
-
optional :image_url, String, api_name: :imageUrl
|
|
58
|
+
optional :image_url, String, api_name: :imageUrl, nil?: true
|
|
50
59
|
|
|
51
60
|
# @!attribute is_unlimited
|
|
52
61
|
# Whether the reward can be earned an unlimited number of times. Defaults to
|
|
@@ -85,14 +94,14 @@ module GrowsurfRuby
|
|
|
85
94
|
# Applies to `MILESTONE` rewards.
|
|
86
95
|
#
|
|
87
96
|
# @return [String, nil]
|
|
88
|
-
optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix
|
|
97
|
+
optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix, nil?: true
|
|
89
98
|
|
|
90
99
|
# @!attribute next_milestone_suffix
|
|
91
100
|
# Text shown after a participant's referral count in milestone-progress copy.
|
|
92
101
|
# Applies to `MILESTONE` rewards.
|
|
93
102
|
#
|
|
94
103
|
# @return [String, nil]
|
|
95
|
-
optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix
|
|
104
|
+
optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix, nil?: true
|
|
96
105
|
|
|
97
106
|
# @!attribute number_of_winners
|
|
98
107
|
# The number of winners (`LEADERBOARD` rewards only). With `limitDuration`
|
|
@@ -113,12 +122,12 @@ module GrowsurfRuby
|
|
|
113
122
|
# connected billing integration's issued coupon when one exists.
|
|
114
123
|
#
|
|
115
124
|
# @return [String, nil]
|
|
116
|
-
optional :referral_coupon_code, String, api_name: :referralCouponCode
|
|
125
|
+
optional :referral_coupon_code, String, api_name: :referralCouponCode, nil?: true
|
|
117
126
|
|
|
118
127
|
# @!attribute referral_description
|
|
119
128
|
#
|
|
120
129
|
# @return [String, nil]
|
|
121
|
-
optional :referral_description, String, api_name: :referralDescription
|
|
130
|
+
optional :referral_description, String, api_name: :referralDescription, nil?: true
|
|
122
131
|
|
|
123
132
|
# @!attribute referred_reward_upfront
|
|
124
133
|
#
|
|
@@ -134,7 +143,8 @@ module GrowsurfRuby
|
|
|
134
143
|
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
135
144
|
optional :referred_value,
|
|
136
145
|
-> { GrowsurfRuby::RewardTaxValuation },
|
|
137
|
-
api_name: :referredValue
|
|
146
|
+
api_name: :referredValue,
|
|
147
|
+
nil?: true
|
|
138
148
|
|
|
139
149
|
# @!attribute title
|
|
140
150
|
#
|
|
@@ -146,9 +156,9 @@ module GrowsurfRuby
|
|
|
146
156
|
# Used by tax documentation / 1099 reporting.
|
|
147
157
|
#
|
|
148
158
|
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
149
|
-
optional :value, -> { GrowsurfRuby::RewardTaxValuation }
|
|
159
|
+
optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
|
|
150
160
|
|
|
151
|
-
# @!method initialize(id:, campaign_reward_id:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, image_url: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: 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, title: nil, value: nil, request_options: {})
|
|
161
|
+
# @!method initialize(id:, campaign_reward_id:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: 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, title: nil, value: nil, request_options: {})
|
|
152
162
|
# Some parameter documentations has been truncated, see
|
|
153
163
|
# {GrowsurfRuby::Models::Campaign::RewardUpdateParams} for more details.
|
|
154
164
|
#
|
|
@@ -164,6 +174,8 @@ module GrowsurfRuby
|
|
|
164
174
|
#
|
|
165
175
|
# @param description [String]
|
|
166
176
|
#
|
|
177
|
+
# @param event [Symbol, GrowsurfRuby::Models::Campaign::RewardUpdateParams::Event] The referral event that earns this Campaign Reward.
|
|
178
|
+
#
|
|
167
179
|
# @param image_url [String]
|
|
168
180
|
#
|
|
169
181
|
# @param is_unlimited [Boolean] Whether the reward can be earned an unlimited number of times. Defaults to `true
|
|
@@ -198,6 +210,17 @@ module GrowsurfRuby
|
|
|
198
210
|
#
|
|
199
211
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
200
212
|
|
|
213
|
+
# @see GrowsurfRuby::Models::Campaign::RewardUpdateParams#event
|
|
214
|
+
module Event
|
|
215
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
216
|
+
|
|
217
|
+
LEAD = :LEAD
|
|
218
|
+
CONVERSION = :CONVERSION
|
|
219
|
+
|
|
220
|
+
# @!method self.values
|
|
221
|
+
# @return [Array<Symbol>]
|
|
222
|
+
end
|
|
223
|
+
|
|
201
224
|
# @see GrowsurfRuby::Models::Campaign::RewardUpdateParams#limit_duration
|
|
202
225
|
module LimitDuration
|
|
203
226
|
extend GrowsurfRuby::Internal::Type::Enum
|