DodoPayments.ProductCollections.Groups (dodo_payments v0.1.0)

Copy Markdown View Source

Groups within a product collection.

Summary

Types

Parameters for collection_groups_create. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/product-collections/groups/groups.ts declaration GroupCreateParams.

Parameters for collection_groups_update. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/product-collections/groups/groups.ts declaration GroupUpdateParams.

Functions

Calls Dodo operation collection_groups_create (POST /product-collections/{id}/groups). Required parameters: :products.

Calls Dodo operation collection_groups_create (POST /product-collections/{id}/groups). Required parameters: :products.

Calls Dodo operation collection_groups_delete (DELETE /product-collections/{id}/groups/{group_id}). Required parameters: none.

Calls Dodo operation collection_groups_update (PATCH /product-collections/{id}/groups/{group_id}). Required parameters: none.

Calls Dodo operation collection_groups_update (PATCH /product-collections/{id}/groups/{group_id}). Required parameters: none.

Calls Dodo operation collection_groups_update (PATCH /product-collections/{id}/groups/{group_id}). Required parameters: none.

Types

create_params()

@type create_params() ::
  %{
    :products => [DodoPayments.RequestTypes.collection_group_product()],
    optional(:group_name) => String.t(),
    optional(:status) => boolean(),
    optional(String.t()) => DodoPayments.RequestTypes.input_value()
  }
  | DodoPayments.RequestTypes.compatibility_params()

Parameters for collection_groups_create. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/product-collections/groups/groups.ts declaration GroupCreateParams.

update_params()

@type update_params() ::
  %{
    optional(:group_name) => String.t(),
    optional(:product_order) => [String.t()],
    optional(:status) => boolean(),
    optional(String.t()) => DodoPayments.RequestTypes.input_value()
  }
  | DodoPayments.RequestTypes.compatibility_params()

Parameters for collection_groups_update. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/product-collections/groups/groups.ts declaration GroupUpdateParams.

Functions

create(client, id, params)

Calls Dodo operation collection_groups_create (POST /product-collections/{id}/groups). Required parameters: :products.

API parameters must be supplied as a map.

create(client, id, params, opts)

Calls Dodo operation collection_groups_create (POST /product-collections/{id}/groups). Required parameters: :products.

The final argument contains request-local options.

delete(client, id, group_id, opts \\ [])

@spec delete(
  DodoPayments.Client.t(),
  String.t() | integer(),
  String.t() | integer(),
  keyword()
) ::
  {:ok, nil | DodoPayments.Response.t(nil)} | {:error, Exception.t()}

Calls Dodo operation collection_groups_delete (DELETE /product-collections/{id}/groups/{group_id}). Required parameters: none.

Options are request-local.

update(client, id, group_id)

@spec update(DodoPayments.Client.t(), String.t() | integer(), String.t() | integer()) ::
  {:ok, nil} | {:error, Exception.t()}

Calls Dodo operation collection_groups_update (PATCH /product-collections/{id}/groups/{group_id}). Required parameters: none.

Calls the operation with an empty parameter map.

update(client, id, group_id, opts)

@spec update(
  DodoPayments.Client.t(),
  String.t() | integer(),
  String.t() | integer(),
  update_params() | nil | keyword()
) :: {:ok, nil | DodoPayments.Response.t(nil)} | {:error, Exception.t()}

Calls Dodo operation collection_groups_update (PATCH /product-collections/{id}/groups/{group_id}). Required parameters: none.

Pass a map for Dodo parameters or a keyword list for request-local options.

update(client, id, group_id, params, opts)

@spec update(
  DodoPayments.Client.t(),
  String.t() | integer(),
  String.t() | integer(),
  update_params() | nil,
  keyword()
) :: {:ok, nil | DodoPayments.Response.t(nil)} | {:error, Exception.t()}

Calls Dodo operation collection_groups_update (PATCH /product-collections/{id}/groups/{group_id}). Required parameters: none.

Accepts both a Dodo parameter map and request-local options.