GET | /v1/FeatureFlag | Gets the feature flag statuses |
---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
class FeatureFlagStatusBase implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $AgencyEnabled=null,
/** @var bool|null */
public ?bool $OrdersEnabled=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AgencyEnabled'])) $this->AgencyEnabled = $o['AgencyEnabled'];
if (isset($o['OrdersEnabled'])) $this->OrdersEnabled = $o['OrdersEnabled'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AgencyEnabled)) $o['AgencyEnabled'] = $this->AgencyEnabled;
if (isset($this->OrdersEnabled)) $o['OrdersEnabled'] = $this->OrdersEnabled;
return empty($o) ? new class(){} : $o;
}
}
class FeatureFlagStatusResponse extends FeatureFlagStatusBase implements JsonSerializable
{
/**
* @param bool|null $AgencyEnabled
* @param bool|null $OrdersEnabled
*/
public function __construct(
?bool $AgencyEnabled=null,
?bool $OrdersEnabled=null
) {
parent::__construct($AgencyEnabled,$OrdersEnabled);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
return empty($o) ? new class(){} : $o;
}
}
class FeatureFlagStatusRequest implements IGet, JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
PHP FeatureFlagStatusRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/FeatureFlag HTTP/1.1 Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {Unable to show example output for type 'FeatureFlagStatusResponse' using the custom 'csv' filter}Cannot dynamically create an instance of type 'Mercedes.Agency.Orchestration.API.ServiceModel.FeatureFlag.FeatureFlagStatusResponse'. Reason: No parameterless constructor defined.