Documentation

CreateInboxDto
in package
implements ModelInterface, ArrayAccess, JsonSerializable

CreateInboxDto Class Doc Comment

Tags
category

Class

description

Options for creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. Inboxes are either `SMTP` or `HTTP` mailboxes. `SMTP` inboxes are processed by a mail server running at `mailslurp.mx` while `HTTP` inboxes are processed by AWS SES backed mailservers. An inbox email address is randomly assigned by default ending in either `mailslurp.com` or (if `useDomainPool` is enabled) ending in a similar domain such as `mailslurp.xyz` (selected at random). To specify an address use a custom domain: either pass the `emailAddress` options with `<your-recipient>@<your-domain>`. To create a randomized address for your domain set the `domainName` to the domain you have verified or pass the `domainId`. Virtual inboxes prevent outbound sending and instead trap mail.

author

OpenAPI Generator team

link
https://openapi-generator.tech
implements

\ArrayAccess<string, mixed>

Interfaces, Classes, Traits and Enums

ModelInterface
Interface abstracting model access.
ArrayAccess
JsonSerializable

Table of Contents

DISCRIMINATOR  = null
INBOX_TYPE_HTTP_INBOX  = 'HTTP_INBOX'
INBOX_TYPE_SMTP_INBOX  = 'SMTP_INBOX'
$attributeMap  : array<string|int, string>
Array of attributes where the key is the local name, and the value is the original name
$container  : array<string|int, mixed>
Associative array for storing property values
$getters  : array<string|int, string>
Array of attributes to getter functions (for serialization of requests)
$openAPIFormats  : array<string|int, string>
Array of property to format mappings. Used for (de)serialization
$openAPIModelName  : string
The original name of the model.
$openAPINullables  : array<string|int, mixed>
Array of nullable properties. Used for (de)serialization
$openAPINullablesSetToNull  : array<string|int, mixed>
If a nullable field gets set to null, insert it here
$openAPITypes  : array<string|int, string>
Array of property to type mappings. Used for (de)serialization
$setters  : array<string|int, string>
Array of attributes to setter functions (for deserialization of responses)
__construct()  : mixed
Constructor
__toString()  : string
Gets the string presentation of the object
attributeMap()  : array<string|int, mixed>
Array of attributes where the key is the local name, and the value is the original name
getAllowTeamAccess()  : bool|null
Gets allow_team_access
getDescription()  : string|null
Gets description
getDomainId()  : string|null
Gets domain_id
getDomainName()  : string|null
Gets domain_name
getEmailAddress()  : string|null
Gets email_address
getExpiresAt()  : DateTime|null
Gets expires_at
getExpiresIn()  : int|null
Gets expires_in
getFavourite()  : bool|null
Gets favourite
getInboxType()  : string|null
Gets inbox_type
getInboxTypeAllowableValues()  : array<string|int, string>
Gets allowable values of the enum
getModelName()  : string
The original name of the model.
getName()  : string|null
Gets name
getPrefix()  : string|null
Gets prefix
getTags()  : array<string|int, string>|null
Gets tags
getters()  : array<string|int, mixed>
Array of attributes to getter functions (for serialization of requests)
getUseDomainPool()  : bool|null
Gets use_domain_pool
getUseShortAddress()  : bool|null
Gets use_short_address
getVirtualInbox()  : bool|null
Gets virtual_inbox
isNullable()  : bool
Checks if a property is nullable
isNullableSetToNull()  : bool
Checks if a nullable property is set to null.
jsonSerialize()  : mixed
Serializes the object to a value that can be serialized natively by json_encode().
listInvalidProperties()  : array<string|int, mixed>
Show all the invalid properties with reasons.
offsetExists()  : bool
Returns true if offset exists. False otherwise.
offsetGet()  : mixed|null
Gets offset.
offsetSet()  : void
Sets value based on offset.
offsetUnset()  : void
Unsets offset.
openAPIFormats()  : array<string|int, mixed>
Array of property to format mappings. Used for (de)serialization
openAPITypes()  : array<string|int, mixed>
Array of property to type mappings. Used for (de)serialization
setAllowTeamAccess()  : self
Sets allow_team_access
setDescription()  : self
Sets description
setDomainId()  : self
Sets domain_id
setDomainName()  : self
Sets domain_name
setEmailAddress()  : self
Sets email_address
setExpiresAt()  : self
Sets expires_at
setExpiresIn()  : self
Sets expires_in
setFavourite()  : self
Sets favourite
setInboxType()  : self
Sets inbox_type
setName()  : self
Sets name
setPrefix()  : self
Sets prefix
setTags()  : self
Sets tags
setters()  : array<string|int, mixed>
Array of attributes to setter functions (for deserialization of responses)
setUseDomainPool()  : self
Sets use_domain_pool
setUseShortAddress()  : self
Sets use_short_address
setVirtualInbox()  : self
Sets virtual_inbox
toHeaderValue()  : string
Gets a header-safe presentation of the object
valid()  : bool
Validate all the properties in the model return true if all passed
openAPINullables()  : array<string|int, mixed>
Array of nullable properties
getOpenAPINullablesSetToNull()  : array<string|int, bool>
Array of nullable field names deliberately set to null
setIfExists()  : void
Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array
setOpenAPINullablesSetToNull()  : void
Setter - Array of nullable field names deliberately set to null

Constants

INBOX_TYPE_HTTP_INBOX

public mixed INBOX_TYPE_HTTP_INBOX = 'HTTP_INBOX'

INBOX_TYPE_SMTP_INBOX

public mixed INBOX_TYPE_SMTP_INBOX = 'SMTP_INBOX'

Properties

$attributeMap

Array of attributes where the key is the local name, and the value is the original name

protected static array<string|int, string> $attributeMap = ['email_address' => 'emailAddress', 'domain_name' => 'domainName', 'domain_id' => 'domainId', 'name' => 'name', 'description' => 'description', 'use_domain_pool' => 'useDomainPool', 'tags' => 'tags', 'expires_at' => 'expiresAt', 'favourite' => 'favourite', 'expires_in' => 'expiresIn', 'allow_team_access' => 'allowTeamAccess', 'inbox_type' => 'inboxType', 'virtual_inbox' => 'virtualInbox', 'use_short_address' => 'useShortAddress', 'prefix' => 'prefix']

$container

Associative array for storing property values

protected array<string|int, mixed> $container = []

$getters

Array of attributes to getter functions (for serialization of requests)

protected static array<string|int, string> $getters = ['email_address' => 'getEmailAddress', 'domain_name' => 'getDomainName', 'domain_id' => 'getDomainId', 'name' => 'getName', 'description' => 'getDescription', 'use_domain_pool' => 'getUseDomainPool', 'tags' => 'getTags', 'expires_at' => 'getExpiresAt', 'favourite' => 'getFavourite', 'expires_in' => 'getExpiresIn', 'allow_team_access' => 'getAllowTeamAccess', 'inbox_type' => 'getInboxType', 'virtual_inbox' => 'getVirtualInbox', 'use_short_address' => 'getUseShortAddress', 'prefix' => 'getPrefix']

$openAPIFormats

Array of property to format mappings. Used for (de)serialization

protected static array<string|int, string> $openAPIFormats = ['email_address' => null, 'domain_name' => null, 'domain_id' => 'uuid', 'name' => null, 'description' => null, 'use_domain_pool' => null, 'tags' => null, 'expires_at' => 'date-time', 'favourite' => null, 'expires_in' => 'int64', 'allow_team_access' => null, 'inbox_type' => null, 'virtual_inbox' => null, 'use_short_address' => null, 'prefix' => null]
Tags
phpstan-var

array<string, string|null>

psalm-var

array<string, string|null>

$openAPIModelName

The original name of the model.

protected static string $openAPIModelName = 'CreateInboxDto'

$openAPINullables

Array of nullable properties. Used for (de)serialization

protected static array<string|int, mixed> $openAPINullables = ['email_address' => true, 'domain_name' => true, 'domain_id' => true, 'name' => true, 'description' => true, 'use_domain_pool' => true, 'tags' => true, 'expires_at' => true, 'favourite' => true, 'expires_in' => true, 'allow_team_access' => true, 'inbox_type' => true, 'virtual_inbox' => true, 'use_short_address' => true, 'prefix' => true]

$openAPINullablesSetToNull

If a nullable field gets set to null, insert it here

protected array<string|int, mixed> $openAPINullablesSetToNull = []

$openAPITypes

Array of property to type mappings. Used for (de)serialization

protected static array<string|int, string> $openAPITypes = ['email_address' => 'string', 'domain_name' => 'string', 'domain_id' => 'string', 'name' => 'string', 'description' => 'string', 'use_domain_pool' => 'bool', 'tags' => 'string[]', 'expires_at' => '\\DateTime', 'favourite' => 'bool', 'expires_in' => 'int', 'allow_team_access' => 'bool', 'inbox_type' => 'string', 'virtual_inbox' => 'bool', 'use_short_address' => 'bool', 'prefix' => 'string']

$setters

Array of attributes to setter functions (for deserialization of responses)

protected static array<string|int, string> $setters = ['email_address' => 'setEmailAddress', 'domain_name' => 'setDomainName', 'domain_id' => 'setDomainId', 'name' => 'setName', 'description' => 'setDescription', 'use_domain_pool' => 'setUseDomainPool', 'tags' => 'setTags', 'expires_at' => 'setExpiresAt', 'favourite' => 'setFavourite', 'expires_in' => 'setExpiresIn', 'allow_team_access' => 'setAllowTeamAccess', 'inbox_type' => 'setInboxType', 'virtual_inbox' => 'setVirtualInbox', 'use_short_address' => 'setUseShortAddress', 'prefix' => 'setPrefix']

Methods

__construct()

Constructor

public __construct([array<string|int, mixed> $data = null ]) : mixed
Parameters
$data : array<string|int, mixed> = null

Associated array of property values initializing the model

Return values
mixed

__toString()

Gets the string presentation of the object

public __toString() : string
Return values
string

attributeMap()

Array of attributes where the key is the local name, and the value is the original name

public static attributeMap() : array<string|int, mixed>
Return values
array<string|int, mixed>

getAllowTeamAccess()

Gets allow_team_access

public getAllowTeamAccess() : bool|null
Return values
bool|null

getDescription()

Gets description

public getDescription() : string|null
Return values
string|null

getDomainId()

Gets domain_id

public getDomainId() : string|null
Return values
string|null

getDomainName()

Gets domain_name

public getDomainName() : string|null
Return values
string|null

getEmailAddress()

Gets email_address

public getEmailAddress() : string|null
Return values
string|null

getExpiresAt()

Gets expires_at

public getExpiresAt() : DateTime|null
Return values
DateTime|null

getExpiresIn()

Gets expires_in

public getExpiresIn() : int|null
Return values
int|null

getFavourite()

Gets favourite

public getFavourite() : bool|null
Return values
bool|null

getInboxType()

Gets inbox_type

public getInboxType() : string|null
Return values
string|null

getInboxTypeAllowableValues()

Gets allowable values of the enum

public getInboxTypeAllowableValues() : array<string|int, string>
Return values
array<string|int, string>

getModelName()

The original name of the model.

public getModelName() : string
Return values
string

getName()

Gets name

public getName() : string|null
Return values
string|null

getPrefix()

Gets prefix

public getPrefix() : string|null
Return values
string|null

getTags()

Gets tags

public getTags() : array<string|int, string>|null
Return values
array<string|int, string>|null

getters()

Array of attributes to getter functions (for serialization of requests)

public static getters() : array<string|int, mixed>
Return values
array<string|int, mixed>

getUseDomainPool()

Gets use_domain_pool

public getUseDomainPool() : bool|null
Return values
bool|null

getUseShortAddress()

Gets use_short_address

public getUseShortAddress() : bool|null
Return values
bool|null

getVirtualInbox()

Gets virtual_inbox

public getVirtualInbox() : bool|null
Return values
bool|null

isNullable()

Checks if a property is nullable

public static isNullable(string $property) : bool
Parameters
$property : string
Return values
bool

isNullableSetToNull()

Checks if a nullable property is set to null.

public isNullableSetToNull(string $property) : bool
Parameters
$property : string
Return values
bool

listInvalidProperties()

Show all the invalid properties with reasons.

public listInvalidProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>

invalid properties with reasons

offsetExists()

Returns true if offset exists. False otherwise.

public offsetExists(int $offset) : bool
Parameters
$offset : int

Offset

Return values
bool

offsetGet()

Gets offset.

public offsetGet(int $offset) : mixed|null
Parameters
$offset : int

Offset

Return values
mixed|null

offsetSet()

Sets value based on offset.

public offsetSet(int|null $offset, mixed $value) : void
Parameters
$offset : int|null

Offset

$value : mixed

Value to be set

Return values
void

offsetUnset()

Unsets offset.

public offsetUnset(int $offset) : void
Parameters
$offset : int

Offset

Return values
void

openAPIFormats()

Array of property to format mappings. Used for (de)serialization

public static openAPIFormats() : array<string|int, mixed>
Return values
array<string|int, mixed>

openAPITypes()

Array of property to type mappings. Used for (de)serialization

public static openAPITypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

setAllowTeamAccess()

Sets allow_team_access

public setAllowTeamAccess(bool|null $allow_team_access) : self
Parameters
$allow_team_access : bool|null

DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization.

Return values
self

setDescription()

Sets description

public setDescription(string|null $description) : self
Parameters
$description : string|null

Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with

Return values
self

setDomainId()

Sets domain_id

public setDomainId(string|null $domain_id) : self
Parameters
$domain_id : string|null

ID of custom domain to use for email address.

Return values
self

setDomainName()

Sets domain_name

public setDomainName(string|null $domain_name) : self
Parameters
$domain_name : string|null

FQDN domain name for the domain you have verified. Will be appended with a randomly assigned recipient name. Use the emailAddress option instead to specify the full custom inbox.

Return values
self

setEmailAddress()

Sets email_address

public setEmailAddress(string|null $email_address) : self
Parameters
$email_address : string|null

A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as 123@mailslurp.com. If you use the useDomainPool option when the email address is null it will generate an email address with a more varied domain ending such as 123@mailslurp.info or 123@mailslurp.biz. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so SMTP inboxes will only work with SMTP type domains. Avoid SMTP inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.

Return values
self

setExpiresAt()

Sets expires_at

public setExpiresAt(DateTime|null $expires_at) : self
Parameters
$expires_at : DateTime|null

Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX.

Return values
self

setExpiresIn()

Sets expires_in

public setExpiresIn(int|null $expires_in) : self
Parameters
$expires_in : int|null

Number of milliseconds that inbox should exist for

Return values
self

setFavourite()

Sets favourite

public setFavourite(bool|null $favourite) : self
Parameters
$favourite : bool|null

Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering

Return values
self

setInboxType()

Sets inbox_type

public setInboxType(string|null $inbox_type) : self
Parameters
$inbox_type : string|null

Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).

Return values
self

setName()

Sets name

public setName(string|null $name) : self
Parameters
$name : string|null

Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.

Return values
self

setPrefix()

Sets prefix

public setPrefix(string|null $prefix) : self
Parameters
$prefix : string|null

Prefix to add before the email address for easier labelling or identification.

Return values
self

setTags()

Sets tags

public setTags(array<string|int, string>|null $tags) : self
Parameters
$tags : array<string|int, string>|null

Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.

Return values
self

setters()

Array of attributes to setter functions (for deserialization of responses)

public static setters() : array<string|int, mixed>
Return values
array<string|int, mixed>

setUseDomainPool()

Sets use_domain_pool

public setUseDomainPool(bool|null $use_domain_pool) : self
Parameters
$use_domain_pool : bool|null

Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default @mailslurp.com email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in @mailslurp.{world,info,xyz,...} . This means a TLD is randomly selecting from a list of .biz, .info, .xyz etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of @mailslurp.com or custom email address provided by the emailAddress field. Note this feature is only available for HTTP inbox types.

Return values
self

setUseShortAddress()

Sets use_short_address

public setUseShortAddress(bool|null $use_short_address) : self
Parameters
$use_short_address : bool|null

Use a shorter email address under 31 characters

Return values
self

setVirtualInbox()

Sets virtual_inbox

public setVirtualInbox(bool|null $virtual_inbox) : self
Parameters
$virtual_inbox : bool|null

Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending.

Return values
self

toHeaderValue()

Gets a header-safe presentation of the object

public toHeaderValue() : string
Return values
string

valid()

Validate all the properties in the model return true if all passed

public valid() : bool
Return values
bool

True if all properties are valid

openAPINullables()

Array of nullable properties

protected static openAPINullables() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOpenAPINullablesSetToNull()

Array of nullable field names deliberately set to null

private getOpenAPINullablesSetToNull() : array<string|int, bool>
Return values
array<string|int, bool>

setIfExists()

Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array

private setIfExists(string $variableName, array<string|int, mixed> $fields, mixed $defaultValue) : void
Parameters
$variableName : string
$fields : array<string|int, mixed>
$defaultValue : mixed
Return values
void

setOpenAPINullablesSetToNull()

Setter - Array of nullable field names deliberately set to null

private setOpenAPINullablesSetToNull(array<string|int, bool> $openAPINullablesSetToNull) : void
Parameters
$openAPINullablesSetToNull : array<string|int, bool>
Return values
void

Search results