-
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.
- Loading branch information
Showing
6 changed files
with
39 additions
and
3 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,24 @@ | ||
from .base import ApiBase | ||
from netsuitesdk.internal.utils import PaginatedSearch | ||
import logging | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
class Items(ApiBase): | ||
|
||
def __init__(self, ns_client): | ||
ApiBase.__init__(self, ns_client=ns_client, type_name='Item') | ||
|
||
def get_all_generator(self, is_inactive=False): | ||
# Get Only Active Items using SearchBooleanField | ||
record_type_search_field = self.ns_client.SearchBooleanField(searchValue=is_inactive) | ||
basic_search = self.ns_client.basic_search_factory('Item', isInactive=record_type_search_field) | ||
|
||
paginated_search = PaginatedSearch( | ||
client=self.ns_client, | ||
type_name='Item', | ||
basic_search=basic_search, | ||
pageSize=20 | ||
) | ||
|
||
return self._paginated_search_generator(paginated_search=paginated_search) |
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='2.16.6', | ||
version='2.17.0', | ||
author='Siva Narayanan', | ||
author_email='[email protected]', | ||
description='Python SDK for accessing the NetSuite SOAP webservice', | ||
|
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,9 @@ | ||
import logging | ||
import pytest | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
def test_get(nc): | ||
data = nc.items.get_all() | ||
logger.debug('data = %s', data) | ||
assert data, 'get all didnt work' |
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