Class: Zavudev::Models::SenderWebhook
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Zavudev::Models::SenderWebhook
- Defined in:
- lib/zavudev/models/sender_webhook.rb,
sig/zavudev/models/sender_webhook.rbs
Defined Under Namespace
Modules: SignatureVersion
Instance Attribute Summary collapse
-
#active ⇒ Boolean
Whether the webhook is active.
-
#events ⇒ Array<Symbol, Zavudev::Models::WebhookEvent>
List of events the webhook is subscribed to.
-
#secret ⇒ String?
Webhook secret for signature verification.
-
#signature_version ⇒ Symbol, Zavudev::Models::SenderWebhook::SignatureVersion
Which
X-Zavu-Signaturescheme this receiver is sent. -
#url ⇒ String
HTTPS URL that will receive webhook events.
Instance Method Summary collapse
-
#initialize(active:, events:, signature_version:, url:, secret: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see SenderWebhook for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(active:, events:, signature_version:, url:, secret: nil) ⇒ Object
Some parameter documentations has been truncated, see Zavudev::Models::SenderWebhook for more details.
Webhook configuration for the sender.
|
|
# File 'lib/zavudev/models/sender_webhook.rb', line 50
|
Instance Attribute Details
#active ⇒ Boolean
Whether the webhook is active.
10 |
# File 'lib/zavudev/models/sender_webhook.rb', line 10 required :active, Zavudev::Internal::Type::Boolean |
#events ⇒ Array<Symbol, Zavudev::Models::WebhookEvent>
List of events the webhook is subscribed to.
16 |
# File 'lib/zavudev/models/sender_webhook.rb', line 16 required :events, -> { Zavudev::Internal::Type::ArrayOf[enum: Zavudev::WebhookEvent] } |
#secret ⇒ String?
Webhook secret for signature verification. Only returned on create or regenerate.
48 |
# File 'lib/zavudev/models/sender_webhook.rb', line 48 optional :secret, String |
#signature_version ⇒ Symbol, Zavudev::Models::SenderWebhook::SignatureVersion
Which X-Zavu-Signature scheme this receiver is sent.
v1:v1=HMAC_SHA256(secret, body). The scheme used before this was configurable. Existing webhooks stay on it until you move them.v2:v2=HMAC_SHA256(secret, "{t}.{body}"). The current scheme, and the default for new senders. It signs the timestamp together with the body.v1+v2: both signatures, sharing onet. The migration setting: a receiver reading either one works, so you can deploy and confirm your new verifier before switching over.
Moving from v1 straight to v2 returns 400. Set v1+v2 first. See
https://docs.zavu.dev/guides/receiving-messages/signature-migration
33 34 35 |
# File 'lib/zavudev/models/sender_webhook.rb', line 33 required :signature_version, enum: -> { Zavudev::SenderWebhook::SignatureVersion }, api_name: :signatureVersion |
#url ⇒ String
HTTPS URL that will receive webhook events.
41 |
# File 'lib/zavudev/models/sender_webhook.rb', line 41 required :url, String |
Instance Method Details
#to_hash ⇒ {
33 |
# File 'sig/zavudev/models/sender_webhook.rbs', line 33
def to_hash: -> {
|