<?php



use Idearia\Logger;



class WooTransport extends BaseTransport {



	public function __construct($url, $ck, $cs) {

		$transport = new Automattic\WooCommerce\Client(

			$url, $ck, $cs, ['version' => 'wc/v3', 'timeout' => 120]

		);

		parent::__construct($transport);

	}



	public function get($url) {

		return $this->processRequest("get", [$url]);

	}

	public function post($url, $data) {

		return $this->processRequest("post", [$url, $data]);

	}

	public function put($url, $data) {

		return $this->processRequest("put", [$url, $data]);

	}



	protected function getResult($result) {

		return $this->objToArray($result);

	}



}

