Utilities

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

Returns a list of all customer profile ids in Authorizenet.

Raises:

AuthorizenetControllerExecutionError – If the API call fails.

Returns:

A list of all customer profile ids in Authorizenet.

Return type:

list

terminusgps.authorizenet.utils.generate_customer_address(form: Form) customerAddressType[source]

Takes a form and returns a customerAddressType.

Parameters:

form (Form) – A Django form.

Raises:
  • ValueError – If address wasn’t in the form.

  • ValueError – If first_name wasn’t in the form.

  • ValueError – If last_name wasn’t in the form.

Returns:

A customer address object.

Return type:

customerAddressType

terminusgps.authorizenet.utils.generate_customer_payment(form: Form) paymentType[source]

Takes a form and returns a paymentType.

Parameters:

form (Form) – A Django form.

Raises:

ValueError – If credit_card wasn’t in the form.

Returns:

A payment object.

Return type:

paymentType