Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Count API will get only active counts #140

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading