-
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 Payments - List endpoint for v2 #7191
base: main
Are you sure you want to change the base?
Conversation
6c3747b
to
8555ba0
Compare
8555ba0
to
fe4849a
Compare
77d1450
to
ddae0e8
Compare
crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
Outdated
Show resolved
Hide resolved
crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
Outdated
Show resolved
Hide resolved
38fd2bf
to
a38c824
Compare
pub struct CustomerDetailsResponse { | ||
/// The identifier for the customer. | ||
#[schema(value_type = Option<String>, max_length = 64, min_length = 1, example = "cus_y3oqhf46pyzuxjbcn2giaqnb44")] | ||
pub id: Option<id_type::GlobalCustomerId>, |
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.
id
should be mandatory when you are returning CustomerDetailsResponse right?
|
||
/// A unique identifier for a payment provided by the connector | ||
#[schema(value_type = Option<String>, example = "993672945374576J")] | ||
pub connector_payment_id: Option<String>, |
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.
How's it different from connector_response_reference_id?
@@ -5504,6 +5684,18 @@ pub struct PaymentListResponseV2 { | |||
pub data: Vec<PaymentsResponse>, | |||
} | |||
|
|||
#[cfg(feature = "v2")] | |||
#[derive(Clone, Debug, serde::Serialize)] | |||
pub struct PaymentListResponseV2 { |
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.
Do we need both PaymentListResponse and PaymentListResponseV2 in V2?
req, | ||
) | ||
}, | ||
&auth::ApiKeyAuth, |
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.
We should add JWTAuth here
Type of Change
Description
Added
Payments - List
endpoint for v2Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy