Profiles
- class terminusgps.authorizenet.profiles.base.AuthorizenetProfileBase(merchant_id: int | str, id: int | str | None = None, *args, **kwargs)[source]
Public Data Attributes:
An internally designated customer id.
An Authorizenet generated id.
Merchant authentication for Authorizenet API calls.
Public Methods:
__init__(merchant_id[, id])__str__()Return str(self).
create(*args, **kwargs)update(*args, **kwargs)delete(*args, **kwargs)Inherited from
ControllerExecutionMixinexecute_controller(controller)Executes an Authorizenet controller and returns its response.
- property id: str
An Authorizenet generated id.
- property merchantAuthentication: merchantAuthenticationType
Merchant authentication for Authorizenet API calls.
- property merchantCustomerId: str
An internally designated customer id.
- class terminusgps.authorizenet.profiles.base.AuthorizenetSubProfileBase(customer_profile_id: int | str, default: bool, *args, **kwargs)[source]
Public Data Attributes:
The validation mode for Authorizenet API calls.
Whether or not the sub profile is set as default in Authorizenet.
An Authorizenet generated customer profile id.
Inherited from
AuthorizenetProfileBaseAn internally designated customer id.
An Authorizenet generated id.
Merchant authentication for Authorizenet API calls.
Public Methods:
__init__(customer_profile_id, default, ...)Inherited from
AuthorizenetProfileBase__init__(merchant_id[, id])__str__()Return str(self).
create(*args, **kwargs)update(*args, **kwargs)delete(*args, **kwargs)Inherited from
ControllerExecutionMixinexecute_controller(controller)Executes an Authorizenet controller and returns its response.
- property customerProfileId: str
An Authorizenet generated customer profile id.
- property default: str
Whether or not the sub profile is set as default in Authorizenet.
- property validationMode: str
The validation mode for Authorizenet API calls.
- class terminusgps.authorizenet.profiles.addresses.AddressProfile(customer_profile_id: int | str, default: bool, *args, **kwargs)[source]
An Authorizenet customer address profile.
Public Data Attributes:
Inherited from
AuthorizenetSubProfileBaseThe validation mode for Authorizenet API calls.
Whether or not the sub profile is set as default in Authorizenet.
An Authorizenet generated customer profile id.
Inherited from
AuthorizenetProfileBaseAn internally designated customer id.
An Authorizenet generated id.
Merchant authentication for Authorizenet API calls.
Public Methods:
create(address)Creates an Authorizenet address profile.
update(address)Updates the Authorizenet address profile.
delete()Deletes the Authorizenet address profile.
Gets details for the Authorizenet address profile.
Inherited from
AuthorizenetSubProfileBase__init__(customer_profile_id, default, ...)Inherited from
AuthorizenetProfileBase__init__(merchant_id[, id])__str__()Return str(self).
create(*args, **kwargs)update(*args, **kwargs)delete(*args, **kwargs)Inherited from
ControllerExecutionMixinexecute_controller(controller)Executes an Authorizenet controller and returns its response.
Private Methods:
Executes a
getCustomerShippingAddressRequestusing the Authorizenet API.Executes a
createCustomerShippingAddressRequestusing the Authorizenet API.Executes a
updateCustomerShippingAddressRequestusing the Authorizenet API.Executes a
deleteCustomerShippingAddressRequestusing the Authorizenet API.
- _authorizenet_create_shipping_address(address: customerAddressType) dict | None[source]
Executes a
createCustomerShippingAddressRequestusing the Authorizenet API.createCustomerShippingAddressRequest
- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_delete_shipping_address() dict | None[source]
Executes a
deleteCustomerShippingAddressRequestusing the Authorizenet API.deleteCustomerShippingAddressRequest
- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_get_shipping_address() dict | None[source]
Executes a
getCustomerShippingAddressRequestusing the Authorizenet API.getCustomerShippingAddressRequest
- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_update_shipping_address(address: customerAddressType) dict | None[source]
Executes a
updateCustomerShippingAddressRequestusing the Authorizenet API.updateCustomerShippingAddressRequest
- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- create(address: customerAddressType) int[source]
Creates an Authorizenet address profile.
- Parameters:
address (
customerAddressType) – A customer address.- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
ValueError – If the Authorizenet API response was not retrieved.
- Returns:
A new address profile id.
- Return type:
- delete() dict | None[source]
Deletes the Authorizenet address profile.
- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- update(address: customerAddressType) dict | None[source]
Updates the Authorizenet address profile.
- Parameters:
address (
customerAddressType) – A customer shipping address.- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- class terminusgps.authorizenet.profiles.customers.CustomerProfile(*args, **kwargs)[source]
An Authorizenet customer profile.
Public Data Attributes:
A list of the customer's payment profile ids, if any.
A list of the customer's address profile ids, if any.
emailInherited from
AuthorizenetProfileBaseAn internally designated customer id.
An Authorizenet generated id.
Merchant authentication for Authorizenet API calls.
Public Methods:
__init__(*args, **kwargs)create(email[, desc])Creates a customer profile and returns its id.
update(email[, desc])Updates the customer profile.
delete()Deletes the customer profile.
Inherited from
AuthorizenetProfileBase__init__(merchant_id[, id])__str__()Return str(self).
create(*args, **kwargs)update(*args, **kwargs)delete(*args, **kwargs)Inherited from
ControllerExecutionMixinexecute_controller(controller)Executes an Authorizenet controller and returns its response.
Private Methods:
Executes a
getCustomerProfileIdsRequestusing the Authorizenet API.Executes a
createCustomerProfileRequestusing the Authorizenet API._authorizenet_get_customer_profile([issuer_info])Executes a
getCustomerProfileRequestusing the Authorizenet API.Executes an
updateCustomerProfileRequestusing the Authorizenet API.Executes a
deleteCustomerProfileRequestusing the Authorizenet API.
- _authorizenet_create_customer_profile(email: str, desc: str = '') dict | None[source]
Executes a
createCustomerProfileRequestusing the Authorizenet API.- Parameters:
- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_delete_customer_profile() dict | None[source]
Executes a
deleteCustomerProfileRequestusing the Authorizenet API.- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_get_customer_profile(issuer_info: bool = True) dict | None[source]
Executes a
getCustomerProfileRequestusing the Authorizenet API.- Parameters:
issuer_info (
bool) – Whether or not to include issuer info in the response.- Raises:
AssertionError – If
idwas not set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_get_customer_profile_ids() dict | None[source]
Executes a
getCustomerProfileIdsRequestusing the Authorizenet API.- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_update_customer_profile(email: str, desc: str = '') dict | None[source]
Executes an
updateCustomerProfileRequestusing the Authorizenet API.- Parameters:
- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
AssertionError – If
idwasn’t set.
- Returns:
An Authorizenet API response, if any.
- Return type:
- create(email: str, desc: str = '') int[source]
Creates a customer profile and returns its id.
- Parameters:
- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
ValueError – If the Authorizenet API response was not retrieved.
- Returns:
The new customer profile id.
- Return type:
- delete() None[source]
Deletes the customer profile.
- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
Nothing.
- Return type:
- class terminusgps.authorizenet.profiles.payments.PaymentProfile(customer_profile_id: int | str, default: bool, *args, **kwargs)[source]
An Authorizenet customer payment profile.
Public Data Attributes:
last_4Inherited from
AuthorizenetSubProfileBaseThe validation mode for Authorizenet API calls.
Whether or not the sub profile is set as default in Authorizenet.
An Authorizenet generated customer profile id.
Inherited from
AuthorizenetProfileBaseAn internally designated customer id.
An Authorizenet generated id.
Merchant authentication for Authorizenet API calls.
Public Methods:
create(address, payment)Creates an Authorizenet payment profile and returns its id.
update(address, payment)Updates the Authorizenet payment profile.
delete()Deletes the Authorizenet payment profile.
get_details([issuer_info])Inherited from
AuthorizenetSubProfileBase__init__(customer_profile_id, default, ...)Inherited from
AuthorizenetProfileBase__init__(merchant_id[, id])__str__()Return str(self).
create(*args, **kwargs)update(*args, **kwargs)delete(*args, **kwargs)Inherited from
ControllerExecutionMixinexecute_controller(controller)Executes an Authorizenet controller and returns its response.
Private Methods:
Executes a
getTransactionListForCustomerRequestusing the Authorizenet API.Executes a
createCustomerPaymentProfileRequestusing the Authorizenet API._authorizenet_get_payment_profile([issuer_info])Executes a
getCustomerPaymentProfileRequestusing the Authorizenet API.Executes a
updateCustomerPaymentProfileRequestusing the Authorizenet API.Executes a
validateCustomerPaymentProfileRequestusing the Authorizenet API.Executes a
deleteCustomerPaymentProfileRequestusing the Authorizenet API.
- _authorizenet_create_payment_profile(address: customerAddressType, payment: paymentType) dict | None[source]
Executes a
createCustomerPaymentProfileRequestusing the Authorizenet API.createCustomerPaymentProfileRequest
- Parameters:
address (
customerAddressType) – A billing address.payment (
paymentType) – A payment method.
- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_delete_payment_profile() dict | None[source]
Executes a
deleteCustomerPaymentProfileRequestusing the Authorizenet API.deleteCustomerPaymentProfileRequest
- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_get_payment_profile(issuer_info: bool = False) dict | None[source]
Executes a
getCustomerPaymentProfileRequestusing the Authorizenet API.getCustomerPaymentProfileRequest
- Parameters:
issuer_info (
bool) – Whether or not to include issuer information in the response.- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_get_transaction_list_for_customer(limit: int = 100, ordering: str = 'submitTimeUTC', offset: int = 1, descending: bool = False) dict | None[source]
Executes a
getTransactionListForCustomerRequestusing the Authorizenet API.getTransactionListForCustomerRequest
- Parameters:
- Raises:
ValueError – If
orderingis invalid.AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_update_payment_profile(address: customerAddressType, payment: paymentType) dict | None[source]
Executes a
updateCustomerPaymentProfileRequestusing the Authorizenet API.updateCustomerPaymentProfileRequest
- Parameters:
address (
customerAddressType) – A customer address.payment (
paymentType) – A payment method.
- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_validate_payment_profile() dict | None[source]
Executes a
validateCustomerPaymentProfileRequestusing the Authorizenet API.validateCustomerPaymentProfileRequest
- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- create(address: customerAddressType, payment: paymentType) int[source]
Creates an Authorizenet payment profile and returns its id.
- Parameters:
address (
customerAddressType) – A billing address.payment (
paymentType) – A payment object.
- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
ValueError – If the Authorizenet API response was not retrieved.
- Returns:
The new payment profile’s id.
- Return type:
- delete() dict | None[source]
Deletes the Authorizenet payment profile.
- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- update(address: customerAddressType, payment: paymentType) dict | None[source]
Updates the Authorizenet payment profile.
- Parameters:
address (
customerAddressType) – A billing address.payment (
paymentType) – A payment method.
- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API reponse, if any.
- Return type:
- class terminusgps.authorizenet.profiles.subscriptions.SubscriptionProfile(id: str | int | None = None, *args, **kwargs)[source]
An Authorizenet subscription profile.
Public Data Attributes:
Merchant authentication for API calls.
Current status of the subscription.
Transactions for the subscription.
Customer payment profile id for the subscription.
Customer address profile id for the subscription.
Public Methods:
__init__([id])create(name, amount, schedule, profile_id, ...)Creates a subscription in Authorizenet.
cancel()Cancels the subscription.
update(subscription)Updates a subscription in Authorizenet.
Inherited from
ControllerExecutionMixinexecute_controller(controller)Executes an Authorizenet controller and returns its response.
Private Methods:
_authorizenet_create_subscription(subscription)Executes a
ARBCreateSubscriptionRequestusing the Authorizenet API.Executes a
ARBGetSubscriptionRequestusing the Authorizenet API.Executes a
ARBGetSubscriptionStatusRequestusing the Authorizenet API._authorizenet_update_subscription(subscription)Executes a
ARBUpdateSubscriptionRequestusing the Authorizenet API.Executes a
ARBCancelSubscriptionRequestusing the Authorizenet API.
- _authorizenet_cancel_subscription() dict | None[source]
Executes a
ARBCancelSubscriptionRequestusing the Authorizenet API.- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_create_subscription(subscription: ARBSubscriptionType) dict | None[source]
Executes a
ARBCreateSubscriptionRequestusing the Authorizenet API.- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_get_subscription(include_transactions: bool = False) dict | None[source]
Executes a
ARBGetSubscriptionRequestusing the Authorizenet API.- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_get_subscription_status() dict | None[source]
Executes a
ARBGetSubscriptionStatusRequestusing the Authorizenet API.ARBGetSubscriptionStatusRequest
- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- _authorizenet_update_subscription(subscription: ARBSubscriptionType) dict | None[source]
Executes a
ARBUpdateSubscriptionRequestusing the Authorizenet API.- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
An Authorizenet API response, if any.
- Return type:
- cancel() None[source]
Cancels the subscription.
- Raises:
AssertionError – If
idwasn’t set.ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
Nothing.
- Return type:
- create(name: str, amount: Decimal, schedule: paymentScheduleType, profile_id: int | str, payment_id: int | str, address_id: int | str, trial_amount: Decimal = Decimal('0')) int[source]
Creates a subscription in Authorizenet.
- Parameters:
name (
str) – A name for the subscription.amount (
paymentScheduleType) – An amount of money paid per occurrence of the subscription.schedule – A payment schedule for the subscription.
profile_id (
int|str) – An Authorizenet customer profile id.payment_id (
int|str) – An Authorizenet customer payment profile id.address_id (
int|str) – An Authorizenet customer address profile id.trial_amount (
Decimal) – Trial amount for the subscription. Default is0.00.
- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
ValueError – If
profile_idwasn’t a digit.ValueError – If
payment_idwasn’t a digit.ValueError – If
address_idwasn’t a digit.ValueError – If the Authorizenet API response was not retrieved.
- Returns:
An Authorizenet subscription id.
- Return type:
- update(subscription: ARBSubscriptionType) None[source]
Updates a subscription in Authorizenet.
- Parameters:
subscription (
authorizenet.apicontractsv1.ARBSubscriptionType) – A new subscription object.- Raises:
ControllerExecutionError – If something goes wrong during an Authorizenet API call.
- Returns:
Nothing.
- Return type: