public function buy($params = null)
    {
        $requestor = new Requestor($this->_apiKey);
        $url = $this->instanceUrl() . '/buy';

        list($response, $apiKey) = $requestor->request('post', $url, $params);
        $this->refreshFrom($response, $apiKey, true);

        return $this;
    }
public function buy($params = null)
    {
        $requestor = new Requestor($this->_apiKey);
        $url = $this->instanceUrl() . '/buy';

        list($response, $apiKey) = $requestor->request('post', $url, $params);
        $this->refreshFrom($response, $apiKey, true);

        return $this;
    }
public function buy ( $ params = null ) { $ requestor = new Requestor ( $ this -> _apiKey ) ; $ url = $ this -> instanceUrl ( ) . '/buy' ; list ( $ response , $ apiKey ) = $ requestor -> request ( 'post' , $ url , $ params ) ; $ this -> refreshFrom ( $ response , $ apiKey , true ) ; return $ this ; }
buy a batch

@param mixed $params
@return $this
@throws \EasyPost\Error
buy a batch