# NOTE: This class is auto generated by the swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # Do not edit the class manually. defmodule DocuSign.Api.AccountBrands do @moduledoc """ API calls for all endpoints tagged `AccountBrands`. """ alias DocuSign.Connection import DocuSign.RequestBuilder @doc """ Removes a brand. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - brand_id (String.t): The unique identifier of a brand. - opts (KeywordList): [optional] Optional parameters ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec brand_delete_brand(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()} def brand_delete_brand(connection, account_id, brand_id, _opts \\ []) do %{} |> method(:delete) |> url("/v2/accounts/#{account_id}/brands/#{brand_id}") |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Export a specific brand. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - brand_id (String.t): The unique identifier of a brand. - opts (KeywordList): [optional] Optional parameters ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec brand_export_get_brand_export_file(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()} def brand_export_get_brand_export_file(connection, account_id, brand_id, _opts \\ []) do %{} |> method(:get) |> url("/v2/accounts/#{account_id}/brands/#{brand_id}/file") |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Get information for a specific brand. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - brand_id (String.t): The unique identifier of a brand. - opts (KeywordList): [optional] Optional parameters - :include_external_references (String.t): - :include_logos (String.t): ## Returns {:ok, %DocuSign.Model.Brand{}} on success {:error, info} on failure """ @spec brand_get_brand(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, DocuSign.Model.Brand.t()} | {:error, Tesla.Env.t()} def brand_get_brand(connection, account_id, brand_id, opts \\ []) do optional_params = %{ include_external_references: :query, include_logos: :query } %{} |> method(:get) |> url("/v2/accounts/#{account_id}/brands/#{brand_id}") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%DocuSign.Model.Brand{}) end @doc """ Delete one branding logo. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - brand_id (String.t): The unique identifier of a brand. - logo_type (String.t): One of **Primary**, **Secondary** or **Email**. - opts (KeywordList): [optional] Optional parameters ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec brand_logo_delete_brand_logo( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()} def brand_logo_delete_brand_logo(connection, account_id, brand_id, logo_type, _opts \\ []) do %{} |> method(:delete) |> url("/v2/accounts/#{account_id}/brands/#{brand_id}/logos/#{logo_type}") |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Obtains the specified image for a brand. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - brand_id (String.t): The unique identifier of a brand. - logo_type (String.t): One of **Primary**, **Secondary** or **Email**. - opts (KeywordList): [optional] Optional parameters ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec brand_logo_get_brand_logo( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()} def brand_logo_get_brand_logo(connection, account_id, brand_id, logo_type, _opts \\ []) do %{} |> method(:get) |> url("/v2/accounts/#{account_id}/brands/#{brand_id}/logos/#{logo_type}") |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Put one branding logo. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - brand_id (String.t): The unique identifier of a brand. - logo_type (String.t): One of **Primary**, **Secondary** or **Email**. - opts (KeywordList): [optional] Optional parameters ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec brand_logo_put_brand_logo( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()} def brand_logo_put_brand_logo(connection, account_id, brand_id, logo_type, _opts \\ []) do %{} |> method(:put) |> url("/v2/accounts/#{account_id}/brands/#{brand_id}/logos/#{logo_type}") |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Updates an existing brand. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - brand_id (String.t): The unique identifier of a brand. - opts (KeywordList): [optional] Optional parameters - :brand (Brand): ## Returns {:ok, %DocuSign.Model.Brand{}} on success {:error, info} on failure """ @spec brand_put_brand(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, DocuSign.Model.Brand.t()} | {:error, Tesla.Env.t()} def brand_put_brand(connection, account_id, brand_id, opts \\ []) do optional_params = %{ brand: :body } %{} |> method(:put) |> url("/v2/accounts/#{account_id}/brands/#{brand_id}") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%DocuSign.Model.Brand{}) end @doc """ Returns the specified branding resource file. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - brand_id (String.t): The unique identifier of a brand. - resource_content_type (String.t): - opts (KeywordList): [optional] Optional parameters - :langcode (String.t): - :return_master (String.t): ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec brand_resources_get_brand_resources( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()} def brand_resources_get_brand_resources( connection, account_id, brand_id, resource_content_type, opts \\ [] ) do optional_params = %{ langcode: :query, return_master: :query } %{} |> method(:get) |> url("/v2/accounts/#{account_id}/brands/#{brand_id}/resources/#{resource_content_type}") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Returns the specified account's list of branding resources (metadata). ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - brand_id (String.t): The unique identifier of a brand. - opts (KeywordList): [optional] Optional parameters ## Returns {:ok, %DocuSign.Model.BrandResourcesList{}} on success {:error, info} on failure """ @spec brand_resources_get_brand_resources_list( Tesla.Env.client(), String.t(), String.t(), keyword() ) :: {:ok, DocuSign.Model.BrandResourcesList.t()} | {:error, Tesla.Env.t()} def brand_resources_get_brand_resources_list(connection, account_id, brand_id, _opts \\ []) do %{} |> method(:get) |> url("/v2/accounts/#{account_id}/brands/#{brand_id}/resources") |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%DocuSign.Model.BrandResourcesList{}) end @doc """ Uploads a branding resource file. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - brand_id (String.t): The unique identifier of a brand. - resource_content_type (String.t): - opts (KeywordList): [optional] Optional parameters ## Returns {:ok, %DocuSign.Model.BrandResources{}} on success {:error, info} on failure """ @spec brand_resources_put_brand_resources( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, DocuSign.Model.BrandResources.t()} | {:error, Tesla.Env.t()} def brand_resources_put_brand_resources( connection, account_id, brand_id, resource_content_type, _opts \\ [] ) do %{} |> method(:put) |> url("/v2/accounts/#{account_id}/brands/#{brand_id}/resources/#{resource_content_type}") |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%DocuSign.Model.BrandResources{}) end @doc """ Deletes one or more brand profiles. Deletes one or more brand profiles from an account. The Account Branding feature (accountSettings properties `canSelfBrandSend` and `canSelfBrandSend`) must be set to **true** to use this call. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - opts (KeywordList): [optional] Optional parameters - :brands_request (BrandsRequest): ## Returns {:ok, %DocuSign.Model.AccountBrands{}} on success {:error, info} on failure """ @spec brands_delete_brands(Tesla.Env.client(), String.t(), keyword()) :: {:ok, DocuSign.Model.AccountBrands.t()} | {:error, Tesla.Env.t()} def brands_delete_brands(connection, account_id, opts \\ []) do optional_params = %{ brandsRequest: :body } %{} |> method(:delete) |> url("/v2/accounts/#{account_id}/brands") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%DocuSign.Model.AccountBrands{}) end @doc """ Gets a list of brand profiles. Retrieves the list of brand profiles associated with the account and the default brand profiles. The Account Branding feature (accountSettings properties `canSelfBrandSend` and `canSelfBrandSend`) must be set to **true** for the account to use this call. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - opts (KeywordList): [optional] Optional parameters - :exclude_distributor_brand (String.t): When set to **true**, excludes distributor brand information from the response set. - :include_logos (String.t): When set to **true**, returns the logos associated with the brand. ## Returns {:ok, %DocuSign.Model.AccountBrands{}} on success {:error, info} on failure """ @spec brands_get_brands(Tesla.Env.client(), String.t(), keyword()) :: {:ok, DocuSign.Model.AccountBrands.t()} | {:error, Tesla.Env.t()} def brands_get_brands(connection, account_id, opts \\ []) do optional_params = %{ exclude_distributor_brand: :query, include_logos: :query } %{} |> method(:get) |> url("/v2/accounts/#{account_id}/brands") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%DocuSign.Model.AccountBrands{}) end @doc """ Creates one or more brand profile files for the account. Creates one or more brand profile files for the account. The Account Branding feature (accountSettings properties `canSelfBrandSend` and `canSelfBrandSig`) must be set to **true** for the account to use this call. An error is returned if `brandId` property for a brand profile is already set for the account. To upload a new version of an existing brand profile, you must delete the profile and then upload the newer version. When brand profile files are being uploaded, they must be combined into one zip file and the `Content-Type` must be `application/zip`. ## Parameters - connection (DocuSign.Connection): Connection to server - account_id (String.t): The external account number (int) or account ID Guid. - opts (KeywordList): [optional] Optional parameters - :brand (Brand): ## Returns {:ok, %DocuSign.Model.AccountBrands{}} on success {:error, info} on failure """ @spec brands_post_brands(Tesla.Env.client(), String.t(), keyword()) :: {:ok, DocuSign.Model.AccountBrands.t()} | {:error, Tesla.Env.t()} def brands_post_brands(connection, account_id, opts \\ []) do optional_params = %{ brand: :body } %{} |> method(:post) |> url("/v2/accounts/#{account_id}/brands") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%DocuSign.Model.AccountBrands{}) end end