Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NexmoClient ¶
type NexmoClient struct { Client *http.Client NexmoCredentials *config.NexmoCredentials }
func NewNexmoClient ¶
func NewNexmoClient(c *config.NexmoCredentials) *NexmoClient
func (*NexmoClient) Send ¶
func (c *NexmoClient) Send(ctx context.Context, opts smsapi.SendOptions) error
type SendResponse ¶
type SendResponse struct { MessageCount string `json:"message-count"` Messages []SendResponseMessage `json:"messages"` }
See https://developer.vonage.com/en/api/sms
func ParseSendResponse ¶
func ParseSendResponse(jsonData []byte) (*SendResponse, error)
type SendResponseMessage ¶
type SendResponseMessage struct { // https://developer.vonage.com/en/messaging/sms/guides/troubleshooting-sms#sms-api-error-codes Status string `json:"status"` // When error, the following fields are present. ErrorText string `json:"error-text,omitempty"` // When success, the following fields are present. To string `json:"to,omitempty"` MessageID string `json:"message-id,omitempty"` RemainingBalance string `json:"remaining-balance,omitempty"` MessagePirce string `json:"message-price,omitempty"` Network string `json:"network,omitempty"` ClientRef string `json:"client-ref,omitempty"` AccountRef string `json:"account-ref,omitempty"` }
Click to show internal directories.
Click to hide internal directories.