Service

exception terminusgps.authorizenet.service.AuthorizenetControllerExecutionError(message: str, code: str, *args, **kwargs)[source]

Raised when an Authorizenet API controller fails to execute.

property code: str

An Authorizenet API error code.

property message: str

An Authorizenet API error message.

class terminusgps.authorizenet.service.AuthorizenetService[source]

Base service for safely interacting with the Authorizenet API.

Public Data Attributes:

REQUIRED_SETTINGS

Public Methods:

__init__()

Raises ImproperlyConfigured if required settings weren't set.

execute(request_tuple[, reference_id])

Adds required authentication data to the Authorizenet API request before executing it and returning its response.

merchantAuthentication

Merchant authentication element for Authorizenet API requests.

environment

Environment for Authorizenet API requests.

validationMode

Validation mode for Authorizenet API requests.

Private Data Attributes:

_abc_impl

Inherited from ABC

_abc_impl


execute(request_tuple: tuple[ObjectifiedElement, type[APIOperationBase]], reference_id: str | None = None) ObjectifiedElement[source]

Adds required authentication data to the Authorizenet API request before executing it and returning its response.

If reference_id was provided, it is added to the request before execution.

Parameters:
  • request_tuple (tuple[ObjectifiedElement, type[APIOperationBase]]) – A tuple containing an Authorizenet API request contract and a controller class to execute it with.

  • reference_id (str | None) – An optional reference id string for the API call. Default is None.

Raises:

AuthorizenetControllerExecutionError – If the API call failed.

Returns:

An Authorizenet API response.

Return type:

ObjectifiedElement

property environment: str

Environment for Authorizenet API requests.

property merchantAuthentication: merchantAuthenticationType

Merchant authentication element for Authorizenet API requests.

property validationMode: str

Validation mode for Authorizenet API requests.