| GET,OPTIONS | /v1/project/{ProjectUID}/billing-parties |
|---|
<?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 BillingPartiesResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var string|null */
public ?string $FromName=null,
/** @var string|null */
public ?string $FromPhone=null,
/** @var string|null */
public ?string $FromEmail=null,
/** @var string|null */
public ?string $FromAddress=null,
/** @var string|null */
public ?string $ToName=null,
/** @var string|null */
public ?string $ToPhone=null,
/** @var string|null */
public ?string $ToEmail=null,
/** @var string|null */
public ?string $ToAddress=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['FromName'])) $this->FromName = $o['FromName'];
if (isset($o['FromPhone'])) $this->FromPhone = $o['FromPhone'];
if (isset($o['FromEmail'])) $this->FromEmail = $o['FromEmail'];
if (isset($o['FromAddress'])) $this->FromAddress = $o['FromAddress'];
if (isset($o['ToName'])) $this->ToName = $o['ToName'];
if (isset($o['ToPhone'])) $this->ToPhone = $o['ToPhone'];
if (isset($o['ToEmail'])) $this->ToEmail = $o['ToEmail'];
if (isset($o['ToAddress'])) $this->ToAddress = $o['ToAddress'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->FromName)) $o['FromName'] = $this->FromName;
if (isset($this->FromPhone)) $o['FromPhone'] = $this->FromPhone;
if (isset($this->FromEmail)) $o['FromEmail'] = $this->FromEmail;
if (isset($this->FromAddress)) $o['FromAddress'] = $this->FromAddress;
if (isset($this->ToName)) $o['ToName'] = $this->ToName;
if (isset($this->ToPhone)) $o['ToPhone'] = $this->ToPhone;
if (isset($this->ToEmail)) $o['ToEmail'] = $this->ToEmail;
if (isset($this->ToAddress)) $o['ToAddress'] = $this->ToAddress;
return empty($o) ? new class(){} : $o;
}
}
class BillingPartiesRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ProjectUID=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ProjectUID'])) $this->ProjectUID = $o['ProjectUID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ProjectUID)) $o['ProjectUID'] = $this->ProjectUID;
return empty($o) ? new class(){} : $o;
}
}
PHP BillingPartiesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/project/{ProjectUID}/billing-parties HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<BillingPartiesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<FromAddress>String</FromAddress>
<FromEmail>String</FromEmail>
<FromName>String</FromName>
<FromPhone>String</FromPhone>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<ToAddress>String</ToAddress>
<ToEmail>String</ToEmail>
<ToName>String</ToName>
<ToPhone>String</ToPhone>
</BillingPartiesResponse>