<?php 
namespace OfficeBrain\Bundle\AttributeBundle\ApiClient;

use Symfony\Component\DependencyInjection\ContainerInterface as Container;
use OfficeBrain\Bundle\ApiClientBundle\ApiClient\AbstractApiClient;

class ApiClient extends AbstractApiClient{
	
	public function doProcess(){
		switch($this->apiCallType) {
			case 'list_attributes':
				$this->setPostMethodTrue();
				$this->apiCallUrl = 'attribute/list';				
				break;
			case 'attribute_values_for_list':
				$this->setPostMethodTrue();
				$this->apiCallUrl = 'attribute/attribute-values-for-list';
				break;
			case 'list_autofill_attributes':
				$this->setPostMethodTrue();
				$this->apiCallUrl = 'attribute/autofill';
				break;
			case 'selected_attribute':
				$this->apiCallUrl = 'attribute/populate/add';
				break;
			case 'add_selected_attribute':
				$this->apiCallUrl = 'attribute/add';
				break;
			case 'selected_attribute_value':
				$this->apiCallUrl = 'attribute/getselectedattibutevalue';
// 				$this->trace=true;
				break;
			case 'selected_feedback':
				$this->apiCallUrl = 'attribute/getselectedattibute';
				break;
			case 'add_selected_attribute_value':
				 $this->apiCallUrl = 'attribute/addattributevalue';
				 break;
			case 'auto_list_attribute_value_list':
				 $this->apiCallUrl = 'attribute/values/autofill';
				 $this->setPostMethodTrue();
				 //$this->trace=false;
				 break;
			case 'get_attribute_value_information':
				$this->apiCallUrl = 'attribute/attribute-value-information';
				break;
			case 'edit_selected_attribute_value':
				//$this->trace = true;
				$this->apiCallUrl = 'attribute/editattributevalue';
				break;
			default:
				break;
				
		}
		$this->callApi();
	}
}
