sfgboxapi

<back to all web services

UsersIntendedLookup

The following routes are available for this service:
GET/users_intended
<?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 UsersIntendedLookup implements JsonSerializable
{
    public function __construct(
        // @DataMember(Order=2)
        /** @var string|null */
        public ?string $firstName=null,

        // @DataMember(Order=3)
        /** @var string|null */
        public ?string $lastName=null,

        // @DataMember(Order=4)
        /** @var string|null */
        public ?string $identificationNumber=null,

        // @DataMember(Order=5)
        /** @var string|null */
        public ?string $phoneNumber=null,

        // @DataMember(Order=6)
        /** @var float */
        public float $latitude=0.0,

        // @DataMember(Order=7)
        /** @var float */
        public float $longitude=0.0,

        // @DataMember(Order=8)
        // @References("typeof(sfgboxapi.ServiceModel.Types.UsersDetails)")
        /** @var int|null */
        public ?int $usersDetailsId=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['firstName'])) $this->firstName = $o['firstName'];
        if (isset($o['lastName'])) $this->lastName = $o['lastName'];
        if (isset($o['identificationNumber'])) $this->identificationNumber = $o['identificationNumber'];
        if (isset($o['phoneNumber'])) $this->phoneNumber = $o['phoneNumber'];
        if (isset($o['latitude'])) $this->latitude = $o['latitude'];
        if (isset($o['longitude'])) $this->longitude = $o['longitude'];
        if (isset($o['usersDetailsId'])) $this->usersDetailsId = $o['usersDetailsId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->firstName)) $o['firstName'] = $this->firstName;
        if (isset($this->lastName)) $o['lastName'] = $this->lastName;
        if (isset($this->identificationNumber)) $o['identificationNumber'] = $this->identificationNumber;
        if (isset($this->phoneNumber)) $o['phoneNumber'] = $this->phoneNumber;
        if (isset($this->latitude)) $o['latitude'] = $this->latitude;
        if (isset($this->longitude)) $o['longitude'] = $this->longitude;
        if (isset($this->usersDetailsId)) $o['usersDetailsId'] = $this->usersDetailsId;
        return empty($o) ? new class(){} : $o;
    }
}

PHP UsersIntendedLookup DTOs

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

HTTP + OTHER

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

GET /users_intended HTTP/1.1 
Host: sfgboxapi.dev.scadsoftware.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{Unable to show example output for type 'IEnumerable`1' using the custom 'other' filter}Cannot dynamically create an instance of type 'System.Collections.Generic.IEnumerable`1[sfgboxapi.ServiceModel.UsersIntendedLookupResponse]'. Reason: Cannot create an instance of an interface.