Skip to content

# Utilities

class terminusgps.authorizenet.utils.ControllerExecutionMixin
  static execute_controller(controller: APIOperationBase) → dict | None

    Executes an Authorizenet controller and returns its response.

    Parameters:

      controller (`APIOperationBase`) – An Authorizenet API controller.

    Raises:

      ControllerExecutionError – If the API call fails.

    Returns:

      An Authorizenet API response, if any.

    Return type:

      `dict` | `None`

exception terminusgps.authorizenet.errors.ControllerExecutionError(message: str, code: str, *args, **kwargs)

  Raised when an Authorizenet API controller fails to execute.

terminusgps.authorizenet.utils.get_customer_profile_ids() → list[int]

  Returns a list of all customer profile ids in Authorizenet.

  Raises:

    ValueError – If something goes wrong calling the Authorizenet API.

  Returns:

    A list of all customer profile ids in Authorizenet.

  Return type:

    `list`