-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
APIS-3384 PHP-SDK добавить метод для получения доп.услуг
- Loading branch information
Showing
3 changed files
with
221 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
namespace Apiship\Entity\Response; | ||
|
||
use Apiship\Entity\AbstractResponse; | ||
use Apiship\Entity\Response\Part\Lists\Service; | ||
|
||
class ListsServicesResponse extends AbstractResponse | ||
{ | ||
/** | ||
* @var Service[] Массив результатов | ||
*/ | ||
protected $results = []; | ||
|
||
/** | ||
* @return Service[]|null | ||
*/ | ||
public function getResults() | ||
{ | ||
return $this->results; | ||
} | ||
|
||
/** | ||
* @param Service[] $results | ||
* | ||
* @return ListsServicesResponse | ||
*/ | ||
public function setResults($results) | ||
{ | ||
foreach ($results as $result) { | ||
$this->addResult($result); | ||
} | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @param Service $result | ||
* | ||
* @return ListsServicesResponse | ||
*/ | ||
public function addResult($result) | ||
{ | ||
$this->results[] = $result; | ||
return $this; | ||
} | ||
} |
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,137 @@ | ||
<?php | ||
/** | ||
* @author Serge Rodovnichenko <serge@syrnik.com> | ||
* @copyright Serge Rodovnichenko, 2020 | ||
*/ | ||
|
||
namespace Apiship\Entity\Response\Part\Lists; | ||
|
||
use Apiship\Entity\AbstractResponsePart; | ||
|
||
/** | ||
* Class Service | ||
* @package Apiship\Entity\Response\Part\Lists | ||
*/ | ||
class Service extends AbstractResponsePart | ||
{ | ||
/** @var string */ | ||
protected $providerKey = ''; | ||
/** @var string */ | ||
protected $name = ''; | ||
/** @var string */ | ||
protected $extraParamName = ''; | ||
/** @var string */ | ||
protected $valueType = ''; | ||
/** @var string */ | ||
protected $valueDescription = ''; | ||
/** @var string */ | ||
protected $description = ''; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getProviderKey() | ||
{ | ||
return $this->providerKey; | ||
} | ||
|
||
/** | ||
* @param string $providerKey | ||
* @return Service | ||
*/ | ||
public function setProviderKey($providerKey) | ||
{ | ||
$this->providerKey = $providerKey; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getName() | ||
{ | ||
return $this->name; | ||
} | ||
|
||
/** | ||
* @param string $name | ||
* @return Service | ||
*/ | ||
public function setName($name) | ||
{ | ||
$this->name = $name; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getExtraParamName() | ||
{ | ||
return $this->extraParamName; | ||
} | ||
|
||
/** | ||
* @param string $extraParamName | ||
* @return Service | ||
*/ | ||
public function setExtraParamName($extraParamName) | ||
{ | ||
$this->extraParamName = $extraParamName; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getValueType() | ||
{ | ||
return $this->valueType; | ||
} | ||
|
||
/** | ||
* @param string $valueType | ||
* @return Service | ||
*/ | ||
public function setValueType($valueType) | ||
{ | ||
$this->valueType = $valueType; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getValueDescription() | ||
{ | ||
return $this->valueDescription; | ||
} | ||
|
||
/** | ||
* @param string $valueDescription | ||
* @return Service | ||
*/ | ||
public function setValueDescription($valueDescription) | ||
{ | ||
$this->valueDescription = $valueDescription; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getDescription() | ||
{ | ||
return $this->description; | ||
} | ||
|
||
/** | ||
* @param string $description | ||
* @return Service | ||
*/ | ||
public function setDescription($description) | ||
{ | ||
$this->description = $description; | ||
return $this; | ||
} | ||
} |