feat: add docs for PaymentsRequest & PaymentsResponse (#385)

This commit is contained in:
Nishant Joshi
2023-01-17 12:53:43 +05:30
committed by GitHub
parent a4eaa36034
commit 72c4b06860
7 changed files with 1108 additions and 23 deletions

View File

@ -51,12 +51,15 @@ pub enum AttemptStatus {
strum::Display,
strum::EnumString,
frunk::LabelledGeneric,
ToSchema,
)]
#[serde(rename_all = "snake_case")]
#[strum(serialize_all = "snake_case")]
pub enum AuthenticationType {
/// If the card is enrolled for 3DS authentication, the 3DS based authentication will be activated. The liability of chargeback shift to the issuer
#[default]
ThreeDs,
/// 3DS based authentication will not be activated. The liability of chargeback stays with the merchant.
NoThreeDs,
}
@ -72,14 +75,19 @@ pub enum AuthenticationType {
strum::Display,
strum::EnumString,
frunk::LabelledGeneric,
ToSchema,
)]
#[serde(rename_all = "snake_case")]
#[strum(serialize_all = "snake_case")]
pub enum CaptureMethod {
/// Post the payment authorization, the capture will be executed on the full amount immediately
#[default]
Automatic,
/// The capture will happen only if the merchant triggers a Capture API request
Manual,
/// The capture will happen only if the merchant triggers a Capture API request
ManualMultiple,
/// The capture can be scheduled to automatically get triggered at a specific date & time
Scheduled,
}
@ -94,6 +102,7 @@ pub enum CaptureMethod {
serde::Deserialize,
serde::Serialize,
frunk::LabelledGeneric,
ToSchema,
)]
#[strum(serialize_all = "snake_case")]
#[serde(rename_all = "snake_case")]
@ -262,6 +271,7 @@ pub enum EventType {
Default,
Eq,
PartialEq,
ToSchema,
serde::Deserialize,
serde::Serialize,
strum::Display,
@ -294,6 +304,7 @@ pub enum IntentStatus {
strum::Display,
strum::EnumString,
frunk::LabelledGeneric,
ToSchema,
)]
#[serde(rename_all = "snake_case")]
#[strum(serialize_all = "snake_case")]
@ -396,6 +407,7 @@ pub enum PaymentMethodType {
Eq,
Hash,
PartialEq,
ToSchema,
serde::Deserialize,
serde::Serialize,
strum::Display,
@ -485,6 +497,7 @@ pub enum MandateStatus {
Default,
Eq,
PartialEq,
ToSchema,
serde::Deserialize,
serde::Serialize,
strum::Display,