growsurf-ruby 0.8.0 → 1.1.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 +18 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/client.rb +4 -0
- data/lib/growsurf_ruby/models/account.rb +90 -0
- data/lib/growsurf_ruby/models/account_create_params.rb +46 -0
- data/lib/growsurf_ruby/models/account_create_response.rb +64 -0
- data/lib/growsurf_ruby/models/account_resend_verification_email_response.rb +33 -0
- data/lib/growsurf_ruby/models/account_rotate_api_key_response.rb +17 -0
- data/lib/growsurf_ruby/models/account_update_params.rb +35 -0
- data/lib/growsurf_ruby/models/campaign/campaign_reward_list_response.rb +2 -2
- data/lib/growsurf_ruby/models/campaign/create.rb +5 -1
- data/lib/growsurf_ruby/models/campaign/participant_activity_logs_response.rb +65 -0
- data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +421 -0
- data/lib/growsurf_ruby/models/campaign/participant_bulk_delete_params.rb +35 -0
- data/lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb +151 -0
- data/lib/growsurf_ruby/models/campaign/participant_email_params.rb +76 -0
- data/lib/growsurf_ruby/models/campaign/participant_email_response.rb +38 -0
- data/lib/growsurf_ruby/models/campaign/participant_list_activity_logs_params.rb +46 -0
- data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +98 -0
- data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +21 -1
- data/lib/growsurf_ruby/models/campaign/reward.rb +43 -5
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +48 -15
- data/lib/growsurf_ruby/models/campaign/reward_delete_params.rb +4 -4
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +51 -18
- data/lib/growsurf_ruby/models/campaign/webhook.rb +72 -0
- data/lib/growsurf_ruby/models/campaign/webhook_create_params.rb +52 -0
- data/lib/growsurf_ruby/models/campaign/webhook_delete_params.rb +28 -0
- data/lib/growsurf_ruby/models/campaign/webhook_delete_response.rb +24 -0
- data/lib/growsurf_ruby/models/campaign/webhook_event.rb +23 -0
- data/lib/growsurf_ruby/models/campaign/webhook_list_response.rb +18 -0
- data/lib/growsurf_ruby/models/campaign/webhook_test_params.rb +42 -0
- data/lib/growsurf_ruby/models/campaign/webhook_test_response.rb +50 -0
- data/lib/growsurf_ruby/models/campaign/webhook_update_params.rb +59 -0
- data/lib/growsurf_ruby/models/campaign.rb +43 -5
- data/lib/growsurf_ruby/models/campaign_create_params.rb +1 -15
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +36 -1
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +538 -1
- data/lib/growsurf_ruby/models/campaign_update_params.rb +1 -53
- data/lib/growsurf_ruby/models/commission_structure.rb +8 -2
- data/lib/growsurf_ruby/models/referral_flow_screenshots_response.rb +72 -0
- data/lib/growsurf_ruby/models/reward_tax_valuation.rb +35 -0
- data/lib/growsurf_ruby/models.rb +10 -0
- data/lib/growsurf_ruby/resources/account.rb +159 -0
- data/lib/growsurf_ruby/resources/campaign/design.rb +68 -0
- data/lib/growsurf_ruby/resources/campaign/emails.rb +66 -0
- data/lib/growsurf_ruby/resources/campaign/installation.rb +67 -0
- data/lib/growsurf_ruby/resources/campaign/options.rb +66 -0
- data/lib/growsurf_ruby/resources/campaign/participant.rb +170 -2
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +36 -32
- data/lib/growsurf_ruby/resources/campaign/webhooks.rb +157 -0
- data/lib/growsurf_ruby/resources/campaign.rb +62 -27
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +31 -0
- data/rbi/growsurf_ruby/client.rbi +3 -0
- data/rbi/growsurf_ruby/models/account.rbi +125 -0
- data/rbi/growsurf_ruby/models/account_create_params.rbi +73 -0
- data/rbi/growsurf_ruby/models/account_create_response.rbi +115 -0
- data/rbi/growsurf_ruby/models/account_resend_verification_email_response.rbi +76 -0
- data/rbi/growsurf_ruby/models/account_rotate_api_key_response.rbi +30 -0
- data/rbi/growsurf_ruby/models/account_update_params.rbi +65 -0
- data/rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi +2 -2
- data/rbi/growsurf_ruby/models/campaign/create.rbi +8 -0
- data/rbi/growsurf_ruby/models/campaign/participant_activity_logs_response.rbi +111 -0
- data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +630 -0
- data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_params.rbi +56 -0
- data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbi +285 -0
- data/rbi/growsurf_ruby/models/campaign/participant_email_params.rbi +118 -0
- data/rbi/growsurf_ruby/models/campaign/participant_email_response.rbi +84 -0
- data/rbi/growsurf_ruby/models/campaign/participant_list_activity_logs_params.rbi +74 -0
- data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +207 -0
- data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +24 -0
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +63 -3
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +62 -9
- data/rbi/growsurf_ruby/models/campaign/reward_delete_params.rbi +4 -4
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +66 -13
- data/rbi/growsurf_ruby/models/campaign/webhook.rbi +93 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_create_params.rbi +91 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_delete_params.rbi +48 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_delete_response.rbi +33 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_event.rbi +60 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_list_response.rbi +36 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_test_params.rbi +69 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_test_response.rbi +102 -0
- data/rbi/growsurf_ruby/models/campaign/webhook_update_params.rbi +98 -0
- data/rbi/growsurf_ruby/models/campaign.rbi +63 -3
- data/rbi/growsurf_ruby/models/campaign_create_params.rbi +0 -18
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +91 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +1011 -3
- data/rbi/growsurf_ruby/models/campaign_update_params.rbi +0 -78
- data/rbi/growsurf_ruby/models/commission_structure.rbi +8 -2
- data/rbi/growsurf_ruby/models/referral_flow_screenshots_response.rbi +94 -0
- data/rbi/growsurf_ruby/models/reward_tax_valuation.rbi +56 -0
- data/rbi/growsurf_ruby/models.rbi +11 -0
- data/rbi/growsurf_ruby/resources/account.rbi +112 -0
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +52 -0
- data/rbi/growsurf_ruby/resources/campaign/emails.rbi +51 -0
- data/rbi/growsurf_ruby/resources/campaign/installation.rbi +53 -0
- data/rbi/growsurf_ruby/resources/campaign/options.rbi +51 -0
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +160 -0
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +61 -29
- data/rbi/growsurf_ruby/resources/campaign/webhooks.rbi +123 -0
- data/rbi/growsurf_ruby/resources/campaign.rbi +58 -32
- data/sig/growsurf_ruby/client.rbs +2 -0
- data/sig/growsurf_ruby/models/account.rbs +67 -0
- data/sig/growsurf_ruby/models/account_create_params.rbs +42 -0
- data/sig/growsurf_ruby/models/account_create_response.rbs +47 -0
- data/sig/growsurf_ruby/models/account_resend_verification_email_response.rbs +35 -0
- data/sig/growsurf_ruby/models/account_rotate_api_key_response.rbs +13 -0
- data/sig/growsurf_ruby/models/account_update_params.rbs +42 -0
- data/sig/growsurf_ruby/models/campaign/participant_activity_logs_response.rbs +59 -0
- data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +407 -0
- data/sig/growsurf_ruby/models/campaign/participant_bulk_delete_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbs +125 -0
- data/sig/growsurf_ruby/models/campaign/participant_email_params.rbs +61 -0
- data/sig/growsurf_ruby/models/campaign/participant_email_response.rbs +37 -0
- data/sig/growsurf_ruby/models/campaign/participant_list_activity_logs_params.rbs +47 -0
- data/sig/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbs +90 -0
- data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +14 -0
- data/sig/growsurf_ruby/models/campaign/reward.rbs +18 -3
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +19 -8
- data/sig/growsurf_ruby/models/campaign/reward_delete_params.rbs +4 -4
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +23 -12
- data/sig/growsurf_ruby/models/campaign/webhook.rbs +52 -0
- data/sig/growsurf_ruby/models/campaign/webhook_create_params.rbs +51 -0
- data/sig/growsurf_ruby/models/campaign/webhook_delete_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/webhook_delete_response.rbs +17 -0
- data/sig/growsurf_ruby/models/campaign/webhook_event.rbs +28 -0
- data/sig/growsurf_ruby/models/campaign/webhook_list_response.rbs +18 -0
- data/sig/growsurf_ruby/models/campaign/webhook_test_params.rbs +42 -0
- data/sig/growsurf_ruby/models/campaign/webhook_test_response.rbs +54 -0
- data/sig/growsurf_ruby/models/campaign/webhook_update_params.rbs +63 -0
- data/sig/growsurf_ruby/models/campaign.rbs +18 -3
- data/sig/growsurf_ruby/models/campaign_create_params.rbs +0 -14
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_params.rbs +35 -1
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +533 -3
- data/sig/growsurf_ruby/models/campaign_update_params.rbs +1 -53
- data/sig/growsurf_ruby/models/commission_structure.rbs +7 -2
- data/sig/growsurf_ruby/models/referral_flow_screenshots_response.rbs +54 -0
- data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +22 -0
- data/sig/growsurf_ruby/models.rbs +10 -0
- data/sig/growsurf_ruby/resources/account.rbs +38 -0
- data/sig/growsurf_ruby/resources/campaign/design.rbs +20 -0
- data/sig/growsurf_ruby/resources/campaign/emails.rbs +20 -0
- data/sig/growsurf_ruby/resources/campaign/installation.rbs +20 -0
- data/sig/growsurf_ruby/resources/campaign/options.rbs +20 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +37 -0
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +6 -4
- data/sig/growsurf_ruby/resources/campaign/webhooks.rbs +46 -0
- data/sig/growsurf_ruby/resources/campaign.rbs +17 -9
- metadata +95 -2
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Webhooks#create
|
|
7
|
+
class Webhook < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute auto_disabled_due_to_failures
|
|
9
|
+
# Read-only. Whether GrowSurf auto-disabled this webhook after repeated delivery
|
|
10
|
+
# failures.
|
|
11
|
+
#
|
|
12
|
+
# @return [Boolean]
|
|
13
|
+
required :auto_disabled_due_to_failures,
|
|
14
|
+
GrowsurfRuby::Internal::Type::Boolean,
|
|
15
|
+
api_name: :autoDisabledDueToFailures
|
|
16
|
+
|
|
17
|
+
# @!attribute events
|
|
18
|
+
#
|
|
19
|
+
# @return [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>]
|
|
20
|
+
required :events, -> { GrowsurfRuby::Internal::Type::ArrayOf[enum: GrowsurfRuby::Campaign::WebhookEvent] }
|
|
21
|
+
|
|
22
|
+
# @!attribute failure_count
|
|
23
|
+
# Read-only. Consecutive delivery failures.
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer]
|
|
26
|
+
required :failure_count, Integer, api_name: :failureCount
|
|
27
|
+
|
|
28
|
+
# @!attribute id
|
|
29
|
+
# The webhook id (`primary` for the program's primary webhook).
|
|
30
|
+
#
|
|
31
|
+
# @return [String]
|
|
32
|
+
required :id, String
|
|
33
|
+
|
|
34
|
+
# @!attribute is_enabled
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean]
|
|
37
|
+
required :is_enabled, GrowsurfRuby::Internal::Type::Boolean, api_name: :isEnabled
|
|
38
|
+
|
|
39
|
+
# @!attribute last_failure_at
|
|
40
|
+
# Read-only. When the last delivery failure occurred, as a Unix timestamp in
|
|
41
|
+
# milliseconds.
|
|
42
|
+
#
|
|
43
|
+
# @return [Integer, nil]
|
|
44
|
+
optional :last_failure_at, Integer, api_name: :lastFailureAt, nil?: true
|
|
45
|
+
|
|
46
|
+
# @!attribute payload_url
|
|
47
|
+
# The URL that receives webhook deliveries.
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :payload_url, String, api_name: :payloadUrl, nil?: true
|
|
51
|
+
|
|
52
|
+
# @!method initialize(auto_disabled_due_to_failures:, events:, failure_count:, id:, is_enabled:, last_failure_at: nil, payload_url: nil)
|
|
53
|
+
# Some parameter documentations has been truncated, see
|
|
54
|
+
# {GrowsurfRuby::Models::Campaign::Webhook} for more details.
|
|
55
|
+
#
|
|
56
|
+
# @param auto_disabled_due_to_failures [Boolean] Read-only. Whether GrowSurf auto-disabled this webhook after repeated delivery fai
|
|
57
|
+
#
|
|
58
|
+
# @param events [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>]
|
|
59
|
+
#
|
|
60
|
+
# @param failure_count [Integer] Read-only. Consecutive delivery failures.
|
|
61
|
+
#
|
|
62
|
+
# @param id [String] The webhook id (`primary` for the program's primary webhook).
|
|
63
|
+
#
|
|
64
|
+
# @param is_enabled [Boolean]
|
|
65
|
+
#
|
|
66
|
+
# @param last_failure_at [Integer, nil] Read-only. When the last delivery failure occurred, as a Unix timestamp in millise
|
|
67
|
+
#
|
|
68
|
+
# @param payload_url [String, nil] The URL that receives webhook deliveries.
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Webhooks#create
|
|
7
|
+
class WebhookCreateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute payload_url
|
|
12
|
+
# The URL that receives webhook deliveries.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :payload_url, String, api_name: :payloadUrl
|
|
16
|
+
|
|
17
|
+
# @!attribute events
|
|
18
|
+
# The events this webhook is subscribed to. When omitted, it is subscribed to no
|
|
19
|
+
# events.
|
|
20
|
+
#
|
|
21
|
+
# @return [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>, nil]
|
|
22
|
+
optional :events, -> { GrowsurfRuby::Internal::Type::ArrayOf[enum: GrowsurfRuby::Campaign::WebhookEvent] }
|
|
23
|
+
|
|
24
|
+
# @!attribute is_enabled
|
|
25
|
+
#
|
|
26
|
+
# @return [Boolean, nil]
|
|
27
|
+
optional :is_enabled, GrowsurfRuby::Internal::Type::Boolean, api_name: :isEnabled
|
|
28
|
+
|
|
29
|
+
# @!attribute secret
|
|
30
|
+
# Write-only. Used to sign deliveries (the `GrowSurf-Signature` HMAC header). Never
|
|
31
|
+
# returned.
|
|
32
|
+
#
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :secret, String
|
|
35
|
+
|
|
36
|
+
# @!method initialize(payload_url:, events: nil, is_enabled: nil, secret: nil, request_options: {})
|
|
37
|
+
# Some parameter documentations has been truncated, see
|
|
38
|
+
# {GrowsurfRuby::Models::Campaign::WebhookCreateParams} for more details.
|
|
39
|
+
#
|
|
40
|
+
# @param payload_url [String] The URL that receives webhook deliveries.
|
|
41
|
+
#
|
|
42
|
+
# @param events [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>] The events this webhook is subscribed to. When omitted, it is subscribed to no e
|
|
43
|
+
#
|
|
44
|
+
# @param is_enabled [Boolean]
|
|
45
|
+
#
|
|
46
|
+
# @param secret [String] Write-only. Used to sign deliveries (the `GrowSurf-Signature` HMAC header). Never
|
|
47
|
+
#
|
|
48
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Webhooks#delete
|
|
7
|
+
class WebhookDeleteParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute webhook_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :webhook_id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(id:, webhook_id:, request_options: {})
|
|
22
|
+
# @param id [String]
|
|
23
|
+
# @param webhook_id [String]
|
|
24
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Webhooks#delete
|
|
7
|
+
class WebhookDeleteResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute id
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute success
|
|
14
|
+
#
|
|
15
|
+
# @return [Boolean]
|
|
16
|
+
required :success, GrowsurfRuby::Internal::Type::Boolean
|
|
17
|
+
|
|
18
|
+
# @!method initialize(id:, success:)
|
|
19
|
+
# @param id [String]
|
|
20
|
+
# @param success [Boolean]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# A webhook event name.
|
|
7
|
+
module WebhookEvent
|
|
8
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
9
|
+
|
|
10
|
+
PARTICIPANT_REACHED_A_GOAL = :PARTICIPANT_REACHED_A_GOAL
|
|
11
|
+
NEW_PARTICIPANT_ADDED = :NEW_PARTICIPANT_ADDED
|
|
12
|
+
CAMPAIGN_ENDED = :CAMPAIGN_ENDED
|
|
13
|
+
PARTICIPANT_FRAUD_STATUS_UPDATED = :PARTICIPANT_FRAUD_STATUS_UPDATED
|
|
14
|
+
NEW_COMMISSION_ADDED = :NEW_COMMISSION_ADDED
|
|
15
|
+
COMMISSION_ADJUSTED = :COMMISSION_ADJUSTED
|
|
16
|
+
NEW_PAYOUT_ISSUED = :NEW_PAYOUT_ISSUED
|
|
17
|
+
|
|
18
|
+
# @!method self.values
|
|
19
|
+
# @return [Array<Symbol>]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Webhooks#list
|
|
7
|
+
class WebhookListResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute webhooks
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<GrowsurfRuby::Models::Campaign::Webhook>]
|
|
11
|
+
required :webhooks, -> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::Webhook] }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(webhooks:)
|
|
14
|
+
# @param webhooks [Array<GrowsurfRuby::Models::Campaign::Webhook>]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Webhooks#test
|
|
7
|
+
class WebhookTestParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute webhook_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :webhook_id, String
|
|
20
|
+
|
|
21
|
+
# @!attribute event
|
|
22
|
+
# The event to simulate. When omitted, the webhook's first enabled event is used
|
|
23
|
+
# (returns `400` if it has no enabled events).
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent, nil]
|
|
26
|
+
optional :event, enum: -> { GrowsurfRuby::Campaign::WebhookEvent }
|
|
27
|
+
|
|
28
|
+
# @!method initialize(id:, webhook_id:, event: nil, request_options: {})
|
|
29
|
+
# Some parameter documentations has been truncated, see
|
|
30
|
+
# {GrowsurfRuby::Models::Campaign::WebhookTestParams} for more details.
|
|
31
|
+
#
|
|
32
|
+
# @param id [String]
|
|
33
|
+
#
|
|
34
|
+
# @param webhook_id [String]
|
|
35
|
+
#
|
|
36
|
+
# @param event [Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent] The event to simulate. When omitted, the webhook's first enabled event is used (
|
|
37
|
+
#
|
|
38
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Webhooks#test
|
|
7
|
+
class WebhookTestResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute success
|
|
9
|
+
#
|
|
10
|
+
# @return [Boolean]
|
|
11
|
+
required :success, GrowsurfRuby::Internal::Type::Boolean
|
|
12
|
+
|
|
13
|
+
# @!attribute payload
|
|
14
|
+
# The mock event payload that was sent.
|
|
15
|
+
#
|
|
16
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
17
|
+
optional :payload, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
18
|
+
|
|
19
|
+
# @!attribute response
|
|
20
|
+
#
|
|
21
|
+
# @return [GrowsurfRuby::Models::Campaign::WebhookTestResponse::Response, nil]
|
|
22
|
+
optional :response, -> { GrowsurfRuby::Campaign::WebhookTestResponse::Response }
|
|
23
|
+
|
|
24
|
+
# @!method initialize(success:, payload: nil, response: nil)
|
|
25
|
+
# @param success [Boolean]
|
|
26
|
+
#
|
|
27
|
+
# @param payload [Hash{Symbol=>Object}] The mock event payload that was sent.
|
|
28
|
+
#
|
|
29
|
+
# @param response [GrowsurfRuby::Models::Campaign::WebhookTestResponse::Response]
|
|
30
|
+
|
|
31
|
+
# @see GrowsurfRuby::Models::Campaign::WebhookTestResponse#response
|
|
32
|
+
class Response < GrowsurfRuby::Internal::Type::BaseModel
|
|
33
|
+
# @!attribute msg
|
|
34
|
+
#
|
|
35
|
+
# @return [String, nil]
|
|
36
|
+
optional :msg, String
|
|
37
|
+
|
|
38
|
+
# @!attribute status_code
|
|
39
|
+
#
|
|
40
|
+
# @return [Integer, nil]
|
|
41
|
+
optional :status_code, Integer, api_name: :statusCode
|
|
42
|
+
|
|
43
|
+
# @!method initialize(msg: nil, status_code: nil)
|
|
44
|
+
# @param msg [String]
|
|
45
|
+
# @param status_code [Integer]
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Webhooks#update
|
|
7
|
+
class WebhookUpdateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute webhook_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :webhook_id, String
|
|
20
|
+
|
|
21
|
+
# @!attribute events
|
|
22
|
+
#
|
|
23
|
+
# @return [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>, nil]
|
|
24
|
+
optional :events, -> { GrowsurfRuby::Internal::Type::ArrayOf[enum: GrowsurfRuby::Campaign::WebhookEvent] }
|
|
25
|
+
|
|
26
|
+
# @!attribute is_enabled
|
|
27
|
+
#
|
|
28
|
+
# @return [Boolean, nil]
|
|
29
|
+
optional :is_enabled, GrowsurfRuby::Internal::Type::Boolean, api_name: :isEnabled
|
|
30
|
+
|
|
31
|
+
# @!attribute payload_url
|
|
32
|
+
#
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :payload_url, String, api_name: :payloadUrl
|
|
35
|
+
|
|
36
|
+
# @!attribute secret
|
|
37
|
+
# Write-only.
|
|
38
|
+
#
|
|
39
|
+
# @return [String, nil]
|
|
40
|
+
optional :secret, String
|
|
41
|
+
|
|
42
|
+
# @!method initialize(id:, webhook_id:, events: nil, is_enabled: nil, payload_url: nil, secret: nil, request_options: {})
|
|
43
|
+
# @param id [String]
|
|
44
|
+
#
|
|
45
|
+
# @param webhook_id [String]
|
|
46
|
+
#
|
|
47
|
+
# @param events [Array<Symbol, GrowsurfRuby::Models::Campaign::WebhookEvent>]
|
|
48
|
+
#
|
|
49
|
+
# @param is_enabled [Boolean]
|
|
50
|
+
#
|
|
51
|
+
# @param payload_url [String]
|
|
52
|
+
#
|
|
53
|
+
# @param secret [String] Write-only.
|
|
54
|
+
#
|
|
55
|
+
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -108,6 +108,9 @@ module GrowsurfRuby
|
|
|
108
108
|
optional :conversions_required, Integer, api_name: :conversionsRequired, nil?: true
|
|
109
109
|
|
|
110
110
|
# @!attribute coupon_code
|
|
111
|
+
# Legacy static coupon code shown to the referrer in the reward-won email and
|
|
112
|
+
# webhook. Display text only; superseded by a connected billing integration's
|
|
113
|
+
# issued coupon when one exists.
|
|
111
114
|
#
|
|
112
115
|
# @return [String, nil]
|
|
113
116
|
optional :coupon_code, String, api_name: :couponCode, nil?: true
|
|
@@ -137,16 +140,22 @@ module GrowsurfRuby
|
|
|
137
140
|
nil?: true
|
|
138
141
|
|
|
139
142
|
# @!attribute next_milestone_prefix
|
|
143
|
+
# Text shown before a participant's referral count in milestone-progress copy.
|
|
144
|
+
# Applies to `MILESTONE` rewards.
|
|
140
145
|
#
|
|
141
146
|
# @return [String, nil]
|
|
142
147
|
optional :next_milestone_prefix, String, api_name: :nextMilestonePrefix, nil?: true
|
|
143
148
|
|
|
144
149
|
# @!attribute next_milestone_suffix
|
|
150
|
+
# Text shown after a participant's referral count in milestone-progress copy.
|
|
151
|
+
# Applies to `MILESTONE` rewards.
|
|
145
152
|
#
|
|
146
153
|
# @return [String, nil]
|
|
147
154
|
optional :next_milestone_suffix, String, api_name: :nextMilestoneSuffix, nil?: true
|
|
148
155
|
|
|
149
156
|
# @!attribute number_of_winners
|
|
157
|
+
# The number of winners (`LEADERBOARD` rewards only). With `limitDuration`
|
|
158
|
+
# `PER_MONTH` this many win each month, otherwise this many win in total.
|
|
150
159
|
#
|
|
151
160
|
# @return [Integer, nil]
|
|
152
161
|
optional :number_of_winners, Integer, api_name: :numberOfWinners, nil?: true
|
|
@@ -156,6 +165,14 @@ module GrowsurfRuby
|
|
|
156
165
|
# @return [Integer, nil]
|
|
157
166
|
optional :order, Integer, nil?: true
|
|
158
167
|
|
|
168
|
+
# @!attribute referral_coupon_code
|
|
169
|
+
# Legacy static coupon code shown to the referred friend (double-sided rewards)
|
|
170
|
+
# in the reward-won email and webhook. Display text only; superseded by a
|
|
171
|
+
# connected billing integration's issued coupon when one exists.
|
|
172
|
+
#
|
|
173
|
+
# @return [String, nil]
|
|
174
|
+
optional :referral_coupon_code, String, api_name: :referralCouponCode, nil?: true
|
|
175
|
+
|
|
159
176
|
# @!attribute referral_description
|
|
160
177
|
#
|
|
161
178
|
# @return [String, nil]
|
|
@@ -168,7 +185,22 @@ module GrowsurfRuby
|
|
|
168
185
|
GrowsurfRuby::Internal::Type::Boolean,
|
|
169
186
|
api_name: :referredRewardUpfront
|
|
170
187
|
|
|
171
|
-
# @!
|
|
188
|
+
# @!attribute referred_value
|
|
189
|
+
# Tax valuation for the referred friend's side of a double-sided reward.
|
|
190
|
+
#
|
|
191
|
+
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
192
|
+
optional :referred_value,
|
|
193
|
+
-> { GrowsurfRuby::RewardTaxValuation },
|
|
194
|
+
api_name: :referredValue,
|
|
195
|
+
nil?: true
|
|
196
|
+
|
|
197
|
+
# @!attribute value
|
|
198
|
+
# Tax valuation for the reward (the referrer's side of a double-sided reward).
|
|
199
|
+
#
|
|
200
|
+
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
201
|
+
optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
|
|
202
|
+
|
|
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)
|
|
172
204
|
# @param id [String]
|
|
173
205
|
#
|
|
174
206
|
# @param is_unlimited [Boolean]
|
|
@@ -181,7 +213,7 @@ module GrowsurfRuby
|
|
|
181
213
|
#
|
|
182
214
|
# @param conversions_required [Integer, nil]
|
|
183
215
|
#
|
|
184
|
-
# @param coupon_code [String, nil]
|
|
216
|
+
# @param coupon_code [String, nil] Legacy static coupon code shown to the referrer in the reward-won email and web
|
|
185
217
|
#
|
|
186
218
|
# @param description [String, nil]
|
|
187
219
|
#
|
|
@@ -191,17 +223,23 @@ module GrowsurfRuby
|
|
|
191
223
|
#
|
|
192
224
|
# @param limit_duration [Symbol, GrowsurfRuby::Models::CampaignAPI::Reward::LimitDuration, nil]
|
|
193
225
|
#
|
|
194
|
-
# @param next_milestone_prefix [String, nil]
|
|
226
|
+
# @param next_milestone_prefix [String, nil] Text shown before a participant's referral count in milestone-progress copy. App
|
|
195
227
|
#
|
|
196
|
-
# @param next_milestone_suffix [String, nil]
|
|
228
|
+
# @param next_milestone_suffix [String, nil] Text shown after a participant's referral count in milestone-progress copy. Appl
|
|
197
229
|
#
|
|
198
|
-
# @param number_of_winners [Integer, nil]
|
|
230
|
+
# @param number_of_winners [Integer, nil] The number of winners (`LEADERBOARD` rewards only). With `limitDuration` `PER_MO
|
|
199
231
|
#
|
|
200
232
|
# @param order [Integer, nil]
|
|
201
233
|
#
|
|
234
|
+
# @param referral_coupon_code [String, nil] Legacy static coupon code shown to the referred friend (double-sided rewards) in
|
|
235
|
+
#
|
|
202
236
|
# @param referral_description [String, nil]
|
|
203
237
|
#
|
|
204
238
|
# @param referred_reward_upfront [Boolean]
|
|
239
|
+
#
|
|
240
|
+
# @param referred_value [GrowsurfRuby::Models::RewardTaxValuation, nil] Tax valuation for the referred friend's side of a double-sided reward.
|
|
241
|
+
#
|
|
242
|
+
# @param value [GrowsurfRuby::Models::RewardTaxValuation, nil] Tax valuation for the reward (the referrer's side of a double-sided reward).
|
|
205
243
|
|
|
206
244
|
# @see GrowsurfRuby::Models::CampaignAPI::Reward#type
|
|
207
245
|
module Type
|
|
@@ -27,28 +27,18 @@ module GrowsurfRuby
|
|
|
27
27
|
# @return [String, nil]
|
|
28
28
|
optional :currency_iso, String, api_name: :currencyISO
|
|
29
29
|
|
|
30
|
-
# @!attribute goal
|
|
31
|
-
#
|
|
32
|
-
# @return [String, nil]
|
|
33
|
-
optional :goal, String
|
|
34
|
-
|
|
35
30
|
# @!attribute name
|
|
36
31
|
#
|
|
37
32
|
# @return [String, nil]
|
|
38
33
|
optional :name, String
|
|
39
34
|
|
|
40
|
-
# @!attribute options
|
|
41
|
-
#
|
|
42
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
43
|
-
optional :options, GrowsurfRuby::Internal::Type::HashOf[GrowsurfRuby::Internal::Type::Unknown]
|
|
44
|
-
|
|
45
35
|
# @!attribute rewards
|
|
46
36
|
#
|
|
47
37
|
# @return [Array<GrowsurfRuby::Models::Campaign::RewardCreateParams>, nil]
|
|
48
38
|
optional :rewards,
|
|
49
39
|
-> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::RewardCreateParams] }
|
|
50
40
|
|
|
51
|
-
# @!method initialize(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil,
|
|
41
|
+
# @!method initialize(type:, company_logo_image_url: nil, company_name: nil, currency_iso: nil, name: nil, rewards: nil, request_options: {})
|
|
52
42
|
# @param type [Symbol, GrowsurfRuby::Models::CampaignCreateParams::Type]
|
|
53
43
|
#
|
|
54
44
|
# @param company_logo_image_url [String]
|
|
@@ -57,12 +47,8 @@ module GrowsurfRuby
|
|
|
57
47
|
#
|
|
58
48
|
# @param currency_iso [String]
|
|
59
49
|
#
|
|
60
|
-
# @param goal [String]
|
|
61
|
-
#
|
|
62
50
|
# @param name [String]
|
|
63
51
|
#
|
|
64
|
-
# @param options [Hash{Symbol=>Object}]
|
|
65
|
-
#
|
|
66
52
|
# @param rewards [Array<GrowsurfRuby::Models::Campaign::RewardCreateParams>]
|
|
67
53
|
#
|
|
68
54
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -25,6 +25,23 @@ module GrowsurfRuby
|
|
|
25
25
|
# @return [Integer, nil]
|
|
26
26
|
optional :end_date, Integer
|
|
27
27
|
|
|
28
|
+
# @!attribute include
|
|
29
|
+
# Comma-separated list of optional enrichments (opt-in to keep the default response
|
|
30
|
+
# lean): `previousPeriod` adds totals for the equal-length window immediately before
|
|
31
|
+
# the requested one; `statusCounts` adds reward (and, for affiliate programs,
|
|
32
|
+
# affiliate/commission/payout) status breakdowns; `rates` adds derived referral
|
|
33
|
+
# rates.
|
|
34
|
+
#
|
|
35
|
+
# @return [String, nil]
|
|
36
|
+
optional :include, String
|
|
37
|
+
|
|
38
|
+
# @!attribute interval
|
|
39
|
+
# When set to `day`, `week`, or `month`, the response also includes a `series` array
|
|
40
|
+
# with per-period totals. Defaults to `total` (no series).
|
|
41
|
+
#
|
|
42
|
+
# @return [Symbol, GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams::Interval, nil]
|
|
43
|
+
optional :interval, enum: -> { GrowsurfRuby::CampaignRetrieveAnalyticsParams::Interval }
|
|
44
|
+
|
|
28
45
|
# @!attribute start_date
|
|
29
46
|
# Start date of the analytics timeframe as a Unix timestamp in milliseconds.
|
|
30
47
|
# Required if `days` is not set.
|
|
@@ -32,7 +49,7 @@ module GrowsurfRuby
|
|
|
32
49
|
# @return [Integer, nil]
|
|
33
50
|
optional :start_date, Integer
|
|
34
51
|
|
|
35
|
-
# @!method initialize(id:, days: nil, end_date: nil, start_date: nil, request_options: {})
|
|
52
|
+
# @!method initialize(id:, days: nil, end_date: nil, include: nil, interval: nil, start_date: nil, request_options: {})
|
|
36
53
|
# Some parameter documentations has been truncated, see
|
|
37
54
|
# {GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams} for more details.
|
|
38
55
|
#
|
|
@@ -42,9 +59,27 @@ module GrowsurfRuby
|
|
|
42
59
|
#
|
|
43
60
|
# @param end_date [Integer] End date of the analytics timeframe as a Unix timestamp in milliseconds. Require
|
|
44
61
|
#
|
|
62
|
+
# @param include [String] Comma-separated list of optional enrichments (opt-in to keep the default response
|
|
63
|
+
#
|
|
64
|
+
# @param interval [Symbol, GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams::Interval] When set to `day`, `week`, or `month`, the response also includes a `series` array
|
|
65
|
+
#
|
|
45
66
|
# @param start_date [Integer] Start date of the analytics timeframe as a Unix timestamp in milliseconds. Requi
|
|
46
67
|
#
|
|
47
68
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
69
|
+
|
|
70
|
+
# When set to `day`, `week`, or `month`, the response also includes a `series` array
|
|
71
|
+
# with per-period totals. Defaults to `total` (no series).
|
|
72
|
+
module Interval
|
|
73
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
74
|
+
|
|
75
|
+
DAY = :day
|
|
76
|
+
WEEK = :week
|
|
77
|
+
MONTH = :month
|
|
78
|
+
TOTAL = :total
|
|
79
|
+
|
|
80
|
+
# @!method self.values
|
|
81
|
+
# @return [Array<Symbol>]
|
|
82
|
+
end
|
|
48
83
|
end
|
|
49
84
|
end
|
|
50
85
|
end
|