growsurf-ruby 1.1.2 → 1.2.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 +7 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/client.rb +5 -5
- data/lib/growsurf_ruby/models/account_create_response.rb +5 -12
- data/lib/growsurf_ruby/models/team.rb +48 -0
- data/lib/growsurf_ruby/models/team_resend_owner_verification_email_response.rb +34 -0
- data/lib/growsurf_ruby/models/{account_rotate_api_key_response.rb → team_rotate_api_key_response.rb} +3 -3
- data/lib/growsurf_ruby/models/team_update_params.rb +22 -0
- data/lib/growsurf_ruby/models.rb +3 -3
- data/lib/growsurf_ruby/resources/account.rb +9 -125
- data/lib/growsurf_ruby/resources/campaign/participant.rb +2 -2
- data/lib/growsurf_ruby/resources/campaign.rb +2 -2
- data/lib/growsurf_ruby/resources/team.rb +109 -0
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +5 -4
- data/rbi/growsurf_ruby/client.rbi +4 -1
- data/rbi/growsurf_ruby/models/account_create_response.rbi +0 -8
- data/rbi/growsurf_ruby/models/team.rbi +65 -0
- data/rbi/growsurf_ruby/models/{account_resend_verification_email_response.rbi → team_resend_owner_verification_email_response.rbi} +8 -18
- data/rbi/growsurf_ruby/models/{account_rotate_api_key_response.rbi → team_rotate_api_key_response.rbi} +3 -7
- data/rbi/growsurf_ruby/models/team_update_params.rbi +35 -0
- data/rbi/growsurf_ruby/models.rbi +3 -3
- data/rbi/growsurf_ruby/resources/account.rbi +0 -86
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +2 -2
- data/rbi/growsurf_ruby/resources/campaign.rbi +3 -2
- data/rbi/growsurf_ruby/resources/team.rbi +52 -0
- data/sig/growsurf_ruby/client.rbs +3 -1
- data/sig/growsurf_ruby/models/account_create_response.rbs +0 -5
- data/sig/growsurf_ruby/models/team.rbs +36 -0
- data/sig/growsurf_ruby/models/team_resend_owner_verification_email_response.rbs +31 -0
- data/sig/growsurf_ruby/models/{account_rotate_api_key_response.rbs → team_rotate_api_key_response.rbs} +2 -2
- data/sig/growsurf_ruby/models/team_update_params.rbs +23 -0
- data/sig/growsurf_ruby/models.rbs +3 -3
- data/sig/growsurf_ruby/resources/account.rbs +0 -23
- data/sig/growsurf_ruby/resources/team.rbs +28 -0
- metadata +17 -14
- data/lib/growsurf_ruby/models/account.rb +0 -90
- data/lib/growsurf_ruby/models/account_resend_verification_email_response.rb +0 -33
- data/lib/growsurf_ruby/models/account_update_params.rb +0 -35
- data/rbi/growsurf_ruby/models/account.rbi +0 -125
- data/rbi/growsurf_ruby/models/account_update_params.rbi +0 -65
- data/sig/growsurf_ruby/models/account.rbs +0 -67
- data/sig/growsurf_ruby/models/account_resend_verification_email_response.rbs +0 -35
- data/sig/growsurf_ruby/models/account_update_params.rbs +0 -42
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class Team < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(GrowsurfRuby::Models::Team, GrowsurfRuby::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(String) }
|
|
12
|
+
attr_accessor :name
|
|
13
|
+
|
|
14
|
+
sig do
|
|
15
|
+
returns(GrowsurfRuby::Models::Team::VerificationStatus::TaggedSymbol)
|
|
16
|
+
end
|
|
17
|
+
attr_accessor :verification_status
|
|
18
|
+
|
|
19
|
+
sig { returns(T.nilable(Integer)) }
|
|
20
|
+
attr_accessor :verification_requested_at
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
name: String,
|
|
25
|
+
verification_status:
|
|
26
|
+
GrowsurfRuby::Models::Team::VerificationStatus::OrSymbol,
|
|
27
|
+
verification_requested_at: T.nilable(Integer)
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(name:, verification_status:, verification_requested_at:)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
override.returns(
|
|
35
|
+
{
|
|
36
|
+
name: String,
|
|
37
|
+
verification_status:
|
|
38
|
+
GrowsurfRuby::Models::Team::VerificationStatus::TaggedSymbol,
|
|
39
|
+
verification_requested_at: T.nilable(Integer)
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
module VerificationStatus
|
|
47
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
48
|
+
|
|
49
|
+
TaggedSymbol =
|
|
50
|
+
T.type_alias do
|
|
51
|
+
T.all(Symbol, GrowsurfRuby::Models::Team::VerificationStatus)
|
|
52
|
+
end
|
|
53
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
54
|
+
|
|
55
|
+
NOT_REQUESTED = T.let(:NOT_REQUESTED, TaggedSymbol)
|
|
56
|
+
REQUESTED = T.let(:REQUESTED, TaggedSymbol)
|
|
57
|
+
VERIFIED = T.let(:VERIFIED, TaggedSymbol)
|
|
58
|
+
|
|
59
|
+
sig { override.returns(T::Array[TaggedSymbol]) }
|
|
60
|
+
def self.values
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class TeamResendOwnerVerificationEmailResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
GrowsurfRuby::Models::
|
|
9
|
+
GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse,
|
|
10
10
|
GrowsurfRuby::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
sig do
|
|
15
15
|
returns(
|
|
16
|
-
GrowsurfRuby::Models::
|
|
16
|
+
GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::Status::TaggedSymbol
|
|
17
17
|
)
|
|
18
18
|
end
|
|
19
19
|
attr_accessor :status
|
|
@@ -24,7 +24,7 @@ module GrowsurfRuby
|
|
|
24
24
|
sig do
|
|
25
25
|
params(
|
|
26
26
|
status:
|
|
27
|
-
GrowsurfRuby::Models::
|
|
27
|
+
GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::Status::OrSymbol,
|
|
28
28
|
success: T::Boolean
|
|
29
29
|
).returns(T.attached_class)
|
|
30
30
|
end
|
|
@@ -35,7 +35,7 @@ module GrowsurfRuby
|
|
|
35
35
|
override.returns(
|
|
36
36
|
{
|
|
37
37
|
status:
|
|
38
|
-
GrowsurfRuby::Models::
|
|
38
|
+
GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::Status::TaggedSymbol,
|
|
39
39
|
success: T::Boolean
|
|
40
40
|
}
|
|
41
41
|
)
|
|
@@ -50,24 +50,14 @@ module GrowsurfRuby
|
|
|
50
50
|
T.type_alias do
|
|
51
51
|
T.all(
|
|
52
52
|
Symbol,
|
|
53
|
-
GrowsurfRuby::Models::
|
|
53
|
+
GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::Status
|
|
54
54
|
)
|
|
55
55
|
end
|
|
56
56
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
57
57
|
|
|
58
|
-
SENT =
|
|
59
|
-
T.let(
|
|
60
|
-
:SENT,
|
|
61
|
-
GrowsurfRuby::Models::AccountResendVerificationEmailResponse::Status::TaggedSymbol
|
|
62
|
-
)
|
|
58
|
+
SENT = T.let(:SENT, TaggedSymbol)
|
|
63
59
|
|
|
64
|
-
sig
|
|
65
|
-
override.returns(
|
|
66
|
-
T::Array[
|
|
67
|
-
GrowsurfRuby::Models::AccountResendVerificationEmailResponse::Status::TaggedSymbol
|
|
68
|
-
]
|
|
69
|
-
)
|
|
70
|
-
end
|
|
60
|
+
sig { override.returns(T::Array[TaggedSymbol]) }
|
|
71
61
|
def self.values
|
|
72
62
|
end
|
|
73
63
|
end
|
|
@@ -2,24 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class TeamRotateAPIKeyResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
GrowsurfRuby::Models::
|
|
9
|
+
GrowsurfRuby::Models::TeamRotateAPIKeyResponse,
|
|
10
10
|
GrowsurfRuby::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# The new API key. Store it now; the key used for rotation stops working immediately.
|
|
15
14
|
sig { returns(String) }
|
|
16
15
|
attr_accessor :api_key
|
|
17
16
|
|
|
18
17
|
sig { params(api_key: String).returns(T.attached_class) }
|
|
19
|
-
def self.new(
|
|
20
|
-
# The new API key. Store it now; the key used for rotation stops working immediately.
|
|
21
|
-
api_key:
|
|
22
|
-
)
|
|
18
|
+
def self.new(api_key:)
|
|
23
19
|
end
|
|
24
20
|
|
|
25
21
|
sig { override.returns({ api_key: String }) }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
class TeamUpdateParams < 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(GrowsurfRuby::TeamUpdateParams, GrowsurfRuby::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :name
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
name: String,
|
|
20
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(name:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ name: String, request_options: GrowsurfRuby::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# typed: strong
|
|
2
2
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
|
-
Account = GrowsurfRuby::Models::Account
|
|
5
|
-
|
|
6
4
|
AccountCreateParams = GrowsurfRuby::Models::AccountCreateParams
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
Team = GrowsurfRuby::Models::Team
|
|
7
|
+
|
|
8
|
+
TeamUpdateParams = GrowsurfRuby::Models::TeamUpdateParams
|
|
9
9
|
|
|
10
10
|
Campaign = GrowsurfRuby::Models::Campaign
|
|
11
11
|
|
|
@@ -3,21 +3,6 @@
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
4
|
module Resources
|
|
5
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, shown once
|
|
8
|
-
# in the response. The key is locked until the account's email address is
|
|
9
|
-
# verified: authenticated endpoints outside the `Accounts` group return a `403`
|
|
10
|
-
# with error code
|
|
11
|
-
# `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
|
|
12
|
-
# /account/verification-email`, then retry). A welcome email is sent to the
|
|
13
|
-
# address with the verification link and a set-password link for dashboard
|
|
14
|
-
# access. Accounts whose email is never verified are deleted automatically after
|
|
15
|
-
# 7 days. For security, the API key is rotated the first time the account owner
|
|
16
|
-
# signs in to the GrowSurf dashboard. Some actions (such as emailing
|
|
17
|
-
# participants) additionally require the GrowSurf team to verify the account
|
|
18
|
-
# first. By creating an account you agree, on behalf of the account holder, to
|
|
19
|
-
# GrowSurf's [Terms of Service](https://growsurf.com/terms) and
|
|
20
|
-
# [Privacy Policy](https://growsurf.com/privacy).
|
|
21
6
|
sig do
|
|
22
7
|
params(
|
|
23
8
|
email: String,
|
|
@@ -28,7 +13,6 @@ module GrowsurfRuby
|
|
|
28
13
|
).returns(GrowsurfRuby::Models::AccountCreateResponse)
|
|
29
14
|
end
|
|
30
15
|
def create(
|
|
31
|
-
# The email address for the new account. Personal emails and disposable email addresses are not accepted.
|
|
32
16
|
email:,
|
|
33
17
|
company: nil,
|
|
34
18
|
first_name: nil,
|
|
@@ -37,76 +21,6 @@ module GrowsurfRuby
|
|
|
37
21
|
)
|
|
38
22
|
end
|
|
39
23
|
|
|
40
|
-
# Retrieves the account that owns the API key: profile and GrowSurf-team
|
|
41
|
-
# verification state.
|
|
42
|
-
# `verificationStatus` is `VERIFIED` once the GrowSurf team has verified the account
|
|
43
|
-
# — this is required before you can send participant emails from a program.
|
|
44
|
-
sig do
|
|
45
|
-
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
46
|
-
GrowsurfRuby::Account
|
|
47
|
-
)
|
|
48
|
-
end
|
|
49
|
-
def retrieve(request_options: {})
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# Updates your own account profile (`firstName`, `lastName`, `company`). Any other
|
|
53
|
-
# property is rejected with a `400` — in particular, the account `email` cannot be
|
|
54
|
-
# changed via the API, and billing/subscription is not editable here.
|
|
55
|
-
sig do
|
|
56
|
-
params(
|
|
57
|
-
company: String,
|
|
58
|
-
first_name: String,
|
|
59
|
-
last_name: String,
|
|
60
|
-
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
61
|
-
).returns(GrowsurfRuby::Account)
|
|
62
|
-
end
|
|
63
|
-
def update(
|
|
64
|
-
company: nil,
|
|
65
|
-
first_name: nil,
|
|
66
|
-
last_name: nil,
|
|
67
|
-
request_options: {}
|
|
68
|
-
)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# Generates a new API key and invalidates the key used for the request. The SDK
|
|
72
|
-
# sends a retry-safe `Idempotency-Key`, so automatic retries return the same
|
|
73
|
-
# replacement. Store the returned key, then update every integration that used
|
|
74
|
-
# the old key. The account owner is notified by email whenever the key is rotated.
|
|
75
|
-
# Requires an API key with `api_key:rotate`. This operation is available only through
|
|
76
|
-
# the REST API or a GrowSurf API SDK, not through MCP.
|
|
77
|
-
sig do
|
|
78
|
-
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
79
|
-
GrowsurfRuby::Models::AccountRotateAPIKeyResponse
|
|
80
|
-
)
|
|
81
|
-
end
|
|
82
|
-
def rotate_api_key(request_options: {})
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# Requests GrowSurf-team verification of your account (required before a program can
|
|
86
|
-
# email its participants). Idempotent — calling it again while a request is pending
|
|
87
|
-
# does not create a duplicate. Returns the account with its updated
|
|
88
|
-
# `verificationStatus`.
|
|
89
|
-
sig do
|
|
90
|
-
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
91
|
-
GrowsurfRuby::Account
|
|
92
|
-
)
|
|
93
|
-
end
|
|
94
|
-
def request_verification(request_options: {})
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
# Resends the email-verification email to the account's email address. A `200`
|
|
98
|
-
# with `status: SENT` is only returned when an email was actually dispatched.
|
|
99
|
-
# Returns a `400` if the email is already verified, or a `429` if a verification
|
|
100
|
-
# email was sent too recently — wait a moment, then retry.
|
|
101
|
-
sig do
|
|
102
|
-
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
103
|
-
GrowsurfRuby::Models::AccountResendVerificationEmailResponse
|
|
104
|
-
)
|
|
105
|
-
end
|
|
106
|
-
def resend_verification_email(request_options: {})
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
# @api private
|
|
110
24
|
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
111
25
|
def self.new(client:)
|
|
112
26
|
end
|
|
@@ -524,8 +524,8 @@ module GrowsurfRuby
|
|
|
524
524
|
# program's configured email templates, OR `subject` + `body` for a free-form email.
|
|
525
525
|
# Free-form emails are sent with the same compliance handling (company name,
|
|
526
526
|
# postal address, and an unsubscribe link are added automatically, and unsubscribed
|
|
527
|
-
# participants are suppressed). Sending requires the
|
|
528
|
-
# GrowSurf
|
|
527
|
+
# participants are suppressed). Sending requires the team to be verified by
|
|
528
|
+
# GrowSurf. Requires a verified custom email domain on the program (set up
|
|
529
529
|
# in Campaign Editor > 3. Emails > Email Settings). Returns `400` until one is
|
|
530
530
|
# verified.
|
|
531
531
|
# The email is accepted for delivery.
|
|
@@ -62,8 +62,9 @@ module GrowsurfRuby
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
# Creates a program. Only `type` is required; everything else is server-defaulted.
|
|
65
|
-
#
|
|
66
|
-
#
|
|
65
|
+
# The new program is owned by the API key's bound team. Editor-tab configuration
|
|
66
|
+
# (design, emails, options, installation) is not accepted here — configure it via
|
|
67
|
+
# the config sub-resources after the program is created.
|
|
67
68
|
sig do
|
|
68
69
|
params(
|
|
69
70
|
type: GrowsurfRuby::CampaignCreateParams::Type::OrSymbol,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Resources
|
|
5
|
+
class Team
|
|
6
|
+
sig do
|
|
7
|
+
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
8
|
+
GrowsurfRuby::Models::Team
|
|
9
|
+
)
|
|
10
|
+
end
|
|
11
|
+
def retrieve(request_options: {})
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig do
|
|
15
|
+
params(
|
|
16
|
+
name: String,
|
|
17
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
18
|
+
).returns(GrowsurfRuby::Models::Team)
|
|
19
|
+
end
|
|
20
|
+
def update(name:, request_options: {})
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
25
|
+
GrowsurfRuby::Models::TeamRotateAPIKeyResponse
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
def rotate_api_key(request_options: {})
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
sig do
|
|
32
|
+
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
33
|
+
GrowsurfRuby::Models::Team
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
def request_verification(request_options: {})
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
sig do
|
|
40
|
+
params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
|
|
41
|
+
GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
def resend_owner_verification_email(request_options: {})
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
48
|
+
def self.new(client:)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -8,10 +8,12 @@ module GrowsurfRuby
|
|
|
8
8
|
|
|
9
9
|
DEFAULT_MAX_RETRY_DELAY: Float
|
|
10
10
|
|
|
11
|
-
attr_reader api_key: String
|
|
11
|
+
attr_reader api_key: String?
|
|
12
12
|
|
|
13
13
|
attr_reader account: GrowsurfRuby::Resources::Account
|
|
14
14
|
|
|
15
|
+
attr_reader team: GrowsurfRuby::Resources::Team
|
|
16
|
+
|
|
15
17
|
attr_reader campaign: GrowsurfRuby::Resources::Campaign
|
|
16
18
|
|
|
17
19
|
private def auth_headers: -> ::Hash[String, String]
|
|
@@ -4,7 +4,6 @@ module GrowsurfRuby
|
|
|
4
4
|
{
|
|
5
5
|
api_key: String,
|
|
6
6
|
email: String,
|
|
7
|
-
id: String,
|
|
8
7
|
verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
9
8
|
}
|
|
10
9
|
|
|
@@ -13,21 +12,17 @@ module GrowsurfRuby
|
|
|
13
12
|
|
|
14
13
|
attr_accessor email: String
|
|
15
14
|
|
|
16
|
-
attr_accessor id: String
|
|
17
|
-
|
|
18
15
|
attr_accessor verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
19
16
|
|
|
20
17
|
def initialize: (
|
|
21
18
|
api_key: String,
|
|
22
19
|
email: String,
|
|
23
|
-
id: String,
|
|
24
20
|
verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
25
21
|
) -> void
|
|
26
22
|
|
|
27
23
|
def to_hash: -> {
|
|
28
24
|
api_key: String,
|
|
29
25
|
email: String,
|
|
30
|
-
id: String,
|
|
31
26
|
verification_status: GrowsurfRuby::Models::AccountCreateResponse::verification_status
|
|
32
27
|
}
|
|
33
28
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type team =
|
|
4
|
+
{
|
|
5
|
+
name: String,
|
|
6
|
+
verification_status: GrowsurfRuby::Models::Team::verification_status,
|
|
7
|
+
verification_requested_at: Integer?
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class Team < GrowsurfRuby::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor name: String
|
|
12
|
+
attr_accessor verification_status: GrowsurfRuby::Models::Team::verification_status
|
|
13
|
+
attr_accessor verification_requested_at: Integer?
|
|
14
|
+
|
|
15
|
+
def initialize: (
|
|
16
|
+
name: String,
|
|
17
|
+
verification_status: GrowsurfRuby::Models::Team::verification_status,
|
|
18
|
+
verification_requested_at: Integer?
|
|
19
|
+
) -> void
|
|
20
|
+
|
|
21
|
+
def to_hash: -> GrowsurfRuby::Models::team
|
|
22
|
+
|
|
23
|
+
type verification_status = :NOT_REQUESTED | :REQUESTED | :VERIFIED
|
|
24
|
+
|
|
25
|
+
module VerificationStatus
|
|
26
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
27
|
+
|
|
28
|
+
NOT_REQUESTED: :NOT_REQUESTED
|
|
29
|
+
REQUESTED: :REQUESTED
|
|
30
|
+
VERIFIED: :VERIFIED
|
|
31
|
+
|
|
32
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::Team::verification_status]
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type team_resend_owner_verification_email_response =
|
|
4
|
+
{
|
|
5
|
+
status: GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::status,
|
|
6
|
+
success: bool
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
class TeamResendOwnerVerificationEmailResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor status: GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::status
|
|
11
|
+
attr_accessor success: bool
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
status: GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::status,
|
|
15
|
+
success: bool
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> GrowsurfRuby::Models::team_resend_owner_verification_email_response
|
|
19
|
+
|
|
20
|
+
type status = :SENT
|
|
21
|
+
|
|
22
|
+
module Status
|
|
23
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
24
|
+
|
|
25
|
+
SENT: :SENT
|
|
26
|
+
|
|
27
|
+
def self?.values: -> ::Array[GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse::status]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module GrowsurfRuby
|
|
2
2
|
module Models
|
|
3
|
-
type
|
|
3
|
+
type team_rotate_api_key_response = { api_key: String }
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class TeamRotateAPIKeyResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
6
6
|
attr_accessor api_key: String
|
|
7
7
|
|
|
8
8
|
def initialize: (api_key: String) -> void
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Models
|
|
3
|
+
type team_update_params =
|
|
4
|
+
{ name: String } & GrowsurfRuby::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class TeamUpdateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor name: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
name: String,
|
|
14
|
+
?request_options: GrowsurfRuby::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
name: String,
|
|
19
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module GrowsurfRuby
|
|
2
|
-
class Account = GrowsurfRuby::Models::Account
|
|
3
|
-
|
|
4
2
|
class AccountCreateParams = GrowsurfRuby::Models::AccountCreateParams
|
|
5
3
|
|
|
6
|
-
class
|
|
4
|
+
class Team = GrowsurfRuby::Models::Team
|
|
5
|
+
|
|
6
|
+
class TeamUpdateParams = GrowsurfRuby::Models::TeamUpdateParams
|
|
7
7
|
|
|
8
8
|
module Campaign = GrowsurfRuby::Models::Campaign
|
|
9
9
|
|
|
@@ -9,29 +9,6 @@ module GrowsurfRuby
|
|
|
9
9
|
?request_options: GrowsurfRuby::request_opts
|
|
10
10
|
) -> GrowsurfRuby::Models::AccountCreateResponse
|
|
11
11
|
|
|
12
|
-
def retrieve: (
|
|
13
|
-
?request_options: GrowsurfRuby::request_opts
|
|
14
|
-
) -> GrowsurfRuby::Account
|
|
15
|
-
|
|
16
|
-
def update: (
|
|
17
|
-
?company: String,
|
|
18
|
-
?first_name: String,
|
|
19
|
-
?last_name: String,
|
|
20
|
-
?request_options: GrowsurfRuby::request_opts
|
|
21
|
-
) -> GrowsurfRuby::Account
|
|
22
|
-
|
|
23
|
-
def rotate_api_key: (
|
|
24
|
-
?request_options: GrowsurfRuby::request_opts
|
|
25
|
-
) -> GrowsurfRuby::Models::AccountRotateAPIKeyResponse
|
|
26
|
-
|
|
27
|
-
def request_verification: (
|
|
28
|
-
?request_options: GrowsurfRuby::request_opts
|
|
29
|
-
) -> GrowsurfRuby::Account
|
|
30
|
-
|
|
31
|
-
def resend_verification_email: (
|
|
32
|
-
?request_options: GrowsurfRuby::request_opts
|
|
33
|
-
) -> GrowsurfRuby::Models::AccountResendVerificationEmailResponse
|
|
34
|
-
|
|
35
12
|
def initialize: (client: GrowsurfRuby::Client) -> void
|
|
36
13
|
end
|
|
37
14
|
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module GrowsurfRuby
|
|
2
|
+
module Resources
|
|
3
|
+
class Team
|
|
4
|
+
def retrieve: (
|
|
5
|
+
?request_options: GrowsurfRuby::request_opts
|
|
6
|
+
) -> GrowsurfRuby::Models::Team
|
|
7
|
+
|
|
8
|
+
def update: (
|
|
9
|
+
name: String,
|
|
10
|
+
?request_options: GrowsurfRuby::request_opts
|
|
11
|
+
) -> GrowsurfRuby::Models::Team
|
|
12
|
+
|
|
13
|
+
def rotate_api_key: (
|
|
14
|
+
?request_options: GrowsurfRuby::request_opts
|
|
15
|
+
) -> GrowsurfRuby::Models::TeamRotateAPIKeyResponse
|
|
16
|
+
|
|
17
|
+
def request_verification: (
|
|
18
|
+
?request_options: GrowsurfRuby::request_opts
|
|
19
|
+
) -> GrowsurfRuby::Models::Team
|
|
20
|
+
|
|
21
|
+
def resend_owner_verification_email: (
|
|
22
|
+
?request_options: GrowsurfRuby::request_opts
|
|
23
|
+
) -> GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse
|
|
24
|
+
|
|
25
|
+
def initialize: (client: GrowsurfRuby::Client) -> void
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|