openapi

package
v1.22.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 6 Imported by: 0

README

Go API client for openapi

This is the public Twilio REST API.

Overview

This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/twilio-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.1.0
  • Package version: 1.0.0
  • Build package: com.twilio.oai.TwilioGoGenerator For more information, please visit https://support.twilio.com

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import "./openapi"

Documentation for API Endpoints

All URIs are relative to https://content.twilio.com

Class Method HTTP request Description
ContentApi CreateContent Post /v1/Content
ContentApi DeleteContent Delete /v1/Content/{Sid}
ContentApi FetchContent Get /v1/Content/{Sid}
ContentApi ListContent Get /v1/Content
ContentAndApprovalsApi ListContentAndApprovals Get /v1/ContentAndApprovals
ContentApprovalRequestsApi FetchApprovalFetch Get /v1/Content/{ContentSid}/ApprovalRequests
ContentApprovalRequestsWhatsappApi CreateApprovalCreate Post /v1/Content/{ContentSid}/ApprovalRequests/whatsapp
LegacyContentApi ListLegacyContent Get /v1/LegacyContent

Documentation For Models

Documentation For Authorization

accountSid_authToken

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation

Index

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) CreateApprovalCreate added in v1.22.4

func (c *ApiService) CreateApprovalCreate(ContentSid string, params *CreateApprovalCreateParams) (*ContentV1ApprovalCreate, error)

func (*ApiService) CreateContent added in v1.20.0

func (c *ApiService) CreateContent(params *CreateContentParams) (*ContentV1Content, error)

Create a Content resource

func (*ApiService) DeleteContent

func (c *ApiService) DeleteContent(Sid string) error

Deletes a Content resource

func (*ApiService) FetchApprovalFetch added in v1.2.2

func (c *ApiService) FetchApprovalFetch(ContentSid string) (*ContentV1ApprovalFetch, error)

Fetch a Content resource's approval status by its unique Content Sid

func (*ApiService) FetchContent

func (c *ApiService) FetchContent(Sid string) (*ContentV1Content, error)

Fetch a Content resource by its unique Content Sid

func (*ApiService) ListContent

func (c *ApiService) ListContent(params *ListContentParams) ([]ContentV1Content, error)

Lists Content records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListContentAndApprovals added in v1.4.0

func (c *ApiService) ListContentAndApprovals(params *ListContentAndApprovalsParams) ([]ContentV1ContentAndApprovals, error)

Lists ContentAndApprovals records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListLegacyContent added in v1.3.3

func (c *ApiService) ListLegacyContent(params *ListLegacyContentParams) ([]ContentV1LegacyContent, error)

Lists LegacyContent records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) PageContent

func (c *ApiService) PageContent(params *ListContentParams, pageToken, pageNumber string) (*ListContentResponse, error)

Retrieve a single page of Content records from the API. Request is executed immediately.

func (*ApiService) PageContentAndApprovals added in v1.4.0

func (c *ApiService) PageContentAndApprovals(params *ListContentAndApprovalsParams, pageToken, pageNumber string) (*ListContentAndApprovalsResponse, error)

Retrieve a single page of ContentAndApprovals records from the API. Request is executed immediately.

func (*ApiService) PageLegacyContent added in v1.3.3

func (c *ApiService) PageLegacyContent(params *ListLegacyContentParams, pageToken, pageNumber string) (*ListLegacyContentResponse, error)

Retrieve a single page of LegacyContent records from the API. Request is executed immediately.

func (*ApiService) StreamContent

func (c *ApiService) StreamContent(params *ListContentParams) (chan ContentV1Content, chan error)

Streams Content records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamContentAndApprovals added in v1.4.0

func (c *ApiService) StreamContentAndApprovals(params *ListContentAndApprovalsParams) (chan ContentV1ContentAndApprovals, chan error)

Streams ContentAndApprovals records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamLegacyContent added in v1.3.3

func (c *ApiService) StreamLegacyContent(params *ListLegacyContentParams) (chan ContentV1LegacyContent, chan error)

Streams LegacyContent records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

type AuthenticationAction added in v1.20.0

type AuthenticationAction struct {
	Type         AuthenticationActionType `json:"type"`
	CopyCodeText string                   `json:"copy_code_text"`
}

AuthenticationAction struct for AuthenticationAction

type AuthenticationActionType added in v1.20.0

type AuthenticationActionType string

AuthenticationActionType the model 'AuthenticationActionType'

const (
	AUTHENTICATIONACTIONTYPE_COPY_CODE AuthenticationActionType = "COPY_CODE"
)

List of authenticationActionType

type CallToActionAction added in v1.20.0

type CallToActionAction struct {
	Type  CallToActionActionType `json:"type"`
	Title string                 `json:"title"`
	Url   string                 `json:"url,omitempty"`
	Phone string                 `json:"phone,omitempty"`
	Id    string                 `json:"id,omitempty"`
}

CallToActionAction struct for CallToActionAction

type CallToActionActionType added in v1.20.0

type CallToActionActionType string

CallToActionActionType the model 'CallToActionActionType'

const (
	CALLTOACTIONACTIONTYPE_URL          CallToActionActionType = "URL"
	CALLTOACTIONACTIONTYPE_PHONE_NUMBER CallToActionActionType = "PHONE_NUMBER"
)

List of callToActionActionType

type CardAction added in v1.20.0

type CardAction struct {
	Type  CardActionType `json:"type"`
	Title string         `json:"title"`
	Url   string         `json:"url,omitempty"`
	Phone string         `json:"phone,omitempty"`
	Id    string         `json:"id,omitempty"`
}

CardAction struct for CardAction

type CardActionType added in v1.20.0

type CardActionType string

CardActionType the model 'CardActionType'

const (
	CARDACTIONTYPE_URL          CardActionType = "URL"
	CARDACTIONTYPE_PHONE_NUMBER CardActionType = "PHONE_NUMBER"
	CARDACTIONTYPE_QUICK_REPLY  CardActionType = "QUICK_REPLY"
)

List of cardActionType

type CarouselAction added in v1.22.4

type CarouselAction struct {
	Type  CarouselActionType `json:"type"`
	Title string             `json:"title"`
	Url   string             `json:"url,omitempty"`
	Phone string             `json:"phone,omitempty"`
	Id    string             `json:"id,omitempty"`
}

CarouselAction struct for CarouselAction

type CarouselActionType added in v1.22.4

type CarouselActionType string

CarouselActionType the model 'CarouselActionType'

const (
	CAROUSELACTIONTYPE_URL          CarouselActionType = "URL"
	CAROUSELACTIONTYPE_PHONE_NUMBER CarouselActionType = "PHONE_NUMBER"
	CAROUSELACTIONTYPE_QUICK_REPLY  CarouselActionType = "QUICK_REPLY"
)

List of carouselActionType

type CarouselCard added in v1.22.4

type CarouselCard struct {
	Title   string           `json:"title,omitempty"`
	Body    string           `json:"body,omitempty"`
	Media   string           `json:"media,omitempty"`
	Actions []CarouselAction `json:"actions,omitempty"`
}

CarouselCard struct for CarouselCard

type CatalogItem added in v1.20.0

type CatalogItem struct {
	Id           string  `json:"id,omitempty"`
	SectionTitle string  `json:"section_title,omitempty"`
	Name         string  `json:"name,omitempty"`
	MediaUrl     string  `json:"media_url,omitempty"`
	Price        float32 `json:"price,omitempty"`
	Description  string  `json:"description,omitempty"`
}

CatalogItem struct for CatalogItem

func (*CatalogItem) UnmarshalJSON added in v1.20.0

func (response *CatalogItem) UnmarshalJSON(bytes []byte) (err error)

type ContentApprovalRequest added in v1.20.0

type ContentApprovalRequest struct {
	// Name of the template.
	Name string `json:"name"`
	// A WhatsApp recognized template category.
	Category string `json:"category"`
}

ContentApprovalRequest Content approval request body

type ContentCreateRequest added in v1.20.0

type ContentCreateRequest struct {
	// User defined name of the content
	FriendlyName string `json:"friendly_name,omitempty"`
	// Key value pairs of variable name to value
	Variables map[string]string `json:"variables,omitempty"`
	// Language code for the content
	Language string `json:"language"`
	Types    Types  `json:"types"`
}

ContentCreateRequest Content creation request body

type ContentV1ApprovalCreate added in v1.20.0

type ContentV1ApprovalCreate struct {
	Name                *string `json:"name,omitempty"`
	Category            *string `json:"category,omitempty"`
	ContentType         *string `json:"content_type,omitempty"`
	Status              *string `json:"status,omitempty"`
	RejectionReason     *string `json:"rejection_reason,omitempty"`
	AllowCategoryChange *bool   `json:"allow_category_change,omitempty"`
}

ContentV1ApprovalCreate struct for ContentV1ApprovalCreate

type ContentV1ApprovalFetch added in v1.2.2

type ContentV1ApprovalFetch struct {
	// The unique string that that we created to identify the Content resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// Contains the whatsapp approval information for the Content resource, with fields such as approval status, rejection reason, and category, amongst others.
	Whatsapp *interface{} `json:"whatsapp,omitempty"`
	// The URL of the resource, relative to `https://content.twilio.com`.
	Url *string `json:"url,omitempty"`
}

ContentV1ApprovalFetch struct for ContentV1ApprovalFetch

type ContentV1Content

type ContentV1Content struct {
	// The date and time in GMT that 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 that 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 unique string that that we created to identify the Content resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// A string name used to describe the Content resource. Not visible to the end recipient.
	FriendlyName *string `json:"friendly_name,omitempty"`
	// Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.
	Language *string `json:"language,omitempty"`
	// Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}.
	Variables *interface{} `json:"variables,omitempty"`
	// The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
	Types *interface{} `json:"types,omitempty"`
	// The URL of the resource, relative to `https://content.twilio.com`.
	Url *string `json:"url,omitempty"`
	// A list of links related to the Content resource, such as approval_fetch and approval_create
	Links *map[string]interface{} `json:"links,omitempty"`
}

ContentV1Content struct for ContentV1Content

type ContentV1ContentAndApprovals added in v1.4.0

type ContentV1ContentAndApprovals struct {
	// The date and time in GMT that 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 that 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 unique string that that we created to identify the Content resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// A string name used to describe the Content resource. Not visible to the end recipient.
	FriendlyName *string `json:"friendly_name,omitempty"`
	// Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.
	Language *string `json:"language,omitempty"`
	// Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}.
	Variables *interface{} `json:"variables,omitempty"`
	// The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
	Types *interface{} `json:"types,omitempty"`
	// The submitted information and approval request status of the Content resource.
	ApprovalRequests *interface{} `json:"approval_requests,omitempty"`
}

ContentV1ContentAndApprovals struct for ContentV1ContentAndApprovals

type ContentV1LegacyContent added in v1.3.3

type ContentV1LegacyContent struct {
	// The date and time in GMT that 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 that 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 unique string that that we created to identify the Content resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// A string name used to describe the Content resource. Not visible to the end recipient.
	FriendlyName *string `json:"friendly_name,omitempty"`
	// Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.
	Language *string `json:"language,omitempty"`
	// Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}.
	Variables *interface{} `json:"variables,omitempty"`
	// The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
	Types *interface{} `json:"types,omitempty"`
	// The string name of the legacy content template associated with this Content resource, unique across all template names for its account.  Only lowercase letters, numbers and underscores are allowed
	LegacyTemplateName *string `json:"legacy_template_name,omitempty"`
	// The string body field of the legacy content template associated with this Content resource
	LegacyBody *string `json:"legacy_body,omitempty"`
	// The URL of the resource, relative to `https://content.twilio.com`.
	Url *string `json:"url,omitempty"`
}

ContentV1LegacyContent struct for ContentV1LegacyContent

type CreateApprovalCreateParams added in v1.22.4

type CreateApprovalCreateParams struct {
	//
	ContentApprovalRequest *ContentApprovalRequest `json:"ContentApprovalRequest,omitempty"`
}

Optional parameters for the method 'CreateApprovalCreate'

func (*CreateApprovalCreateParams) SetContentApprovalRequest added in v1.22.4

func (params *CreateApprovalCreateParams) SetContentApprovalRequest(ContentApprovalRequest ContentApprovalRequest) *CreateApprovalCreateParams

type CreateContentParams added in v1.20.0

type CreateContentParams struct {
	//
	ContentCreateRequest *ContentCreateRequest `json:"ContentCreateRequest,omitempty"`
}

Optional parameters for the method 'CreateContent'

func (*CreateContentParams) SetContentCreateRequest added in v1.20.0

func (params *CreateContentParams) SetContentCreateRequest(ContentCreateRequest ContentCreateRequest) *CreateContentParams

type ListContentAndApprovalsParams added in v1.4.0

type ListContentAndApprovalsParams 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 'ListContentAndApprovals'

func (*ListContentAndApprovalsParams) SetLimit added in v1.4.0

func (*ListContentAndApprovalsParams) SetPageSize added in v1.4.0

func (params *ListContentAndApprovalsParams) SetPageSize(PageSize int) *ListContentAndApprovalsParams

type ListContentAndApprovalsResponse added in v1.4.0

type ListContentAndApprovalsResponse struct {
	Contents []ContentV1ContentAndApprovals `json:"contents,omitempty"`
	Meta     ListContentResponseMeta        `json:"meta,omitempty"`
}

ListContentAndApprovalsResponse struct for ListContentAndApprovalsResponse

type ListContentParams

type ListContentParams 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 'ListContent'

func (*ListContentParams) SetLimit

func (params *ListContentParams) SetLimit(Limit int) *ListContentParams

func (*ListContentParams) SetPageSize

func (params *ListContentParams) SetPageSize(PageSize int) *ListContentParams

type ListContentResponse

type ListContentResponse struct {
	Contents []ContentV1Content      `json:"contents,omitempty"`
	Meta     ListContentResponseMeta `json:"meta,omitempty"`
}

ListContentResponse struct for ListContentResponse

type ListContentResponseMeta

type ListContentResponseMeta 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"`
}

ListContentResponseMeta struct for ListContentResponseMeta

type ListItem added in v1.20.0

type ListItem struct {
	Id          string `json:"id"`
	Item        string `json:"item"`
	Description string `json:"description,omitempty"`
}

ListItem struct for ListItem

type ListLegacyContentParams added in v1.3.3

type ListLegacyContentParams 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 'ListLegacyContent'

func (*ListLegacyContentParams) SetLimit added in v1.3.3

func (params *ListLegacyContentParams) SetLimit(Limit int) *ListLegacyContentParams

func (*ListLegacyContentParams) SetPageSize added in v1.3.3

func (params *ListLegacyContentParams) SetPageSize(PageSize int) *ListLegacyContentParams

type ListLegacyContentResponse added in v1.3.3

type ListLegacyContentResponse struct {
	Contents []ContentV1LegacyContent `json:"contents,omitempty"`
	Meta     ListContentResponseMeta  `json:"meta,omitempty"`
}

ListLegacyContentResponse struct for ListLegacyContentResponse

type QuickReplyAction added in v1.20.0

type QuickReplyAction struct {
	Type  QuickReplyActionType `json:"type"`
	Title string               `json:"title"`
	Id    string               `json:"id,omitempty"`
}

QuickReplyAction struct for QuickReplyAction

type QuickReplyActionType added in v1.20.0

type QuickReplyActionType string

QuickReplyActionType the model 'QuickReplyActionType'

const (
	QUICKREPLYACTIONTYPE_QUICK_REPLY QuickReplyActionType = "QUICK_REPLY"
)

List of quickReplyActionType

type TwilioCallToAction added in v1.20.0

type TwilioCallToAction struct {
	Body    string               `json:"body,omitempty"`
	Actions []CallToActionAction `json:"actions,omitempty"`
}

TwilioCallToAction twilio/call-to-action buttons let recipients tap to trigger actions such as launching a website or making a phone call.

type TwilioCard added in v1.20.0

type TwilioCard struct {
	Title    string       `json:"title"`
	Subtitle string       `json:"subtitle,omitempty"`
	Media    []string     `json:"media,omitempty"`
	Actions  []CardAction `json:"actions,omitempty"`
}

TwilioCard twilio/card is a structured template which can be used to send a series of related information. It must include a title and at least one additional field.

type TwilioCarousel added in v1.22.4

type TwilioCarousel struct {
	Body  string         `json:"body"`
	Cards []CarouselCard `json:"cards"`
}

TwilioCarousel twilio/carousel templates allow you to send a single text message accompanied by a set of up to 10 carousel cards in a horizontally scrollable view

type TwilioCatalog added in v1.20.0

type TwilioCatalog struct {
	Title        string        `json:"title,omitempty"`
	Body         string        `json:"body"`
	Subtitle     string        `json:"subtitle,omitempty"`
	Id           string        `json:"id,omitempty"`
	Items        []CatalogItem `json:"items,omitempty"`
	DynamicItems string        `json:"dynamic_items,omitempty"`
}

TwilioCatalog twilio/catalog type lets recipients view list of catalog products, ask questions about products, order products.

type TwilioListPicker added in v1.20.0

type TwilioListPicker struct {
	Body   string     `json:"body"`
	Button string     `json:"button"`
	Items  []ListItem `json:"items"`
}

TwilioListPicker twilio/list-picker includes a menu of up to 10 options, which offers a simple way for users to make a selection.

type TwilioLocation added in v1.20.0

type TwilioLocation struct {
	Latitude  float32 `json:"latitude"`
	Longitude float32 `json:"longitude"`
	Label     string  `json:"label,omitempty"`
}

TwilioLocation twilio/location type contains a location pin and an optional label, which can be used to enhance delivery notifications or connect recipients to physical experiences you offer.

func (*TwilioLocation) UnmarshalJSON added in v1.20.0

func (response *TwilioLocation) UnmarshalJSON(bytes []byte) (err error)

type TwilioMedia added in v1.20.0

type TwilioMedia struct {
	Body  string   `json:"body,omitempty"`
	Media []string `json:"media"`
}

TwilioMedia twilio/media is used to send file attachments, or to send long text via MMS in the US and Canada. As such, the twilio/media type must contain at least ONE of text or media content.

type TwilioQuickReply added in v1.20.0

type TwilioQuickReply struct {
	Body    string             `json:"body"`
	Actions []QuickReplyAction `json:"actions"`
}

TwilioQuickReply twilio/quick-reply templates let recipients tap, rather than type, to respond to the message.

type TwilioText added in v1.20.0

type TwilioText struct {
	Body string `json:"body"`
}

TwilioText Type containing only plain text-based content

type Types added in v1.20.0

type Types struct {
	TwilioText             *TwilioText             `json:"twilio/text,omitempty"`
	TwilioMedia            *TwilioMedia            `json:"twilio/media,omitempty"`
	TwilioLocation         *TwilioLocation         `json:"twilio/location,omitempty"`
	TwilioListPicker       *TwilioListPicker       `json:"twilio/list-picker,omitempty"`
	TwilioCallToAction     *TwilioCallToAction     `json:"twilio/call-to-action,omitempty"`
	TwilioQuickReply       *TwilioQuickReply       `json:"twilio/quick-reply,omitempty"`
	TwilioCard             *TwilioCard             `json:"twilio/card,omitempty"`
	TwilioCatalog          *TwilioCatalog          `json:"twilio/catalog,omitempty"`
	TwilioCarousel         *TwilioCarousel         `json:"twilio/carousel,omitempty"`
	WhatsappCard           *WhatsappCard           `json:"whatsapp/card,omitempty"`
	WhatsappAuthentication *WhatsappAuthentication `json:"whatsapp/authentication,omitempty"`
}

Types Content types

type WhatsappAuthentication added in v1.20.0

type WhatsappAuthentication struct {
	AddSecurityRecommendation bool                   `json:"add_security_recommendation,omitempty"`
	CodeExpirationMinutes     float32                `json:"code_expiration_minutes,omitempty"`
	Actions                   []AuthenticationAction `json:"actions"`
}

WhatsappAuthentication whatsApp/authentication templates let companies deliver WA approved one-time-password button.

func (*WhatsappAuthentication) UnmarshalJSON added in v1.20.0

func (response *WhatsappAuthentication) UnmarshalJSON(bytes []byte) (err error)

type WhatsappCard added in v1.20.0

type WhatsappCard struct {
	Body       string       `json:"body"`
	Footer     string       `json:"footer,omitempty"`
	Media      []string     `json:"media,omitempty"`
	HeaderText string       `json:"header_text,omitempty"`
	Actions    []CardAction `json:"actions,omitempty"`
}

WhatsappCard whatsapp/card is a structured template which can be used to send a series of related information. It must include a body and at least one additional field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL