View Source ExTwilio.Notify.Credential (ExTwilio v0.10.0)
Represents a Credential resource in the Twilio Notify.
type Credential type, one of "gcm", "fcm", or "apn"
friendly_name Friendly name for stored credential
certificate [APN only] URL encoded representation of the certificate. Strip everything outside of the headers, e.g.
-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----
private_key [APN only] URL encoded representation of the private key. Strip everything outside of the headers, e.g.
-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR .-----END RSA PRIVATE KEY-----
sandbox [APN only] use this credential for sending to production or sandbox APNs (string
true
orfalse
)api_key [GCM only] This is the "Server key" of your project from Firebase console under Settings / Cloud messaging. Yes, you can use the server key from the Firebase console for GCM.
secret [FCM only] This is the "Server key" of your project from Firebase console under Settings / Cloud messaging.
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.Credential{ account_sid: term(), api_key: term(), certificate: term(), date_created: term(), date_updated: term(), friendly_name: term(), private_key: term(), sandbox: term(), secret: term(), sid: term(), type: term(), url: term() }, list() ) :: %ExTwilio.Notify.Credential{ account_sid: term(), api_key: term(), certificate: term(), date_created: term(), date_updated: term(), friendly_name: term(), private_key: term(), sandbox: term(), secret: term(), sid: term(), type: term(), url: term() }
@spec find(String.t() | nil, list()) :: ExTwilio.Parser.parsed_list_response()
@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()