TwilioMagicValues.Messaging (Twilio Magic Values v1.0.7) View Source

Wrapper for Twilio magic phone numbers used in tests sending SMS messages.

See: https://www.twilio.com/docs/iam/test-credentials#test-sms-messages

Link to this section Summary

Functions

Returns the magic phone number which is BLACKLISTED such that your account cannot send a message to it.

Returns the magic phone number which DOESNT SUPPORT RECEIVING SMS MESSAGES.

Returns the magic phone number which returns a GEO PERMISSION ERROR when sent an SMS message.

Returns the magic phone number which is INVALID and cannot receive SMS messages.

Returns the magic phone number which is INVALID as an SMS sender.

Returns the magic phone number which is CANT SEND SMS.

Returns the magic phone number which has a FULL OUTGOING SMS QUEUE.

All other phone numbers are potentially valid and are verified normally.

Returns the magic phone number which is NOT VERIFIED OR OWNED BY YOUR ACCOUNT and cannot be used as an SMS sender.

Returns the magic phone number which is UNROUTABLE and cannot receive SMS messages.

Returns the magic phone number which can send SMS messages.

Link to this section Functions

Returns the magic phone number which is BLACKLISTED such that your account cannot send a message to it.

Expect the 21610 API error from Twilio.

Example

iex> map = send_message(from: TwilioMagicValues.Messaging.valid_sender(), to: TwilioMagicValues.Messaging.blacklisted_recipient())
iex> Map.get(map, :code)
21610

Returns the magic phone number which DOESNT SUPPORT RECEIVING SMS MESSAGES.

Expect the 21614 API error from Twilio.

Example

iex> map = send_message(from: TwilioMagicValues.Messaging.valid_sender(), to: TwilioMagicValues.Messaging.cant_receive_sms())
iex> Map.get(map, :code)
21614

Returns the magic phone number which returns a GEO PERMISSION ERROR when sent an SMS message.

Expect the 21408 API error from Twilio.

Example

iex> map = send_message(from: TwilioMagicValues.Messaging.valid_sender(), to: TwilioMagicValues.Messaging.geo_blocked_recipient())
iex> Map.get(map, :code)
21408

Returns the magic phone number which is INVALID and cannot receive SMS messages.

Expect the 21211 API error from Twilio.

Example

iex> map = send_message(from: TwilioMagicValues.Messaging.valid_sender(), to: TwilioMagicValues.Messaging.invalid_recipient())
iex> Map.get(map, :code)
21211

Returns the magic phone number which is INVALID as an SMS sender.

Expect the 21212 API error from Twilio.

Example

iex> map = send_message(from: TwilioMagicValues.Messaging.invalid_sender(), to: TwilioMagicValues.Messaging.to_other("+17148673509"))
iex> Map.get(map, :code)
21212

Returns the magic phone number which is CANT SEND SMS.

Expect the 21606 API error from Twilio.

Example

iex> map = send_message(from: TwilioMagicValues.Messaging.sender_cant_send_sms(), to: TwilioMagicValues.Messaging.to_other("+17148673509"))
iex> Map.get(map, :code)
21606

Returns the magic phone number which has a FULL OUTGOING SMS QUEUE.

Expect the 21611 API error from Twilio.

Example

iex> map = send_message(from: TwilioMagicValues.Messaging.sender_queue_full(), to: TwilioMagicValues.Messaging.to_other("+17148673509"))
iex> Map.get(map, :code)
21611

All other phone numbers are potentially valid and are verified normally.

Errors are dependent on input.

Returns the magic phone number which is NOT VERIFIED OR OWNED BY YOUR ACCOUNT and cannot be used as an SMS sender.

Expect the 21606 API error from Twilio.

Example

iex> map = send_message(from: TwilioMagicValues.Messaging.unowned_number(), to: TwilioMagicValues.Messaging.to_other("+17148673509"))
iex> Map.get(map, :code)
21606

Returns the magic phone number which is UNROUTABLE and cannot receive SMS messages.

Expect the 21612 API error from Twilio.

Example

iex> map = send_message(from: TwilioMagicValues.Messaging.valid_sender(), to: TwilioMagicValues.Messaging.unroutable_recipient())
iex> Map.get(map, :code)
21612

Returns the magic phone number which can send SMS messages.

Expect no error.

Example

iex> map = send_message(from: TwilioMagicValues.Messaging.valid_sender(), to: TwilioMagicValues.Messaging.to_other("+17148673509"))
iex> Map.get(map, :code, "There is no error code")
"There is no error code"
iex> Map.get(map, :num_segments)
"1"
iex> Map.get(map, :num_media)
"0"