Documentation ¶
Index ¶
- type ApiService
- func (c *ApiService) CreateBinding(ServiceSid string, params *CreateBindingParams) (*NotifyV1Binding, error)
- func (c *ApiService) CreateCredential(params *CreateCredentialParams) (*NotifyV1Credential, error)
- func (c *ApiService) CreateNotification(ServiceSid string, params *CreateNotificationParams) (*NotifyV1Notification, error)
- func (c *ApiService) CreateService(params *CreateServiceParams) (*NotifyV1Service, error)
- func (c *ApiService) DeleteBinding(ServiceSid string, Sid string) error
- func (c *ApiService) DeleteCredential(Sid string) error
- func (c *ApiService) DeleteService(Sid string) error
- func (c *ApiService) FetchBinding(ServiceSid string, Sid string) (*NotifyV1Binding, error)
- func (c *ApiService) FetchCredential(Sid string) (*NotifyV1Credential, error)
- func (c *ApiService) FetchService(Sid string) (*NotifyV1Service, error)
- func (c *ApiService) ListBinding(ServiceSid string, params *ListBindingParams) ([]NotifyV1Binding, error)
- func (c *ApiService) ListCredential(params *ListCredentialParams) ([]NotifyV1Credential, error)
- func (c *ApiService) ListService(params *ListServiceParams) ([]NotifyV1Service, error)
- func (c *ApiService) PageBinding(ServiceSid string, params *ListBindingParams, pageToken, pageNumber string) (*ListBindingResponse, error)
- func (c *ApiService) PageCredential(params *ListCredentialParams, pageToken, pageNumber string) (*ListCredentialResponse, error)
- func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumber string) (*ListServiceResponse, error)
- func (c *ApiService) StreamBinding(ServiceSid string, params *ListBindingParams) (chan NotifyV1Binding, chan error)
- func (c *ApiService) StreamCredential(params *ListCredentialParams) (chan NotifyV1Credential, chan error)
- func (c *ApiService) StreamService(params *ListServiceParams) (chan NotifyV1Service, chan error)
- func (c *ApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*NotifyV1Credential, error)
- func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*NotifyV1Service, error)
- type CreateBindingParams
- func (params *CreateBindingParams) SetAddress(Address string) *CreateBindingParams
- func (params *CreateBindingParams) SetBindingType(BindingType string) *CreateBindingParams
- func (params *CreateBindingParams) SetCredentialSid(CredentialSid string) *CreateBindingParams
- func (params *CreateBindingParams) SetEndpoint(Endpoint string) *CreateBindingParams
- func (params *CreateBindingParams) SetIdentity(Identity string) *CreateBindingParams
- func (params *CreateBindingParams) SetNotificationProtocolVersion(NotificationProtocolVersion string) *CreateBindingParams
- func (params *CreateBindingParams) SetTag(Tag []string) *CreateBindingParams
- type CreateCredentialParams
- func (params *CreateCredentialParams) SetApiKey(ApiKey string) *CreateCredentialParams
- func (params *CreateCredentialParams) SetCertificate(Certificate string) *CreateCredentialParams
- func (params *CreateCredentialParams) SetFriendlyName(FriendlyName string) *CreateCredentialParams
- func (params *CreateCredentialParams) SetPrivateKey(PrivateKey string) *CreateCredentialParams
- func (params *CreateCredentialParams) SetSandbox(Sandbox bool) *CreateCredentialParams
- func (params *CreateCredentialParams) SetSecret(Secret string) *CreateCredentialParams
- func (params *CreateCredentialParams) SetType(Type string) *CreateCredentialParams
- type CreateNotificationParams
- func (params *CreateNotificationParams) SetAction(Action string) *CreateNotificationParams
- func (params *CreateNotificationParams) SetAlexa(Alexa interface{}) *CreateNotificationParams
- func (params *CreateNotificationParams) SetApn(Apn interface{}) *CreateNotificationParams
- func (params *CreateNotificationParams) SetBody(Body string) *CreateNotificationParams
- func (params *CreateNotificationParams) SetData(Data interface{}) *CreateNotificationParams
- func (params *CreateNotificationParams) SetDeliveryCallbackUrl(DeliveryCallbackUrl string) *CreateNotificationParams
- func (params *CreateNotificationParams) SetFacebookMessenger(FacebookMessenger interface{}) *CreateNotificationParams
- func (params *CreateNotificationParams) SetFcm(Fcm interface{}) *CreateNotificationParams
- func (params *CreateNotificationParams) SetGcm(Gcm interface{}) *CreateNotificationParams
- func (params *CreateNotificationParams) SetIdentity(Identity []string) *CreateNotificationParams
- func (params *CreateNotificationParams) SetPriority(Priority string) *CreateNotificationParams
- func (params *CreateNotificationParams) SetSegment(Segment []string) *CreateNotificationParams
- func (params *CreateNotificationParams) SetSms(Sms interface{}) *CreateNotificationParams
- func (params *CreateNotificationParams) SetSound(Sound string) *CreateNotificationParams
- func (params *CreateNotificationParams) SetTag(Tag []string) *CreateNotificationParams
- func (params *CreateNotificationParams) SetTitle(Title string) *CreateNotificationParams
- func (params *CreateNotificationParams) SetToBinding(ToBinding []string) *CreateNotificationParams
- func (params *CreateNotificationParams) SetTtl(Ttl int) *CreateNotificationParams
- type CreateServiceParams
- func (params *CreateServiceParams) SetAlexaSkillId(AlexaSkillId string) *CreateServiceParams
- func (params *CreateServiceParams) SetApnCredentialSid(ApnCredentialSid string) *CreateServiceParams
- func (params *CreateServiceParams) SetDefaultAlexaNotificationProtocolVersion(DefaultAlexaNotificationProtocolVersion string) *CreateServiceParams
- func (params *CreateServiceParams) SetDefaultApnNotificationProtocolVersion(DefaultApnNotificationProtocolVersion string) *CreateServiceParams
- func (params *CreateServiceParams) SetDefaultFcmNotificationProtocolVersion(DefaultFcmNotificationProtocolVersion string) *CreateServiceParams
- func (params *CreateServiceParams) SetDefaultGcmNotificationProtocolVersion(DefaultGcmNotificationProtocolVersion string) *CreateServiceParams
- func (params *CreateServiceParams) SetDeliveryCallbackEnabled(DeliveryCallbackEnabled bool) *CreateServiceParams
- func (params *CreateServiceParams) SetDeliveryCallbackUrl(DeliveryCallbackUrl string) *CreateServiceParams
- func (params *CreateServiceParams) SetFacebookMessengerPageId(FacebookMessengerPageId string) *CreateServiceParams
- func (params *CreateServiceParams) SetFcmCredentialSid(FcmCredentialSid string) *CreateServiceParams
- func (params *CreateServiceParams) SetFriendlyName(FriendlyName string) *CreateServiceParams
- func (params *CreateServiceParams) SetGcmCredentialSid(GcmCredentialSid string) *CreateServiceParams
- func (params *CreateServiceParams) SetLogEnabled(LogEnabled bool) *CreateServiceParams
- func (params *CreateServiceParams) SetMessagingServiceSid(MessagingServiceSid string) *CreateServiceParams
- type ListBindingParams
- func (params *ListBindingParams) SetEndDate(EndDate string) *ListBindingParams
- func (params *ListBindingParams) SetIdentity(Identity []string) *ListBindingParams
- func (params *ListBindingParams) SetLimit(Limit int) *ListBindingParams
- func (params *ListBindingParams) SetPageSize(PageSize int) *ListBindingParams
- func (params *ListBindingParams) SetStartDate(StartDate string) *ListBindingParams
- func (params *ListBindingParams) SetTag(Tag []string) *ListBindingParams
- type ListBindingResponse
- type ListBindingResponseMeta
- type ListCredentialParams
- type ListCredentialResponse
- type ListServiceParams
- type ListServiceResponse
- type NotifyV1Binding
- type NotifyV1Credential
- type NotifyV1Notification
- type NotifyV1Service
- type UpdateCredentialParams
- func (params *UpdateCredentialParams) SetApiKey(ApiKey string) *UpdateCredentialParams
- func (params *UpdateCredentialParams) SetCertificate(Certificate string) *UpdateCredentialParams
- func (params *UpdateCredentialParams) SetFriendlyName(FriendlyName string) *UpdateCredentialParams
- func (params *UpdateCredentialParams) SetPrivateKey(PrivateKey string) *UpdateCredentialParams
- func (params *UpdateCredentialParams) SetSandbox(Sandbox bool) *UpdateCredentialParams
- func (params *UpdateCredentialParams) SetSecret(Secret string) *UpdateCredentialParams
- type UpdateServiceParams
- func (params *UpdateServiceParams) SetAlexaSkillId(AlexaSkillId string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetApnCredentialSid(ApnCredentialSid string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetDefaultAlexaNotificationProtocolVersion(DefaultAlexaNotificationProtocolVersion string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetDefaultApnNotificationProtocolVersion(DefaultApnNotificationProtocolVersion string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetDefaultFcmNotificationProtocolVersion(DefaultFcmNotificationProtocolVersion string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetDefaultGcmNotificationProtocolVersion(DefaultGcmNotificationProtocolVersion string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetDeliveryCallbackEnabled(DeliveryCallbackEnabled bool) *UpdateServiceParams
- func (params *UpdateServiceParams) SetDeliveryCallbackUrl(DeliveryCallbackUrl string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetFacebookMessengerPageId(FacebookMessengerPageId string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetFcmCredentialSid(FcmCredentialSid string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetFriendlyName(FriendlyName string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetGcmCredentialSid(GcmCredentialSid string) *UpdateServiceParams
- func (params *UpdateServiceParams) SetLogEnabled(LogEnabled bool) *UpdateServiceParams
- func (params *UpdateServiceParams) SetMessagingServiceSid(MessagingServiceSid string) *UpdateServiceParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiService ¶ added in v0.11.0
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶ added in v0.11.0
func NewApiService(requestHandler *twilio.RequestHandler) *ApiService
func NewApiServiceWithClient ¶ added in v0.11.0
func NewApiServiceWithClient(client twilio.BaseClient) *ApiService
func (*ApiService) CreateBinding ¶ added in v0.11.0
func (c *ApiService) CreateBinding(ServiceSid string, params *CreateBindingParams) (*NotifyV1Binding, error)
func (*ApiService) CreateCredential ¶ added in v0.11.0
func (c *ApiService) CreateCredential(params *CreateCredentialParams) (*NotifyV1Credential, error)
func (*ApiService) CreateNotification ¶ added in v0.11.0
func (c *ApiService) CreateNotification(ServiceSid string, params *CreateNotificationParams) (*NotifyV1Notification, error)
func (*ApiService) CreateService ¶ added in v0.11.0
func (c *ApiService) CreateService(params *CreateServiceParams) (*NotifyV1Service, error)
func (*ApiService) DeleteBinding ¶ added in v0.11.0
func (c *ApiService) DeleteBinding(ServiceSid string, Sid string) error
func (*ApiService) DeleteCredential ¶ added in v0.11.0
func (c *ApiService) DeleteCredential(Sid string) error
func (*ApiService) DeleteService ¶ added in v0.11.0
func (c *ApiService) DeleteService(Sid string) error
func (*ApiService) FetchBinding ¶ added in v0.11.0
func (c *ApiService) FetchBinding(ServiceSid string, Sid string) (*NotifyV1Binding, error)
func (*ApiService) FetchCredential ¶ added in v0.11.0
func (c *ApiService) FetchCredential(Sid string) (*NotifyV1Credential, error)
func (*ApiService) FetchService ¶ added in v0.11.0
func (c *ApiService) FetchService(Sid string) (*NotifyV1Service, error)
func (*ApiService) ListBinding ¶ added in v0.11.0
func (c *ApiService) ListBinding(ServiceSid string, params *ListBindingParams) ([]NotifyV1Binding, error)
Lists Binding records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) ListCredential ¶ added in v0.11.0
func (c *ApiService) ListCredential(params *ListCredentialParams) ([]NotifyV1Credential, error)
Lists Credential records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) ListService ¶ added in v0.11.0
func (c *ApiService) ListService(params *ListServiceParams) ([]NotifyV1Service, error)
Lists Service records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) PageBinding ¶ added in v0.13.0
func (c *ApiService) PageBinding(ServiceSid string, params *ListBindingParams, pageToken, pageNumber string) (*ListBindingResponse, error)
Retrieve a single page of Binding records from the API. Request is executed immediately.
func (*ApiService) PageCredential ¶ added in v0.13.0
func (c *ApiService) PageCredential(params *ListCredentialParams, pageToken, pageNumber string) (*ListCredentialResponse, error)
Retrieve a single page of Credential records from the API. Request is executed immediately.
func (*ApiService) PageService ¶ added in v0.13.0
func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumber string) (*ListServiceResponse, error)
Retrieve a single page of Service records from the API. Request is executed immediately.
func (*ApiService) StreamBinding ¶ added in v0.13.0
func (c *ApiService) StreamBinding(ServiceSid string, params *ListBindingParams) (chan NotifyV1Binding, chan error)
Streams Binding records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) StreamCredential ¶ added in v0.13.0
func (c *ApiService) StreamCredential(params *ListCredentialParams) (chan NotifyV1Credential, chan error)
Streams Credential records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) StreamService ¶ added in v0.13.0
func (c *ApiService) StreamService(params *ListServiceParams) (chan NotifyV1Service, chan error)
Streams Service records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) UpdateCredential ¶ added in v0.11.0
func (c *ApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*NotifyV1Credential, error)
func (*ApiService) UpdateService ¶ added in v0.11.0
func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*NotifyV1Service, error)
type CreateBindingParams ¶
type CreateBindingParams struct { // The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Up to 20 Bindings can be created for the same Identity in a given Service. Identity *string `json:"Identity,omitempty"` // BindingType *string `json:"BindingType,omitempty"` // The channel-specific address. For APNS, the device token. For FCM and GCM, the registration token. For SMS, a phone number in E.164 format. For Facebook Messenger, the Messenger ID of the user or a phone number in E.164 format. Address *string `json:"Address,omitempty"` // A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags. Tag *[]string `json:"Tag,omitempty"` // The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `\\\"3\\\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed. NotificationProtocolVersion *string `json:"NotificationProtocolVersion,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applies to only `apn`, `fcm`, and `gcm` type Bindings. CredentialSid *string `json:"CredentialSid,omitempty"` // Deprecated. Endpoint *string `json:"Endpoint,omitempty"` }
Optional parameters for the method 'CreateBinding'
func (*CreateBindingParams) SetAddress ¶
func (params *CreateBindingParams) SetAddress(Address string) *CreateBindingParams
func (*CreateBindingParams) SetBindingType ¶
func (params *CreateBindingParams) SetBindingType(BindingType string) *CreateBindingParams
func (*CreateBindingParams) SetCredentialSid ¶
func (params *CreateBindingParams) SetCredentialSid(CredentialSid string) *CreateBindingParams
func (*CreateBindingParams) SetEndpoint ¶
func (params *CreateBindingParams) SetEndpoint(Endpoint string) *CreateBindingParams
func (*CreateBindingParams) SetIdentity ¶
func (params *CreateBindingParams) SetIdentity(Identity string) *CreateBindingParams
func (*CreateBindingParams) SetNotificationProtocolVersion ¶
func (params *CreateBindingParams) SetNotificationProtocolVersion(NotificationProtocolVersion string) *CreateBindingParams
func (*CreateBindingParams) SetTag ¶
func (params *CreateBindingParams) SetTag(Tag []string) *CreateBindingParams
type CreateCredentialParams ¶
type CreateCredentialParams struct { // Type *string `json:"Type,omitempty"` // A descriptive string that you create to describe the resource. It can be up to 64 characters long. FriendlyName *string `json:"FriendlyName,omitempty"` // [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` Certificate *string `json:"Certificate,omitempty"` // [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----` PrivateKey *string `json:"PrivateKey,omitempty"` // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. Sandbox *bool `json:"Sandbox,omitempty"` // [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. ApiKey *string `json:"ApiKey,omitempty"` // [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. Secret *string `json:"Secret,omitempty"` }
Optional parameters for the method 'CreateCredential'
func (*CreateCredentialParams) SetApiKey ¶
func (params *CreateCredentialParams) SetApiKey(ApiKey string) *CreateCredentialParams
func (*CreateCredentialParams) SetCertificate ¶
func (params *CreateCredentialParams) SetCertificate(Certificate string) *CreateCredentialParams
func (*CreateCredentialParams) SetFriendlyName ¶
func (params *CreateCredentialParams) SetFriendlyName(FriendlyName string) *CreateCredentialParams
func (*CreateCredentialParams) SetPrivateKey ¶
func (params *CreateCredentialParams) SetPrivateKey(PrivateKey string) *CreateCredentialParams
func (*CreateCredentialParams) SetSandbox ¶
func (params *CreateCredentialParams) SetSandbox(Sandbox bool) *CreateCredentialParams
func (*CreateCredentialParams) SetSecret ¶
func (params *CreateCredentialParams) SetSecret(Secret string) *CreateCredentialParams
func (*CreateCredentialParams) SetType ¶
func (params *CreateCredentialParams) SetType(Type string) *CreateCredentialParams
type CreateNotificationParams ¶
type CreateNotificationParams struct { // The notification text. For FCM and GCM, translates to `data.twi_body`. For APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS requires either this `body` value, or `media_urls` attribute defined in the `sms` parameter of the notification. Body *string `json:"Body,omitempty"` // Priority *string `json:"Priority,omitempty"` // How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property. Ttl *int `json:"Ttl,omitempty"` // The notification title. For FCM and GCM, this translates to the `data.twi_title` value. For APNS, this translates to the `aps.alert.title` value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices. Title *string `json:"Title,omitempty"` // The name of the sound to be played for the notification. For FCM and GCM, this Translates to `data.twi_sound`. For APNS, this translates to `aps.sound`. SMS does not support this property. Sound *string `json:"Sound,omitempty"` // The actions to display for the notification. For APNS, translates to the `aps.category` value. For GCM, translates to the `data.twi_action` value. For SMS, this parameter is not supported and is omitted from deliveries to those channels. Action *string `json:"Action,omitempty"` // The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. Data *interface{} `json:"Data,omitempty"` // The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. Apn *interface{} `json:"Apn,omitempty"` // The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). Gcm *interface{} `json:"Gcm,omitempty"` // The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. Sms *interface{} `json:"Sms,omitempty"` // Deprecated. FacebookMessenger *interface{} `json:"FacebookMessenger,omitempty"` // The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. Fcm *interface{} `json:"Fcm,omitempty"` // The Segment resource is deprecated. Use the `tag` parameter, instead. Segment *[]string `json:"Segment,omitempty"` // Deprecated. Alexa *interface{} `json:"Alexa,omitempty"` // The destination address specified as a JSON string. Multiple `to_binding` parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers. ToBinding *[]string `json:"ToBinding,omitempty"` // URL to send webhooks. DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` // The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Delivery will be attempted only to Bindings with an Identity in this list. No more than 20 items are allowed in this list. Identity *[]string `json:"Identity,omitempty"` // A tag that selects the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 5 tags. The implicit tag `all` is available to notify all Bindings in a Service instance. Similarly, the implicit tags `apn`, `fcm`, `gcm`, `sms` and `facebook-messenger` are available to notify all Bindings in a specific channel. Tag *[]string `json:"Tag,omitempty"` }
Optional parameters for the method 'CreateNotification'
func (*CreateNotificationParams) SetAction ¶
func (params *CreateNotificationParams) SetAction(Action string) *CreateNotificationParams
func (*CreateNotificationParams) SetAlexa ¶
func (params *CreateNotificationParams) SetAlexa(Alexa interface{}) *CreateNotificationParams
func (*CreateNotificationParams) SetApn ¶
func (params *CreateNotificationParams) SetApn(Apn interface{}) *CreateNotificationParams
func (*CreateNotificationParams) SetBody ¶
func (params *CreateNotificationParams) SetBody(Body string) *CreateNotificationParams
func (*CreateNotificationParams) SetData ¶
func (params *CreateNotificationParams) SetData(Data interface{}) *CreateNotificationParams
func (*CreateNotificationParams) SetDeliveryCallbackUrl ¶
func (params *CreateNotificationParams) SetDeliveryCallbackUrl(DeliveryCallbackUrl string) *CreateNotificationParams
func (*CreateNotificationParams) SetFacebookMessenger ¶
func (params *CreateNotificationParams) SetFacebookMessenger(FacebookMessenger interface{}) *CreateNotificationParams
func (*CreateNotificationParams) SetFcm ¶
func (params *CreateNotificationParams) SetFcm(Fcm interface{}) *CreateNotificationParams
func (*CreateNotificationParams) SetGcm ¶
func (params *CreateNotificationParams) SetGcm(Gcm interface{}) *CreateNotificationParams
func (*CreateNotificationParams) SetIdentity ¶
func (params *CreateNotificationParams) SetIdentity(Identity []string) *CreateNotificationParams
func (*CreateNotificationParams) SetPriority ¶
func (params *CreateNotificationParams) SetPriority(Priority string) *CreateNotificationParams
func (*CreateNotificationParams) SetSegment ¶
func (params *CreateNotificationParams) SetSegment(Segment []string) *CreateNotificationParams
func (*CreateNotificationParams) SetSms ¶
func (params *CreateNotificationParams) SetSms(Sms interface{}) *CreateNotificationParams
func (*CreateNotificationParams) SetSound ¶
func (params *CreateNotificationParams) SetSound(Sound string) *CreateNotificationParams
func (*CreateNotificationParams) SetTag ¶
func (params *CreateNotificationParams) SetTag(Tag []string) *CreateNotificationParams
func (*CreateNotificationParams) SetTitle ¶
func (params *CreateNotificationParams) SetTitle(Title string) *CreateNotificationParams
func (*CreateNotificationParams) SetToBinding ¶
func (params *CreateNotificationParams) SetToBinding(ToBinding []string) *CreateNotificationParams
func (*CreateNotificationParams) SetTtl ¶
func (params *CreateNotificationParams) SetTtl(Ttl int) *CreateNotificationParams
type CreateServiceParams ¶
type CreateServiceParams struct { // A descriptive string that you create to describe the resource. It can be up to 64 characters long. FriendlyName *string `json:"FriendlyName,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` // The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` // Deprecated. FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` // The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` // The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` // The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` // Whether to log notifications. Can be: `true` or `false` and the default is `true`. LogEnabled *bool `json:"LogEnabled,omitempty"` // Deprecated. AlexaSkillId *string `json:"AlexaSkillId,omitempty"` // Deprecated. DefaultAlexaNotificationProtocolVersion *string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` // URL to send delivery status callback. DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` // Callback configuration that enables delivery callbacks, default false DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` }
Optional parameters for the method 'CreateService'
func (*CreateServiceParams) SetAlexaSkillId ¶
func (params *CreateServiceParams) SetAlexaSkillId(AlexaSkillId string) *CreateServiceParams
func (*CreateServiceParams) SetApnCredentialSid ¶
func (params *CreateServiceParams) SetApnCredentialSid(ApnCredentialSid string) *CreateServiceParams
func (*CreateServiceParams) SetDefaultAlexaNotificationProtocolVersion ¶
func (params *CreateServiceParams) SetDefaultAlexaNotificationProtocolVersion(DefaultAlexaNotificationProtocolVersion string) *CreateServiceParams
func (*CreateServiceParams) SetDefaultApnNotificationProtocolVersion ¶
func (params *CreateServiceParams) SetDefaultApnNotificationProtocolVersion(DefaultApnNotificationProtocolVersion string) *CreateServiceParams
func (*CreateServiceParams) SetDefaultFcmNotificationProtocolVersion ¶
func (params *CreateServiceParams) SetDefaultFcmNotificationProtocolVersion(DefaultFcmNotificationProtocolVersion string) *CreateServiceParams
func (*CreateServiceParams) SetDefaultGcmNotificationProtocolVersion ¶
func (params *CreateServiceParams) SetDefaultGcmNotificationProtocolVersion(DefaultGcmNotificationProtocolVersion string) *CreateServiceParams
func (*CreateServiceParams) SetDeliveryCallbackEnabled ¶
func (params *CreateServiceParams) SetDeliveryCallbackEnabled(DeliveryCallbackEnabled bool) *CreateServiceParams
func (*CreateServiceParams) SetDeliveryCallbackUrl ¶
func (params *CreateServiceParams) SetDeliveryCallbackUrl(DeliveryCallbackUrl string) *CreateServiceParams
func (*CreateServiceParams) SetFacebookMessengerPageId ¶
func (params *CreateServiceParams) SetFacebookMessengerPageId(FacebookMessengerPageId string) *CreateServiceParams
func (*CreateServiceParams) SetFcmCredentialSid ¶
func (params *CreateServiceParams) SetFcmCredentialSid(FcmCredentialSid string) *CreateServiceParams
func (*CreateServiceParams) SetFriendlyName ¶
func (params *CreateServiceParams) SetFriendlyName(FriendlyName string) *CreateServiceParams
func (*CreateServiceParams) SetGcmCredentialSid ¶
func (params *CreateServiceParams) SetGcmCredentialSid(GcmCredentialSid string) *CreateServiceParams
func (*CreateServiceParams) SetLogEnabled ¶
func (params *CreateServiceParams) SetLogEnabled(LogEnabled bool) *CreateServiceParams
func (*CreateServiceParams) SetMessagingServiceSid ¶
func (params *CreateServiceParams) SetMessagingServiceSid(MessagingServiceSid string) *CreateServiceParams
type ListBindingParams ¶
type ListBindingParams struct { // Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. StartDate *string `json:"StartDate,omitempty"` // Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. EndDate *string `json:"EndDate,omitempty"` // The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. Identity *[]string `json:"Identity,omitempty"` // Only list Bindings that have all of the specified Tags. The following implicit tags are available: `all`, `apn`, `fcm`, `gcm`, `sms`, `facebook-messenger`. Up to 5 tags are allowed. Tag *[]string `json:"Tag,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int `json:"PageSize,omitempty"` // Max number of records to return. Limit *int `json:"limit,omitempty"` }
Optional parameters for the method 'ListBinding'
func (*ListBindingParams) SetEndDate ¶
func (params *ListBindingParams) SetEndDate(EndDate string) *ListBindingParams
func (*ListBindingParams) SetIdentity ¶
func (params *ListBindingParams) SetIdentity(Identity []string) *ListBindingParams
func (*ListBindingParams) SetLimit ¶ added in v0.13.0
func (params *ListBindingParams) SetLimit(Limit int) *ListBindingParams
func (*ListBindingParams) SetPageSize ¶
func (params *ListBindingParams) SetPageSize(PageSize int) *ListBindingParams
func (*ListBindingParams) SetStartDate ¶
func (params *ListBindingParams) SetStartDate(StartDate string) *ListBindingParams
func (*ListBindingParams) SetTag ¶
func (params *ListBindingParams) SetTag(Tag []string) *ListBindingParams
type ListBindingResponse ¶
type ListBindingResponse struct { Bindings []NotifyV1Binding `json:"bindings,omitempty"` Meta ListBindingResponseMeta `json:"meta,omitempty"` }
ListBindingResponse struct for ListBindingResponse
type ListBindingResponseMeta ¶ added in v1.0.0
type ListBindingResponseMeta struct { FirstPageUrl string `json:"first_page_url,omitempty"` Key string `json:"key,omitempty"` NextPageUrl *string `json:"next_page_url,omitempty"` Page int `json:"page,omitempty"` PageSize int `json:"page_size,omitempty"` PreviousPageUrl *string `json:"previous_page_url,omitempty"` Url string `json:"url,omitempty"` }
ListBindingResponseMeta struct for ListBindingResponseMeta
type ListCredentialParams ¶
type ListCredentialParams struct { // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int `json:"PageSize,omitempty"` // Max number of records to return. Limit *int `json:"limit,omitempty"` }
Optional parameters for the method 'ListCredential'
func (*ListCredentialParams) SetLimit ¶ added in v0.13.0
func (params *ListCredentialParams) SetLimit(Limit int) *ListCredentialParams
func (*ListCredentialParams) SetPageSize ¶
func (params *ListCredentialParams) SetPageSize(PageSize int) *ListCredentialParams
type ListCredentialResponse ¶
type ListCredentialResponse struct { Credentials []NotifyV1Credential `json:"credentials,omitempty"` Meta ListBindingResponseMeta `json:"meta,omitempty"` }
ListCredentialResponse struct for ListCredentialResponse
type ListServiceParams ¶
type ListServiceParams struct { // The string that identifies the Service resources to read. FriendlyName *string `json:"FriendlyName,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int `json:"PageSize,omitempty"` // Max number of records to return. Limit *int `json:"limit,omitempty"` }
Optional parameters for the method 'ListService'
func (*ListServiceParams) SetFriendlyName ¶
func (params *ListServiceParams) SetFriendlyName(FriendlyName string) *ListServiceParams
func (*ListServiceParams) SetLimit ¶ added in v0.13.0
func (params *ListServiceParams) SetLimit(Limit int) *ListServiceParams
func (*ListServiceParams) SetPageSize ¶
func (params *ListServiceParams) SetPageSize(PageSize int) *ListServiceParams
type ListServiceResponse ¶
type ListServiceResponse struct { Services []NotifyV1Service `json:"services,omitempty"` Meta ListBindingResponseMeta `json:"meta,omitempty"` }
ListServiceResponse struct for ListServiceResponse
type NotifyV1Binding ¶ added in v0.14.0
type NotifyV1Binding struct { // The unique string that we created to identify the Binding resource. Sid *string `json:"sid,omitempty"` // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Binding resource. AccountSid *string `json:"account_sid,omitempty"` // The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) the resource is associated with. ServiceSid *string `json:"service_sid,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applicable only to `apn`, `fcm`, and `gcm` type Bindings. CredentialSid *string `json:"credential_sid,omitempty"` // The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *time.Time `json:"date_created,omitempty"` // The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *time.Time `json:"date_updated,omitempty"` // The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` in the [Service](https://www.twilio.com/docs/notify/api/service-resource) for the protocol. The current version is `\"3\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed. NotificationProtocolVersion *string `json:"notification_protocol_version,omitempty"` // Deprecated. Endpoint *string `json:"endpoint,omitempty"` // The `identity` value that uniquely identifies the resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Up to 20 Bindings can be created for the same Identity in a given Service. Identity *string `json:"identity,omitempty"` // The transport technology to use for the Binding. Can be: `apn`, `fcm`, `gcm`, `sms`, or `facebook-messenger`. BindingType *string `json:"binding_type,omitempty"` // The channel-specific address. For APNS, the device token. For FCM and GCM, the registration token. For SMS, a phone number in E.164 format. For Facebook Messenger, the Messenger ID of the user or a phone number in E.164 format. Address *string `json:"address,omitempty"` // 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. Tags *[]string `json:"tags,omitempty"` // The absolute URL of the Binding resource. Url *string `json:"url,omitempty"` // The URLs of related resources. Links *map[string]interface{} `json:"links,omitempty"` }
NotifyV1Binding struct for NotifyV1Binding
type NotifyV1Credential ¶
type NotifyV1Credential struct { // The unique string that we created to identify the Credential resource. Sid *string `json:"sid,omitempty"` // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Credential resource. AccountSid *string `json:"account_sid,omitempty"` // The string that you assigned to describe the resource. FriendlyName *string `json:"friendly_name,omitempty"` Type *string `json:"type,omitempty"` // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. Sandbox *string `json:"sandbox,omitempty"` // The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *time.Time `json:"date_created,omitempty"` // The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *time.Time `json:"date_updated,omitempty"` // The absolute URL of the Credential resource. Url *string `json:"url,omitempty"` }
NotifyV1Credential struct for NotifyV1Credential
type NotifyV1Notification ¶ added in v0.14.0
type NotifyV1Notification struct { // The unique string that we created to identify the Notification resource. Sid *string `json:"sid,omitempty"` // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource. AccountSid *string `json:"account_sid,omitempty"` // The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) the resource is associated with. ServiceSid *string `json:"service_sid,omitempty"` // The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *time.Time `json:"date_created,omitempty"` // The list of `identity` values of the Users to notify. We will attempt to deliver notifications only to Bindings with an identity in this list. Identities *[]string `json:"identities,omitempty"` // The tags that select the Bindings to notify. Notifications will be attempted only to Bindings that have all of the tags listed in this property. Tags *[]string `json:"tags,omitempty"` // The list of Segments to notify. The [Segment](https://www.twilio.com/docs/notify/api/segment-resource) resource is deprecated. Use the `tags` property, instead. Segments *[]string `json:"segments,omitempty"` Priority *string `json:"priority,omitempty"` // How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property. Ttl int `json:"ttl,omitempty"` // The notification title. For FCM and GCM, this translates to the `data.twi_title` value. For APNS, this translates to the `aps.alert.title` value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices. Title *string `json:"title,omitempty"` // The notification text. For FCM and GCM, translates to `data.twi_body`. For APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS requires either this `body` value, or `media_urls` attribute defined in the `sms` parameter of the notification. Body *string `json:"body,omitempty"` // The name of the sound to be played for the notification. For FCM and GCM, this Translates to `data.twi_sound`. For APNS, this translates to `aps.sound`. SMS does not support this property. Sound *string `json:"sound,omitempty"` // The actions to display for the notification. For APNS, translates to the `aps.category` value. For GCM, translates to the `data.twi_action` value. For SMS, this parameter is not supported and is omitted from deliveries to those channels. Action *string `json:"action,omitempty"` // The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. Data *interface{} `json:"data,omitempty"` // The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. Apn *interface{} `json:"apn,omitempty"` // The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. Gcm *interface{} `json:"gcm,omitempty"` // The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. Fcm *interface{} `json:"fcm,omitempty"` // The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/api/message-resource) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. Sms *interface{} `json:"sms,omitempty"` // Deprecated. FacebookMessenger *interface{} `json:"facebook_messenger,omitempty"` // Deprecated. Alexa *interface{} `json:"alexa,omitempty"` }
NotifyV1Notification struct for NotifyV1Notification
type NotifyV1Service ¶
type NotifyV1Service struct { // The unique string that we created to identify the Service resource. Sid *string `json:"sid,omitempty"` // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Service resource. AccountSid *string `json:"account_sid,omitempty"` // The string that you assigned to describe the resource. FriendlyName *string `json:"friendly_name,omitempty"` // The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *time.Time `json:"date_created,omitempty"` // The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *time.Time `json:"date_updated,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. ApnCredentialSid *string `json:"apn_credential_sid,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. GcmCredentialSid *string `json:"gcm_credential_sid,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. FcmCredentialSid *string `json:"fcm_credential_sid,omitempty"` // The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. In order to send SMS notifications this parameter has to be set. MessagingServiceSid *string `json:"messaging_service_sid,omitempty"` // Deprecated. FacebookMessengerPageId *string `json:"facebook_messenger_page_id,omitempty"` // The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. DefaultApnNotificationProtocolVersion *string `json:"default_apn_notification_protocol_version,omitempty"` // The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. DefaultGcmNotificationProtocolVersion *string `json:"default_gcm_notification_protocol_version,omitempty"` // The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. DefaultFcmNotificationProtocolVersion *string `json:"default_fcm_notification_protocol_version,omitempty"` // Whether to log notifications. Can be: `true` or `false` and the default is `true`. LogEnabled *bool `json:"log_enabled,omitempty"` // The absolute URL of the Service resource. Url *string `json:"url,omitempty"` // The URLs of the Binding, Notification, Segment, and User resources related to the service. Links *map[string]interface{} `json:"links,omitempty"` // Deprecated. AlexaSkillId *string `json:"alexa_skill_id,omitempty"` // Deprecated. DefaultAlexaNotificationProtocolVersion *string `json:"default_alexa_notification_protocol_version,omitempty"` // URL to send delivery status callback. DeliveryCallbackUrl *string `json:"delivery_callback_url,omitempty"` // Callback configuration that enables delivery callbacks, default false DeliveryCallbackEnabled *bool `json:"delivery_callback_enabled,omitempty"` }
NotifyV1Service struct for NotifyV1Service
type UpdateCredentialParams ¶
type UpdateCredentialParams struct { // A descriptive string that you create to describe the resource. It can be up to 64 characters long. FriendlyName *string `json:"FriendlyName,omitempty"` // [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` Certificate *string `json:"Certificate,omitempty"` // [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----` PrivateKey *string `json:"PrivateKey,omitempty"` // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. Sandbox *bool `json:"Sandbox,omitempty"` // [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. ApiKey *string `json:"ApiKey,omitempty"` // [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. Secret *string `json:"Secret,omitempty"` }
Optional parameters for the method 'UpdateCredential'
func (*UpdateCredentialParams) SetApiKey ¶
func (params *UpdateCredentialParams) SetApiKey(ApiKey string) *UpdateCredentialParams
func (*UpdateCredentialParams) SetCertificate ¶
func (params *UpdateCredentialParams) SetCertificate(Certificate string) *UpdateCredentialParams
func (*UpdateCredentialParams) SetFriendlyName ¶
func (params *UpdateCredentialParams) SetFriendlyName(FriendlyName string) *UpdateCredentialParams
func (*UpdateCredentialParams) SetPrivateKey ¶
func (params *UpdateCredentialParams) SetPrivateKey(PrivateKey string) *UpdateCredentialParams
func (*UpdateCredentialParams) SetSandbox ¶
func (params *UpdateCredentialParams) SetSandbox(Sandbox bool) *UpdateCredentialParams
func (*UpdateCredentialParams) SetSecret ¶
func (params *UpdateCredentialParams) SetSecret(Secret string) *UpdateCredentialParams
type UpdateServiceParams ¶
type UpdateServiceParams struct { // A descriptive string that you create to describe the resource. It can be up to 64 characters long. FriendlyName *string `json:"FriendlyName,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` // The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` // Deprecated. FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` // The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` // The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` // The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` // Whether to log notifications. Can be: `true` or `false` and the default is `true`. LogEnabled *bool `json:"LogEnabled,omitempty"` // Deprecated. AlexaSkillId *string `json:"AlexaSkillId,omitempty"` // Deprecated. DefaultAlexaNotificationProtocolVersion *string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` // URL to send delivery status callback. DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` // Callback configuration that enables delivery callbacks, default false DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` }
Optional parameters for the method 'UpdateService'
func (*UpdateServiceParams) SetAlexaSkillId ¶
func (params *UpdateServiceParams) SetAlexaSkillId(AlexaSkillId string) *UpdateServiceParams
func (*UpdateServiceParams) SetApnCredentialSid ¶
func (params *UpdateServiceParams) SetApnCredentialSid(ApnCredentialSid string) *UpdateServiceParams
func (*UpdateServiceParams) SetDefaultAlexaNotificationProtocolVersion ¶
func (params *UpdateServiceParams) SetDefaultAlexaNotificationProtocolVersion(DefaultAlexaNotificationProtocolVersion string) *UpdateServiceParams
func (*UpdateServiceParams) SetDefaultApnNotificationProtocolVersion ¶
func (params *UpdateServiceParams) SetDefaultApnNotificationProtocolVersion(DefaultApnNotificationProtocolVersion string) *UpdateServiceParams
func (*UpdateServiceParams) SetDefaultFcmNotificationProtocolVersion ¶
func (params *UpdateServiceParams) SetDefaultFcmNotificationProtocolVersion(DefaultFcmNotificationProtocolVersion string) *UpdateServiceParams
func (*UpdateServiceParams) SetDefaultGcmNotificationProtocolVersion ¶
func (params *UpdateServiceParams) SetDefaultGcmNotificationProtocolVersion(DefaultGcmNotificationProtocolVersion string) *UpdateServiceParams
func (*UpdateServiceParams) SetDeliveryCallbackEnabled ¶
func (params *UpdateServiceParams) SetDeliveryCallbackEnabled(DeliveryCallbackEnabled bool) *UpdateServiceParams
func (*UpdateServiceParams) SetDeliveryCallbackUrl ¶
func (params *UpdateServiceParams) SetDeliveryCallbackUrl(DeliveryCallbackUrl string) *UpdateServiceParams
func (*UpdateServiceParams) SetFacebookMessengerPageId ¶
func (params *UpdateServiceParams) SetFacebookMessengerPageId(FacebookMessengerPageId string) *UpdateServiceParams
func (*UpdateServiceParams) SetFcmCredentialSid ¶
func (params *UpdateServiceParams) SetFcmCredentialSid(FcmCredentialSid string) *UpdateServiceParams
func (*UpdateServiceParams) SetFriendlyName ¶
func (params *UpdateServiceParams) SetFriendlyName(FriendlyName string) *UpdateServiceParams
func (*UpdateServiceParams) SetGcmCredentialSid ¶
func (params *UpdateServiceParams) SetGcmCredentialSid(GcmCredentialSid string) *UpdateServiceParams
func (*UpdateServiceParams) SetLogEnabled ¶
func (params *UpdateServiceParams) SetLogEnabled(LogEnabled bool) *UpdateServiceParams
func (*UpdateServiceParams) SetMessagingServiceSid ¶
func (params *UpdateServiceParams) SetMessagingServiceSid(MessagingServiceSid string) *UpdateServiceParams
Source Files ¶
- api_service.go
- credentials.go
- model_list_binding_response.go
- model_list_binding_response_meta.go
- model_list_credential_response.go
- model_list_service_response.go
- model_notify_v1_binding.go
- model_notify_v1_credential.go
- model_notify_v1_notification.go
- model_notify_v1_service.go
- services.go
- services_bindings.go
- services_notifications.go