fix(refund_sync): add validation for missing connector_refund_id (#1013)

This commit is contained in:
Nishant Joshi
2023-05-03 01:57:14 +05:30
committed by GitHub
parent e9fc34ff62
commit 4397c8e199
6 changed files with 45 additions and 9 deletions

View File

@ -48,6 +48,11 @@ pub struct RefundRequest {
pub merchant_connector_details: Option<admin::MerchantConnectorDetailsWrap>,
}
#[derive(Default, Debug, Clone, Deserialize)]
pub struct RefundsRetrieveBody {
pub force_sync: Option<bool>,
}
#[derive(Default, Debug, ToSchema, Clone, Deserialize)]
pub struct RefundsRetrieveRequest {
/// Unique Identifier for the Refund. This is to ensure idempotency for multiple partial refund initiated against the same payment. If the identifiers is not defined by the merchant, this filed shall be auto generated and provide in the API response. It is recommended to generate uuid(v4) as the refund_id.
@ -58,6 +63,10 @@ pub struct RefundsRetrieveRequest {
)]
pub refund_id: String,
/// `force_sync` with the connector to get refund details
/// (defaults to false)
pub force_sync: Option<bool>,
/// Merchant connector details used to make payments.
pub merchant_connector_details: Option<admin::MerchantConnectorDetailsWrap>,
}