public function put($path, $params = null) { $response = $this->_doRequest('PUT', $path, $this->_buildXml($params)); $responseCode = $response['status']; if ($responseCode === 200 || $responseCode === 201 || $responseCode === 422 || $responseCode == 400) { return Xml::buildArrayFromXml($response['body']); } else { Util::throwStatusCodeException($responseCode); } }
public function xmlAndBack($array) { $xml = Braintree\Xml::buildXmlFromArray($array); return Braintree\Xml::buildArrayFromXml($xml); }