DodoPayments.ProductCollections (dodo_payments v0.1.0)

Copy Markdown View Source

Product collection lifecycle operations.

Summary

Types

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

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

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

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

Functions

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

Calls Dodo operation product_collections_create (POST /product-collections). Required parameters: :groups, :name.

Calls Dodo operation product_collections_create (POST /product-collections). Required parameters: :groups, :name.

Calls Dodo operation product_collections_list (GET /product-collections). Required parameters: none. Numbered pagination is zero-based.

Calls Dodo operation product_collections_list (GET /product-collections). Required parameters: none. Numbered pagination is zero-based.

Calls Dodo operation product_collections_list (GET /product-collections). Required parameters: none. Numbered pagination is zero-based.

Calls Dodo operation product_collections_retrieve (GET /product-collections/{id}). Required parameters: none.

Calls Dodo operation product_collections_unarchive (POST /product-collections/{id}/unarchive). Required parameters: none.

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

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

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

Calls Dodo operation product_collections_update_images (PUT /product-collections/{id}/images). Required parameters: none.

Calls Dodo operation product_collections_update_images (PUT /product-collections/{id}/images). Required parameters: none.

Calls Dodo operation product_collections_update_images (PUT /product-collections/{id}/images). Required parameters: none.

Types

create_params()

@type create_params() ::
  %{
    :groups => [DodoPayments.RequestTypes.collection_group()],
    :name => String.t(),
    optional(:brand_id) => String.t(),
    optional(:description) => String.t(),
    optional(:effective_at_on_downgrade) => DodoPayments.Enums.effective_at(),
    optional(:effective_at_on_upgrade) => DodoPayments.Enums.effective_at(),
    optional(:on_payment_failure) =>
      DodoPayments.Enums.payment_failure_behavior(),
    optional(:proration_billing_mode_on_downgrade) =>
      DodoPayments.Enums.proration_billing_mode(),
    optional(:proration_billing_mode_on_upgrade) =>
      DodoPayments.Enums.proration_billing_mode(),
    optional(String.t()) => DodoPayments.RequestTypes.input_value()
  }
  | DodoPayments.RequestTypes.compatibility_params()

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

list_params()

@type list_params() ::
  %{
    optional(:page_number) => number(),
    optional(:page_size) => number(),
    optional(:archived) => boolean(),
    optional(:brand_id) => String.t(),
    optional(String.t()) => DodoPayments.RequestTypes.input_value()
  }
  | DodoPayments.RequestTypes.compatibility_params()

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

update_images_params()

@type update_images_params() ::
  %{
    optional(:force_update) => boolean(),
    optional(String.t()) => DodoPayments.RequestTypes.input_value()
  }
  | DodoPayments.RequestTypes.compatibility_params()

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

update_params()

@type update_params() ::
  %{
    optional(:brand_id) => String.t(),
    optional(:description) => String.t(),
    optional(:effective_at_on_downgrade) => DodoPayments.Enums.effective_at(),
    optional(:effective_at_on_upgrade) => DodoPayments.Enums.effective_at(),
    optional(:group_order) => [String.t()],
    optional(:image_id) => String.t(),
    optional(:name) => String.t(),
    optional(:on_payment_failure) =>
      DodoPayments.Enums.payment_failure_behavior(),
    optional(:proration_billing_mode_on_downgrade) =>
      DodoPayments.Enums.proration_billing_mode(),
    optional(:proration_billing_mode_on_upgrade) =>
      DodoPayments.Enums.proration_billing_mode(),
    optional(String.t()) => DodoPayments.RequestTypes.input_value()
  }
  | DodoPayments.RequestTypes.compatibility_params()

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

Functions

archive(client, id, opts \\ [])

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

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

Options are request-local.

create(client, params)

Calls Dodo operation product_collections_create (POST /product-collections). Required parameters: :groups, :name.

API parameters must be supplied as a map.

create(client, params, opts)

Calls Dodo operation product_collections_create (POST /product-collections). Required parameters: :groups, :name.

The final argument contains request-local options.

list(client)

Calls Dodo operation product_collections_list (GET /product-collections). Required parameters: none. Numbered pagination is zero-based.

Calls the operation with an empty parameter map.

list(client, opts)

Calls Dodo operation product_collections_list (GET /product-collections). Required parameters: none. Numbered pagination is zero-based.

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

list(client, params, opts)

Calls Dodo operation product_collections_list (GET /product-collections). Required parameters: none. Numbered pagination is zero-based.

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

retrieve(client, id, opts \\ [])

Calls Dodo operation product_collections_retrieve (GET /product-collections/{id}). Required parameters: none.

Options are request-local.

unarchive(client, id, opts \\ [])

Calls Dodo operation product_collections_unarchive (POST /product-collections/{id}/unarchive). Required parameters: none.

Options are request-local.

update(client, id)

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

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

Calls the operation with an empty parameter map.

update(client, id, opts)

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

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

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

update(client, id, params, opts)

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

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

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

update_images(client, id)

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

Calls Dodo operation product_collections_update_images (PUT /product-collections/{id}/images). Required parameters: none.

Calls the operation with an empty parameter map.

update_images(client, id, opts)

Calls Dodo operation product_collections_update_images (PUT /product-collections/{id}/images). Required parameters: none.

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

update_images(client, id, params, opts)

Calls Dodo operation product_collections_update_images (PUT /product-collections/{id}/images). Required parameters: none.

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