\Gomoob\Pushwoosh\Model\ResponseCreateMessageResponse

Class which represents Pushwoosh '/createMessage' response.

Summary

Methods
Properties
Constants
create()
getResponse()
setResponse()
getStatusCode()
getStatusMessage()
isOk()
setStatusCode()
setStatusMessage()
No public properties found
No constants found
No protected methods found
$statusCode
$statusMessage
N/A
No private methods found
$response
N/A

Properties

$statusCode

$statusCode : int

The Pushwoosh status code, the Pushwoosh API can return the following create message status codes : - 200 : (HTTP Status Code = 200) Message succesfully created.

  • 210 : (HTTP Status Code = 200) Argument error. See statusMessage for more info.
    • 400 : (HTTP Status Code = N/A) Malformed request string.
    • 500 : (HTTP Status Code = 500) Internal error.

Type

int

$statusMessage

$statusMessage : string

The Pushwoosh status message.

Type

string

Methods

create()

create(array $json) : \Gomoob\Pushwoosh\Model\Response\CreateMessageResponse

Utility function used to create a new instance from a JSON string.

Parameters

array $json

a PHP array which contains the result of a 'json_decode' execution.

Returns

\Gomoob\Pushwoosh\Model\Response\CreateMessageResponse

the resulting instance.

getStatusCode()

getStatusCode() : int

Gets the Pushwoosh status code, , the Pushwoosh API can return the following create message status codes : - 200 : (HTTP Status Code = 200) Message succesfully created.

  • 210 : (HTTP Status Code = 200) Argument error. See statusMessage for more info.
    • 400 : (HTTP Status Code = N/A) Malformed request string.
    • 500 : (HTTP Status Code = 500) Internal error.

Returns

int —

the Pushwoosh status code.

getStatusMessage()

getStatusMessage() : string

Gets the Pushwoosh status message.

Returns

string —

the Pushwoosh status message.

isOk()

isOk() : boolean

Function used to indicate if the response represents a success.

Returns

boolean —

true if the response represents a success, false otherwise.

setStatusCode()

setStatusCode(int $statusCode)

Sets the Pushwoosh status code, the Pushwoosh API can return the following create message status codes : - 200 : (HTTP Status Code = 200) Message succesfully created.

  • 210 : (HTTP Status Code = 200) Argument error. See statusMessage for more info.
    • 400 : (HTTP Status Code = N/A) Malformed request string.
    • 500 : (HTTP Status Code = 500) Internal error.

Parameters

int $statusCode

the Pushwoosh status code.

setStatusMessage()

setStatusMessage(string $statusMessage)

Sets the Pushwoosh status message.

Parameters

string $statusMessage

the pushwoosh status message.