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 .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

{"directory_uuid":"String","waiver":"String","bday":"0001-01-01T00:00:00.0000000","spouse_bday":"0001-01-01T00:00:00.0000000","spouse_name":"String","wedding_date":"0001-01-01T00:00:00.0000000","kids":"String","home_country":"String","quote":"String","bio":"String","interests":"String","category":"String","field_of_work":"String","church":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}