avatax 23.6.1 → 23.7.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/definitions.rb +1 -1
- data/lib/avatax/client/taxrules.rb +36 -0
- data/lib/avatax/client/transactions.rb +17 -0
- data/lib/avatax/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 02afc50318c3e6ad4a1e47c74e9064713202ce44fbc620378d0c06630603b456
         | 
| 4 | 
            +
              data.tar.gz: 4dfaaea59f47f37f0795fb61b5dc03fc183720101e4ed3c95bfed6c0b0b625c0
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 7adc544695c4d8c51a80a97cef57031ae055234b08dbf1bfe5fe6baca31132c6a4c91de2a7f2a3928c393ec1b0dbf0455c8253b51234d9bafe22256458f2fe28
         | 
| 7 | 
            +
              data.tar.gz: 75d522128e56119a88d55d81017bd6aa34e2b99f4ae27dfef97fa8c97cd0f360c030527cb1ed1cf259eef865d42719eebc00bbeb102007ce2edee05d90cbb7d0
         | 
| @@ -726,7 +726,7 @@ module AvaTax | |
| 726 726 | 
             
                  # This list of parameters is available for use when configuring your transaction.
         | 
| 727 727 | 
             
                  # Some parameters are only available for use if you have subscribed to certain features of AvaTax.
         | 
| 728 728 | 
             
                  # Swagger Name: AvaTaxClient	  
         | 
| 729 | 
            -
                  # @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:* values
         | 
| 729 | 
            +
                  # @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:* values, valueDescriptions
         | 
| 730 730 | 
             
                  # @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.
         | 
| 731 731 | 
             
                  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
         | 
| 732 732 | 
             
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         | 
| @@ -3,6 +3,25 @@ module AvaTax | |
| 3 3 | 
             
                module TaxRules 
         | 
| 4 4 |  | 
| 5 5 |  | 
| 6 | 
            +
                  # Create new Country Coefficients. If already exist update them.
         | 
| 7 | 
            +
                  #
         | 
| 8 | 
            +
                  # Create one or more Country Coefficients for particular country.
         | 
| 9 | 
            +
                  #
         | 
| 10 | 
            +
                  # We would like to use country coefficients during Cross-Border calculations to slightly increase or decrease
         | 
| 11 | 
            +
                  # a calculation for a line based on the tax-subtype and Country of destination for a transaction.
         | 
| 12 | 
            +
                  #
         | 
| 13 | 
            +
                  # This will allow AvaTax to minimize the variance caused between actual transaction taken place on ground Vs Tax
         | 
| 14 | 
            +
                  # Calculated by AvaTax.
         | 
| 15 | 
            +
                  #
         | 
| 16 | 
            +
                  # Make sure to use the same API to update the country coefficients that is already present in the database.
         | 
| 17 | 
            +
                  # This will make existing entry for specific country as ineffective for that date. And new entry created will get applicable
         | 
| 18 | 
            +
                  # to the newer transactions.
         | 
| 19 | 
            +
                  # Swagger Name: AvaTaxClient	  
         | 
| 20 | 
            +
                  # @param model [Object] The Country Coefficients for specific country you wish to create.
         | 
| 21 | 
            +
                  # @return [CountryCoefficientsResponseModel[]]
         | 
| 22 | 
            +
                  def create_country_coefficients(model)        path = "/api/v2/countryCoefficients"
         | 
| 23 | 
            +
                    put(path, model, {}, AvaTax::VERSION)      end
         | 
| 24 | 
            +
             | 
| 6 25 | 
             
                  # Create a new tax rule
         | 
| 7 26 | 
             
                  #
         | 
| 8 27 | 
             
                  # Create one or more custom tax rules attached to this company.
         | 
| @@ -81,6 +100,23 @@ module AvaTax | |
| 81 100 | 
             
                  def get_tax_rule(companyId, id)        path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
         | 
| 82 101 | 
             
                    get(path, {}, AvaTax::VERSION)      end
         | 
| 83 102 |  | 
| 103 | 
            +
                  # Retrieve country coefficients for specific country
         | 
| 104 | 
            +
                  #
         | 
| 105 | 
            +
                  # Retrieve all or any specific records of Country Coefficients based on the filters(optional) for specific country.
         | 
| 106 | 
            +
                  #
         | 
| 107 | 
            +
                  #  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/) .
         | 
| 108 | 
            +
                  #  Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
         | 
| 109 | 
            +
                  # Swagger Name: AvaTaxClient	  
         | 
| 110 | 
            +
                  # @param country [String] Country for which data need to be pulled for.
         | 
| 111 | 
            +
                  # @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:* CoefficientsId, AccountId, ModifiedUserId, CreatedUserId
         | 
| 112 | 
            +
                  # @param include [String] A comma separated list of additional data to retrieve.
         | 
| 113 | 
            +
                  # @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.
         | 
| 114 | 
            +
                  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
         | 
| 115 | 
            +
                  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
         | 
| 116 | 
            +
                  # @return [FetchResult]
         | 
| 117 | 
            +
                  def list_country_coefficients(country, options={})        path = "/api/v2/#{country}/CountryCoefficients"
         | 
| 118 | 
            +
                    get(path, options, AvaTax::VERSION)      end
         | 
| 119 | 
            +
             | 
| 84 120 | 
             
                  # Retrieve tax rules for this company
         | 
| 85 121 | 
             
                  #
         | 
| 86 122 | 
             
                  # List all taxrule objects attached to this company.
         | 
| @@ -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)
         | 
| @@ -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)
         | 
| @@ -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)
         | 
| @@ -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)
         | 
| @@ -293,6 +297,7 @@ module AvaTax | |
| 293 297 | 
             
                  #
         | 
| 294 298 | 
             
                  # * Lines
         | 
| 295 299 | 
             
                  # * Details (implies lines)
         | 
| 300 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 296 301 | 
             
                  # * Summary (implies details)
         | 
| 297 302 | 
             
                  # * Addresses
         | 
| 298 303 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -348,6 +353,7 @@ module AvaTax | |
| 348 353 | 
             
                  #
         | 
| 349 354 | 
             
                  # * Lines
         | 
| 350 355 | 
             
                  # * Details (implies lines)
         | 
| 356 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 351 357 | 
             
                  # * Summary (implies details)
         | 
| 352 358 | 
             
                  # * Addresses
         | 
| 353 359 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -386,6 +392,7 @@ module AvaTax | |
| 386 392 | 
             
                  #
         | 
| 387 393 | 
             
                  #  * Lines
         | 
| 388 394 | 
             
                  #  * Details (implies lines)
         | 
| 395 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 389 396 | 
             
                  #  * Summary (implies details)
         | 
| 390 397 | 
             
                  #  * Addresses
         | 
| 391 398 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -432,6 +439,7 @@ module AvaTax | |
| 432 439 | 
             
                  #
         | 
| 433 440 | 
             
                  # * Lines
         | 
| 434 441 | 
             
                  # * Details (implies lines)
         | 
| 442 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 435 443 | 
             
                  # * Summary (implies details)
         | 
| 436 444 | 
             
                  # * Addresses
         | 
| 437 445 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -496,6 +504,7 @@ module AvaTax | |
| 496 504 | 
             
                  #
         | 
| 497 505 | 
             
                  # * Lines
         | 
| 498 506 | 
             
                  # * Details (implies lines)
         | 
| 507 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 499 508 | 
             
                  # * Summary (implies details)
         | 
| 500 509 | 
             
                  # * Addresses
         | 
| 501 510 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -545,6 +554,7 @@ module AvaTax | |
| 545 554 | 
             
                  #
         | 
| 546 555 | 
             
                  # * Lines
         | 
| 547 556 | 
             
                  # * Details (implies lines)
         | 
| 557 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 548 558 | 
             
                  # * Summary (implies details)
         | 
| 549 559 | 
             
                  # * Addresses
         | 
| 550 560 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -592,6 +602,7 @@ module AvaTax | |
| 592 602 | 
             
                  #
         | 
| 593 603 | 
             
                  # * Lines
         | 
| 594 604 | 
             
                  # * Details (implies lines)
         | 
| 605 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 595 606 | 
             
                  # * Summary (implies details)
         | 
| 596 607 | 
             
                  # * Addresses
         | 
| 597 608 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -647,6 +658,7 @@ module AvaTax | |
| 647 658 | 
             
                  #
         | 
| 648 659 | 
             
                  # * Lines
         | 
| 649 660 | 
             
                  # * Details (implies lines)
         | 
| 661 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 650 662 | 
             
                  # * Summary (implies details)
         | 
| 651 663 | 
             
                  # * Addresses
         | 
| 652 664 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -694,6 +706,7 @@ module AvaTax | |
| 694 706 | 
             
                  #
         | 
| 695 707 | 
             
                  # * Lines
         | 
| 696 708 | 
             
                  # * Details (implies lines)
         | 
| 709 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 697 710 | 
             
                  # * Summary (implies details)
         | 
| 698 711 | 
             
                  # * Addresses
         | 
| 699 712 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -732,6 +745,7 @@ module AvaTax | |
| 732 745 | 
             
                  #
         | 
| 733 746 | 
             
                  # * Lines
         | 
| 734 747 | 
             
                  # * Details (implies lines)
         | 
| 748 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 735 749 | 
             
                  # * Summary (implies details)
         | 
| 736 750 | 
             
                  # * Addresses
         | 
| 737 751 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -767,6 +781,7 @@ module AvaTax | |
| 767 781 | 
             
                  #
         | 
| 768 782 | 
             
                  # * Lines
         | 
| 769 783 | 
             
                  # * Details (implies lines)
         | 
| 784 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 770 785 | 
             
                  # * Summary (implies details)
         | 
| 771 786 | 
             
                  # * Addresses
         | 
| 772 787 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -822,6 +837,7 @@ module AvaTax | |
| 822 837 | 
             
                  #
         | 
| 823 838 | 
             
                  # * Lines
         | 
| 824 839 | 
             
                  # * Details (implies lines)
         | 
| 840 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 825 841 | 
             
                  # * Summary (implies details)
         | 
| 826 842 | 
             
                  # * Addresses
         | 
| 827 843 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
| @@ -867,6 +883,7 @@ module AvaTax | |
| 867 883 | 
             
                  #
         | 
| 868 884 | 
             
                  # * Lines
         | 
| 869 885 | 
             
                  # * Details (implies lines)
         | 
| 886 | 
            +
                  # * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
         | 
| 870 887 | 
             
                  # * Summary (implies details)
         | 
| 871 888 | 
             
                  # * Addresses
         | 
| 872 889 | 
             
                  # * SummaryOnly (omit lines and details - reduces API response size)
         | 
    
        data/lib/avatax/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: avatax
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 23. | 
| 4 | 
            +
              version: 23.7.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Marcus Vorwaller
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023- | 
| 11 | 
            +
            date: 2023-07-14 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rake
         |