Class AbstractWebhookPayload
Abstract webhook payload. Use the correct payload type for your webhook event type in order to access all the specific properties for that event. See the NEW_EMAIL
,NEW_CONTACT
, NEW_ATTACHMENT
and EMAIL_OPENED
payloads for the properties available for those events.
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "AbstractWebhookPayload")]
public class AbstractWebhookPayload : IEquatable<AbstractWebhookPayload>, IValidatableObject
Constructors
View SourceAbstractWebhookPayload()
Initializes a new instance of the AbstractWebhookPayload class.
Declaration
[JsonConstructor]
protected AbstractWebhookPayload()
AbstractWebhookPayload(EventNameEnum, string, Guid, string)
Initializes a new instance of the AbstractWebhookPayload class.
Declaration
public AbstractWebhookPayload(AbstractWebhookPayload.EventNameEnum eventName = (AbstractWebhookPayload.EventNameEnum)0, string messageId = null, Guid webhookId = default, string webhookName = null)
Parameters
Type | Name | Description |
---|---|---|
AbstractWebhookPayload.EventNameEnum | eventName | eventName (required). |
string | messageId | messageId (required). |
System.Guid | webhookId | webhookId (required). |
string | webhookName | webhookName. |
Properties
View SourceEventName
Gets or Sets EventName
Declaration
[DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)]
public AbstractWebhookPayload.EventNameEnum EventName { get; set; }
Property Value
Type | Description |
---|---|
AbstractWebhookPayload.EventNameEnum |
MessageId
Gets or Sets MessageId
Declaration
[DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)]
public string MessageId { get; set; }
Property Value
Type | Description |
---|---|
string |
WebhookId
Gets or Sets WebhookId
Declaration
[DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)]
public Guid WebhookId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
WebhookName
Gets or Sets WebhookName
Declaration
[DataMember(Name = "webhookName", EmitDefaultValue = false)]
public string WebhookName { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
View SourceEquals(AbstractWebhookPayload)
Returns true if AbstractWebhookPayload instances are equal
Declaration
public bool Equals(AbstractWebhookPayload input)
Parameters
Type | Name | Description |
---|---|---|
AbstractWebhookPayload | input | Instance of AbstractWebhookPayload to be compared |
Returns
Type | Description |
---|---|
bool | Boolean |
Equals(object)
Returns true if objects are equal
Declaration
public override bool Equals(object input)
Parameters
Type | Name | Description |
---|---|---|
object | input | Object to be compared |
Returns
Type | Description |
---|---|
bool | Boolean |
Overrides
View SourceGetHashCode()
Gets the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | Hash code |
Overrides
View SourceToJson()
Returns the JSON string presentation of the object
Declaration
public virtual string ToJson()
Returns
Type | Description |
---|---|
string | JSON string presentation of the object |
ToString()
Returns the string presentation of the object
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | String presentation of the object |
Overrides
Validate(ValidationContext)
To validate all properties of the instance
Declaration
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Parameters
Type | Name | Description |
---|---|---|
ValidationContext | validationContext | Validation context |
Returns
Type | Description |
---|---|
IEnumerable<ValidationResult> | Validation Result |