/// <summary>
 /// Initializes a new instance of the <see cref="AbstractWebhookPayload" /> class.
 /// </summary>
 /// <param name="eventName">eventName (required).</param>
 /// <param name="webhookId">webhookId (required).</param>
 /// <param name="messageId">messageId (required).</param>
 /// <param name="webhookName">webhookName.</param>
 public AbstractWebhookPayload(EventNameEnum eventName = default(EventNameEnum), Guid webhookId = default(Guid), string messageId = default(string), string webhookName = default(string))
 {
     this.EventName = eventName;
     this.WebhookId = webhookId;
     // to ensure "messageId" is required (not null)
     this.MessageId   = messageId ?? throw new ArgumentNullException("messageId is a required property for AbstractWebhookPayload and cannot be null");
     this.WebhookName = webhookName;
 }
Exemple #2
0
 public static void AddListener(EventNameEnum eventName_foo, UnityAction <T> listener_foo)
 {
     if (!listeners[eventName_foo].Contains(listener_foo))
     {
         listeners[eventName_foo].Add(listener_foo);
         foreach (TEventInvoker <T> invoker in invokers[eventName_foo])
         {
             invoker.AddListener(eventName_foo, listener_foo);
         }
     }
 }
Exemple #3
0
 public static void AddInvoker(EventNameEnum eventName_foo, TEventInvoker <T> invoker_foo)
 {
     if (!invokers[eventName_foo].Contains(invoker_foo))
     {
         invokers[eventName_foo].Add(invoker_foo);
         foreach (UnityAction <T> listener in listeners[eventName_foo])
         {
             invoker_foo.AddListener(eventName_foo, listener);
         }
     }
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebhookEmailReadPayload" /> class.
 /// </summary>
 /// <param name="messageId">Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required).</param>
 /// <param name="webhookId">ID of webhook entity being triggered (required).</param>
 /// <param name="eventName">Name of the event type webhook is being triggered for. (required).</param>
 /// <param name="webhookName">Name of the webhook being triggered.</param>
 /// <param name="emailId">ID of the email that was received. Use this ID for fetching the email with the &#x60;EmailController&#x60;. (required).</param>
 /// <param name="inboxId">Id of the inbox that received an email (required).</param>
 /// <param name="emailIsRead">Is the email read (required).</param>
 /// <param name="createdAt">Date time of event creation (required).</param>
 public WebhookEmailReadPayload(string messageId = default(string), Guid webhookId = default(Guid), EventNameEnum eventName = default(EventNameEnum), string webhookName = default(string), Guid emailId = default(Guid), Guid inboxId = default(Guid), bool emailIsRead = default(bool), DateTime createdAt = default(DateTime))
 {
     // to ensure "messageId" is required (not null)
     this.MessageId   = messageId ?? throw new ArgumentNullException("messageId is a required property for WebhookEmailReadPayload and cannot be null");
     this.WebhookId   = webhookId;
     this.EventName   = eventName;
     this.EmailId     = emailId;
     this.InboxId     = inboxId;
     this.EmailIsRead = emailIsRead;
     this.CreatedAt   = createdAt;
     this.WebhookName = webhookName;
 }
Exemple #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebhookEmailOpenedPayload" /> class.
 /// </summary>
 /// <param name="messageId">Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required).</param>
 /// <param name="webhookId">ID of webhook entity being triggered (required).</param>
 /// <param name="eventName">Name of the event type webhook is being triggered for. (required).</param>
 /// <param name="webhookName">Name of the webhook being triggered.</param>
 /// <param name="inboxId">Id of the inbox that received an email (required).</param>
 /// <param name="pixelId">ID of the tracking pixel (required).</param>
 /// <param name="sentEmailId">ID of sent email (required).</param>
 /// <param name="recipient">Email address for the recipient of the tracking pixel (required).</param>
 /// <param name="createdAt">Date time of event creation (required).</param>
 public WebhookEmailOpenedPayload(string messageId = default(string), Guid webhookId = default(Guid), EventNameEnum eventName = default(EventNameEnum), string webhookName = default(string), Guid inboxId = default(Guid), Guid pixelId = default(Guid), Guid sentEmailId = default(Guid), string recipient = default(string), DateTime createdAt = default(DateTime))
 {
     // to ensure "messageId" is required (not null)
     this.MessageId   = messageId ?? throw new ArgumentNullException("messageId is a required property for WebhookEmailOpenedPayload and cannot be null");
     this.WebhookId   = webhookId;
     this.EventName   = eventName;
     this.InboxId     = inboxId;
     this.PixelId     = pixelId;
     this.SentEmailId = sentEmailId;
     // to ensure "recipient" is required (not null)
     this.Recipient   = recipient ?? throw new ArgumentNullException("recipient is a required property for WebhookEmailOpenedPayload and cannot be null");
     this.CreatedAt   = createdAt;
     this.WebhookName = webhookName;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WebhookNewAttachmentPayload" /> class.
 /// </summary>
 /// <param name="messageId">Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required).</param>
 /// <param name="webhookId">ID of webhook entity being triggered (required).</param>
 /// <param name="webhookName">Name of the webhook being triggered.</param>
 /// <param name="eventName">Name of the event type webhook is being triggered for. (required).</param>
 /// <param name="attachmentId">ID of attachment. Use the &#x60;AttachmentController&#x60; to (required).</param>
 /// <param name="name">Filename of the attachment if present (required).</param>
 /// <param name="contentType">Content type of attachment such as &#39;image/png&#39; or &#39;application/pdf (required).</param>
 /// <param name="contentLength">Size of attachment in bytes (required).</param>
 public WebhookNewAttachmentPayload(string messageId = default(string), Guid webhookId = default(Guid), string webhookName = default(string), EventNameEnum eventName = default(EventNameEnum), string attachmentId = default(string), string name = default(string), string contentType = default(string), long contentLength = default(long))
 {
     // to ensure "messageId" is required (not null)
     this.MessageId = messageId ?? throw new ArgumentNullException("messageId is a required property for WebhookNewAttachmentPayload and cannot be null");
     this.WebhookId = webhookId;
     this.EventName = eventName;
     // to ensure "attachmentId" is required (not null)
     this.AttachmentId = attachmentId ?? throw new ArgumentNullException("attachmentId is a required property for WebhookNewAttachmentPayload and cannot be null");
     // to ensure "name" is required (not null)
     this.Name = name ?? throw new ArgumentNullException("name is a required property for WebhookNewAttachmentPayload and cannot be null");
     // to ensure "contentType" is required (not null)
     this.ContentType   = contentType ?? throw new ArgumentNullException("contentType is a required property for WebhookNewAttachmentPayload and cannot be null");
     this.ContentLength = contentLength;
     this.WebhookName   = webhookName;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WebhookNewContactPayload" /> class.
 /// </summary>
 /// <param name="messageId">Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required).</param>
 /// <param name="webhookId">ID of webhook entity being triggered (required).</param>
 /// <param name="webhookName">Name of the webhook being triggered.</param>
 /// <param name="eventName">Name of the event type webhook is being triggered for. (required).</param>
 /// <param name="contactId">contactId (required).</param>
 /// <param name="groupId">groupId.</param>
 /// <param name="firstName">firstName.</param>
 /// <param name="lastName">lastName.</param>
 /// <param name="company">company.</param>
 /// <param name="primaryEmailAddress">primaryEmailAddress.</param>
 /// <param name="emailAddresses">emailAddresses (required).</param>
 /// <param name="tags">tags (required).</param>
 /// <param name="metaData">metaData.</param>
 /// <param name="optOut">optOut.</param>
 /// <param name="createdAt">createdAt (required).</param>
 public WebhookNewContactPayload(string messageId = default(string), Guid webhookId = default(Guid), string webhookName = default(string), EventNameEnum eventName = default(EventNameEnum), Guid contactId = default(Guid), Guid groupId = default(Guid), string firstName = default(string), string lastName = default(string), string company = default(string), string primaryEmailAddress = default(string), List <string> emailAddresses = default(List <string>), List <string> tags = default(List <string>), Object metaData = default(Object), bool optOut = default(bool), DateTime createdAt = default(DateTime))
 {
     // to ensure "messageId" is required (not null)
     this.MessageId = messageId ?? throw new ArgumentNullException("messageId is a required property for WebhookNewContactPayload and cannot be null");
     this.WebhookId = webhookId;
     this.EventName = eventName;
     this.ContactId = contactId;
     // to ensure "emailAddresses" is required (not null)
     this.EmailAddresses = emailAddresses ?? throw new ArgumentNullException("emailAddresses is a required property for WebhookNewContactPayload and cannot be null");
     // to ensure "tags" is required (not null)
     this.Tags                = tags ?? throw new ArgumentNullException("tags is a required property for WebhookNewContactPayload and cannot be null");
     this.CreatedAt           = createdAt;
     this.WebhookName         = webhookName;
     this.GroupId             = groupId;
     this.FirstName           = firstName;
     this.LastName            = lastName;
     this.Company             = company;
     this.PrimaryEmailAddress = primaryEmailAddress;
     this.MetaData            = metaData;
     this.OptOut              = optOut;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WebhookNewEmailPayload" /> class.
 /// </summary>
 /// <param name="messageId">Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required).</param>
 /// <param name="webhookId">ID of webhook entity being triggered (required).</param>
 /// <param name="eventName">Name of the event type webhook is being triggered for. (required).</param>
 /// <param name="webhookName">Name of the webhook being triggered.</param>
 /// <param name="inboxId">Id of the inbox that received an email (required).</param>
 /// <param name="emailId">ID of the email that was received. Use this ID for fetching the email with the &#x60;EmailController&#x60;. (required).</param>
 /// <param name="createdAt">Date time of event creation (required).</param>
 /// <param name="to">List of &#x60;To&#x60; recipient email addresses that the email was addressed to. See recipients object for names. (required).</param>
 /// <param name="from">Who the email was sent from. An email address - see fromName for the sender name. (required).</param>
 /// <param name="cc">List of &#x60;CC&#x60; recipients email addresses that the email was addressed to. See recipients object for names. (required).</param>
 /// <param name="bcc">List of &#x60;BCC&#x60; recipients email addresses that the email was addressed to. See recipients object for names. (required).</param>
 /// <param name="subject">The subject line of the email message as specified by SMTP subject header.</param>
 /// <param name="attachmentMetaDatas">List of attachment meta data objects if attachments present (required).</param>
 public WebhookNewEmailPayload(string messageId = default(string), Guid webhookId = default(Guid), EventNameEnum eventName = default(EventNameEnum), string webhookName = default(string), Guid inboxId = default(Guid), Guid emailId = default(Guid), DateTime createdAt = default(DateTime), List <string> to = default(List <string>), string from = default(string), List <string> cc = default(List <string>), List <string> bcc = default(List <string>), string subject = default(string), List <AttachmentMetaData> attachmentMetaDatas = default(List <AttachmentMetaData>))
 {
     // to ensure "messageId" is required (not null)
     this.MessageId = messageId ?? throw new ArgumentNullException("messageId is a required property for WebhookNewEmailPayload and cannot be null");
     this.WebhookId = webhookId;
     this.EventName = eventName;
     this.InboxId   = inboxId;
     this.EmailId   = emailId;
     this.CreatedAt = createdAt;
     // to ensure "to" is required (not null)
     this.To = to ?? throw new ArgumentNullException("to is a required property for WebhookNewEmailPayload and cannot be null");
     // to ensure "from" is required (not null)
     this.From = from ?? throw new ArgumentNullException("from is a required property for WebhookNewEmailPayload and cannot be null");
     // to ensure "cc" is required (not null)
     this.Cc = cc ?? throw new ArgumentNullException("cc is a required property for WebhookNewEmailPayload and cannot be null");
     // to ensure "bcc" is required (not null)
     this.Bcc = bcc ?? throw new ArgumentNullException("bcc is a required property for WebhookNewEmailPayload and cannot be null");
     // to ensure "attachmentMetaDatas" is required (not null)
     this.AttachmentMetaDatas = attachmentMetaDatas ?? throw new ArgumentNullException("attachmentMetaDatas is a required property for WebhookNewEmailPayload and cannot be null");
     this.WebhookName         = webhookName;
     this.Subject             = subject;
 }
Exemple #9
0
 public static void RemoveInvoker(EventNameEnum eventName_foo, TEventInvoker <T> invoker_foo)
 {
     invokers[eventName_foo].Remove(invoker_foo);
 }