Class: GrowsurfRuby::Resources::Team

Inherits:
Object
  • Object
show all
Defined in:
lib/growsurf_ruby/resources/team.rb,
sig/growsurf_ruby/resources/team.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Team

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Team.

Parameters:



104
105
106
# File 'lib/growsurf_ruby/resources/team.rb', line 104

def initialize(client:)
  @client = client
end

Instance Method Details

#request_verification(request_options: {}) ⇒ GrowsurfRuby::Models::Team

Requests GrowSurf verification for the bound team. Calling this again while a request is pending does not create a duplicate.

Parameters:

Returns:



75
76
77
78
79
80
81
82
# File 'lib/growsurf_ruby/resources/team.rb', line 75

def request_verification(params = {})
  @client.request(
    method: :post,
    path: "team/verification-request",
    model: GrowsurfRuby::Models::Team,
    options: params[:request_options]
  )
end

#resend_owner_verification_email(request_options: {}) ⇒ GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse

Resends the email-verification message to the bound team's owner. The response never reveals the owner's email address.

Parameters:

Returns:



92
93
94
95
96
97
98
99
# File 'lib/growsurf_ruby/resources/team.rb', line 92

def resend_owner_verification_email(params = {})
  @client.request(
    method: :post,
    path: "team/owner/verification-email",
    model: GrowsurfRuby::Models::TeamResendOwnerVerificationEmailResponse,
    options: params[:request_options]
  )
end

#retrieve(request_options: {}) ⇒ GrowsurfRuby::Models::Team

Retrieves the team bound to the API key or OAuth connection. A credential that can act across multiple teams cannot use this operation because it has no single Team resource.

Parameters:

Returns:



15
16
17
18
19
20
21
22
# File 'lib/growsurf_ruby/resources/team.rb', line 15

def retrieve(params = {})
  @client.request(
    method: :get,
    path: "team",
    model: GrowsurfRuby::Models::Team,
    options: params[:request_options]
  )
end

#rotate_api_key(request_options: {}) ⇒ GrowsurfRuby::Models::TeamRotateAPIKeyResponse

Generates a new API key and makes the key used on this request stop working when rotation succeeds. The SDK sends a retry-safe Idempotency-Key, so automatic retries return the same replacement. Store the new key, then update every integration that used the old key. This operation is unavailable through MCP.

Parameters:

Returns:



58
59
60
61
62
63
64
65
# File 'lib/growsurf_ruby/resources/team.rb', line 58

def rotate_api_key(params = {})
  @client.request(
    method: :post,
    path: "api-key/rotate",
    model: GrowsurfRuby::Models::TeamRotateAPIKeyResponse,
    options: params[:request_options]
  )
end

#update(name:, request_options: {}) ⇒ GrowsurfRuby::Models::Team

Updates the name of the team bound to the API key or OAuth connection. Any other property is rejected with a 400.

Parameters:

Returns:

See Also:



36
37
38
39
40
41
42
43
44
45
# File 'lib/growsurf_ruby/resources/team.rb', line 36

def update(params)
  parsed, options = GrowsurfRuby::TeamUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: "team",
    body: parsed,
    model: GrowsurfRuby::Models::Team,
    options: options
  )
end