Class WebhookNewAttachmentPayload
NEW_ATTACHMENT 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 an attachment. You can use the attachmentId to download the attachment.
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "WebhookNewAttachmentPayload")]
public class WebhookNewAttachmentPayload : IValidatableObject
Constructors
View SourceWebhookNewAttachmentPayload()
Initializes a new instance of the WebhookNewAttachmentPayload class.
Declaration
[JsonConstructor]
protected WebhookNewAttachmentPayload()
WebhookNewAttachmentPayload(string, Guid, string, EventNameEnum, string, string, string, long)
Initializes a new instance of the WebhookNewAttachmentPayload class.
Declaration
public WebhookNewAttachmentPayload(string messageId = null, Guid webhookId = default, string webhookName = null, WebhookNewAttachmentPayload.EventNameEnum eventName = (WebhookNewAttachmentPayload.EventNameEnum)0, string attachmentId = null, string name = null, string contentType = null, long contentLength = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | messageId | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. (required). |
| Guid | webhookId | ID of webhook entity being triggered (required). |
| string | webhookName | Name of the webhook being triggered. |
| WebhookNewAttachmentPayload.EventNameEnum | eventName | Name of the event type webhook is being triggered for. (required). |
| string | attachmentId | ID of attachment. Use the |
| string | name | Filename of the attachment if present (required). |
| string | contentType | Content type of attachment such as 'image/png' or 'application/pdf (required). |
| long | contentLength | Size of attachment in bytes (required). |
Properties
View SourceAttachmentId
ID of attachment. Use the AttachmentController to
Declaration
[DataMember(Name = "attachmentId", IsRequired = true, EmitDefaultValue = true)]
public string AttachmentId { get; set; }
Property Value
| Type | Description |
|---|---|
| string | ID of attachment. Use the |
ContentLength
Size of attachment in bytes
Declaration
[DataMember(Name = "contentLength", IsRequired = true, EmitDefaultValue = true)]
public long ContentLength { get; set; }
Property Value
| Type | Description |
|---|---|
| long | Size of attachment in bytes |
ContentType
Content type of attachment such as 'image/png' or 'application/pdf
Declaration
[DataMember(Name = "contentType", IsRequired = true, EmitDefaultValue = true)]
public string ContentType { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Content type of attachment such as 'image/png' or 'application/pdf |
EventName
Name of the event type webhook is being triggered for.
Declaration
[DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)]
public WebhookNewAttachmentPayload.EventNameEnum EventName { get; set; }
Property Value
| Type | Description |
|---|---|
| WebhookNewAttachmentPayload.EventNameEnum | Name of the event type webhook is being triggered for. |
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. |
Name
Filename of the attachment if present
Declaration
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Filename of the attachment if present |
WebhookId
ID of webhook entity being triggered
Declaration
[DataMember(Name = "webhookId", IsRequired = true, EmitDefaultValue = true)]
public Guid WebhookId { get; set; }
Property Value
| Type | Description |
|---|---|
| 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 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 |