From ce29ed629c259971e83667a3eaec99e7cb4796f0 Mon Sep 17 00:00:00 2001 From: Avalara-ChrisWalker Date: Thu, 19 Dec 2019 10:09:10 -0800 Subject: [PATCH 1/2] Fixed19.12 update --- setup.py | 2 +- src/client_methods.py | 49 ++++++++++++++++++++++++++++--------------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/setup.py b/setup.py index b9f887a..8f0dd1c 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='Avalara', - version='19.11.0', + version='19.12.0', url='https://github.com/avadev/AvaTax-REST-V2-Python-SDK', package_dir={'': 'src'}, packages=['avalara'], diff --git a/src/client_methods.py b/src/client_methods.py index 49b2010..0c46c9b 100644 --- a/src/client_methods.py +++ b/src/client_methods.py @@ -231,7 +231,6 @@ def resolve_address_post(self, model): ### Security Policies * This API requires the user role Compliance Root User. * 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 [AvaFileFormModel] The AvaFileForm you wish to create. :return AvaFileFormModel @@ -248,7 +247,6 @@ def create_ava_file_forms(self, model): ### Security Policies * This API requires one of the following user roles: Compliance Root User, ComplianceUser, FirmAdmin. * 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_ [int] The ID of the AvaFileForm you wish to delete. :return ErrorDetail @@ -264,7 +262,6 @@ def delete_ava_file_form(self, id_): Get the AvaFileForm object identified by this URL. ### Security Policies * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CompanyUser, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, FirmAdmin, FirmUser, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin. - * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. * 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_ [int] The primary key of this AvaFileForm @@ -283,7 +280,6 @@ def get_ava_file_form(self, id_): ### Security Policies * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CompanyUser, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, FirmAdmin, FirmUser, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin. * 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:* outletTypeId :param top [int] 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. @@ -304,7 +300,6 @@ def query_ava_file_forms(self, include=None): ### Security Policies * This API requires the user role Compliance Root User. * 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_ [int] The ID of the AvaFileForm you wish to update :param model [AvaFileFormModel] The AvaFileForm model you wish to update. @@ -1141,7 +1136,6 @@ def delete_company(self, id_): ### Security Policies * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. * This API depends on the following active services
*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 [int] The unique identifier of the company :return FundingConfigurationModel @@ -1161,7 +1155,6 @@ def funding_configuration_by_company(self, companyId): ### 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. - * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. :param companyId [int] The unique identifier of the company :param currency [string] The currency of the funding. USD and CAD are the only valid currencies @@ -1533,7 +1526,7 @@ def create_customers(self, companyId, model): :param companyId [int] The unique ID number of the company that recorded this customer :param customerCode [string] The unique code representing this customer - :return ErrorDetail + :return CustomerModel """ def delete_customer(self, companyId, customerCode): return requests.delete('{}/api/v2/companies/{}/customers/{}'.format(self.base_url, companyId, customerCode), @@ -2031,12 +2024,13 @@ def list_ava_file_forms(self, include=None): r""" List certificate attributes used by a company - List the certificate attributes defined by a company. + List the certificate attributes defined by a company either specified by the user or the user's default company. A certificate may have multiple attributes that control its behavior. You may apply or remove attributes to a certificate at any time. If you see the 'CertCaptureNotConfiguredError', please use CheckProvision and RequestProvision endpoints to check and provision account. + :param companyid [int] Id of the company the user wish to fetch the certificates' 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 [int] 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 [int] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. @@ -3165,6 +3159,30 @@ def update_distance_threshold(self, companyId, id_, model): auth=self.auth, headers=self.client_header, json=model, timeout=self.timeout_limit if self.timeout_limit else 10) + r""" + Retrieve a list of filed returns for the specified company in the year and month of a given filing period. + + ### 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 is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser, CompanyUser, AccountUser, CompanyAdmin, AccountAdmin. + * 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 [int] The ID of the company that owns these batches + :param endPeriodMonth [int] The month of the period you are trying to retrieve + :param endPeriodYear [int] The year of the period you are trying to retrieve + :param frequency [FilingFrequencyId] The frequency of the return you are trying to retrieve (See FilingFrequencyId::* for a list of allowable values) + :param status [FilingStatusId] The status of the return(s) you are trying to retrieve (See FilingStatusId::* for a list of allowable values) + :param country [string] The country of the return(s) you are trying to retrieve + :param region [string] The region of the return(s) you are trying to retrieve + :param filingCalendarId [int] The filing calendar id of the return you are trying to retrieve + :param taxformCode [string] The unique tax form code of the form. + :return FetchResult + """ + def get_filed_returns(self, companyId, include=None): + return requests.get('{}/api/v2/companies/{}/filings/returns/filed'.format(self.base_url, companyId), + auth=self.auth, headers=self.client_header, params=include, + timeout=self.timeout_limit if self.timeout_limit else 10) + r""" Approves linkage to a firm for a client account @@ -3415,7 +3433,6 @@ def tax_rates_by_postal_code(self, include=None): ### 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. - * This API is available by invitation only.
*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser. :param id_ [int] The unique ID number of this funding request :return FundingStatusModel @@ -3441,7 +3458,6 @@ def activate_funding_request(self, id_): ### 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
*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_ [int] The unique ID number of this funding request :return FundingStatusModel @@ -4698,7 +4714,7 @@ def list_notifications(self, include=None): r""" Request a new Avalara account - This API is for use by partner onboarding services customers only. + This API is for use by partner provisioning services customers only. Avalara invites select partners to refer new customers to the AvaTax service using the onboarding features of AvaTax. These partners can create accounts for new customers using this API. Calling this API creates an account with the specified product subscriptions, but does not configure billing. @@ -4712,7 +4728,7 @@ def list_notifications(self, include=None): ### Security Policies * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. * This API is available by invitation only. - * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Onboarding:RequestNewAccount]. + * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount]. :param model [NewAccountRequestModel] Information about the account you wish to create and the selected product offerings. :return NewAccountModel @@ -4725,12 +4741,12 @@ def request_new_account(self, model): r""" Request a new entitilement to an existing customer - This API is for use by partner onboarding services customers only. This will allow the partners to allow + This API is for use by partner provisioning services customers only. This will allow the partners to allow the add new entitlement to an existing customer ### Security Policies * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. * This API is available by invitation only. - * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Onboarding:RequestNewAccount]. + * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount]. :param id_ [int] The avatax account id of the customer :param offer [string] The offer to be added to an already existing customer @@ -5807,7 +5823,6 @@ def audit_transaction_with_type(self, companyCode, transactionCode, documentType ### Security Policies * This API requires the user role Compliance Root User. * 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 [BulkLockTransactionModel] bulk lock request :return BulkLockTransactionResult @@ -6705,7 +6720,7 @@ def update_user(self, id_, accountId, model): or subscription to provide useful information to the current user as to whether they are entitled to use specific features of AvaTax. - :param serviceTypeId [ServiceTypeId] The service to check (See ServiceTypeId::* for a list of allowable values) + :param serviceTypeId [string] The service to check :return SubscriptionModel """ def get_my_subscription(self, serviceTypeId): From 01fecff57b969bf98b0f1f15af4e64b7dc9d7d3f Mon Sep 17 00:00:00 2001 From: Avalara-ChrisWalker <37675577+Avalara-ChrisWalker@users.noreply.github.com> Date: Thu, 19 Dec 2019 10:34:36 -0800 Subject: [PATCH 2/2] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8f0dd1c..73641a5 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='Avalara', - version='19.12.0', + version='19.12.1', url='https://github.com/avadev/AvaTax-REST-V2-Python-SDK', package_dir={'': 'src'}, packages=['avalara'],