View Source ExTwilio.Message (ExTwilio v0.10.0)
Represents an Message resource in the Twilio API.
Examples
Here is an example of sending an SMS message:
{target_number, twilio_number_you_own, body} = {"+12223334444", "+19223334444", "Hello World"}
ExTwilio.Message.create(to: target_number, from: twilio_number_you_own, body: body)
Summary
Functions
Children represent path segments that come after the current resource. For example,
in the path /v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/Active
"Active" is
a child. Children may or may not have a key in the next segment.
Parents represent path segments that precede the current resource. For example,
in the path /v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users
"Services" is
a parent. Parents will always have a key in the next segment. If your parent is under a
submodule of ExTwilio
, specify your parent using the ExTwilio.Parent
struct.
Underscored and lowercased collection name for a given resource.
Delegates the real work to ExTwilio.UrlGenerator.resource_collection_name/1
by
default.
CamelCase resource name as it would be used in Twilio's API. Delegates
the real work to ExTwilio.UrlGenerator.resource_name/1
by default.
Functions
@spec children() :: list()
Children represent path segments that come after the current resource. For example,
in the path /v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/Active
"Active" is
a child. Children may or may not have a key in the next segment.
Override this method in your resource to specify children in the order that they will appear in the path.
@spec create(ExTwilio.Api.data(), list()) :: ExTwilio.Parser.parsed_response()
@spec destroy(String.t(), list()) :: ExTwilio.Parser.success_delete() | ExTwilio.Parser.error()
@spec do_new( %ExTwilio.Message{ account_sid: term(), api_version: term(), body: term(), date_created: term(), date_sent: term(), date_updated: term(), direction: term(), error_code: term(), error_message: term(), from: term(), messaging_service_sid: term(), num_media: term(), num_segments: term(), price: term(), price_unit: term(), sid: term(), status: term(), subresource_uri: term(), to: term(), uri: term() }, list() ) :: %ExTwilio.Message{ account_sid: term(), api_version: term(), body: term(), date_created: term(), date_sent: term(), date_updated: term(), direction: term(), error_code: term(), error_message: term(), from: term(), messaging_service_sid: term(), num_media: term(), num_segments: term(), price: term(), price_unit: term(), sid: term(), status: term(), subresource_uri: term(), to: term(), uri: term() }
@spec find(String.t() | nil, list()) :: ExTwilio.Parser.parsed_list_response()
@spec new() :: %ExTwilio.Message{ account_sid: term(), api_version: term(), body: term(), date_created: term(), date_sent: term(), date_updated: term(), direction: term(), error_code: term(), error_message: term(), from: term(), messaging_service_sid: term(), num_media: term(), num_segments: term(), price: term(), price_unit: term(), sid: term(), status: term(), subresource_uri: term(), to: term(), uri: term() }
@spec new(list()) :: %ExTwilio.Message{ account_sid: term(), api_version: term(), body: term(), date_created: term(), date_sent: term(), date_updated: term(), direction: term(), error_code: term(), error_message: term(), from: term(), messaging_service_sid: term(), num_media: term(), num_segments: term(), price: term(), price_unit: term(), sid: term(), status: term(), subresource_uri: term(), to: term(), uri: term() }
@spec parents() :: list()
Parents represent path segments that precede the current resource. For example,
in the path /v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users
"Services" is
a parent. Parents will always have a key in the next segment. If your parent is under a
submodule of ExTwilio
, specify your parent using the ExTwilio.Parent
struct.
Override this method in your resource to specify parents in the order that they will appear in the path.
Underscored and lowercased collection name for a given resource.
Delegates the real work to ExTwilio.UrlGenerator.resource_collection_name/1
by
default.
Override in your module after use ExTwilio.Resource
if you need
something different.
CamelCase resource name as it would be used in Twilio's API. Delegates
the real work to ExTwilio.UrlGenerator.resource_name/1
by default.
Override in your module after use ExTwilio.Resource
if you need
something different.
@spec update(String.t(), ExTwilio.Api.data(), list()) :: ExTwilio.Parser.parsed_response()