-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom Fields and Custom Records Support
- Loading branch information
Showing
9 changed files
with
93 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from .base import ApiBase | ||
import logging | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class CustomLists(ApiBase): | ||
def __init__(self, ns_client): | ||
ApiBase.__init__(self, ns_client=ns_client, type_name='CustomList') | ||
|
||
def get_all(self): | ||
return self._get_all() | ||
|
||
def get_all_generator(self, page_size=20): | ||
""" | ||
Returns a generator which is more efficient memory-wise | ||
""" | ||
return self._get_all_generator() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from netsuitesdk.internal.utils import PaginatedSearch | ||
|
||
from .base import ApiBase | ||
import logging | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class CustomRecords(ApiBase): | ||
def __init__(self, ns_client): | ||
ApiBase.__init__(self, ns_client=ns_client, type_name='CustomRecordType') | ||
|
||
def get_all_by_id(self, internalId): | ||
cr_type = self.ns_client.CustomRecordSearchBasic( | ||
recType=self.ns_client.CustomRecordType( | ||
internalId=internalId | ||
) | ||
) | ||
ps = PaginatedSearch(client=self.ns_client, type_name='CustomRecordType', search_record=cr_type, pageSize=20) | ||
return list(self._paginated_search_to_generator(paginated_search=ps)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setuptools.setup( | ||
name='netsuitesdk', | ||
version='1.7.1', | ||
version='1.8.0', | ||
author='Siva Narayanan', | ||
author_email='[email protected]', | ||
description='Python SDK for accessing the NetSuite SOAP webservice', | ||
|