avatax 21.6.0 → 21.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/lib/avatax/client/accounts.rb +83 -83
 - data/lib/avatax/client/addresses.rb +20 -20
 - data/lib/avatax/client/advancedrules.rb +41 -41
 - data/lib/avatax/client/avafileforms.rb +41 -41
 - data/lib/avatax/client/batches.rb +62 -62
 - data/lib/avatax/client/certexpressinvites.rb +27 -27
 - data/lib/avatax/client/certificates.rb +111 -111
 - data/lib/avatax/client/companies.rb +153 -153
 - data/lib/avatax/client/contacts.rb +48 -48
 - data/lib/avatax/client/customers.rb +97 -97
 - data/lib/avatax/client/datasources.rb +48 -48
 - data/lib/avatax/client/definitions.rb +558 -443
 - data/lib/avatax/client/distancethresholds.rb +48 -48
 - data/lib/avatax/client/ecommercetoken.rb +16 -16
 - data/lib/avatax/client/filingcalendars.rb +41 -20
 - data/lib/avatax/client/filings.rb +22 -20
 - data/lib/avatax/client/firmclientlinkages.rb +69 -69
 - data/lib/avatax/client/free.rb +13 -13
 - data/lib/avatax/client/fundingrequests.rb +20 -20
 - data/lib/avatax/client/items.rb +185 -181
 - data/lib/avatax/client/jurisdictionoverrides.rb +48 -48
 - data/lib/avatax/client/locations.rb +90 -90
 - data/lib/avatax/client/multidocument.rb +76 -76
 - data/lib/avatax/client/nexus.rb +133 -105
 - data/lib/avatax/client/notices.rb +22 -22
 - data/lib/avatax/client/notifications.rb +27 -27
 - data/lib/avatax/client/provisioning.rb +20 -20
 - data/lib/avatax/client/registrar.rb +85 -75
 - data/lib/avatax/client/reports.rb +34 -34
 - data/lib/avatax/client/settings.rb +48 -48
 - data/lib/avatax/client/subscriptions.rb +27 -27
 - data/lib/avatax/client/taxcodes.rb +48 -48
 - data/lib/avatax/client/taxcontent.rb +41 -41
 - data/lib/avatax/client/taxrules.rb +50 -50
 - data/lib/avatax/client/transactions.rb +153 -153
 - data/lib/avatax/client/upcs.rb +48 -48
 - data/lib/avatax/client/users.rb +62 -62
 - data/lib/avatax/client/utilities.rb +27 -27
 - data/lib/avatax/request.rb +11 -3
 - data/lib/avatax/version.rb +1 -1
 - metadata +11 -4
 
| 
         @@ -1,10 +1,10 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module AvaTax
         
     | 
| 
       2 
     | 
    
         
            -
              class Client
         
     | 
| 
       3 
     | 
    
         
            -
                module Customers 
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
                  # Create customers for this company
         
     | 
| 
       7 
     | 
    
         
            -
                  #
         
     | 
| 
      
 1 
     | 
    
         
            +
            module AvaTax
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Client
         
     | 
| 
      
 3 
     | 
    
         
            +
                module Customers 
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                  # Create customers for this company
         
     | 
| 
      
 7 
     | 
    
         
            +
                  #
         
     | 
| 
       8 
8 
     | 
    
         
             
                  # Create one or more customers for this company.
         
     | 
| 
       9 
9 
     | 
    
         
             
                  #
         
     | 
| 
       10 
10 
     | 
    
         
             
                  # A customer object defines information about a person or business that purchases products from your
         
     | 
| 
         @@ -24,15 +24,15 @@ module AvaTax 
     | 
|
| 
       24 
24 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       25 
25 
     | 
    
         
             
                  #
         
     | 
| 
       26 
26 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
         
     | 
| 
       27 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 27 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       28 
28 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded this customer
         
     | 
| 
       29 
29 
     | 
    
         
             
                  # @param model [CustomerModel[]] The list of customer objects to be created
         
     | 
| 
       30 
     | 
    
         
            -
                  # @return [CustomerModel[]]
         
     | 
| 
       31 
     | 
    
         
            -
                  def create_customers(companyId, model)        path = "/api/v2/companies/#{companyId}/customers"
         
     | 
| 
       32 
     | 
    
         
            -
                    post(path, model)      end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                  # Delete a customer record
         
     | 
| 
       35 
     | 
    
         
            -
                  #
         
     | 
| 
      
 30 
     | 
    
         
            +
                  # @return [CustomerModel[]]
         
     | 
| 
      
 31 
     | 
    
         
            +
                  def create_customers(companyId, model)        path = "/api/v2/companies/#{companyId}/customers"
         
     | 
| 
      
 32 
     | 
    
         
            +
                    post(path, model)      end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                  # Delete a customer record
         
     | 
| 
      
 35 
     | 
    
         
            +
                  #
         
     | 
| 
       36 
36 
     | 
    
         
             
                  # Deletes the customer object referenced by this URL.
         
     | 
| 
       37 
37 
     | 
    
         
             
                  #
         
     | 
| 
       38 
38 
     | 
    
         
             
                  # A customer object defines information about a person or business that purchases products from your
         
     | 
| 
         @@ -49,15 +49,15 @@ module AvaTax 
     | 
|
| 
       49 
49 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       50 
50 
     | 
    
         
             
                  #
         
     | 
| 
       51 
51 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
         
     | 
| 
       52 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 52 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       53 
53 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded this customer
         
     | 
| 
       54 
54 
     | 
    
         
             
                  # @param customerCode [String] The unique code representing this customer
         
     | 
| 
       55 
     | 
    
         
            -
                  # @return [Object]
         
     | 
| 
       56 
     | 
    
         
            -
                  def delete_customer(companyId, customerCode)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
         
     | 
| 
       57 
     | 
    
         
            -
                    delete(path)      end
         
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
     | 
    
         
            -
                  # Retrieve a single customer
         
     | 
| 
       60 
     | 
    
         
            -
                  #
         
     | 
| 
      
 55 
     | 
    
         
            +
                  # @return [Object]
         
     | 
| 
      
 56 
     | 
    
         
            +
                  def delete_customer(companyId, customerCode)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
         
     | 
| 
      
 57 
     | 
    
         
            +
                    delete(path)      end
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
                  # Retrieve a single customer
         
     | 
| 
      
 60 
     | 
    
         
            +
                  #
         
     | 
| 
       61 
61 
     | 
    
         
             
                  # Retrieve the customer identified by this URL.
         
     | 
| 
       62 
62 
     | 
    
         
             
                  #
         
     | 
| 
       63 
63 
     | 
    
         
             
                  # A customer object defines information about a person or business that purchases products from your
         
     | 
| 
         @@ -80,16 +80,16 @@ module AvaTax 
     | 
|
| 
       80 
80 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       81 
81 
     | 
    
         
             
                  #
         
     | 
| 
       82 
82 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
       83 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 83 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       84 
84 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded this customer
         
     | 
| 
       85 
85 
     | 
    
         
             
                  # @param customerCode [String] The unique code representing this customer
         
     | 
| 
       86 
86 
     | 
    
         
             
                  # @param include [String] Specify optional additional objects to include in this fetch request
         
     | 
| 
       87 
     | 
    
         
            -
                  # @return [Object]
         
     | 
| 
       88 
     | 
    
         
            -
                  def get_customer(companyId, customerCode, options={})        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
         
     | 
| 
       89 
     | 
    
         
            -
                    get(path, options)      end
         
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
                  # Link attributes to a customer
         
     | 
| 
       92 
     | 
    
         
            -
                  #
         
     | 
| 
      
 87 
     | 
    
         
            +
                  # @return [Object]
         
     | 
| 
      
 88 
     | 
    
         
            +
                  def get_customer(companyId, customerCode, options={})        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
         
     | 
| 
      
 89 
     | 
    
         
            +
                    get(path, options)      end
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
                  # Link attributes to a customer
         
     | 
| 
      
 92 
     | 
    
         
            +
                  #
         
     | 
| 
       93 
93 
     | 
    
         
             
                  # Link one or many attributes to a customer.
         
     | 
| 
       94 
94 
     | 
    
         
             
                  #
         
     | 
| 
       95 
95 
     | 
    
         
             
                  # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
         
     | 
| 
         @@ -109,16 +109,16 @@ module AvaTax 
     | 
|
| 
       109 
109 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       110 
110 
     | 
    
         
             
                  #
         
     | 
| 
       111 
111 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
         
     | 
| 
       112 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 112 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       113 
113 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
         
     | 
| 
       114 
114 
     | 
    
         
             
                  # @param customerCode [String] The unique code representing the current customer
         
     | 
| 
       115 
115 
     | 
    
         
             
                  # @param model [CustomerAttributeModel[]] The list of attributes to link to the customer.
         
     | 
| 
       116 
     | 
    
         
            -
                  # @return [FetchResult]
         
     | 
| 
       117 
     | 
    
         
            -
                  def link_attributes_to_customer(companyId, customerCode, model)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
         
     | 
| 
       118 
     | 
    
         
            -
                    put(path, model)      end
         
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
                  # Link certificates to a customer
         
     | 
| 
       121 
     | 
    
         
            -
                  #
         
     | 
| 
      
 116 
     | 
    
         
            +
                  # @return [FetchResult]
         
     | 
| 
      
 117 
     | 
    
         
            +
                  def link_attributes_to_customer(companyId, customerCode, model)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
         
     | 
| 
      
 118 
     | 
    
         
            +
                    put(path, model)      end
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
                  # Link certificates to a customer
         
     | 
| 
      
 121 
     | 
    
         
            +
                  #
         
     | 
| 
       122 
122 
     | 
    
         
             
                  # Link one or more certificates to a customer.
         
     | 
| 
       123 
123 
     | 
    
         
             
                  #
         
     | 
| 
       124 
124 
     | 
    
         
             
                  # A customer object defines information about a person or business that purchases products from your
         
     | 
| 
         @@ -135,16 +135,16 @@ module AvaTax 
     | 
|
| 
       135 
135 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       136 
136 
     | 
    
         
             
                  #
         
     | 
| 
       137 
137 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
       138 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 138 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       139 
139 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded this customer
         
     | 
| 
       140 
140 
     | 
    
         
             
                  # @param customerCode [String] The unique code representing this customer
         
     | 
| 
       141 
141 
     | 
    
         
             
                  # @param model [Object] The list of certificates to link to this customer
         
     | 
| 
       142 
     | 
    
         
            -
                  # @return [FetchResult]
         
     | 
| 
       143 
     | 
    
         
            -
                  def link_certificates_to_customer(companyId, customerCode, model)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link"
         
     | 
| 
       144 
     | 
    
         
            -
                    post(path, model)      end
         
     | 
| 
       145 
     | 
    
         
            -
             
     | 
| 
       146 
     | 
    
         
            -
                  # Link two customer records together
         
     | 
| 
       147 
     | 
    
         
            -
                  #
         
     | 
| 
      
 142 
     | 
    
         
            +
                  # @return [FetchResult]
         
     | 
| 
      
 143 
     | 
    
         
            +
                  def link_certificates_to_customer(companyId, customerCode, model)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link"
         
     | 
| 
      
 144 
     | 
    
         
            +
                    post(path, model)      end
         
     | 
| 
      
 145 
     | 
    
         
            +
             
     | 
| 
      
 146 
     | 
    
         
            +
                  # Link two customer records together
         
     | 
| 
      
 147 
     | 
    
         
            +
                  #
         
     | 
| 
       148 
148 
     | 
    
         
             
                  # Links a Ship-To customer record with a Bill-To customer record.
         
     | 
| 
       149 
149 
     | 
    
         
             
                  #
         
     | 
| 
       150 
150 
     | 
    
         
             
                  # Customer records represent businesses or individuals who can provide exemption certificates. Some customers
         
     | 
| 
         @@ -162,16 +162,16 @@ module AvaTax 
     | 
|
| 
       162 
162 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       163 
163 
     | 
    
         
             
                  #
         
     | 
| 
       164 
164 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
       165 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 165 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       166 
166 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company defining customers.
         
     | 
| 
       167 
167 
     | 
    
         
             
                  # @param code [String] The code of the bill-to customer to link.
         
     | 
| 
       168 
168 
     | 
    
         
             
                  # @param model [Object] A list of information about ship-to customers to link to this bill-to customer.
         
     | 
| 
       169 
     | 
    
         
            -
                  # @return [Object]
         
     | 
| 
       170 
     | 
    
         
            -
                  def link_ship_to_customers_to_bill_customer(companyId, code, model)        path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link"
         
     | 
| 
       171 
     | 
    
         
            -
                    post(path, model)      end
         
     | 
| 
       172 
     | 
    
         
            -
             
     | 
| 
       173 
     | 
    
         
            -
                  # Retrieve a customer's attributes
         
     | 
| 
       174 
     | 
    
         
            -
                  #
         
     | 
| 
      
 169 
     | 
    
         
            +
                  # @return [Object]
         
     | 
| 
      
 170 
     | 
    
         
            +
                  def link_ship_to_customers_to_bill_customer(companyId, code, model)        path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link"
         
     | 
| 
      
 171 
     | 
    
         
            +
                    post(path, model)      end
         
     | 
| 
      
 172 
     | 
    
         
            +
             
     | 
| 
      
 173 
     | 
    
         
            +
                  # Retrieve a customer's attributes
         
     | 
| 
      
 174 
     | 
    
         
            +
                  #
         
     | 
| 
       175 
175 
     | 
    
         
             
                  # Retrieve the attributes linked to the customer identified by this URL.
         
     | 
| 
       176 
176 
     | 
    
         
             
                  #
         
     | 
| 
       177 
177 
     | 
    
         
             
                  # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
         
     | 
| 
         @@ -191,15 +191,15 @@ module AvaTax 
     | 
|
| 
       191 
191 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       192 
192 
     | 
    
         
             
                  #
         
     | 
| 
       193 
193 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
       194 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 194 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       195 
195 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
         
     | 
| 
       196 
196 
     | 
    
         
             
                  # @param customerCode [String] The unique code representing the current customer
         
     | 
| 
       197 
     | 
    
         
            -
                  # @return [FetchResult]
         
     | 
| 
       198 
     | 
    
         
            -
                  def list_attributes_for_customer(companyId, customerCode)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
         
     | 
| 
       199 
     | 
    
         
            -
                    get(path)      end
         
     | 
| 
       200 
     | 
    
         
            -
             
     | 
| 
       201 
     | 
    
         
            -
                  # List certificates linked to a customer
         
     | 
| 
       202 
     | 
    
         
            -
                  #
         
     | 
| 
      
 197 
     | 
    
         
            +
                  # @return [FetchResult]
         
     | 
| 
      
 198 
     | 
    
         
            +
                  def list_attributes_for_customer(companyId, customerCode)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
         
     | 
| 
      
 199 
     | 
    
         
            +
                    get(path)      end
         
     | 
| 
      
 200 
     | 
    
         
            +
             
     | 
| 
      
 201 
     | 
    
         
            +
                  # List certificates linked to a customer
         
     | 
| 
      
 202 
     | 
    
         
            +
                  #
         
     | 
| 
       203 
203 
     | 
    
         
             
                  # List all certificates linked to a customer.
         
     | 
| 
       204 
204 
     | 
    
         
             
                  #
         
     | 
| 
       205 
205 
     | 
    
         
             
                  # A customer object defines information about a person or business that purchases products from your
         
     | 
| 
         @@ -216,7 +216,7 @@ module AvaTax 
     | 
|
| 
       216 
216 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       217 
217 
     | 
    
         
             
                  #
         
     | 
| 
       218 
218 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
       219 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 219 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       220 
220 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded this customer
         
     | 
| 
       221 
221 
     | 
    
         
             
                  # @param customerCode [String] The unique code representing this customer
         
     | 
| 
       222 
222 
     | 
    
         
             
                  # @param include [String] OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following:      * customers - Retrieves the list of customers linked to the certificate.   * po_numbers - Retrieves all PO numbers tied to the certificate.   * attributes - Retrieves all attributes applied to the certificate.
         
     | 
| 
         @@ -224,12 +224,12 @@ module AvaTax 
     | 
|
| 
       224 
224 
     | 
    
         
             
                  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
         
     | 
| 
       225 
225 
     | 
    
         
             
                  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
         
     | 
| 
       226 
226 
     | 
    
         
             
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         
     | 
| 
       227 
     | 
    
         
            -
                  # @return [FetchResult]
         
     | 
| 
       228 
     | 
    
         
            -
                  def list_certificates_for_customer(companyId, customerCode, options={})        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates"
         
     | 
| 
       229 
     | 
    
         
            -
                    get(path, options)      end
         
     | 
| 
       230 
     | 
    
         
            -
             
     | 
| 
       231 
     | 
    
         
            -
                  # List valid certificates for a location
         
     | 
| 
       232 
     | 
    
         
            -
                  #
         
     | 
| 
      
 227 
     | 
    
         
            +
                  # @return [FetchResult]
         
     | 
| 
      
 228 
     | 
    
         
            +
                  def list_certificates_for_customer(companyId, customerCode, options={})        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates"
         
     | 
| 
      
 229 
     | 
    
         
            +
                    get(path, options)      end
         
     | 
| 
      
 230 
     | 
    
         
            +
             
     | 
| 
      
 231 
     | 
    
         
            +
                  # List valid certificates for a location
         
     | 
| 
      
 232 
     | 
    
         
            +
                  #
         
     | 
| 
       233 
233 
     | 
    
         
             
                  # List valid certificates linked to a customer in a particular country and region.
         
     | 
| 
       234 
234 
     | 
    
         
             
                  #
         
     | 
| 
       235 
235 
     | 
    
         
             
                  # This API is intended to help identify whether a customer has already provided a certificate that
         
     | 
| 
         @@ -249,17 +249,17 @@ module AvaTax 
     | 
|
| 
       249 
249 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       250 
250 
     | 
    
         
             
                  #
         
     | 
| 
       251 
251 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
       252 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 252 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       253 
253 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded this customer
         
     | 
| 
       254 
254 
     | 
    
         
             
                  # @param customerCode [String] The unique code representing this customer
         
     | 
| 
       255 
255 
     | 
    
         
             
                  # @param country [String] Search for certificates matching this country. Uses the ISO 3166 two character country code.
         
     | 
| 
       256 
256 
     | 
    
         
             
                  # @param region [String] Search for certificates matching this region. Uses the ISO 3166 two or three character state, region, or province code.
         
     | 
| 
       257 
     | 
    
         
            -
                  # @return [Object]
         
     | 
| 
       258 
     | 
    
         
            -
                  def list_valid_certificates_for_customer(companyId, customerCode, country, region)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}"
         
     | 
| 
       259 
     | 
    
         
            -
                    get(path)      end
         
     | 
| 
       260 
     | 
    
         
            -
             
     | 
| 
       261 
     | 
    
         
            -
                  # List all customers for this company
         
     | 
| 
       262 
     | 
    
         
            -
                  #
         
     | 
| 
      
 257 
     | 
    
         
            +
                  # @return [Object]
         
     | 
| 
      
 258 
     | 
    
         
            +
                  def list_valid_certificates_for_customer(companyId, customerCode, country, region)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}"
         
     | 
| 
      
 259 
     | 
    
         
            +
                    get(path)      end
         
     | 
| 
      
 260 
     | 
    
         
            +
             
     | 
| 
      
 261 
     | 
    
         
            +
                  # List all customers for this company
         
     | 
| 
      
 262 
     | 
    
         
            +
                  #
         
     | 
| 
       263 
263 
     | 
    
         
             
                  # List all customers recorded by this company matching the specified criteria.
         
     | 
| 
       264 
264 
     | 
    
         
             
                  #
         
     | 
| 
       265 
265 
     | 
    
         
             
                  # A customer object defines information about a person or business that purchases products from your
         
     | 
| 
         @@ -281,19 +281,19 @@ module AvaTax 
     | 
|
| 
       281 
281 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       282 
282 
     | 
    
         
             
                  #
         
     | 
| 
       283 
283 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
       284 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 284 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       285 
285 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded this customer
         
     | 
| 
       286 
286 
     | 
    
         
             
                  # @param include [String] OPTIONAL - You can specify the value `certificates` to fetch information about certificates linked to the customer.
         
     | 
| 
       287 
287 
     | 
    
         
             
                  # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* shipTos
         
     | 
| 
       288 
288 
     | 
    
         
             
                  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
         
     | 
| 
       289 
289 
     | 
    
         
             
                  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
         
     | 
| 
       290 
290 
     | 
    
         
             
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         
     | 
| 
       291 
     | 
    
         
            -
                  # @return [FetchResult]
         
     | 
| 
       292 
     | 
    
         
            -
                  def query_customers(companyId, options={})        path = "/api/v2/companies/#{companyId}/customers"
         
     | 
| 
       293 
     | 
    
         
            -
                    get(path, options)      end
         
     | 
| 
       294 
     | 
    
         
            -
             
     | 
| 
       295 
     | 
    
         
            -
                  # Unlink attributes from a customer
         
     | 
| 
       296 
     | 
    
         
            -
                  #
         
     | 
| 
      
 291 
     | 
    
         
            +
                  # @return [FetchResult]
         
     | 
| 
      
 292 
     | 
    
         
            +
                  def query_customers(companyId, options={})        path = "/api/v2/companies/#{companyId}/customers"
         
     | 
| 
      
 293 
     | 
    
         
            +
                    get(path, options)      end
         
     | 
| 
      
 294 
     | 
    
         
            +
             
     | 
| 
      
 295 
     | 
    
         
            +
                  # Unlink attributes from a customer
         
     | 
| 
      
 296 
     | 
    
         
            +
                  #
         
     | 
| 
       297 
297 
     | 
    
         
             
                  # Unlink one or many attributes from a customer.
         
     | 
| 
       298 
298 
     | 
    
         
             
                  #
         
     | 
| 
       299 
299 
     | 
    
         
             
                  # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
         
     | 
| 
         @@ -313,16 +313,16 @@ module AvaTax 
     | 
|
| 
       313 
313 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       314 
314 
     | 
    
         
             
                  #
         
     | 
| 
       315 
315 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
         
     | 
| 
       316 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 316 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       317 
317 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded the customer
         
     | 
| 
       318 
318 
     | 
    
         
             
                  # @param customerCode [String] The unique code representing the current customer
         
     | 
| 
       319 
319 
     | 
    
         
             
                  # @param model [CustomerAttributeModel[]] The list of attributes to unlink from the customer.
         
     | 
| 
       320 
     | 
    
         
            -
                  # @return [FetchResult]
         
     | 
| 
       321 
     | 
    
         
            -
                  def unlink_attributes_from_customer(companyId, customerCode, model)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
         
     | 
| 
       322 
     | 
    
         
            -
                    put(path, model)      end
         
     | 
| 
       323 
     | 
    
         
            -
             
     | 
| 
       324 
     | 
    
         
            -
                  # Unlink certificates from a customer
         
     | 
| 
       325 
     | 
    
         
            -
                  #
         
     | 
| 
      
 320 
     | 
    
         
            +
                  # @return [FetchResult]
         
     | 
| 
      
 321 
     | 
    
         
            +
                  def unlink_attributes_from_customer(companyId, customerCode, model)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
         
     | 
| 
      
 322 
     | 
    
         
            +
                    put(path, model)      end
         
     | 
| 
      
 323 
     | 
    
         
            +
             
     | 
| 
      
 324 
     | 
    
         
            +
                  # Unlink certificates from a customer
         
     | 
| 
      
 325 
     | 
    
         
            +
                  #
         
     | 
| 
       326 
326 
     | 
    
         
             
                  # Remove one or more certificates to a customer.
         
     | 
| 
       327 
327 
     | 
    
         
             
                  #
         
     | 
| 
       328 
328 
     | 
    
         
             
                  # A customer object defines information about a person or business that purchases products from your
         
     | 
| 
         @@ -339,16 +339,16 @@ module AvaTax 
     | 
|
| 
       339 
339 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       340 
340 
     | 
    
         
             
                  #
         
     | 
| 
       341 
341 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
       342 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 342 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       343 
343 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded this customer
         
     | 
| 
       344 
344 
     | 
    
         
             
                  # @param customerCode [String] The unique code representing this customer
         
     | 
| 
       345 
345 
     | 
    
         
             
                  # @param model [Object] The list of certificates to link to this customer
         
     | 
| 
       346 
     | 
    
         
            -
                  # @return [FetchResult]
         
     | 
| 
       347 
     | 
    
         
            -
                  def unlink_certificates_from_customer(companyId, customerCode, model)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink"
         
     | 
| 
       348 
     | 
    
         
            -
                    post(path, model)      end
         
     | 
| 
       349 
     | 
    
         
            -
             
     | 
| 
       350 
     | 
    
         
            -
                  # Update a single customer
         
     | 
| 
       351 
     | 
    
         
            -
                  #
         
     | 
| 
      
 346 
     | 
    
         
            +
                  # @return [FetchResult]
         
     | 
| 
      
 347 
     | 
    
         
            +
                  def unlink_certificates_from_customer(companyId, customerCode, model)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink"
         
     | 
| 
      
 348 
     | 
    
         
            +
                    post(path, model)      end
         
     | 
| 
      
 349 
     | 
    
         
            +
             
     | 
| 
      
 350 
     | 
    
         
            +
                  # Update a single customer
         
     | 
| 
      
 351 
     | 
    
         
            +
                  #
         
     | 
| 
       352 
352 
     | 
    
         
             
                  # Replace the customer object at this URL with a new record.
         
     | 
| 
       353 
353 
     | 
    
         
             
                  #
         
     | 
| 
       354 
354 
     | 
    
         
             
                  # A customer object defines information about a person or business that purchases products from your
         
     | 
| 
         @@ -365,13 +365,13 @@ module AvaTax 
     | 
|
| 
       365 
365 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       366 
366 
     | 
    
         
             
                  #
         
     | 
| 
       367 
367 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
         
     | 
| 
       368 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
      
 368 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
         
     | 
| 
       369 
369 
     | 
    
         
             
                  # @param companyId [Integer] The unique ID number of the company that recorded this customer
         
     | 
| 
       370 
370 
     | 
    
         
             
                  # @param customerCode [String] The unique code representing this customer
         
     | 
| 
       371 
371 
     | 
    
         
             
                  # @param model [Object] The new customer model that will replace the existing record at this URL
         
     | 
| 
       372 
     | 
    
         
            -
                  # @return [Object]
         
     | 
| 
       373 
     | 
    
         
            -
                  def update_customer(companyId, customerCode, model)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
         
     | 
| 
       374 
     | 
    
         
            -
                    put(path, model)      end
         
     | 
| 
       375 
     | 
    
         
            -
                end
         
     | 
| 
       376 
     | 
    
         
            -
              end
         
     | 
| 
      
 372 
     | 
    
         
            +
                  # @return [Object]
         
     | 
| 
      
 373 
     | 
    
         
            +
                  def update_customer(companyId, customerCode, model)        path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
         
     | 
| 
      
 374 
     | 
    
         
            +
                    put(path, model)      end
         
     | 
| 
      
 375 
     | 
    
         
            +
                end
         
     | 
| 
      
 376 
     | 
    
         
            +
              end
         
     | 
| 
       377 
377 
     | 
    
         
             
            end
         
     | 
| 
         @@ -1,69 +1,69 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module AvaTax
         
     | 
| 
       2 
     | 
    
         
            -
              class Client
         
     | 
| 
       3 
     | 
    
         
            -
                module DataSources 
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
                  # Create and store new datasources for the respective companies.
         
     | 
| 
       7 
     | 
    
         
            -
                  #
         
     | 
| 
      
 1 
     | 
    
         
            +
            module AvaTax
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Client
         
     | 
| 
      
 3 
     | 
    
         
            +
                module DataSources 
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                  # Create and store new datasources for the respective companies.
         
     | 
| 
      
 7 
     | 
    
         
            +
                  #
         
     | 
| 
       8 
8 
     | 
    
         
             
                  # Create one or more datasource objects.
         
     | 
| 
       9 
9 
     | 
    
         
             
                  #
         
     | 
| 
       10 
10 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       11 
11 
     | 
    
         
             
                  #
         
     | 
| 
       12 
12 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
         
     | 
| 
       13 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
      
 13 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
       14 
14 
     | 
    
         
             
                  # @param companyId [Integer] The id of the company you which to create the datasources
         
     | 
| 
       15 
15 
     | 
    
         
             
                  # @param model [DataSourceModel[]] 
         
     | 
| 
       16 
     | 
    
         
            -
                  # @return [DataSourceModel[]]
         
     | 
| 
       17 
     | 
    
         
            -
                  def create_data_sources(companyId, model)        path = "/api/v2/companies/#{companyId}/datasources"
         
     | 
| 
       18 
     | 
    
         
            -
                    post(path, model)      end
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
                  # Delete a datasource by datasource id for a company.
         
     | 
| 
       21 
     | 
    
         
            -
                  #
         
     | 
| 
      
 16 
     | 
    
         
            +
                  # @return [DataSourceModel[]]
         
     | 
| 
      
 17 
     | 
    
         
            +
                  def create_data_sources(companyId, model)        path = "/api/v2/companies/#{companyId}/datasources"
         
     | 
| 
      
 18 
     | 
    
         
            +
                    post(path, model)      end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                  # Delete a datasource by datasource id for a company.
         
     | 
| 
      
 21 
     | 
    
         
            +
                  #
         
     | 
| 
       22 
22 
     | 
    
         
             
                  # Marks the existing datasource for a company as deleted.
         
     | 
| 
       23 
23 
     | 
    
         
             
                  #
         
     | 
| 
       24 
24 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       25 
25 
     | 
    
         
             
                  #
         
     | 
| 
       26 
26 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
         
     | 
| 
       27 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
      
 27 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
       28 
28 
     | 
    
         
             
                  # @param companyId [Integer] The id of the company the datasource belongs to.
         
     | 
| 
       29 
29 
     | 
    
         
             
                  # @param id [Integer] The id of the datasource you wish to delete.
         
     | 
| 
       30 
     | 
    
         
            -
                  # @return [ErrorDetail[]]
         
     | 
| 
       31 
     | 
    
         
            -
                  def delete_data_source(companyId, id)        path = "/api/v2/companies/#{companyId}/datasources/#{id}"
         
     | 
| 
       32 
     | 
    
         
            -
                    delete(path)      end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                  # Get data source by data source id
         
     | 
| 
       35 
     | 
    
         
            -
                  #
         
     | 
| 
      
 30 
     | 
    
         
            +
                  # @return [ErrorDetail[]]
         
     | 
| 
      
 31 
     | 
    
         
            +
                  def delete_data_source(companyId, id)        path = "/api/v2/companies/#{companyId}/datasources/#{id}"
         
     | 
| 
      
 32 
     | 
    
         
            +
                    delete(path)      end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                  # Get data source by data source id
         
     | 
| 
      
 35 
     | 
    
         
            +
                  #
         
     | 
| 
       36 
36 
     | 
    
         
             
                  # Retrieve the data source by its unique ID number.
         
     | 
| 
       37 
37 
     | 
    
         
             
                  #
         
     | 
| 
       38 
38 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       39 
39 
     | 
    
         
             
                  #
         
     | 
| 
       40 
40 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
       41 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
      
 41 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
       42 
42 
     | 
    
         
             
                  # @param companyId [Integer] 
         
     | 
| 
       43 
43 
     | 
    
         
             
                  # @param id [Integer] data source id
         
     | 
| 
       44 
     | 
    
         
            -
                  # @return [Object]
         
     | 
| 
       45 
     | 
    
         
            -
                  def get_data_source_by_id(companyId, id)        path = "/api/v2/companies/#{companyId}/datasources/#{id}"
         
     | 
| 
       46 
     | 
    
         
            -
                    get(path)      end
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
                  # Retrieve all datasources for this company
         
     | 
| 
       49 
     | 
    
         
            -
                  #
         
     | 
| 
      
 44 
     | 
    
         
            +
                  # @return [Object]
         
     | 
| 
      
 45 
     | 
    
         
            +
                  def get_data_source_by_id(companyId, id)        path = "/api/v2/companies/#{companyId}/datasources/#{id}"
         
     | 
| 
      
 46 
     | 
    
         
            +
                    get(path)      end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                  # Retrieve all datasources for this company
         
     | 
| 
      
 49 
     | 
    
         
            +
                  #
         
     | 
| 
       50 
50 
     | 
    
         
             
                  # Gets multiple datasource objects for a given company.
         
     | 
| 
       51 
51 
     | 
    
         
             
                  #
         
     | 
| 
       52 
52 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       53 
53 
     | 
    
         
             
                  #
         
     | 
| 
       54 
54 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
       55 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
      
 55 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
       56 
56 
     | 
    
         
             
                  # @param companyId [Integer] The id of the company you wish to retrieve the datasources.
         
     | 
| 
       57 
57 
     | 
    
         
             
                  # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* isEnabled, isSynced, isAuthorized, name, externalState
         
     | 
| 
       58 
58 
     | 
    
         
             
                  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
         
     | 
| 
       59 
59 
     | 
    
         
             
                  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
         
     | 
| 
       60 
60 
     | 
    
         
             
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         
     | 
| 
       61 
     | 
    
         
            -
                  # @return [FetchResult]
         
     | 
| 
       62 
     | 
    
         
            -
                  def list_data_sources(companyId, options={})        path = "/api/v2/companies/#{companyId}/datasources"
         
     | 
| 
       63 
     | 
    
         
            -
                    get(path, options)      end
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
                  # Retrieve all datasources
         
     | 
| 
       66 
     | 
    
         
            -
                  #
         
     | 
| 
      
 61 
     | 
    
         
            +
                  # @return [FetchResult]
         
     | 
| 
      
 62 
     | 
    
         
            +
                  def list_data_sources(companyId, options={})        path = "/api/v2/companies/#{companyId}/datasources"
         
     | 
| 
      
 63 
     | 
    
         
            +
                    get(path, options)      end
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                  # Retrieve all datasources
         
     | 
| 
      
 66 
     | 
    
         
            +
                  #
         
     | 
| 
       67 
67 
     | 
    
         
             
                  # Get multiple datasource objects across all companies.
         
     | 
| 
       68 
68 
     | 
    
         
             
                  #
         
     | 
| 
       69 
69 
     | 
    
         
             
                  # Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
         
     | 
| 
         @@ -72,29 +72,29 @@ module AvaTax 
     | 
|
| 
       72 
72 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       73 
73 
     | 
    
         
             
                  #
         
     | 
| 
       74 
74 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
       75 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
      
 75 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
       76 
76 
     | 
    
         
             
                  # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* isEnabled, isSynced, isAuthorized, name, externalState
         
     | 
| 
       77 
77 
     | 
    
         
             
                  # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
         
     | 
| 
       78 
78 
     | 
    
         
             
                  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
         
     | 
| 
       79 
79 
     | 
    
         
             
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         
     | 
| 
       80 
     | 
    
         
            -
                  # @return [FetchResult]
         
     | 
| 
       81 
     | 
    
         
            -
                  def query_data_sources(options={})        path = "/api/v2/datasources"
         
     | 
| 
       82 
     | 
    
         
            -
                    get(path, options)      end
         
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
                  # Update a datasource identified by id for a company
         
     | 
| 
       85 
     | 
    
         
            -
                  #
         
     | 
| 
      
 80 
     | 
    
         
            +
                  # @return [FetchResult]
         
     | 
| 
      
 81 
     | 
    
         
            +
                  def query_data_sources(options={})        path = "/api/v2/datasources"
         
     | 
| 
      
 82 
     | 
    
         
            +
                    get(path, options)      end
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
                  # Update a datasource identified by id for a company
         
     | 
| 
      
 85 
     | 
    
         
            +
                  #
         
     | 
| 
       86 
86 
     | 
    
         
             
                  # Updates a datasource for a company.
         
     | 
| 
       87 
87 
     | 
    
         
             
                  #
         
     | 
| 
       88 
88 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       89 
89 
     | 
    
         
             
                  #
         
     | 
| 
       90 
90 
     | 
    
         
             
                  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
         
     | 
| 
       91 
     | 
    
         
            -
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
      
 91 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
       92 
92 
     | 
    
         
             
                  # @param companyId [Integer] The id of the company the datasource belongs to.
         
     | 
| 
       93 
93 
     | 
    
         
             
                  # @param id [Integer] The id of the datasource you wish to delete.
         
     | 
| 
       94 
94 
     | 
    
         
             
                  # @param model [Object] 
         
     | 
| 
       95 
     | 
    
         
            -
                  # @return [Object]
         
     | 
| 
       96 
     | 
    
         
            -
                  def update_data_source(companyId, id, model)        path = "/api/v2/companies/#{companyId}/datasources/#{id}"
         
     | 
| 
       97 
     | 
    
         
            -
                    put(path, model)      end
         
     | 
| 
       98 
     | 
    
         
            -
                end
         
     | 
| 
       99 
     | 
    
         
            -
              end
         
     | 
| 
      
 95 
     | 
    
         
            +
                  # @return [Object]
         
     | 
| 
      
 96 
     | 
    
         
            +
                  def update_data_source(companyId, id, model)        path = "/api/v2/companies/#{companyId}/datasources/#{id}"
         
     | 
| 
      
 97 
     | 
    
         
            +
                    put(path, model)      end
         
     | 
| 
      
 98 
     | 
    
         
            +
                end
         
     | 
| 
      
 99 
     | 
    
         
            +
              end
         
     | 
| 
       100 
100 
     | 
    
         
             
            end
         
     |