<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:mule="http://www.mulesoft.org/schema/mule/core" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://www.mulesoft.org/schema/mule/avalara">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"></xs:import>
  <xs:import schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" namespace="http://www.springframework.org/schema/beans"></xs:import>
  <xs:import schemaLocation="http://www.mulesoft.org/schema/mule/core/current/mule.xsd" namespace="http://www.mulesoft.org/schema/mule/core"></xs:import>
  <xs:import schemaLocation="http://www.mulesoft.org/schema/mule/devkit/current/mule-devkit.xsd" namespace="http://www.mulesoft.org/schema/mule/devkit"></xs:import>
  <xs:simpleType name="integerType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:integer"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="decimalType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:decimal"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="floatType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:float"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="doubleType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:double"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="dateTimeType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:dateTime"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="longType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:long"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="byteType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:byte"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="booleanType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:boolean"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="anyUriType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:anyURI"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="charType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:minLength value="1"></xs:minLength>
          <xs:maxLength value="1"></xs:maxLength>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:complexType name="XmlType">
    <xs:sequence>
      <xs:any maxOccurs="unbounded" minOccurs="0" processContents="lax"></xs:any>
    </xs:sequence>
    <xs:attribute name="ref" use="optional" type="xs:string">
      <xs:annotation>
        <xs:documentation>The reference object for this parameter</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:element xmlns:devkit="http://www.mulesoft.org/schema/mule/devkit" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="config" substitutionGroup="mule:abstract-extension" devkit:javaClass="org.mule.modules.avalara.adapters.AvalaraModuleLifecycleAdapter">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="mule:abstractExtensionType">
          <xs:annotation>
            <xs:documentation>Avalara provides automated sales tax solutions to streamline cumbersome,
error-prone tax compliance processes and reduce the risk of loss or penalty
in case of an audit. Their automated solutions automatically perform address
validation, jurisdiction research and rate calculation and allow you to
manage even the most complicated tax issues, such as situs, nexus, tax tiers,
tax holidays, exemptions, certificate management and product taxability rules.</xs:documentation>
          </xs:annotation>
          <xs:attribute name="name" use="optional" type="xs:string">
            <xs:annotation>
              <xs:documentation>Give a name to this configuration so it can be later referenced by config-ref.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="taxServiceEndpoint" default="https://development.avalara.net/Tax/TaxSvc.asmx" use="optional" type="xs:string">
            <xs:annotation>
              <xs:documentation>Tax Webservice endpoint</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="addressServiceEndpoint" default="https://development.avalara.net/Address/AddressSvc.asmx" use="optional" type="xs:string">
            <xs:annotation>
              <xs:documentation>Address Webservice endpoint</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/avalara" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="get-tax" substitutionGroup="mule:abstract-message-processor" type="GetTaxType">
    <xs:annotation>
      <xs:documentation>Get Tax processor.
&lt;p&gt;
The Get Tax operation calculates tax for one or more invoiced items and
displays details describing the calculation of tax for each line item.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="GetTaxType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:sequence>
          <xs:element name="base-addresses" maxOccurs="1" minOccurs="1">
            <xs:annotation>
              <xs:documentation>Collection of physical addresses that will be referred to as the destination or origination of 1 or more invoice line entries</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:element name="base-address" maxOccurs="unbounded" minOccurs="0">
                  <xs:complexType>
                    <xs:choice>
                      <xs:sequence>
                        <xs:element name="inner-base-address" maxOccurs="unbounded" minOccurs="0">
                          <xs:complexType>
                            <xs:simpleContent>
                              <xs:extension base="xs:string">
                                <xs:attribute name="value-ref" use="optional" type="xs:string"></xs:attribute>
                                <xs:attribute name="key" type="xs:string"></xs:attribute>
                              </xs:extension>
                            </xs:simpleContent>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                      <xs:sequence>
                        <xs:any maxOccurs="unbounded" minOccurs="0" processContents="lax"></xs:any>
                      </xs:sequence>
                    </xs:choice>
                    <xs:attribute name="value-ref" use="optional" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The reference object for this parameter</xs:documentation>
                      </xs:annotation>
                    </xs:attribute>
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
              <xs:attribute name="ref" use="optional" type="xs:string">
                <xs:annotation>
                  <xs:documentation>The reference object for this parameter</xs:documentation>
                </xs:annotation>
              </xs:attribute>
            </xs:complexType>
          </xs:element>
          <xs:element name="lines" maxOccurs="1" minOccurs="1">
            <xs:annotation>
              <xs:documentation>Collection of invoice lines requiring tax calculation</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:sequence>
                <xs:element name="line" maxOccurs="unbounded" minOccurs="0">
                  <xs:complexType>
                    <xs:choice>
                      <xs:sequence>
                        <xs:element name="inner-line" maxOccurs="unbounded" minOccurs="0">
                          <xs:complexType>
                            <xs:simpleContent>
                              <xs:extension base="xs:string">
                                <xs:attribute name="value-ref" use="optional" type="xs:string"></xs:attribute>
                                <xs:attribute name="key" type="xs:string"></xs:attribute>
                              </xs:extension>
                            </xs:simpleContent>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                      <xs:sequence>
                        <xs:any maxOccurs="unbounded" minOccurs="0" processContents="lax"></xs:any>
                      </xs:sequence>
                    </xs:choice>
                    <xs:attribute name="value-ref" use="optional" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The reference object for this parameter</xs:documentation>
                      </xs:annotation>
                    </xs:attribute>
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
              <xs:attribute name="ref" use="optional" type="xs:string">
                <xs:annotation>
                  <xs:documentation>The reference object for this parameter</xs:documentation>
                </xs:annotation>
              </xs:attribute>
            </xs:complexType>
          </xs:element>
          <xs:element name="tax-override" maxOccurs="1" minOccurs="0">
            <xs:annotation>
              <xs:documentation>Indicates to apply tax override to the document.</xs:documentation>
            </xs:annotation>
            <xs:complexType>
              <xs:choice>
                <xs:sequence>
                  <xs:element name="tax-override" maxOccurs="unbounded" minOccurs="0">
                    <xs:complexType>
                      <xs:simpleContent>
                        <xs:extension base="xs:string">
                          <xs:attribute name="value-ref" use="optional" type="xs:string"></xs:attribute>
                          <xs:attribute name="key" type="xs:string"></xs:attribute>
                        </xs:extension>
                      </xs:simpleContent>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
                <xs:sequence>
                  <xs:any maxOccurs="unbounded" minOccurs="0" processContents="lax"></xs:any>
                </xs:sequence>
              </xs:choice>
              <xs:attribute name="ref" use="optional" type="xs:string">
                <xs:annotation>
                  <xs:documentation>The reference object for this parameter</xs:documentation>
                </xs:annotation>
              </xs:attribute>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
        <xs:attribute name="config-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Specify which configuration to use for this invocation.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="account" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's account</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="license" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's license</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="avalaraClient" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's client</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="companyCode" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Client application company reference code</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="docType" use="required" type="AvalaraDocumentTypeEnumType">
          <xs:annotation>
            <xs:documentation>The document type specifies the category of the document and affects how the document is treated after a tax calculation; see  for more information about the specific document types.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The internal reference code used by the client application.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docDate-ref" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Date of invoice, purchase order, etc.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="salespersonCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The client application salesperson reference code.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="customerCode" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Client application customer reference code</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="customerUsageType" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Client application customer or usage type. CustomerUsageType determines the exempt status of the transaction based on the exemption tax rules for the jurisdictions involved. CustomerUsageType may also be set at the line item level. &lt;p&gt; The standard values for the CustomerUsageType (A-L).&lt;br/&gt; A Federal Government&lt;br/&gt; B State/Local Govt.&lt;br/&gt; C Tribal Government&lt;br/&gt; D Foreign Diplomat&lt;br/&gt; E Charitable Organization&lt;br/&gt; F Religious/Education&lt;br/&gt; G Resale&lt;br/&gt; H Agricultural Production&lt;br/&gt; I Industrial Prod/Mfg.&lt;br/&gt; J Direct Pay Permit&lt;br/&gt; K Direct Mail&lt;br/&gt; L - Other</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="discount" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The discount amount to apply to the document. The string represents a .</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="purchaseOrderNo" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Purchase order identifier. PurchaseOrderNo is required for single use exemption certificates to match the order and invoice with the certificate.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="exemptionNo" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Exemption number used for this transaction</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="originCode" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Code that refers one of the address of the baseAddress collection. It has to be the same code of one of the address's addressCode. It represents the origin address.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="destinationCode" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Code that refers one of the address of the baseAddress collection. It has to be the same code of one of the address's addressCode. It represents the destination address.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="detailLevel" use="required" type="DetailLevelTypeEnumType">
          <xs:annotation>
            <xs:documentation>Specifies the level of tax detail to return</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="referenceCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>For returns (see ), refers to the  of the original invoice.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="locationCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Location Code value. It is Also referred to as a Store Location, Outlet Id, or Outlet code is a number assigned by the State which identifies a Store location. Some state returns require taxes are broken out separately for Store Locations.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="commit" default="false" use="optional" type="booleanType">
          <xs:annotation>
            <xs:documentation>Commit flag. If Commit is set to true, tax for the transaction is saved, posted and committed as tax document.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="batchCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The batchCode value.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="currencyCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>It is 3 character ISO 4217 currency code.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="serviceMode" default="AUTOMATIC" use="optional" type="ServiceModeTypeEnumType">
          <xs:annotation>
            <xs:documentation>This is only supported by AvaLocal servers. It provides the ability to controls whether tax is calculated locally or remotely when using an AvaLocal server. The default is Automatic which calculates locally unless remote is necessary for non-local addresses.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="paymentDate-ref" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The date on which payment was made.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="exchangeRate" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The exchange rate value. The string represents a</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="exchangeRateEffDate-ref" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The exchange rate effective date value.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/avalara" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="post-tax" substitutionGroup="mule:abstract-message-processor" type="PostTaxType">
    <xs:annotation>
      <xs:documentation>Post Tax processor</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="PostTaxType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:attribute name="config-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Specify which configuration to use for this invocation.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="account" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's account</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="license" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's license</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="avalaraClient" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's client</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docId" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The original document's type, such as Sales Invoice or Purchase Invoice.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="companyCode" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Client application company reference code. If docId is specified, this is not needed.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="docType" use="required" type="AvalaraDocumentTypeEnumType">
          <xs:annotation>
            <xs:documentation>The document type specifies the category of the document and affects how the document is treated after a tax calculation; see  for more information about the specific document types.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The internal reference code used by the client application.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docDate-ref" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The date on the invoice, purchase order, etc</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="totalAmount" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The total amount (not including tax) for the document. This is used for verification and reconciliation. This should be the &lt;b&gt;TotalAmount&lt;/b&gt; returned by  when tax was calculated for this document; otherwise the web service will return an error. The string represents a</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="totalTax" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>The total tax for the document. This is used for verification and reconciliation. This should be the &lt;b&gt;TotalTax&lt;/b&gt; returned by  when tax was calculated for this document; otherwise the web service will return an error. The string represents a</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="commit" default="false" use="optional" type="booleanType">
          <xs:annotation>
            <xs:documentation>The commit value. This has been defaulted to false. If this has been set to true AvaTax will commit the document on this call. Seller's system who wants to Post and Commit the document on one call should use this flag.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="newDocCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The new document code value.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/avalara" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="commit-tax" substitutionGroup="mule:abstract-message-processor" type="CommitTaxType">
    <xs:annotation>
      <xs:documentation>Commit Tax processor</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CommitTaxType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:attribute name="config-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Specify which configuration to use for this invocation.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="account" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's account</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="license" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's license</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="avalaraClient" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's client</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docId" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The original document's type, such as Sales Invoice or Purchase Invoice.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="companyCode" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Client application company reference code. If docId is specified, this is not needed.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="docType" use="required" type="AvalaraDocumentTypeEnumType">
          <xs:annotation>
            <xs:documentation>The document type specifies the category of the document and affects how the document is treated after a tax calculation; see  for more information about the specific document types.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The internal reference code used by the client application.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="newDocCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The new document code value.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/avalara" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="get-tax-history" substitutionGroup="mule:abstract-message-processor" type="GetTaxHistoryType">
    <xs:annotation>
      <xs:documentation>Get Tax History processor</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="GetTaxHistoryType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:attribute name="config-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Specify which configuration to use for this invocation.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="account" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's account</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="license" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's license</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="avalaraClient" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's client</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docId" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The original document's type, such as Sales Invoice or Purchase Invoice.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="companyCode" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Client application company reference code. If docId is specified, this is not needed.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="docType" use="required" type="AvalaraDocumentTypeEnumType">
          <xs:annotation>
            <xs:documentation>The document type specifies the category of the document and affects how the document is treated after a tax calculation; see  for more information about the specific document types.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The internal reference code used by the client application.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="detailLevel" use="required" type="DetailLevelTypeEnumType">
          <xs:annotation>
            <xs:documentation>Specifies the level of detail to return. See .</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/avalara" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="cancel-tax" substitutionGroup="mule:abstract-message-processor" type="CancelTaxType">
    <xs:annotation>
      <xs:documentation>Cancel tax, indicating the document that should be cancelled and the reason
for the operation.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="CancelTaxType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:attribute name="config-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Specify which configuration to use for this invocation.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="account" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's account</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="license" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's license</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="avalaraClient" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's client</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docId" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The original document's type, such as Sales Invoice or Purchase Invoice.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="companyCode" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Client application company reference code. If docId is specified, this is not needed.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="docType" use="required" type="AvalaraDocumentTypeEnumType">
          <xs:annotation>
            <xs:documentation>The document type specifies the category of the document and affects how the document is treated after a tax calculation; see  for more information about the specific document types.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="docCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>The internal reference code used by the client application.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="cancelCode" use="required" type="CancelCodeTypeEnumType">
          <xs:annotation>
            <xs:documentation>A code indicating the reason the document is getting canceled.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/avalara" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="validate-address" substitutionGroup="mule:abstract-message-processor" type="ValidateAddressType">
    <xs:annotation>
      <xs:documentation>Validate Address processor.
&lt;p&gt;
This operation validates the supplied address, returning canonical form and
additional delivery details if successfully validated.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ValidateAddressType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:attribute name="config-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Specify which configuration to use for this invocation.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="account" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's account</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="license" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's license</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="avalaraClient" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Avalara's client</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="line1" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Address line 1</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="line2" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Address line 2</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="line3" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Address line 3</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="city" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>City name. Required, when PostalCode is not specified.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="region" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>State or region name. Requirad, when PostalCode is not specified.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="country" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Country code</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="postalCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Postal or ZIP code. Required, when City and Region are not specified</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="addressCode" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>the address code.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="taxRegionId" use="required" type="integerType">
          <xs:annotation>
            <xs:documentation>The tax region id.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="latitude" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Latitude.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="longitude" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Longitude.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="textCase" default="DEFAULT" use="optional" type="TextCaseTypeEnumType">
          <xs:annotation>
            <xs:documentation>The casing to apply to the validated address(es).</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="coordinates" default="false" use="optional" type="booleanType">
          <xs:annotation>
            <xs:documentation>True, if you want in the result a not empty latitud and longitude.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute xmlns="http://www.mulesoft.org/schema/mule/avalara" name="taxability" default="false" use="optional" type="booleanType">
          <xs:annotation>
            <xs:documentation>True, if you want the valid taxRegionId in the result.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="date-ref" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>Date.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="AvalaraDocumentTypeEnumType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="SALES_ORDER"></xs:enumeration>
          <xs:enumeration value="SALES_INVOICE"></xs:enumeration>
          <xs:enumeration value="PURCHASE_ORDER"></xs:enumeration>
          <xs:enumeration value="PURCHASE_INVOICE"></xs:enumeration>
          <xs:enumeration value="RETURN_ORDER"></xs:enumeration>
          <xs:enumeration value="RETURN_INVOICE"></xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="DetailLevelTypeEnumType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="DOCUMENT"></xs:enumeration>
          <xs:enumeration value="SUMMARY"></xs:enumeration>
          <xs:enumeration value="LINE"></xs:enumeration>
          <xs:enumeration value="TAX"></xs:enumeration>
          <xs:enumeration value="DIAGNOSTIC"></xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="ServiceModeTypeEnumType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="AUTOMATIC"></xs:enumeration>
          <xs:enumeration value="LOCAL"></xs:enumeration>
          <xs:enumeration value="REMOTE"></xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="CancelCodeTypeEnumType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="UNSPECIFIED"></xs:enumeration>
          <xs:enumeration value="POST_FAILED"></xs:enumeration>
          <xs:enumeration value="DOC_DELETED"></xs:enumeration>
          <xs:enumeration value="DOC_VOIDED"></xs:enumeration>
          <xs:enumeration value="ADJUSTMENT_CANCELLED"></xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="TextCaseTypeEnumType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="DEFAULT"></xs:enumeration>
          <xs:enumeration value="UPPER"></xs:enumeration>
          <xs:enumeration value="MIXED"></xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\#\[[^\]]+\]"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
</xs:schema>