Skip to content

Commit

Permalink
Updating form_params to json (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
eporama authored Sep 14, 2020
1 parent 28e88b5 commit 4451a51
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions src/Endpoints/Applications.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function rename($applicationUuid, $name)
{

$options = [
'form_params' => [
'json' => [
'name' => $name,
],
];
Expand Down Expand Up @@ -96,7 +96,7 @@ public function createTag($applicationUuid, $name, $color)
{

$options = [
'form_params' => [
'json' => [
'name' => $name,
'color' => $color,
],
Expand Down
4 changes: 2 additions & 2 deletions src/Endpoints/Code.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function switch($environmentUuid, $branch)
{

$options = [
'form_params' => [
'json' => [
'branch' => $branch,
],
];
Expand All @@ -65,7 +65,7 @@ public function deploy($environmentFromUuid, $environmentToUuid, $commitMessage
{

$options = [
'form_params' => [
'json' => [
'source' => $environmentFromUuid,
'message' => $commitMessage,
],
Expand Down
4 changes: 2 additions & 2 deletions src/Endpoints/Crons.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function create($environmentUuid, $command, $frequency, $label, $serverId
{

$options = [
'form_params' => [
'json' => [
'command' => $command,
'frequency' => $frequency,
'label' => $label,
Expand Down Expand Up @@ -89,7 +89,7 @@ public function update($environmentUuid, $cronId, $command, $frequency, $label,
{

$options = [
'form_params' => [
'json' => [
'command' => $command,
'frequency' => $frequency,
'label' => $label,
Expand Down
4 changes: 2 additions & 2 deletions src/Endpoints/Databases.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function getAll($applicationUuid)
public function create($applicationUuid, $name)
{
$options = [
'form_params' => [
'json' => [
'name' => $name,
],
];
Expand Down Expand Up @@ -94,7 +94,7 @@ public function truncate($applicationUuid, $name)
public function copy($environmentFromUuid, $dbName, $environmentToUuid)
{
$options = [
'form_params' => [
'json' => [
'name' => $dbName,
'source' => $environmentFromUuid,
],
Expand Down
4 changes: 2 additions & 2 deletions src/Endpoints/Domains.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function create($environmentUuid, $hostname)
{

$options = [
'form_params' => [
'json' => [
'hostname' => $hostname,
],
];
Expand Down Expand Up @@ -94,7 +94,7 @@ public function purge($environmentUuid, array $domains)
{

$options = [
'form_params' => [
'json' => [
'domains' => $domains,
],
];
Expand Down
10 changes: 5 additions & 5 deletions src/Endpoints/Environments.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Environments extends CloudApiBase implements CloudApiInterface
public function copyFiles($environmentUuidFrom, $environmentUuidTo)
{
$options = [
'form_params' => [
'json' => [
'source' => $environmentUuidFrom,
],
];
Expand Down Expand Up @@ -77,7 +77,7 @@ public function update($environmentUuid, array $config)
{

$options = [
'form_params' => $config,
'json' => $config,
];

return new OperationResponse(
Expand All @@ -100,7 +100,7 @@ public function rename($environmentUuid, $label)
{

$options = [
'form_params' => [
'json' => [
'label' => $label,
],
];
Expand Down Expand Up @@ -137,7 +137,7 @@ public function disableLiveDev($environmentUuid)
{

$options = [
'form_params' => [
'json' => [
'discard' => 1,
],
];
Expand Down Expand Up @@ -195,7 +195,7 @@ public function disableProductionMode($environmentUuid)
public function create($applicationUuid, $label, $branch, array $databases)
{
$options = [
'form_params' => [
'json' => [
'label' => $label,
'branch' => $branch,
'databases' => $databases,
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/IdentityProviders.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function update($idpUuid, $label, $entityId, $ssoUrl, $certificate)
{

$options = [
'form_params' => [
'json' => [
'label' => $label,
'entity_id' => $entityId,
'sso_url' => $ssoUrl,
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/Ides.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function create($applicationUuid, $label)
{

$options = [
'form_params' => [
'json' => [
'label' => $label,
],
];
Expand Down
4 changes: 2 additions & 2 deletions src/Endpoints/LogForwardingDestinations.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function create($environmentUuid, $label, $sources, $consumer, $credentia
{

$options = [
'form_params' => [
'json' => [
'label' => $label,
'sources' => $sources,
'consumer' => $consumer,
Expand Down Expand Up @@ -140,7 +140,7 @@ public function update($environmentUuid, $destId, $label, $sources, $consumer, $
{

$options = [
'form_params' => [
'json' => [
'label' => $label,
'sources' => $sources,
'consumer' => $consumer,
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/Organizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function getTeams($organizationUuid)
public function inviteAdmin($organizationUuid, $email)
{
$options = [
'form_params' => [
'json' => [
'email' => $email,
],
];
Expand Down
4 changes: 2 additions & 2 deletions src/Endpoints/Roles.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function get($roleUuid)
public function create($organizationUuid, $name, array $permissions, $description = null)
{
$options = [
'form_params' => [
'json' => [
'name' => $name,
'permissions' => $permissions,
'description' => $description,
Expand All @@ -74,7 +74,7 @@ public function create($organizationUuid, $name, array $permissions, $descriptio
public function update($roleUuid, array $permissions)
{
$options = [
'form_params' => [
'json' => [
'permissions' => $permissions,
],
];
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/SslCertificates.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function create($envUuid, $label, $cert, $key, $ca = null, $csr = null, $
{

$options = [
'form_params' => [
'json' => [
'label' => $label,
'certificate' => $cert,
'private_key' => $key,
Expand Down
8 changes: 4 additions & 4 deletions src/Endpoints/Teams.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Teams extends CloudApiBase implements CloudApiInterface
public function create($organizationUuid, $name)
{
$options = [
'form_params' => [
'json' => [
'name' => $name,
],
];
Expand Down Expand Up @@ -57,7 +57,7 @@ public function getAll()
public function rename($teamUuid, $name)
{
$options = [
'form_params' => [
'json' => [
'name' => $name,
],
];
Expand Down Expand Up @@ -91,7 +91,7 @@ public function delete($teamUuid)
public function addApplication($teamUuid, $applicationUuid)
{
$options = [
'form_params' => [
'json' => [
'uuid' => $applicationUuid,
],
];
Expand All @@ -112,7 +112,7 @@ public function addApplication($teamUuid, $applicationUuid)
public function invite($teamUuid, $email, $roles)
{
$options = [
'form_params' => [
'json' => [
'email' => $email,
'roles' => $roles
],
Expand Down
4 changes: 2 additions & 2 deletions src/Endpoints/Variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function get($environmentUuid, $name)
public function create($environmentUuid, $name, $value)
{
$options = [
'form_params' => [
'json' => [
'name' => $name,
'value' => $value,
],
Expand All @@ -80,7 +80,7 @@ public function create($environmentUuid, $name, $value)
public function update($environmentUuid, $name, $value)
{
$options = [
'form_params' => [
'json' => [
'name' => $name,
'value' => $value,
],
Expand Down
4 changes: 2 additions & 2 deletions tests/Endpoints/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function testModifyOptions()

// Set options as an endpoint call would.
$options = [
'form_params' => [
'json' => [
'source' => 'source',
'message' => 'message',
],
Expand All @@ -102,7 +102,7 @@ public function testModifyOptions()
'headers' => [
'User-Agent' => sprintf('acquia-php-sdk-v2/%s (https://github.com/typhonius/acquia-php-sdk-v2) AcquiaCli/4.20', $version)
],
'form_params' => [
'json' => [
'source' => 'source',
'message' => 'message'
],
Expand Down

0 comments on commit 4451a51

Please sign in to comment.