Class: Spree::Webhooks::Event

Inherits:
Base
  • Object
show all
Defined in:
app/models/spree/webhooks/event.rb

Instance Method Summary collapse

Instance Method Details

#signature_for(payload) ⇒ String

Computes the base64-encoded HMAC SHA256 signature of the event for the given payload.

Parameters:

  • payload (Hash, String)

    The payload for to the webhook subscriber.

Returns:



15
16
17
# File 'app/models/spree/webhooks/event.rb', line 15

def signature_for(payload)
  EventSignature.new(self, payload).computed_signature
end