@@ 169-181 (lines=13) @@ | ||
166 | * @param string $environmentToUuid |
|
167 | * @return OperationResponse |
|
168 | */ |
|
169 | public function databaseCopy($environmentFromUuid, $dbName, $environmentToUuid) |
|
170 | { |
|
171 | $options = [ |
|
172 | 'form_params' => [ |
|
173 | 'name' => $dbName, |
|
174 | 'source' => $environmentFromUuid, |
|
175 | ], |
|
176 | ]; |
|
177 | ||
178 | return new OperationResponse( |
|
179 | $this->connector->request('post', "/environments/${environmentToUuid}/databases", $this->query, $options) |
|
180 | ); |
|
181 | } |
|
182 | ||
183 | /** |
|
184 | * Create a new database. |
|
@@ 549-563 (lines=15) @@ | ||
546 | * @param string $label |
|
547 | * @return OperationResponse |
|
548 | */ |
|
549 | public function createCron($id, $command, $frequency, $label) |
|
550 | { |
|
551 | ||
552 | $options = [ |
|
553 | 'form_params' => [ |
|
554 | 'command' => $command, |
|
555 | 'frequency' => $frequency, |
|
556 | 'label' => $label, |
|
557 | ], |
|
558 | ]; |
|
559 | ||
560 | return new OperationResponse( |
|
561 | $this->connector->request('post', "/environments/${id}/crons", $this->query, $options) |
|
562 | ); |
|
563 | } |
|
564 | ||
565 | /** |
|
566 | * Delete a cron task. |
|
@@ 712-725 (lines=14) @@ | ||
709 | * @param null|string $description |
|
710 | * @return OperationResponse |
|
711 | */ |
|
712 | public function createRole($uuid, $name, array $permissions, $description = null) |
|
713 | { |
|
714 | $options = [ |
|
715 | 'form_params' => [ |
|
716 | 'name' => $name, |
|
717 | 'permissions' => $permissions, |
|
718 | 'description' => $description, |
|
719 | ], |
|
720 | ]; |
|
721 | ||
722 | return new OperationResponse( |
|
723 | $this->connector->request('post', "/organizations/${uuid}/roles", $this->query, $options) |
|
724 | ); |
|
725 | } |
|
726 | ||
727 | /** |
|
728 | * @param string $roleUuid |
|
@@ 836-848 (lines=13) @@ | ||
833 | * @param array $roles |
|
834 | * @return OperationResponse |
|
835 | */ |
|
836 | public function createTeamInvite($teamUuid, $email, $roles) |
|
837 | { |
|
838 | $options = [ |
|
839 | 'form_params' => [ |
|
840 | 'email' => $email, |
|
841 | 'roles' => $roles |
|
842 | ], |
|
843 | ]; |
|
844 | ||
845 | return new OperationResponse( |
|
846 | $this->connector->request('post', "/teams/${teamUuid}/invites", $options) |
|
847 | ); |
|
848 | } |
|
849 | ||
850 | /** |
|
851 | * Invites a user to become admin of an organization. |