growsurf-ruby 1.18.0 → 1.20.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 +16 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/client.rb +0 -4
- data/lib/growsurf_ruby/models/campaign/create.rb +1 -1
- data/lib/growsurf_ruby/models/campaign/language.rb +2 -0
- data/lib/growsurf_ruby/models/campaign/participant_reward.rb +38 -1
- data/lib/growsurf_ruby/models.rb +0 -2
- data/lib/growsurf_ruby/resources/campaign/participant.rb +1 -1
- data/lib/growsurf_ruby/resources/campaign.rb +1 -1
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +0 -3
- data/rbi/growsurf_ruby/client.rbi +0 -3
- data/rbi/growsurf_ruby/models/campaign/create.rbi +2 -2
- data/rbi/growsurf_ruby/models/campaign/language.rbi +2 -0
- data/rbi/growsurf_ruby/models/campaign/participant_reward.rbi +107 -0
- data/rbi/growsurf_ruby/models.rbi +0 -2
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +1 -1
- data/rbi/growsurf_ruby/resources/campaign.rbi +1 -1
- data/sig/growsurf_ruby/client.rbs +0 -2
- data/sig/growsurf_ruby/models/campaign/language.rbs +4 -0
- data/sig/growsurf_ruby/models/campaign/participant_reward.rbs +32 -0
- data/sig/growsurf_ruby/models.rbs +0 -2
- metadata +2 -11
- data/lib/growsurf_ruby/models/account_create_params.rb +0 -46
- data/lib/growsurf_ruby/models/account_create_response.rb +0 -57
- data/lib/growsurf_ruby/resources/account.rb +0 -66
- data/rbi/growsurf_ruby/models/account_create_params.rbi +0 -73
- data/rbi/growsurf_ruby/models/account_create_response.rbi +0 -107
- data/rbi/growsurf_ruby/resources/account.rbi +0 -46
- data/sig/growsurf_ruby/models/account_create_params.rbs +0 -42
- data/sig/growsurf_ruby/models/account_create_response.rbs +0 -42
- data/sig/growsurf_ruby/resources/account.rbs +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de4222ba99ce62ee169d62c76148f0f16985d51de9ec1171829f7e345dc01aae
|
|
4
|
+
data.tar.gz: d94b63598678729b01ca359d9015d5f34f57f937ac6e9948c9aeb1ba6ed763cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99c4ae7c965df9241abd631442a42cae6695ef6c62e9c3eaa2d4fe361666bd0ae7f217d112e825e596f7926263751ea69d0adb111b609e07b9ecc8adcf6cd27d
|
|
7
|
+
data.tar.gz: d826551e5eef8c847e100fc567dc5e5a89e807501f11ba7f0f7e8f89d2e65c187fdb5ee4c2aa64a729253e1cb0564059235ee7f5f93db18f574b4c74aeb30bb6
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.20.0](https://github.com/growsurf/growsurf-ruby/compare/v1.19.0...v1.20.0) (2026-11-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add reward amountSource and percentOff, and zh-TW and es-419 languages ([7601d49](https://github.com/growsurf/growsurf-ruby/commit/7601d499c93eac3c3b2e08da34af327da28e5009))
|
|
9
|
+
* add reward amountSource and percentOff, and zh-TW and es-419 languages ([9177434](https://github.com/growsurf/growsurf-ruby/commit/91774347a437eba38d35d031eec687d1fa0f5c1b))
|
|
10
|
+
|
|
11
|
+
## [1.19.0](https://github.com/growsurf/growsurf-ruby/compare/v1.18.0...v1.19.0) (2026-11-03)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* remove account create method (endpoint retired) ([cd591fb](https://github.com/growsurf/growsurf-ruby/commit/cd591fb6b2f2c2511063c120aed1ce992ebb8370))
|
|
17
|
+
* remove account create method (endpoint retired) ([b156301](https://github.com/growsurf/growsurf-ruby/commit/b15630131c85037c933542b4d5d600c797bf7599))
|
|
18
|
+
|
|
3
19
|
## [1.18.0](https://github.com/growsurf/growsurf-ruby/compare/v1.17.0...v1.18.0) (2026-11-03)
|
|
4
20
|
|
|
5
21
|
|
data/README.md
CHANGED
data/lib/growsurf_ruby/client.rb
CHANGED
|
@@ -19,9 +19,6 @@ module GrowsurfRuby
|
|
|
19
19
|
# @return [String]
|
|
20
20
|
attr_reader :api_key
|
|
21
21
|
|
|
22
|
-
# @return [GrowsurfRuby::Resources::Account]
|
|
23
|
-
attr_reader :account
|
|
24
|
-
|
|
25
22
|
# @return [GrowsurfRuby::Resources::Team]
|
|
26
23
|
attr_reader :team
|
|
27
24
|
|
|
@@ -87,7 +84,6 @@ module GrowsurfRuby
|
|
|
87
84
|
headers: headers
|
|
88
85
|
)
|
|
89
86
|
|
|
90
|
-
@account = GrowsurfRuby::Resources::Account.new(client: self)
|
|
91
87
|
@team = GrowsurfRuby::Resources::Team.new(client: self)
|
|
92
88
|
@campaign = GrowsurfRuby::Resources::Campaign.new(client: self)
|
|
93
89
|
end
|
|
@@ -36,7 +36,7 @@ module GrowsurfRuby
|
|
|
36
36
|
# @!attribute language
|
|
37
37
|
# The language of the participant's portal and program emails. Stored when it is
|
|
38
38
|
# one of the program's languages. A regional tag maps to its language (for
|
|
39
|
-
# example, `
|
|
39
|
+
# example, `fr-BE` is stored as `fr`). Any other value is ignored and the
|
|
40
40
|
# program's base language applies. Applied only when this request creates the
|
|
41
41
|
# participant.
|
|
42
42
|
#
|
|
@@ -34,6 +34,16 @@ module GrowsurfRuby
|
|
|
34
34
|
# @return [Float, nil]
|
|
35
35
|
optional :amount, Float, nil?: true
|
|
36
36
|
|
|
37
|
+
# @!attribute amount_source
|
|
38
|
+
# Where `amount` or `percent_off` comes from. `METADATA` means the amount saved
|
|
39
|
+
# when the reward was earned.
|
|
40
|
+
#
|
|
41
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::ParticipantReward::AmountSource, nil]
|
|
42
|
+
optional :amount_source,
|
|
43
|
+
enum: -> { GrowsurfRuby::Campaign::ParticipantReward::AmountSource },
|
|
44
|
+
api_name: :amountSource,
|
|
45
|
+
nil?: true
|
|
46
|
+
|
|
37
47
|
# @!attribute commission_structure
|
|
38
48
|
#
|
|
39
49
|
# @return [GrowsurfRuby::Models::CommissionStructure, nil]
|
|
@@ -67,6 +77,12 @@ module GrowsurfRuby
|
|
|
67
77
|
# @return [Boolean, nil]
|
|
68
78
|
optional :is_referrer, GrowsurfRuby::Internal::Type::Boolean, api_name: :isReferrer
|
|
69
79
|
|
|
80
|
+
# @!attribute percent_off
|
|
81
|
+
# Discount of a percent-off coupon (`20` = 20% off); `nil` for every other reward.
|
|
82
|
+
#
|
|
83
|
+
# @return [Float, nil]
|
|
84
|
+
optional :percent_off, Float, api_name: :percentOff, nil?: true
|
|
85
|
+
|
|
70
86
|
# @!attribute referred_id
|
|
71
87
|
#
|
|
72
88
|
# @return [String, nil]
|
|
@@ -82,23 +98,44 @@ module GrowsurfRuby
|
|
|
82
98
|
# @return [Boolean, nil]
|
|
83
99
|
optional :unread, GrowsurfRuby::Internal::Type::Boolean
|
|
84
100
|
|
|
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)
|
|
101
|
+
# @!method initialize(id:, reward_id:, status:, approved: nil, approved_at: nil, amount: nil, amount_source: nil, commission_structure: nil, currency_iso: nil, fulfilled_at: nil, is_available: nil, is_fulfilled: nil, is_referrer: nil, percent_off: nil, referred_id: nil, referrer_id: nil, unread: nil)
|
|
86
102
|
# @param id [String]
|
|
87
103
|
# @param reward_id [String]
|
|
88
104
|
# @param status [Symbol, GrowsurfRuby::Models::Campaign::ParticipantReward::Status]
|
|
89
105
|
# @param approved [Boolean]
|
|
90
106
|
# @param approved_at [Integer]
|
|
91
107
|
# @param amount [Float]
|
|
108
|
+
# @param amount_source [Symbol, GrowsurfRuby::Models::Campaign::ParticipantReward::AmountSource, nil]
|
|
92
109
|
# @param commission_structure [GrowsurfRuby::Models::CommissionStructure, nil]
|
|
93
110
|
# @param currency_iso [String]
|
|
94
111
|
# @param fulfilled_at [Integer]
|
|
95
112
|
# @param is_available [Boolean]
|
|
96
113
|
# @param is_fulfilled [Boolean]
|
|
97
114
|
# @param is_referrer [Boolean]
|
|
115
|
+
# @param percent_off [Float]
|
|
98
116
|
# @param referred_id [String]
|
|
99
117
|
# @param referrer_id [String]
|
|
100
118
|
# @param unread [Boolean]
|
|
101
119
|
|
|
120
|
+
# @see GrowsurfRuby::Models::Campaign::ParticipantReward#amount_source
|
|
121
|
+
module AmountSource
|
|
122
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
123
|
+
|
|
124
|
+
STRIPE = :STRIPE
|
|
125
|
+
CHARGEBEE = :CHARGEBEE
|
|
126
|
+
RECURLY = :RECURLY
|
|
127
|
+
CHARGIFY = :CHARGIFY
|
|
128
|
+
PAYPAL = :PAYPAL
|
|
129
|
+
VENMO = :VENMO
|
|
130
|
+
TANGO_CARD = :TANGO_CARD
|
|
131
|
+
TREMENDOUS = :TREMENDOUS
|
|
132
|
+
XTRM = :XTRM
|
|
133
|
+
METADATA = :METADATA
|
|
134
|
+
|
|
135
|
+
# @!method self.values
|
|
136
|
+
# @return [Array<Symbol>]
|
|
137
|
+
end
|
|
138
|
+
|
|
102
139
|
# @see GrowsurfRuby::Models::Campaign::ParticipantReward#status
|
|
103
140
|
module Status
|
|
104
141
|
extend GrowsurfRuby::Internal::Type::Enum
|
data/lib/growsurf_ruby/models.rb
CHANGED
|
@@ -39,8 +39,6 @@ module GrowsurfRuby
|
|
|
39
39
|
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
AccountCreateParams = GrowsurfRuby::Models::AccountCreateParams
|
|
43
|
-
|
|
44
42
|
AnalyticsAvailability = GrowsurfRuby::Models::AnalyticsAvailability
|
|
45
43
|
|
|
46
44
|
AnalyticsUnavailableReason = GrowsurfRuby::Models::AnalyticsUnavailableReason
|
|
@@ -172,7 +172,7 @@ module GrowsurfRuby
|
|
|
172
172
|
#
|
|
173
173
|
# @param is_affiliate [Boolean] Affiliate programs only. Controls affiliate enrollment for a new participant. `true` enrolls the participant with `affiliateStatus: APPROVED`; `false` creates a non-affiliate without `affiliateStatus`. Existing participants are returned unchanged.
|
|
174
174
|
#
|
|
175
|
-
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails. Stored when it is one of the program's languages. A regional tag maps to its language (for example, `
|
|
175
|
+
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails. Stored when it is one of the program's languages. A regional tag maps to its language (for example, `fr-BE` is stored as `fr`). Any other value is ignored and the program's base language applies. Applied only when this request creates the participant.
|
|
176
176
|
#
|
|
177
177
|
# @param last_name [String]
|
|
178
178
|
#
|
|
@@ -255,7 +255,7 @@ module GrowsurfRuby
|
|
|
255
255
|
#
|
|
256
256
|
# @param ip_address [String]
|
|
257
257
|
#
|
|
258
|
-
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails. Stored when it is one of the program's languages. A regional tag maps to its language (for example, `
|
|
258
|
+
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language] The language of the participant's portal and program emails. Stored when it is one of the program's languages. A regional tag maps to its language (for example, `fr-BE` is stored as `fr`). Any other value is ignored and the program's base language applies. Applied only when this request creates the participant.
|
|
259
259
|
#
|
|
260
260
|
# @param last_name [String]
|
|
261
261
|
#
|
data/lib/growsurf_ruby.rb
CHANGED
|
@@ -136,8 +136,6 @@ require_relative "growsurf_ruby/models/campaign/webhook_list_response"
|
|
|
136
136
|
require_relative "growsurf_ruby/models/campaign/webhook_test_params"
|
|
137
137
|
require_relative "growsurf_ruby/models/campaign/webhook_test_response"
|
|
138
138
|
require_relative "growsurf_ruby/models/campaign/webhook_update_params"
|
|
139
|
-
require_relative "growsurf_ruby/models/account_create_params"
|
|
140
|
-
require_relative "growsurf_ruby/models/account_create_response"
|
|
141
139
|
require_relative "growsurf_ruby/models/affiliate_application"
|
|
142
140
|
require_relative "growsurf_ruby/models/affiliate_application_list_response"
|
|
143
141
|
require_relative "growsurf_ruby/models/affiliate_invite"
|
|
@@ -177,7 +175,6 @@ require_relative "growsurf_ruby/models/participant_payout_list"
|
|
|
177
175
|
require_relative "growsurf_ruby/models/referral_list"
|
|
178
176
|
require_relative "growsurf_ruby/models/reward_tax_valuation"
|
|
179
177
|
require_relative "growsurf_ruby/models"
|
|
180
|
-
require_relative "growsurf_ruby/resources/account"
|
|
181
178
|
require_relative "growsurf_ruby/resources/team"
|
|
182
179
|
require_relative "growsurf_ruby/resources/campaign"
|
|
183
180
|
require_relative "growsurf_ruby/resources/campaign/commission"
|
|
@@ -45,7 +45,7 @@ module GrowsurfRuby
|
|
|
45
45
|
|
|
46
46
|
# The language of the participant's portal and program emails. Stored when it is
|
|
47
47
|
# one of the program's languages. A regional tag maps to its language (for
|
|
48
|
-
# example, `
|
|
48
|
+
# example, `fr-BE` is stored as `fr`). Any other value is ignored and the
|
|
49
49
|
# program's base language applies. Applied only when this request creates the
|
|
50
50
|
# participant.
|
|
51
51
|
sig { returns(T.nilable(GrowsurfRuby::Campaign::Language::OrSymbol)) }
|
|
@@ -140,7 +140,7 @@ module GrowsurfRuby
|
|
|
140
140
|
is_affiliate: nil,
|
|
141
141
|
# The language of the participant's portal and program emails. Stored when it is
|
|
142
142
|
# one of the program's languages. A regional tag maps to its language (for
|
|
143
|
-
# example, `
|
|
143
|
+
# example, `fr-BE` is stored as `fr`). Any other value is ignored and the
|
|
144
144
|
# program's base language applies. Applied only when this request creates the
|
|
145
145
|
# participant.
|
|
146
146
|
language: nil,
|
|
@@ -51,6 +51,8 @@ module GrowsurfRuby
|
|
|
51
51
|
FIL = T.let(:fil, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
52
52
|
AF = T.let(:af, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
53
53
|
SW = T.let(:sw, GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
54
|
+
ZH_TW = T.let(:"zh-TW", GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
55
|
+
ES_419 = T.let(:"es-419", GrowsurfRuby::Campaign::Language::TaggedSymbol)
|
|
54
56
|
|
|
55
57
|
sig do
|
|
56
58
|
override.returns(
|
|
@@ -43,6 +43,17 @@ module GrowsurfRuby
|
|
|
43
43
|
sig { params(amount: T.nilable(Float)).void }
|
|
44
44
|
attr_writer :amount
|
|
45
45
|
|
|
46
|
+
# Where `amount` or `percent_off` comes from. `METADATA` means the amount saved
|
|
47
|
+
# when the reward was earned.
|
|
48
|
+
sig do
|
|
49
|
+
returns(
|
|
50
|
+
T.nilable(
|
|
51
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
52
|
+
)
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
attr_accessor :amount_source
|
|
56
|
+
|
|
46
57
|
sig { returns(T.nilable(GrowsurfRuby::CommissionStructure)) }
|
|
47
58
|
attr_reader :commission_structure
|
|
48
59
|
|
|
@@ -84,6 +95,13 @@ module GrowsurfRuby
|
|
|
84
95
|
sig { params(is_referrer: T::Boolean).void }
|
|
85
96
|
attr_writer :is_referrer
|
|
86
97
|
|
|
98
|
+
# Discount of a percent-off coupon (`20` = 20% off); `nil` for every other reward.
|
|
99
|
+
sig { returns(T.nilable(Float)) }
|
|
100
|
+
attr_reader :percent_off
|
|
101
|
+
|
|
102
|
+
sig { params(percent_off: T.nilable(Float)).void }
|
|
103
|
+
attr_writer :percent_off
|
|
104
|
+
|
|
87
105
|
sig { returns(T.nilable(String)) }
|
|
88
106
|
attr_reader :referred_id
|
|
89
107
|
|
|
@@ -110,6 +128,10 @@ module GrowsurfRuby
|
|
|
110
128
|
approved: T::Boolean,
|
|
111
129
|
approved_at: T.nilable(Integer),
|
|
112
130
|
amount: T.nilable(Float),
|
|
131
|
+
amount_source:
|
|
132
|
+
T.nilable(
|
|
133
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::OrSymbol
|
|
134
|
+
),
|
|
113
135
|
commission_structure:
|
|
114
136
|
T.nilable(GrowsurfRuby::CommissionStructure::OrHash),
|
|
115
137
|
currency_iso: T.nilable(String),
|
|
@@ -117,6 +139,7 @@ module GrowsurfRuby
|
|
|
117
139
|
is_available: T::Boolean,
|
|
118
140
|
is_fulfilled: T::Boolean,
|
|
119
141
|
is_referrer: T::Boolean,
|
|
142
|
+
percent_off: T.nilable(Float),
|
|
120
143
|
referred_id: String,
|
|
121
144
|
referrer_id: String,
|
|
122
145
|
unread: T::Boolean
|
|
@@ -129,12 +152,17 @@ module GrowsurfRuby
|
|
|
129
152
|
approved: nil,
|
|
130
153
|
approved_at: nil,
|
|
131
154
|
amount: nil,
|
|
155
|
+
# Where `amount` or `percent_off` comes from. `METADATA` means the amount saved
|
|
156
|
+
# when the reward was earned.
|
|
157
|
+
amount_source: nil,
|
|
132
158
|
commission_structure: nil,
|
|
133
159
|
currency_iso: nil,
|
|
134
160
|
fulfilled_at: nil,
|
|
135
161
|
is_available: nil,
|
|
136
162
|
is_fulfilled: nil,
|
|
137
163
|
is_referrer: nil,
|
|
164
|
+
# Discount of a percent-off coupon (`20` = 20% off); `nil` for every other reward.
|
|
165
|
+
percent_off: nil,
|
|
138
166
|
referred_id: nil,
|
|
139
167
|
referrer_id: nil,
|
|
140
168
|
unread: nil
|
|
@@ -151,6 +179,10 @@ module GrowsurfRuby
|
|
|
151
179
|
approved: T::Boolean,
|
|
152
180
|
approved_at: T.nilable(Integer),
|
|
153
181
|
amount: T.nilable(Float),
|
|
182
|
+
amount_source:
|
|
183
|
+
T.nilable(
|
|
184
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
185
|
+
),
|
|
154
186
|
commission_structure:
|
|
155
187
|
T.nilable(GrowsurfRuby::CommissionStructure),
|
|
156
188
|
currency_iso: T.nilable(String),
|
|
@@ -158,6 +190,7 @@ module GrowsurfRuby
|
|
|
158
190
|
is_available: T::Boolean,
|
|
159
191
|
is_fulfilled: T::Boolean,
|
|
160
192
|
is_referrer: T::Boolean,
|
|
193
|
+
percent_off: T.nilable(Float),
|
|
161
194
|
referred_id: String,
|
|
162
195
|
referrer_id: String,
|
|
163
196
|
unread: T::Boolean
|
|
@@ -167,6 +200,80 @@ module GrowsurfRuby
|
|
|
167
200
|
def to_hash
|
|
168
201
|
end
|
|
169
202
|
|
|
203
|
+
module AmountSource
|
|
204
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
205
|
+
|
|
206
|
+
TaggedSymbol =
|
|
207
|
+
T.type_alias do
|
|
208
|
+
T.all(
|
|
209
|
+
Symbol,
|
|
210
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource
|
|
211
|
+
)
|
|
212
|
+
end
|
|
213
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
214
|
+
|
|
215
|
+
STRIPE =
|
|
216
|
+
T.let(
|
|
217
|
+
:STRIPE,
|
|
218
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
219
|
+
)
|
|
220
|
+
CHARGEBEE =
|
|
221
|
+
T.let(
|
|
222
|
+
:CHARGEBEE,
|
|
223
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
224
|
+
)
|
|
225
|
+
RECURLY =
|
|
226
|
+
T.let(
|
|
227
|
+
:RECURLY,
|
|
228
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
229
|
+
)
|
|
230
|
+
CHARGIFY =
|
|
231
|
+
T.let(
|
|
232
|
+
:CHARGIFY,
|
|
233
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
234
|
+
)
|
|
235
|
+
PAYPAL =
|
|
236
|
+
T.let(
|
|
237
|
+
:PAYPAL,
|
|
238
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
239
|
+
)
|
|
240
|
+
VENMO =
|
|
241
|
+
T.let(
|
|
242
|
+
:VENMO,
|
|
243
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
244
|
+
)
|
|
245
|
+
TANGO_CARD =
|
|
246
|
+
T.let(
|
|
247
|
+
:TANGO_CARD,
|
|
248
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
249
|
+
)
|
|
250
|
+
TREMENDOUS =
|
|
251
|
+
T.let(
|
|
252
|
+
:TREMENDOUS,
|
|
253
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
254
|
+
)
|
|
255
|
+
XTRM =
|
|
256
|
+
T.let(
|
|
257
|
+
:XTRM,
|
|
258
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
259
|
+
)
|
|
260
|
+
METADATA =
|
|
261
|
+
T.let(
|
|
262
|
+
:METADATA,
|
|
263
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
sig do
|
|
267
|
+
override.returns(
|
|
268
|
+
T::Array[
|
|
269
|
+
GrowsurfRuby::Campaign::ParticipantReward::AmountSource::TaggedSymbol
|
|
270
|
+
]
|
|
271
|
+
)
|
|
272
|
+
end
|
|
273
|
+
def self.values
|
|
274
|
+
end
|
|
275
|
+
end
|
|
276
|
+
|
|
170
277
|
module Status
|
|
171
278
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
172
279
|
|
|
@@ -167,7 +167,7 @@ module GrowsurfRuby
|
|
|
167
167
|
is_affiliate: nil,
|
|
168
168
|
# The language of the participant's portal and program emails. Stored when it is
|
|
169
169
|
# one of the program's languages. A regional tag maps to its language (for
|
|
170
|
-
# example, `
|
|
170
|
+
# example, `fr-BE` is stored as `fr`). Any other value is ignored and the
|
|
171
171
|
# program's base language applies. Applied only when this request creates the
|
|
172
172
|
# participant.
|
|
173
173
|
language: nil,
|
|
@@ -239,7 +239,7 @@ module GrowsurfRuby
|
|
|
239
239
|
ip_address: nil,
|
|
240
240
|
# The language of the participant's portal and program emails. Stored when it is
|
|
241
241
|
# one of the program's languages. A regional tag maps to its language (for
|
|
242
|
-
# example, `
|
|
242
|
+
# example, `fr-BE` is stored as `fr`). Any other value is ignored and the
|
|
243
243
|
# program's base language applies. Applied only when this request creates the
|
|
244
244
|
# participant.
|
|
245
245
|
language: nil,
|
|
@@ -41,6 +41,8 @@ module GrowsurfRuby
|
|
|
41
41
|
| :fil
|
|
42
42
|
| :af
|
|
43
43
|
| :sw
|
|
44
|
+
| :"zh-TW"
|
|
45
|
+
| :"es-419"
|
|
44
46
|
|
|
45
47
|
module Language
|
|
46
48
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
@@ -84,6 +86,8 @@ module GrowsurfRuby
|
|
|
84
86
|
FIL: :fil
|
|
85
87
|
AF: :af
|
|
86
88
|
SW: :sw
|
|
89
|
+
ZH_TW: :"zh-TW"
|
|
90
|
+
ES_419: :"es-419"
|
|
87
91
|
|
|
88
92
|
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::language]
|
|
89
93
|
end
|
|
@@ -9,12 +9,14 @@ module GrowsurfRuby
|
|
|
9
9
|
approved: bool,
|
|
10
10
|
approved_at: Integer?,
|
|
11
11
|
amount: Float?,
|
|
12
|
+
amount_source: GrowsurfRuby::Models::Campaign::ParticipantReward::amount_source?,
|
|
12
13
|
commission_structure: GrowsurfRuby::CommissionStructure?,
|
|
13
14
|
currency_iso: String?,
|
|
14
15
|
fulfilled_at: Integer?,
|
|
15
16
|
is_available: bool,
|
|
16
17
|
is_fulfilled: bool,
|
|
17
18
|
is_referrer: bool,
|
|
19
|
+
percent_off: Float?,
|
|
18
20
|
referred_id: String,
|
|
19
21
|
referrer_id: String,
|
|
20
22
|
unread: bool
|
|
@@ -39,6 +41,8 @@ module GrowsurfRuby
|
|
|
39
41
|
|
|
40
42
|
def amount=: (Float?) -> Float?
|
|
41
43
|
|
|
44
|
+
attr_accessor amount_source: GrowsurfRuby::Models::Campaign::ParticipantReward::amount_source?
|
|
45
|
+
|
|
42
46
|
attr_accessor commission_structure: GrowsurfRuby::CommissionStructure?
|
|
43
47
|
|
|
44
48
|
attr_reader currency_iso: String?
|
|
@@ -61,6 +65,10 @@ module GrowsurfRuby
|
|
|
61
65
|
|
|
62
66
|
def is_referrer=: (bool) -> bool
|
|
63
67
|
|
|
68
|
+
attr_reader percent_off: Float?
|
|
69
|
+
|
|
70
|
+
def percent_off=: (Float?) -> Float?
|
|
71
|
+
|
|
64
72
|
attr_reader referred_id: String?
|
|
65
73
|
|
|
66
74
|
def referred_id=: (String) -> String
|
|
@@ -80,12 +88,14 @@ module GrowsurfRuby
|
|
|
80
88
|
?approved: bool,
|
|
81
89
|
?approved_at: Integer?,
|
|
82
90
|
?amount: Float?,
|
|
91
|
+
?amount_source: GrowsurfRuby::Models::Campaign::ParticipantReward::amount_source?,
|
|
83
92
|
?commission_structure: GrowsurfRuby::CommissionStructure?,
|
|
84
93
|
?currency_iso: String?,
|
|
85
94
|
?fulfilled_at: Integer?,
|
|
86
95
|
?is_available: bool,
|
|
87
96
|
?is_fulfilled: bool,
|
|
88
97
|
?is_referrer: bool,
|
|
98
|
+
?percent_off: Float?,
|
|
89
99
|
?referred_id: String,
|
|
90
100
|
?referrer_id: String,
|
|
91
101
|
?unread: bool
|
|
@@ -98,17 +108,39 @@ module GrowsurfRuby
|
|
|
98
108
|
approved: bool,
|
|
99
109
|
approved_at: Integer?,
|
|
100
110
|
amount: Float?,
|
|
111
|
+
amount_source: GrowsurfRuby::Models::Campaign::ParticipantReward::amount_source?,
|
|
101
112
|
commission_structure: GrowsurfRuby::CommissionStructure?,
|
|
102
113
|
currency_iso: String?,
|
|
103
114
|
fulfilled_at: Integer?,
|
|
104
115
|
is_available: bool,
|
|
105
116
|
is_fulfilled: bool,
|
|
106
117
|
is_referrer: bool,
|
|
118
|
+
percent_off: Float?,
|
|
107
119
|
referred_id: String,
|
|
108
120
|
referrer_id: String,
|
|
109
121
|
unread: bool
|
|
110
122
|
}
|
|
111
123
|
|
|
124
|
+
type amount_source =
|
|
125
|
+
:STRIPE | :CHARGEBEE | :RECURLY | :CHARGIFY | :PAYPAL | :VENMO | :TANGO_CARD | :TREMENDOUS | :XTRM | :METADATA
|
|
126
|
+
|
|
127
|
+
module AmountSource
|
|
128
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
129
|
+
|
|
130
|
+
STRIPE: :STRIPE
|
|
131
|
+
CHARGEBEE: :CHARGEBEE
|
|
132
|
+
RECURLY: :RECURLY
|
|
133
|
+
CHARGIFY: :CHARGIFY
|
|
134
|
+
PAYPAL: :PAYPAL
|
|
135
|
+
VENMO: :VENMO
|
|
136
|
+
TANGO_CARD: :TANGO_CARD
|
|
137
|
+
TREMENDOUS: :TREMENDOUS
|
|
138
|
+
XTRM: :XTRM
|
|
139
|
+
METADATA: :METADATA
|
|
140
|
+
|
|
141
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Campaign::ParticipantReward::amount_source]
|
|
142
|
+
end
|
|
143
|
+
|
|
112
144
|
type status = :PENDING | :FULFILLED | :CANCELLED
|
|
113
145
|
|
|
114
146
|
module Status
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: growsurf-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Growsurf
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -71,8 +71,6 @@ files:
|
|
|
71
71
|
- lib/growsurf_ruby/internal/type/unknown.rb
|
|
72
72
|
- lib/growsurf_ruby/internal/util.rb
|
|
73
73
|
- lib/growsurf_ruby/models.rb
|
|
74
|
-
- lib/growsurf_ruby/models/account_create_params.rb
|
|
75
|
-
- lib/growsurf_ruby/models/account_create_response.rb
|
|
76
74
|
- lib/growsurf_ruby/models/affiliate_application.rb
|
|
77
75
|
- lib/growsurf_ruby/models/affiliate_application_list_response.rb
|
|
78
76
|
- lib/growsurf_ruby/models/affiliate_invite.rb
|
|
@@ -196,7 +194,6 @@ files:
|
|
|
196
194
|
- lib/growsurf_ruby/models/team_rotate_api_key_response.rb
|
|
197
195
|
- lib/growsurf_ruby/models/team_update_params.rb
|
|
198
196
|
- lib/growsurf_ruby/request_options.rb
|
|
199
|
-
- lib/growsurf_ruby/resources/account.rb
|
|
200
197
|
- lib/growsurf_ruby/resources/campaign.rb
|
|
201
198
|
- lib/growsurf_ruby/resources/campaign/commission.rb
|
|
202
199
|
- lib/growsurf_ruby/resources/campaign/custom_domain.rb
|
|
@@ -232,8 +229,6 @@ files:
|
|
|
232
229
|
- rbi/growsurf_ruby/internal/type/unknown.rbi
|
|
233
230
|
- rbi/growsurf_ruby/internal/util.rbi
|
|
234
231
|
- rbi/growsurf_ruby/models.rbi
|
|
235
|
-
- rbi/growsurf_ruby/models/account_create_params.rbi
|
|
236
|
-
- rbi/growsurf_ruby/models/account_create_response.rbi
|
|
237
232
|
- rbi/growsurf_ruby/models/affiliate_application.rbi
|
|
238
233
|
- rbi/growsurf_ruby/models/affiliate_application_list_response.rbi
|
|
239
234
|
- rbi/growsurf_ruby/models/affiliate_invite.rbi
|
|
@@ -357,7 +352,6 @@ files:
|
|
|
357
352
|
- rbi/growsurf_ruby/models/team_rotate_api_key_response.rbi
|
|
358
353
|
- rbi/growsurf_ruby/models/team_update_params.rbi
|
|
359
354
|
- rbi/growsurf_ruby/request_options.rbi
|
|
360
|
-
- rbi/growsurf_ruby/resources/account.rbi
|
|
361
355
|
- rbi/growsurf_ruby/resources/campaign.rbi
|
|
362
356
|
- rbi/growsurf_ruby/resources/campaign/commission.rbi
|
|
363
357
|
- rbi/growsurf_ruby/resources/campaign/custom_domain.rbi
|
|
@@ -392,8 +386,6 @@ files:
|
|
|
392
386
|
- sig/growsurf_ruby/internal/type/unknown.rbs
|
|
393
387
|
- sig/growsurf_ruby/internal/util.rbs
|
|
394
388
|
- sig/growsurf_ruby/models.rbs
|
|
395
|
-
- sig/growsurf_ruby/models/account_create_params.rbs
|
|
396
|
-
- sig/growsurf_ruby/models/account_create_response.rbs
|
|
397
389
|
- sig/growsurf_ruby/models/affiliate_application.rbs
|
|
398
390
|
- sig/growsurf_ruby/models/affiliate_application_list_response.rbs
|
|
399
391
|
- sig/growsurf_ruby/models/affiliate_invite.rbs
|
|
@@ -517,7 +509,6 @@ files:
|
|
|
517
509
|
- sig/growsurf_ruby/models/team_rotate_api_key_response.rbs
|
|
518
510
|
- sig/growsurf_ruby/models/team_update_params.rbs
|
|
519
511
|
- sig/growsurf_ruby/request_options.rbs
|
|
520
|
-
- sig/growsurf_ruby/resources/account.rbs
|
|
521
512
|
- sig/growsurf_ruby/resources/campaign.rbs
|
|
522
513
|
- sig/growsurf_ruby/resources/campaign/commission.rbs
|
|
523
514
|
- sig/growsurf_ruby/resources/campaign/custom_domain.rbs
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module GrowsurfRuby
|
|
4
|
-
module Models
|
|
5
|
-
# @see GrowsurfRuby::Resources::Account#create
|
|
6
|
-
class AccountCreateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
-
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
# @!attribute email
|
|
11
|
-
# The email address for the new account. Personal emails and disposable email addresses are not accepted.
|
|
12
|
-
#
|
|
13
|
-
# @return [String]
|
|
14
|
-
required :email, String
|
|
15
|
-
|
|
16
|
-
# @!attribute company
|
|
17
|
-
#
|
|
18
|
-
# @return [String, nil]
|
|
19
|
-
optional :company, String
|
|
20
|
-
|
|
21
|
-
# @!attribute first_name
|
|
22
|
-
#
|
|
23
|
-
# @return [String, nil]
|
|
24
|
-
optional :first_name, String, api_name: :firstName
|
|
25
|
-
|
|
26
|
-
# @!attribute last_name
|
|
27
|
-
#
|
|
28
|
-
# @return [String, nil]
|
|
29
|
-
optional :last_name, String, api_name: :lastName
|
|
30
|
-
|
|
31
|
-
# @!method initialize(email:, company: nil, first_name: nil, last_name: nil, request_options: {})
|
|
32
|
-
# Some parameter documentations has been truncated, see
|
|
33
|
-
# {GrowsurfRuby::Models::AccountCreateParams} for more details.
|
|
34
|
-
#
|
|
35
|
-
# @param email [String] The email address for the new account. Personal emails and disposable email addresses are not accepted.
|
|
36
|
-
#
|
|
37
|
-
# @param company [String]
|
|
38
|
-
#
|
|
39
|
-
# @param first_name [String]
|
|
40
|
-
#
|
|
41
|
-
# @param last_name [String]
|
|
42
|
-
#
|
|
43
|
-
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module GrowsurfRuby
|
|
4
|
-
module Models
|
|
5
|
-
# @see GrowsurfRuby::Resources::Account#create
|
|
6
|
-
class AccountCreateResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute api_key
|
|
8
|
-
# An API key for the new account. Use it as the `Bearer` token on subsequent requests. Locked (`403`
|
|
9
|
-
# `EMAIL_NOT_VERIFIED_ERROR`) until the account's email is verified; verification unlocks this same
|
|
10
|
-
# key, so keep it and retry. It is replaced only when the account owner first signs in to the GrowSurf
|
|
11
|
-
# dashboard.
|
|
12
|
-
#
|
|
13
|
-
# @return [String]
|
|
14
|
-
required :api_key, String, api_name: :apiKey
|
|
15
|
-
|
|
16
|
-
# @!attribute email
|
|
17
|
-
# Email address for the new account.
|
|
18
|
-
#
|
|
19
|
-
# @return [String]
|
|
20
|
-
required :email, String
|
|
21
|
-
|
|
22
|
-
# @!attribute verification_status
|
|
23
|
-
# GrowSurf team verification state. `VERIFIED` is required before a program
|
|
24
|
-
# can send participant emails.
|
|
25
|
-
#
|
|
26
|
-
# @return [Symbol, GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus]
|
|
27
|
-
required :verification_status,
|
|
28
|
-
enum: -> { GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus },
|
|
29
|
-
api_name: :verificationStatus
|
|
30
|
-
|
|
31
|
-
# @!method initialize(api_key:, email:, verification_status:)
|
|
32
|
-
# Some parameter documentations has been truncated, see
|
|
33
|
-
# {GrowsurfRuby::Models::AccountCreateResponse} for more details.
|
|
34
|
-
#
|
|
35
|
-
# @param api_key [String] An API key for the new account. Use it as the `Bearer` token on subsequent
|
|
36
|
-
#
|
|
37
|
-
# @param email [String]
|
|
38
|
-
#
|
|
39
|
-
# @param verification_status [Symbol, GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus] GrowSurf team verification state. `VERIFIED` is required before a program can
|
|
40
|
-
|
|
41
|
-
# GrowSurf team verification state. `VERIFIED` is required before a program
|
|
42
|
-
# can send participant emails.
|
|
43
|
-
#
|
|
44
|
-
# @see GrowsurfRuby::Models::AccountCreateResponse#verification_status
|
|
45
|
-
module VerificationStatus
|
|
46
|
-
extend GrowsurfRuby::Internal::Type::Enum
|
|
47
|
-
|
|
48
|
-
NOT_REQUESTED = :NOT_REQUESTED
|
|
49
|
-
REQUESTED = :REQUESTED
|
|
50
|
-
VERIFIED = :VERIFIED
|
|
51
|
-
|
|
52
|
-
# @!method self.values
|
|
53
|
-
# @return [Array<Symbol>]
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
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 an API
|
|
7
|
-
# key. Before calling it, an authorized account owner must review and approve GrowSurf's
|
|
8
|
-
# [Terms of Service](https://growsurf.com/terms) and [Privacy
|
|
9
|
-
# Policy](https://growsurf.com/privacy). The account starts a 14-day Business trial
|
|
10
|
-
# without a credit card. The response includes an API key for the new account, shown once
|
|
11
|
-
# in the response. The key is a secret: store it in a secret manager and do not put it in
|
|
12
|
-
# logs, screenshots, URLs, model context, analytics, or generated output. A lost key
|
|
13
|
-
# cannot be recovered through this API, so do not create an account here unless you can
|
|
14
|
-
# store the key somewhere that outlives the current conversation. If you cannot, ask the
|
|
15
|
-
# account owner to connect GrowSurf's hosted MCP server at `https://mcp.growsurf.com`
|
|
16
|
-
# instead, which keeps the credential with your tool rather than in chat. The key is
|
|
17
|
-
# locked until the team owner's email address is verified: authenticated program and
|
|
18
|
-
# resource endpoints return a `403` with error code `EMAIL_NOT_VERIFIED_ERROR` until then
|
|
19
|
-
# (resend the email via `POST /team/owner/verification-email`, then retry). Verification
|
|
20
|
-
# unlocks this same key
|
|
21
|
-
# - keep it and retry rather than requesting a replacement. A welcome email is
|
|
22
|
-
# sent to the address with the verification link and a set-password link for
|
|
23
|
-
# dashboard access. Accounts whose email is never verified are deleted
|
|
24
|
-
# automatically after 7 days. Separately, for security, the API key is replaced
|
|
25
|
-
# the first time the account owner signs in to the GrowSurf dashboard; email
|
|
26
|
-
# verification does not trigger that, and the previous key then returns a `403`
|
|
27
|
-
# with error code `NOT_AUTHORIZED_ERROR`. Some actions (such as emailing participants)
|
|
28
|
-
# additionally require GrowSurf to verify the team first. Calling this endpoint
|
|
29
|
-
# accepts those policies on the account holder's behalf.
|
|
30
|
-
#
|
|
31
|
-
# @overload create(email:, company: nil, first_name: nil, last_name: nil, request_options: {})
|
|
32
|
-
#
|
|
33
|
-
# @param email [String] The email address for the new GrowSurf account. Personal emails and disposable email addresses are not accepted.
|
|
34
|
-
#
|
|
35
|
-
# @param company [String] Company name for the new account.
|
|
36
|
-
#
|
|
37
|
-
# @param first_name [String] First name for the new account owner.
|
|
38
|
-
#
|
|
39
|
-
# @param last_name [String] Last name for the new account owner.
|
|
40
|
-
#
|
|
41
|
-
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
42
|
-
#
|
|
43
|
-
# @return [GrowsurfRuby::Models::AccountCreateResponse]
|
|
44
|
-
#
|
|
45
|
-
# @see GrowsurfRuby::Models::AccountCreateParams
|
|
46
|
-
def create(params)
|
|
47
|
-
parsed, options = GrowsurfRuby::AccountCreateParams.dump_request(params)
|
|
48
|
-
options[:extra_headers] = options[:extra_headers].to_h.merge("authorization" => nil)
|
|
49
|
-
@client.request(
|
|
50
|
-
method: :post,
|
|
51
|
-
path: "accounts",
|
|
52
|
-
body: parsed,
|
|
53
|
-
model: GrowsurfRuby::Models::AccountCreateResponse,
|
|
54
|
-
options: options
|
|
55
|
-
)
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# @api private
|
|
59
|
-
#
|
|
60
|
-
# @param client [GrowsurfRuby::Client]
|
|
61
|
-
def initialize(client:)
|
|
62
|
-
@client = client
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
end
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module GrowsurfRuby
|
|
4
|
-
module Models
|
|
5
|
-
class AccountCreateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
-
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
7
|
-
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
8
|
-
|
|
9
|
-
OrHash =
|
|
10
|
-
T.type_alias do
|
|
11
|
-
T.any(
|
|
12
|
-
GrowsurfRuby::AccountCreateParams,
|
|
13
|
-
GrowsurfRuby::Internal::AnyHash
|
|
14
|
-
)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# The email address for the new account. Personal emails and disposable email addresses are not accepted.
|
|
18
|
-
sig { returns(String) }
|
|
19
|
-
attr_accessor :email
|
|
20
|
-
|
|
21
|
-
sig { returns(T.nilable(String)) }
|
|
22
|
-
attr_reader :company
|
|
23
|
-
|
|
24
|
-
sig { params(company: String).void }
|
|
25
|
-
attr_writer :company
|
|
26
|
-
|
|
27
|
-
sig { returns(T.nilable(String)) }
|
|
28
|
-
attr_reader :first_name
|
|
29
|
-
|
|
30
|
-
sig { params(first_name: String).void }
|
|
31
|
-
attr_writer :first_name
|
|
32
|
-
|
|
33
|
-
sig { returns(T.nilable(String)) }
|
|
34
|
-
attr_reader :last_name
|
|
35
|
-
|
|
36
|
-
sig { params(last_name: String).void }
|
|
37
|
-
attr_writer :last_name
|
|
38
|
-
|
|
39
|
-
sig do
|
|
40
|
-
params(
|
|
41
|
-
email: String,
|
|
42
|
-
company: String,
|
|
43
|
-
first_name: String,
|
|
44
|
-
last_name: String,
|
|
45
|
-
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
46
|
-
).returns(T.attached_class)
|
|
47
|
-
end
|
|
48
|
-
def self.new(
|
|
49
|
-
# The email address for the new account. Personal emails and disposable email addresses are not accepted.
|
|
50
|
-
email:,
|
|
51
|
-
company: nil,
|
|
52
|
-
first_name: nil,
|
|
53
|
-
last_name: nil,
|
|
54
|
-
request_options: {}
|
|
55
|
-
)
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
sig do
|
|
59
|
-
override.returns(
|
|
60
|
-
{
|
|
61
|
-
email: String,
|
|
62
|
-
company: String,
|
|
63
|
-
first_name: String,
|
|
64
|
-
last_name: String,
|
|
65
|
-
request_options: GrowsurfRuby::RequestOptions
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
end
|
|
69
|
-
def to_hash
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
end
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module GrowsurfRuby
|
|
4
|
-
module Models
|
|
5
|
-
class AccountCreateResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
-
OrHash =
|
|
7
|
-
T.type_alias do
|
|
8
|
-
T.any(
|
|
9
|
-
GrowsurfRuby::Models::AccountCreateResponse,
|
|
10
|
-
GrowsurfRuby::Internal::AnyHash
|
|
11
|
-
)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# An API key for the new account. Use it as the `Bearer` token on subsequent
|
|
15
|
-
# requests. Locked (`403` `EMAIL_NOT_VERIFIED_ERROR`) until the account's email
|
|
16
|
-
# is verified, and rotated when the account owner first signs in to the GrowSurf
|
|
17
|
-
# dashboard.
|
|
18
|
-
sig { returns(String) }
|
|
19
|
-
attr_accessor :api_key
|
|
20
|
-
|
|
21
|
-
sig { returns(String) }
|
|
22
|
-
attr_accessor :email
|
|
23
|
-
|
|
24
|
-
# GrowSurf account verification state. `VERIFIED` is required before a program
|
|
25
|
-
# can send participant emails.
|
|
26
|
-
sig do
|
|
27
|
-
returns(
|
|
28
|
-
GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
|
|
29
|
-
)
|
|
30
|
-
end
|
|
31
|
-
attr_accessor :verification_status
|
|
32
|
-
|
|
33
|
-
sig do
|
|
34
|
-
params(
|
|
35
|
-
api_key: String,
|
|
36
|
-
email: String,
|
|
37
|
-
verification_status:
|
|
38
|
-
GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::OrSymbol
|
|
39
|
-
).returns(T.attached_class)
|
|
40
|
-
end
|
|
41
|
-
def self.new(
|
|
42
|
-
# An API key for the new account. Use it as the `Bearer` token on subsequent
|
|
43
|
-
# requests. Locked (`403` `EMAIL_NOT_VERIFIED_ERROR`) until the account's email
|
|
44
|
-
# is verified, and rotated when the account owner first signs in to the GrowSurf
|
|
45
|
-
# dashboard.
|
|
46
|
-
api_key:,
|
|
47
|
-
email:,
|
|
48
|
-
# GrowSurf account verification state. `VERIFIED` is required before a program
|
|
49
|
-
# can send participant emails.
|
|
50
|
-
verification_status:
|
|
51
|
-
)
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
sig do
|
|
55
|
-
override.returns(
|
|
56
|
-
{
|
|
57
|
-
api_key: String,
|
|
58
|
-
email: String,
|
|
59
|
-
verification_status:
|
|
60
|
-
GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
end
|
|
64
|
-
def to_hash
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
module VerificationStatus
|
|
68
|
-
extend GrowsurfRuby::Internal::Type::Enum
|
|
69
|
-
|
|
70
|
-
TaggedSymbol =
|
|
71
|
-
T.type_alias do
|
|
72
|
-
T.all(
|
|
73
|
-
Symbol,
|
|
74
|
-
GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus
|
|
75
|
-
)
|
|
76
|
-
end
|
|
77
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
78
|
-
|
|
79
|
-
NOT_REQUESTED =
|
|
80
|
-
T.let(
|
|
81
|
-
:NOT_REQUESTED,
|
|
82
|
-
GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
|
|
83
|
-
)
|
|
84
|
-
REQUESTED =
|
|
85
|
-
T.let(
|
|
86
|
-
:REQUESTED,
|
|
87
|
-
GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
|
|
88
|
-
)
|
|
89
|
-
VERIFIED =
|
|
90
|
-
T.let(
|
|
91
|
-
:VERIFIED,
|
|
92
|
-
GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
|
|
93
|
-
)
|
|
94
|
-
|
|
95
|
-
sig do
|
|
96
|
-
override.returns(
|
|
97
|
-
T::Array[
|
|
98
|
-
GrowsurfRuby::Models::AccountCreateResponse::VerificationStatus::TaggedSymbol
|
|
99
|
-
]
|
|
100
|
-
)
|
|
101
|
-
end
|
|
102
|
-
def self.values
|
|
103
|
-
end
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
end
|
|
@@ -1,46 +0,0 @@
|
|
|
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. Before calling it, an authorized account owner must review and
|
|
8
|
-
# approve GrowSurf's [Terms of Service](https://growsurf.com/terms) and [Privacy
|
|
9
|
-
# Policy](https://growsurf.com/privacy). The account starts a 14-day Business
|
|
10
|
-
# trial without a credit card. The response includes an API key for the new
|
|
11
|
-
# account, shown once in the response. The key is a secret: store it in a secret
|
|
12
|
-
# manager and do not put it in logs, screenshots, URLs, model context, analytics,
|
|
13
|
-
# or generated output. The key is locked until the team owner's email address is
|
|
14
|
-
# verified: authenticated program and resource endpoints return a `403` with error
|
|
15
|
-
# code `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
|
|
16
|
-
# /team/owner/verification-email`, then retry). A welcome email is sent to the
|
|
17
|
-
# address with the verification link and a set-password link for dashboard access.
|
|
18
|
-
# Accounts whose email is never verified are deleted automatically after 7 days.
|
|
19
|
-
# For security, the API key is rotated the first time the account owner signs in
|
|
20
|
-
# to the GrowSurf dashboard. Some actions (such as emailing participants)
|
|
21
|
-
# additionally require GrowSurf to verify the team first. Calling this endpoint
|
|
22
|
-
# accepts those policies on the account holder's behalf.
|
|
23
|
-
sig do
|
|
24
|
-
params(
|
|
25
|
-
email: String,
|
|
26
|
-
company: String,
|
|
27
|
-
first_name: String,
|
|
28
|
-
last_name: String,
|
|
29
|
-
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
30
|
-
).returns(GrowsurfRuby::Models::AccountCreateResponse)
|
|
31
|
-
end
|
|
32
|
-
def create(
|
|
33
|
-
email:,
|
|
34
|
-
company: nil,
|
|
35
|
-
first_name: nil,
|
|
36
|
-
last_name: nil,
|
|
37
|
-
request_options: {}
|
|
38
|
-
)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
42
|
-
def self.new(client:)
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
module GrowsurfRuby
|
|
2
|
-
module Models
|
|
3
|
-
type account_create_params =
|
|
4
|
-
{ email: String, company: String, first_name: String, last_name: String }
|
|
5
|
-
& GrowsurfRuby::Internal::Type::request_parameters
|
|
6
|
-
|
|
7
|
-
class AccountCreateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
-
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
9
|
-
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
10
|
-
|
|
11
|
-
attr_accessor email: String
|
|
12
|
-
|
|
13
|
-
attr_reader company: String?
|
|
14
|
-
|
|
15
|
-
def company=: (String) -> String
|
|
16
|
-
|
|
17
|
-
attr_reader first_name: String?
|
|
18
|
-
|
|
19
|
-
def first_name=: (String) -> String
|
|
20
|
-
|
|
21
|
-
attr_reader last_name: String?
|
|
22
|
-
|
|
23
|
-
def last_name=: (String) -> String
|
|
24
|
-
|
|
25
|
-
def initialize: (
|
|
26
|
-
email: String,
|
|
27
|
-
?company: String,
|
|
28
|
-
?first_name: String,
|
|
29
|
-
?last_name: String,
|
|
30
|
-
?request_options: GrowsurfRuby::request_opts
|
|
31
|
-
) -> void
|
|
32
|
-
|
|
33
|
-
def to_hash: -> {
|
|
34
|
-
email: String,
|
|
35
|
-
company: String,
|
|
36
|
-
first_name: String,
|
|
37
|
-
last_name: String,
|
|
38
|
-
request_options: GrowsurfRuby::RequestOptions
|
|
39
|
-
}
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
module GrowsurfRuby
|
|
2
|
-
module Models
|
|
3
|
-
type account_create_response =
|
|
4
|
-
{
|
|
5
|
-
api_key: String,
|
|
6
|
-
email: String,
|
|
7
|
-
verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
class AccountCreateResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
11
|
-
attr_accessor api_key: String
|
|
12
|
-
|
|
13
|
-
attr_accessor email: String
|
|
14
|
-
|
|
15
|
-
attr_accessor verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
16
|
-
|
|
17
|
-
def initialize: (
|
|
18
|
-
api_key: String,
|
|
19
|
-
email: String,
|
|
20
|
-
verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
21
|
-
) -> void
|
|
22
|
-
|
|
23
|
-
def to_hash: -> {
|
|
24
|
-
api_key: String,
|
|
25
|
-
email: String,
|
|
26
|
-
verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
type verification_status = :NOT_REQUESTED | :REQUESTED | :VERIFIED
|
|
30
|
-
|
|
31
|
-
module VerificationStatus
|
|
32
|
-
extend GrowsurfRuby::Internal::Type::Enum
|
|
33
|
-
|
|
34
|
-
NOT_REQUESTED: :NOT_REQUESTED
|
|
35
|
-
REQUESTED: :REQUESTED
|
|
36
|
-
VERIFIED: :VERIFIED
|
|
37
|
-
|
|
38
|
-
def self?.values: -> ::Array[GrowsurfRuby::Models::AccountCreateResponse::verification_status]
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
module GrowsurfRuby
|
|
2
|
-
module Resources
|
|
3
|
-
class Account
|
|
4
|
-
def create: (
|
|
5
|
-
email: String,
|
|
6
|
-
?company: String,
|
|
7
|
-
?first_name: String,
|
|
8
|
-
?last_name: String,
|
|
9
|
-
?request_options: GrowsurfRuby::request_opts
|
|
10
|
-
) -> GrowsurfRuby::Models::AccountCreateResponse
|
|
11
|
-
|
|
12
|
-
def initialize: (client: GrowsurfRuby::Client) -> void
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|