message

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package message contains auto-generated files. DO NOT MODIFY

Package message contains auto-generated files. DO NOT MODIFY

Package message contains auto-generated files. DO NOT MODIFY

Package message contains auto-generated files. DO NOT MODIFY

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Feedbacks        *feedbacks.Client
	MediaAttachment  func(string) *media_attachment.Client
	MediaAttachments *media_attachments.Client
	// contains filtered or unexported fields
}

Client for managing a specific message resource See https://www.twilio.com/docs/sms/api/message-resource for more details

func New

func New(client *client.Client, properties ClientProperties) *Client

New creates a new instance of the message client

func (Client) Delete

func (c Client) Delete() error

Delete removes a message resource from the account See https://www.twilio.com/docs/sms/api/message-resource#delete-a-message-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) DeleteWithContext

func (c Client) DeleteWithContext(context context.Context) error

DeleteWithContext removes a message resource from the account See https://www.twilio.com/docs/sms/api/message-resource#delete-a-message-resource for more details

func (Client) Fetch

func (c Client) Fetch() (*FetchMessageResponse, error)

Fetch retrieves a message resource See https://www.twilio.com/docs/sms/api/message-resource#fetch-a-message-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) FetchWithContext

func (c Client) FetchWithContext(context context.Context) (*FetchMessageResponse, error)

FetchWithContext retrieves a message resource See https://www.twilio.com/docs/sms/api/message-resource#fetch-a-message-resource for more details

func (Client) Update

Update modifies a message resource See https://www.twilio.com/docs/sms/api/message-resource#update-a-message-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) UpdateWithContext

func (c Client) UpdateWithContext(context context.Context, input *UpdateMessageInput) (*UpdateMessageResponse, error)

UpdateWithContext modifies a message resource See https://www.twilio.com/docs/sms/api/message-resource#update-a-message-resource for more details

type ClientProperties

type ClientProperties struct {
	AccountSid string
	Sid        string
}

ClientProperties are the properties required to manage the message resources

type FetchMessageResponse

type FetchMessageResponse struct {
	APIVersion          string             `json:"api_version"`
	AccountSid          string             `json:"account_sid"`
	Body                string             `json:"body"`
	DateCreated         utils.RFC2822Time  `json:"date_created"`
	DateSent            utils.RFC2822Time  `json:"date_sent"`
	DateUpdated         *utils.RFC2822Time `json:"date_updated,omitempty"`
	Direction           string             `json:"direction"`
	ErrorCode           *int               `json:"error_code,omitempty"`
	ErrorMessage        *string            `json:"error_message,omitempty"`
	From                *string            `json:"from,omitempty"`
	MessagingServiceSid *string            `json:"messaging_service_sid,omitempty"`
	NumMedia            string             `json:"num_media"`
	NumSegments         string             `json:"num_segments"`
	Price               *string            `json:"price,omitempty"`
	PriceUnit           string             `json:"price_unit"`
	Sid                 string             `json:"sid"`
	Status              string             `json:"status"`
	To                  string             `json:"to"`
}

FetchMessageResponse defines the response fields for the retrieved message

type UpdateMessageInput

type UpdateMessageInput struct {
	Body string `form:"Body"`
}

UpdateMessageInput defines input fields for updating a message resource

type UpdateMessageResponse

type UpdateMessageResponse struct {
	APIVersion          string             `json:"api_version"`
	AccountSid          string             `json:"account_sid"`
	Body                string             `json:"body"`
	DateCreated         utils.RFC2822Time  `json:"date_created"`
	DateSent            utils.RFC2822Time  `json:"date_sent"`
	DateUpdated         *utils.RFC2822Time `json:"date_updated,omitempty"`
	Direction           string             `json:"direction"`
	ErrorCode           *int               `json:"error_code,omitempty"`
	ErrorMessage        *string            `json:"error_message,omitempty"`
	From                *string            `json:"from,omitempty"`
	MessagingServiceSid *string            `json:"messaging_service_sid,omitempty"`
	NumMedia            string             `json:"num_media"`
	NumSegments         string             `json:"num_segments"`
	Price               *string            `json:"price,omitempty"`
	PriceUnit           string             `json:"price_unit"`
	Sid                 string             `json:"sid"`
	Status              string             `json:"status"`
	To                  string             `json:"to"`
}

UpdateMessageResponse defines the response fields for the updated message

Directories

Path Synopsis
Package feedbacks contains auto-generated files.
Package feedbacks contains auto-generated files.
Package media_attachment contains auto-generated files.
Package media_attachment contains auto-generated files.
Package media_attachments contains auto-generated files.
Package media_attachments contains auto-generated files.

Jump to

Keyboard shortcuts

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