Documentation
¶
Index ¶
- Constants
- Variables
- func Encode(msg string) (res string)
- func EncodeHTML(msg string) (res string)
- type Client
- type ErrorCode
- type ErrorList
- type FnOption
- func WithBaseURL(s string) FnOption
- func WithBasicAuth(user string, password string) FnOption
- func WithClient(c heimdall.Doer) FnOption
- func WithCustomIPs(ips ...string) FnOption
- func WithHystrixOptions(opts ...hystrix.Option) FnOption
- func WithTimeout(t time.Duration) FnOption
- func WithTokenManager(tm manager.TokenManager) FnOption
- func WithTokenManagerOptions(opts ...manager.FnOption) FnOption
- type MessageType
- type Option
- type OptionBasicAuth
- type RequestSendSMS
- func (r *RequestSendSMS) AddMessage(req *RequestSendSMSMessage) *RequestSendSMS
- func (r *RequestSendSMS) Default() *RequestSendSMS
- func (r *RequestSendSMS) SetChannelType(chType string) *RequestSendSMS
- func (r *RequestSendSMS) SetDLRURL(urlStr string) *RequestSendSMS
- func (r *RequestSendSMS) SetPassword(password string) *RequestSendSMS
- func (r *RequestSendSMS) SetTypeWhatsapp() *RequestSendSMS
- func (r *RequestSendSMS) SetUnixTimestamp(unixTimestamp int64) *RequestSendSMS
- func (r *RequestSendSMS) SetUsername(username string) *RequestSendSMS
- func (r *RequestSendSMS) SetVersion(version string) *RequestSendSMS
- type RequestSendSMSDLR
- type RequestSendSMSMessage
- func (r *RequestSendSMSMessage) AddAddress(addr *RequestSendSMSMessageAddress) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) Default(id int) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetBURLInfo(bURLInfo string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetCaption(caption string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetCoding(coding string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetContentType(contentType string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetID(id string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetMediaData(mediaData string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetMessageType(msgType MessageType) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetProperty(property string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetSendOn(sendOn string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetTemplate(templateID string, parameters ...string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetText(text string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetType(typ string) *RequestSendSMSMessage
- func (r *RequestSendSMSMessage) SetUDH(udh string) *RequestSendSMSMessage
- type RequestSendSMSMessageAddress
- func (r *RequestSendSMSMessageAddress) Default(id int) *RequestSendSMSMessageAddress
- func (r *RequestSendSMSMessageAddress) Normalize() *RequestSendSMSMessageAddress
- func (r *RequestSendSMSMessageAddress) SetFrom(from string) *RequestSendSMSMessageAddress
- func (r *RequestSendSMSMessageAddress) SetSequence(seq string) *RequestSendSMSMessageAddress
- func (r *RequestSendSMSMessageAddress) SetTag(tag string) *RequestSendSMSMessageAddress
- func (r *RequestSendSMSMessageAddress) SetTo(to string) *RequestSendSMSMessageAddress
- type RequestSendSMSMessageAddresses
- type RequestSendSMSMessages
- type RequestSendWhatsappMessage
- type ResponseMessage
- type ResponseMessageAck
- type ResponseMessageAckError
- type ResponseMessageAckGUID
- func (r *ResponseMessageAckGUID) GetError() (err error)
- func (r *ResponseMessageAckGUID) GetID() string
- func (r *ResponseMessageAckGUID) GetMessageError() (res *ResponseMessageAckGUIDError, ok bool)
- func (r *ResponseMessageAckGUID) GetMessageErrors() (res *ResponseMessageAckGUIDErrors, ok bool)
- func (r *ResponseMessageAckGUID) UnmarshalJSON(data []byte) (err error)
- type ResponseMessageAckGUIDError
- type ResponseMessageAckGUIDErrors
- type ResponseMessageAckGUIDs
- type UnknownError
Constants ¶
const ( URLToken = "/api/messages/token" URLActionGenerateToken = URLToken + "?action=generate" URLActionEnableToken = URLToken + "?action=enable" URLActionDisableToken = URLToken + "?action=disable" URLActionDeleteToken = URLToken + "?action=delete" URLActionSendSMS = "/servlet/psms.JsonEservice" )
List of URLs used in this package.
const ( // QueryParamToken is the key for adding the token to the query params of URL. QueryParamToken = "token" // DefaultPayloadVersion is the default version of Payload. DefaultPayloadVersion = "1.2" // DefaultUDHText is the default UDH used for the text message. // UDH is used for sending binary messages. // For text message the value should be 0. DefaultUDHText = "0" // DefaultCodingText is the default coding used for the text message. // Extended type of messages. // For text message the value should be 1. DefaultCodingText = "1" // DefaultPropertyText is the default property used for the text message. // Unique property of message. // Default value is 0. // For sending Flash SMS the value should be 1. DefaultPropertyText = "0" // DefaultPropertyFlash is the default property used for the flash message. DefaultPropertyFlash = "1" // ChannelTypeWhatsapp is the channel type for Whatsapp messages. ChannelTypeWhatsapp = "4" // DefaultTemplateSeparator is the default separator used for TEMPLATEINFO in ValueFirst. DefaultTemplateSeparator = "~" )
const ( LimitEncodingSingleDigit = 16 LimitEncodingLower = 32 LimitEncodingUpper = 128 )
These constants represents the lower and upper limit of the characters that don't have to be encoded.
const ( // DefaultTimeout sets the default timeout of the HTTP client. DefaultTimeout = 30 * time.Second // BaseURL sets the base URL of the API. BaseURL = "https://api.myvfirst.com/psms" )
Variables ¶
var ( ErrEmptyUsername = errors.New("empty username") ErrEmptyPassword = errors.New("empty password") ErrDecodeVarIsNotPtr = errors.New("the decode variable is not a pointer") ErrNilRequest = errors.New("nil request") )
List of errors in the valuefirst package.
Functions ¶
func Encode ¶ added in v1.0.5
Encode encodes the message using the step 2 encoding of ValueFirst documentation.
func EncodeHTML ¶ added in v1.0.5
EncodeHTML encodes the message using the step 1 encoding of ValueFirst documentation. This encoding is used for HTML special characters.
Types ¶
type Client ¶
type Client interface { manager.TokenClient // SendSMS sends SMS messages to a list of addresses. SendSMS(ctx context.Context, req *RequestSendSMS) (resp *ResponseMessage, err error) }
Client is the interface for the ValueFirst API client.
type ErrorCode ¶ added in v1.0.8
type ErrorCode string
ErrorCode is the error code from the ValueFirst.
const ( ErrCodeGeneralSuccess ErrorCode = "0" ErrCodeGeneralNotConformDTD ErrorCode = "65535" ErrCodeMessageInvalidSenderID ErrorCode = "28680" ErrCodeMessageInvalidMessage ErrorCode = "28681" ErrCodeStatusRequestSuccess ErrorCode = "8448" ErrCodeSchedulerSuccess ErrorCode = "13568" )
List of error codes in the ValueFirst.
type ErrorList ¶
type ErrorList []error
ErrorList is a list of errors.
type FnOption ¶
type FnOption func(o *Option)
FnOption is a function that sets the option.
func WithBasicAuth ¶
WithBasicAuth sets the basic auth credentials.
func WithCustomIPs ¶
WithCustomIPs sets the custom IPs used for hitting the API.
func WithHystrixOptions ¶
WithHystrixOptions sets the hystrix options.
func WithTimeout ¶
WithTimeout sets the timeout of the HTTP client.
func WithTokenManager ¶
func WithTokenManager(tm manager.TokenManager) FnOption
WithTokenManager sets the token manager.
func WithTokenManagerOptions ¶ added in v1.0.10
WithTokenManagerOptions sets the token manager options.
type MessageType ¶ added in v1.0.5
type MessageType string
MessageType is the type of the message for Whatsapp.
const ( // MessageTypePlain is the plain type of Whatsapp message. MessageTypePlain MessageType = "1" // MessageTypePlainTwoWay is the plain type of Whatsapp message with two-way communication. MessageTypePlainTwoWay MessageType = "2" // MessageTypeRich is the rich type of Whatsapp message. MessageTypeRich MessageType = "3" // MessageTypeRichTwoWay is the rich type of Whatsapp message with two-way communication. MessageTypeRichTwoWay MessageType = "4" // MessageTypeBusinessCardSharingTwoWay is the business card sharing type of Whatsapp message with two-way communication. MessageTypeBusinessCardSharingTwoWay MessageType = "5" // MessageTypeLocationSharingTwoWay is the location sharing type of Whatsapp message with two-way communication. MessageTypeLocationSharingTwoWay MessageType = "6" // MessageTypeListTwoWay is the list type of Whatsapp message with two-way communication. MessageTypeListTwoWay MessageType = "7" // MessageTypeReplyButtonTwoWay is the reply button type of Whatsapp message with two-way communication. MessageTypeReplyButtonTwoWay MessageType = "8" )
func (MessageType) String ¶ added in v1.0.5
func (m MessageType) String() string
String returns the string representation of the MessageType.
type Option ¶
type Option struct { BaseURL string BasicAuth OptionBasicAuth Timeout time.Duration Client heimdall.Doer HystrixOptions []hystrix.Option CustomIPs []string TokenManager manager.TokenManager TokenManagerOptions []manager.FnOption // contains filtered or unexported fields }
Option is a config for Value.
type OptionBasicAuth ¶
OptionBasicAuth is a config for basic authorization.
type RequestSendSMS ¶
type RequestSendSMS struct { Version string `json:"@VER"` User struct { Username string `json:"@USERNAME,omitempty"` Password string `json:"@PASSWORD,omitempty"` ChannelType string `json:"@CH_TYPE,omitempty"` UnixTimestamp string `json:"@UNIXTIMESTAMP,omitempty"` } `json:"USER"` DLR RequestSendSMSDLR `json:"DLR"` SMS RequestSendSMSMessages `json:"SMS"` }
RequestSendSMS is the request of SendSMS.
func (*RequestSendSMS) AddMessage ¶ added in v1.0.5
func (r *RequestSendSMS) AddMessage(req *RequestSendSMSMessage) *RequestSendSMS
AddMessage adds a message to the RequestSendSMS.
func (*RequestSendSMS) Default ¶
func (r *RequestSendSMS) Default() *RequestSendSMS
Default sets the default values for the RequestSendSMS.
func (*RequestSendSMS) SetChannelType ¶ added in v1.0.5
func (r *RequestSendSMS) SetChannelType(chType string) *RequestSendSMS
SetChannelType sets the channel type of the RequestSendSMS.
func (*RequestSendSMS) SetDLRURL ¶ added in v1.0.5
func (r *RequestSendSMS) SetDLRURL(urlStr string) *RequestSendSMS
SetDLRURL sets the DLR URL of the RequestSendSMS.
func (*RequestSendSMS) SetPassword ¶ added in v1.0.5
func (r *RequestSendSMS) SetPassword(password string) *RequestSendSMS
SetPassword sets the password of the RequestSendSMS.
func (*RequestSendSMS) SetTypeWhatsapp ¶ added in v1.0.5
func (r *RequestSendSMS) SetTypeWhatsapp() *RequestSendSMS
SetTypeWhatsapp sets the type of RequestSendSMS to Whatsapp.
func (*RequestSendSMS) SetUnixTimestamp ¶ added in v1.0.5
func (r *RequestSendSMS) SetUnixTimestamp(unixTimestamp int64) *RequestSendSMS
SetUnixTimestamp sets the UnixTimestamp of the RequestSendSMS.
func (*RequestSendSMS) SetUsername ¶ added in v1.0.5
func (r *RequestSendSMS) SetUsername(username string) *RequestSendSMS
SetUsername sets the username of the RequestSendSMS.
func (*RequestSendSMS) SetVersion ¶ added in v1.0.5
func (r *RequestSendSMS) SetVersion(version string) *RequestSendSMS
SetVersion sets the version of the RequestSendSMS.
type RequestSendSMSDLR ¶
type RequestSendSMSDLR struct {
URL string `json:"@URL"`
}
RequestSendSMSDLR is the DLR part of the RequestSendSMS.
type RequestSendSMSMessage ¶
type RequestSendSMSMessage struct { // UDH is used for sending binary messages. For text message the value should be 0. UDH string `json:"@UDH"` // Extended type of messages. For text message the value should be 1. Coding string `json:"@CODING"` // This field describe the message text to be sent to receiver. // SMS can contain up to 160 characters in Message Text. // API allows user to send Message text of more than 160 characters. // Credits will be deducted in the multiple of 160 characters according to the length of SMS. Text string `json:"@TEXT,omitempty"` // It is now possible to schedule a message. // To schedule message to go at a later time, // user can specify “SEND_ON” date as attribute of SMS tag. // Only absolute date is supported. // The value should be given in “YYYY-MM-DD HH:MM:SS TIMEZONE” format. // Time zone is difference w.r.t. to GMT. // Example: "2022-09-21 14:20:00 GMT+07:00". // For GMT Timezone, we can use both, either GMT+00:00 or GMT-00:00. // Please refer Scheduling Support for more information on this feature. SendOn string `json:"@SEND_ON,omitempty"` // New Parameter TEMPLATEINFO has been added for above functionality // which will contain the template id and variables value to be replaced in template text. // Template info parameter will have ~ separated values. // // If both TEXT and TEMPLATEINFO is given then priority will be given to Text. // // New error code i.e. INVALID_TEMPLATEINFO = 28694; has been created for error if occurred any, // related to TEMPLATEINFO parameter, which include like invalid templateid is provided, // variables count mismatch than the template Text variables count, // template text not found for the given template id. TemplateInfo string `json:"@TEMPLATEINFO,omitempty"` // Unique property of message. Default value is 0. For sending Flash SMS the value should be 1. Property string `json:"@PROPERTY"` // Unique ID of message. The client sends this value. // In future communication, server sends this value back to the client. // This value is used in future to check status of the message. ID string `json:"@ID"` // Describe the Sender as well as Receiver address. Address RequestSendSMSMessageAddresses `json:"ADDRESS"` // Embed Whatsapp Request RequestSendWhatsappMessage }
RequestSendSMSMessage is the message part of the RequestSendSMS.
func (*RequestSendSMSMessage) AddAddress ¶ added in v1.0.5
func (r *RequestSendSMSMessage) AddAddress(addr *RequestSendSMSMessageAddress) *RequestSendSMSMessage
func (*RequestSendSMSMessage) Default ¶
func (r *RequestSendSMSMessage) Default(id int) *RequestSendSMSMessage
Default sets the default values for the RequestSendSMSMessage.
func (*RequestSendSMSMessage) SetBURLInfo ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetBURLInfo(bURLInfo string) *RequestSendSMSMessage
SetBURLInfo sets the dynamic URL information of Whatsapp message.
func (*RequestSendSMSMessage) SetCaption ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetCaption(caption string) *RequestSendSMSMessage
SetCaption sets the caption of Whatsapp message.
func (*RequestSendSMSMessage) SetCoding ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetCoding(coding string) *RequestSendSMSMessage
SetCoding sets the coding of the message.
func (*RequestSendSMSMessage) SetContentType ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetContentType(contentType string) *RequestSendSMSMessage
SetContentType sets the content type of Whatsapp message.
func (*RequestSendSMSMessage) SetID ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetID(id string) *RequestSendSMSMessage
SetID sets the ID of the message.
func (*RequestSendSMSMessage) SetMediaData ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetMediaData(mediaData string) *RequestSendSMSMessage
SetMediaData sets the media data of Whatsapp message.
func (*RequestSendSMSMessage) SetMessageType ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetMessageType(msgType MessageType) *RequestSendSMSMessage
SetMessageType sets the message type of Whatsapp message.
func (*RequestSendSMSMessage) SetProperty ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetProperty(property string) *RequestSendSMSMessage
SetProperty sets the property of the message.
func (*RequestSendSMSMessage) SetSendOn ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetSendOn(sendOn string) *RequestSendSMSMessage
SetSendOn sets the scheduled sent time of the message.
func (*RequestSendSMSMessage) SetTemplate ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetTemplate(templateID string, parameters ...string) *RequestSendSMSMessage
SetTemplate sets the template of the RequestSendSMSMessage.
func (*RequestSendSMSMessage) SetText ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetText(text string) *RequestSendSMSMessage
SetText sets the text of the message.
func (*RequestSendSMSMessage) SetType ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetType(typ string) *RequestSendSMSMessage
SetType sets the type of Whatsapp message.
func (*RequestSendSMSMessage) SetUDH ¶ added in v1.0.5
func (r *RequestSendSMSMessage) SetUDH(udh string) *RequestSendSMSMessage
SetUDH sets the UDH of the message.
type RequestSendSMSMessageAddress ¶
type RequestSendSMSMessageAddress struct { // The Sender of the message. // This field should conform to Sender Phone Number guidelines. From string `json:"@FROM"` // Person receiving the SMS, should confirm to Receiver Phone Number guidelines. To string `json:"@TO"` // Unique Sequence ID. // Must be an integer and must be unique to each SMS. // While checking message status, you must send this value. Sequence string `json:"@SEQ"` // A text that identify message. // This is an optional parameter. Tag string `json:"@TAG"` }
RequestSendSMSMessageAddress is the address part of the RequestSendSMSMessage.
func (*RequestSendSMSMessageAddress) Default ¶
func (r *RequestSendSMSMessageAddress) Default(id int) *RequestSendSMSMessageAddress
Default sets the default values for the RequestSendSMSMessageAddress.
func (*RequestSendSMSMessageAddress) Normalize ¶ added in v1.0.3
func (r *RequestSendSMSMessageAddress) Normalize() *RequestSendSMSMessageAddress
Normalize normalizes the RequestSendSMSMessageAddress.
func (*RequestSendSMSMessageAddress) SetFrom ¶ added in v1.0.5
func (r *RequestSendSMSMessageAddress) SetFrom(from string) *RequestSendSMSMessageAddress
SetFrom sets the sender address of the message.
func (*RequestSendSMSMessageAddress) SetSequence ¶ added in v1.0.5
func (r *RequestSendSMSMessageAddress) SetSequence(seq string) *RequestSendSMSMessageAddress
SetSequence sets the sequence address of the message.
func (*RequestSendSMSMessageAddress) SetTag ¶ added in v1.0.5
func (r *RequestSendSMSMessageAddress) SetTag(tag string) *RequestSendSMSMessageAddress
SetTag sets the tag address of the message.
func (*RequestSendSMSMessageAddress) SetTo ¶ added in v1.0.5
func (r *RequestSendSMSMessageAddress) SetTo(to string) *RequestSendSMSMessageAddress
SetTo sets the destination address of the message.
type RequestSendSMSMessageAddresses ¶
type RequestSendSMSMessageAddresses []RequestSendSMSMessageAddress
RequestSendSMSMessageAddresses is a collection of RequestSendSMSMessageAddress.
func (RequestSendSMSMessageAddresses) Default ¶
func (r RequestSendSMSMessageAddresses) Default() RequestSendSMSMessageAddresses
Default sets the default values for each RequestSendSMSMessageAddress.
type RequestSendSMSMessages ¶
type RequestSendSMSMessages []RequestSendSMSMessage
RequestSendSMSMessages is a collection of RequestSendSMSMessage.
func (RequestSendSMSMessages) Default ¶
func (r RequestSendSMSMessages) Default() RequestSendSMSMessages
Default sets the default values for each RequestSendSMSMessage.
type RequestSendWhatsappMessage ¶ added in v1.0.5
type RequestSendWhatsappMessage struct { Caption string `json:"@CAPTION,omitempty"` ContentType string `json:"@CONTENTTYPE,omitempty"` Type string `json:"@TYPE,omitempty"` MessageType string `json:"@MSGTYPE,omitempty"` MediaData string `json:"@MEDIADATA,omitempty"` BURLInfo string `json:"@B_URLINFO,omitempty"` }
RequestSendWhatsappMessage is the Whatsapp message part of the RequestSendSMSMessage.
type ResponseMessage ¶
type ResponseMessage struct {
MessageAck ResponseMessageAck `json:"MESSAGEACK"`
}
ResponseMessage is the message response of SendSMS.
func (*ResponseMessage) GetError ¶
func (r *ResponseMessage) GetError() (err error)
GetError returns the error if any.
type ResponseMessageAck ¶
type ResponseMessageAck struct { GUID interface{} `json:"GUID"` // "Err": { // "Desc": "The Specified message does not conform to DTD", // "Code": 65535 // } Error *ResponseMessageAckError `json:"Err,omitempty"` }
ResponseMessageAck is the message part of the ResponseMessage.
func (*ResponseMessageAck) GetError ¶
func (r *ResponseMessageAck) GetError() (err error)
GetError returns the error if any.
func (*ResponseMessageAck) GetMessageGUID ¶
func (r *ResponseMessageAck) GetMessageGUID() (res *ResponseMessageAckGUID, ok bool)
GetMessageGUID return the GUID of the ResponseMessageAck.
func (*ResponseMessageAck) GetMessageGUIDs ¶
func (r *ResponseMessageAck) GetMessageGUIDs() (res *ResponseMessageAckGUIDs, ok bool)
GetMessageGUIDs return the GUIDs of the ResponseMessageAck.
func (*ResponseMessageAck) UnmarshalJSON ¶
func (r *ResponseMessageAck) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON implements the json.Unmarshaler interface.
type ResponseMessageAckError ¶
type ResponseMessageAckError struct { Description string `json:"Desc"` Code newtype.String `json:"Code"` }
ResponseMessageAckError is the error part of the ResponseMessageAck.
func (*ResponseMessageAckError) Error ¶
func (r *ResponseMessageAckError) Error() string
Error implements the error interface.
func (*ResponseMessageAckError) GetCode ¶ added in v1.0.9
func (r *ResponseMessageAckError) GetCode() ErrorCode
GetCode returns the Code of the ResponseMessageAckError.
type ResponseMessageAckGUID ¶
type ResponseMessageAckGUID struct { // A globally unique message ID that is generated for each <SMS> tag. // Note that, in future to check the status of the message you must save this code. GUID string `json:"GUID"` // The date and time when the transaction was completed. SubmitDate string `json:"SUBMITDATE"` // (In case of any error) // To conserve bandwidth utilization ValueFirst JSON API only sends // Sequence information of messages that has either some error or were rejected // because of some error. If there are no errors in a particular message, // you shall not receive any confirmation of each address SEQ. // For instance, in the above example in message ID 1 (of client) // the TO number "My company" was rejected as non-numeric. // The second message does not have any error, // and hence there was no error information for the second part. // SEQ: The Sequence ID (provided by client) that has error. // CODE: Reason why the message wasn’t accepted. // The table shown next describes these error conditions. Error interface{} `json:"ERROR,omitempty"` // Unique SMS ID sent by the customer. For each message a unique GUID is generated. // The Server sends the SMS ID so that // the client application can map the GUID to the SMS ID provided by them. ID newtype.String `json:"ID"` }
ResponseMessageAckGUID is the GUID part of the ResponseMessageAck.
func (*ResponseMessageAckGUID) GetError ¶
func (r *ResponseMessageAckGUID) GetError() (err error)
GetError returns the Error of the ResponseMessageAckGUID.
func (*ResponseMessageAckGUID) GetID ¶ added in v1.0.9
func (r *ResponseMessageAckGUID) GetID() string
GetID returns the ID string representation of the ResponseMessageAckGUID.
func (*ResponseMessageAckGUID) GetMessageError ¶
func (r *ResponseMessageAckGUID) GetMessageError() (res *ResponseMessageAckGUIDError, ok bool)
GetMessageError return the Error of the ResponseMessageAckGUID.
func (*ResponseMessageAckGUID) GetMessageErrors ¶
func (r *ResponseMessageAckGUID) GetMessageErrors() (res *ResponseMessageAckGUIDErrors, ok bool)
GetMessageErrors return the Errors of the ResponseMessageAckGUID.
func (*ResponseMessageAckGUID) UnmarshalJSON ¶
func (r *ResponseMessageAckGUID) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON implements the json.Unmarshaler interface.
type ResponseMessageAckGUIDError ¶
type ResponseMessageAckGUIDError struct { Code newtype.String `json:"CODE"` Sequence newtype.String `json:"SEQ"` }
ResponseMessageAckGUIDError is the error part of the ResponseMessageAckGUID.
"ERROR": { "CODE": 28675, "SEQ": 1 // OR "SEQ": "1" },
func (*ResponseMessageAckGUIDError) Error ¶
func (r *ResponseMessageAckGUIDError) Error() (res string)
Error implements the error interface.
func (*ResponseMessageAckGUIDError) GetCode ¶ added in v1.0.9
func (r *ResponseMessageAckGUIDError) GetCode() ErrorCode
GetCode returns the Code of the ResponseMessageAckGUIDError.
func (*ResponseMessageAckGUIDError) GetSequence ¶ added in v1.0.9
func (r *ResponseMessageAckGUIDError) GetSequence() string
GetSequence returns the Sequence string representation of the ResponseMessageAckGUIDError.
type ResponseMessageAckGUIDErrors ¶
type ResponseMessageAckGUIDErrors []ResponseMessageAckGUIDError
ResponseMessageAckGUIDErrors is the collection of the ResponseMessageAckGUIDError.
func (ResponseMessageAckGUIDErrors) Error ¶
func (r ResponseMessageAckGUIDErrors) Error() (res string)
Error implements the error interface.
type ResponseMessageAckGUIDs ¶
type ResponseMessageAckGUIDs []ResponseMessageAckGUID
ResponseMessageAckGUIDs is a collection of ResponseMessageAckGUID.
func (ResponseMessageAckGUIDs) GetError ¶
func (r ResponseMessageAckGUIDs) GetError() (err error)
GetError returns the error if any.
type UnknownError ¶
type UnknownError struct {
Message interface{} `json:"message"`
}
UnknownError is an error that is not defined by the documentation from the ValueFirst.
func (UnknownError) Error ¶
func (e UnknownError) Error() string
Error implements the error interface.