public function send(Client $client)
{
$response = $client->getTransport()->sendRequest("/api/{$client->getUsername()}/rules", TransportInterface::METHOD_POST, (object) array('name' => $this->name, 'conditions' => array_map(function ($condition) {
return $condition->export();
}, $this->conditions), 'actions' => array_map(function ($action) use($client) {
return $action->getActionableParams($client);
}, $this->actions)));
return $response->id;
}