Skip to content

Commit

Permalink
regenerate openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Chethan-rao committed Oct 15, 2023
1 parent 644b0df commit 3065bb7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/api_models/src/payment_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,15 +717,15 @@ pub struct CustomerPaymentMethod {
pub bank_transfer: Option<payouts::Bank>,

/// Masked bank details from PM auth services
#[schema(value_type = Option<MaskedBankDetails>)]
#[schema(example = json!({"mask": "0000"}))]
pub bank: Option<MaskedBankDetails>,

/// Whether this payment method requires CVV to be collected
#[schema(example = true)]
pub requires_cvv: bool,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
pub struct MaskedBankDetails {
pub mask: String,
}
Expand Down
1 change: 0 additions & 1 deletion crates/router/src/core/payments/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,6 @@ pub async fn make_pm_data<'a, F: Clone, R, Ctx: PaymentMethodRetrieve>(
.to_owned()
.get_required_value("payment_method")?,
);

let token_data_string = redis_conn
.get_key::<Option<String>>(&key)
.await
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/openapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payments::PaymentAttemptResponse,
api_models::payments::CaptureResponse,
api_models::payment_methods::RequiredFieldInfo,
api_models::payment_methods::MaskedBankDetails,
api_models::refunds::RefundListRequest,
api_models::refunds::RefundListResponse,
api_models::refunds::TimeRange,
Expand Down
19 changes: 19 additions & 0 deletions openapi/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -4672,6 +4672,14 @@
],
"nullable": true
},
"bank": {
"allOf": [
{
"$ref": "#/components/schemas/MaskedBankDetails"
}
],
"nullable": true
},
"requires_cvv": {
"type": "boolean",
"description": "Whether this payment method requires CVV to be collected",
Expand Down Expand Up @@ -6031,6 +6039,17 @@
}
]
},
"MaskedBankDetails": {
"type": "object",
"required": [
"mask"
],
"properties": {
"mask": {
"type": "string"
}
}
},
"MbWayRedirection": {
"type": "object",
"required": [
Expand Down

0 comments on commit 3065bb7

Please sign in to comment.