Class: Increase::Resources::OAuthApplications

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ OAuthApplications

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

Parameters:



62
63
64
# File 'lib/increase/resources/oauth_applications.rb', line 62

def initialize(client:)
  @client = client
end

Instance Method Details

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

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

List OAuth Applications

Parameters:

Returns:

See Also:



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

def list(params = {})
  parsed, options = Increase::OAuthApplicationListParams.dump_request(params)
  query = Increase::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "oauth_applications",
    query: query,
    page: Increase::Internal::Page,
    model: Increase::OAuthApplication,
    options: options
  )
end

#retrieve(oauth_application_id, request_options: {}) ⇒ Increase::Models::OAuthApplication

Retrieve an OAuth Application

Parameters:

  • oauth_application_id (String)

    The identifier of the OAuth Application.

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

Returns:

See Also:



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

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