Class WebhookNewContactPayload
NEW_CONTACT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains a recipient that has not been saved as a contact.
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "WebhookNewContactPayload")]
public class WebhookNewContactPayload : IEquatable<WebhookNewContactPayload>, IValidatableObject
Constructors
View SourceWebhookNewContactPayload()
Initializes a new instance of the WebhookNewContactPayload class.
Declaration
[JsonConstructor]
protected WebhookNewContactPayload()
WebhookNewContactPayload(string, Guid, string, EventNameEnum, Guid, Guid?, string, string, string, string, List<string>, List<string>, object, bool, DateTime)
Initializes a new instance of the WebhookNewContactPayload class.
Declaration
public WebhookNewContactPayload(string messageId = null, Guid webhookId = default, string webhookName = null, WebhookNewContactPayload.EventNameEnum eventName = (WebhookNewContactPayload.EventNameEnum)0, Guid contactId = default, Guid? groupId = null, string firstName = null, string lastName = null, string company = null, string primaryEmailAddress = null, List<string> emailAddresses = null, List<string> tags = null, object metaData = null, bool optOut = false, DateTime createdAt = default)
Parameters
Type | Name | Description |
---|---|---|
string | messageId | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). |
System.Guid | webhookId | ID of webhook entity being triggered (required). |
string | webhookName | Name of the webhook being triggered. |
WebhookNewContactPayload.EventNameEnum | eventName | Name of the event type webhook is being triggered for. (required). |
System.Guid | contactId | Contact ID (required). |
System.Guid? | groupId | Contact group ID. |
string | firstName | Contact first name. |
string | lastName | Contact last name. |
string | company | Contact company name. |
string | primaryEmailAddress | Primary email address for contact. |
System.Collections.Generic.List<T><string> | emailAddresses | Email addresses for contact (required). |
System.Collections.Generic.List<T><string> | tags | Tags for contact (required). |
object | metaData | metaData. |
bool | optOut | Has contact opted out of emails (required). |
DateTime | createdAt | Date time of event creation (required). |
Properties
View SourceCompany
Contact company name
Declaration
[DataMember(Name = "company", EmitDefaultValue = true)]
public string Company { get; set; }
Property Value
Type | Description |
---|---|
string | Contact company name |
ContactId
Contact ID
Declaration
[DataMember(Name = "contactId", IsRequired = true, EmitDefaultValue = true)]
public Guid ContactId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid | Contact ID |
CreatedAt
Date time of event creation
Declaration
[DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)]
public DateTime CreatedAt { get; set; }
Property Value
Type | Description |
---|---|
DateTime | Date time of event creation |
EmailAddresses
Email addresses for contact
Declaration
[DataMember(Name = "emailAddresses", IsRequired = true, EmitDefaultValue = true)]
public List<string> EmailAddresses { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><string> | Email addresses for contact |
EventName
Name of the event type webhook is being triggered for.
Declaration
[DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)]
public WebhookNewContactPayload.EventNameEnum EventName { get; set; }
Property Value
Type | Description |
---|---|
WebhookNewContactPayload.EventNameEnum | Name of the event type webhook is being triggered for. |
FirstName
Contact first name
Declaration
[DataMember(Name = "firstName", EmitDefaultValue = true)]
public string FirstName { get; set; }
Property Value
Type | Description |
---|---|
string | Contact first name |
GroupId
Contact group ID
Declaration
[DataMember(Name = "groupId", EmitDefaultValue = true)]
public Guid? GroupId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid? | Contact group ID |
LastName
Contact last name
Declaration
[DataMember(Name = "lastName", EmitDefaultValue = true)]
public string LastName { get; set; }
Property Value
Type | Description |
---|---|
string | Contact last name |
MessageId
Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
Declaration
[DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)]
public string MessageId { get; set; }
Property Value
Type | Description |
---|---|
string | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. |
MetaData
Gets or Sets MetaData
Declaration
[DataMember(Name = "metaData", EmitDefaultValue = true)]
public object MetaData { get; set; }
Property Value
Type | Description |
---|---|
object |
OptOut
Has contact opted out of emails
Declaration
[DataMember(Name = "optOut", IsRequired = true, EmitDefaultValue = true)]
public bool OptOut { get; set; }
Property Value
Type | Description |
---|---|
bool | Has contact opted out of emails |
PrimaryEmailAddress
Primary email address for contact
Declaration
[DataMember(Name = "primaryEmailAddress", EmitDefaultValue = true)]
public string PrimaryEmailAddress { get; set; }
Property Value
Type | Description |
---|---|
string | Primary email address for contact |
Tags
Tags for contact
Declaration
[DataMember(Name = "tags", IsRequired = true, EmitDefaultValue = true)]
public List<string> Tags { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><string> | Tags for contact |
WebhookId
ID of webhook entity being triggered
Declaration
[DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)]
public Guid WebhookId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid | ID of webhook entity being triggered |
WebhookName
Name of the webhook being triggered
Declaration
[DataMember(Name = "webhookName", EmitDefaultValue = true)]
public string WebhookName { get; set; }
Property Value
Type | Description |
---|---|
string | Name of the webhook being triggered |
Methods
View SourceEquals(WebhookNewContactPayload)
Returns true if WebhookNewContactPayload instances are equal
Declaration
public bool Equals(WebhookNewContactPayload input)
Parameters
Type | Name | Description |
---|---|---|
WebhookNewContactPayload | input | Instance of WebhookNewContactPayload 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 |