interface AvataxLibInterface in Drupal Commerce Connector for AvaTax 8
Provides an interface for the AvaTax library.
Hierarchy
- interface \Drupal\commerce_avatax\AvataxLibInterface
Expanded class hierarchy of AvataxLibInterface
All classes that implement AvataxLibInterface
4 files declare their use of AvataxLibInterface
- AddressValidator.php in src/
Controller/ AddressValidator.php - Avatax.php in src/
Plugin/ Commerce/ TaxType/ Avatax.php - CustomerProfileAlterTest.php in tests/
src/ Unit/ CustomerProfileAlterTest.php - OrderSubscriber.php in src/
EventSubscriber/ OrderSubscriber.php
File
- src/
AvataxLibInterface.php, line 10
Namespace
Drupal\commerce_avataxView source
interface AvataxLibInterface {
/**
* Creates a new transaction (/api/v2/transactions/create).
*
* @param \Drupal\commerce_order\Entity\OrderInterface $order
* The order.
* @param string $type
* The transactions type (e.g SalesOrder|SalesInvoice).
*
* @return array
* The response array.
*/
public function transactionsCreate(OrderInterface $order, $type = 'SalesOrder');
/**
* Voids a transaction for the given order.
*
* @param \Drupal\commerce_order\Entity\OrderInterface $order
* The order.
*/
public function transactionsVoid(OrderInterface $order);
/**
* Prepares the transaction request body. (This method should not be public
* but that makes the tests easier).
*
* @param \Drupal\commerce_order\Entity\OrderInterface $order
* The order.
* @param string $type
* The transactions type (e.g SalesOrder|SalesInvoice).
*
* @return array
* The request parameters array.
*/
public function prepareTransactionsCreate(OrderInterface $order, $type = 'SalesOrder');
/**
* Retrieve geolocation information for a specified address.
*
* @param array $address
* The address item.
*
* @return array
* Return AvaTax formatted response.
*/
public function resolveAddress(array $address);
/**
* Validate the give address from Drupal upon AvaTax resolved address.
*
* @param array $address
* The address item.
*
* @return array
* Return formatted array of errors and suggestions.
*/
public function validateAddress(array $address);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AvataxLibInterface:: |
public | function | Prepares the transaction request body. (This method should not be public but that makes the tests easier). | 1 |
AvataxLibInterface:: |
public | function | Retrieve geolocation information for a specified address. | 1 |
AvataxLibInterface:: |
public | function | Creates a new transaction (/api/v2/transactions/create). | 1 |
AvataxLibInterface:: |
public | function | Voids a transaction for the given order. | 1 |
AvataxLibInterface:: |
public | function | Validate the give address from Drupal upon AvaTax resolved address. | 1 |