Class: Courier::Resources::Providers::Catalog

Inherits:
Object
  • Object
show all
Defined in:
lib/courier/resources/providers/catalog.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Catalog

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

Parameters:



43
44
45
# File 'lib/courier/resources/providers/catalog.rb', line 43

def initialize(client:)
  @client = client
end

Instance Method Details

#list(channel: nil, keys: nil, name: nil, request_options: {}) ⇒ Courier::Models::Providers::CatalogListResponse

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

Returns the catalog of available provider types with their display names, descriptions, and configuration schema fields (snake_case, with ‘type` and `required`). Providers with no configurable schema return only `provider`, `name`, and `description`.

Parameters:

  • channel (String)

    Exact match (case-insensitive) against the provider channel taxonomy (e.g. ‘emai

  • keys (String)

    Comma-separated provider keys to filter by (e.g. ‘sendgrid,twilio`).

  • name (String)

    Case-insensitive substring match against the provider display name.

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

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/courier/resources/providers/catalog.rb', line 28

def list(params = {})
  parsed, options = Courier::Providers::CatalogListParams.dump_request(params)
  query = Courier::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "providers/catalog",
    query: query,
    model: Courier::Models::Providers::CatalogListResponse,
    options: options
  )
end