Class: MangoModel::Hook

Inherits:
EntityBase show all
Includes:
MangoPay::Jsonifier
Defined in:
lib/mangopay/model/entity/hook.rb

Overview

Hook entity Once setup, a hook entity allows MangoPay to make a request to a specific URL on the implementing server to make it aware of various Events (i.e. a failed PayOut). One URL can be configured for each EventType.

Constant Summary

Constants included from MangoPay::Jsonifier

MangoPay::Jsonifier::LOG

Instance Attribute Summary collapse

Attributes inherited from EntityBase

#creation_date, #id, #tag

Method Summary

Methods included from MangoPay::Jsonifier

#dejsonify, #jsonify!

Methods included from NonInstantiable

#initialize

Instance Attribute Details

#event_typeObject

EventType

Type of event handled



24
25
26
# File 'lib/mangopay/model/entity/hook.rb', line 24

def event_type
  @event_type
end

#statusObject

HookStatus

Whether or not the hook is enabled



18
19
20
# File 'lib/mangopay/model/entity/hook.rb', line 18

def status
  @status
end

#urlObject

String

The URL that will be pinged for events of the

specified type



15
16
17
# File 'lib/mangopay/model/entity/hook.rb', line 15

def url
  @url
end

#validityObject

HookValidity

Whether or not the hook is valid



21
22
23
# File 'lib/mangopay/model/entity/hook.rb', line 21

def validity
  @validity
end