Class: Increase::Resources::OAuthConnections

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/oauth_connections.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ OAuthConnections

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 OAuthConnections.

Parameters:



61
62
63
# File 'lib/increase/resources/oauth_connections.rb', line 61

def initialize(client:)
  @client = client
end

Instance Method Details

#list(cursor: nil, limit: nil, oauth_application_id: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::OAuthConnection>

Some parameter documentations has been truncated, see Models::OAuthConnectionListParams for more details.

List OAuth Connections

Parameters:

  • cursor (String)

    Return the page of entries after this one.

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

  • oauth_application_id (String)

    Filter results to only include OAuth Connections for a specific OAuth Applicatio

  • status (Increase::Models::OAuthConnectionListParams::Status)
  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/increase/resources/oauth_connections.rb', line 46

def list(params = {})
  parsed, options = Increase::OAuthConnectionListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "oauth_connections",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::OAuthConnection,
    options: options
  )
end

#retrieve(oauth_connection_id, request_options: {}) ⇒ Increase::Models::OAuthConnection

Retrieve an OAuth Connection

Parameters:

  • oauth_connection_id (String)

    The identifier of the OAuth Connection.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



17
18
19
20
21
22
23
24
# File 'lib/increase/resources/oauth_connections.rb', line 17

def retrieve(oauth_connection_id, params = {})
  @client.request(
    method: :get,
    path: ["oauth_connections/%1$s", oauth_connection_id],
    model: Increase::OAuthConnection,
    options: params[:request_options]
  )
end