diff --git a/netsuitesdk/api/expense_reports.py b/netsuitesdk/api/expense_reports.py index b85dd20..f87a1b7 100644 --- a/netsuitesdk/api/expense_reports.py +++ b/netsuitesdk/api/expense_reports.py @@ -58,6 +58,16 @@ def post(self, data) -> OrderedDict: er['expenseList'] = self.ns_client.ExpenseReportExpenseList(expense=expense_list) + if 'nexus' in data: + er['nexus'] = self.ns_client.RecordRef(**(data['nexus'])) + + if 'taxDetailsList' in data: + tax_details_list = [] + for tdl in data['taxDetailsList']['taxDetails']: + tax_details_list.append(self.ns_client.TaxDetails(**tdl)) + er['taxDetailsList'] = self.ns_client.TaxDetailsList(taxDetails=tax_details_list) + + if 'expenseReportCurrency' in data: er['expenseReportCurrency'] = self.ns_client.RecordRef(**(data['expenseReportCurrency'])) diff --git a/netsuitesdk/internal/client.py b/netsuitesdk/internal/client.py index 92a1d87..af8c848 100644 --- a/netsuitesdk/internal/client.py +++ b/netsuitesdk/internal/client.py @@ -30,8 +30,8 @@ class NetSuiteClient: """The Netsuite client class providing access to the Netsuite SOAP/WSDL web service""" - WSDL_URL_TEMPLATE = 'https://{account}.suitetalk.api.netsuite.com/wsdl/v2019_1_0/netsuite.wsdl' - DATACENTER_URL_TEMPLATE = 'https://{account}.suitetalk.api.netsuite.com/services/NetSuitePort_2019_1' + WSDL_URL_TEMPLATE = 'https://{account}.suitetalk.api.netsuite.com/wsdl/v2019_2_0/netsuite.wsdl' + DATACENTER_URL_TEMPLATE = 'https://{account}.suitetalk.api.netsuite.com/services/NetSuitePort_2019_2' _search_preferences = None _passport = None @@ -79,7 +79,7 @@ def __init__(self, account=None, caching=True, caching_timeout=2592000, caching_ # default service points to wrong data center. need to create a new service proxy and replace the default one self._service_proxy = self._client.create_service( - '{urn:platform_2019_1.webservices.netsuite.com}NetSuiteBinding', self._datacenter_url) + '{urn:platform_2019_2.webservices.netsuite.com}NetSuiteBinding', self._datacenter_url) # Parse all complex types specified in :const:`~netsuitesdk.netsuite_types.COMPLEX_TYPES` # and store them as attributes of this instance. Same for simple types.