From 37eef9d41df218eb19d07a3b7f75d089c328c575 Mon Sep 17 00:00:00 2001 From: Aman Prasad Date: Wed, 28 Aug 2024 17:32:15 +0530 Subject: [PATCH] add pagination to list all invoice API --- raystack/frontier/v1beta1/admin.proto | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/raystack/frontier/v1beta1/admin.proto b/raystack/frontier/v1beta1/admin.proto index eb205d67..d5f2e6a2 100644 --- a/raystack/frontier/v1beta1/admin.proto +++ b/raystack/frontier/v1beta1/admin.proto @@ -664,10 +664,27 @@ message DelegatedCheckoutResponse { message ListAllInvoicesRequest { string org_id = 1; + int32 page_size = 2 [ + (validate.rules).int32 = { + gte: 1, + ignore_empty: true, + }, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The maximum number of invoices to return per page. The default is 50."} + ]; + int32 page_num = 3 [ + (validate.rules).int32 = { + gte: 1, + ignore_empty: true, + }, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The page number to return. The default is 1."} + ]; } message ListAllInvoicesResponse { repeated Invoice invoices = 1; + int32 count = 2[ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Total number of records present"} + ]; } message ListAllBillingAccountsRequest {