mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
refactor(customers): add offset and limit to customers list (#5735)
This commit is contained in:
@ -48,6 +48,16 @@ pub struct CustomerRequest {
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, Deserialize, Serialize, ToSchema)]
|
||||
pub struct CustomerListRequest {
|
||||
/// Offset
|
||||
#[schema(example = 32)]
|
||||
pub offset: Option<u32>,
|
||||
/// Limit
|
||||
#[schema(example = 32)]
|
||||
pub limit: Option<u16>,
|
||||
}
|
||||
|
||||
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
|
||||
impl CustomerRequest {
|
||||
pub fn get_merchant_reference_id(&self) -> Option<id_type::CustomerId> {
|
||||
|
||||
@ -19,6 +19,7 @@ use common_utils::{
|
||||
impl_api_event_type,
|
||||
};
|
||||
|
||||
use crate::customers::CustomerListRequest;
|
||||
#[allow(unused_imports)]
|
||||
use crate::{
|
||||
admin::*,
|
||||
@ -131,7 +132,8 @@ impl_api_event_type!(
|
||||
GetDisputeMetricRequest,
|
||||
OrganizationResponse,
|
||||
OrganizationRequest,
|
||||
OrganizationId
|
||||
OrganizationId,
|
||||
CustomerListRequest
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user