GeniuslinkAPI

<back to all web services

GetProductMatchesByUrlRequest

Requires Authentication
The following routes are available for this service:
GET/v3.5/product/matches
<?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};


// @DataContract
class ProductIdentifiers implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="productGuid", EmitDefaultValue=false)
        /** @var string */
        public string $productGuid='',

        // @DataMember(Name="gtins", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $gtins=null,

        // @DataMember(Name="mpns", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $mpns=null,

        // @DataMember(Name="ean8", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $ean8=null,

        // @DataMember(Name="ean13", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $ean13=null,

        // @DataMember(Name="isbn9", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $isbn9=null,

        // @DataMember(Name="isbn10", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $isbn10=null,

        // @DataMember(Name="isbn13", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $isbn13=null,

        // @DataMember(Name="itf14", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $itf14=null,

        // @DataMember(Name="upc12", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $upc12=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['productGuid'])) $this->productGuid = $o['productGuid'];
        if (isset($o['gtins'])) $this->gtins = JsonConverters::fromArray('string', $o['gtins']);
        if (isset($o['mpns'])) $this->mpns = JsonConverters::fromArray('string', $o['mpns']);
        if (isset($o['ean8'])) $this->ean8 = JsonConverters::fromArray('string', $o['ean8']);
        if (isset($o['ean13'])) $this->ean13 = JsonConverters::fromArray('string', $o['ean13']);
        if (isset($o['isbn9'])) $this->isbn9 = JsonConverters::fromArray('string', $o['isbn9']);
        if (isset($o['isbn10'])) $this->isbn10 = JsonConverters::fromArray('string', $o['isbn10']);
        if (isset($o['isbn13'])) $this->isbn13 = JsonConverters::fromArray('string', $o['isbn13']);
        if (isset($o['itf14'])) $this->itf14 = JsonConverters::fromArray('string', $o['itf14']);
        if (isset($o['upc12'])) $this->upc12 = JsonConverters::fromArray('string', $o['upc12']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->productGuid)) $o['productGuid'] = $this->productGuid;
        if (isset($this->gtins)) $o['gtins'] = JsonConverters::toArray('string', $this->gtins);
        if (isset($this->mpns)) $o['mpns'] = JsonConverters::toArray('string', $this->mpns);
        if (isset($this->ean8)) $o['ean8'] = JsonConverters::toArray('string', $this->ean8);
        if (isset($this->ean13)) $o['ean13'] = JsonConverters::toArray('string', $this->ean13);
        if (isset($this->isbn9)) $o['isbn9'] = JsonConverters::toArray('string', $this->isbn9);
        if (isset($this->isbn10)) $o['isbn10'] = JsonConverters::toArray('string', $this->isbn10);
        if (isset($this->isbn13)) $o['isbn13'] = JsonConverters::toArray('string', $this->isbn13);
        if (isset($this->itf14)) $o['itf14'] = JsonConverters::toArray('string', $this->itf14);
        if (isset($this->upc12)) $o['upc12'] = JsonConverters::toArray('string', $this->upc12);
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class BookAttributes implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="authors", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $authors=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['authors'])) $this->authors = JsonConverters::fromArray('string', $o['authors']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->authors)) $o['authors'] = JsonConverters::toArray('string', $this->authors);
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class AudiobookAttributes extends BookAttributes implements JsonSerializable
{
    /**
     * @param array<string>|null $authors
     */
    public function __construct(
        ?array $authors=null
    ) {
        parent::__construct($authors);
    }

    /** @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;
    }
}

// @DataContract
class EBookAttributes extends BookAttributes implements JsonSerializable
{
    /**
     * @param array<string>|null $authors
     */
    public function __construct(
        ?array $authors=null
    ) {
        parent::__construct($authors);
    }

    /** @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;
    }
}

// @DataContract
class ItemAttributes implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="book", EmitDefaultValue=false)
        /** @var BookAttributes|null */
        public ?BookAttributes $book=null,

        // @DataMember(Name="audiobook", EmitDefaultValue=false)
        /** @var AudiobookAttributes|null */
        public ?AudiobookAttributes $audiobook=null,

        // @DataMember(Name="ebook", EmitDefaultValue=false)
        /** @var EBookAttributes|null */
        public ?EBookAttributes $ebook=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['book'])) $this->book = JsonConverters::from('BookAttributes', $o['book']);
        if (isset($o['audiobook'])) $this->audiobook = JsonConverters::from('AudiobookAttributes', $o['audiobook']);
        if (isset($o['ebook'])) $this->ebook = JsonConverters::from('EBookAttributes', $o['ebook']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->book)) $o['book'] = JsonConverters::to('BookAttributes', $this->book);
        if (isset($this->audiobook)) $o['audiobook'] = JsonConverters::to('AudiobookAttributes', $this->audiobook);
        if (isset($this->ebook)) $o['ebook'] = JsonConverters::to('EBookAttributes', $this->ebook);
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class ProductAttributes implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="retailer", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $retailer=null,

        // @DataMember(Name="retailerGuid", EmitDefaultValue=false)
        /** @var string */
        public string $retailerGuid='',

        // @DataMember(Name="storefront", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $storefront=null,

        // @DataMember(Name="storefrontIso2", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $storefrontIso2=null,

        // @DataMember(Name="storefrontGuid", EmitDefaultValue=false)
        /** @var string */
        public string $storefrontGuid='',

        // @DataMember(Name="category", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $category=null,

        // @DataMember(Name="categoryGuid", EmitDefaultValue=false)
        /** @var string */
        public string $categoryGuid='',

        // @DataMember(Name="brand", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $brand=null,

        // @DataMember(Name="brandGuid", EmitDefaultValue=false)
        /** @var string */
        public string $brandGuid='',

        // @DataMember(Name="manufacturer", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $manufacturer=null,

        // @DataMember(Name="manufacturerGuid", EmitDefaultValue=false)
        /** @var string */
        public string $manufacturerGuid='',

        // @DataMember(Name="identifiers", EmitDefaultValue=false)
        /** @var ProductIdentifiers|null */
        public ?ProductIdentifiers $identifiers=null,

        // @DataMember(Name="itemAttributes", EmitDefaultValue=false)
        /** @var ItemAttributes|null */
        public ?ItemAttributes $itemAttributes=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['retailer'])) $this->retailer = $o['retailer'];
        if (isset($o['retailerGuid'])) $this->retailerGuid = $o['retailerGuid'];
        if (isset($o['storefront'])) $this->storefront = $o['storefront'];
        if (isset($o['storefrontIso2'])) $this->storefrontIso2 = $o['storefrontIso2'];
        if (isset($o['storefrontGuid'])) $this->storefrontGuid = $o['storefrontGuid'];
        if (isset($o['category'])) $this->category = $o['category'];
        if (isset($o['categoryGuid'])) $this->categoryGuid = $o['categoryGuid'];
        if (isset($o['brand'])) $this->brand = $o['brand'];
        if (isset($o['brandGuid'])) $this->brandGuid = $o['brandGuid'];
        if (isset($o['manufacturer'])) $this->manufacturer = $o['manufacturer'];
        if (isset($o['manufacturerGuid'])) $this->manufacturerGuid = $o['manufacturerGuid'];
        if (isset($o['identifiers'])) $this->identifiers = JsonConverters::from('ProductIdentifiers', $o['identifiers']);
        if (isset($o['itemAttributes'])) $this->itemAttributes = JsonConverters::from('ItemAttributes', $o['itemAttributes']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->retailer)) $o['retailer'] = $this->retailer;
        if (isset($this->retailerGuid)) $o['retailerGuid'] = $this->retailerGuid;
        if (isset($this->storefront)) $o['storefront'] = $this->storefront;
        if (isset($this->storefrontIso2)) $o['storefrontIso2'] = $this->storefrontIso2;
        if (isset($this->storefrontGuid)) $o['storefrontGuid'] = $this->storefrontGuid;
        if (isset($this->category)) $o['category'] = $this->category;
        if (isset($this->categoryGuid)) $o['categoryGuid'] = $this->categoryGuid;
        if (isset($this->brand)) $o['brand'] = $this->brand;
        if (isset($this->brandGuid)) $o['brandGuid'] = $this->brandGuid;
        if (isset($this->manufacturer)) $o['manufacturer'] = $this->manufacturer;
        if (isset($this->manufacturerGuid)) $o['manufacturerGuid'] = $this->manufacturerGuid;
        if (isset($this->identifiers)) $o['identifiers'] = JsonConverters::to('ProductIdentifiers', $this->identifiers);
        if (isset($this->itemAttributes)) $o['itemAttributes'] = JsonConverters::to('ItemAttributes', $this->itemAttributes);
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class RetailerSpecificAttributes implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="name", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $name=null,

        // @DataMember(Name="description", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $description=null,

        // @DataMember(Name="skus", EmitDefaultValue=false)
        /** @var array<string>|null */
        public ?array $skus=null,

        // @DataMember(Name="asin", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $asin=null,

        // @DataMember(Name="url", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $url=null,

        // @DataMember(Name="productImages", EmitDefaultValue=false)
        /** @var array<string,string>|null */
        public ?array $productImages=null,

        // @DataMember(Name="additionalData", EmitDefaultValue=false)
        /** @var array<string,string>|null */
        public ?array $additionalData=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['description'])) $this->description = $o['description'];
        if (isset($o['skus'])) $this->skus = JsonConverters::fromArray('string', $o['skus']);
        if (isset($o['asin'])) $this->asin = $o['asin'];
        if (isset($o['url'])) $this->url = JsonConverters::from('string', $o['url']);
        if (isset($o['productImages'])) $this->productImages = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','Uri']), $o['productImages']);
        if (isset($o['additionalData'])) $this->additionalData = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['additionalData']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->description)) $o['description'] = $this->description;
        if (isset($this->skus)) $o['skus'] = JsonConverters::toArray('string', $this->skus);
        if (isset($this->asin)) $o['asin'] = $this->asin;
        if (isset($this->url)) $o['url'] = JsonConverters::to('string', $this->url);
        if (isset($this->productImages)) $o['productImages'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','Uri']), $this->productImages);
        if (isset($this->additionalData)) $o['additionalData'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->additionalData);
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class ProductData implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="attributes", EmitDefaultValue=false)
        /** @var ProductAttributes|null */
        public ?ProductAttributes $attributes=null,

        // @DataMember(Name="retailerSpecificAttributes", EmitDefaultValue=false)
        /** @var RetailerSpecificAttributes|null */
        public ?RetailerSpecificAttributes $retailerSpecificAttributes=null,

        // @DataMember(Name="rawSourceData", EmitDefaultValue=false)
        /** @var string|null */
        public ?string $rawSourceData=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['attributes'])) $this->attributes = JsonConverters::from('ProductAttributes', $o['attributes']);
        if (isset($o['retailerSpecificAttributes'])) $this->retailerSpecificAttributes = JsonConverters::from('RetailerSpecificAttributes', $o['retailerSpecificAttributes']);
        if (isset($o['rawSourceData'])) $this->rawSourceData = $o['rawSourceData'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->attributes)) $o['attributes'] = JsonConverters::to('ProductAttributes', $this->attributes);
        if (isset($this->retailerSpecificAttributes)) $o['retailerSpecificAttributes'] = JsonConverters::to('RetailerSpecificAttributes', $this->retailerSpecificAttributes);
        if (isset($this->rawSourceData)) $o['rawSourceData'] = $this->rawSourceData;
        return empty($o) ? new class(){} : $o;
    }
}

enum ErrorCode : string
{
    case Throttled = 'Throttled';
    case TargetRetailerProductNotFound = 'TargetRetailerProductNotFound';
    case Unknown = 'Unknown';
    case NullMatchResult = 'NullMatchResult';
    case NullSourceData = 'NullSourceData';
    case SourceDataProcessingFailure = 'SourceDataProcessingFailure';
    case LocalizationFailure = 'LocalizationFailure';
}

// @DataContract
class MatchError implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="message")
        /** @var string|null */
        public ?string $message=null,

        // @DataMember(Name="error")
        /** @var ErrorCode|null */
        public ?ErrorCode $error=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['message'])) $this->message = $o['message'];
        if (isset($o['error'])) $this->error = JsonConverters::from('ErrorCode', $o['error']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->message)) $o['message'] = $this->message;
        if (isset($this->error)) $o['error'] = JsonConverters::to('ErrorCode', $this->error);
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class MatchResult implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="retailer")
        /** @var string|null */
        public ?string $retailer=null,

        // @DataMember(Name="retailerGuid")
        /** @var string */
        public string $retailerGuid='',

        // @DataMember(Name="storefront")
        /** @var string|null */
        public ?string $storefront=null,

        // @DataMember(Name="storefrontIso2")
        /** @var string|null */
        public ?string $storefrontIso2=null,

        // @DataMember(Name="storefrontGuid")
        /** @var string */
        public string $storefrontGuid='',

        // @DataMember(Name="data")
        /** @var ProductData|null */
        public ?ProductData $data=null,

        // @DataMember(Name="errors")
        /** @var array<MatchError>|null */
        public ?array $errors=null,

        // @DataMember(Name="matchAccuracy")
        /** @var string|null */
        public ?string $matchAccuracy=null,

        // @DataMember(Name="matchingRuleName")
        /** @var string|null */
        public ?string $matchingRuleName=null,

        // @DataMember(Name="dataSource")
        /** @var string|null */
        public ?string $dataSource=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['retailer'])) $this->retailer = $o['retailer'];
        if (isset($o['retailerGuid'])) $this->retailerGuid = $o['retailerGuid'];
        if (isset($o['storefront'])) $this->storefront = $o['storefront'];
        if (isset($o['storefrontIso2'])) $this->storefrontIso2 = $o['storefrontIso2'];
        if (isset($o['storefrontGuid'])) $this->storefrontGuid = $o['storefrontGuid'];
        if (isset($o['data'])) $this->data = JsonConverters::from('ProductData', $o['data']);
        if (isset($o['errors'])) $this->errors = JsonConverters::fromArray('MatchError', $o['errors']);
        if (isset($o['matchAccuracy'])) $this->matchAccuracy = $o['matchAccuracy'];
        if (isset($o['matchingRuleName'])) $this->matchingRuleName = $o['matchingRuleName'];
        if (isset($o['dataSource'])) $this->dataSource = $o['dataSource'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->retailer)) $o['retailer'] = $this->retailer;
        if (isset($this->retailerGuid)) $o['retailerGuid'] = $this->retailerGuid;
        if (isset($this->storefront)) $o['storefront'] = $this->storefront;
        if (isset($this->storefrontIso2)) $o['storefrontIso2'] = $this->storefrontIso2;
        if (isset($this->storefrontGuid)) $o['storefrontGuid'] = $this->storefrontGuid;
        if (isset($this->data)) $o['data'] = JsonConverters::to('ProductData', $this->data);
        if (isset($this->errors)) $o['errors'] = JsonConverters::toArray('MatchError', $this->errors);
        if (isset($this->matchAccuracy)) $o['matchAccuracy'] = $this->matchAccuracy;
        if (isset($this->matchingRuleName)) $o['matchingRuleName'] = $this->matchingRuleName;
        if (isset($this->dataSource)) $o['dataSource'] = $this->dataSource;
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class ProductMetadata implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="title")
        /** @var string|null */
        public ?string $title=null,

        // @DataMember(Name="author")
        /** @var string|null */
        public ?string $author=null,

        // @DataMember(Name="url")
        /** @var string|null */
        public ?string $url=null,

        // @DataMember(Name="description")
        /** @var string|null */
        public ?string $description=null,

        // @DataMember(Name="retailer")
        /** @var string|null */
        public ?string $retailer=null,

        // @DataMember(Name="productImages")
        /** @var array<string,string>|null */
        public ?array $productImages=null,

        // @DataMember(Name="rawAttributes")
        /** @var MatchResult|null */
        public ?MatchResult $rawAttributes=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['title'])) $this->title = $o['title'];
        if (isset($o['author'])) $this->author = $o['author'];
        if (isset($o['url'])) $this->url = JsonConverters::from('string', $o['url']);
        if (isset($o['description'])) $this->description = $o['description'];
        if (isset($o['retailer'])) $this->retailer = $o['retailer'];
        if (isset($o['productImages'])) $this->productImages = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','Uri']), $o['productImages']);
        if (isset($o['rawAttributes'])) $this->rawAttributes = JsonConverters::from('MatchResult', $o['rawAttributes']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->title)) $o['title'] = $this->title;
        if (isset($this->author)) $o['author'] = $this->author;
        if (isset($this->url)) $o['url'] = JsonConverters::to('string', $this->url);
        if (isset($this->description)) $o['description'] = $this->description;
        if (isset($this->retailer)) $o['retailer'] = $this->retailer;
        if (isset($this->productImages)) $o['productImages'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','Uri']), $this->productImages);
        if (isset($this->rawAttributes)) $o['rawAttributes'] = JsonConverters::to('MatchResult', $this->rawAttributes);
        return empty($o) ? new class(){} : $o;
    }
}

class GetProductMatchesByUrlResponse implements IGetProductMatchesByUrlResponse, JsonSerializable
{
    public function __construct(
        /** @var array<ProductMetadata>|null */
        public ?array $products=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['products'])) $this->products = JsonConverters::fromArray('ProductMetadata', $o['products']);
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->products)) $o['products'] = JsonConverters::toArray('ProductMetadata', $this->products);
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class GetProductMatchesByUrlRequest implements IGetProductMatchesByUrlRequest, JsonSerializable
{
    public function __construct(
        // @DataMember(Name="url")
        /** @var string|null */
        public ?string $url=null,

        // @DataMember(Name="includeRaw")
        /** @var bool|null */
        public ?bool $includeRaw=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['url'])) $this->url = $o['url'];
        if (isset($o['includeRaw'])) $this->includeRaw = $o['includeRaw'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->url)) $o['url'] = $this->url;
        if (isset($this->includeRaw)) $o['includeRaw'] = $this->includeRaw;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetProductMatchesByUrlRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v3.5/product/matches HTTP/1.1 
Host: geniuslink-api-zane.dev.platform.georiot.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetProductMatchesByUrlResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GeniuslinkAPI.ServiceModel.V4.Products.Responses">
  <Products xmlns:d2p1="http://schemas.datacontract.org/2004/07/Geniuslink.Products.QueuedService.Contracts.V1.DTOs" i:nil="true" />
  <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>
</GetProductMatchesByUrlResponse>