feat(router): Better UI payment link and order details product image and merchant config support (#2583)

Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in>
Co-authored-by: Kashif <46213975+kashif-m@users.noreply.github.com>
Co-authored-by: Kashif <mohammed.kashif@juspay.in>
Co-authored-by: Bernard Eugine <114725419+bernard-eugine@users.noreply.github.com>
Co-authored-by: Kashif <kashif@protonmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Sahkal Poddar
2023-10-17 14:40:45 +05:30
committed by GitHub
parent 3807601ee1
commit fdd9580012
19 changed files with 469 additions and 205 deletions

View File

@ -95,6 +95,8 @@ pub struct MerchantAccountCreate {
/// The id of the organization to which the merchant belongs to
pub organization_id: Option<String>,
pub payment_link_config: Option<PaymentLinkConfig>,
}
#[derive(Clone, Debug, Deserialize, Serialize, ToSchema)]
@ -184,6 +186,8 @@ pub struct MerchantAccountUpdate {
/// To unset this field, pass an empty string
#[schema(max_length = 64)]
pub default_profile: Option<String>,
pub payment_link_config: Option<serde_json::Value>,
}
#[derive(Clone, Debug, ToSchema, Serialize)]
@ -277,6 +281,8 @@ pub struct MerchantAccountResponse {
/// A enum value to indicate the status of recon service. By default it is not_requested.
#[schema(value_type = ReconStatus, example = "not_requested")]
pub recon_status: enums::ReconStatus,
pub payment_link_config: Option<serde_json::Value>,
}
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
@ -497,6 +503,22 @@ pub struct PrimaryBusinessDetails {
pub business: String,
}
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize, PartialEq)]
#[serde(deny_unknown_fields)]
pub struct PaymentLinkConfig {
pub merchant_logo: Option<String>,
pub color_scheme: Option<PaymentLinkColorSchema>,
}
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize, PartialEq)]
#[serde(deny_unknown_fields)]
pub struct PaymentLinkColorSchema {
pub primary_color: Option<String>,
pub primary_accent_color: Option<String>,
pub secondary_color: Option<String>,
}
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
#[serde(deny_unknown_fields)]
pub struct WebhookDetails {