src/EB/SDK/S2SConversion/Details.php
public function jsonSerialize()
    {
        $jsonDetails = [];

        if ($this->getConversionDate() != null) {
            $jsonDetails['conversion_date'] = $this->getConversionDate()->format('Y-m-d');
        }

        if ($this->getRevenue() != null) {
            $jsonDetails['revenue'] = $this->getRevenue();
        }

        if ($this->getTotalConversions() != null) {
            $jsonDetails['total_conversions'] = $this->getTotalConversions();
        }

        if ($this->getIpAddress() != null) {
            $jsonDetails['ip_address'] = $this->getIpAddress();
        }

        if ($this->getConversionType() != null) {
            $jsonDetails['conversion_type'] = $this->getConversionType();
        }

        if ($this->getLinkPosition() != null) {
            $jsonDetails['link_position'] = $this->getLinkPosition();
        }

        return $jsonDetails;
    }
public function jsonSerialize()
    {
        $jsonDetails = [];

        if ($this->getConversionDate() != null) {
            $jsonDetails['conversion_date'] = $this->getConversionDate()->format('Y-m-d');
        }

        if ($this->getRevenue() != null) {
            $jsonDetails['revenue'] = $this->getRevenue();
        }

        if ($this->getTotalConversions() != null) {
            $jsonDetails['total_conversions'] = $this->getTotalConversions();
        }

        if ($this->getIpAddress() != null) {
            $jsonDetails['ip_address'] = $this->getIpAddress();
        }

        if ($this->getConversionType() != null) {
            $jsonDetails['conversion_type'] = $this->getConversionType();
        }

        if ($this->getLinkPosition() != null) {
            $jsonDetails['link_position'] = $this->getLinkPosition();
        }

        return $jsonDetails;
    }
public function jsonSerialize ( ) { $ jsonDetails = [ ] ; if ( $ this -> getConversionDate ( ) != null ) { $ jsonDetails [ 'conversion_date' ] = $ this -> getConversionDate ( ) -> format ( 'Y-m-d' ) ; } if ( $ this -> getRevenue ( ) != null ) { $ jsonDetails [ 'revenue' ] = $ this -> getRevenue ( ) ; } if ( $ this -> getTotalConversions ( ) != null ) { $ jsonDetails [ 'total_conversions' ] = $ this -> getTotalConversions ( ) ; } if ( $ this -> getIpAddress ( ) != null ) { $ jsonDetails [ 'ip_address' ] = $ this -> getIpAddress ( ) ; } if ( $ this -> getConversionType ( ) != null ) { $ jsonDetails [ 'conversion_type' ] = $ this -> getConversionType ( ) ; } if ( $ this -> getLinkPosition ( ) != null ) { $ jsonDetails [ 'link_position' ] = $ this -> getLinkPosition ( ) ; } return $ jsonDetails ; }
(PHP 5 &gt;= 5.4.0)<br/>
Specify data which should be serialized to JSON
@link http://php.net/manual/en/jsonserializable.jsonserialize.php
@return mixed data which can be serialized by <b>json_encode</b>,
which is a value of any type other than a resource.
@throws \Exception
( PHP 5 &gt ; = 5 . 4 . 0 ) <br / > Specify data which should be serialized to JSON