Skip to content

Commit

Permalink
feat: Count API will get only active counts (#140)
Browse files Browse the repository at this point in the history
* feat: Count API will get only active counts

* bump up version
  • Loading branch information
Ashutosh619-sudo authored Oct 1, 2024
1 parent 603eb0b commit e49f95a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion netsuitesdk/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ def get_all(self):
return all_records

def count(self):
ps = PaginatedSearch(client=self.ns_client, type_name=self.type_name, pageSize=10, perform_search=True)
record_type_search_field = self.ns_client.SearchBooleanField(searchValue=False)
basic_search = self.ns_client.basic_search_factory(
type_name=self.type_name,
isInactive=record_type_search_field,
)

ps = PaginatedSearch(client=self.ns_client, type_name=self.type_name, pageSize=10, perform_search=True,basic_search=basic_search)
return ps.total_records

def get_all_generator(self, page_size=20):
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.22.1',
version='2.23.0',
author='Siva Narayanan',
author_email='[email protected]',
description='Python SDK for accessing the NetSuite SOAP webservice',
Expand Down

0 comments on commit e49f95a

Please sign in to comment.