mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
refactor(openapi): move openapi to separate crate to decrease compile times (#3110)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sai Harsha Vardhan <56996463+sai-harsha-vardhan@users.noreply.github.com> Co-authored-by: Sahkal Poddar <sahkalplanet@gmail.com> Co-authored-by: Amisha Prabhat <55580080+Aprabhat19@users.noreply.github.com> Co-authored-by: Sarthak Soni <76486416+Sarthak1799@users.noreply.github.com> Co-authored-by: shashank_attarde <shashank.attarde@juspay.in> Co-authored-by: Aprabhat19 <amishaprabhat@gmail.com> Co-authored-by: sai-harsha-vardhan <harsha111hero@gmail.com> Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in> Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
@ -32,7 +32,7 @@ pub struct MerchantAccountCreate {
|
||||
#[schema(value_type= Option<String>,example = "NewAge Retailer")]
|
||||
pub merchant_name: Option<Secret<String>>,
|
||||
|
||||
/// Merchant related details
|
||||
/// Details about the merchant
|
||||
pub merchant_details: Option<MerchantDetails>,
|
||||
|
||||
/// The URL to redirect after the completion of the operation
|
||||
@ -43,7 +43,8 @@ pub struct MerchantAccountCreate {
|
||||
pub webhook_details: Option<WebhookDetails>,
|
||||
|
||||
/// The routing algorithm to be used for routing payments to desired connectors
|
||||
#[schema(value_type = Option<Object>,example = json!({"type": "single", "data": "stripe"}))]
|
||||
#[serde(skip)]
|
||||
#[schema(deprecated)]
|
||||
pub routing_algorithm: Option<serde_json::Value>,
|
||||
|
||||
/// The routing algorithm to be used for routing payouts to desired connectors
|
||||
@ -67,8 +68,7 @@ pub struct MerchantAccountCreate {
|
||||
#[schema(default = false, example = true)]
|
||||
pub enable_payment_response_hash: Option<bool>,
|
||||
|
||||
/// Refers to the hash key used for calculating the signature for webhooks and redirect response
|
||||
/// If the value is not provided, a default value is used
|
||||
/// Refers to the hash key used for calculating the signature for webhooks and redirect response. If the value is not provided, a default value is used.
|
||||
pub payment_response_hash_key: Option<String>,
|
||||
|
||||
/// A boolean value to indicate if redirect to merchant with http post needs to be enabled
|
||||
@ -87,7 +87,7 @@ pub struct MerchantAccountCreate {
|
||||
#[schema(example = "locker_abc123")]
|
||||
pub locker_id: Option<String>,
|
||||
|
||||
///Default business details for connector routing
|
||||
/// Details about the primary business unit of the merchant account
|
||||
#[schema(value_type = Option<PrimaryBusinessDetails>)]
|
||||
pub primary_business_details: Option<Vec<PrimaryBusinessDetails>>,
|
||||
|
||||
@ -117,7 +117,7 @@ pub struct MerchantAccountUpdate {
|
||||
#[schema(example = "NewAge Retailer")]
|
||||
pub merchant_name: Option<String>,
|
||||
|
||||
/// Merchant related details
|
||||
/// Details about the merchant
|
||||
pub merchant_details: Option<MerchantDetails>,
|
||||
|
||||
/// The URL to redirect after the completion of the operation
|
||||
@ -128,10 +128,11 @@ pub struct MerchantAccountUpdate {
|
||||
pub webhook_details: Option<WebhookDetails>,
|
||||
|
||||
/// The routing algorithm to be used for routing payments to desired connectors
|
||||
#[schema(value_type = Option<Object>,example = json!({"type": "single", "data": "stripe"}))]
|
||||
#[serde(skip)]
|
||||
#[schema(deprecated)]
|
||||
pub routing_algorithm: Option<serde_json::Value>,
|
||||
|
||||
/// The routing algorithm to be used for routing payouts to desired connectors
|
||||
/// The routing algorithm to be used to process the incoming request from merchant to outgoing payment processor or payment method. The default is 'Custom'
|
||||
#[cfg(feature = "payouts")]
|
||||
#[schema(value_type = Option<RoutingAlgorithm>,example = json!({"type": "single", "data": "wise"}))]
|
||||
#[serde(
|
||||
@ -152,7 +153,7 @@ pub struct MerchantAccountUpdate {
|
||||
#[schema(default = false, example = true)]
|
||||
pub enable_payment_response_hash: Option<bool>,
|
||||
|
||||
/// Refers to the hash key used for payment response
|
||||
/// Refers to the hash key used for calculating the signature for webhooks and redirect response. If the value is not provided, a default value is used.
|
||||
pub payment_response_hash_key: Option<String>,
|
||||
|
||||
/// A boolean value to indicate if redirect to merchant with http post needs to be enabled
|
||||
@ -171,7 +172,7 @@ pub struct MerchantAccountUpdate {
|
||||
#[schema(example = "locker_abc123")]
|
||||
pub locker_id: Option<String>,
|
||||
|
||||
///Default business details for connector routing
|
||||
/// Details about the primary business unit of the merchant account
|
||||
pub primary_business_details: Option<Vec<PrimaryBusinessDetails>>,
|
||||
|
||||
/// The frm routing algorithm to be used for routing payments to desired FRM's
|
||||
@ -202,7 +203,7 @@ pub struct MerchantAccountResponse {
|
||||
#[schema(default = false, example = true)]
|
||||
pub enable_payment_response_hash: bool,
|
||||
|
||||
/// Refers to the Parent Merchant ID if the merchant being created is a sub-merchant
|
||||
/// Refers to the hash key used for calculating the signature for webhooks and redirect response. If the value is not provided, a default value is used.
|
||||
#[schema(max_length = 255, example = "xkkdf909012sdjki2dkh5sdf")]
|
||||
pub payment_response_hash_key: Option<String>,
|
||||
|
||||
@ -210,7 +211,7 @@ pub struct MerchantAccountResponse {
|
||||
#[schema(default = false, example = true)]
|
||||
pub redirect_to_merchant_with_http_post: bool,
|
||||
|
||||
/// Merchant related details
|
||||
/// Details about the merchant
|
||||
#[schema(value_type = Option<MerchantDetails>)]
|
||||
pub merchant_details: Option<Encryptable<pii::SecretSerdeValue>>,
|
||||
|
||||
@ -219,10 +220,11 @@ pub struct MerchantAccountResponse {
|
||||
pub webhook_details: Option<serde_json::Value>,
|
||||
|
||||
/// The routing algorithm to be used to process the incoming request from merchant to outgoing payment processor or payment method. The default is 'Custom'
|
||||
#[schema(value_type = Option<RoutingAlgorithm>, max_length = 255, example = "custom")]
|
||||
#[serde(skip)]
|
||||
#[schema(deprecated)]
|
||||
pub routing_algorithm: Option<serde_json::Value>,
|
||||
|
||||
/// The routing algorithm to be used for routing payouts to desired connectors
|
||||
/// The routing algorithm to be used to process the incoming request from merchant to outgoing payment processor or payment method. The default is 'Custom'
|
||||
#[cfg(feature = "payouts")]
|
||||
#[schema(value_type = Option<RoutingAlgorithm>,example = json!({"type": "single", "data": "wise"}))]
|
||||
#[serde(
|
||||
@ -250,7 +252,8 @@ pub struct MerchantAccountResponse {
|
||||
/// An identifier for the vault used to store payment method information.
|
||||
#[schema(example = "locker_abc123")]
|
||||
pub locker_id: Option<String>,
|
||||
///Default business details for connector routing
|
||||
|
||||
/// Details about the primary business unit of the merchant account
|
||||
#[schema(value_type = Vec<PrimaryBusinessDetails>)]
|
||||
pub primary_business_details: Vec<PrimaryBusinessDetails>,
|
||||
|
||||
@ -272,7 +275,7 @@ pub struct MerchantAccountResponse {
|
||||
#[schema(max_length = 64)]
|
||||
pub default_profile: Option<String>,
|
||||
|
||||
/// A enum value to indicate the status of recon service. By default it is not_requested.
|
||||
/// Used to indicate the status of the recon module for a merchant account
|
||||
#[schema(value_type = ReconStatus, example = "not_requested")]
|
||||
pub recon_status: enums::ReconStatus,
|
||||
}
|
||||
@ -508,23 +511,18 @@ pub struct MerchantConnectorCreate {
|
||||
/// Name of the Connector
|
||||
#[schema(value_type = Connector, example = "stripe")]
|
||||
pub connector_name: api_enums::Connector,
|
||||
/// Connector label for a connector, this can serve as a field to identify the connector as per business details
|
||||
/// 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`
|
||||
#[schema(example = "stripe_US_travel")]
|
||||
pub connector_label: Option<String>,
|
||||
|
||||
/// Unique ID of the connector
|
||||
#[schema(example = "mca_5apGeP94tMts6rg3U3kR")]
|
||||
pub merchant_connector_id: Option<String>,
|
||||
/// Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>,example = json!({ "auth_type": "HeaderKey","api_key": "Basic MyVerySecretApiKey" }))]
|
||||
/// Identifier for the business profile, if not provided default will be chosen from merchant account
|
||||
pub profile_id: Option<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" }))]
|
||||
pub connector_account_details: Option<pii::SecretSerdeValue>,
|
||||
/// A boolean value to indicate if the connector is in Test mode. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub test_mode: Option<bool>,
|
||||
/// A boolean value to indicate if the connector is disabled. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub disabled: Option<bool>,
|
||||
/// Refers to the Parent Merchant ID if the merchant being created is a sub-merchant
|
||||
|
||||
/// An object containing the details about the payment methods that need to be enabled under this merchant connector account
|
||||
#[schema(example = json!([
|
||||
{
|
||||
"payment_method": "wallet",
|
||||
@ -555,21 +553,6 @@ pub struct MerchantConnectorCreate {
|
||||
}
|
||||
]))]
|
||||
pub payment_methods_enabled: Option<Vec<PaymentMethodsEnabled>>,
|
||||
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>,max_length = 255,example = json!({ "city": "NY", "unit": "245" }))]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
/// contains the frm configs for the merchant connector
|
||||
#[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
|
||||
pub frm_configs: Option<Vec<FrmConfigs>>,
|
||||
|
||||
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
|
||||
pub business_country: Option<api_enums::CountryAlpha2>,
|
||||
|
||||
pub business_label: Option<String>,
|
||||
|
||||
/// Business Sub label of the merchant
|
||||
#[schema(example = "chase")]
|
||||
pub business_sub_label: Option<String>,
|
||||
|
||||
/// Webhook details of this merchant connector
|
||||
#[schema(example = json!({
|
||||
@ -578,12 +561,41 @@ pub struct MerchantConnectorCreate {
|
||||
}
|
||||
}))]
|
||||
pub connector_webhook_details: Option<MerchantConnectorWebhookDetails>,
|
||||
/// Identifier for the business profile, if not provided default will be chosen from merchant account
|
||||
pub profile_id: Option<String>,
|
||||
|
||||
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>,max_length = 255,example = json!({ "city": "NY", "unit": "245" }))]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// A boolean value to indicate if the connector is in Test mode. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub test_mode: Option<bool>,
|
||||
|
||||
/// A boolean value to indicate if the connector is disabled. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub disabled: Option<bool>,
|
||||
|
||||
/// Contains the frm configs for the merchant connector
|
||||
#[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
|
||||
pub frm_configs: Option<Vec<FrmConfigs>>,
|
||||
|
||||
/// The business country to which the connector account is attached. To be deprecated soon. Use the 'profile_id' instead
|
||||
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
|
||||
pub business_country: Option<api_enums::CountryAlpha2>,
|
||||
|
||||
/// The business label to which the connector account is attached. To be deprecated soon. Use the 'profile_id' instead
|
||||
pub business_label: Option<String>,
|
||||
|
||||
/// The business sublabel to which the connector account is attached. To be deprecated soon. Use the 'profile_id' instead
|
||||
#[schema(example = "chase")]
|
||||
pub business_sub_label: Option<String>,
|
||||
|
||||
/// Unique ID of the connector
|
||||
#[schema(example = "mca_5apGeP94tMts6rg3U3kR")]
|
||||
pub merchant_connector_id: Option<String>,
|
||||
|
||||
pub pm_auth_config: Option<serde_json::Value>,
|
||||
|
||||
#[schema(value_type = ConnectorStatus, example = "inactive")]
|
||||
#[schema(value_type = Option<ConnectorStatus>, example = "inactive")]
|
||||
pub status: Option<api_enums::ConnectorStatus>,
|
||||
}
|
||||
|
||||
@ -634,26 +646,26 @@ pub struct MerchantConnectorResponse {
|
||||
#[schema(value_type = ConnectorType, example = "payment_processor")]
|
||||
pub connector_type: api_enums::ConnectorType,
|
||||
/// Name of the Connector
|
||||
#[schema(example = "stripe")]
|
||||
#[schema(value_type = Connector, example = "stripe")]
|
||||
pub connector_name: String,
|
||||
|
||||
/// Connector label for a connector, this can serve as a field to identify the connector as per business details
|
||||
/// A unique label to identify the connector account created under a business profile
|
||||
#[schema(example = "stripe_US_travel")]
|
||||
pub connector_label: Option<String>,
|
||||
|
||||
/// Unique ID of the connector
|
||||
/// Unique ID of the merchant connector account
|
||||
#[schema(example = "mca_5apGeP94tMts6rg3U3kR")]
|
||||
pub merchant_connector_id: String,
|
||||
/// Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>,example = json!({ "auth_type": "HeaderKey","api_key": "Basic MyVerySecretApiKey" }))]
|
||||
|
||||
/// Identifier for the business profile, if not provided default will be chosen from merchant account
|
||||
#[schema(max_length = 64)]
|
||||
pub profile_id: Option<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" }))]
|
||||
pub connector_account_details: pii::SecretSerdeValue,
|
||||
/// A boolean value to indicate if the connector is in Test mode. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub test_mode: Option<bool>,
|
||||
/// A boolean value to indicate if the connector is disabled. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub disabled: Option<bool>,
|
||||
/// Refers to the Parent Merchant ID if the merchant being created is a sub-merchant
|
||||
|
||||
/// An object containing the details about the payment methods that need to be enabled under this merchant connector account
|
||||
#[schema(example = json!([
|
||||
{
|
||||
"payment_method": "wallet",
|
||||
@ -684,25 +696,6 @@ pub struct MerchantConnectorResponse {
|
||||
}
|
||||
]))]
|
||||
pub payment_methods_enabled: Option<Vec<PaymentMethodsEnabled>>,
|
||||
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>,max_length = 255,example = json!({ "city": "NY", "unit": "245" }))]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// Business Country of the connector
|
||||
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
|
||||
pub business_country: Option<api_enums::CountryAlpha2>,
|
||||
|
||||
///Business Type of the merchant
|
||||
#[schema(example = "travel")]
|
||||
pub business_label: Option<String>,
|
||||
|
||||
/// Business Sub label of the merchant
|
||||
#[schema(example = "chase")]
|
||||
pub business_sub_label: Option<String>,
|
||||
|
||||
/// contains the frm configs for the merchant connector
|
||||
#[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
|
||||
pub frm_configs: Option<Vec<FrmConfigs>>,
|
||||
|
||||
/// Webhook details of this merchant connector
|
||||
#[schema(example = json!({
|
||||
@ -712,10 +705,34 @@ pub struct MerchantConnectorResponse {
|
||||
}))]
|
||||
pub connector_webhook_details: Option<MerchantConnectorWebhookDetails>,
|
||||
|
||||
/// The business profile this connector must be created in
|
||||
/// default value from merchant account is taken if not passed
|
||||
#[schema(max_length = 64)]
|
||||
pub profile_id: Option<String>,
|
||||
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>,max_length = 255,example = json!({ "city": "NY", "unit": "245" }))]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// A boolean value to indicate if the connector is in Test mode. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub test_mode: Option<bool>,
|
||||
|
||||
/// A boolean value to indicate if the connector is disabled. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub disabled: Option<bool>,
|
||||
|
||||
/// Contains the frm configs for the merchant connector
|
||||
#[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
|
||||
pub frm_configs: Option<Vec<FrmConfigs>>,
|
||||
|
||||
/// The business country to which the connector account is attached. To be deprecated soon. Use the 'profile_id' instead
|
||||
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
|
||||
pub business_country: Option<api_enums::CountryAlpha2>,
|
||||
|
||||
///The business label to which the connector account is attached. To be deprecated soon. Use the 'profile_id' instead
|
||||
#[schema(example = "travel")]
|
||||
pub business_label: Option<String>,
|
||||
|
||||
/// The business sublabel to which the connector account is attached. To be deprecated soon. Use the 'profile_id' instead
|
||||
#[schema(example = "chase")]
|
||||
pub business_sub_label: Option<String>,
|
||||
|
||||
/// identifier for the verified domains of a particular connector account
|
||||
pub applepay_verified_domains: Option<Vec<String>>,
|
||||
|
||||
@ -733,22 +750,15 @@ pub struct MerchantConnectorUpdate {
|
||||
#[schema(value_type = ConnectorType, example = "payment_processor")]
|
||||
pub connector_type: api_enums::ConnectorType,
|
||||
|
||||
/// Connector label for a connector, this can serve as a field to identify the connector as per business details
|
||||
/// 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`
|
||||
#[schema(example = "stripe_US_travel")]
|
||||
pub connector_label: Option<String>,
|
||||
|
||||
/// Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>,example = json!({ "auth_type": "HeaderKey","api_key": "Basic MyVerySecretApiKey" }))]
|
||||
/// 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" }))]
|
||||
pub connector_account_details: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// A boolean value to indicate if the connector is in Test mode. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub test_mode: Option<bool>,
|
||||
|
||||
/// A boolean value to indicate if the connector is disabled. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub disabled: Option<bool>,
|
||||
|
||||
/// Refers to the Parent Merchant ID if the merchant being created is a sub-merchant
|
||||
/// An object containing the details about the payment methods that need to be enabled under this merchant connector account
|
||||
#[schema(example = json!([
|
||||
{
|
||||
"payment_method": "wallet",
|
||||
@ -780,14 +790,6 @@ pub struct MerchantConnectorUpdate {
|
||||
]))]
|
||||
pub payment_methods_enabled: Option<Vec<PaymentMethodsEnabled>>,
|
||||
|
||||
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>,max_length = 255,example = json!({ "city": "NY", "unit": "245" }))]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// contains the frm configs for the merchant connector
|
||||
#[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
|
||||
pub frm_configs: Option<Vec<FrmConfigs>>,
|
||||
|
||||
/// Webhook details of this merchant connector
|
||||
#[schema(example = json!({
|
||||
"connector_webhook_details": {
|
||||
@ -796,6 +798,22 @@ pub struct MerchantConnectorUpdate {
|
||||
}))]
|
||||
pub connector_webhook_details: Option<MerchantConnectorWebhookDetails>,
|
||||
|
||||
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>,max_length = 255,example = json!({ "city": "NY", "unit": "245" }))]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// A boolean value to indicate if the connector is in Test mode. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub test_mode: Option<bool>,
|
||||
|
||||
/// A boolean value to indicate if the connector is disabled. By default, its value is false.
|
||||
#[schema(default = false, example = false)]
|
||||
pub disabled: Option<bool>,
|
||||
|
||||
/// Contains the frm configs for the merchant connector
|
||||
#[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
|
||||
pub frm_configs: Option<Vec<FrmConfigs>>,
|
||||
|
||||
pub pm_auth_config: Option<serde_json::Value>,
|
||||
|
||||
#[schema(value_type = ConnectorStatus, example = "inactive")]
|
||||
@ -876,6 +894,7 @@ pub enum AcceptedCurrencies {
|
||||
content = "list",
|
||||
rename_all = "snake_case"
|
||||
)]
|
||||
/// Object to filter the customer countries for which the payment method is displayed
|
||||
pub enum AcceptedCountries {
|
||||
#[schema(value_type = Vec<CountryAlpha2>)]
|
||||
EnableOnly(Vec<api_enums::CountryAlpha2>),
|
||||
@ -961,12 +980,11 @@ pub enum PayoutStraightThroughAlgorithm {
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Default, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct BusinessProfileCreate {
|
||||
/// A short name to identify the business profile
|
||||
/// The name of business profile
|
||||
#[schema(max_length = 64)]
|
||||
pub profile_name: Option<String>,
|
||||
|
||||
/// The URL to redirect after the completion of the operation, This will be applied to all the
|
||||
/// connector accounts under this profile
|
||||
/// The URL to redirect after the completion of the operation
|
||||
#[schema(value_type = Option<String>, max_length = 255, example = "https://www.example.com/success")]
|
||||
pub return_url: Option<url::Url>,
|
||||
|
||||
@ -974,8 +992,7 @@ pub struct BusinessProfileCreate {
|
||||
#[schema(default = true, example = true)]
|
||||
pub enable_payment_response_hash: Option<bool>,
|
||||
|
||||
/// Refers to the hash key used for calculating the signature for webhooks and redirect response
|
||||
/// If the value is not provided, a default value is used
|
||||
/// Refers to the hash key used for calculating the signature for webhooks and redirect response. If the value is not provided, a default value is used.
|
||||
pub payment_response_hash_key: Option<String>,
|
||||
|
||||
/// A boolean value to indicate if redirect to merchant with http post needs to be enabled
|
||||
@ -1002,7 +1019,7 @@ pub struct BusinessProfileCreate {
|
||||
#[schema(value_type = Option<Object>,example = json!({"type": "single", "data": "signifyd"}))]
|
||||
pub frm_routing_algorithm: Option<serde_json::Value>,
|
||||
|
||||
/// The routing algorithm to be used for routing payouts to desired connectors
|
||||
/// The routing algorithm to be used to process the incoming request from merchant to outgoing payment processor or payment method. The default is 'Custom'
|
||||
#[cfg(feature = "payouts")]
|
||||
#[schema(value_type = Option<RoutingAlgorithm>,example = json!({"type": "single", "data": "wise"}))]
|
||||
#[serde(
|
||||
@ -1028,16 +1045,15 @@ pub struct BusinessProfileResponse {
|
||||
#[schema(max_length = 64, example = "y3oqhf46pyzuxjbcn2giaqnb44")]
|
||||
pub merchant_id: String,
|
||||
|
||||
/// The unique identifier for Business Profile
|
||||
/// The default business profile that must be used for creating merchant accounts and payments
|
||||
#[schema(max_length = 64, example = "pro_abcdefghijklmnopqrstuvwxyz")]
|
||||
pub profile_id: String,
|
||||
|
||||
/// A short name to identify the business profile
|
||||
/// Name of the business profile
|
||||
#[schema(max_length = 64)]
|
||||
pub profile_name: String,
|
||||
|
||||
/// The URL to redirect after the completion of the operation, This will be applied to all the
|
||||
/// connector accounts under this profile
|
||||
/// The URL to redirect after the completion of the operation
|
||||
#[schema(value_type = Option<String>, max_length = 255, example = "https://www.example.com/success")]
|
||||
pub return_url: Option<String>,
|
||||
|
||||
@ -1045,8 +1061,7 @@ pub struct BusinessProfileResponse {
|
||||
#[schema(default = true, example = true)]
|
||||
pub enable_payment_response_hash: bool,
|
||||
|
||||
/// Refers to the hash key used for calculating the signature for webhooks and redirect response
|
||||
/// If the value is not provided, a default value is used
|
||||
/// Refers to the hash key used for calculating the signature for webhooks and redirect response. If the value is not provided, a default value is used.
|
||||
pub payment_response_hash_key: Option<String>,
|
||||
|
||||
/// A boolean value to indicate if redirect to merchant with http post needs to be enabled
|
||||
@ -1054,6 +1069,7 @@ pub struct BusinessProfileResponse {
|
||||
pub redirect_to_merchant_with_http_post: bool,
|
||||
|
||||
/// Webhook related details
|
||||
#[schema(value_type = Option<WebhookDetails>)]
|
||||
pub webhook_details: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
|
||||
@ -1069,11 +1085,11 @@ pub struct BusinessProfileResponse {
|
||||
#[schema(example = 900)]
|
||||
pub intent_fulfillment_time: Option<i64>,
|
||||
|
||||
/// The frm routing algorithm to be used for routing payments to desired FRM's
|
||||
/// The routing algorithm to be used to process the incoming request from merchant to outgoing payment processor or payment method. The default is 'Custom'
|
||||
#[schema(value_type = Option<Object>,example = json!({"type": "single", "data": "signifyd"}))]
|
||||
pub frm_routing_algorithm: Option<serde_json::Value>,
|
||||
|
||||
/// The routing algorithm to be used for routing payouts to desired connectors
|
||||
/// The routing algorithm to be used to process the incoming request from merchant to outgoing payment processor or payment method. The default is 'Custom'
|
||||
#[cfg(feature = "payouts")]
|
||||
#[schema(value_type = Option<RoutingAlgorithm>,example = json!({"type": "single", "data": "wise"}))]
|
||||
#[serde(
|
||||
@ -1096,12 +1112,11 @@ pub struct BusinessProfileResponse {
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct BusinessProfileUpdate {
|
||||
/// A short name to identify the business profile
|
||||
/// The name of business profile
|
||||
#[schema(max_length = 64)]
|
||||
pub profile_name: Option<String>,
|
||||
|
||||
/// The URL to redirect after the completion of the operation, This will be applied to all the
|
||||
/// connector accounts under this profile
|
||||
/// The URL to redirect after the completion of the operation
|
||||
#[schema(value_type = Option<String>, max_length = 255, example = "https://www.example.com/success")]
|
||||
pub return_url: Option<url::Url>,
|
||||
|
||||
@ -1109,8 +1124,7 @@ pub struct BusinessProfileUpdate {
|
||||
#[schema(default = true, example = true)]
|
||||
pub enable_payment_response_hash: Option<bool>,
|
||||
|
||||
/// Refers to the hash key used for calculating the signature for webhooks and redirect response
|
||||
/// If the value is not provided, a default value is used
|
||||
/// Refers to the hash key used for calculating the signature for webhooks and redirect response. If the value is not provided, a default value is used.
|
||||
pub payment_response_hash_key: Option<String>,
|
||||
|
||||
/// A boolean value to indicate if redirect to merchant with http post needs to be enabled
|
||||
@ -1137,7 +1151,7 @@ pub struct BusinessProfileUpdate {
|
||||
#[schema(value_type = Option<Object>,example = json!({"type": "single", "data": "signifyd"}))]
|
||||
pub frm_routing_algorithm: Option<serde_json::Value>,
|
||||
|
||||
/// The routing algorithm to be used for routing payouts to desired connectors
|
||||
/// The routing algorithm to be used to process the incoming request from merchant to outgoing payment processor or payment method. The default is 'Custom'
|
||||
#[cfg(feature = "payouts")]
|
||||
#[schema(value_type = Option<RoutingAlgorithm>,example = json!({"type": "single", "data": "wise"}))]
|
||||
#[serde(
|
||||
|
||||
Reference in New Issue
Block a user