<?php
require_once("class.restframework.php");
require_once("class.saas.php");
/// int rest api
$restapi = new RestFrameWork();
#######
# company
$user = $restapi->getAuthToken();

$data_object = file_get_contents("php://input");
###############3
$saas = new SAAS($restapi);
//////////////////////
if (!empty($data_object)) {
  //covert json object to array   
  $data = json_decode($data_object, true);
  ///////////////////////////////////
  ////////////////////////////////////
  $response = $saas->createAccount($data);
  echo $restapi->JsonResponse($response, 200);
  //////////////////////////////////////////////
} else {
  echo $restapi->JsonResponse(array("message" => "Incomplete data request", "success" => false), 400);
}
