<?php 
namespace OfficeBrain\Bundle\CategoryBundle\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_category':
				$this->apiCallUrl = 'category/list';
				$this->setPostMethodTrue();
				break;
			case 'auto_list_category':
				$this->apiCallUrl ='category/autofill';
				$this->setPostMethodTrue();
				break;
			case 'selected_category':
				$this->apiCallUrl ='category/populate/add';
				break;
			case 'add_new_category':
				$this->apiCallUrl ='category/add';
				break;
			case 'update_new_category':
				//$this->trace = true;
				$this->apiCallUrl ='category/update';
				break;
			case 'category_by_id':
				$this->apiCallUrl ='category/info-by-id';
				break;
			case 'get_product_cat_mapping':
				$this->apiCallUrl ='product/product_cat_mapping';
				break;
			case 'get_product_cat_mapping_list':
				//$this->trace = true;
				$this->apiCallUrl ='product/product-mapping-list';
				break;
			case 'remove_category_data_from_mapping':
				$this->apiCallUrl ='category/remove-mapped-category';
				break;
			default:
				break;
				
		}
		$this->callApi();
	}
	
}
