# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule MailSlurpAPI.Model.WebhookDto do
@moduledoc """
Representation of a webhook for an inbox. The URL specified will be using by MailSlurp whenever an email is received by the attached inbox. A webhook entity should have a URL that points to your server. Your server should accept HTTP/S POST requests and return a success 200. MailSlurp will retry your webhooks if they fail. See https://api.mailslurp.com/schemas/webhook-payload for the payload schema.
"""
@derive [Poison.Encoder]
defstruct [
:"id",
:"userId",
:"basicAuth",
:"name",
:"phoneId",
:"inboxId",
:"url",
:"method",
:"payloadJsonSchema",
:"createdAt",
:"updatedAt",
:"eventName",
:"requestHeaders"
]
@type t :: %__MODULE__{
:"id" => String.t,
:"userId" => String.t,
:"basicAuth" => boolean(),
:"name" => String.t | nil,
:"phoneId" => String.t | nil,
:"inboxId" => String.t | nil,
:"url" => String.t,
:"method" => String.t,
:"payloadJsonSchema" => String.t,
:"createdAt" => DateTime.t | nil,
:"updatedAt" => DateTime.t,
:"eventName" => String.t | nil,
:"requestHeaders" => WebhookHeaders | nil
}
end
defimpl Poison.Decoder, for: MailSlurpAPI.Model.WebhookDto do
import MailSlurpAPI.Deserializer
def decode(value, options) do
value
|> deserialize(:"requestHeaders", :struct, MailSlurpAPI.Model.WebhookHeaders, options)
end
end