Skip to content

Commit

Permalink
Add Support for Tax Detail Override and Tax Detail List for Bills (#125)
Browse files Browse the repository at this point in the history
* Add Support for Tax Detail Override and Tax Detail List for Bills

* update version

---------

Co-authored-by: ruuushhh <[email protected]>
  • Loading branch information
Shwetabhk and ruuushhh authored Apr 25, 2024
1 parent 6e7ed74 commit 6ae878c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions netsuitesdk/api/vendor_bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ def post(self, data) -> OrderedDict:
if 'entity' in data:
vb['entity'] = self.ns_client.RecordRef(**(data['entity']))

if 'taxDetailsOverride' in data:
vb['taxDetailsOverride'] = data['taxDetailsOverride']

if 'taxDetailsList' in data:
tax_details_list = []
for tdl in data['taxDetailsList']['taxDetails']:
tax_details_list.append(self.ns_client.TaxDetails(**tdl))
vb['taxDetailsList'] = self.ns_client.TaxDetailsList(taxDetails=tax_details_list)

logger.debug('able to create vb = %s', vb)
res = self.ns_client.upsert(vb, 'bills')
return self._serialize(res)
2 changes: 2 additions & 0 deletions netsuitesdk/internal/netsuite_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
'CustomListSearchBasic',
'TermSearchBasic',
'DepartmentSearchBasic',
'TaxDetails',
'TaxDetailsList',
'ItemSearchBasic', 'ItemSearchRowBasic',
'ClassificationSearchBasic',
'CurrencyRateSearchBasic',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='netsuitesdk',
version='2.21.0',
version='2.21.1',
author='Siva Narayanan',
author_email='[email protected]',
description='Python SDK for accessing the NetSuite SOAP webservice',
Expand Down

0 comments on commit 6ae878c

Please sign in to comment.