From cbb81d5d4b5a8f8f33afd28f36725f56541a3726 Mon Sep 17 00:00:00 2001 From: shilpa khanal Date: Tue, 3 Nov 2020 23:45:00 +0000 Subject: [PATCH] revert 2.2.2 update t Please enter the commit message for your changes. Lines starting --- .vs/slnx.sqlite | Bin 126976 -> 126976 bytes lib/avatax/client/advancedrules.rb | 154 ++++++++++ lib/avatax/client/companies.rb | 105 +++++++ lib/avatax/client/compliance.rb | 113 +++++++ lib/avatax/client/definitions.rb | 48 ++- lib/avatax/client/ecms.rb | 57 ++-- lib/avatax/client/errortransactions.rb | 42 ++- lib/avatax/client/filingcalendars.rb | 407 +++++++++++++++++++++++++ lib/avatax/client/filings.rb | 11 + lib/avatax/client/locations.rb | 119 +++++++- lib/avatax/client/multidocument.rb | 4 +- lib/avatax/client/nexus.rb | 125 ++++++++ lib/avatax/client/notices.rb | 186 +++-------- lib/avatax/client/registrar.rb | 14 + lib/avatax/client/taxcontent.rb | 30 ++ lib/avatax/client/taxprofiles.rb | 24 +- lib/avatax/client/transactions.rb | 30 +- lib/avatax/version.rb | 2 +- 18 files changed, 1267 insertions(+), 204 deletions(-) diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 0393a53abd90cbe39d1cb3fff4dbe1a99e0364f6..c5e47a2f5510c58735560d4f3e3182f49d9d2784 100644 GIT binary patch delta 565 zcmZp8z~1nHeS$Qj^+XwGR%-@5oq&xgefo^vn?LId3NU-KPn*o{(96Xk!v2Z<7W-EA zX`2-Vez4Wcdb2TTGIFw&Bvup@<)>xlq!#NHB?)ufXb3ze*!o%7i;ck)D4kkVlwVX* zl$ckXm|T*Xp9fcT^o^^Km?s;9G)Pf$E<*f;-4_K9HU@pLcz$kfYEg1(Nq%-}9?bZo z_ioRYk#%QdPzNeW&d)8#$xO^kPK8UKH`}$@$b*ZG9pn`5%&f`IevWWw;Q+OWS;;lCT_mXZ2@&$2|~=8 zjHo{LmS8qz#O6ycZf0plsLwn_ne~BeG~aj#GOIJ9c))#gUi35;W^b<6$?OTnQe3zB zj__^Zy~3}=oyL2RcMb1!-fFI`T!*=4P4-E!V&ZDu+?Mc_GfRX;lM&5T!roFWri@tK qCG5q^A`O&+hPkIWi#~{l<~CsuVHR~pRM!c+H^0x?{yvLQuoVDsiMq`I delta 176 zcmZp8z~1nHeS$Qj#6%fqRtW~(zl9r9`t%vyHh^HsBM&Y% z_G=5icODOCnC$H52xoWut%kF0{f{%dapz5D4=@(ud&qa5kCWe+`zG%X-lx2mcy~+= z39#BcA)t>iCVb_b QxS*u@eb)B(S&V|M0B(gt5C8xG diff --git a/lib/avatax/client/advancedrules.rb b/lib/avatax/client/advancedrules.rb index bd0c6aa..e963336 100644 --- a/lib/avatax/client/advancedrules.rb +++ b/lib/avatax/client/advancedrules.rb @@ -3,6 +3,23 @@ class Client module AdvancedRules + # Copy an existing advanced rule to a new environment + # + # + # @param ruleId [String] + # @param model [Object] + # @return [Object] + def copy_advanced_rule(ruleId, model) path = "/api/v2/advancedrules/rules/#{ruleId}/copy" + put(path, model) end + + # Create an advanced rule + # + # + # @param model [Object] The advanced rule you wish to create + # @return [Object] + def create_advanced_rule(model) path = "/api/v2/advancedrules/rules" + post(path, model) end + # Create a lookup file for a company # # @@ -13,6 +30,24 @@ module AdvancedRules def create_company_lookup_file(accountId, companyId, model) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles" post(path, model) end + # Create a rule execution for a company + # + # + # @param accountId [Integer] The ID of the account for the company + # @param companyId [Integer] The ID of the company for which the rule execution is to be created + # @param model [Object] The rule execution you wish to create + # @return [Object] + def create_company_rule_execution(accountId, companyId, model) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/executions" + post(path, model) end + + # Delete an advanced rule that is not in use by a company + # + # + # @param ruleId [String] The ID of the advanced rule to be deleted + # @return [ErrorDetail[]] + def delete_advanced_rule(ruleId) path = "/api/v2/advancedrules/rules/#{ruleId}" + delete(path) end + # Delete a lookup file # # @@ -22,6 +57,51 @@ def create_company_lookup_file(accountId, companyId, model) path = "/api/ def delete_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}" delete(path) end + # Delete a rule execution + # + # + # @param accountId [Integer] The ID of the account for the company the rule execution is for + # @param ruleExecutionId [String] The unique ID/GUID for the rule execution to be deleted + # @return [ErrorDetail[]] + def delete_rule_execution(accountId, ruleExecutionId) path = "/api/v2/advancedrules/accounts/#{accountId}/executions/#{ruleExecutionId}" + delete(path) end + + # Get an advanced rule by rule ID + # + # + # @param ruleId [String] The ID of the rule to retrieve + # @return [Object] + def get_advanced_rule(ruleId) path = "/api/v2/advancedrules/rules/#{ruleId}" + get(path) end + + # Get an advanced rule by name + # + # + # @param name [String] The name of the rule to retrieve + # @return [Object] + def get_advanced_rule_by_name(name) path = "/api/v2/advancedrules/rules/name/#{name}" + get(path) end + + # Retrieve an advanced rule's customer data schema for a company + # + # + # @param ruleId [String] The ID of the advance rule for which the schema is requested + # @param accountId [Integer] The ID of the account of the requesting user + # @param companyId [Integer] The ID of the company of the requesting user + # @return [Object] + def get_advanced_rule_customer_data_schema(ruleId, accountId, companyId) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/rules/#{ruleId}/schema" + get(path) end + + # List all advanced rules + # + # + # @param fullDetails [Boolean] Retrieve detailed advanced rule properties (limited to tech support level) + # @param includeTest [Boolean] Include test rules + # @param includeSystemRules [Boolean] Include rules used to retrieve enumerated values + # @return [FetchResult] + def get_advanced_rules(options={}) path = "/api/v2/advancedrules/rules" + get(path, options) end + # Get audit records by account id and date range. # # @@ -32,6 +112,14 @@ def delete_lookup_file(accountId, id) path = "/api/v2/advancedrules/accou def get_audit_records(accountId, fromDate, toDate) path = "/api/v2/advancedrules/audits/accounts/#{accountId}/from/#{fromDate}/to/#{toDate}" get(path) end + # Retrieve companies that have an advanced rule configured in its rule execution configuration + # + # + # @param ruleId [String] he ID of the advance rule for which companies are requested + # @return [FetchResult] + def get_companies_using_advanced_rule(ruleId) path = "/api/v2/advancedrules/rules/#{ruleId}/companies" + get(path) end + # Get the lookup files for a company # # @@ -41,6 +129,16 @@ def get_audit_records(accountId, fromDate, toDate) path = "/api/v2/advanc def get_company_lookup_files(accountId, companyId) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles" get(path) end + # Get the rule executions for a company + # + # + # @param accountId [Integer] The account ID for the company + # @param companyId [Integer] The ID of the company for which to retrieve rule executions + # @param effectiveDate [DateTime] Optional date which the rule executions should be effective + # @return [FetchResult] + def get_company_rule_executions(accountId, companyId, options={}) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/executions" + get(path, options) end + # Get a lookup file for an accountId and companyLookupFileId # # @@ -50,6 +148,52 @@ def get_company_lookup_files(accountId, companyId) path = "/api/v2/advanc def get_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}" get(path) end + # Get a rule execution for an accountId and ruleExecutionId + # + # + # @param accountId [Integer] The ID of the account for the rule execution + # @param ruleExecutionId [String] The unique ID/GUID of the rule execution to return + # @return [Object] + def get_rule_execution(accountId, ruleExecutionId) path = "/api/v2/advancedrules/accounts/#{accountId}/executions/#{ruleExecutionId}" + get(path) end + + # Update an advanced rule + # + # Creates a new version of the advanced rule + # @param ruleId [String] The ID of the advanced rule to be updated + # @param model [Object] The new values for the advanced rule + # @return [Object] + def update_advanced_rule(ruleId, model) path = "/api/v2/advancedrules/rules/#{ruleId}" + put(path, model) end + + # Set rule approved or unapproved + # + # + # @param ruleId [String] The ID of the advanced rule to change the approved state + # @param model [Object] The value to set approved state + # @return [Object] + def update_advanced_rule_approval(ruleId, model) path = "/api/v2/advancedrules/rules/#{ruleId}/approve" + post(path, model) end + + # Set rule visible or not visible for an account + # + # + # @param ruleId [String] + # @param model [Object] + # @return [Object] + def update_advanced_rule_visibility(ruleId, model) path = "/api/v2/advancedrules/rules/#{ruleId}/visible" + put(path, model) end + + # Change the rule execution order for a company + # + # + # @param accountId [Integer] The ID of the account for the company the rule execution is for + # @param companyId [Integer] The ID of the company for which the rule execution order is being modified + # @param model [Object] A list of rule execution IDs for the company indicating the new execution order + # @return [FetchResult] + def update_company_rule_execution_order(accountId, companyId, model) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/executions/order" + post(path, model) end + # Update a lookup file # # @@ -59,6 +203,16 @@ def get_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts # @return [Object] def update_lookup_file(accountId, id, model) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}" put(path, model) end + + # Update a rule execution + # + # + # @param accountId [Integer] The ID of the account for the company the rule execution is for + # @param ruleExecutionId [String] The unique ID/GUID of the rule execution to be updated + # @param model [Object] The new values to update the rule execution + # @return [Object] + def update_rule_execution(accountId, ruleExecutionId, model) path = "/api/v2/advancedrules/accounts/#{accountId}/executions/#{ruleExecutionId}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/companies.rb b/lib/avatax/client/companies.rb index 8762006..ad532dd 100644 --- a/lib/avatax/client/companies.rb +++ b/lib/avatax/client/companies.rb @@ -101,6 +101,29 @@ def company_initialize(model) path = "/api/v2/companies/initialize" def create_companies(model) path = "/api/v2/companies" post(path, model) end + # Add parameters to a company. + # + # Add parameters to a company. + # + # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company. + # + # A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name. + # + # To see available parameters for this company, call `/api/v2/definitions/parameters?$filter=attributeType eq Company` + # + # Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + # @param companyId [Integer] The ID of the company that owns this company parameter. + # @param model [CompanyParameterDetailModel[]] The company parameters you wish to create. + # @return [CompanyParameterDetailModel[]] + def create_company_parameters(companyId, model) path = "/api/v2/companies/#{companyId}/parameters" + post(path, model) end + # Request managed returns funding setup for a company # # This API is available by invitation only. @@ -136,6 +159,24 @@ def create_funding_request(id, model) path = "/api/v2/companies/#{id}/fun def delete_company(id) path = "/api/v2/companies/#{id}" delete(path) end + # Delete a single company parameter + # + # Delete a parameter of a company. + # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company. + # + # A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + # @param companyId [Integer] The company id + # @param id [Integer] The parameter id + # @return [ErrorDetail[]] + def delete_company_parameter(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}" + delete(path) end + # Check the funding configuration of a company # # This API is available by invitation only. @@ -217,6 +258,25 @@ def get_company(id, options={}) path = "/api/v2/companies/#{id}" def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration" get(path) end + # Retrieve a single company parameter + # + # Retrieves a single parameter of a company. + # + # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company. + # + # A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name. + # + # ### 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. + # @param companyId [Integer] + # @param id [Integer] + # @return [Object] + def get_company_parameter_detail(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}" + get(path) end + # Get this company's filing status # # Retrieve the current filing status of this company. @@ -241,6 +301,31 @@ def get_company_configuration(id) path = "/api/v2/companies/#{id}/configu def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus" get(path) end + # Retrieve parameters for a company + # + # Retrieve all parameters of a company. + # + # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company. + # + # A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name. + # + # 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. + # + # ### 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. + # @param companyId [Integer] The company id + # @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/).
*Not filterable:* name, unit + # @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_company_parameter_details(companyId, options={}) path = "/api/v2/companies/#{companyId}/parameters" + get(path, options) end + # Check managed returns funding status for a company # # This API is available by invitation only. @@ -348,6 +433,26 @@ def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/ # @return [Object] def update_company(id, model) path = "/api/v2/companies/#{id}" put(path, model) end + + # Update a company parameter + # + # Update a parameter of a company. + # + # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company. + # + # A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + # @param companyId [Integer] The company id. + # @param id [Integer] The company parameter id + # @param model [Object] The company parameter object you wish to update. + # @return [Object] + def update_company_parameter_detail(companyId, id, model) path = "/api/v2/companies/#{companyId}/parameters/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/compliance.rb b/lib/avatax/client/compliance.rb index 1f42dc7..55e12e6 100644 --- a/lib/avatax/client/compliance.rb +++ b/lib/avatax/client/compliance.rb @@ -3,6 +3,119 @@ class Client module Compliance + # Retrieve a single tax rate. + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param id [Integer] The ID of the tax rate to retrieve. + # @return [Object] + def get_tax_rate(id) path = "/api/v2/compliance/taxrates/#{id}" + get(path) end + + # Retrieve a single tax region. + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param id [Integer] The ID of the tax region to retrieve. + # @return [Object] + def get_tax_region(id) path = "/api/v2/compliance/taxregions/#{id}" + get(path) end + + # Retrieve jurisdictions and rates in a combined format. + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param effectiveDate [DateTime] Used to limit the jurisdictions returned. + # @param endDate [DateTime] Used to limit the jurisdictions returned. + # @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/). + # @param include [String] A comma separated list of objects to fetch underneath this jurisdiction. + # @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 [Object] + def query_jurisdiction_rates(options={}) path = "/api/v2/compliance/jurisdictionrates" + get(path, options) end + + # Retrieve all unique jurisdictions. + # + # This API is available by invitation only. + # + # You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values: + # + # * TaxRates + # + # ### Security Policies + # + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param country [String] The two-character ISO-3166 code for the country. + # @param region [String] The two or three character region code for the region. + # @param effectiveDate [DateTime] Used to limit the jurisdictions or rates returned. + # @param endDate [DateTime] Used to limit the jurisdictions or rates returned. + # @param aggregationOption [String] Aggregation method used if rates are returned using the '$include' parameter. (See StackAggregationOption::* for a list of allowable values) + # @param include [String] A comma separated list of objects to fetch underneath this tax rate. + # @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. + # @return [Object] + def query_jurisdictions(country, region, options={}) path = "/api/v2/compliance/jurisdictions/#{country}/#{region}" + get(path, options) end + + # Retrieve all tax rates. + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @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/). + # @param include [String] A comma separated list of objects to fetch underneath this tax rate. + # @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 [Object] + def query_tax_rates(options={}) path = "/api/v2/compliance/taxrates" + get(path, options) end + + # Retrieve all tax region jurisdictions. + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @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/). + # @param include [String] A comma separated list of objects to fetch underneath this tax region jurisdiction. + # @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 [Object] + def query_tax_region_jurisdictions(options={}) path = "/api/v2/compliance/taxregionjurisdictions" + get(path, options) end + + # Retrieve all tax regions. + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @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/). + # @param include [String] A comma separated list of objects to fetch underneath this tax region. + # @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 [Object] + def query_tax_regions(options={}) path = "/api/v2/compliance/taxregions" + get(path, options) end + # API to modify the reference fields at the document and the line level. # # diff --git a/lib/avatax/client/definitions.rb b/lib/avatax/client/definitions.rb index 3f5c2d7..0ed677d 100644 --- a/lib/avatax/client/definitions.rb +++ b/lib/avatax/client/definitions.rb @@ -259,7 +259,7 @@ def list_filing_frequencies(options={}) path = "/api/v2/definitions/filin # Returns a list of all Avalara-supported taxing jurisdictions. # # This API allows you to examine all Avalara-supported jurisdictions. You can filter your search by supplying - # SQL-like query for fetching only the ones you concerned about. For example: effectiveDate > '2016-01-01' + # SQL-like query for fetching only the ones you concerned about. For example: effectiveDate > '2016-01-01' # # The rate, salesRate, and useRate fields are not available on the JurisdictionModels returned by this API. # @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/).
*Not filterable:* rate, salesRate, signatureCode, useRate @@ -429,6 +429,20 @@ def list_nexus_by_country_and_region(country, region, options={}) path = def list_nexus_by_form_code(formCode) path = "/api/v2/definitions/nexus/byform/#{formCode}" get(path) end + # Retrieve the full list of Avalara-supported nexus for a tax type group. + # + # Returns all Avalara-supported nexus for the specified specified tax type group. + # + # This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by tax type group. + # @param taxTypeGroup [String] The tax type group to fetch the supporting system nexus 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/).
*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters + # @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_nexus_by_tax_type_group(taxTypeGroup, options={}) path = "/api/v2/definitions/nexus/bytaxtypegroup/#{taxTypeGroup}" + get(path, options) end + # Retrieve the full list of nexus tax type groups # # Returns the full list of Avalara-supported nexus tax type groups @@ -834,6 +848,20 @@ def list_tax_forms(options={}) path = "/api/v2/definitions/taxforms" def list_tax_sub_types(options={}) path = "/api/v2/definitions/taxsubtypes" get(path, options) end + # Retrieve the full list of tax sub types by jurisdiction code and region + # + # Returns the full list of Avalara-supported tax sub-types by jurisdiction and region + # This API is intended to be useful to identify all the different tax sub-types. + # @param jurisdictionCode [String] The jurisdiction code of the tax sub type. + # @param region [String] The region of the tax sub type. + # @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/). + # @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_tax_sub_types_by_jurisdiction_and_region(jurisdictionCode, region, options={}) path = "/api/v2/definitions/taxsubtypes/#{jurisdictionCode}/#{region}" + get(path, options) end + # Retrieve the full list of tax type groups # # Returns the full list of Avalara-supported tax type groups @@ -858,6 +886,24 @@ def list_tax_type_groups(options={}) path = "/api/v2/definitions/taxtypeg # @return [FetchResult] def list_unit_of_measurement(options={}) path = "/api/v2/definitions/unitofmeasurements" get(path, options) end + + # List customer attributes used by a company + # + # List the customer attributes defined by a company. + # + # A customer may have multiple attributes that control its behavior. You may apply or remove attributes to a + # customer at any time. + # + # If you see the 'CertCaptureNotConfiguredError', please use CheckProvision and RequestProvision endpoints to + # check and provision account. + # @param companyid [Integer] Id of the company the user wish to fetch the customers' attributes from. If not specified the API will use user's default company. + # @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/). + # @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 query_company_customer_attributes(options={}) path = "/api/v2/definitions/customerattributes" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/ecms.rb b/lib/avatax/client/ecms.rb index d2a6156..ed00af0 100644 --- a/lib/avatax/client/ecms.rb +++ b/lib/avatax/client/ecms.rb @@ -1,17 +1,6 @@ module AvaTax class Client - module ECMS - - - # Bridge API for integration of validated certificates - # - # This API is for use by invitation only. - # @param model [EcmsModel[]] Either a single exempt certificate or an array of certificates to create - # @return [EcmsModel[]] - def cert_capture_bridge(model) - path = "/api/v2/certcapturebridge" - post(path, model) - end + module Ecms # Get an ECMS identified by company id and ECMS id @@ -22,15 +11,17 @@ def cert_capture_bridge(model) # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values: # # * Details + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + # * This API depends on the following active services
*Required* (all): AvaCert. # @param companyId [Integer] company to retrieve exempt certificate for # @param ecmsId [Integer] exempt certificate Id # @param include [String] # @return [Object] - def get_e_c_m_s_by_id(companyId, ecmsId, options={}) - path = "/api/v2/companies/#{companyId}/ecms/#{ecmsId}" - get(path, options) - end - + def get_e_c_m_s_by_id(companyId, ecmsId, options={}) path = "/api/v2/companies/#{companyId}/ecms/#{ecmsId}" + get(path, options) end # Get list of ECMS data for this company # @@ -40,18 +31,20 @@ def get_e_c_m_s_by_id(companyId, ecmsId, options={}) # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values: # # * Details + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + # * This API depends on the following active services
*Required* (all): AvaCert. # @param companyId [Integer] which company to retrieve certificates from - # @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/). + # @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/).
*Not filterable:* details # @param include [String] # @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 [EcmsModel[]] - def list_e_c_m_s_by_company(companyId, options={}) - path = "/api/v2/companies/#{companyId}/ecms" - get(path, options) - end - + # @return [FetchResult] + def list_e_c_m_s_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/ecms" + get(path, options) end # Get all exempt certificates # @@ -63,17 +56,19 @@ def list_e_c_m_s_by_company(companyId, options={}) # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values: # # * Details - # @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/). + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + # * This API depends on the following active services
*Required* (all): AvaCert. + # @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/).
*Not filterable:* details # @param include [String] # @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 [EcmsModel[]] - def query_e_c_m_s(options={}) - path = "/api/v2/ecms" - get(path, options) - end - + # @return [FetchResult] + def query_e_c_m_s(options={}) path = "/api/v2/ecms" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/errortransactions.rb b/lib/avatax/client/errortransactions.rb index 1781134..eacda03 100644 --- a/lib/avatax/client/errortransactions.rb +++ b/lib/avatax/client/errortransactions.rb @@ -12,20 +12,35 @@ module ErrorTransactions # ### Security Policies # # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - # * This API depends on the following active services
*Required* (all): AvaTaxPro. + # * This API depends on the following active services
*Required* (all): AvaTaxPro, BasicReturns. + # @param companyId [Integer] ID number of the company to delete error transactions from. # @param model [Object] The request that contains error transactions to be deleted # @return [Object] - def delete_error_transactions(model) - path = "/api/v2/errortransactions" - delete(path, model) - end + def delete_error_transactions(companyId, model) path = "/api/v2/companies/#{companyId}/errortransactions" + delete(path, model) end + # Get a list of error transactions' error codes and its counts + # + # Get a list of error transactions' error codes and their counts + # When you try to create or adjust a transaction with a datasource for a company and for any reason that call fails with an error, + # those errors with their count can be retrieved by this API. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + # * This API depends on the following active services
*Required* (all): AvaTaxPro, BasicReturns. + # @param companyId [Integer] ID number of the company to query from. + # @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. + # @return [CappedFetchResult] + def list_error_codes(companyId, options={}) path = "/api/v2/companies/#{companyId}/errortransactions/errorcodes" + get(path, options) end # Retrieve list of error transactions # # List error transactions attached to this company. Results are dependent on `$filter` if provided. # - # This endpoint is limited to returning 250 error transactions at a time maximum. + # This endpoint is limited to returning 1000 error transactions at a time maximum. # # 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. @@ -33,18 +48,15 @@ def delete_error_transactions(model) # ### Security Policies # # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - # * This API depends on the following active services
*Required* (all): AvaTaxPro. - # @param companyCode [String] The company code to filter on. This query parameter is required. - # @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/).
*Not filterable:* companyId, avataxErrorJson, avataxCreateTransactionJson + # * This API depends on the following active services
*Required* (all): AvaTaxPro, BasicReturns. + # @param companyId [Integer] The company ID to filter error transactions on. + # @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/).
*Not filterable:* companyId, avataxErrorJson, avataxCreateTransactionJson, expiresAt # @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_error_transactions(options={}) - path = "/api/v2/errortransactions" - get(path, options) - end - + # @return [CappedFetchResult] + def list_error_transactions(companyId, options={}) path = "/api/v2/companies/#{companyId}/errortransactions" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/filingcalendars.rb b/lib/avatax/client/filingcalendars.rb index 716b66b..fdf7798 100644 --- a/lib/avatax/client/filingcalendars.rb +++ b/lib/avatax/client/filingcalendars.rb @@ -3,6 +3,163 @@ class Client module FilingCalendars + # Checks to see if the company has a valid POA for a tax form code + # + # This API is available by invitation only. + # + # This API fetches valid POA's for a company by TaxFormCode or by country/region + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The company id that we are checking about + # @param taxFormCode [String] The tax form code that we are checking + # @param country [String] The country we are fetching POAs for + # @param region [String] The region we are fetching POAs for + # @return [PowerOfAttorneyCheckModel[]] + def active_power_of_attorney(companyId, options={}) path = "/api/v2/companies/#{companyId}/filingcalendars/powerofattorney" + get(path, options) end + + # Approve existing Filing Request + # + # This API is available by invitation only. + # A "filing request" represents a request to change an existing filing calendar. Filing requests + # are reviewed and validated by Avalara Compliance before being implemented. + # The filing request must be in the "ChangeRequest" status to be approved. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that owns the filing request object + # @param id [Integer] The unique ID of the filing request object + # @return [Object] + def approve_filing_request(companyId, id) path = "/api/v2/companies/#{companyId}/filingrequests/#{id}/approve" + post(path) end + + # Cancel existing Filing Request + # + # This API is available by invitation only. + # A "filing request" represents a request to change an existing filing calendar. Filing requests + # are reviewed and validated by Avalara Compliance before being implemented. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that owns the filing request object + # @param id [Integer] The unique ID of the filing request object + # @return [Object] + def cancel_filing_request(companyId, id) path = "/api/v2/companies/#{companyId}/filingrequests/#{id}/cancel" + post(path) end + + # Create a new filing request to cancel a filing calendar + # + # This API is available by invitation only. + # + # A "filing request" represents a request to change an existing filing calendar. Filing requests + # are reviewed and validated by Avalara Compliance before being implemented. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that owns the filing calendar object + # @param id [Integer] The unique ID number of the filing calendar to cancel + # @param model [FilingRequestModel[]] The cancellation request for this filing calendar + # @return [Object] + def cancel_filing_requests(companyId, id, model) path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/cancel/request" + post(path, model) end + + # Create a filing calendar + # + # This API is available by invitation only and only available for users with Compliance access + # A "filing request" represents information that compliance uses to file a return + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that will add the new filing calendar + # @param model [FilingCalendarModel[]] Filing calendars that will be added + # @return [FilingCalendarModel[]] + def create_filing_calendars(companyId, model) path = "/api/v2/companies/#{companyId}/filingcalendars" + post(path, model) end + + # Create a new filing request to create a filing calendar + # + # This API is available by invitation only. + # A "filing request" represents a request to change an existing filing calendar. Filing requests + # are reviewed and validated by Avalara Compliance before being implemented. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that will add the new filing calendar + # @param model [FilingRequestModel[]] Information about the proposed new filing calendar + # @return [FilingRequestModel[]] + def create_filing_requests(companyId, model) path = "/api/v2/companies/#{companyId}/filingcalendars/add/request" + post(path, model) end + + # Create a company return setting + # + # This API is available by invitation only and only available for users with Compliance access + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # @param companyId [Integer] The unique ID of the company that will add the new filing calendar + # @param filingCalendarId [Integer] The unique ID of the filing calendar that will add the new filing calendar setting + # @param model [CompanyReturnSettingModel[]] CompanyReturnSettings that will be added + # @return [CompanyReturnSettingModel[]] + def create_update_company_return_settings(companyId, filingCalendarId, model) path = "/api/v2/companies/#{companyId}/filingcalendars/#{filingCalendarId}/settings" + post(path, model) end + + # Returns a list of options for adding the specified form. + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that owns the filing calendar object + # @param formCode [String] The unique code of the form + # @return [CycleAddOptionModel[]] + def cycle_safe_add(companyId, options={}) path = "/api/v2/companies/#{companyId}/filingcalendars/add/options" + get(path, options) end + + # Indicates when changes are allowed to be made to a filing calendar. + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that owns the filing calendar object + # @param id [Integer] The unique ID of the filing calendar object + # @param model [FilingCalendarEditModel[]] A list of filing calendar edits to be made + # @return [Object] + def cycle_safe_edit(companyId, id, model) path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/edit/options" + post(path, model) end + + # Returns a list of options for expiring a filing calendar + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that owns the filing calendar object + # @param id [Integer] The unique ID of the filing calendar object + # @return [Object] + def cycle_safe_expiration(companyId, id) path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/cancel/options" + get(path) end + # Delete a company return setting # # This API is available by invitation only and only available for users with Compliance access @@ -16,6 +173,256 @@ module FilingCalendars # @return [CompanyReturnSettingModel[]] def delete_company_return_settings(companyId, filingCalendarId, companyReturnSettingId) path = "/api/v2/companies/#{companyId}/filingcalendars/#{filingCalendarId}/setting/#{companyReturnSettingId}" delete(path) end + + # Delete a single filing calendar. + # + # This API is available by invitation only. + # Mark the existing notice object at this URL as deleted. + # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara + # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The ID of the company that owns this filing calendar. + # @param id [Integer] The ID of the filing calendar you wish to delete. + # @return [ErrorDetail[]] + def delete_filing_calendar(companyId, id) path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}" + delete(path) end + + # Retrieve a single filing calendar + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The ID of the company that owns this filing calendar + # @param id [Integer] The primary key of this filing calendar + # @return [Object] + def get_filing_calendar(companyId, id) path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}" + get(path) end + + # Retrieve a single filing request + # + # This API is available by invitation only. + # A "filing request" represents a request to change an existing filing calendar. Filing requests + # are reviewed and validated by Avalara Compliance before being implemented. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The ID of the company that owns this filing calendar + # @param id [Integer] The primary key of this filing calendar + # @return [Object] + def get_filing_request(companyId, id) path = "/api/v2/companies/#{companyId}/filingrequests/#{id}" + get(path) end + + # Retrieve all filing calendars for this company + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The ID of the company that owns these batches + # @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/).
*Not filterable:* taxAuthorityId, taxAuthorityName, taxAuthorityType, settings + # @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 returnCountry [String] A comma separated list of countries + # @param returnRegion [String] A comma separated list of regions + # @return [FetchResult] + def list_filing_calendars(companyId, options={}) path = "/api/v2/companies/#{companyId}/filingcalendars" + get(path, options) end + + # Retrieve all filing requests for this company + # + # This API is available by invitation only. + # A "filing request" represents a request to change an existing filing calendar. Filing requests + # are reviewed and validated by Avalara Compliance before being implemented. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The ID of the company that owns these batches + # @param filingCalendarId [Integer] Specific filing calendar id for the request + # @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/).
*Not filterable:* data + # @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_filing_requests(companyId, options={}) path = "/api/v2/companies/#{companyId}/filingrequests" + get(path, options) end + + # New request for getting for validating customer's login credentials + # + # This API is available by invitation only. + # + # This API verifies that a customer has submitted correct login credentials for a tax authority's online filing system. + # + # ### 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
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param model [Object] The model of the login information we are verifying + # @return [Object] + def login_verification_request(model) path = "/api/v2/filingcalendars/credentials/verify" + post(path, model) end + + # Gets the request status and Login Result + # + # This API is available by invitation only. + # + # This API checks the status of a login verification request. It may only be called by authorized users from the account + # that initially requested the login verification. + # + # ### 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
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param jobId [Integer] The unique ID number of this login request + # @return [Object] + def login_verification_status(jobId) path = "/api/v2/filingcalendars/credentials/#{jobId}" + get(path) end + + # Retrieve all filing calendars + # + # This API is available by invitation only. + # + # This API is deprecated - please use POST `/api/v2/filingrequests/query` API. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @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/).
*Not filterable:* taxAuthorityId, taxAuthorityName, taxAuthorityType, settings + # @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 returnCountry [String] If specified, fetches only filing calendars that apply to tax filings in this specific country. Uses ISO 3166 country codes. + # @param returnRegion [String] If specified, fetches only filing calendars that apply to tax filings in this specific region. Uses ISO 3166 region codes. + # @return [FetchResult] + def query_filing_calendars(options={}) path = "/api/v2/filingcalendars" + get(path, options) end + + # Retrieve all filing calendars + # + # This API is available by invitation only. + # + # This API is intended to replace the GET `/api/v2/filingcalendars` API. The fetch request object is posted on the body of the request instead of the URI, so it's not limited by a set number of characters. + # The documentation of the GET API shows how filtering, sorting and pagination works. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param returnCountry [String] If specified, fetches only filing calendars that apply to tax filings in this specific country. Uses ISO 3166 country codes. + # @param returnRegion [String] If specified, fetches only filing calendars that apply to tax filings in this specific region. Uses ISO 3166 region codes. + # @param model [Object] Query object to filter, sort and paginate the filing calendars. + # @return [FetchResult] + def query_filing_calendars_post(model, options={}) path = "/api/v2/filingcalendars/query" + post(path, model, options) end + + # Retrieve all filing requests + # + # This API is available by invitation only. + # + # This API is deprecated - please use POST `/api/v2/filingrequests/query` API. + # + # A "filing request" represents a request to change an existing filing calendar. Filing requests + # are reviewed and validated by Avalara Compliance before being implemented. + # + # 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. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param filingCalendarId [Integer] Specific filing calendar id for the request + # @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/).
*Not filterable:* data + # @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 query_filing_requests(options={}) path = "/api/v2/filingrequests" + get(path, options) end + + # Retrieve all filing requests + # + # This API is available by invitation only. + # + # This API is intended to replace the GET `/api/v2/filingrequests` API. The fetch request object is posted on the body of the request instead of the URI, so it's not limited by a set number of characters. + # The documentation of the GET API shows how filtering, sorting and pagination works. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param filingCalendarId [Integer] Specific filing calendar id for the request + # @param model [Object] Query object to filter, sort and paginate the filing calendars. + # @return [FetchResult] + def query_filing_requests_post(model, options={}) path = "/api/v2/filingrequests/query" + post(path, model, options) end + + # Create a new filing request to edit a filing calendar + # + # This API is available by invitation only. + # + # A "filing request" represents a request to change an existing filing calendar. Filing requests + # are reviewed and validated by Avalara Compliance before being implemented. + # + # Certain users may not update filing calendars directly. Instead, they may submit an edit request + # to modify the value of a filing calendar using this API. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that owns the filing calendar object + # @param id [Integer] The unique ID number of the filing calendar to edit + # @param model [FilingRequestModel[]] A list of filing calendar edits to be made + # @return [Object] + def request_filing_calendar_update(companyId, id, model) path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/edit/request" + post(path, model) end + + # Edit existing Filing Calendar + # + # This API is available by invitation only. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that owns the filing calendar object + # @param id [Integer] The unique ID of the filing calendar object + # @param model [Object] The filing calendar model you are wishing to update with. + # @return [Object] + def update_filing_calendar(companyId, id, model) path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}" + put(path, model) end + + # Edit existing Filing Request + # + # This API is available by invitation only. + # A "filing request" represents a request to change an existing filing calendar. Filing requests + # are reviewed and validated by Avalara Compliance before being implemented. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + # @param companyId [Integer] The unique ID of the company that owns the filing request object + # @param id [Integer] The unique ID of the filing request object + # @param model [Object] A list of filing calendar edits to be made + # @return [Object] + def update_filing_request(companyId, id, model) path = "/api/v2/companies/#{companyId}/filingrequests/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/filings.rb b/lib/avatax/client/filings.rb index d5e3aae..f57aa9d 100644 --- a/lib/avatax/client/filings.rb +++ b/lib/avatax/client/filings.rb @@ -3,6 +3,17 @@ class Client module Filings + # Retrieve a filing containing the return and all its accrual returns. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # @param companyId [Integer] The ID of the company that owns these returns + # @param filingReturnId [Integer] The ID of the filing return + # @return [FetchResult] + def get_accrual_filings(companyId, filingReturnId) path = "/api/v2/companies/#{companyId}/filings/accrual/#{filingReturnId}" + get(path) end + # Retrieve a list of filed returns for the specified company in the year and month of a given filing period. # # ### Security Policies diff --git a/lib/avatax/client/locations.rb b/lib/avatax/client/locations.rb index 445a353..caf53e9 100644 --- a/lib/avatax/client/locations.rb +++ b/lib/avatax/client/locations.rb @@ -3,6 +3,30 @@ class Client module Locations + # Add parameters to a location. + # + # Add parameters to a location. + # + # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location. + # + # A parameter specified on a transaction line will override a location parameter if they share the same parameter name. + # + # To see available parameters for this location, call `/api/v2/definitions/parameters?$filter=attributeType eq Company` + # + # Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + # @param companyId [Integer] The ID of the company that owns this location parameter. + # @param locationId [Integer] The location id. + # @param model [LocationParameterModel[]] The location parameters you wish to create. + # @return [LocationParameterModel[]] + def create_location_parameters(companyId, locationId, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters" + post(path, model) end + # Create a new location # # Create one or more new location objects attached to this company. @@ -29,6 +53,26 @@ def create_locations(companyId, model) path = "/api/v2/companies/#{compan def delete_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}" delete(path) end + # Delete a single location parameter + # + # Delete a single location parameter. + # + # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location. + # + # A parameter specified on a transaction line will override a location parameter if they share the same parameter name. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + # @param companyId [Integer] The company id + # @param locationId [Integer] The location id + # @param id [Integer] The parameter id + # @return [ErrorDetail[]] + def delete_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}" + delete(path) end + # Retrieve a single location # # Get the location object identified by this URL. @@ -44,7 +88,7 @@ def delete_location(companyId, id) path = "/api/v2/companies/#{companyId} # # ### Security Policies # - # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # @param companyId [Integer] The ID of the company that owns this location # @param id [Integer] The primary key of this location # @param include [String] A comma separated list of additional data to retrieve. @@ -52,6 +96,52 @@ def delete_location(companyId, id) path = "/api/v2/companies/#{companyId} def get_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}" get(path, options) end + # Retrieve a single company location parameter + # + # Retrieve a single location parameter. + # + # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location. + # + # A parameter specified on a transaction line will override a location parameter if they share the same parameter name. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # @param companyId [Integer] The company id + # @param locationId [Integer] The location id + # @param id [Integer] The parameter id + # @return [Object] + def get_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}" + get(path) end + + # Retrieve parameters for a location + # + # List parameters for a location. + # + # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location. + # + # A parameter specified on a transaction line will override a location parameter if they share the same parameter name. + # + # 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. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # @param companyId [Integer] The company id + # @param locationId [Integer] The ID of the location + # @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/).
*Not filterable:* name, unit + # @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_location_parameters(companyId, locationId, options={}) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters" + get(path, options) end + # Retrieve locations for this company # # List all location objects defined for this company. @@ -69,7 +159,7 @@ def get_location(companyId, id, options={}) path = "/api/v2/companies/#{c # # ### Security Policies # - # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # @param companyId [Integer] The ID of the company that owns these locations # @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/).
*Not filterable:* settings, parameters # @param include [String] A comma separated list of additional data to retrieve. @@ -98,7 +188,7 @@ def list_locations_by_company(companyId, options={}) path = "/api/v2/comp # # ### Security Policies # - # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # @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/).
*Not filterable:* settings, parameters # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings. # @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. @@ -124,6 +214,27 @@ def query_locations(options={}) path = "/api/v2/locations" def update_location(companyId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{id}" put(path, model) end + # Update a location parameter + # + # Update a location parameter. + # + # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location. + # + # A parameter specified on a transaction line will override a location parameter if they share the same parameter name. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + # @param companyId [Integer] The company id. + # @param locationId [Integer] The location id + # @param id [Integer] The location parameter id + # @param model [Object] The location parameter object you wish to update. + # @return [Object] + def update_location_parameter(companyId, locationId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}" + put(path, model) end + # Validate the location against local requirements # # Returns validation information for this location. @@ -132,7 +243,7 @@ def update_location(companyId, id, model) path = "/api/v2/companies/#{com # # ### Security Policies # - # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # @param companyId [Integer] The ID of the company that owns this location # @param id [Integer] The primary key of this location # @return [Object] diff --git a/lib/avatax/client/multidocument.rb b/lib/avatax/client/multidocument.rb index a366d93..f287177 100644 --- a/lib/avatax/client/multidocument.rb +++ b/lib/avatax/client/multidocument.rb @@ -179,8 +179,8 @@ def create_multi_document_transaction(model, options={}) path = "/api/v2/ # # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. # * This API depends on the following active services
*Required* (all): AvaTaxPro. - # @param code [String] - # @param type [String] (See DocumentType::* for a list of allowable values) + # @param code [String] The multidocument code to retrieve + # @param type [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values) # @param include [String] Specifies objects to include in the response after transaction is created # @return [Object] def get_multi_document_transaction_by_code_and_type(code, type, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}" diff --git a/lib/avatax/client/nexus.rb b/lib/avatax/client/nexus.rb index 147db03..635f5bf 100644 --- a/lib/avatax/client/nexus.rb +++ b/lib/avatax/client/nexus.rb @@ -34,6 +34,29 @@ module Nexus def create_nexus(companyId, model) path = "/api/v2/companies/#{companyId}/nexus" post(path, model) end + # Add parameters to a nexus. + # + # Add parameters to the nexus. + # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus. + # + # A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name. + # + # To see available parameters for this item, call `/api/v2/definitions/parameters?$filter=attributeType eq Nexus` + # + # Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + # @param companyId [Integer] The ID of the company that owns this nexus parameter. + # @param nexusId [Integer] The nexus id. + # @param model [NexusParameterDetailModel[]] The nexus parameters you wish to create. + # @return [NexusParameterDetailModel[]] + def create_nexus_parameters(companyId, nexusId, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters" + post(path, model) end + # Creates nexus for a list of addresses. # # This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this @@ -82,6 +105,43 @@ def declare_nexus_by_address(companyId, model) path = "/api/v2/companies/ def delete_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}" delete(path, options) end + # Delete a single nexus parameter + # + # Delete a single nexus parameter. + # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus. + # + # A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + # @param companyId [Integer] The company id + # @param nexusId [Integer] The nexus id + # @param id [Integer] The parameter id + # @return [ErrorDetail[]] + def delete_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}" + delete(path) end + + # Delete all parameters for an nexus + # + # Delete all the parameters for a given nexus. + # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus. + # + # A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + # @param companyId [Integer] The ID of the company that owns this nexus. + # @param nexusId [Integer] The ID of the nexus you wish to delete the parameters. + # @return [ErrorDetail[]] + def delete_nexus_parameters(companyId, nexusId) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters" + delete(path) end + # Retrieve a single nexus # # Get the nexus object identified by this URL. @@ -128,6 +188,25 @@ def get_nexus(companyId, id, options={}) path = "/api/v2/companies/#{comp def get_nexus_by_form_code(companyId, formCode, options={}) path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}" get(path, options) end + # Retrieve a single nexus parameter + # + # Retrieve a single nexus parameter. + # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller.In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus. + # + # A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + # @param companyId [Integer] The company id + # @param nexusId [Integer] The nexus id + # @param id [Integer] The parameter id + # @return [Object] + def get_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}" + get(path) end + # Retrieve nexus for this company # # List all nexus objects defined for this company. @@ -155,6 +234,31 @@ def get_nexus_by_form_code(companyId, formCode, options={}) path = "/api/ def list_nexus_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/nexus" get(path, options) end + # Retrieve parameters for a nexus + # + # List parameters for a nexus. + # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus. + # + # A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name. + # + # 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. + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + # @param companyId [Integer] The company id + # @param nexusId [Integer] The nexus id + # @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/).
*Not filterable:* name, unit + # @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_nexus_parameters(companyId, nexusId, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters" + get(path, options) end + # Retrieve all nexus # # Get multiple nexus objects across all companies. @@ -212,6 +316,27 @@ def query_nexus(options={}) path = "/api/v2/nexus" # @return [Object] def update_nexus(companyId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{id}" put(path, model) end + + # Update an nexus parameter + # + # Update an nexus parameter. + # + # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters". + # + # A parameter added to a nexus will be used in tax calculation based on the locationcode and parameter value the transaction state line might have lines added. + # + # A parameter specified on a transaction line will override an item parameter if they share the same parameter name.????? I dont know about this? + # + # ### Security Policies + # + # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + # @param companyId [Integer] The company id. + # @param nexusId [Integer] The nexus id + # @param id [Integer] The nexus parameter id + # @param model [Object] The nexus object you wish to update. + # @return [Object] + def update_nexus_parameter(companyId, nexusId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/notices.rb b/lib/avatax/client/notices.rb index b97af5d..635bda9 100644 --- a/lib/avatax/client/notices.rb +++ b/lib/avatax/client/notices.rb @@ -14,16 +14,12 @@ module Notices # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns this notice. # @param id [Integer] The ID of the tax notice we are adding the comment for. # @param model [NoticeCommentModel[]] The notice comments you wish to create. # @return [NoticeCommentModel[]] - def create_notice_comment(companyId, id, model) - path = "/api/v2/companies/#{companyId}/notices/#{id}/comments" - post(path, model) - end - + def create_notice_comment(companyId, id, model) path = "/api/v2/companies/#{companyId}/notices/#{id}/comments" + post(path, model) end # Create a new notice finance details. # @@ -37,16 +33,12 @@ def create_notice_comment(companyId, id, model) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns this notice. # @param id [Integer] The ID of the notice added to the finance details. # @param model [NoticeFinanceModel[]] The notice finance details you wish to create. # @return [NoticeFinanceModel[]] - def create_notice_finance_details(companyId, id, model) - path = "/api/v2/companies/#{companyId}/notices/#{id}/financedetails" - post(path, model) - end - + def create_notice_finance_details(companyId, id, model) path = "/api/v2/companies/#{companyId}/notices/#{id}/financedetails" + post(path, model) end # Create a new notice responsibility. # @@ -59,16 +51,12 @@ def create_notice_finance_details(companyId, id, model) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns this notice. # @param id [Integer] The ID of the tax notice we are adding the responsibility for. # @param model [NoticeResponsibilityDetailModel[]] The notice responsibilities you wish to create. # @return [NoticeResponsibilityDetailModel[]] - def create_notice_responsibilities(companyId, id, model) - path = "/api/v2/companies/#{companyId}/notices/#{id}/responsibilities" - post(path, model) - end - + def create_notice_responsibilities(companyId, id, model) path = "/api/v2/companies/#{companyId}/notices/#{id}/responsibilities" + post(path, model) end # Create a new notice root cause. # @@ -81,16 +69,12 @@ def create_notice_responsibilities(companyId, id, model) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns this notice. # @param id [Integer] The ID of the tax notice we are adding the responsibility for. # @param model [NoticeRootCauseDetailModel[]] The notice root causes you wish to create. # @return [NoticeRootCauseDetailModel[]] - def create_notice_root_causes(companyId, id, model) - path = "/api/v2/companies/#{companyId}/notices/#{id}/rootcauses" - post(path, model) - end - + def create_notice_root_causes(companyId, id, model) path = "/api/v2/companies/#{companyId}/notices/#{id}/rootcauses" + post(path, model) end # Create a new notice. # @@ -103,15 +87,11 @@ def create_notice_root_causes(companyId, id, model) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns this notice. # @param model [NoticeModel[]] The notice object you wish to create. # @return [NoticeModel[]] - def create_notices(companyId, model) - path = "/api/v2/companies/#{companyId}/notices" - post(path, model) - end - + def create_notices(companyId, model) path = "/api/v2/companies/#{companyId}/notices" + post(path, model) end # Delete a single notice. # @@ -124,16 +104,12 @@ def create_notices(companyId, model) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns this notice. # @param id [Integer] The ID of the notice you wish to delete the finance detail from. # @param commentDetailsId [Integer] The ID of the comment you wish to delete. # @return [ErrorDetail[]] - def delete_comment_details(companyId, id, commentDetailsId) - path = "/api/v2/companies/#{companyId}/notices/#{id}/commentdetails/#{commentdetailsid}" - delete(path) - end - + def delete_comment_details(companyId, id, commentDetailsId) path = "/api/v2/companies/#{companyId}/notices/#{id}/commentdetails/#{commentdetailsid}" + delete(path) end # Delete a single notice. # @@ -147,16 +123,12 @@ def delete_comment_details(companyId, id, commentDetailsId) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns this notice. # @param id [Integer] The ID of the notice you wish to delete the finance detail from. # @param financeDetailsId [Integer] The ID of the finance detail you wish to delete. # @return [ErrorDetail[]] - def delete_finance_details(companyId, id, financeDetailsId) - path = "/api/v2/companies/#{companyId}/notices/#{id}/financedetails/#{financedetailsid}" - delete(path) - end - + def delete_finance_details(companyId, id, financeDetailsId) path = "/api/v2/companies/#{companyId}/notices/#{id}/financedetails/#{financedetailsid}" + delete(path) end # Delete a single notice. # @@ -169,15 +141,11 @@ def delete_finance_details(companyId, id, financeDetailsId) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns this notice. # @param id [Integer] The ID of the notice you wish to delete. # @return [ErrorDetail[]] - def delete_notice(companyId, id) - path = "/api/v2/companies/#{companyId}/notices/#{id}" - delete(path) - end - + def delete_notice(companyId, id) path = "/api/v2/companies/#{companyId}/notices/#{id}" + delete(path) end # Delete a single responsibility # @@ -190,16 +158,12 @@ def delete_notice(companyId, id) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns this notice. # @param noticeId [Integer] The ID of the notice you wish to delete. # @param id [Integer] The ID of the responsibility you wish to delete. # @return [ErrorDetail[]] - def delete_responsibilities(companyId, noticeId, id) - path = "/api/v2/companies/#{companyId}/notices/#{noticeId}/responsibilities/#{id}" - delete(path) - end - + def delete_responsibilities(companyId, noticeId, id) path = "/api/v2/companies/#{companyId}/notices/#{noticeId}/responsibilities/#{id}" + delete(path) end # Delete a single root cause. # @@ -212,16 +176,12 @@ def delete_responsibilities(companyId, noticeId, id) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns this notice. # @param noticeId [Integer] The ID of the notice you wish to delete. # @param id [Integer] The ID of the root cause you wish to delete. # @return [ErrorDetail[]] - def delete_root_causes(companyId, noticeId, id) - path = "/api/v2/companies/#{companyId}/notices/#{noticeId}/rootcauses/#{id}" - delete(path) - end - + def delete_root_causes(companyId, noticeId, id) path = "/api/v2/companies/#{companyId}/notices/#{noticeId}/rootcauses/#{id}" + delete(path) end # Retrieve a single attachment # @@ -232,15 +192,11 @@ def delete_root_causes(companyId, noticeId, id) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company for this attachment. # @param id [Integer] The ResourceFileId of the attachment to download. # @return [Object] - def download_notice_attachment(companyId, id) - path = "/api/v2/companies/#{companyId}/notices/files/#{id}/attachment" - get(path) - end - + def download_notice_attachment(companyId, id) path = "/api/v2/companies/#{companyId}/notices/files/#{id}/attachment" + get(path) end # Retrieve a single notice. # @@ -253,15 +209,11 @@ def download_notice_attachment(companyId, id) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company for this notice. # @param id [Integer] The ID of this notice. # @return [Object] - def get_notice(companyId, id) - path = "/api/v2/companies/#{companyId}/notices/#{id}" - get(path) - end - + def get_notice(companyId, id) path = "/api/v2/companies/#{companyId}/notices/#{id}" + get(path) end # Retrieve notice comments for a specific notice. # @@ -274,15 +226,11 @@ def get_notice(companyId, id) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param id [Integer] The ID of the notice. # @param companyId [Integer] The ID of the company that owns these notices. # @return [FetchResult] - def get_notice_comments(id, companyId) - path = "/api/v2/companies/#{companyId}/notices/#{id}/comments" - get(path) - end - + def get_notice_comments(id, companyId) path = "/api/v2/companies/#{companyId}/notices/#{id}/comments" + get(path) end # Retrieve notice finance details for a specific notice. # @@ -296,15 +244,11 @@ def get_notice_comments(id, companyId) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param id [Integer] The ID of the company that owns these notices. # @param companyId [Integer] The ID of the company that owns these notices. # @return [FetchResult] - def get_notice_finance_details(id, companyId) - path = "/api/v2/companies/#{companyId}/notices/#{id}/financedetails" - get(path) - end - + def get_notice_finance_details(id, companyId) path = "/api/v2/companies/#{companyId}/notices/#{id}/financedetails" + get(path) end # Retrieve notice responsibilities for a specific notice. # @@ -317,15 +261,11 @@ def get_notice_finance_details(id, companyId) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param id [Integer] The ID of the notice. # @param companyId [Integer] The ID of the company that owns these notices. # @return [FetchResult] - def get_notice_responsibilities(id, companyId) - path = "/api/v2/companies/#{companyId}/notices/#{id}/responsibilities" - get(path) - end - + def get_notice_responsibilities(id, companyId) path = "/api/v2/companies/#{companyId}/notices/#{id}/responsibilities" + get(path) end # Retrieve notice root causes for a specific notice. # @@ -338,15 +278,11 @@ def get_notice_responsibilities(id, companyId) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param id [Integer] The ID of the notice. # @param companyId [Integer] The ID of the company that owns these notices. # @return [FetchResult] - def get_notice_root_causes(id, companyId) - path = "/api/v2/companies/#{companyId}/notices/#{id}/rootcauses" - get(path) - end - + def get_notice_root_causes(id, companyId) path = "/api/v2/companies/#{companyId}/notices/#{id}/rootcauses" + get(path) end # Retrieve notices for a company. # @@ -362,7 +298,6 @@ def get_notice_root_causes(id, companyId) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that owns these notices. # @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/).
*Not filterable:* status, totalRemit, ticketReferenceNo, ticketReferenceUrl, reason, type, createdByUserName, documentReference, jurisdictionName, jurisdictionType, comments, finances, responsibility, rootCause # @param include [String] A comma separated list of additional data to retrieve. @@ -370,11 +305,8 @@ def get_notice_root_causes(id, companyId) # @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_notices_by_company(companyId, options={}) - path = "/api/v2/companies/#{companyId}/notices" - get(path, options) - end - + def list_notices_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/notices" + get(path, options) end # Retrieve all notices. # @@ -393,18 +325,14 @@ def list_notices_by_company(companyId, options={}) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @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/).
*Not filterable:* status, totalRemit, ticketReferenceNo, ticketReferenceUrl, reason, type, createdByUserName, documentReference, jurisdictionName, jurisdictionType, comments, finances, responsibility, rootCause # @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 query_notices(options={}) - path = "/api/v2/notices" - get(path, options) - end - + def query_notices(options={}) path = "/api/v2/notices" + get(path, options) end # Retrieve all notices. # @@ -417,14 +345,10 @@ def query_notices(options={}) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param model [Object] Query object to filter, sort and paginate the filing calendars. # @return [FetchResult] - def query_notices_post(model) - path = "/api/v2/notices/query" - post(path, model) - end - + def query_notices_post(model) path = "/api/v2/notices/query" + post(path, model) end # Update a single notice finance detail. # @@ -436,17 +360,13 @@ def query_notices_post(model) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that this notice finance detail belongs to. # @param noticeid [Integer] The ID of the notice finance detail you wish to update. # @param financeDetailsId [Integer] The ID of the finance detail you wish to delete. # @param model [Object] The notice finance detail object you wish to update. # @return [Object] - def update_finance_details(companyId, noticeid, financeDetailsId, model) - path = "/api/v2/companies/#{companyId}/notices/#{noticeid}/financedetails/#{financedetailsid}" - put(path, model) - end - + def update_finance_details(companyId, noticeid, financeDetailsId, model) path = "/api/v2/companies/#{companyId}/notices/#{noticeid}/financedetails/#{financedetailsid}" + put(path, model) end # Update a single notice. # @@ -461,16 +381,12 @@ def update_finance_details(companyId, noticeid, financeDetailsId, model) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that this notice belongs to. # @param id [Integer] The ID of the notice you wish to update. # @param model [Object] The notice object you wish to update. # @return [Object] - def update_notice(companyId, id, model) - path = "/api/v2/companies/#{companyId}/notices/#{id}" - put(path, model) - end - + def update_notice(companyId, id, model) path = "/api/v2/companies/#{companyId}/notices/#{id}" + put(path, model) end # Update a single notice comment. # @@ -482,19 +398,15 @@ def update_notice(companyId, id, model) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company that this notice comment belongs to. # @param noticeid [Integer] The ID of the notice you wish to update. # @param commentDetailsId [Integer] The ID of the comment you wish to update. # @param model [Object] The notice comment object you wish to update. # @return [Object] - def update_notice_comments(companyId, noticeid, commentDetailsId, model) - path = "/api/v2/companies/#{companyId}/notices/#{noticeid}/commentdetails/#{commentdetailsid}" - put(path, model) - end + def update_notice_comments(companyId, noticeid, commentDetailsId, model) path = "/api/v2/companies/#{companyId}/notices/#{noticeid}/commentdetails/#{commentdetailsid}" + put(path, model) end - - # Retrieve a single attachment + # Upload a new notice attachment. # # This API is available by invitation only. # @@ -504,15 +416,11 @@ def update_notice_comments(companyId, noticeid, commentDetailsId, model) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Operator, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - # * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. # @param companyId [Integer] The ID of the company for this attachment. # @param model [Object] The upload request. # @return [Object] - def upload_attachment(companyId, model) - path = "/api/v2/companies/#{companyId}/notices/files/attachment" - post(path, model) - end - + def upload_attachment(companyId, model) path = "/api/v2/companies/#{companyId}/notices/files/attachment" + post(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/registrar.rb b/lib/avatax/client/registrar.rb index a07ce55..3bfe95d 100644 --- a/lib/avatax/client/registrar.rb +++ b/lib/avatax/client/registrar.rb @@ -3,6 +3,20 @@ class Client module Registrar + # Bridge API for integration of validated certificates + # + # # For Registrar Use Only + # This API is for use by Avalara Registrar administrative users only. + # + # ### Security Policies + # + # * This API is available to Avalara system-level (registrar-level) users only. + # * This API depends on the following active services
*Required* (all): AvaCert. + # @param model [EcmsModel[]] Either a single exempt certificate or an array of certificates to create + # @return [EcmsModel[]] + def cert_capture_bridge(model) path = "/api/v2/certcapturebridge" + post(path, model) end + # Create a new account # # # For Registrar Use Only diff --git a/lib/avatax/client/taxcontent.rb b/lib/avatax/client/taxcontent.rb index cd25a76..41bd3d9 100644 --- a/lib/avatax/client/taxcontent.rb +++ b/lib/avatax/client/taxcontent.rb @@ -3,6 +3,19 @@ class Client module TaxContent + # Retrieve send-sale tax content for this company. + # + # This API is available by invitation only. + # + # ### 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
*Required* (all): SendSalesRateFile. + # @param model [Object] The send sales request model. + # @return [Object] + def build_send_sales_rate_file(model) path = "/api/v2/sendsalescontent/download" + post(path, model) end + # Build a multi-location tax content file # # Builds a tax content file containing information useful for a retail point-of-sale solution. @@ -78,6 +91,23 @@ def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build" def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata" get(path, options) end + # Retrieve send-sale tax content for this company. + # + # This API is available by invitation only. + # + # ### 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
*Required* (all): SendSalesRateFile. + # @param date [DateTime] The date for which we are fetching tax content. + # @param taxCode [String] The tax code for which we are fetching tax content. + # @param companyId [Integer] The unique ID number of the company which is fetching tax content. + # @param format [String] Requests a specific data format for this content file. (See SendSalesOutputFileFormat::* for a list of allowable values) + # @param type [String] Requests a specific encoding for this content file. (See SendSalesFileType::* for a list of allowable values) + # @return [Object] + def download_send_sales_rate_file(date, taxCode, companyId, options={}) path = "/api/v2/sendsalescontent/download/#{companyId}/#{taxCode}/#{date}" + get(path, options) end + # Download a file listing tax rates by postal code # # Download a CSV file containing all five digit postal codes in the United States and their sales diff --git a/lib/avatax/client/taxprofiles.rb b/lib/avatax/client/taxprofiles.rb index 2718f5e..e7425aa 100644 --- a/lib/avatax/client/taxprofiles.rb +++ b/lib/avatax/client/taxprofiles.rb @@ -12,28 +12,32 @@ module TaxProfiles # # This API can be used to export a complete zip file containing your company's current tax profile, and you can then restore this # profile to a different company or compare it over time to see if your profile has been changed. + # + # ### 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
*Required* (all): AvaTaxPro. # @param companyId [Integer] The unique ID number of the company whose profile you wish to retrieve. # @return [Object] - def export_tax_profile(companyId) - path = "/api/v2/companies/#{companyId}/taxprofile" - get(path) - end - + def export_tax_profile(companyId) path = "/api/v2/companies/#{companyId}/taxprofile" + get(path) end # Import a tax profile. # # Imports a tax profile to a new company, along with the option to import account settings. + # + # ### 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
*Required* (all): AvaTaxPro. # @param accountId [Integer] The account id of the account to which the tax profile will be imported. # @param newCompanyCode [String] The companyCode to use for the imported company. # @param replaceAccountSettings [Boolean] Replace the current account settings with the ones in the tax profile. # @param bypassNexusValidation [Boolean] Enable invalid nexus to be imported. # @param taxProfile [Object] The taxProfile # @return [Object] - def import_tax_profile() - path = "/api/v2/taxprofile" - post(path) - end - + def import_tax_profile() path = "/api/v2/taxprofile" + post(path) end end end end \ No newline at end of file diff --git a/lib/avatax/client/transactions.rb b/lib/avatax/client/transactions.rb index 8fa054a..fa97e8c 100644 --- a/lib/avatax/client/transactions.rb +++ b/lib/avatax/client/transactions.rb @@ -485,6 +485,34 @@ def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{id}" get(path, options) end + # Inspects a transaction line and presents the result with a human-readable text providing the reasoning behind + # determination like nexus, exemption, product taxability etc. + # + # Inspects a transaction line and presents the result with a human-readable text providing the reasoning behind + # determination like nexus, exemption, product taxability etc. + # + # NOTE: In order to avoid ambiguity, DocumentType of 'Any' is invalid for this API as this API is designed to look for a specific line of a given document. + # + # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request: + # * 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 + # + # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + # * This API depends on the following active services
*Required* (all): AvaTaxPro, BasicReturns. + # @param companyCode [String] The company code of the company that recorded this transaction + # @param transactionCode [String] The transaction code of the transaction under line inspection + # @param lineNo [String] The line number of the transaction that needs to be inspected + # @param documentType [String] The document type of the transaction, In order to avoid ambiguity, DocumentType of 'Any' is invalid for this API as this API is designed to look for a specific line of a given document. (See DocumentType::* for a list of allowable values) + # @return [Object] + def inspect_line(companyCode, transactionCode, lineNo, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lines/#{lineNo}/inspect" + get(path, options) end + # Retrieve all transactions # # List all transactions attached to this company. @@ -524,7 +552,7 @@ def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{ # @param companyCode [String] The company code of the company that recorded this transaction # @param dataSourceId [Integer] Optionally filter transactions to those from a specific data source. # @param include [String] Specifies objects to include in this fetch call - # @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/).
*Not filterable:* totalDiscount, lines, addresses, locationTypes, summary, taxDetailsByTaxType, parameters, messages, invoiceMessages, isFakeTransaction + # @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/).
*Not filterable:* exchangeRateCurrencyCode, totalDiscount, lines, addresses, locationTypes, summary, taxDetailsByTaxType, parameters, messages, invoiceMessages, isFakeTransaction # @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`. diff --git a/lib/avatax/version.rb b/lib/avatax/version.rb index 0878b75..1c4e874 100644 --- a/lib/avatax/version.rb +++ b/lib/avatax/version.rb @@ -1,3 +1,3 @@ module AvaTax - VERSION = '20.7.1'.freeze unless defined?(::AvaTax::VERSION) + VERSION = '20.9.0'.freeze unless defined?(::AvaTax::VERSION) end