Documentation ¶
Index ¶
Constants ¶
View Source
const ( TrurouteCodeInitial = 1 TrurouteCodeResponse = 2 TrurouteCodeRelease = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TruRouteRequest ¶
type TruRouteRequest struct { XMLName xml.Name `xml:"ussd"` Type int `xml:"type"` Message string `xml:"msg"` Session string `xml:"sessionid"` Msisdn string `xml:"msisdn"` }
TruRouteRequest XML struct for the request from a truroute services
See: https://github.com/saulchelewani/truroute-ussd-adapter/
type TruRouteResponse ¶
type TruRouteResponse struct { XMLName xml.Name `xml:"ussd"` Type int `xml:"type"` Message string `xml:"msg"` Premium struct { Cost int `xml:"cost"` Ref string `xml:"ref"` } `xml:"premium"` Msisdn string `xml:"msisdn"` }
TruRouteResponse XML struct for the response from a truroute services
See: https://github.com/saulchelewani/truroute-ussd-adapter/blob/master/src/UssdServiceProvider.php
func (*TruRouteResponse) GetText ¶
func (t *TruRouteResponse) GetText() string
GetText returns the response text
func (*TruRouteResponse) IsRelease ¶
func (t *TruRouteResponse) IsRelease() bool
func (*TruRouteResponse) IsResponse ¶
func (t *TruRouteResponse) IsResponse() bool
isResponse checks if the response is truly a success
type TrueRouteStep ¶
func (*TrueRouteStep) ExecuteAsTruRouteRequest ¶
func (s *TrueRouteStep) ExecuteAsTruRouteRequest(session *core.Session) (string, error)
ExecuteAsTruRouteRequest executes a step and returns the result of the request May return an empty string ("") upon failure
Click to show internal directories.
Click to hide internal directories.