-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Add AppGroup team and update App credentials with ApiProd…
…uct (#251) * Support for Add Team/AppGroup and update App credentials with ApiProduct * Fix import order
- Loading branch information
1 parent
ab272c3
commit 4489adc
Showing
4 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
src/Api/ApigeeX/Controller/AppGroupAppCredentialController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
|
||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace Apigee\Edge\Api\ApigeeX\Controller; | ||
|
||
use Apigee\Edge\Api\Management\Controller\CompanyAppCredentialController; | ||
use Apigee\Edge\ClientInterface; | ||
use Apigee\Edge\Serializer\EntitySerializerInterface; | ||
use Psr\Http\Message\UriInterface; | ||
|
||
/** | ||
* Class AppGroupAppCredentialController. | ||
*/ | ||
class AppGroupAppCredentialController extends CompanyAppCredentialController | ||
{ | ||
/** @var string appgroup name. */ | ||
protected $appGroup; | ||
|
||
/** | ||
* DeveloperAppCredentialController constructor. | ||
* | ||
* @param string $organization | ||
* @param string $appGroup | ||
* @param string $appName | ||
* @param \Apigee\Edge\ClientInterface $client | ||
* @param \Apigee\Edge\Serializer\EntitySerializerInterface|null $entitySerializer | ||
*/ | ||
public function __construct( | ||
string $organization, | ||
string $appGroup, | ||
string $appName, | ||
ClientInterface $client, | ||
?EntitySerializerInterface $entitySerializer = null | ||
) { | ||
$this->appGroup = $appGroup; | ||
parent::__construct($organization, $appGroup, $appName, $client, $entitySerializer); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function getBaseEndpointUri(): UriInterface | ||
{ | ||
$appName = rawurlencode($this->appName); | ||
|
||
return $this->client->getUriFactory()->createUri("/organizations/{$this->organization}/appgroups/{$this->appGroup}/apps/{$appName}"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters