Class WebhookNewSmsPayload
NEW_SMS webhook payload. Sent to your webhook url endpoint via HTTP POST when an sms is received by the phone number that your webhook is attached to. Use the SMS ID to fetch the full SMS details.
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "WebhookNewSmsPayload")]
public class WebhookNewSmsPayload : IValidatableObject
Constructors
View SourceWebhookNewSmsPayload()
Initializes a new instance of the WebhookNewSmsPayload class.
Declaration
[JsonConstructor]
protected WebhookNewSmsPayload()
WebhookNewSmsPayload(string, Guid, EventNameEnum, string, Guid, Guid, Guid, string, string, string, bool)
Initializes a new instance of the WebhookNewSmsPayload class.
Declaration
public WebhookNewSmsPayload(string messageId = null, Guid webhookId = default, WebhookNewSmsPayload.EventNameEnum eventName = (WebhookNewSmsPayload.EventNameEnum)0, string webhookName = null, Guid smsId = default, Guid userId = default, Guid phoneNumber = default, string toNumber = null, string fromNumber = null, string body = null, bool read = false)
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). |
WebhookNewSmsPayload.EventNameEnum | eventName | Name of the event type webhook is being triggered for. (required). |
string | webhookName | Name of the webhook being triggered. |
Guid | smsId | ID of SMS message (required). |
Guid | userId | User ID of event (required). |
Guid | phoneNumber | ID of phone number receiving SMS (required). |
string | toNumber | Recipient phone number (required). |
string | fromNumber | Sender phone number (required). |
string | body | SMS message body (required). |
bool | read | SMS has been read (required). |
Properties
View SourceBody
SMS message body
Declaration
[DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)]
public string Body { get; set; }
Property Value
Type | Description |
---|---|
string | SMS message body |
EventName
Name of the event type webhook is being triggered for.
Declaration
[DataMember(Name = "eventName", IsRequired = true, EmitDefaultValue = true)]
public WebhookNewSmsPayload.EventNameEnum EventName { get; set; }
Property Value
Type | Description |
---|---|
WebhookNewSmsPayload.EventNameEnum | Name of the event type webhook is being triggered for. |
FromNumber
Sender phone number
Declaration
[DataMember(Name = "fromNumber", IsRequired = true, EmitDefaultValue = true)]
public string FromNumber { get; set; }
Property Value
Type | Description |
---|---|
string | Sender phone number |
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. |
PhoneNumber
ID of phone number receiving SMS
Declaration
[DataMember(Name = "phoneNumber", IsRequired = true, EmitDefaultValue = true)]
public Guid PhoneNumber { get; set; }
Property Value
Type | Description |
---|---|
Guid | ID of phone number receiving SMS |
Read
SMS has been read
Declaration
[DataMember(Name = "read", IsRequired = true, EmitDefaultValue = true)]
public bool Read { get; set; }
Property Value
Type | Description |
---|---|
bool | SMS has been read |
SmsId
ID of SMS message
Declaration
[DataMember(Name = "smsId", IsRequired = true, EmitDefaultValue = true)]
public Guid SmsId { get; set; }
Property Value
Type | Description |
---|---|
Guid | ID of SMS message |
ToNumber
Recipient phone number
Declaration
[DataMember(Name = "toNumber", IsRequired = true, EmitDefaultValue = true)]
public string ToNumber { get; set; }
Property Value
Type | Description |
---|---|
string | Recipient phone number |
UserId
User ID of event
Declaration
[DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)]
public Guid UserId { get; set; }
Property Value
Type | Description |
---|---|
Guid | User ID of event |
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 |