nominal-api 0.1240.0

API bindings for the Nominal platform
Documentation
/// Advanced webhook integration with HMAC signing, custom headers, and configurable defaults.
///
/// Server-side validation enforces:
/// - URL must use HTTPS protocol
/// - customHeaders blocklist (see customHeaders field documentation)
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct SecureWebhookIntegration {
    #[builder(into)]
    #[serde(rename = "url")]
    url: String,
    #[builder(default, map(key(type = String, into), value(type = String, into)))]
    #[serde(
        rename = "customHeaders",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    custom_headers: std::collections::BTreeMap<String, String>,
    #[builder(custom(type = super::WebhookDeliveryConfig, convert = Box::new))]
    #[serde(rename = "deliveryConfig")]
    delivery_config: Box<super::WebhookDeliveryConfig>,
}
impl SecureWebhookIntegration {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        url: impl Into<String>,
        delivery_config: super::WebhookDeliveryConfig,
    ) -> Self {
        Self::builder().url(url).delivery_config(delivery_config).build()
    }
    /// Webhook URL (must be HTTPS)
    #[inline]
    pub fn url(&self) -> &str {
        &*self.url
    }
    /// Additional HTTP headers to include in all webhook requests.
    /// Server-side validation rejects security-sensitive headers to prevent credential leakage:
    /// Authorization, Cookie, X-API-Key, X-Auth-Token, Proxy-Authorization, and any header starting with X-Nominal-.
    /// Validation returns clear error messages for blocked headers.
    #[inline]
    pub fn custom_headers(&self) -> &std::collections::BTreeMap<String, String> {
        &self.custom_headers
    }
    /// Retry and timeout configuration for webhook delivery attempts
    #[inline]
    pub fn delivery_config(&self) -> &super::WebhookDeliveryConfig {
        &*self.delivery_config
    }
}