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 : IEquatable<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). |
System.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. |
System.Guid | smsId | ID of SMS message (required). |
System.Guid | userId | User ID of event (required). |
System.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 |
---|---|
System.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 |
---|---|
System.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 |
---|---|
System.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 |
---|---|
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(WebhookNewSmsPayload)
Returns true if WebhookNewSmsPayload instances are equal
Declaration
public bool Equals(WebhookNewSmsPayload input)
Parameters
Type | Name | Description |
---|---|---|
WebhookNewSmsPayload | input | Instance of WebhookNewSmsPayload 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 |