Class: Blockchain0x::Webhooks::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/blockchain0x/webhooks.rb

Overview

Result returned by ‘verify`. Use `result.ok?` to branch.

On success, ‘event_type`, `event_id`, `delivery_id` are populated (may be nil if the framework dropped the header but the signature verified).

On failure, ‘code` is one of the constants above and the event-detail fields are nil.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



63
64
65
# File 'lib/blockchain0x/webhooks.rb', line 63

def code
  @code
end

#delivery_idObject

Returns the value of attribute delivery_id

Returns:

  • (Object)

    the current value of delivery_id



63
64
65
# File 'lib/blockchain0x/webhooks.rb', line 63

def delivery_id
  @delivery_id
end

#event_idObject

Returns the value of attribute event_id

Returns:

  • (Object)

    the current value of event_id



63
64
65
# File 'lib/blockchain0x/webhooks.rb', line 63

def event_id
  @event_id
end

#event_typeObject

Returns the value of attribute event_type

Returns:

  • (Object)

    the current value of event_type



63
64
65
# File 'lib/blockchain0x/webhooks.rb', line 63

def event_type
  @event_type
end

#okObject

Returns the value of attribute ok

Returns:

  • (Object)

    the current value of ok



63
64
65
# File 'lib/blockchain0x/webhooks.rb', line 63

def ok
  @ok
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


64
65
66
# File 'lib/blockchain0x/webhooks.rb', line 64

def ok?
  ok == true
end