avatax 22.8.0 → 23.8.1
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/.github/workflows/gem-push.yml +3 -3
 - data/.gitignore +2 -0
 - data/README.md +1 -1
 - data/avatax.gemspec +3 -3
 - data/lib/avatax/api.rb +14 -0
 - data/lib/avatax/client/accounts.rb +17 -17
 - data/lib/avatax/client/addresses.rb +2 -2
 - data/lib/avatax/client/advancedrules.rb +5 -5
 - data/lib/avatax/client/ageverification.rb +60 -1
 - data/lib/avatax/client/avafileforms.rb +5 -5
 - data/lib/avatax/client/batches.rb +8 -8
 - data/lib/avatax/client/certexpressinvites.rb +3 -3
 - data/lib/avatax/client/certificates.rb +15 -15
 - data/lib/avatax/client/companies.rb +36 -36
 - data/lib/avatax/client/compliance.rb +1 -1
 - data/lib/avatax/client/contacts.rb +6 -6
 - data/lib/avatax/client/customers.rb +13 -13
 - data/lib/avatax/client/datasources.rb +9 -9
 - data/lib/avatax/client/definitions.rb +112 -78
 - data/lib/avatax/client/distancethresholds.rb +6 -6
 - data/lib/avatax/client/ecommercetoken.rb +4 -4
 - data/lib/avatax/client/firmclientlinkages.rb +11 -11
 - data/lib/avatax/client/free.rb +1 -1
 - data/lib/avatax/client/fundingrequests.rb +3 -3
 - data/lib/avatax/client/items.rb +52 -49
 - data/lib/avatax/client/jurisdictionoverrides.rb +6 -6
 - data/lib/avatax/client/locations.rb +18 -18
 - data/lib/avatax/client/multidocument.rb +10 -10
 - data/lib/avatax/client/nexus.rb +15 -15
 - data/lib/avatax/client/notices.rb +4 -4
 - data/lib/avatax/client/notifications.rb +6 -6
 - data/lib/avatax/client/provisioning.rb +2 -2
 - data/lib/avatax/client/registrar.rb +32 -10
 - data/lib/avatax/client/reports.rb +4 -4
 - data/lib/avatax/client/settings.rb +9 -9
 - data/lib/avatax/client/shippingverification.rb +4 -4
 - data/lib/avatax/client/subscriptions.rb +3 -3
 - data/lib/avatax/client/taxcodes.rb +9 -9
 - data/lib/avatax/client/taxcontent.rb +16 -12
 - data/lib/avatax/client/taxrules.rb +42 -6
 - data/lib/avatax/client/transactions.rb +81 -22
 - data/lib/avatax/client/upcs.rb +6 -6
 - data/lib/avatax/client/userdefinedfields.rb +4 -4
 - data/lib/avatax/client/users.rb +12 -12
 - data/lib/avatax/client/utilities.rb +3 -3
 - data/lib/avatax/client.rb +1 -0
 - data/lib/avatax/configuration.rb +4 -1
 - data/lib/avatax/connection.rb +17 -12
 - data/lib/avatax/version.rb +1 -1
 - data/spec/spec_helper.rb +2 -1
 - metadata +10 -10
 
| 
         @@ -19,6 +19,7 @@ module AvaTax 
     | 
|
| 
       19 
19 
     | 
    
         
             
                  #
         
     | 
| 
       20 
20 
     | 
    
         
             
                  #  * Lines
         
     | 
| 
       21 
21 
     | 
    
         
             
                  #  * Details (implies lines)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       22 
23 
     | 
    
         
             
                  #  * Summary (implies details)
         
     | 
| 
       23 
24 
     | 
    
         
             
                  #  * Addresses
         
     | 
| 
       24 
25 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -35,7 +36,7 @@ module AvaTax 
     | 
|
| 
       35 
36 
     | 
    
         
             
                  # @param model [Object] information about the transaction and lines to be added
         
     | 
| 
       36 
37 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       37 
38 
     | 
    
         
             
                  def add_lines(model, options={})        path = "/api/v2/companies/transactions/lines/add"
         
     | 
| 
       38 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 39 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       39 
40 
     | 
    
         | 
| 
       40 
41 
     | 
    
         
             
                  # Correct a previously created transaction
         
     | 
| 
       41 
42 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -55,6 +56,7 @@ module AvaTax 
     | 
|
| 
       55 
56 
     | 
    
         
             
                  #
         
     | 
| 
       56 
57 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       57 
58 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 59 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       58 
60 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       59 
61 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       60 
62 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -81,7 +83,7 @@ module AvaTax 
     | 
|
| 
       81 
83 
     | 
    
         
             
                  # @param model [Object] The adjustment you wish to make
         
     | 
| 
       82 
84 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       83 
85 
     | 
    
         
             
                  def adjust_transaction(companyCode, transactionCode, model, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
         
     | 
| 
       84 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 86 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       85 
87 
     | 
    
         | 
| 
       86 
88 
     | 
    
         
             
                  # Get audit information about a transaction
         
     | 
| 
       87 
89 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -118,7 +120,7 @@ module AvaTax 
     | 
|
| 
       118 
120 
     | 
    
         
             
                  # @param transactionCode [String] The code identifying the transaction
         
     | 
| 
       119 
121 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       120 
122 
     | 
    
         
             
                  def audit_transaction(companyCode, transactionCode)        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
         
     | 
| 
       121 
     | 
    
         
            -
                    get(path, {},  
     | 
| 
      
 123 
     | 
    
         
            +
                    get(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       122 
124 
     | 
    
         | 
| 
       123 
125 
     | 
    
         
             
                  # Get audit information about a transaction
         
     | 
| 
       124 
126 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -156,7 +158,7 @@ module AvaTax 
     | 
|
| 
       156 
158 
     | 
    
         
             
                  # @param documentType [String] The document type of the original transaction (See DocumentType::* for a list of allowable values)
         
     | 
| 
       157 
159 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       158 
160 
     | 
    
         
             
                  def audit_transaction_with_type(companyCode, transactionCode, documentType)        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
         
     | 
| 
       159 
     | 
    
         
            -
                    get(path, {},  
     | 
| 
      
 161 
     | 
    
         
            +
                    get(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       160 
162 
     | 
    
         | 
| 
       161 
163 
     | 
    
         
             
                  # Lock a set of documents
         
     | 
| 
       162 
164 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -176,7 +178,7 @@ module AvaTax 
     | 
|
| 
       176 
178 
     | 
    
         
             
                  # @param model [Object] bulk lock request
         
     | 
| 
       177 
179 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       178 
180 
     | 
    
         
             
                  def bulk_lock_transaction(model)        path = "/api/v2/transactions/lock"
         
     | 
| 
       179 
     | 
    
         
            -
                    post(path, model, {},  
     | 
| 
      
 181 
     | 
    
         
            +
                    post(path, model, {}, AvaTax::VERSION)      end
         
     | 
| 
       180 
182 
     | 
    
         | 
| 
       181 
183 
     | 
    
         
             
                  # Change a transaction's code
         
     | 
| 
       182 
184 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -196,6 +198,7 @@ module AvaTax 
     | 
|
| 
       196 
198 
     | 
    
         
             
                  #
         
     | 
| 
       197 
199 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       198 
200 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 201 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       199 
202 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       200 
203 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       201 
204 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -222,7 +225,7 @@ module AvaTax 
     | 
|
| 
       222 
225 
     | 
    
         
             
                  # @param model [Object] The code change request you wish to execute
         
     | 
| 
       223 
226 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       224 
227 
     | 
    
         
             
                  def change_transaction_code(companyCode, transactionCode, model, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
         
     | 
| 
       225 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 228 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       226 
229 
     | 
    
         | 
| 
       227 
230 
     | 
    
         
             
                  # Commit a transaction for reporting
         
     | 
| 
       228 
231 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -241,6 +244,7 @@ module AvaTax 
     | 
|
| 
       241 
244 
     | 
    
         
             
                  #
         
     | 
| 
       242 
245 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       243 
246 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 247 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       244 
248 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       245 
249 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       246 
250 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -266,7 +270,7 @@ module AvaTax 
     | 
|
| 
       266 
270 
     | 
    
         
             
                  # @param model [Object] The commit request you wish to execute
         
     | 
| 
       267 
271 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       268 
272 
     | 
    
         
             
                  def commit_transaction(companyCode, transactionCode, model, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
         
     | 
| 
       269 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 273 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       270 
274 
     | 
    
         | 
| 
       271 
275 
     | 
    
         
             
                  # Create or adjust a transaction
         
     | 
| 
       272 
276 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -283,6 +287,8 @@ module AvaTax 
     | 
|
| 
       283 
287 
     | 
    
         
             
                  #
         
     | 
| 
       284 
288 
     | 
    
         
             
                  # To generate a refund for a transaction, use the `RefundTransaction` API.
         
     | 
| 
       285 
289 
     | 
    
         
             
                  #
         
     | 
| 
      
 290 
     | 
    
         
            +
                  # An address is required for calculation. If no address is provided at the line level, the document level address will be used.
         
     | 
| 
      
 291 
     | 
    
         
            +
                  #
         
     | 
| 
       286 
292 
     | 
    
         
             
                  # If you don't specify the field `type` in your request, you will get an estimate of type `SalesOrder`, which will not be recorded in the database.
         
     | 
| 
       287 
293 
     | 
    
         
             
                  #
         
     | 
| 
       288 
294 
     | 
    
         
             
                  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
         
     | 
| 
         @@ -291,6 +297,7 @@ module AvaTax 
     | 
|
| 
       291 
297 
     | 
    
         
             
                  #
         
     | 
| 
       292 
298 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       293 
299 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 300 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       294 
301 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       295 
302 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       296 
303 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -313,7 +320,7 @@ module AvaTax 
     | 
|
| 
       313 
320 
     | 
    
         
             
                  # @param model [Object] The transaction you wish to create or adjust
         
     | 
| 
       314 
321 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       315 
322 
     | 
    
         
             
                  def create_or_adjust_transaction(model, options={})        path = "/api/v2/transactions/createoradjust"
         
     | 
| 
       316 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 323 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       317 
324 
     | 
    
         | 
| 
       318 
325 
     | 
    
         
             
                  # Create a new transaction
         
     | 
| 
       319 
326 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -332,6 +339,8 @@ module AvaTax 
     | 
|
| 
       332 
339 
     | 
    
         
             
                  #
         
     | 
| 
       333 
340 
     | 
    
         
             
                  # To generate a refund for a transaction, use the `RefundTransaction` API.
         
     | 
| 
       334 
341 
     | 
    
         
             
                  #
         
     | 
| 
      
 342 
     | 
    
         
            +
                  # An address is required for calculation. If no address is provided at the line level, the document level address will be used.
         
     | 
| 
      
 343 
     | 
    
         
            +
                  #
         
     | 
| 
       335 
344 
     | 
    
         
             
                  # The field `type` identifies the kind of transaction - for example, a sale, purchase, or refund. If you do not specify
         
     | 
| 
       336 
345 
     | 
    
         
             
                  # a `type` value, you will receive an estimate of type `SalesOrder`, which will not be recorded.
         
     | 
| 
       337 
346 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -344,6 +353,7 @@ module AvaTax 
     | 
|
| 
       344 
353 
     | 
    
         
             
                  #
         
     | 
| 
       345 
354 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       346 
355 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 356 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       347 
357 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       348 
358 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       349 
359 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -367,7 +377,7 @@ module AvaTax 
     | 
|
| 
       367 
377 
     | 
    
         
             
                  # @param model [Object] The transaction you wish to create
         
     | 
| 
       368 
378 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       369 
379 
     | 
    
         
             
                  def create_transaction(model, options={})        path = "/api/v2/transactions/create"
         
     | 
| 
       370 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 380 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       371 
381 
     | 
    
         | 
| 
       372 
382 
     | 
    
         
             
                  # Remove lines from an existing unlocked transaction
         
     | 
| 
       373 
383 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -382,6 +392,7 @@ module AvaTax 
     | 
|
| 
       382 
392 
     | 
    
         
             
                  #
         
     | 
| 
       383 
393 
     | 
    
         
             
                  #  * Lines
         
     | 
| 
       384 
394 
     | 
    
         
             
                  #  * Details (implies lines)
         
     | 
| 
      
 395 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       385 
396 
     | 
    
         
             
                  #  * Summary (implies details)
         
     | 
| 
       386 
397 
     | 
    
         
             
                  #  * Addresses
         
     | 
| 
       387 
398 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -398,7 +409,19 @@ module AvaTax 
     | 
|
| 
       398 
409 
     | 
    
         
             
                  # @param model [Object] information about the transaction and lines to be removed
         
     | 
| 
       399 
410 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       400 
411 
     | 
    
         
             
                  def delete_lines(model, options={})        path = "/api/v2/companies/transactions/lines/delete"
         
     | 
| 
       401 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 412 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
      
 413 
     | 
    
         
            +
             
     | 
| 
      
 414 
     | 
    
         
            +
                  # Fetches the Variance data generated for all the transactions done by Company.
         
     | 
| 
      
 415 
     | 
    
         
            +
                  #
         
     | 
| 
      
 416 
     | 
    
         
            +
                  # ### Security Policies
         
     | 
| 
      
 417 
     | 
    
         
            +
                  #
         
     | 
| 
      
 418 
     | 
    
         
            +
                  # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
      
 419 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
      
 420 
     | 
    
         
            +
                  # Swagger Name: AvaTaxClient	  
         
     | 
| 
      
 421 
     | 
    
         
            +
                  # @param companyCode [String] 
         
     | 
| 
      
 422 
     | 
    
         
            +
                  # @return [Object]
         
     | 
| 
      
 423 
     | 
    
         
            +
                  def get_all_variance_report_by_company_code(companyCode)        path = "/api/v2/companies/#{companyCode}/AllVariance"
         
     | 
| 
      
 424 
     | 
    
         
            +
                    get(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       402 
425 
     | 
    
         | 
| 
       403 
426 
     | 
    
         
             
                  # Retrieve a single transaction by code
         
     | 
| 
       404 
427 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -416,6 +439,7 @@ module AvaTax 
     | 
|
| 
       416 
439 
     | 
    
         
             
                  #
         
     | 
| 
       417 
440 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       418 
441 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 442 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       419 
443 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       420 
444 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       421 
445 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -440,7 +464,7 @@ module AvaTax 
     | 
|
| 
       440 
464 
     | 
    
         
             
                  # @param include [String] Specifies objects to include in this fetch call
         
     | 
| 
       441 
465 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       442 
466 
     | 
    
         
             
                  def get_transaction_by_code(companyCode, transactionCode, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
         
     | 
| 
       443 
     | 
    
         
            -
                    get(path, options,  
     | 
| 
      
 467 
     | 
    
         
            +
                    get(path, options, AvaTax::VERSION)      end
         
     | 
| 
       444 
468 
     | 
    
         | 
| 
       445 
469 
     | 
    
         
             
                  # Retrieve a single transaction by code
         
     | 
| 
       446 
470 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -465,7 +489,7 @@ module AvaTax 
     | 
|
| 
       465 
489 
     | 
    
         
             
                  # @param include [String] Specifies objects to include in this fetch call
         
     | 
| 
       466 
490 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       467 
491 
     | 
    
         
             
                  def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
         
     | 
| 
       468 
     | 
    
         
            -
                    get(path, options,  
     | 
| 
      
 492 
     | 
    
         
            +
                    get(path, options, AvaTax::VERSION)      end
         
     | 
| 
       469 
493 
     | 
    
         | 
| 
       470 
494 
     | 
    
         
             
                  # Retrieve a single transaction by ID
         
     | 
| 
       471 
495 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -480,6 +504,7 @@ module AvaTax 
     | 
|
| 
       480 
504 
     | 
    
         
             
                  #
         
     | 
| 
       481 
505 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       482 
506 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 507 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       483 
508 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       484 
509 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       485 
510 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -495,7 +520,20 @@ module AvaTax 
     | 
|
| 
       495 
520 
     | 
    
         
             
                  # @param include [String] Specifies objects to include in this fetch call
         
     | 
| 
       496 
521 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       497 
522 
     | 
    
         
             
                  def get_transaction_by_id(id, options={})        path = "/api/v2/transactions/#{id}"
         
     | 
| 
       498 
     | 
    
         
            -
                    get(path, options,  
     | 
| 
      
 523 
     | 
    
         
            +
                    get(path, options, AvaTax::VERSION)      end
         
     | 
| 
      
 524 
     | 
    
         
            +
             
     | 
| 
      
 525 
     | 
    
         
            +
                  # Fetches the Variance data generated for particular Company by transaction ID
         
     | 
| 
      
 526 
     | 
    
         
            +
                  #
         
     | 
| 
      
 527 
     | 
    
         
            +
                  # ### Security Policies
         
     | 
| 
      
 528 
     | 
    
         
            +
                  #
         
     | 
| 
      
 529 
     | 
    
         
            +
                  # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
      
 530 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
      
 531 
     | 
    
         
            +
                  # Swagger Name: AvaTaxClient	  
         
     | 
| 
      
 532 
     | 
    
         
            +
                  # @param companyCode [String] 
         
     | 
| 
      
 533 
     | 
    
         
            +
                  # @param transactionId [String] 
         
     | 
| 
      
 534 
     | 
    
         
            +
                  # @return [Object]
         
     | 
| 
      
 535 
     | 
    
         
            +
                  def get_variance_report_by_company_code_by_transaction_id(companyCode, transactionId)        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionId}/variance"
         
     | 
| 
      
 536 
     | 
    
         
            +
                    get(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       499 
537 
     | 
    
         | 
| 
       500 
538 
     | 
    
         
             
                  # Retrieve all transactions
         
     | 
| 
       501 
539 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -516,6 +554,7 @@ module AvaTax 
     | 
|
| 
       516 
554 
     | 
    
         
             
                  #
         
     | 
| 
       517 
555 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       518 
556 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 557 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       519 
558 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       520 
559 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       521 
560 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -543,7 +582,7 @@ module AvaTax 
     | 
|
| 
       543 
582 
     | 
    
         
             
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         
     | 
| 
       544 
583 
     | 
    
         
             
                  # @return [FetchResult]
         
     | 
| 
       545 
584 
     | 
    
         
             
                  def list_transactions_by_company(companyCode, options={})        path = "/api/v2/companies/#{companyCode}/transactions"
         
     | 
| 
       546 
     | 
    
         
            -
                    get(path, options,  
     | 
| 
      
 585 
     | 
    
         
            +
                    get(path, options, AvaTax::VERSION)      end
         
     | 
| 
       547 
586 
     | 
    
         | 
| 
       548 
587 
     | 
    
         
             
                  # Lock a single transaction
         
     | 
| 
       549 
588 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -552,7 +591,7 @@ module AvaTax 
     | 
|
| 
       552 
591 
     | 
    
         
             
                  # This API is mainly used for connector developers to simulate what happens when the Returns product locks a document.
         
     | 
| 
       553 
592 
     | 
    
         
             
                  # After this API call succeeds, the document will be locked and can't be voided or adjusted.
         
     | 
| 
       554 
593 
     | 
    
         
             
                  #
         
     | 
| 
       555 
     | 
    
         
            -
                  #  
     | 
| 
      
 594 
     | 
    
         
            +
                  # On Sandbox, this API is only available to customers who have both an AvaTaxPro and a Managed Returns subscription. On Production, this API is only available internally for the Avalara Returns team.
         
     | 
| 
       556 
595 
     | 
    
         
             
                  #
         
     | 
| 
       557 
596 
     | 
    
         
             
                  # If you have more than one document with the same `code`, specify the `documentType` parameter to choose between them.
         
     | 
| 
       558 
597 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -563,6 +602,7 @@ module AvaTax 
     | 
|
| 
       563 
602 
     | 
    
         
             
                  #
         
     | 
| 
       564 
603 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       565 
604 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 605 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       566 
606 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       567 
607 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       568 
608 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -589,7 +629,7 @@ module AvaTax 
     | 
|
| 
       589 
629 
     | 
    
         
             
                  # @param model [Object] The lock request you wish to execute
         
     | 
| 
       590 
630 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       591 
631 
     | 
    
         
             
                  def lock_transaction(companyCode, transactionCode, model, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
         
     | 
| 
       592 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 632 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       593 
633 
     | 
    
         | 
| 
       594 
634 
     | 
    
         
             
                  # Create a refund for a transaction
         
     | 
| 
       595 
635 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -618,6 +658,7 @@ module AvaTax 
     | 
|
| 
       618 
658 
     | 
    
         
             
                  #
         
     | 
| 
       619 
659 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       620 
660 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 661 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       621 
662 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       622 
663 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       623 
664 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -646,7 +687,7 @@ module AvaTax 
     | 
|
| 
       646 
687 
     | 
    
         
             
                  # @param model [Object] Information about the refund to create
         
     | 
| 
       647 
688 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       648 
689 
     | 
    
         
             
                  def refund_transaction(companyCode, transactionCode, model, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
         
     | 
| 
       649 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 690 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       650 
691 
     | 
    
         | 
| 
       651 
692 
     | 
    
         
             
                  # Perform multiple actions on a transaction
         
     | 
| 
       652 
693 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -665,6 +706,7 @@ module AvaTax 
     | 
|
| 
       665 
706 
     | 
    
         
             
                  #
         
     | 
| 
       666 
707 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       667 
708 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 709 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       668 
710 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       669 
711 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       670 
712 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -690,7 +732,7 @@ module AvaTax 
     | 
|
| 
       690 
732 
     | 
    
         
             
                  # @param model [Object] The data from an external system to reconcile against AvaTax
         
     | 
| 
       691 
733 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       692 
734 
     | 
    
         
             
                  def settle_transaction(companyCode, transactionCode, model, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
         
     | 
| 
       693 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 735 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       694 
736 
     | 
    
         | 
| 
       695 
737 
     | 
    
         
             
                  # Uncommit a transaction for reporting
         
     | 
| 
       696 
738 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -703,6 +745,7 @@ module AvaTax 
     | 
|
| 
       703 
745 
     | 
    
         
             
                  #
         
     | 
| 
       704 
746 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       705 
747 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 748 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       706 
749 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       707 
750 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       708 
751 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -728,7 +771,7 @@ module AvaTax 
     | 
|
| 
       728 
771 
     | 
    
         
             
                  # @param include [String] Specifies objects to include in this fetch call
         
     | 
| 
       729 
772 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       730 
773 
     | 
    
         
             
                  def uncommit_transaction(companyCode, transactionCode, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
         
     | 
| 
       731 
     | 
    
         
            -
                    post(path, options,  
     | 
| 
      
 774 
     | 
    
         
            +
                    post(path, {}, options, AvaTax::VERSION)      end
         
     | 
| 
       732 
775 
     | 
    
         | 
| 
       733 
776 
     | 
    
         
             
                  # Unvoids a transaction
         
     | 
| 
       734 
777 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -738,6 +781,7 @@ module AvaTax 
     | 
|
| 
       738 
781 
     | 
    
         
             
                  #
         
     | 
| 
       739 
782 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       740 
783 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 784 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       741 
785 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       742 
786 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       743 
787 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -763,7 +807,20 @@ module AvaTax 
     | 
|
| 
       763 
807 
     | 
    
         
             
                  # @param include [String] Specifies objects to include in this fetch call
         
     | 
| 
       764 
808 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       765 
809 
     | 
    
         
             
                  def unvoid_transaction(companyCode, transactionCode, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
         
     | 
| 
       766 
     | 
    
         
            -
                    post(path, options,  
     | 
| 
      
 810 
     | 
    
         
            +
                    post(path, {}, options, AvaTax::VERSION)      end
         
     | 
| 
      
 811 
     | 
    
         
            +
             
     | 
| 
      
 812 
     | 
    
         
            +
                  # Generates the Variance report which will capture the difference between "Tax Calculated by Avalara" Vs "Actual Tax" paid at custom clearance at line / header level.
         
     | 
| 
      
 813 
     | 
    
         
            +
                  #
         
     | 
| 
      
 814 
     | 
    
         
            +
                  # ### Security Policies
         
     | 
| 
      
 815 
     | 
    
         
            +
                  #
         
     | 
| 
      
 816 
     | 
    
         
            +
                  # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
         
     | 
| 
      
 817 
     | 
    
         
            +
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
      
 818 
     | 
    
         
            +
                  # Swagger Name: AvaTaxClient	  
         
     | 
| 
      
 819 
     | 
    
         
            +
                  # @param companyCode [String] 
         
     | 
| 
      
 820 
     | 
    
         
            +
                  # @param model [VarianceRequestModel[]] 
         
     | 
| 
      
 821 
     | 
    
         
            +
                  # @return [Object]
         
     | 
| 
      
 822 
     | 
    
         
            +
                  def variance_report(companyCode, model)        path = "/api/v2/companies/#{companyCode}/variance"
         
     | 
| 
      
 823 
     | 
    
         
            +
                    post(path, model, {}, AvaTax::VERSION)      end
         
     | 
| 
       767 
824 
     | 
    
         | 
| 
       768 
825 
     | 
    
         
             
                  # Verify a transaction
         
     | 
| 
       769 
826 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -780,6 +837,7 @@ module AvaTax 
     | 
|
| 
       780 
837 
     | 
    
         
             
                  #
         
     | 
| 
       781 
838 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       782 
839 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 840 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       783 
841 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       784 
842 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       785 
843 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -806,7 +864,7 @@ module AvaTax 
     | 
|
| 
       806 
864 
     | 
    
         
             
                  # @param model [Object] The data from an external system to reconcile against AvaTax
         
     | 
| 
       807 
865 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       808 
866 
     | 
    
         
             
                  def verify_transaction(companyCode, transactionCode, model, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
         
     | 
| 
       809 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 867 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       810 
868 
     | 
    
         | 
| 
       811 
869 
     | 
    
         
             
                  # Void a transaction
         
     | 
| 
       812 
870 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -825,6 +883,7 @@ module AvaTax 
     | 
|
| 
       825 
883 
     | 
    
         
             
                  #
         
     | 
| 
       826 
884 
     | 
    
         
             
                  # * Lines
         
     | 
| 
       827 
885 
     | 
    
         
             
                  # * Details (implies lines)
         
     | 
| 
      
 886 
     | 
    
         
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         
     | 
| 
       828 
887 
     | 
    
         
             
                  # * Summary (implies details)
         
     | 
| 
       829 
888 
     | 
    
         
             
                  # * Addresses
         
     | 
| 
       830 
889 
     | 
    
         
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         
     | 
| 
         @@ -851,7 +910,7 @@ module AvaTax 
     | 
|
| 
       851 
910 
     | 
    
         
             
                  # @param model [Object] The void request you wish to execute. To void a transaction the code must be set to 'DocVoided'
         
     | 
| 
       852 
911 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       853 
912 
     | 
    
         
             
                  def void_transaction(companyCode, transactionCode, model, options={})        path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
         
     | 
| 
       854 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 913 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       855 
914 
     | 
    
         
             
                end
         
     | 
| 
       856 
915 
     | 
    
         
             
              end
         
     | 
| 
       857 
916 
     | 
    
         
             
            end
         
     | 
    
        data/lib/avatax/client/upcs.rb
    CHANGED
    
    | 
         @@ -17,7 +17,7 @@ module AvaTax 
     | 
|
| 
       17 
17 
     | 
    
         
             
                  # @param model [UPCModel[]] The UPC you wish to create.
         
     | 
| 
       18 
18 
     | 
    
         
             
                  # @return [UPCModel[]]
         
     | 
| 
       19 
19 
     | 
    
         
             
                  def create_u_p_cs(companyId, model)        path = "/api/v2/companies/#{companyId}/upcs"
         
     | 
| 
       20 
     | 
    
         
            -
                    post(path, model, {},  
     | 
| 
      
 20 
     | 
    
         
            +
                    post(path, model, {}, AvaTax::VERSION)      end
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                  # Delete a single UPC
         
     | 
| 
       23 
23 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -32,7 +32,7 @@ module AvaTax 
     | 
|
| 
       32 
32 
     | 
    
         
             
                  # @param id [Integer] The ID of the UPC you wish to delete.
         
     | 
| 
       33 
33 
     | 
    
         
             
                  # @return [ErrorDetail[]]
         
     | 
| 
       34 
34 
     | 
    
         
             
                  def delete_u_p_c(companyId, id)        path = "/api/v2/companies/#{companyId}/upcs/#{id}"
         
     | 
| 
       35 
     | 
    
         
            -
                    delete(path, {},  
     | 
| 
      
 35 
     | 
    
         
            +
                    delete(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       36 
36 
     | 
    
         | 
| 
       37 
37 
     | 
    
         
             
                  # Retrieve a single UPC
         
     | 
| 
       38 
38 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -48,7 +48,7 @@ module AvaTax 
     | 
|
| 
       48 
48 
     | 
    
         
             
                  # @param id [Integer] The primary key of this UPC
         
     | 
| 
       49 
49 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       50 
50 
     | 
    
         
             
                  def get_u_p_c(companyId, id)        path = "/api/v2/companies/#{companyId}/upcs/#{id}"
         
     | 
| 
       51 
     | 
    
         
            -
                    get(path, {},  
     | 
| 
      
 51 
     | 
    
         
            +
                    get(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       52 
52 
     | 
    
         | 
| 
       53 
53 
     | 
    
         
             
                  # Retrieve UPCs for this company
         
     | 
| 
       54 
54 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -71,7 +71,7 @@ module AvaTax 
     | 
|
| 
       71 
71 
     | 
    
         
             
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         
     | 
| 
       72 
72 
     | 
    
         
             
                  # @return [FetchResult]
         
     | 
| 
       73 
73 
     | 
    
         
             
                  def list_u_p_cs_by_company(companyId, options={})        path = "/api/v2/companies/#{companyId}/upcs"
         
     | 
| 
       74 
     | 
    
         
            -
                    get(path, options,  
     | 
| 
      
 74 
     | 
    
         
            +
                    get(path, options, AvaTax::VERSION)      end
         
     | 
| 
       75 
75 
     | 
    
         | 
| 
       76 
76 
     | 
    
         
             
                  # Retrieve all UPCs
         
     | 
| 
       77 
77 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -93,7 +93,7 @@ module AvaTax 
     | 
|
| 
       93 
93 
     | 
    
         
             
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         
     | 
| 
       94 
94 
     | 
    
         
             
                  # @return [FetchResult]
         
     | 
| 
       95 
95 
     | 
    
         
             
                  def query_u_p_cs(options={})        path = "/api/v2/upcs"
         
     | 
| 
       96 
     | 
    
         
            -
                    get(path, options,  
     | 
| 
      
 96 
     | 
    
         
            +
                    get(path, options, AvaTax::VERSION)      end
         
     | 
| 
       97 
97 
     | 
    
         | 
| 
       98 
98 
     | 
    
         
             
                  # Update a single UPC
         
     | 
| 
       99 
99 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -112,7 +112,7 @@ module AvaTax 
     | 
|
| 
       112 
112 
     | 
    
         
             
                  # @param model [Object] The UPC you wish to update.
         
     | 
| 
       113 
113 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       114 
114 
     | 
    
         
             
                  def update_u_p_c(companyId, id, model)        path = "/api/v2/companies/#{companyId}/upcs/#{id}"
         
     | 
| 
       115 
     | 
    
         
            -
                    put(path, model, {},  
     | 
| 
      
 115 
     | 
    
         
            +
                    put(path, model, {}, AvaTax::VERSION)      end
         
     | 
| 
       116 
116 
     | 
    
         
             
                end
         
     | 
| 
       117 
117 
     | 
    
         
             
              end
         
     | 
| 
       118 
118 
     | 
    
         
             
            end
         
     | 
| 
         @@ -16,13 +16,13 @@ module AvaTax 
     | 
|
| 
       16 
16 
     | 
    
         
             
                  # @param id [Integer] The id of the User Defined Field you wish to delete.
         
     | 
| 
       17 
17 
     | 
    
         
             
                  # @return [ErrorDetail[]]
         
     | 
| 
       18 
18 
     | 
    
         
             
                  def delete_user_defined_field(companyId, id)        path = "/api/v2/companies/#{companyId}/userdefinedfields/#{id}"
         
     | 
| 
       19 
     | 
    
         
            -
                    delete(path, {},  
     | 
| 
      
 19 
     | 
    
         
            +
                    delete(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
                  # 
         
     | 
| 
       22 
22 
     | 
    
         
             
                  #
         
     | 
| 
       23 
23 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       24 
24 
     | 
    
         
             
                  #
         
     | 
| 
       25 
     | 
    
         
            -
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
      
 25 
     | 
    
         
            +
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
       26 
26 
     | 
    
         
             
                  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
         
     | 
| 
       27 
27 
     | 
    
         
             
                  # Swagger Name: AvaTaxClient	  
         
     | 
| 
       28 
28 
     | 
    
         
             
                  # @param companyId [Integer] 
         
     | 
| 
         @@ -30,7 +30,7 @@ module AvaTax 
     | 
|
| 
       30 
30 
     | 
    
         
             
                  # @param allowDefaults [Boolean] If true this will add defaulted UDFs to the list that are not named yet
         
     | 
| 
       31 
31 
     | 
    
         
             
                  # @return [FetchResult]
         
     | 
| 
       32 
32 
     | 
    
         
             
                  def list_user_defined_fields_by_company_id(companyId, options={})        path = "/api/v2/companies/#{companyId}/userdefinedfields"
         
     | 
| 
       33 
     | 
    
         
            -
                    get(path, options,  
     | 
| 
      
 33 
     | 
    
         
            +
                    get(path, options, AvaTax::VERSION)      end
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
                  # Update a User Defined Field identified by id for a company
         
     | 
| 
       36 
36 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -46,7 +46,7 @@ module AvaTax 
     | 
|
| 
       46 
46 
     | 
    
         
             
                  # @param model [Object] 
         
     | 
| 
       47 
47 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       48 
48 
     | 
    
         
             
                  def update_user_defined_field(companyId, model, options={})        path = "/api/v2/companies/#{companyId}/userdefinedfields"
         
     | 
| 
       49 
     | 
    
         
            -
                    post(path, model, options,  
     | 
| 
      
 49 
     | 
    
         
            +
                    post(path, model, options, AvaTax::VERSION)      end
         
     | 
| 
       50 
50 
     | 
    
         
             
                end
         
     | 
| 
       51 
51 
     | 
    
         
             
              end
         
     | 
| 
       52 
52 
     | 
    
         
             
            end
         
     | 
    
        data/lib/avatax/client/users.rb
    CHANGED
    
    | 
         @@ -20,7 +20,7 @@ module AvaTax 
     | 
|
| 
       20 
20 
     | 
    
         
             
                  # @param model [Object] An object containing your current password and the new password.
         
     | 
| 
       21 
21 
     | 
    
         
             
                  # @return [String]
         
     | 
| 
       22 
22 
     | 
    
         
             
                  def change_password(model)        path = "/api/v2/passwords"
         
     | 
| 
       23 
     | 
    
         
            -
                    put(path, model, {},  
     | 
| 
      
 23 
     | 
    
         
            +
                    put(path, model, {}, AvaTax::VERSION)      end
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
       25 
25 
     | 
    
         
             
                  # Create new users
         
     | 
| 
       26 
26 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -42,7 +42,7 @@ module AvaTax 
     | 
|
| 
       42 
42 
     | 
    
         
             
                  # @param model [UserModel[]] The user or array of users you wish to create.
         
     | 
| 
       43 
43 
     | 
    
         
             
                  # @return [UserModel[]]
         
     | 
| 
       44 
44 
     | 
    
         
             
                  def create_users(accountId, model)        path = "/api/v2/accounts/#{accountId}/users"
         
     | 
| 
       45 
     | 
    
         
            -
                    post(path, model, {},  
     | 
| 
      
 45 
     | 
    
         
            +
                    post(path, model, {}, AvaTax::VERSION)      end
         
     | 
| 
       46 
46 
     | 
    
         | 
| 
       47 
47 
     | 
    
         
             
                  # Delete a single user
         
     | 
| 
       48 
48 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -61,7 +61,7 @@ module AvaTax 
     | 
|
| 
       61 
61 
     | 
    
         
             
                  # @param accountId [Integer] The accountID of the user you wish to delete.
         
     | 
| 
       62 
62 
     | 
    
         
             
                  # @return [ErrorDetail[]]
         
     | 
| 
       63 
63 
     | 
    
         
             
                  def delete_user(id, accountId)        path = "/api/v2/accounts/#{accountId}/users/#{id}"
         
     | 
| 
       64 
     | 
    
         
            -
                    delete(path, {},  
     | 
| 
      
 64 
     | 
    
         
            +
                    delete(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       65 
65 
     | 
    
         | 
| 
       66 
66 
     | 
    
         
             
                  # Retrieve a single user
         
     | 
| 
       67 
67 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -74,14 +74,14 @@ module AvaTax 
     | 
|
| 
       74 
74 
     | 
    
         
             
                  #
         
     | 
| 
       75 
75 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       76 
76 
     | 
    
         
             
                  #
         
     | 
| 
       77 
     | 
    
         
            -
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
      
 77 
     | 
    
         
            +
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
       78 
78 
     | 
    
         
             
                  # Swagger Name: AvaTaxClient	  
         
     | 
| 
       79 
79 
     | 
    
         
             
                  # @param id [Integer] The ID of the user to retrieve.
         
     | 
| 
       80 
80 
     | 
    
         
             
                  # @param accountId [Integer] The accountID of the user you wish to get.
         
     | 
| 
       81 
81 
     | 
    
         
             
                  # @param include [String] Optional fetch commands.
         
     | 
| 
       82 
82 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       83 
83 
     | 
    
         
             
                  def get_user(id, accountId, options={})        path = "/api/v2/accounts/#{accountId}/users/#{id}"
         
     | 
| 
       84 
     | 
    
         
            -
                    get(path, options,  
     | 
| 
      
 84 
     | 
    
         
            +
                    get(path, options, AvaTax::VERSION)      end
         
     | 
| 
       85 
85 
     | 
    
         | 
| 
       86 
86 
     | 
    
         
             
                  # Retrieve all entitlements for a single user
         
     | 
| 
       87 
87 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -103,13 +103,13 @@ module AvaTax 
     | 
|
| 
       103 
103 
     | 
    
         
             
                  #
         
     | 
| 
       104 
104 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       105 
105 
     | 
    
         
             
                  #
         
     | 
| 
       106 
     | 
    
         
            -
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
      
 106 
     | 
    
         
            +
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
       107 
107 
     | 
    
         
             
                  # Swagger Name: AvaTaxClient	  
         
     | 
| 
       108 
108 
     | 
    
         
             
                  # @param id [Integer] The ID of the user to retrieve.
         
     | 
| 
       109 
109 
     | 
    
         
             
                  # @param accountId [Integer] The accountID of the user you wish to get.
         
     | 
| 
       110 
110 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       111 
111 
     | 
    
         
             
                  def get_user_entitlements(id, accountId)        path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements"
         
     | 
| 
       112 
     | 
    
         
            -
                    get(path, {},  
     | 
| 
      
 112 
     | 
    
         
            +
                    get(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       113 
113 
     | 
    
         | 
| 
       114 
114 
     | 
    
         
             
                  # Retrieve users for this account
         
     | 
| 
       115 
115 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -128,7 +128,7 @@ module AvaTax 
     | 
|
| 
       128 
128 
     | 
    
         
             
                  #
         
     | 
| 
       129 
129 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       130 
130 
     | 
    
         
             
                  #
         
     | 
| 
       131 
     | 
    
         
            -
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
      
 131 
     | 
    
         
            +
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
       132 
132 
     | 
    
         
             
                  # Swagger Name: AvaTaxClient	  
         
     | 
| 
       133 
133 
     | 
    
         
             
                  # @param accountId [Integer] The accountID of the user you wish to list.
         
     | 
| 
       134 
134 
     | 
    
         
             
                  # @param include [String] Optional fetch commands.
         
     | 
| 
         @@ -138,7 +138,7 @@ module AvaTax 
     | 
|
| 
       138 
138 
     | 
    
         
             
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         
     | 
| 
       139 
139 
     | 
    
         
             
                  # @return [FetchResult]
         
     | 
| 
       140 
140 
     | 
    
         
             
                  def list_users_by_account(accountId, options={})        path = "/api/v2/accounts/#{accountId}/users"
         
     | 
| 
       141 
     | 
    
         
            -
                    get(path, options,  
     | 
| 
      
 141 
     | 
    
         
            +
                    get(path, options, AvaTax::VERSION)      end
         
     | 
| 
       142 
142 
     | 
    
         | 
| 
       143 
143 
     | 
    
         
             
                  # Retrieve all users
         
     | 
| 
       144 
144 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -159,7 +159,7 @@ module AvaTax 
     | 
|
| 
       159 
159 
     | 
    
         
             
                  #
         
     | 
| 
       160 
160 
     | 
    
         
             
                  # ### Security Policies
         
     | 
| 
       161 
161 
     | 
    
         
             
                  #
         
     | 
| 
       162 
     | 
    
         
            -
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
      
 162 
     | 
    
         
            +
                  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
         
     | 
| 
       163 
163 
     | 
    
         
             
                  # Swagger Name: AvaTaxClient	  
         
     | 
| 
       164 
164 
     | 
    
         
             
                  # @param include [String] Optional fetch commands.
         
     | 
| 
       165 
165 
     | 
    
         
             
                  # @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:* SuppressNewUserEmail
         
     | 
| 
         @@ -168,7 +168,7 @@ module AvaTax 
     | 
|
| 
       168 
168 
     | 
    
         
             
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         
     | 
| 
       169 
169 
     | 
    
         
             
                  # @return [FetchResult]
         
     | 
| 
       170 
170 
     | 
    
         
             
                  def query_users(options={})        path = "/api/v2/users"
         
     | 
| 
       171 
     | 
    
         
            -
                    get(path, options,  
     | 
| 
      
 171 
     | 
    
         
            +
                    get(path, options, AvaTax::VERSION)      end
         
     | 
| 
       172 
172 
     | 
    
         | 
| 
       173 
173 
     | 
    
         
             
                  # Update a single user
         
     | 
| 
       174 
174 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -186,7 +186,7 @@ module AvaTax 
     | 
|
| 
       186 
186 
     | 
    
         
             
                  # @param model [Object] The user object you wish to update.
         
     | 
| 
       187 
187 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       188 
188 
     | 
    
         
             
                  def update_user(id, accountId, model)        path = "/api/v2/accounts/#{accountId}/users/#{id}"
         
     | 
| 
       189 
     | 
    
         
            -
                    put(path, model, {},  
     | 
| 
      
 189 
     | 
    
         
            +
                    put(path, model, {}, AvaTax::VERSION)      end
         
     | 
| 
       190 
190 
     | 
    
         
             
                end
         
     | 
| 
       191 
191 
     | 
    
         
             
              end
         
     | 
| 
       192 
192 
     | 
    
         
             
            end
         
     | 
| 
         @@ -17,7 +17,7 @@ module AvaTax 
     | 
|
| 
       17 
17 
     | 
    
         
             
                  # @param serviceTypeId [String] The service to check
         
     | 
| 
       18 
18 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       19 
19 
     | 
    
         
             
                  def get_my_subscription(serviceTypeId)        path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
         
     | 
| 
       20 
     | 
    
         
            -
                    get(path, {},  
     | 
| 
      
 20 
     | 
    
         
            +
                    get(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                  # List all services to which the current user is subscribed
         
     | 
| 
       23 
23 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -32,7 +32,7 @@ module AvaTax 
     | 
|
| 
       32 
32 
     | 
    
         
             
                  # Swagger Name: AvaTaxClient	  
         
     | 
| 
       33 
33 
     | 
    
         
             
                  # @return [FetchResult]
         
     | 
| 
       34 
34 
     | 
    
         
             
                  def list_my_subscriptions()        path = "/api/v2/utilities/subscriptions"
         
     | 
| 
       35 
     | 
    
         
            -
                    get(path, {},  
     | 
| 
      
 35 
     | 
    
         
            +
                    get(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       36 
36 
     | 
    
         | 
| 
       37 
37 
     | 
    
         
             
                  # Tests connectivity and version of the service
         
     | 
| 
       38 
38 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -59,7 +59,7 @@ module AvaTax 
     | 
|
| 
       59 
59 
     | 
    
         
             
                  # Swagger Name: AvaTaxClient	  
         
     | 
| 
       60 
60 
     | 
    
         
             
                  # @return [Object]
         
     | 
| 
       61 
61 
     | 
    
         
             
                  def ping()        path = "/api/v2/utilities/ping"
         
     | 
| 
       62 
     | 
    
         
            -
                    get(path, {},  
     | 
| 
      
 62 
     | 
    
         
            +
                    get(path, {}, AvaTax::VERSION)      end
         
     | 
| 
       63 
63 
     | 
    
         
             
                end
         
     | 
| 
       64 
64 
     | 
    
         
             
              end
         
     | 
| 
       65 
65 
     | 
    
         
             
            end
         
     | 
    
        data/lib/avatax/client.rb
    CHANGED
    
    
    
        data/lib/avatax/configuration.rb
    CHANGED
    
    | 
         @@ -19,7 +19,8 @@ module AvaTax 
     | 
|
| 
       19 
19 
     | 
    
         
             
                  :custom_logger_options,
         
     | 
| 
       20 
20 
     | 
    
         
             
                  :proxy,
         
     | 
| 
       21 
21 
     | 
    
         
             
                  :faraday_response,
         
     | 
| 
       22 
     | 
    
         
            -
                  :response_big_decimal_conversion
         
     | 
| 
      
 22 
     | 
    
         
            +
                  :response_big_decimal_conversion,
         
     | 
| 
      
 23 
     | 
    
         
            +
                  :log_request_and_response_info
         
     | 
| 
       23 
24 
     | 
    
         
             
                ].freeze
         
     | 
| 
       24 
25 
     | 
    
         | 
| 
       25 
26 
     | 
    
         
             
                DEFAULT_APP_NAME = nil
         
     | 
| 
         @@ -36,6 +37,7 @@ module AvaTax 
     | 
|
| 
       36 
37 
     | 
    
         
             
                DEFAULT_PROXY = nil
         
     | 
| 
       37 
38 
     | 
    
         
             
                DEFAULT_FARADAY_RESPONSE = false
         
     | 
| 
       38 
39 
     | 
    
         
             
                DEFAULT_RESPONSE_BIG_DECIMAL_CONVERSION = false
         
     | 
| 
      
 40 
     | 
    
         
            +
                DEFAULT_LOG_REQUEST_AND_RESPONSE_INFO = false
         
     | 
| 
       39 
41 
     | 
    
         | 
| 
       40 
42 
     | 
    
         
             
                attr_accessor *VALID_OPTIONS_KEYS
         
     | 
| 
       41 
43 
     | 
    
         | 
| 
         @@ -70,6 +72,7 @@ module AvaTax 
     | 
|
| 
       70 
72 
     | 
    
         
             
                  self.proxy = DEFAULT_PROXY
         
     | 
| 
       71 
73 
     | 
    
         
             
                  self.faraday_response = DEFAULT_FARADAY_RESPONSE
         
     | 
| 
       72 
74 
     | 
    
         
             
                  self.response_big_decimal_conversion = DEFAULT_RESPONSE_BIG_DECIMAL_CONVERSION
         
     | 
| 
      
 75 
     | 
    
         
            +
                  self.log_request_and_response_info = DEFAULT_LOG_REQUEST_AND_RESPONSE_INFO
         
     | 
| 
       73 
76 
     | 
    
         
             
                end
         
     | 
| 
       74 
77 
     | 
    
         | 
| 
       75 
78 
     | 
    
         
             
              end
         
     |