Profiles

Base

class terminusgps.authorizenet.profiles.base.AuthorizenetProfileBase(id: int | str | None = None, *args, **kwargs)[source]

Base class for Authorizenet profiles.

Public Data Attributes:

id

An Authorizenet generated id.

merchantAuthentication

A merchant authentication object to authenticate Authorizenet API calls.

Public Methods:

__init__([id])

Sets id if provided.

__str__()

Returns a string representation of the profile, if id was set.

Inherited from AuthorizenetControllerExecutor

execute_controller(controller)

Executes an Authorizenet API controller and returns its response.


property id: str | None

An Authorizenet generated id.

Type:

str | None

property merchantAuthentication: merchantAuthenticationType

A merchant authentication object to authenticate Authorizenet API calls.

Returns:

A merchant authentication object.

Return type:

merchantAuthenticationType

class terminusgps.authorizenet.profiles.base.AuthorizenetSubProfileBase(customer_profile_id: int | str, id: int | str | None = None, default: bool = False)[source]

Base class for Authorizenet ‘sub-profiles’, profiles that have an associated customer profile.

Public Data Attributes:

validationMode

customerProfileId

A customer profile id.

default

Whether or not the sub-profile is set as default.

Inherited from AuthorizenetProfileBase

id

An Authorizenet generated id.

merchantAuthentication

A merchant authentication object to authenticate Authorizenet API calls.

Public Methods:

__init__(customer_profile_id[, id, default])

Sets customerProfileId for the sub-profile.

Inherited from AuthorizenetProfileBase

__init__([id])

Sets id if provided.

__str__()

Returns a string representation of the profile, if id was set.

Inherited from AuthorizenetControllerExecutor

execute_controller(controller)

Executes an Authorizenet API controller and returns its response.


property customerProfileId: str

A customer profile id.

Type:

str

property default: str

Whether or not the sub-profile is set as default.

Type:

str

Customer

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

An Authorizenet customer profile.

Public Data Attributes:

validationMode

The current Authorizenet validation mode.

merchantCustomerId

A merchant designated customer id.

email

A customer email address.

desc

A customer description.

Inherited from AuthorizenetProfileBase

id

An Authorizenet generated id.

merchantAuthentication

A merchant authentication object to authenticate Authorizenet API calls.

Public Methods:

__init__([id, merchant_id, email, desc])

Sets merchant_id, email and desc.

create()

Creates the customer profile in Authorizenet.

update()

Updates the customer profile in Authorizenet if id is set.

delete()

Deletes the customer profile in Authorizenet and sets id to None if id is set.

Inherited from AuthorizenetProfileBase

__init__([id])

Sets id if provided.

__str__()

Returns a string representation of the profile, if id was set.

Inherited from AuthorizenetControllerExecutor

execute_controller(controller)

Executes an Authorizenet API controller and returns its response.

Private Methods:

_generate_customer_profile_ex_type()

Generates and returns a customerProfileExType.

_generate_customer_profile_type()

Generates and returns a customerProfileType.

_authorizenet_get_customer_profile([issuer_info])

Executes a getCustomerProfileRequest using the Authorizenet API.

_authorizenet_create_customer_profile([validate])

Executes a createCustomerProfileRequest using the Authorizenet API.

_authorizenet_update_customer_profile([validate])

Executes an updateCustomerProfileRequest using the Authorizenet API.

_authorizenet_delete_customer_profile()

Executes a deleteCustomerProfileRequest using the Authorizenet API.


create() int[source]

Creates the customer profile in Authorizenet.

Raises:
Returns:

An id for the new customer profile.

Return type:

int

delete() None[source]

Deletes the customer profile in Authorizenet and sets id to None if id is set.

Returns:

Nothing.

Return type:

None

property desc: str | None

A customer description.

Type:

str | None

property email: str | None

A customer email address.

Type:

str | None

property merchantCustomerId: str | None

A merchant designated customer id.

Type:

str | None

update() None[source]

Updates the customer profile in Authorizenet if id is set.

Returns:

Nothing.

Return type:

None

property validationMode: str

The current Authorizenet validation mode.

Type:

str

class terminusgps.authorizenet.profiles.addresses.AddressProfile(customer_profile_id: int | str, id: int | str | None = None, default: bool = False)[source]

An Authorizenet customer address profile.

Public Data Attributes:

Inherited from AuthorizenetSubProfileBase

validationMode

customerProfileId

A customer profile id.

default

Whether or not the sub-profile is set as default.

Inherited from AuthorizenetProfileBase

id

An Authorizenet generated id.

merchantAuthentication

A merchant authentication object to authenticate Authorizenet API calls.

Public Methods:

create(address)

Creates the customer shipping address profile in Authorizenet.

update(address)

Updates the customer shipping address to the new address in Authorizenet.

delete()

Deletes the customer address profile in Authorizenet and sets id to None if id is set.

Inherited from AuthorizenetSubProfileBase

__init__(customer_profile_id[, id, default])

Sets customerProfileId for the sub-profile.

Inherited from AuthorizenetProfileBase

__init__([id])

Sets id if provided.

__str__()

Returns a string representation of the profile, if id was set.

Inherited from AuthorizenetControllerExecutor

execute_controller(controller)

Executes an Authorizenet API controller and returns its response.

Private Methods:

_authorizenet_get_shipping_address()

Executes a getCustomerShippingAddressRequest using the Authorizenet API.

_authorizenet_create_shipping_address(address)

Executes a createCustomerShippingAddressRequest using the Authorizenet API.

_authorizenet_update_shipping_address(address)

Executes a updateCustomerShippingAddressRequest using the Authorizenet API.

_authorizenet_delete_shipping_address()

Executes a deleteCustomerShippingAddressRequest using the Authorizenet API.


create(address: customerAddressType) int[source]

Creates the customer shipping address profile in Authorizenet.

Parameters:

address (customerAddressType) – A customer address.

Returns:

Nothing.

Return type:

None

delete() None[source]

Deletes the customer address profile in Authorizenet and sets id to None if id is set.

Returns:

Nothing.

Return type:

None

update(address: customerAddressType) None[source]

Updates the customer shipping address to the new address in Authorizenet.

Parameters:

address (customerAddressType) – A customer address.

Returns:

Nothing.

Return type:

None

class terminusgps.authorizenet.profiles.payments.PaymentProfile(customer_profile_id: int | str, id: int | str | None = None, default: bool = False)[source]

An Authorizenet customer payment profile.

Public Data Attributes:

last_4

Last 4 digits of the payment profile credit card.

Inherited from AuthorizenetSubProfileBase

validationMode

customerProfileId

A customer profile id.

default

Whether or not the sub-profile is set as default.

Inherited from AuthorizenetProfileBase

id

An Authorizenet generated id.

merchantAuthentication

A merchant authentication object to authenticate Authorizenet API calls.

Public Methods:

create(address, payment)

Creates the customer payment profile in Authorizenet.

update(address, payment)

Updates the customer payment profile in Authorizenet if id is set.

delete()

Deletes the customer payment profile in Authorizenet and sets id to None if id is set.

Inherited from AuthorizenetSubProfileBase

__init__(customer_profile_id[, id, default])

Sets customerProfileId for the sub-profile.

Inherited from AuthorizenetProfileBase

__init__([id])

Sets id if provided.

__str__()

Returns a string representation of the profile, if id was set.

Inherited from AuthorizenetControllerExecutor

execute_controller(controller)

Executes an Authorizenet API controller and returns its response.

Private Methods:

_authorizenet_get_transaction_list_for_customer([...])

Executes a getTransactionListForCustomerRequest using the Authorizenet API.

_authorizenet_create_payment_profile(...)

Executes a createCustomerPaymentProfileRequest using the Authorizenet API.

_authorizenet_get_payment_profile([issuer_info])

Executes a getCustomerPaymentProfileRequest using the Authorizenet API.

_authorizenet_update_payment_profile(...)

Executes a updateCustomerPaymentProfileRequest using the Authorizenet API.

_authorizenet_validate_payment_profile()

Executes a validateCustomerPaymentProfileRequest using the Authorizenet API.

_authorizenet_delete_payment_profile()

Executes a deleteCustomerPaymentProfileRequest using the Authorizenet API.


create(address: customerAddressType, payment: paymentType) int[source]

Creates the customer payment profile in Authorizenet.

Parameters:
  • address (customerAddressType) – A customer address.

  • payment (paymentType) – A payment.

Returns:

A customer payment profile id.

Return type:

int

delete() None[source]

Deletes the customer payment profile in Authorizenet and sets id to None if id is set.

Returns:

Nothing.

Return type:

None

property last_4: str | None

Last 4 digits of the payment profile credit card.

update(address: customerAddressType, payment: paymentType) None[source]

Updates the customer payment profile in Authorizenet if id is set.

Parameters:
  • address (customerAddressType) – A customer address.

  • payment (paymentType) – A payment.

Returns:

Nothing.

Return type:

None

class terminusgps.authorizenet.profiles.subscriptions.SubscriptionProfile(customer_profile_id: int | str, id: int | str | None = None, default: bool = False)[source]

An Authorizenet subscription profile.

Public Data Attributes:

status

Current subscription status.

transactions

Subscription transactions.

Inherited from AuthorizenetSubProfileBase

validationMode

customerProfileId

A customer profile id.

default

Whether or not the sub-profile is set as default.

Inherited from AuthorizenetProfileBase

id

An Authorizenet generated id.

merchantAuthentication

A merchant authentication object to authenticate Authorizenet API calls.

Public Methods:

create(subscription)

Creates a subscription in Authorizenet.

update(subscription)

Updates a subscription in Authorizenet if id is set.

delete()

Deletes (cancels) a subscription in Authorizenet if id is set.

Inherited from AuthorizenetSubProfileBase

__init__(customer_profile_id[, id, default])

Sets customerProfileId for the sub-profile.

Inherited from AuthorizenetProfileBase

__init__([id])

Sets id if provided.

__str__()

Returns a string representation of the profile, if id was set.

Inherited from AuthorizenetControllerExecutor

execute_controller(controller)

Executes an Authorizenet API controller and returns its response.

Private Methods:

_authorizenet_create_subscription(subscription)

Executes a ARBCreateSubscriptionRequest using the Authorizenet API.

_authorizenet_get_subscription([...])

Executes a ARBGetSubscriptionRequest using the Authorizenet API.

_authorizenet_get_subscription_status()

Executes a ARBGetSubscriptionStatusRequest using the Authorizenet API.

_authorizenet_update_subscription(subscription)

Executes a ARBUpdateSubscriptionRequest using the Authorizenet API.

_authorizenet_cancel_subscription()

Executes a ARBCancelSubscriptionRequest using the Authorizenet API.


create(subscription: ARBSubscriptionType) int[source]

Creates a subscription in Authorizenet.

Parameters:

subscription (ARBSubscriptionType) – A subscription.

Raises:

AuthorizenetControllerExecutionError – If something goes wrong during an Authorizenet API call.

Returns:

A subscription id.

Return type:

int

delete() None[source]

Deletes (cancels) a subscription in Authorizenet if id is set.

Raises:

AuthorizenetControllerExecutionError – If something goes wrong during an Authorizenet API call.

Returns:

Nothing.

Return type:

None

property status: AuthorizenetSubscriptionStatus | None

Current subscription status.

Type:

AuthorizenetSubscriptionStatus | None

property transactions: list[dict[str, str]]

Subscription transactions.

Type:

list

update(subscription: ARBSubscriptionType) None[source]

Updates a subscription in Authorizenet if id is set.

Parameters:

subscription (ARBSubscriptionType) – A subscription.

Raises:

AuthorizenetControllerExecutionError – If something goes wrong during an Authorizenet API call.

Returns:

Nothing.

Return type:

None