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
|
@@ -29,54 +29,12 @@ module GrowsurfRuby
|
|
|
29
29
|
sig { params(company_name: String).void }
|
|
30
30
|
attr_writer :company_name
|
|
31
31
|
|
|
32
|
-
sig { returns(T.nilable(String)) }
|
|
33
|
-
attr_reader :currency_iso
|
|
34
|
-
|
|
35
|
-
sig { params(currency_iso: String).void }
|
|
36
|
-
attr_writer :currency_iso
|
|
37
|
-
|
|
38
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
39
|
-
attr_reader :design
|
|
40
|
-
|
|
41
|
-
sig { params(design: T::Hash[Symbol, T.anything]).void }
|
|
42
|
-
attr_writer :design
|
|
43
|
-
|
|
44
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
45
|
-
attr_reader :emails
|
|
46
|
-
|
|
47
|
-
sig { params(emails: T::Hash[Symbol, T.anything]).void }
|
|
48
|
-
attr_writer :emails
|
|
49
|
-
|
|
50
|
-
sig { returns(T.nilable(String)) }
|
|
51
|
-
attr_reader :goal
|
|
52
|
-
|
|
53
|
-
sig { params(goal: String).void }
|
|
54
|
-
attr_writer :goal
|
|
55
|
-
|
|
56
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
57
|
-
attr_reader :installation
|
|
58
|
-
|
|
59
|
-
sig { params(installation: T::Hash[Symbol, T.anything]).void }
|
|
60
|
-
attr_writer :installation
|
|
61
|
-
|
|
62
32
|
sig { returns(T.nilable(String)) }
|
|
63
33
|
attr_reader :name
|
|
64
34
|
|
|
65
35
|
sig { params(name: String).void }
|
|
66
36
|
attr_writer :name
|
|
67
37
|
|
|
68
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
69
|
-
attr_reader :notifications
|
|
70
|
-
|
|
71
|
-
sig { params(notifications: T::Hash[Symbol, T.anything]).void }
|
|
72
|
-
attr_writer :notifications
|
|
73
|
-
|
|
74
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
75
|
-
attr_reader :options
|
|
76
|
-
|
|
77
|
-
sig { params(options: T::Hash[Symbol, T.anything]).void }
|
|
78
|
-
attr_writer :options
|
|
79
|
-
|
|
80
38
|
sig do
|
|
81
39
|
returns(T.nilable(GrowsurfRuby::CampaignUpdateParams::Status::OrSymbol))
|
|
82
40
|
end
|
|
@@ -94,14 +52,7 @@ module GrowsurfRuby
|
|
|
94
52
|
id: String,
|
|
95
53
|
company_logo_image_url: String,
|
|
96
54
|
company_name: String,
|
|
97
|
-
currency_iso: String,
|
|
98
|
-
design: T::Hash[Symbol, T.anything],
|
|
99
|
-
emails: T::Hash[Symbol, T.anything],
|
|
100
|
-
goal: String,
|
|
101
|
-
installation: T::Hash[Symbol, T.anything],
|
|
102
55
|
name: String,
|
|
103
|
-
notifications: T::Hash[Symbol, T.anything],
|
|
104
|
-
options: T::Hash[Symbol, T.anything],
|
|
105
56
|
status: GrowsurfRuby::CampaignUpdateParams::Status::OrSymbol,
|
|
106
57
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
107
58
|
).returns(T.attached_class)
|
|
@@ -110,14 +61,7 @@ module GrowsurfRuby
|
|
|
110
61
|
id:,
|
|
111
62
|
company_logo_image_url: nil,
|
|
112
63
|
company_name: nil,
|
|
113
|
-
currency_iso: nil,
|
|
114
|
-
design: nil,
|
|
115
|
-
emails: nil,
|
|
116
|
-
goal: nil,
|
|
117
|
-
installation: nil,
|
|
118
64
|
name: nil,
|
|
119
|
-
notifications: nil,
|
|
120
|
-
options: nil,
|
|
121
65
|
status: nil,
|
|
122
66
|
request_options: {}
|
|
123
67
|
)
|
|
@@ -129,14 +73,7 @@ module GrowsurfRuby
|
|
|
129
73
|
id: String,
|
|
130
74
|
company_logo_image_url: String,
|
|
131
75
|
company_name: String,
|
|
132
|
-
currency_iso: String,
|
|
133
|
-
design: T::Hash[Symbol, T.anything],
|
|
134
|
-
emails: T::Hash[Symbol, T.anything],
|
|
135
|
-
goal: String,
|
|
136
|
-
installation: T::Hash[Symbol, T.anything],
|
|
137
76
|
name: String,
|
|
138
|
-
notifications: T::Hash[Symbol, T.anything],
|
|
139
|
-
options: T::Hash[Symbol, T.anything],
|
|
140
77
|
status: GrowsurfRuby::CampaignUpdateParams::Status::OrSymbol,
|
|
141
78
|
request_options: GrowsurfRuby::RequestOptions
|
|
142
79
|
}
|
|
@@ -154,16 +91,6 @@ module GrowsurfRuby
|
|
|
154
91
|
end
|
|
155
92
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
156
93
|
|
|
157
|
-
DRAFT =
|
|
158
|
-
T.let(
|
|
159
|
-
:DRAFT,
|
|
160
|
-
GrowsurfRuby::CampaignUpdateParams::Status::TaggedSymbol
|
|
161
|
-
)
|
|
162
|
-
PENDING =
|
|
163
|
-
T.let(
|
|
164
|
-
:PENDING,
|
|
165
|
-
GrowsurfRuby::CampaignUpdateParams::Status::TaggedSymbol
|
|
166
|
-
)
|
|
167
94
|
IN_PROGRESS =
|
|
168
95
|
T.let(
|
|
169
96
|
:IN_PROGRESS,
|
|
@@ -174,11 +101,6 @@ module GrowsurfRuby
|
|
|
174
101
|
:COMPLETE,
|
|
175
102
|
GrowsurfRuby::CampaignUpdateParams::Status::TaggedSymbol
|
|
176
103
|
)
|
|
177
|
-
CANCELLED =
|
|
178
|
-
T.let(
|
|
179
|
-
:CANCELLED,
|
|
180
|
-
GrowsurfRuby::CampaignUpdateParams::Status::TaggedSymbol
|
|
181
|
-
)
|
|
182
104
|
|
|
183
105
|
sig do
|
|
184
106
|
override.returns(
|
|
@@ -14,6 +14,9 @@ module GrowsurfRuby
|
|
|
14
14
|
sig { returns(T.nilable(Integer)) }
|
|
15
15
|
attr_accessor :amount
|
|
16
16
|
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_accessor :amount_iso
|
|
19
|
+
|
|
17
20
|
sig { returns(T.nilable(T::Boolean)) }
|
|
18
21
|
attr_accessor :approval_required
|
|
19
22
|
|
|
@@ -75,6 +78,7 @@ module GrowsurfRuby
|
|
|
75
78
|
sig do
|
|
76
79
|
params(
|
|
77
80
|
amount: T.nilable(Integer),
|
|
81
|
+
amount_iso: T.nilable(String),
|
|
78
82
|
approval_required: T.nilable(T::Boolean),
|
|
79
83
|
duration: T.nilable(String),
|
|
80
84
|
duration_in_months: T.nilable(Integer),
|
|
@@ -97,6 +101,7 @@ module GrowsurfRuby
|
|
|
97
101
|
end
|
|
98
102
|
def self.new(
|
|
99
103
|
amount: nil,
|
|
104
|
+
amount_iso: nil,
|
|
100
105
|
approval_required: nil,
|
|
101
106
|
duration: nil,
|
|
102
107
|
duration_in_months: nil,
|
|
@@ -122,6 +127,7 @@ module GrowsurfRuby
|
|
|
122
127
|
override.returns(
|
|
123
128
|
{
|
|
124
129
|
amount: T.nilable(Integer),
|
|
130
|
+
amount_iso: T.nilable(String),
|
|
125
131
|
approval_required: T.nilable(T::Boolean),
|
|
126
132
|
duration: T.nilable(String),
|
|
127
133
|
duration_in_months: T.nilable(Integer),
|
|
@@ -158,8 +164,8 @@ module GrowsurfRuby
|
|
|
158
164
|
|
|
159
165
|
PERCENT =
|
|
160
166
|
T.let(:PERCENT, GrowsurfRuby::CommissionStructure::Type::TaggedSymbol)
|
|
161
|
-
|
|
162
|
-
T.let(:
|
|
167
|
+
FIXED =
|
|
168
|
+
T.let(:FIXED, GrowsurfRuby::CommissionStructure::Type::TaggedSymbol)
|
|
163
169
|
|
|
164
170
|
sig do
|
|
165
171
|
override.returns(
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class ReferralFlowScreenshotsResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
GrowsurfRuby::Models::ReferralFlowScreenshotsResponse,
|
|
10
|
+
GrowsurfRuby::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(GrowsurfRuby::Models::ReferralFlowScreenshotsResponse::ReferralFlowScreenshot) }
|
|
15
|
+
attr_reader :referrer
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
referrer: GrowsurfRuby::Models::ReferralFlowScreenshotsResponse::ReferralFlowScreenshot::OrHash
|
|
20
|
+
).void
|
|
21
|
+
end
|
|
22
|
+
attr_writer :referrer
|
|
23
|
+
|
|
24
|
+
sig { returns(GrowsurfRuby::Models::ReferralFlowScreenshotsResponse::ReferralFlowScreenshot) }
|
|
25
|
+
attr_reader :referred_friend
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
referred_friend: GrowsurfRuby::Models::ReferralFlowScreenshotsResponse::ReferralFlowScreenshot::OrHash
|
|
30
|
+
).void
|
|
31
|
+
end
|
|
32
|
+
attr_writer :referred_friend
|
|
33
|
+
|
|
34
|
+
sig { returns(Integer) }
|
|
35
|
+
attr_accessor :generated_at
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
params(
|
|
39
|
+
referrer: GrowsurfRuby::Models::ReferralFlowScreenshotsResponse::ReferralFlowScreenshot::OrHash,
|
|
40
|
+
referred_friend: GrowsurfRuby::Models::ReferralFlowScreenshotsResponse::ReferralFlowScreenshot::OrHash,
|
|
41
|
+
generated_at: Integer
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(referrer:, referred_friend:, generated_at:)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
override.returns(
|
|
49
|
+
{
|
|
50
|
+
referrer: GrowsurfRuby::Models::ReferralFlowScreenshotsResponse::ReferralFlowScreenshot,
|
|
51
|
+
referred_friend: GrowsurfRuby::Models::ReferralFlowScreenshotsResponse::ReferralFlowScreenshot,
|
|
52
|
+
generated_at: Integer
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
def to_hash
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
class ReferralFlowScreenshot < GrowsurfRuby::Internal::Type::BaseModel
|
|
60
|
+
OrHash =
|
|
61
|
+
T.type_alias do
|
|
62
|
+
T.any(
|
|
63
|
+
GrowsurfRuby::Models::ReferralFlowScreenshotsResponse::ReferralFlowScreenshot,
|
|
64
|
+
GrowsurfRuby::Internal::AnyHash
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
sig { returns(String) }
|
|
69
|
+
attr_accessor :view
|
|
70
|
+
|
|
71
|
+
sig { returns(String) }
|
|
72
|
+
attr_accessor :url
|
|
73
|
+
|
|
74
|
+
sig { returns(Integer) }
|
|
75
|
+
attr_accessor :width
|
|
76
|
+
|
|
77
|
+
sig { returns(Integer) }
|
|
78
|
+
attr_accessor :height
|
|
79
|
+
|
|
80
|
+
sig do
|
|
81
|
+
params(view: String, url: String, width: Integer, height: Integer).returns(T.attached_class)
|
|
82
|
+
end
|
|
83
|
+
def self.new(view:, url:, width:, height:)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
sig do
|
|
87
|
+
override.returns({view: String, url: String, width: Integer, height: Integer})
|
|
88
|
+
end
|
|
89
|
+
def to_hash
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
# Tax valuation settings for a reward. Only relevant when the program collects
|
|
6
|
+
# tax documentation.
|
|
7
|
+
class RewardTaxValuation < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
OrHash =
|
|
9
|
+
T.type_alias do
|
|
10
|
+
T.any(
|
|
11
|
+
GrowsurfRuby::RewardTaxValuation,
|
|
12
|
+
GrowsurfRuby::Internal::AnyHash
|
|
13
|
+
)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Manual fair-market value in USD (major units) used as the fallback when the
|
|
17
|
+
# reward value cannot be resolved automatically. `null` = no manual value.
|
|
18
|
+
sig { returns(T.nilable(Float)) }
|
|
19
|
+
attr_accessor :fair_market_value_usd
|
|
20
|
+
|
|
21
|
+
# Whether the reward's value counts toward 1099 thresholds/totals. `null` = use
|
|
22
|
+
# the smart default for the reward's source.
|
|
23
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
24
|
+
attr_accessor :is_tax_reportable
|
|
25
|
+
|
|
26
|
+
# Tax valuation settings for a reward. Only relevant when the program collects
|
|
27
|
+
# tax documentation.
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
fair_market_value_usd: T.nilable(Float),
|
|
31
|
+
is_tax_reportable: T.nilable(T::Boolean)
|
|
32
|
+
).returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
# Manual fair-market value in USD (major units) used as the fallback when the
|
|
36
|
+
# reward value cannot be resolved automatically. `null` = no manual value.
|
|
37
|
+
fair_market_value_usd: nil,
|
|
38
|
+
# Whether the reward's value counts toward 1099 thresholds/totals. `null` = use
|
|
39
|
+
# the smart default for the reward's source.
|
|
40
|
+
is_tax_reportable: nil
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
override.returns(
|
|
46
|
+
{
|
|
47
|
+
fair_market_value_usd: T.nilable(Float),
|
|
48
|
+
is_tax_reportable: T.nilable(T::Boolean)
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
def to_hash
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# typed: strong
|
|
2
2
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
|
+
Account = GrowsurfRuby::Models::Account
|
|
5
|
+
|
|
6
|
+
AccountCreateParams = GrowsurfRuby::Models::AccountCreateParams
|
|
7
|
+
|
|
8
|
+
AccountUpdateParams = GrowsurfRuby::Models::AccountUpdateParams
|
|
9
|
+
|
|
4
10
|
Campaign = GrowsurfRuby::Models::Campaign
|
|
5
11
|
|
|
6
12
|
CampaignAPI = GrowsurfRuby::Models::CampaignAPI
|
|
@@ -42,4 +48,9 @@ module GrowsurfRuby
|
|
|
42
48
|
ParticipantPayoutList = GrowsurfRuby::Models::ParticipantPayoutList
|
|
43
49
|
|
|
44
50
|
ReferralList = GrowsurfRuby::Models::ReferralList
|
|
51
|
+
|
|
52
|
+
ReferralFlowScreenshotsResponse =
|
|
53
|
+
GrowsurfRuby::Models::ReferralFlowScreenshotsResponse
|
|
54
|
+
|
|
55
|
+
RewardTaxValuation = GrowsurfRuby::Models::RewardTaxValuation
|
|
45
56
|
end
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Resources
|
|
5
|
+
class Account
|
|
6
|
+
# Creates a new GrowSurf account. This is the only endpoint that does not require
|
|
7
|
+
# an API key. The response includes an API key for the new account, but the key is
|
|
8
|
+
# locked until the account's email address is verified: authenticated endpoints
|
|
9
|
+
# outside the `Accounts` group return a `403` with error code
|
|
10
|
+
# `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
|
|
11
|
+
# /account/verification-email`, then retry). A welcome email is sent to the
|
|
12
|
+
# address with the verification link and a set-password link for dashboard
|
|
13
|
+
# access. Accounts whose email is never verified are deleted automatically after
|
|
14
|
+
# 7 days. For security, the API key is rotated the first time the account owner
|
|
15
|
+
# signs in to the GrowSurf dashboard. Some actions (such as emailing
|
|
16
|
+
# participants) additionally require the GrowSurf team to verify the account
|
|
17
|
+
# first. By creating an account you agree, on behalf of the account holder, to
|
|
18
|
+
# GrowSurf's [Terms of Service](https://growsurf.com/terms) and
|
|
19
|
+
# [Privacy Policy](https://growsurf.com/privacy).
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
email: String,
|
|
23
|
+
company: String,
|
|
24
|
+
first_name: String,
|
|
25
|
+
last_name: String,
|
|
26
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
27
|
+
).returns(GrowsurfRuby::Models::AccountCreateResponse)
|
|
28
|
+
end
|
|
29
|
+
def create(
|
|
30
|
+
# The email address for the new account. Personal emails and disposable email addresses are not accepted.
|
|
31
|
+
email:,
|
|
32
|
+
company: nil,
|
|
33
|
+
first_name: nil,
|
|
34
|
+
last_name: nil,
|
|
35
|
+
request_options: {}
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Retrieves the account that owns the API key: profile and GrowSurf-team
|
|
40
|
+
# verification state.
|
|
41
|
+
# `verificationStatus` is `VERIFIED` once the GrowSurf team has verified the account
|
|
42
|
+
# — this is required before you can send participant emails from a program.
|
|
43
|
+
sig do
|
|
44
|
+
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
45
|
+
GrowsurfRuby::Account
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
def retrieve(request_options: {})
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Updates your own account profile (`firstName`, `lastName`, `company`). Any other
|
|
52
|
+
# property is rejected with a `400` — in particular, the account `email` cannot be
|
|
53
|
+
# changed via the API, and billing/subscription is not editable here.
|
|
54
|
+
sig do
|
|
55
|
+
params(
|
|
56
|
+
company: String,
|
|
57
|
+
first_name: String,
|
|
58
|
+
last_name: String,
|
|
59
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
60
|
+
).returns(GrowsurfRuby::Account)
|
|
61
|
+
end
|
|
62
|
+
def update(
|
|
63
|
+
company: nil,
|
|
64
|
+
first_name: nil,
|
|
65
|
+
last_name: nil,
|
|
66
|
+
request_options: {}
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Generates a new API key and immediately revokes the old one. The key used to make
|
|
71
|
+
# this request stops working as soon as the response is returned — update every
|
|
72
|
+
# integration that used the old key with the new one. The account owner is
|
|
73
|
+
# notified by email whenever the key is rotated.
|
|
74
|
+
sig do
|
|
75
|
+
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
76
|
+
GrowsurfRuby::Models::AccountRotateAPIKeyResponse
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
def rotate_api_key(request_options: {})
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Requests GrowSurf-team verification of your account (required before a program can
|
|
83
|
+
# email its participants). Idempotent — calling it again while a request is pending
|
|
84
|
+
# does not create a duplicate. Returns the account with its updated
|
|
85
|
+
# `verificationStatus`.
|
|
86
|
+
sig do
|
|
87
|
+
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
88
|
+
GrowsurfRuby::Account
|
|
89
|
+
)
|
|
90
|
+
end
|
|
91
|
+
def request_verification(request_options: {})
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Resends the email-verification email to the account's email address. A `200`
|
|
95
|
+
# with `status: SENT` is only returned when an email was actually dispatched.
|
|
96
|
+
# Returns a `400` if the email is already verified, or a `429` if a verification
|
|
97
|
+
# email was sent too recently — wait a moment, then retry.
|
|
98
|
+
sig do
|
|
99
|
+
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
100
|
+
GrowsurfRuby::Models::AccountResendVerificationEmailResponse
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
def resend_verification_email(request_options: {})
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @api private
|
|
107
|
+
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
108
|
+
def self.new(client:)
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Resources
|
|
5
|
+
class Campaign
|
|
6
|
+
class Design
|
|
7
|
+
# Retrieves a program's design configuration — the same surface as the dashboard
|
|
8
|
+
# Program Editor's **Design** tab. This is a large, deeply nested object whose
|
|
9
|
+
# available fields depend on the program type; the response includes every field
|
|
10
|
+
# and its current value, which is the same shape you send back on update.
|
|
11
|
+
sig do
|
|
12
|
+
params(
|
|
13
|
+
id: String,
|
|
14
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
15
|
+
).returns(T::Hash[Symbol, T.anything])
|
|
16
|
+
end
|
|
17
|
+
def retrieve(
|
|
18
|
+
# GrowSurf program ID.
|
|
19
|
+
id,
|
|
20
|
+
request_options: {}
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Updates a program's design configuration. Only the fields you send are changed;
|
|
25
|
+
# anything you leave out is untouched (arrays such as `signup.fields` replace
|
|
26
|
+
# wholesale). The request body is a partial design object. To see the full object
|
|
27
|
+
# with every field and its current value, `GET` this resource, then `PATCH` back
|
|
28
|
+
# only the fields you want to change.
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
id: String,
|
|
32
|
+
body: T::Hash[Symbol, T.anything],
|
|
33
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
34
|
+
).returns(T::Hash[Symbol, T.anything])
|
|
35
|
+
end
|
|
36
|
+
def update(
|
|
37
|
+
# GrowSurf program ID.
|
|
38
|
+
id,
|
|
39
|
+
# Partial design configuration to merge.
|
|
40
|
+
body,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# @api private
|
|
46
|
+
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
47
|
+
def self.new(client:)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Resources
|
|
5
|
+
class Campaign
|
|
6
|
+
class Emails
|
|
7
|
+
# Retrieves a program's email configuration — the same surface as the dashboard
|
|
8
|
+
# Program Editor's **Emails** tab. To see the full object with every field and its
|
|
9
|
+
# current value, `GET` this resource, then `PATCH` back only the fields you want to
|
|
10
|
+
# change.
|
|
11
|
+
sig do
|
|
12
|
+
params(
|
|
13
|
+
id: String,
|
|
14
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
15
|
+
).returns(T::Hash[Symbol, T.anything])
|
|
16
|
+
end
|
|
17
|
+
def retrieve(
|
|
18
|
+
# GrowSurf program ID.
|
|
19
|
+
id,
|
|
20
|
+
request_options: {}
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Updates a program's email configuration. Only the fields you send are changed;
|
|
25
|
+
# anything you leave out is untouched. The request body is a partial email
|
|
26
|
+
# configuration object. To see the full object with every field and its current
|
|
27
|
+
# value, `GET` this resource, then `PATCH` back only the fields you want to change.
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
id: String,
|
|
31
|
+
body: T::Hash[Symbol, T.anything],
|
|
32
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
33
|
+
).returns(T::Hash[Symbol, T.anything])
|
|
34
|
+
end
|
|
35
|
+
def update(
|
|
36
|
+
# GrowSurf program ID.
|
|
37
|
+
id,
|
|
38
|
+
# Partial email configuration to merge.
|
|
39
|
+
body,
|
|
40
|
+
request_options: {}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# @api private
|
|
45
|
+
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
46
|
+
def self.new(client:)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Resources
|
|
5
|
+
class Campaign
|
|
6
|
+
class Installation
|
|
7
|
+
# Retrieves a program's installation configuration — the same surface as the
|
|
8
|
+
# dashboard Program Editor's **Installation** tab. This is a nested object whose
|
|
9
|
+
# available fields depend on the program type. To see the full object with every
|
|
10
|
+
# field and its current value, `GET` this resource, then `PATCH` back only the
|
|
11
|
+
# fields you want to change.
|
|
12
|
+
sig do
|
|
13
|
+
params(
|
|
14
|
+
id: String,
|
|
15
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
16
|
+
).returns(T::Hash[Symbol, T.anything])
|
|
17
|
+
end
|
|
18
|
+
def retrieve(
|
|
19
|
+
# GrowSurf program ID.
|
|
20
|
+
id,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Updates a program's installation configuration. Only the fields you send are
|
|
26
|
+
# changed; anything you leave out is untouched. The request body is a partial
|
|
27
|
+
# installation configuration object. To see the full object with every field and
|
|
28
|
+
# its current value, `GET` this resource, then `PATCH` back only the fields you
|
|
29
|
+
# want to change.
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
id: String,
|
|
33
|
+
body: T::Hash[Symbol, T.anything],
|
|
34
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
35
|
+
).returns(T::Hash[Symbol, T.anything])
|
|
36
|
+
end
|
|
37
|
+
def update(
|
|
38
|
+
# GrowSurf program ID.
|
|
39
|
+
id,
|
|
40
|
+
# Partial installation configuration to merge.
|
|
41
|
+
body,
|
|
42
|
+
request_options: {}
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# @api private
|
|
47
|
+
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
48
|
+
def self.new(client:)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Resources
|
|
5
|
+
class Campaign
|
|
6
|
+
class Options
|
|
7
|
+
# Retrieves a program's options configuration — the same surface as the dashboard
|
|
8
|
+
# Program Editor's **Options** tab. To see the full object with every field and its
|
|
9
|
+
# current value, `GET` this resource, then `PATCH` back only the fields you want to
|
|
10
|
+
# change.
|
|
11
|
+
sig do
|
|
12
|
+
params(
|
|
13
|
+
id: String,
|
|
14
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
15
|
+
).returns(T::Hash[Symbol, T.anything])
|
|
16
|
+
end
|
|
17
|
+
def retrieve(
|
|
18
|
+
# GrowSurf program ID.
|
|
19
|
+
id,
|
|
20
|
+
request_options: {}
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Updates a program's options configuration. Only the fields you send are changed;
|
|
25
|
+
# anything you leave out is untouched. The request body is a partial options
|
|
26
|
+
# configuration object. To see the full object with every field and its current
|
|
27
|
+
# value, `GET` this resource, then `PATCH` back only the fields you want to change.
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
id: String,
|
|
31
|
+
body: T::Hash[Symbol, T.anything],
|
|
32
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
33
|
+
).returns(T::Hash[Symbol, T.anything])
|
|
34
|
+
end
|
|
35
|
+
def update(
|
|
36
|
+
# GrowSurf program ID.
|
|
37
|
+
id,
|
|
38
|
+
# Partial options configuration to merge.
|
|
39
|
+
body,
|
|
40
|
+
request_options: {}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# @api private
|
|
45
|
+
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
46
|
+
def self.new(client:)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|