Profiles

class terminusgps.authorizenet.profiles.base.AuthorizenetProfileBase(merchant_id: int | str, id: int | str | None = None, **kwargs)[source]
execute_controller(controller: APIOperationBase) dict[source]

Executes an Authorize.NET controller and returns its response.

Parameters:

controller – An Authorize.NET API controller.

Raises:

ValueError – If the API call fails.

Returns:

The Authorize.NET API response.

Return type:

dict

class terminusgps.authorizenet.profiles.base.AuthorizenetSubProfileBase(customer_profile_id: int | str, default: bool, *args, **kwargs)[source]
class terminusgps.authorizenet.profiles.addresses.AddressProfile(customer_profile_id: int | str, default: bool, *args, **kwargs)[source]
create(**kwargs) int[source]

Creates an Authorize.NET address profile.

Parameters:

shipping_addr (customerAddressType) – An Authorize.NET customer address.

Raises:
  • ValueError – If no customer address was provided.

  • TypeError – If the customer address is not a customerAddressType object.

Returns:

The new address profile’s id.

Return type:

int

delete() dict[source]

Deletes the Authorize.NET payment profile.

update(shipping_addr: customerAddressType) dict[source]

Updates the Authorize.NET payment profile.

class terminusgps.authorizenet.profiles.customers.CustomerProfile(merchant_id: int | str, id: int | str | None = None, **kwargs)[source]
_authorizenet_create_customer_profile(email: str, desc: str = '') dict[str, str][source]

Executes a createCustomerProfileRequest using the Authorize.NET API.

_authorizenet_delete_customer_profile() dict[source]

Executes a deleteCustomerProfileRequest using the Authorize.NET API.

_authorizenet_get_customer_profile(issuer_info: bool = True) dict[source]

Executes a getCustomerProfileRequest using the Authorize.NET API.

_authorizenet_update_customer_profile(email: str, desc: str = '') dict[source]

Executes an updateCustomerProfileRequest using the Authorize.NET API.

create(**kwargs) int[source]

Creates the customer profile.

Parameters:
  • email (str) – An email address for the customer profile.

  • desc (str | None) – A description describing the customer profile. Optional.

Returns:

The new customer profile id.

Return type:

int

delete() dict[source]

Deletes the customer profile.

get_payment_profiles() list[dict] | None[source]

Retrieves the customer profile’s payment profiles list.

get_shipping_addresses() list[dict] | None[source]

Retrieves the customer profile’s shipping address list.

update(email: str, desc: str = '') dict[source]

Updates the customer profile.

class terminusgps.authorizenet.profiles.payments.PaymentProfile(customer_profile_id: int | str, default: bool, *args, **kwargs)[source]
create(**kwargs) int[source]

Creates an Authorize.NET payment profile.

Parameters:
  • billing_addr (customerAddressType) – An Authorize.NET customer address.

  • payment (paymentType) – An Authorize.NET API payment.

Returns:

The new payment profile’s id.

Return type:

int

delete() dict[source]

Deletes the Authorize.NET payment profile.

update(billing_addr: customerAddressType, payment: paymentType) dict[source]

Updates the Authorize.NET payment profile.