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

Add corporate purchase page method #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Given a version number MAJOR.MINOR.PATCH, increment:


## [Unreleased]
### Fixed
- CorporatePurchase page method

## [2.25.1] - 2024-04-01
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion starkbank/corporatepurchase/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from . import log
from .log.__log import Log
from .__corporatepurchase import query, get, parse, response
from .__corporatepurchase import query, get, page, parse, response
16 changes: 16 additions & 0 deletions tests/sdk/test_corporate_purchase.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@
starkbank.user = exampleProject


class TestCorporatePurchasePage(TestCase):

def test_success(self):
cursor = None
ids = []
for _ in range(2):
purchases, cursor = starkbank.corporatepurchase.page(limit=2, cursor=cursor)
for purchase in purchases:
print(purchase)
self.assertFalse(purchase.id in ids)
ids.append(purchase.id)
if cursor is None:
break
self.assertTrue(len(ids) == 4)


class TestCorporatePurchaseQuery(TestCase):

def test_success(self):
Expand Down
Loading