/** * @param UserCreationInfo $info * @return bool */ public function create(UserCreationInfo $info) { $this->headers = ['Content-Type' => 'application/json', 'Access-Token' => $this->token->getAccessToken()]; $this->data = $info->toArray(); $request = $this->getTransport(); $response = $request->post($this); if ($response instanceof Error) { return $response; } return new UserCreationResponse($response); }
function createAccount(UserCreationInfo $user, AccountCreationInfo $account) { $data = array_merge(array('apiKey' => $this->api_key), $user->asArray(), $account->asArray()); $result = $this->client->createAccount($data); return $result; }