Show / Hide Table of Contents

Class Webhook

Describes a webhook for the ISystemWebhookPlugin.

Inheritance
object
Webhook
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Webhooks
Assembly: SoDataBase.dll
Syntax
public class Webhook

Constructors

Webhook(int, string, string, string, string)

Describes a webhook for the ISystemWebhookPlugin.

Declaration
public Webhook(int id, string name, string url, string eventName, string secret)
Parameters
Type Name Description
int id
string name
string url
string eventName
string secret

Webhook(int, string, string, string[], string)

Describes a webhook for the ISystemWebhookPlugin.

Declaration
public Webhook(int id, string name, string url, string[] eventNames, string secret)
Parameters
Type Name Description
int id
string name
string url
string[] eventNames
string secret

Fields

Events

Events that this hook is subscribed to. "sale.created", "project.updated", "contact.deleted" etc

Declaration
public string[] Events
Field Value
Type Description
string[]

Name

Name of this hook. e.g. "My ERP Integration"

Declaration
public string Name
Field Value
Type Description
string

TargetUrl

URL to POST events to, or otherwise identify the recipient of the webhook call (i.e. script id).

Declaration
public string TargetUrl
Field Value
Type Description
string

Type

Name of webhook plugin that handles dispatching this webhook: "webhook", "crmscript" etc.

Declaration
public string Type
Field Value
Type Description
string

WebhookId

Unique identifier for this webhook.

Declaration
public int WebhookId
Field Value
Type Description
int

Properties

ApplicationToken

Application that registered this hook. (Optional)

Declaration
public string ApplicationToken { get; set; }
Property Value
Type Description
string

ErrorsEmail

Where to send error notifications when webhook gets disabled.

Declaration
public string ErrorsEmail { get; set; }
Property Value
Type Description
string

Headers

Hook-specific custom headers to be added to the webhook payload.

Declaration
public Dictionary<string, string> Headers { get; set; }
Property Value
Type Description
Dictionary<string, string>

Properties

Hook-specific data properties to be added to the webhook payload.

Declaration
public Dictionary<string, object> Properties { get; set; }
Property Value
Type Description
Dictionary<string, object>

Registered

Describes a webhook for the ISystemWebhookPlugin.

Declaration
public DateTime Registered { get; set; }
Property Value
Type Description
DateTime

RegisteredAssociateId

Describes a webhook for the ISystemWebhookPlugin.

Declaration
public int RegisteredAssociateId { get; set; }
Property Value
Type Description
int

Secret

Shared secret. Used for creating a SHA256 HMAC if set.

Declaration
public string Secret { get; set; }
Property Value
Type Description
string

State

Webhook can be Active, Stopped or Errored.

Declaration
public WebhookState State { get; set; }
Property Value
Type Description
WebhookState

Updated

Describes a webhook for the ISystemWebhookPlugin.

Declaration
public DateTime Updated { get; set; }
Property Value
Type Description
DateTime

UpdatedAssociateId

Describes a webhook for the ISystemWebhookPlugin.

Declaration
public int UpdatedAssociateId { get; set; }
Property Value
Type Description
int

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top