src/Traits/MakesApiRequests.php
protected function getSuccessData($attributes = null)
    {
        $rawData = $this->decodeResponseJson()['data'];

        if (is_null($attributes)) {
            return $rawData;
        } elseif (is_string($attributes)) {
            return array_get($rawData, $attributes);
        }

        $data = [];

        foreach ($attributes as $attribute) {
            $data[] = array_get($rawData, $attribute);
        }

        return $data;
    }
protected function getSuccessData($attributes = null)
    {
        $rawData = $this->decodeResponseJson()['data'];

        if (is_null($attributes)) {
            return $rawData;
        } elseif (is_string($attributes)) {
            return array_get($rawData, $attributes);
        }

        $data = [];

        foreach ($attributes as $attribute) {
            $data[] = array_get($rawData, $attribute);
        }

        return $data;
    }
protected function getSuccessData ( $ attributes = null ) { $ rawData = $ this -> decodeResponseJson ( ) [ 'data' ] ; if ( is_null ( $ attributes ) ) { return $ rawData ; } elseif ( is_string ( $ attributes ) ) { return array_get ( $ rawData , $ attributes ) ; } $ data = [ ] ; foreach ( $ attributes as $ attribute ) { $ data [ ] = array_get ( $ rawData , $ attribute ) ; } return $ data ; }
Decodes JSON response and returns the data.

@param  string|array|null $attributes
@return array
Decodes JSON response and returns the data .