mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
fix: do not allow duplicate organization name (#5919)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -32,7 +32,9 @@ use crate::{
|
||||
disputes::*,
|
||||
files::*,
|
||||
mandates::*,
|
||||
organization::{OrganizationId, OrganizationRequest, OrganizationResponse},
|
||||
organization::{
|
||||
OrganizationCreateRequest, OrganizationId, OrganizationResponse, OrganizationUpdateRequest,
|
||||
},
|
||||
payment_methods::*,
|
||||
payments::*,
|
||||
user::{UserKeyTransferRequest, UserTransferKeyResponse},
|
||||
@ -129,7 +131,8 @@ impl_api_event_type!(
|
||||
DisputeFiltersResponse,
|
||||
GetDisputeMetricRequest,
|
||||
OrganizationResponse,
|
||||
OrganizationRequest,
|
||||
OrganizationCreateRequest,
|
||||
OrganizationUpdateRequest,
|
||||
OrganizationId,
|
||||
CustomerListRequest
|
||||
)
|
||||
|
||||
@ -20,7 +20,18 @@ pub struct OrganizationId {
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, ToSchema)]
|
||||
pub struct OrganizationRequest {
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct OrganizationCreateRequest {
|
||||
pub organization_name: String,
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub organization_details: Option<pii::SecretSerdeValue>,
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, ToSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct OrganizationUpdateRequest {
|
||||
pub organization_name: Option<String>,
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub organization_details: Option<pii::SecretSerdeValue>,
|
||||
|
||||
Reference in New Issue
Block a user