From f19e7b6483d036a8440b81050046539193b1b8a0 Mon Sep 17 00:00:00 2001 From: Sravan Kumar <30795376+Sravanksk@users.noreply.github.com> Date: Wed, 16 Sep 2020 14:25:47 +0530 Subject: [PATCH] Support for expense-categories --- netsuitesdk/api/expense_categories.py | 9 +++++++++ netsuitesdk/connection.py | 2 ++ netsuitesdk/internal/netsuite_types.py | 1 + setup.py | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 netsuitesdk/api/expense_categories.py diff --git a/netsuitesdk/api/expense_categories.py b/netsuitesdk/api/expense_categories.py new file mode 100644 index 0000000..6498f08 --- /dev/null +++ b/netsuitesdk/api/expense_categories.py @@ -0,0 +1,9 @@ +from .base import ApiBase +import logging + +logger = logging.getLogger(__name__) + +class ExpenseCategory(ApiBase): + + def __init__(self, ns_client): + ApiBase.__init__(self, ns_client=ns_client, type_name='ExpenseCategory') diff --git a/netsuitesdk/connection.py b/netsuitesdk/connection.py index 5e0ade6..099af4e 100644 --- a/netsuitesdk/connection.py +++ b/netsuitesdk/connection.py @@ -11,6 +11,7 @@ from .api.expense_reports import ExpenseReports from .api.folders import Folders from .api.files import Files +from .api.expense_categories import ExpenseCategory from .internal.client import NetSuiteClient @@ -36,3 +37,4 @@ def __init__(self, account, consumer_key, consumer_secret, token_key, token_secr self.expense_reports = ExpenseReports(ns_client) self.folders = Folders(ns_client) self.files = Files(ns_client) + self.expense_categories = ExpenseCategory(ns_client) diff --git a/netsuitesdk/internal/netsuite_types.py b/netsuitesdk/internal/netsuite_types.py index cdcec96..a29830a 100644 --- a/netsuitesdk/internal/netsuite_types.py +++ b/netsuitesdk/internal/netsuite_types.py @@ -59,6 +59,7 @@ # https://webservices.netsuite.com/xsd/lists/v2017_2_0/accounting.xsd 'ns17': [ 'Account', 'AccountSearch', + 'ExpenseCategory', 'ExpenseCategorySearch', 'AccountingPeriod', 'Classification', 'ClassificationSearch', 'Department', 'DepartmentSearch', diff --git a/setup.py b/setup.py index 4dcf322..c14e32f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='netsuitesdk', - version='1.6.0', + version='1.7.0', author='Siva Narayanan', author_email='siva@fyle.in', description='Python SDK for accessing the NetSuite SOAP webservice',