Profiles
Base
- class terminusgps.authorizenet.profiles.base.AuthorizenetProfileBase(id: int | str | None = None, *args, **kwargs)[source]
Base class for Authorizenet profiles.
Public Data Attributes:
An Authorizenet generated id.
A merchant authentication object to authenticate Authorizenet API calls.
Public Methods:
__init__([id])Sets
idif provided.__str__()Returns a string representation of the profile, if
idwas set.Inherited from
AuthorizenetControllerExecutorexecute_controller(controller)Executes an Authorizenet API controller and returns its response.
- 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:
validationModeA customer profile id.
Whether or not the sub-profile is set as default.
Inherited from
AuthorizenetProfileBaseAn Authorizenet generated id.
A merchant authentication object to authenticate Authorizenet API calls.
Public Methods:
__init__(customer_profile_id[, id, default])Sets
customerProfileIdfor the sub-profile.Inherited from
AuthorizenetProfileBase__init__([id])Sets
idif provided.__str__()Returns a string representation of the profile, if
idwas set.Inherited from
AuthorizenetControllerExecutorexecute_controller(controller)Executes an Authorizenet API controller and returns its response.
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:
The current Authorizenet validation mode.
A merchant designated customer id.
A customer email address.
A customer description.
Inherited from
AuthorizenetProfileBaseAn Authorizenet generated id.
A merchant authentication object to authenticate Authorizenet API calls.
Public Methods:
__init__([id, merchant_id, email, desc])create()Creates the customer profile in Authorizenet.
update()Updates the customer profile in Authorizenet if
idis set.delete()Deletes the customer profile in Authorizenet and sets
idtoNoneifidis set.Inherited from
AuthorizenetProfileBase__init__([id])Sets
idif provided.__str__()Returns a string representation of the profile, if
idwas set.Inherited from
AuthorizenetControllerExecutorexecute_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
getCustomerProfileRequestusing the Authorizenet API._authorizenet_create_customer_profile([validate])Executes a
createCustomerProfileRequestusing the Authorizenet API._authorizenet_update_customer_profile([validate])Executes an
updateCustomerProfileRequestusing the Authorizenet API._authorizenet_delete_customer_profile()Executes a
deleteCustomerProfileRequestusing the Authorizenet API.
- create() int[source]
Creates the customer profile in Authorizenet.
- Raises:
AssertionError – If neither
merchantCustomerIdnoremailwere set.AuthorizenetControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An id for the new customer profile.
- Return type:
- delete() None[source]
Deletes the customer profile in Authorizenet and sets
idtoNoneifidis set.- Returns:
Nothing.
- Return type:
- 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
AuthorizenetSubProfileBasevalidationModeA customer profile id.
Whether or not the sub-profile is set as default.
Inherited from
AuthorizenetProfileBaseAn Authorizenet generated id.
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
idtoNoneifidis set.Inherited from
AuthorizenetSubProfileBase__init__(customer_profile_id[, id, default])Sets
customerProfileIdfor the sub-profile.Inherited from
AuthorizenetProfileBase__init__([id])Sets
idif provided.__str__()Returns a string representation of the profile, if
idwas set.Inherited from
AuthorizenetControllerExecutorexecute_controller(controller)Executes an Authorizenet API controller and returns its response.
Private Methods:
_authorizenet_get_shipping_address()Executes a
getCustomerShippingAddressRequestusing the Authorizenet API._authorizenet_create_shipping_address(address)Executes a
createCustomerShippingAddressRequestusing the Authorizenet API._authorizenet_update_shipping_address(address)Executes a
updateCustomerShippingAddressRequestusing the Authorizenet API._authorizenet_delete_shipping_address()Executes a
deleteCustomerShippingAddressRequestusing 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:
- 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 digits of the payment profile credit card.
Inherited from
AuthorizenetSubProfileBasevalidationModeA customer profile id.
Whether or not the sub-profile is set as default.
Inherited from
AuthorizenetProfileBaseAn Authorizenet generated id.
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
idis set.delete()Deletes the customer payment profile in Authorizenet and sets
idtoNoneifidis set.Inherited from
AuthorizenetSubProfileBase__init__(customer_profile_id[, id, default])Sets
customerProfileIdfor the sub-profile.Inherited from
AuthorizenetProfileBase__init__([id])Sets
idif provided.__str__()Returns a string representation of the profile, if
idwas set.Inherited from
AuthorizenetControllerExecutorexecute_controller(controller)Executes an Authorizenet API controller and returns its response.
Private Methods:
_authorizenet_get_transaction_list_for_customer([...])Executes a
getTransactionListForCustomerRequestusing the Authorizenet API._authorizenet_create_payment_profile(...)Executes a
createCustomerPaymentProfileRequestusing the Authorizenet API._authorizenet_get_payment_profile([issuer_info])Executes a
getCustomerPaymentProfileRequestusing the Authorizenet API._authorizenet_update_payment_profile(...)Executes a
updateCustomerPaymentProfileRequestusing the Authorizenet API._authorizenet_validate_payment_profile()Executes a
validateCustomerPaymentProfileRequestusing the Authorizenet API._authorizenet_delete_payment_profile()Executes a
deleteCustomerPaymentProfileRequestusing 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:
- 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:
Current subscription status.
Subscription transactions.
Inherited from
AuthorizenetSubProfileBasevalidationModeA customer profile id.
Whether or not the sub-profile is set as default.
Inherited from
AuthorizenetProfileBaseAn Authorizenet generated id.
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
idis set.delete()Deletes (cancels) a subscription in Authorizenet if
idis set.Inherited from
AuthorizenetSubProfileBase__init__(customer_profile_id[, id, default])Sets
customerProfileIdfor the sub-profile.Inherited from
AuthorizenetProfileBase__init__([id])Sets
idif provided.__str__()Returns a string representation of the profile, if
idwas set.Inherited from
AuthorizenetControllerExecutorexecute_controller(controller)Executes an Authorizenet API controller and returns its response.
Private Methods:
_authorizenet_create_subscription(subscription)Executes a
ARBCreateSubscriptionRequestusing the Authorizenet API._authorizenet_get_subscription([...])Executes a
ARBGetSubscriptionRequestusing the Authorizenet API._authorizenet_get_subscription_status()Executes a
ARBGetSubscriptionStatusRequestusing the Authorizenet API._authorizenet_update_subscription(subscription)Executes a
ARBUpdateSubscriptionRequestusing the Authorizenet API._authorizenet_cancel_subscription()Executes a
ARBCancelSubscriptionRequestusing 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:
- delete() None[source]
Deletes (cancels) a subscription in Authorizenet if
idis set.- Raises:
AuthorizenetControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
Nothing.
- Return type:
- property status: AuthorizenetSubscriptionStatus | None
Current subscription status.
- Type:
- update(subscription: ARBSubscriptionType) None[source]
Updates a subscription in Authorizenet if
idis set.- Parameters:
subscription (
ARBSubscriptionType) – A subscription.- Raises:
AuthorizenetControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
Nothing.
- Return type: