refactor(router): add api_version and make profile_id mandatory in mca v2 (#5602)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sai Harsha Vardhan
2024-08-14 20:49:26 +05:30
committed by GitHub
parent 19a9180925
commit 56791c2743
25 changed files with 108 additions and 130 deletions

View File

@ -691,12 +691,12 @@ pub struct MerchantConnectorCreate {
/// Name of the Connector
#[schema(value_type = Connector, example = "stripe")]
pub connector_name: api_enums::Connector,
/// This is an unique label you can generate and pass in order to identify this connector account on your Hyperswitch dashboard and reports. Eg: if your profile label is `default`, connector label can be `stripe_default`
/// This is an unique label you can generate and pass in order to identify this connector account on your Hyperswitch dashboard and reports, If not passed then if will take `connector_name`_`profile_name`. Eg: if your profile label is `default`, connector label can be `stripe_default`
#[schema(example = "stripe_US_travel")]
pub connector_label: Option<String>,
/// Identifier for the business profile, if not provided default will be chosen from merchant account
pub profile_id: Option<String>,
pub profile_id: String,
/// An object containing the required details/credentials for a Connector account.
#[schema(value_type = Option<MerchantConnectorDetails>,example = json!({ "auth_type": "HeaderKey","api_key": "Basic MyVerySecretApiKey" }))]
@ -1061,7 +1061,7 @@ pub struct MerchantConnectorResponse {
/// Identifier for the business profile, if not provided default will be chosen from merchant account
#[schema(max_length = 64)]
pub profile_id: Option<String>,
pub profile_id: String,
/// An object containing the required details/credentials for a Connector account.
#[schema(value_type = Option<MerchantConnectorDetails>,example = json!({ "auth_type": "HeaderKey","api_key": "Basic MyVerySecretApiKey" }))]
@ -1168,7 +1168,7 @@ pub struct MerchantConnectorResponse {
/// Identifier for the business profile, if not provided default will be chosen from merchant account
#[schema(max_length = 64)]
pub profile_id: Option<String>,
pub profile_id: String,
/// An object containing the required details/credentials for a Connector account.
#[schema(value_type = Option<MerchantConnectorDetails>,example = json!({ "auth_type": "HeaderKey","api_key": "Basic MyVerySecretApiKey" }))]
@ -1292,7 +1292,7 @@ pub struct MerchantConnectorListResponse {
/// Identifier for the business profile, if not provided default will be chosen from merchant account
#[schema(max_length = 64)]
pub profile_id: Option<String>,
pub profile_id: String,
/// An object containing the details about the payment methods that need to be enabled under this merchant connector account
#[schema(example = json!([
@ -1401,7 +1401,7 @@ pub struct MerchantConnectorListResponse {
/// Identifier for the business profile, if not provided default will be chosen from merchant account
#[schema(max_length = 64)]
pub profile_id: Option<String>,
pub profile_id: String,
/// An object containing the details about the payment methods that need to be enabled under this merchant connector account
#[schema(example = json!([
@ -1563,7 +1563,7 @@ pub struct MerchantConnectorUpdate {
#[schema(value_type = ConnectorType, example = "payment_processor")]
pub connector_type: api_enums::ConnectorType,
/// This is an unique label you can generate and pass in order to identify this connector account on your Hyperswitch dashboard and reports. Eg: if your profile label is `default`, connector label can be `stripe_default`
/// This is an unique label you can generate and pass in order to identify this connector account on your Hyperswitch dashboard and reports, If not passed then if will take `connector_name`_`profile_name`. Eg: if your profile label is `default`, connector label can be `stripe_default`
#[schema(example = "stripe_US_travel")]
pub connector_label: Option<String>,