<?php
require_once APPPATH . 'modules/advancedreports/classes/ApiResponseDecoratorAbstract.php';

/**
 * Class ApiResponseInventoryVariablesDecorator
 */
class ApiResponseInventoryVariablesDecorator extends ApiResponseDecoratorAbstract
{
    /**
     * @inheritdoc
     */
    public function getProcessed()
    {
        try {
            $response = json_decode($this->ApiResponse);
            return json_encode($response);
        } catch (Exception $e) {
            throw new Exception('Can\'t process API response.');
        }
    }
}
