Documentation
¶
Index ¶
- Constants
- type ActionResponseWithId
- type AuthRequestKey
- type CampaignRequestModel
- type ContactRequstModel
- type EventRequestModel
- type IdResponse
- type MessageStatus
- type Response
- type SendMessage
- type SendPinCode
- type TokenResponse
- type VerifyPinCode
- type WirayaClient
- func (c *WirayaClient) AddContact(contactID int64, data ContactRequstModel) (response ActionResponseWithId, err error)
- func (c *WirayaClient) AddContactToCampaign(contactID int64, data CampaignRequestModel) (response IdResponse, err error)
- func (c *WirayaClient) AddEventToContact(contactID int64, data EventRequestModel) (response IdResponse, err error)
- func (c *WirayaClient) GetMessageStatus(data MessageStatus) (response Response, err error)
- func (c *WirayaClient) SendMessageFromAlpha(data SendMessage) (response Response, err error)
- func (c *WirayaClient) SendPinCode(data SendPinCode) (response Response, err error)
- func (c *WirayaClient) VerifyCode(data VerifyPinCode) (response Response, err error)
Constants ¶
View Source
const ( ErrorSender = "ERROR_SENDER" ErrorContent = "ERROR_CONTENT" ErrorDateTime = "ERROR_DATETIME" ErrorAuthentication = "ERROR_AUTHENTICATION" ErrorProjectNotFound = "ERROR_PROJECT_NOT_FOUND" StatusInqueue = "INQUEUE" StatusSent = "SENT" StatusDelivered = "DELIVERED" StatusNotDelivered = "NOT DELIVERED" StatusTooLate = "TOOLATE" StatusFailure = "FAILURE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionResponseWithId ¶
type AuthRequestKey ¶
type AuthRequestKey struct {
Key string `json:"key,omitempty"` // Static Wiraya API key
}
type CampaignRequestModel ¶
type ContactRequstModel ¶
type EventRequestModel ¶
type IdResponse ¶
type IdResponse struct {
Id string `json:"id"` // Correlation id for ingested entity
}
type MessageStatus ¶
type MessageStatus struct {
MessageId string `json:"MessageId"`
}
type SendMessage ¶
type SendPinCode ¶
type SendPinCode struct {
Recipient string `json:"recipient"` // Number to send pin to
Sender string `json:"sender"` // Sender name for SMS
Message string `json:"message"` // Message, add {code} to specify where the pin should be
IPAddress string `json:"ipaddress"` // IPAddress of user to avoid spam
}
type TokenResponse ¶
type VerifyPinCode ¶
type WirayaClient ¶
type WirayaClient struct {
HttpClientProxy *http.Client
HttpClient *http.Client
// contains filtered or unexported fields
}
func NewWirayaClient ¶
func NewWirayaClient(xApiKey string, proxy *string) (client *WirayaClient, err error)
func (*WirayaClient) AddContact ¶
func (c *WirayaClient) AddContact(contactID int64, data ContactRequstModel) (response ActionResponseWithId, err error)
func (*WirayaClient) AddContactToCampaign ¶
func (c *WirayaClient) AddContactToCampaign(contactID int64, data CampaignRequestModel) (response IdResponse, err error)
func (*WirayaClient) AddEventToContact ¶
func (c *WirayaClient) AddEventToContact(contactID int64, data EventRequestModel) (response IdResponse, err error)
func (*WirayaClient) GetMessageStatus ¶
func (c *WirayaClient) GetMessageStatus(data MessageStatus) (response Response, err error)
func (*WirayaClient) SendMessageFromAlpha ¶
func (c *WirayaClient) SendMessageFromAlpha(data SendMessage) (response Response, err error)
func (*WirayaClient) SendPinCode ¶
func (c *WirayaClient) SendPinCode(data SendPinCode) (response Response, err error)
func (*WirayaClient) VerifyCode ¶
func (c *WirayaClient) VerifyCode(data VerifyPinCode) (response Response, err error)
Click to show internal directories.
Click to hide internal directories.