EasyPost\Batch::buy PHP Method

buy() public method

buy a batch
public buy ( mixed $params = null )
$params mixed
    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;
    }