Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { SMS *smsService // contains filtered or unexported fields }
Client is the campay API client. Do not instantiate this client with Client{}. Use the New method instead.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is options for constructing a client
func WithAPIKey ¶
WithAPIKey sets your API Key, You can get it from sms.to account
func WithBaseURL ¶
WithBaseURL set's the base url for the sms.to API
func WithHTTPClient ¶
WithHTTPClient sets the underlying HTTP client used for API requests. By default, http.DefaultClient is used.
type SmsMessage ¶ added in v0.0.2
type SmsMessage struct { ID int `json:"id"` SecondaryID string `json:"_id"` CampaignID interface{} `json:"campaign_id"` UserID int `json:"user_id"` SenderID string `json:"sender_id"` Message string `json:"message"` To string `json:"to"` Status string `json:"status"` ClientCost float64 `json:"client_cost"` CallbackURL string `json:"callback_url"` ScheduledFor interface{} `json:"scheduled_for"` Timezone interface{} `json:"timezone"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` SentAt string `json:"sent_at"` MessageID interface{} `json:"message_id"` SmsCount int `json:"sms_count"` FinalCallbackSent int `json:"final_callback_sent"` IsAPI int `json:"is_api"` A2Code interface{} `json:"a2_code"` OptOut interface{} `json:"optout"` FailedReason string `json:"failed_reason"` Campaign interface{} `json:"campaign"` Provider interface{} `json:"provider"` }
SmsMessage is the details of an SMS message that was sent out
type SmsSendSingleRequest ¶
type SmsSendSingleRequest struct { Message string `json:"message"` To string `json:"to"` BypassOptOut *bool `json:"bypass_optout,omitempty"` SenderID *string `json:"sender_id,omitempty"` CallbackURL *string `json:"callback_url,omitempty"` }
SmsSendSingleRequest are parameters for sending a single SMS message
type SmsSendSingleResponse ¶
type SmsSendSingleResponse struct { Message string `json:"message"` Success bool `json:"success"` MessageID string `json:"message_id"` }
SmsSendSingleResponse is the response after sending a single SMS message
Source Files ¶
Click to show internal directories.
Click to hide internal directories.