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(contract-line): created new endpoint paginated with limit and page #33222

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

atm-irvine
Copy link
Contributor

NEW|New endpoint paginated with limit and page

I've been added a new endpoint paginated for contract lines

*
* @return array
*/
public function getLinesPaginated($id, $limit = 10, $page = 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In doc coment, you must add the type of var, for example:
@param int $id Id of contract

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected

@eldy eldy added the PR to fix - Conflict or CI error to solve The PHP unit tests return something wrong. Check details to know what to fix or solve the conflicts. label Feb 26, 2025
@eldy
Copy link
Member

eldy commented Mar 2, 2025

Instead of a adding a new url endpoint, can you instead follow the same solution used for other api than need pagination:
Add the field
* @param int $limit Limit for list
* @param int $page Page number
* @param bool $pagination_data If this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0*

Return old format when pagination_data is not set and return with pagination information when set.

See example into api that Get a list of orders. We should use the same way for api to get lines.

@eldy eldy added PR to fix - See feedback in comments PR needs to be fixed to be integrated (some comments should describes the fix to do) and removed PR to fix - Conflict or CI error to solve The PHP unit tests return something wrong. Check details to know what to fix or solve the conflicts. labels Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR to fix - See feedback in comments PR needs to be fixed to be integrated (some comments should describes the fix to do)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants