Class: FluvPay::Webhooks::Event
- Inherits:
-
Object
- Object
- FluvPay::Webhooks::Event
- Defined in:
- lib/fluvpay/webhooks.rb
Overview
Evento de webhook já verificado e parseado, devolvido por verify_signature.
Instance Attribute Summary collapse
-
#data ⇒ Hash
readonly
Objeto “data” do evento (ou o payload inteiro como fallback).
-
#delivery_id ⇒ String?
readonly
Identificador da entrega (X-FluvPay-Delivery-Id).
-
#raw ⇒ Hash
readonly
Payload completo parseado.
-
#timestamp ⇒ String
readonly
Timestamp cru recebido (X-FluvPay-Timestamp).
-
#type ⇒ String?
readonly
Tipo do evento (ex: “charge.paid”).
Instance Method Summary collapse
-
#initialize(type:, delivery_id:, timestamp:, data:, raw:) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(type:, delivery_id:, timestamp:, data:, raw:) ⇒ Event
Returns a new instance of Event.
45 46 47 48 49 50 51 |
# File 'lib/fluvpay/webhooks.rb', line 45 def initialize(type:, delivery_id:, timestamp:, data:, raw:) @type = type @delivery_id = delivery_id @timestamp = @data = data @raw = raw end |
Instance Attribute Details
#data ⇒ Hash (readonly)
Returns objeto “data” do evento (ou o payload inteiro como fallback).
41 42 43 |
# File 'lib/fluvpay/webhooks.rb', line 41 def data @data end |
#delivery_id ⇒ String? (readonly)
Returns identificador da entrega (X-FluvPay-Delivery-Id).
37 38 39 |
# File 'lib/fluvpay/webhooks.rb', line 37 def delivery_id @delivery_id end |
#raw ⇒ Hash (readonly)
Returns payload completo parseado.
43 44 45 |
# File 'lib/fluvpay/webhooks.rb', line 43 def raw @raw end |
#timestamp ⇒ String (readonly)
Returns timestamp cru recebido (X-FluvPay-Timestamp).
39 40 41 |
# File 'lib/fluvpay/webhooks.rb', line 39 def @timestamp end |
#type ⇒ String? (readonly)
Returns tipo do evento (ex: “charge.paid”).
35 36 37 |
# File 'lib/fluvpay/webhooks.rb', line 35 def type @type end |