Skip to content

Commit

Permalink
Merge pull request #78 from avadev/20.7-Update
Browse files Browse the repository at this point in the history
Update for 20.7-Update
  • Loading branch information
contygm authored Jul 16, 2020
2 parents 8eadc2c + c6cc894 commit fc91942
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 17 deletions.
13 changes: 13 additions & 0 deletions lib/avatax/client/advancedrules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ def delete_lookup_file(accountId, id)
end


# Get audit records by account id and date range.
#
#
# @param accountId [Integer] The ID of the account
# @param fromDate [String] Date
# @param toDate [String] Date
# @return [Object]
def get_audit_records(accountId, fromDate, toDate)
path = "/api/v2/advancedrules/audits/accounts/#{accountId}/from/#{fromDate}/to/#{toDate}"
get(path)
end


# Get the lookup files for a company
#
#
Expand Down
12 changes: 6 additions & 6 deletions lib/avatax/client/datasources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module DataSources
# ### Security Policies
#
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
# @param companyId [Integer] The id of the company you which to create the datasources
# @param model [DataSourceModel[]]
# @return [DataSourceModel[]]
Expand All @@ -27,7 +27,7 @@ def create_data_sources(companyId, model)
# ### Security Policies
#
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
# @param companyId [Integer] The id of the company the datasource belongs to.
# @param id [Integer] The id of the datasource you wish to delete.
# @return [ErrorDetail[]]
Expand All @@ -44,7 +44,7 @@ def delete_data_source(companyId, id)
# ### Security Policies
#
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
# @param companyId [Integer]
# @param id [Integer] data source id
# @return [Object]
Expand All @@ -61,7 +61,7 @@ def get_data_source_by_id(companyId, id)
# ### Security Policies
#
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
# @param companyId [Integer] The id of the company you wish to retrieve the datasources.
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* isEnabled, isSynced, isAuthorized, name, externalState
# @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.
Expand All @@ -84,7 +84,7 @@ def list_data_sources(companyId, options={})
# ### Security Policies
#
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* isEnabled, isSynced, isAuthorized, name, externalState
# @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.
Expand All @@ -103,7 +103,7 @@ def query_data_sources(options={})
# ### Security Policies
#
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
# @param companyId [Integer] The id of the company the datasource belongs to.
# @param id [Integer] The id of the datasource you wish to delete.
# @param model [Object]
Expand Down
2 changes: 2 additions & 0 deletions lib/avatax/client/definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ def list_preferred_programs(options={})
# @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`.
# @param countryCode [String] If not null, return all records with this code.
# @return [FetchResult]
def list_product_classification_systems(options={})
path = "/api/v2/definitions/productclassificationsystems"
Expand All @@ -786,6 +787,7 @@ def list_product_classification_systems(options={})
# @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`.
# @param countryCode [String] If not null, return all records with this code.
# @return [FetchResult]
def list_product_classification_systems_by_company(companyCode, options={})
path = "/api/v2/definitions/productclassificationsystems/bycompany/#{companyCode}"
Expand Down
20 changes: 20 additions & 0 deletions lib/avatax/client/multidocument.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ module MultiDocument
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
#
# ### Security Policies
Expand Down Expand Up @@ -58,6 +60,8 @@ def adjust_multi_document_transaction(code, type, model, options={})
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
#
# ### Security Policies
Expand Down Expand Up @@ -88,6 +92,8 @@ def audit_multi_document_transaction(code, type)
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
#
# ### Security Policies
Expand Down Expand Up @@ -141,6 +147,8 @@ def commit_multi_document_transaction(model)
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
#
# ### Security Policies
Expand Down Expand Up @@ -175,6 +183,8 @@ def create_multi_document_transaction(model, options={})
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
#
# ### Security Policies
Expand Down Expand Up @@ -219,6 +229,8 @@ def get_multi_document_transaction_by_code_and_type(code, type, options={})
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
#
# ### Security Policies
Expand Down Expand Up @@ -260,6 +272,8 @@ def get_multi_document_transaction_by_id(id, options={})
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
#
# ### Security Policies
Expand Down Expand Up @@ -321,6 +335,8 @@ def list_multi_document_transactions(options={})
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
#
# ### Security Policies
Expand Down Expand Up @@ -351,6 +367,8 @@ def refund_multi_document_transaction(code, type, model, options={})
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
#
# ### Security Policies
Expand Down Expand Up @@ -381,6 +399,8 @@ def verify_multi_document_transaction(model)
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
#
# ### Security Policies
Expand Down
Loading

0 comments on commit fc91942

Please sign in to comment.