Documentation
¶
Index ¶
- type BulkEmail
- type BulkEmailResponse
- type Client
- func (c Client) DoGetRequest(endpoint string) (*http.Response, error)
- func (c Client) DoPostRequest(endpoint string, body []byte) (*http.Response, error)
- func (c Client) GetStatus(options StatusQueryOptions) (StatusResponses, error)
- func (c Client) GetStatusById(id string) (StatusResponse, error)
- func (c Client) NextStatusPage(s StatusResponses) (StatusResponses, error)
- func (c Client) SendBulkEmail(e BulkEmail) (BulkEmailResponse, error)
- func (c Client) SendEmail(e Email) (Response, error)
- func (c Client) SendSms(s Sms) (Response, error)
- type Email
- type Link
- type Response
- type ResponseError
- type Sms
- type StatusQueryOptions
- type StatusResponse
- type StatusResponses
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkEmailResponse ¶
type BulkEmailResponse struct {
// Valid Response
Data bulkEmailDataResponse `json:"data"`
// Error Response
StatusCode int `json:"status_code"`
Errors []ResponseError `json:"errors"`
}
type Client ¶
func (Client) DoPostRequest ¶
func (Client) GetStatus ¶
func (c Client) GetStatus(options StatusQueryOptions) (StatusResponses, error)
func (Client) GetStatusById ¶
func (c Client) GetStatusById(id string) (StatusResponse, error)
func (Client) NextStatusPage ¶
func (c Client) NextStatusPage(s StatusResponses) (StatusResponses, error)
func (Client) SendBulkEmail ¶
func (c Client) SendBulkEmail(e BulkEmail) (BulkEmailResponse, error)
type Response ¶
type Response struct {
// Valid Response
Id string `json:"id"`
Reference string `json:"reference"`
Content map[string]string `json:"content"`
Uri string `json:"uri"`
Template responseTemplate `json:"template"`
// Error Response
StatusCode int `json:"status_code"`
Errors []ResponseError `json:"errors"`
}
type ResponseError ¶
type StatusQueryOptions ¶
type StatusResponse ¶
type StatusResponse struct {
// Valid Response
Id string `json:"id"`
Reference string `json:"reference"`
EmailAddress string `json:"email_address"`
PhoneNumber string `json:"phone_number"`
Type string `json:"type"`
Status string `json:"status"`
StatusDescription string `json:"status_description"`
ProviderResponse string `json:"provider_response"`
Template responseTemplate `json:"template"`
Body string `json:"body"`
Subject string `json:"subject"`
CreatedAt time.Time `json:"created_at"`
CreatedByName string `json:"created_by_name"`
SentAt time.Time `json:"sent_at"`
CompletedAt time.Time `json:"completed_at"`
// Error Response
StatusCode int `json:"status_code"`
Errors []ResponseError `json:"errors"`
}
type StatusResponses ¶
type StatusResponses struct {
// Valid Response
Notifications []StatusResponse `json:"notifications"`
Links Link `json:"links"`
// Error Response
StatusCode int `json:"status_code"`
Errors []ResponseError `json:"errors"`
}
func (*StatusResponses) HasNext ¶
func (s *StatusResponses) HasNext() bool
Click to show internal directories.
Click to hide internal directories.