| Requires any of the roles: | Agent, Administrator |
| DELETE,OPTIONS | /v1/customercheckins/{Id}/notes/{NoteId} |
|---|
<?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 CustomerNote implements JsonSerializable
{
public function __construct(
/** @var int */
public int $NoteId=0,
/** @var string|null */
public ?string $Scope=null,
/** @var string|null */
public ?string $Text=null,
/** @var bool|null */
public ?bool $IsPriority=null,
/** @var string|null */
public ?string $CreatedByUserId=null,
/** @var string|null */
public ?string $CreatedByName=null,
/** @var DateTime|null */
public ?DateTime $CreatedAt=null,
/** @var DateTime|null */
public ?DateTime $DoneAt=null,
/** @var bool|null */
public ?bool $IsCarry=null,
/** @var DateTime|null */
public ?DateTime $ShownAt=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['NoteId'])) $this->NoteId = $o['NoteId'];
if (isset($o['Scope'])) $this->Scope = $o['Scope'];
if (isset($o['Text'])) $this->Text = $o['Text'];
if (isset($o['IsPriority'])) $this->IsPriority = $o['IsPriority'];
if (isset($o['CreatedByUserId'])) $this->CreatedByUserId = $o['CreatedByUserId'];
if (isset($o['CreatedByName'])) $this->CreatedByName = $o['CreatedByName'];
if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
if (isset($o['DoneAt'])) $this->DoneAt = JsonConverters::from('DateTime', $o['DoneAt']);
if (isset($o['IsCarry'])) $this->IsCarry = $o['IsCarry'];
if (isset($o['ShownAt'])) $this->ShownAt = JsonConverters::from('DateTime', $o['ShownAt']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->NoteId)) $o['NoteId'] = $this->NoteId;
if (isset($this->Scope)) $o['Scope'] = $this->Scope;
if (isset($this->Text)) $o['Text'] = $this->Text;
if (isset($this->IsPriority)) $o['IsPriority'] = $this->IsPriority;
if (isset($this->CreatedByUserId)) $o['CreatedByUserId'] = $this->CreatedByUserId;
if (isset($this->CreatedByName)) $o['CreatedByName'] = $this->CreatedByName;
if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
if (isset($this->DoneAt)) $o['DoneAt'] = JsonConverters::to('DateTime', $this->DoneAt);
if (isset($this->IsCarry)) $o['IsCarry'] = $this->IsCarry;
if (isset($this->ShownAt)) $o['ShownAt'] = JsonConverters::to('DateTime', $this->ShownAt);
return empty($o) ? new class(){} : $o;
}
}
class CustomerNoteResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<CustomerNote>|null */
public ?array $Notes=null,
/** @var array<CustomerNote>|null */
public ?array $Carry=null,
/** @var bool|null */
public ?bool $CanPriority=null,
/** @var CustomerNote|null */
public ?CustomerNote $Note=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Notes'])) $this->Notes = JsonConverters::fromArray('CustomerNote', $o['Notes']);
if (isset($o['Carry'])) $this->Carry = JsonConverters::fromArray('CustomerNote', $o['Carry']);
if (isset($o['CanPriority'])) $this->CanPriority = $o['CanPriority'];
if (isset($o['Note'])) $this->Note = JsonConverters::from('CustomerNote', $o['Note']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Notes)) $o['Notes'] = JsonConverters::toArray('CustomerNote', $this->Notes);
if (isset($this->Carry)) $o['Carry'] = JsonConverters::toArray('CustomerNote', $this->Carry);
if (isset($this->CanPriority)) $o['CanPriority'] = $this->CanPriority;
if (isset($this->Note)) $o['Note'] = JsonConverters::to('CustomerNote', $this->Note);
return empty($o) ? new class(){} : $o;
}
}
class CustomerNoteDeleteRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id='',
/** @var int */
public int $NoteId=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['NoteId'])) $this->NoteId = $o['NoteId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->NoteId)) $o['NoteId'] = $this->NoteId;
return empty($o) ? new class(){} : $o;
}
}
PHP CustomerNoteDeleteRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
DELETE /v1/customercheckins/{Id}/notes/{NoteId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Notes":[{"NoteId":0,"Scope":"String","Text":"String","IsPriority":false,"CreatedByUserId":"00000000000000000000000000000000","CreatedByName":"String","CreatedAt":"0001-01-01T00:00:00.0000000","DoneAt":"0001-01-01T00:00:00.0000000","IsCarry":false,"ShownAt":"0001-01-01T00:00:00.0000000"}],"Carry":[{"NoteId":0,"Scope":"String","Text":"String","IsPriority":false,"CreatedByUserId":"00000000000000000000000000000000","CreatedByName":"String","CreatedAt":"0001-01-01T00:00:00.0000000","DoneAt":"0001-01-01T00:00:00.0000000","IsCarry":false,"ShownAt":"0001-01-01T00:00:00.0000000"}],"CanPriority":false,"Note":{"NoteId":0,"Scope":"String","Text":"String","IsPriority":false,"CreatedByUserId":"00000000000000000000000000000000","CreatedByName":"String","CreatedAt":"0001-01-01T00:00:00.0000000","DoneAt":"0001-01-01T00:00:00.0000000","IsCarry":false,"ShownAt":"0001-01-01T00:00:00.0000000"}}