View Source ExTwilio.Notify.Binding (ExTwilio v0.10.0)
Represents a Binding resource in the Twilio Notify.
identity The Identity to which this Binding belongs to. Identity is defined by your application. Up to 20 Bindings can be created for the same Identity in a given Service.
binding_type The type of the Binding. This determines the transport technology to use. Allowed values:
apn
,fcm
,gcm
,sms
, andfacebook-messenger
.address The address specific to the channel. For APNS it is the device token. For FCM and GCM it is the registration token. For SMS it is a phone number in E.164 format. For Facebook Messenger it is the Messenger ID of the user or a phone number in E.164 format.
tag The list of tags associated with this Binding. Tags can be used to select the Bindings to use when sending a notification. Maximum 20 tags are allowed.
notification_protocol_version The version of the protocol (data format) used to send the notification. This defaults to the value of DefaultXXXNotificationProtocolVersion in the
ExTwilio.Notify.Service
. The current version is"3"
forapn
,fcm
, andgcm
type Bindings. The parameter is not applicable tosms
andfacebook-messenger
type Bindings as the data format is fixed.credential_sid The unique identifier (SID) of the
ExTwilio.Notify.Credential
resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applicable only toapn
,fcm
, andgcm
type Bindings.
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.Notify.Binding{ account_sid: term(), address: term(), binding_type: term(), credential_sid: term(), date_created: term(), date_updated: term(), identity: term(), links: term(), notification_protocol_version: term(), service_sid: term(), sid: term(), tag: term(), tags: term(), url: term() }, list() ) :: %ExTwilio.Notify.Binding{ account_sid: term(), address: term(), binding_type: term(), credential_sid: term(), date_created: term(), date_updated: term(), identity: term(), links: term(), notification_protocol_version: term(), service_sid: term(), sid: term(), tag: term(), tags: term(), url: term() }
@spec find(String.t() | nil, list()) :: ExTwilio.Parser.parsed_list_response()
@spec new() :: %ExTwilio.Notify.Binding{ account_sid: term(), address: term(), binding_type: term(), credential_sid: term(), date_created: term(), date_updated: term(), identity: term(), links: term(), notification_protocol_version: term(), service_sid: term(), sid: term(), tag: term(), tags: term(), url: term() }
@spec new(list()) :: %ExTwilio.Notify.Binding{ account_sid: term(), address: term(), binding_type: term(), credential_sid: term(), date_created: term(), date_updated: term(), identity: term(), links: term(), notification_protocol_version: term(), service_sid: term(), sid: term(), tag: term(), tags: term(), url: 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()