File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -74,19 +74,19 @@ public function get(int $serverId): Server
7474 public function create (
7575 string $ name ,
7676 ServerType $ serverType ,
77- Datacenter $ datacenter ,
78- Location $ location ,
7977 Image $ image ,
78+ Location $ location = null ,
79+ Datacenter $ datacenter = null ,
80+ $ ssh_keys = [],
8081 $ startAfterCreate = true ,
81- $ user_data = '' ,
82- $ ssh_keys = []
82+ $ user_data = ''
8383 ): Server {
8484 $ response = $ this ->httpClient ->post ('servers ' , [
8585 'json ' => [
8686 'name ' => $ name ,
8787 'server_type ' => $ serverType ->id ,
88- 'datacenter ' => $ datacenter ->id ,
89- 'location ' => $ location ->id ,
88+ 'datacenter ' => $ datacenter ->id ?: null ,
89+ 'location ' => $ location ->id ?: null ,
9090 'image ' => $ image ->id ,
9191 'start_after_create ' => $ startAfterCreate ,
9292 'user_data ' => $ user_data ,
You can’t perform that action at this time.
0 commit comments