-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(router): add total count for refunds list #1935
Conversation
merchant_account.storage_scheme, | ||
) | ||
.await | ||
.to_not_found_response(errors::ApiErrorResponse::InternalServerError)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be 0 instead of error response?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
count 0 case is handled, error can occur in cases, such as DB is down or some unexpected behaviour.
@@ -160,7 +162,9 @@ pub struct TimeRange { | |||
#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)] | |||
pub struct RefundListResponse { | |||
/// The number of refunds included in the list | |||
pub size: usize, | |||
pub count: usize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not backward compatible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now it is not being used
Type of Change
Description
Added support for total count of available refunds in refunds list. This will support better pagination and also work well with filters applied on refunds list.
Additional Changes
Motivation and Context
The current refund list api doesn't have support for proper pagination.
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy