public function pushMessages($targetType, array $messages, $requestId = null, $campaignKey = null)
    {
        $data = [
            'request_id' => $requestId,
            'campaign_key' => $campaignKey,
            'target_type' => $targetType,
            'messages' => $messages,
        ];

        $options = [
            'auth' => [
                $this->apiKey,
                $this->apiSecret,
            ],
            'json' => $data,
        ];
        $uri = rtrim($this->uri, '/') . '/' . $this->appID;
        $response = $this->client->post($uri, $options);
        return json_decode($response->getBody(), true);
    }
public function pushMessages($targetType, array $messages, $requestId = null, $campaignKey = null)
    {
        $data = [
            'request_id' => $requestId,
            'campaign_key' => $campaignKey,
            'target_type' => $targetType,
            'messages' => $messages,
        ];

        $options = [
            'auth' => [
                $this->apiKey,
                $this->apiSecret,
            ],
            'json' => $data,
        ];
        $uri = rtrim($this->uri, '/') . '/' . $this->appID;
        $response = $this->client->post($uri, $options);
        return json_decode($response->getBody(), true);
    }
public function pushMessages ( $ targetType , array $ messages , $ requestId = null , $ campaignKey = null ) { $ data = [ 'request_id' => $ requestId , 'campaign_key' => $ campaignKey , 'target_type' => $ targetType , 'messages' => $ messages , ] ; $ options = [ 'auth' => [ $ this -> apiKey , $ this -> apiSecret , ] , 'json' => $ data , ] ; $ uri = rtrim ( $ this -> uri , '/' ) . '/' . $ this -> appID ; $ response = $ this -> client -> post ( $ uri , $ options ) ; return json_decode ( $ response -> getBody ( ) , true ) ; }
Send one or many push notification messages.

@param string $targetType (broadcast|customer_id|audience_id|profile)
@param array $messages
@param string $requestId
@param string $campaignKey

@return array
Send one or many push notification messages .