Skip to content

Commit

Permalink
Merge pull request #155 from avadev/23.7.0
Browse files Browse the repository at this point in the history
Update for 23.7.0
  • Loading branch information
svc-developer authored Jul 14, 2023
2 parents 0185290 + 63e6768 commit 62ae4c6
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/avatax/client/definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def list_parameters_by_item(companyCode, itemCode, options={}) path = "/a
# This list of parameters is available for use when configuring your transaction.
# Some parameters are only available for use if you have subscribed to certain features of AvaTax.
# Swagger Name: AvaTaxClient
# @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
# @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
# @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.
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
Expand Down
36 changes: 36 additions & 0 deletions lib/avatax/client/taxrules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@ class Client
module TaxRules


# Create new Country Coefficients. If already exist update them.
#
# Create one or more Country Coefficients for particular country.
#
# We would like to use country coefficients during Cross-Border calculations to slightly increase or decrease
# a calculation for a line based on the tax-subtype and Country of destination for a transaction.
#
# This will allow AvaTax to minimize the variance caused between actual transaction taken place on ground Vs Tax
# Calculated by AvaTax.
#
# Make sure to use the same API to update the country coefficients that is already present in the database.
# This will make existing entry for specific country as ineffective for that date. And new entry created will get applicable
# to the newer transactions.
# Swagger Name: AvaTaxClient
# @param model [Object] The Country Coefficients for specific country you wish to create.
# @return [CountryCoefficientsResponseModel[]]
def create_country_coefficients(model) path = "/api/v2/countryCoefficients"
put(path, model, {}, AvaTax::VERSION) end

# Create a new tax rule
#
# Create one or more custom tax rules attached to this company.
Expand Down Expand Up @@ -81,6 +100,23 @@ def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}
def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
get(path, {}, AvaTax::VERSION) end

# Retrieve country coefficients for specific country
#
# Retrieve all or any specific records of Country Coefficients based on the filters(optional) for specific country.
#
# 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/) .
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
# Swagger Name: AvaTaxClient
# @param country [String] Country for which data need to be pulled for.
# @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
# @param include [String] A comma separated list of additional data to retrieve.
# @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.
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
# @return [FetchResult]
def list_country_coefficients(country, options={}) path = "/api/v2/#{country}/CountryCoefficients"
get(path, options, AvaTax::VERSION) end

# Retrieve tax rules for this company
#
# List all taxrule objects attached to this company.
Expand Down
17 changes: 17 additions & 0 deletions lib/avatax/client/transactions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module Transactions
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -55,6 +56,7 @@ def add_lines(model, options={}) path = "/api/v2/companies/transactions/l
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -196,6 +198,7 @@ def bulk_lock_transaction(model) path = "/api/v2/transactions/lock"
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -241,6 +244,7 @@ def change_transaction_code(companyCode, transactionCode, model, options={})
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -293,6 +297,7 @@ def commit_transaction(companyCode, transactionCode, model, options={}) p
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -348,6 +353,7 @@ def create_or_adjust_transaction(model, options={}) path = "/api/v2/trans
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -386,6 +392,7 @@ def create_transaction(model, options={}) path = "/api/v2/transactions/cr
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -432,6 +439,7 @@ def get_all_variance_report_by_company_code(companyCode) path = "/api/v2/
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -496,6 +504,7 @@ def get_transaction_by_code_and_type(companyCode, transactionCode, documentType,
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -545,6 +554,7 @@ def get_variance_report_by_company_code_by_transaction_id(companyCode, transacti
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -592,6 +602,7 @@ def list_transactions_by_company(companyCode, options={}) path = "/api/v2
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -647,6 +658,7 @@ def lock_transaction(companyCode, transactionCode, model, options={}) pat
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -694,6 +706,7 @@ def refund_transaction(companyCode, transactionCode, model, options={}) p
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -732,6 +745,7 @@ def settle_transaction(companyCode, transactionCode, model, options={}) p
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -767,6 +781,7 @@ def uncommit_transaction(companyCode, transactionCode, options={}) path =
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -822,6 +837,7 @@ def variance_report(companyCode, model) path = "/api/v2/companies/#{compa
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down Expand Up @@ -867,6 +883,7 @@ def verify_transaction(companyCode, transactionCode, model, options={}) p
#
# * Lines
# * Details (implies lines)
# * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction)
# * Summary (implies details)
# * Addresses
# * SummaryOnly (omit lines and details - reduces API response size)
Expand Down
2 changes: 1 addition & 1 deletion lib/avatax/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module AvaTax
VERSION = '23.6.1'.freeze unless defined?(::AvaTax::VERSION)
VERSION = '23.7.0'.freeze unless defined?(::AvaTax::VERSION)
end

0 comments on commit 62ae4c6

Please sign in to comment.