Documentation
¶
Index ¶
- type ApiService
- func (c *ApiService) CreateChannelsSender(params *CreateChannelsSenderParams) (*MessagingV2ChannelsSenderResponse, error)
- func (c *ApiService) CreateTypingIndicator(params *CreateTypingIndicatorParams) (*CreateTypingIndicatorResponse, error)
- func (c *ApiService) DeleteChannelsSender(Sid string) error
- func (c *ApiService) FetchChannelsSender(Sid string) (*MessagingV2ChannelsSenderResponse, error)
- func (c *ApiService) ListChannelsSender(params *ListChannelsSenderParams) ([]MessagingV2ChannelsSenderResponse, error)
- func (c *ApiService) PageChannelsSender(params *ListChannelsSenderParams, pageToken, pageNumber string) (*ListChannelsSenderResponse, error)
- func (c *ApiService) RequestHandler() *twilio.RequestHandler
- func (c *ApiService) StreamChannelsSender(params *ListChannelsSenderParams) (chan MessagingV2ChannelsSenderResponse, chan error)
- func (c *ApiService) UpdateChannelsSender(Sid string, params *UpdateChannelsSenderParams) (*MessagingV2ChannelsSenderResponse, error)
- type CreateChannelsSenderParams
- type CreateTypingIndicatorParams
- type CreateTypingIndicatorResponse
- type ListChannelsSenderParams
- type ListChannelsSenderResponse
- type ListChannelsSenderResponseMeta
- type MessagingV2ChannelsSenderProfileGenericResponseEmails
- type MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers
- type MessagingV2ChannelsSenderProfileGenericResponseWebsites
- type MessagingV2ChannelsSenderResponse
- type MessagingV2Configuration
- type MessagingV2Create
- type MessagingV2Items
- type MessagingV2Profile
- type MessagingV2ProfileGenericResponse
- type MessagingV2Properties
- type MessagingV2RcsCarrier
- type MessagingV2RcsCarrierStatus
- type MessagingV2RcsComplianceCountryResponse
- type MessagingV2RcsComplianceCountryUpdatePatchResponse
- type MessagingV2RcsCompliancePatchUpdateResponse
- type MessagingV2RcsComplianceResponse
- type MessagingV2RcsCountryStatus
- type MessagingV2Update
- type MessagingV2Webhook
- type UpdateChannelsSenderParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶
func NewApiService(requestHandler *twilio.RequestHandler) *ApiService
func NewApiServiceWithClient ¶
func NewApiServiceWithClient(client twilio.BaseClient) *ApiService
func (*ApiService) CreateChannelsSender ¶
func (c *ApiService) CreateChannelsSender(params *CreateChannelsSenderParams) (*MessagingV2ChannelsSenderResponse, error)
Create a Sender.
func (*ApiService) CreateTypingIndicator ¶ added in v1.28.2
func (c *ApiService) CreateTypingIndicator(params *CreateTypingIndicatorParams) (*CreateTypingIndicatorResponse, error)
Send a typing indicator to notify the recipient that you are composing a message. Currently supported for whatsapp channel only. For WhatsApp, `messageId` is required.
func (*ApiService) DeleteChannelsSender ¶
func (c *ApiService) DeleteChannelsSender(Sid string) error
(WhatsApp only) Delete a Sender.
func (*ApiService) FetchChannelsSender ¶
func (c *ApiService) FetchChannelsSender(Sid string) (*MessagingV2ChannelsSenderResponse, error)
Retrieve a Sender.
func (*ApiService) ListChannelsSender ¶
func (c *ApiService) ListChannelsSender(params *ListChannelsSenderParams) ([]MessagingV2ChannelsSenderResponse, error)
Lists ChannelsSender records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) PageChannelsSender ¶
func (c *ApiService) PageChannelsSender(params *ListChannelsSenderParams, pageToken, pageNumber string) (*ListChannelsSenderResponse, error)
Retrieve a single page of ChannelsSender records from the API. Request is executed immediately.
func (*ApiService) RequestHandler ¶
func (c *ApiService) RequestHandler() *twilio.RequestHandler
func (*ApiService) StreamChannelsSender ¶
func (c *ApiService) StreamChannelsSender(params *ListChannelsSenderParams) (chan MessagingV2ChannelsSenderResponse, chan error)
Streams ChannelsSender records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) UpdateChannelsSender ¶
func (c *ApiService) UpdateChannelsSender(Sid string, params *UpdateChannelsSenderParams) (*MessagingV2ChannelsSenderResponse, error)
(WhatsApp only) Update a Sender. You can update a sender's information, including `profile`, `webhook`, and `configuration`. To verify a phone number, set `configuration.verification_code` to the One-time Password (OTP) that you received.
type CreateChannelsSenderParams ¶
type CreateChannelsSenderParams struct {
//
MessagingV2Create *MessagingV2Create `json:"MessagingV2Create,omitempty"`
}
Optional parameters for the method 'CreateChannelsSender'
func (*CreateChannelsSenderParams) SetMessagingV2Create ¶
func (params *CreateChannelsSenderParams) SetMessagingV2Create(MessagingV2Create MessagingV2Create) *CreateChannelsSenderParams
type CreateTypingIndicatorParams ¶ added in v1.28.2
type CreateTypingIndicatorParams struct {
// Shared channel identifier
Channel *string `json:"channel,omitempty"`
// Message SID that identifies the conversation thread for the typing indicator. Must be a valid Twilio Message SID (SM*) or Media SID (MM*) from an existing WhatsApp conversation.
MessageId *string `json:"messageId,omitempty"`
}
Optional parameters for the method 'CreateTypingIndicator'
func (*CreateTypingIndicatorParams) SetChannel ¶ added in v1.28.2
func (params *CreateTypingIndicatorParams) SetChannel(Channel string) *CreateTypingIndicatorParams
func (*CreateTypingIndicatorParams) SetMessageId ¶ added in v1.28.2
func (params *CreateTypingIndicatorParams) SetMessageId(MessageId string) *CreateTypingIndicatorParams
type CreateTypingIndicatorResponse ¶ added in v1.28.2
type CreateTypingIndicatorResponse struct {
// Indicates if the typing indicator was sent successfully.
Success bool `json:"success,omitempty"`
}
CreateTypingIndicatorResponse struct for CreateTypingIndicatorResponse
type ListChannelsSenderParams ¶
type ListChannelsSenderParams struct {
//
Channel *string `json:"Channel,omitempty"`
// The number of items to return per page.
PageSize *int `json:"PageSize,omitempty"`
// Max number of records to return.
Limit *int `json:"limit,omitempty"`
}
Optional parameters for the method 'ListChannelsSender'
func (*ListChannelsSenderParams) SetChannel ¶
func (params *ListChannelsSenderParams) SetChannel(Channel string) *ListChannelsSenderParams
func (*ListChannelsSenderParams) SetLimit ¶
func (params *ListChannelsSenderParams) SetLimit(Limit int) *ListChannelsSenderParams
func (*ListChannelsSenderParams) SetPageSize ¶
func (params *ListChannelsSenderParams) SetPageSize(PageSize int) *ListChannelsSenderParams
type ListChannelsSenderResponse ¶
type ListChannelsSenderResponse struct {
Senders []MessagingV2ChannelsSenderResponse `json:"senders,omitempty"`
Meta ListChannelsSenderResponseMeta `json:"meta,omitempty"`
}
ListChannelsSenderResponse struct for ListChannelsSenderResponse
type ListChannelsSenderResponseMeta ¶
type ListChannelsSenderResponseMeta 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"`
}
ListChannelsSenderResponseMeta struct for ListChannelsSenderResponseMeta
type MessagingV2ChannelsSenderProfileGenericResponseEmails ¶ added in v1.27.1
type MessagingV2ChannelsSenderProfileGenericResponseEmails struct {
Email string `json:"email,omitempty"`
Label string `json:"label,omitempty"`
}
MessagingV2ChannelsSenderProfileGenericResponseEmails struct for MessagingV2ChannelsSenderProfileGenericResponseEmails
type MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers ¶ added in v1.27.1
type MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers struct {
PhoneNumber string `json:"phone_number,omitempty"`
Label string `json:"label,omitempty"`
}
MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers struct for MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers
type MessagingV2ChannelsSenderProfileGenericResponseWebsites ¶ added in v1.27.1
type MessagingV2ChannelsSenderProfileGenericResponseWebsites struct {
Website string `json:"website,omitempty"`
Label string `json:"label,omitempty"`
}
MessagingV2ChannelsSenderProfileGenericResponseWebsites struct for MessagingV2ChannelsSenderProfileGenericResponseWebsites
type MessagingV2ChannelsSenderResponse ¶ added in v1.27.1
type MessagingV2ChannelsSenderResponse struct {
// The SID of the sender.
Sid *string `json:"sid,omitempty"`
Status *string `json:"status,omitempty"`
// The ID of the sender in `whatsapp:<E.164_PHONE_NUMBER>` format.
SenderId *string `json:"sender_id,omitempty"`
Configuration *MessagingV2Configuration `json:"configuration,omitempty"`
Webhook *MessagingV2Webhook `json:"webhook,omitempty"`
Profile *MessagingV2ProfileGenericResponse `json:"profile,omitempty"`
Properties *MessagingV2Properties `json:"properties,omitempty"`
// The reasons why the sender is offline.
OfflineReasons *[]MessagingV2Items `json:"offline_reasons,omitempty"`
Compliance *MessagingV2RcsComplianceResponse `json:"compliance,omitempty"`
// The URL of the resource.
Url *string `json:"url,omitempty"`
}
MessagingV2ChannelsSenderResponse struct for MessagingV2ChannelsSenderResponse
type MessagingV2Configuration ¶
type MessagingV2Configuration struct {
// The ID of the WhatsApp Business Account (WABA) to use for this sender.
WabaId *string `json:"waba_id,omitempty"`
// The verification method.
VerificationMethod *string `json:"verification_method,omitempty"`
// The verification code.
VerificationCode *string `json:"verification_code,omitempty"`
// The SID of the Twilio Voice application.
VoiceApplicationSid *string `json:"voice_application_sid,omitempty"`
}
MessagingV2Configuration The configuration settings for creating a sender.
type MessagingV2Create ¶
type MessagingV2Create struct {
// The ID of the sender in `whatsapp:<E.164_PHONE_NUMBER>` format.
SenderId *string `json:"sender_id"`
Configuration *MessagingV2Configuration `json:"configuration,omitempty"`
Webhook *MessagingV2Webhook `json:"webhook,omitempty"`
Profile *MessagingV2Profile `json:"profile,omitempty"`
}
MessagingV2Create struct for MessagingV2Create
type MessagingV2Items ¶
type MessagingV2Items struct {
// The error code.
Code *string `json:"code,omitempty"`
// The error message.
Message *string `json:"message,omitempty"`
// The URL to get more information about the error.
MoreInfo *string `json:"more_info,omitempty"`
}
MessagingV2Items struct for MessagingV2Items
type MessagingV2Profile ¶
type MessagingV2Profile struct {
// The name of the sender. Required for WhatsApp senders and must follow [Meta's display name guidelines](https://www.facebook.com/business/help/757569725593362).
Name *string `json:"name,omitempty"`
// The profile about text for the sender.
About *string `json:"about,omitempty"`
// The address of the sender.
Address *string `json:"address,omitempty"`
// The description of the sender.
Description *string `json:"description,omitempty"`
// The logo URL of the sender.
LogoUrl *string `json:"logo_url,omitempty"`
// The banner URL of the sender.
BannerUrl *string `json:"banner_url,omitempty"`
// The privacy URL of the sender. Must be a publicly accessible HTTP or HTTPS URI associated with the sender.
PrivacyUrl *string `json:"privacy_url,omitempty"`
// The terms of service URL of the sender.
TermsOfServiceUrl *string `json:"terms_of_service_url,omitempty"`
// The color theme of the sender. Must be in hex format and have at least a 4:5:1 contrast ratio against white.
AccentColor *string `json:"accent_color,omitempty"`
// The vertical of the sender. Allowed values are: - `Automotive` - `Beauty, Spa and Salon` - `Clothing and Apparel` - `Education` - `Entertainment` - `Event Planning and Service` - `Finance and Banking` - `Food and Grocery` - `Public Service` - `Hotel and Lodging` - `Medical and Health` - `Non-profit` - `Professional Services` - `Shopping and Retail` - `Travel and Transportation` - `Restaurant` - `Other`
Vertical *string `json:"vertical,omitempty"`
// The websites of the sender.
Websites *interface{} `json:"websites,omitempty"`
// The emails of the sender.
Emails *interface{} `json:"emails,omitempty"`
// The phone numbers of the sender.
PhoneNumbers *interface{} `json:"phone_numbers,omitempty"`
}
MessagingV2Profile The profile information for the sender.
type MessagingV2ProfileGenericResponse ¶ added in v1.27.1
type MessagingV2ProfileGenericResponse struct {
// The name of the sender.
Name *string `json:"name,omitempty"`
// The profile about text for the sender.
About *string `json:"about,omitempty"`
// The address of the sender.
Address *string `json:"address,omitempty"`
// The description of the sender.
Description *string `json:"description,omitempty"`
// The logo URL of the sender.
LogoUrl *string `json:"logo_url,omitempty"`
// The banner URL of the sender.
BannerUrl *string `json:"banner_url,omitempty"`
// The privacy URL of the sender. Must be a publicly accessible HTTP or HTTPS URI associated with the sender.
PrivacyUrl *string `json:"privacy_url,omitempty"`
// The terms of service URL of the sender.
TermsOfServiceUrl *string `json:"terms_of_service_url,omitempty"`
// The color theme of the sender. Must be in hex format and have at least a 4:5:1 contrast ratio against white.
AccentColor *string `json:"accent_color,omitempty"`
// The vertical of the sender. Allowed values are: - `Automotive` - `Beauty, Spa and Salon` - `Clothing and Apparel` - `Education` - `Entertainment` - `Event Planning and Service` - `Finance and Banking` - `Food and Grocery` - `Public Service` - `Hotel and Lodging` - `Medical and Health` - `Non-profit` - `Professional Services` - `Shopping and Retail` - `Travel and Transportation` - `Restaurant` - `Other`
Vertical *string `json:"vertical,omitempty"`
// The websites of the sender.
Websites *[]MessagingV2ChannelsSenderProfileGenericResponseWebsites `json:"websites,omitempty"`
// The emails of the sender.
Emails *[]MessagingV2ChannelsSenderProfileGenericResponseEmails `json:"emails,omitempty"`
// The phone numbers of the sender.
PhoneNumbers *[]MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers `json:"phone_numbers,omitempty"`
}
MessagingV2ProfileGenericResponse The profile information for the sender.
type MessagingV2Properties ¶
type MessagingV2Properties struct {
// The quality rating of the sender.
QualityRating *string `json:"quality_rating,omitempty"`
// The messaging limit of the sender.
MessagingLimit *string `json:"messaging_limit,omitempty"`
}
MessagingV2Properties The additional properties for the sender.
type MessagingV2RcsCarrier ¶ added in v1.27.1
type MessagingV2RcsCarrier struct {
// The name of the carrier. For example, `Verizon` or `AT&T` for US.
Name string `json:"name,omitempty"`
Status MessagingV2RcsCarrierStatus `json:"status,omitempty"`
}
MessagingV2RcsCarrier struct for MessagingV2RcsCarrier
type MessagingV2RcsCarrierStatus ¶ added in v1.27.1
type MessagingV2RcsCarrierStatus string
MessagingV2RcsCarrierStatus The carrier-level status.
const ( MESSAGINGV2RCSCARRIERSTATUS_UNKNOWN MessagingV2RcsCarrierStatus = "UNKNOWN" MESSAGINGV2RCSCARRIERSTATUS_UNLAUNCHED MessagingV2RcsCarrierStatus = "UNLAUNCHED" MESSAGINGV2RCSCARRIERSTATUS_CARRIER_REVIEW MessagingV2RcsCarrierStatus = "CARRIER_REVIEW" MESSAGINGV2RCSCARRIERSTATUS_APPROVED MessagingV2RcsCarrierStatus = "APPROVED" MESSAGINGV2RCSCARRIERSTATUS_REJECTED MessagingV2RcsCarrierStatus = "REJECTED" MESSAGINGV2RCSCARRIERSTATUS_SUSPENDED MessagingV2RcsCarrierStatus = "SUSPENDED" )
List of messaging.v2.rcs_carrier_status
type MessagingV2RcsComplianceCountryResponse ¶ added in v1.27.1
type MessagingV2RcsComplianceCountryResponse struct {
// The ISO 3166-1 alpha-2 country code.
Country string `json:"country"`
// The default compliance registration SID (e.g., from CR-Google) that applies to all countries unless overridden in the `countries` array.
RegistrationSid string `json:"registration_sid"`
Status MessagingV2RcsCountryStatus `json:"status"`
Carriers []MessagingV2RcsCarrier `json:"carriers,omitempty"`
}
MessagingV2RcsComplianceCountryResponse struct for MessagingV2RcsComplianceCountryResponse
type MessagingV2RcsComplianceCountryUpdatePatchResponse ¶ added in v1.27.2
type MessagingV2RcsComplianceCountryUpdatePatchResponse struct {
// The ISO 3166-1 alpha-2 country code.
Country string `json:"country"`
// The default compliance registration SID (e.g., from CR-Google) that applies to all countries unless overridden in the `countries` array.
RegistrationSid string `json:"registration_sid"`
Status MessagingV2RcsCountryStatus `json:"status"`
}
MessagingV2RcsComplianceCountryUpdatePatchResponse struct for MessagingV2RcsComplianceCountryUpdatePatchResponse
type MessagingV2RcsCompliancePatchUpdateResponse ¶ added in v1.27.2
type MessagingV2RcsCompliancePatchUpdateResponse struct {
// The default compliance registration SID (e.g., from CR-Google) that applies to all countries unless overridden within the `countries` array.
RegistrationSid string `json:"registration_sid"`
// A list of country-specific compliance details.
Countries []MessagingV2RcsComplianceCountryUpdatePatchResponse `json:"countries"`
}
MessagingV2RcsCompliancePatchUpdateResponse The KYC compliance information. This section consists of response to the request launch.
type MessagingV2RcsComplianceResponse ¶ added in v1.27.1
type MessagingV2RcsComplianceResponse struct {
// The default compliance registration SID (e.g., from CR-Google) that applies to all countries unless overridden in the `countries` array.
RegistrationSid string `json:"registration_sid"`
// A list of country-specific compliance details.
Countries []MessagingV2RcsComplianceCountryResponse `json:"countries"`
}
MessagingV2RcsComplianceResponse The KYC compliance information. This section consists of response to the request launch.
type MessagingV2RcsCountryStatus ¶ added in v1.27.1
type MessagingV2RcsCountryStatus string
MessagingV2RcsCountryStatus The country-level status. Based on the aggregation of the carrier-level status.
const ( MESSAGINGV2RCSCOUNTRYSTATUS_ONLINE MessagingV2RcsCountryStatus = "ONLINE" MESSAGINGV2RCSCOUNTRYSTATUS_OFFLINE MessagingV2RcsCountryStatus = "OFFLINE" MESSAGINGV2RCSCOUNTRYSTATUS_TWILIO_REVIEW MessagingV2RcsCountryStatus = "TWILIO_REVIEW" MESSAGINGV2RCSCOUNTRYSTATUS_PENDING_VERIFICATION MessagingV2RcsCountryStatus = "PENDING_VERIFICATION" )
List of messaging.v2.rcs_country_status
type MessagingV2Update ¶
type MessagingV2Update struct {
Configuration *MessagingV2Configuration `json:"configuration,omitempty"`
Webhook *MessagingV2Webhook `json:"webhook,omitempty"`
Profile *MessagingV2Profile `json:"profile,omitempty"`
}
MessagingV2Update struct for MessagingV2Update
type MessagingV2Webhook ¶
type MessagingV2Webhook struct {
// The URL to send the webhook to.
CallbackUrl *string `json:"callback_url,omitempty"`
// The HTTP method for the webhook.
CallbackMethod *string `json:"callback_method,omitempty"`
// The URL to send the fallback webhook to.
FallbackUrl *string `json:"fallback_url,omitempty"`
// The HTTP method for the fallback webhook.
FallbackMethod *string `json:"fallback_method,omitempty"`
// The URL to send the status callback to.
StatusCallbackUrl *string `json:"status_callback_url,omitempty"`
// The HTTP method for the status callback.
StatusCallbackMethod *string `json:"status_callback_method,omitempty"`
}
MessagingV2Webhook The configuration settings for webhooks.
type UpdateChannelsSenderParams ¶
type UpdateChannelsSenderParams struct {
//
MessagingV2Update *MessagingV2Update `json:"MessagingV2Update,omitempty"`
}
Optional parameters for the method 'UpdateChannelsSender'
func (*UpdateChannelsSenderParams) SetMessagingV2Update ¶
func (params *UpdateChannelsSenderParams) SetMessagingV2Update(MessagingV2Update MessagingV2Update) *UpdateChannelsSenderParams
Source Files
¶
- api_service.go
- channels_senders.go
- indicators_typing.go
- model_create_typing_indicator_response.go
- model_list_channels_sender_response.go
- model_list_channels_sender_response_meta.go
- model_messaging_v2_channels_sender_profile_generic_response_emails.go
- model_messaging_v2_channels_sender_profile_generic_response_phone_numbers.go
- model_messaging_v2_channels_sender_profile_generic_response_websites.go
- model_messaging_v2_channels_sender_response.go
- model_messaging_v2_configuration.go
- model_messaging_v2_create.go
- model_messaging_v2_items.go
- model_messaging_v2_profile.go
- model_messaging_v2_profile_generic_response.go
- model_messaging_v2_properties.go
- model_messaging_v2_rcs_carrier.go
- model_messaging_v2_rcs_carrier_status.go
- model_messaging_v2_rcs_compliance_country_response.go
- model_messaging_v2_rcs_compliance_country_update_patch_response.go
- model_messaging_v2_rcs_compliance_patch_update_response.go
- model_messaging_v2_rcs_compliance_response.go
- model_messaging_v2_rcs_country_status.go
- model_messaging_v2_update.go
- model_messaging_v2_webhook.go