Recurly_Base::_post PHP Method

_post() protected static method

Post to the URI, validate the response and return the object.
protected static _post ( $uri, $data = null, $client = null )
    protected static function _post($uri, $data = null, $client = null)
    {
        if (is_null($client)) {
            $client = new Recurly_Client();
        }
        $response = $client->request(Recurly_Client::POST, $uri, $data);
        $response->assertValidResponse();
        $object = Recurly_Base::__parseResponseToNewObject($response, $uri, $client);
        $response->assertSuccessResponse($object);
        return $object;
    }