pub struct WebhookSubscriptionUpdateRequest {
pub description: Option<Description>,
pub event_types: Vec<String>,
pub is_enabled: bool,
pub labels: HashMap<String, String>,
pub metadata: Option<Metadata>,
pub target: WebhookTarget,
}Expand description
Request to update an existing webhook subscription.
JSON schema
{
"description": "Request to update an existing webhook subscription.\n",
"type": "object",
"required": [
"eventTypes",
"isEnabled",
"target"
],
"properties": {
"description": {
"description": "Description of the webhook subscription.",
"examples": [
"Updated subscription for token transfer events"
],
"allOf": [
{
"$ref": "#/components/schemas/Description"
}
]
},
"eventTypes": {
"description": "Types of events to subscribe to. Event types follow a three-part dot-separated format:\nservice.resource.verb (e.g., \"onchain.activity.detected\", \"wallet.activity.detected\", \"onramp.transaction.created\").\n",
"examples": [
[
"onchain.activity.detected"
]
],
"type": "array",
"items": {
"type": "string"
}
},
"isEnabled": {
"description": "Whether the subscription is enabled.",
"examples": [
false
],
"type": "boolean"
},
"labels": {
"description": "Optional. Multi-label filters that trigger only when an event contains ALL of these key-value pairs.\n\n**Note:** Currently, labels are supported for onchain webhooks only.\n\nSee [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).\nOmit to receive all events for the selected event types.\n",
"examples": [
{
"contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"event_name": "Transfer",
"network": "base-mainnet"
}
],
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
},
"target": {
"$ref": "#/components/schemas/WebhookTarget"
}
}
}Fields§
§description: Option<Description>Description of the webhook subscription.
event_types: Vec<String>Types of events to subscribe to. Event types follow a three-part dot-separated format: service.resource.verb (e.g., “onchain.activity.detected”, “wallet.activity.detected”, “onramp.transaction.created”).
is_enabled: boolWhether the subscription is enabled.
labels: HashMap<String, String>Optional. Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
**Note:** Currently, labels are supported for onchain webhooks only.
See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
Omit to receive all events for the selected event types.metadata: Option<Metadata>§target: WebhookTargetImplementations§
Trait Implementations§
Source§impl Clone for WebhookSubscriptionUpdateRequest
impl Clone for WebhookSubscriptionUpdateRequest
Source§fn clone(&self) -> WebhookSubscriptionUpdateRequest
fn clone(&self) -> WebhookSubscriptionUpdateRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for WebhookSubscriptionUpdateRequest
impl<'de> Deserialize<'de> for WebhookSubscriptionUpdateRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&WebhookSubscriptionUpdateRequest> for WebhookSubscriptionUpdateRequest
impl From<&WebhookSubscriptionUpdateRequest> for WebhookSubscriptionUpdateRequest
Source§fn from(value: &WebhookSubscriptionUpdateRequest) -> Self
fn from(value: &WebhookSubscriptionUpdateRequest) -> Self
Converts to this type from the input type.
Source§impl From<WebhookSubscriptionUpdateRequest> for WebhookSubscriptionUpdateRequest
impl From<WebhookSubscriptionUpdateRequest> for WebhookSubscriptionUpdateRequest
Source§fn from(value: WebhookSubscriptionUpdateRequest) -> Self
fn from(value: WebhookSubscriptionUpdateRequest) -> Self
Converts to this type from the input type.
Source§impl TryFrom<WebhookSubscriptionUpdateRequest> for WebhookSubscriptionUpdateRequest
impl TryFrom<WebhookSubscriptionUpdateRequest> for WebhookSubscriptionUpdateRequest
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
value: WebhookSubscriptionUpdateRequest,
) -> Result<Self, ConversionError>
fn try_from( value: WebhookSubscriptionUpdateRequest, ) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for WebhookSubscriptionUpdateRequest
impl RefUnwindSafe for WebhookSubscriptionUpdateRequest
impl Send for WebhookSubscriptionUpdateRequest
impl Sync for WebhookSubscriptionUpdateRequest
impl Unpin for WebhookSubscriptionUpdateRequest
impl UnsafeUnpin for WebhookSubscriptionUpdateRequest
impl UnwindSafe for WebhookSubscriptionUpdateRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more