regis

<back to all web services

DirectorySettingsUpdateRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Directory/Settings/{directory_uuid}/Save
<?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 DirectorySettingsUpdateRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $directory_uuid=null,
        /** @var string|null */
        public ?string $waiver=null,
        /** @var DateTime|null */
        public ?DateTime $bday=null,
        /** @var DateTime|null */
        public ?DateTime $spouse_bday=null,
        /** @var string|null */
        public ?string $spouse_name=null,
        /** @var DateTime|null */
        public ?DateTime $wedding_date=null,
        /** @var string|null */
        public ?string $kids=null,
        /** @var string|null */
        public ?string $home_country=null,
        /** @var string|null */
        public ?string $quote=null,
        /** @var string|null */
        public ?string $bio=null,
        /** @var string|null */
        public ?string $interests=null,
        /** @var string|null */
        public ?string $category=null,
        /** @var string|null */
        public ?string $field_of_work=null,
        /** @var string|null */
        public ?string $church=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['directory_uuid'])) $this->directory_uuid = $o['directory_uuid'];
        if (isset($o['waiver'])) $this->waiver = $o['waiver'];
        if (isset($o['bday'])) $this->bday = JsonConverters::from('DateTime', $o['bday']);
        if (isset($o['spouse_bday'])) $this->spouse_bday = JsonConverters::from('DateTime', $o['spouse_bday']);
        if (isset($o['spouse_name'])) $this->spouse_name = $o['spouse_name'];
        if (isset($o['wedding_date'])) $this->wedding_date = JsonConverters::from('DateTime', $o['wedding_date']);
        if (isset($o['kids'])) $this->kids = $o['kids'];
        if (isset($o['home_country'])) $this->home_country = $o['home_country'];
        if (isset($o['quote'])) $this->quote = $o['quote'];
        if (isset($o['bio'])) $this->bio = $o['bio'];
        if (isset($o['interests'])) $this->interests = $o['interests'];
        if (isset($o['category'])) $this->category = $o['category'];
        if (isset($o['field_of_work'])) $this->field_of_work = $o['field_of_work'];
        if (isset($o['church'])) $this->church = $o['church'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->directory_uuid)) $o['directory_uuid'] = $this->directory_uuid;
        if (isset($this->waiver)) $o['waiver'] = $this->waiver;
        if (isset($this->bday)) $o['bday'] = JsonConverters::to('DateTime', $this->bday);
        if (isset($this->spouse_bday)) $o['spouse_bday'] = JsonConverters::to('DateTime', $this->spouse_bday);
        if (isset($this->spouse_name)) $o['spouse_name'] = $this->spouse_name;
        if (isset($this->wedding_date)) $o['wedding_date'] = JsonConverters::to('DateTime', $this->wedding_date);
        if (isset($this->kids)) $o['kids'] = $this->kids;
        if (isset($this->home_country)) $o['home_country'] = $this->home_country;
        if (isset($this->quote)) $o['quote'] = $this->quote;
        if (isset($this->bio)) $o['bio'] = $this->bio;
        if (isset($this->interests)) $o['interests'] = $this->interests;
        if (isset($this->category)) $o['category'] = $this->category;
        if (isset($this->field_of_work)) $o['field_of_work'] = $this->field_of_work;
        if (isset($this->church)) $o['church'] = $this->church;
        return empty($o) ? new class(){} : $o;
    }
}

PHP DirectorySettingsUpdateRequest 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.

POST /Directory/Settings/{directory_uuid}/Save HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<DirectorySettingsUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
  <bday>0001-01-01T00:00:00</bday>
  <bio>String</bio>
  <category>String</category>
  <church>String</church>
  <directory_uuid>String</directory_uuid>
  <field_of_work>String</field_of_work>
  <home_country>String</home_country>
  <interests>String</interests>
  <kids>String</kids>
  <quote>String</quote>
  <spouse_bday>0001-01-01T00:00:00</spouse_bday>
  <spouse_name>String</spouse_name>
  <waiver>String</waiver>
  <wedding_date>0001-01-01T00:00:00</wedding_date>
</DirectorySettingsUpdateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResponseStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ErrorCode>String</ErrorCode>
  <Message>String</Message>
  <StackTrace>String</StackTrace>
  <Errors>
    <ResponseError>
      <ErrorCode>String</ErrorCode>
      <FieldName>String</FieldName>
      <Message>String</Message>
      <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Meta>
    </ResponseError>
  </Errors>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
</ResponseStatus>