POST | /companies/ | Create new company | Create your company information. |
---|
<?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};
enum CodeLockSystemType : string
{
case Sample = 'Sample';
case RcoM5 = 'RcoM5';
case AxemaVaka = 'AxemaVaka';
case VanderbiltOmnis = 'VanderbiltOmnis';
case ParakeyParakey = 'ParakeyParakey';
case AmidoDax = 'AmidoDax';
case TelkeyTelkey = 'TelkeyTelkey';
case TechSolutionsSiedle = 'TechSolutionsSiedle';
case Accessy = 'Accessy';
case Zesec = 'Zesec';
case Enabla = 'Enabla';
}
class CompanyBookingSettings implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $EnableMobileApp=null,
/** @var string|null */
public ?string $BookingReceiptMessage=null,
/** @var bool|null */
public ?bool $ShowFreeTimesLeft=null,
/** @var bool|null */
public ?bool $EnableShowBookedTimes=null,
/** @var string|null */
public ?string $BookingAgreement=null,
/** @description The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber */
// @ApiMember(DataType="int", Description="The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber ")
/** @var int */
public int $WeekNumberSetting=0,
/** @var bool|null */
public ?bool $ShowBookedTimes=null,
/** @description The payment provider id. 1 = Payson Checkout 1.0, 2= Payson Checkout 2.0 ... To get the full payment provider for the company call GET /payment/settings */
// @ApiMember(Description="The payment provider id. 1 = Payson Checkout 1.0, 2= Payson Checkout 2.0 ... To get the full payment provider for the company call GET /payment/settings")
/** @var int */
public int $PaymentProviderId=0,
/** @description If it's only allowed for existing customers to book */
// @ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")
/** @var bool|null */
public ?bool $BookOnlyOnExistingCustomers=null,
/** @description If payment is enabled */
// @ApiMember(DataType="boolean", Description="If payment is enabled")
/** @var bool|null */
public ?bool $PaymentEnabled=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['EnableMobileApp'])) $this->EnableMobileApp = $o['EnableMobileApp'];
if (isset($o['BookingReceiptMessage'])) $this->BookingReceiptMessage = $o['BookingReceiptMessage'];
if (isset($o['ShowFreeTimesLeft'])) $this->ShowFreeTimesLeft = $o['ShowFreeTimesLeft'];
if (isset($o['EnableShowBookedTimes'])) $this->EnableShowBookedTimes = $o['EnableShowBookedTimes'];
if (isset($o['BookingAgreement'])) $this->BookingAgreement = $o['BookingAgreement'];
if (isset($o['WeekNumberSetting'])) $this->WeekNumberSetting = $o['WeekNumberSetting'];
if (isset($o['ShowBookedTimes'])) $this->ShowBookedTimes = $o['ShowBookedTimes'];
if (isset($o['PaymentProviderId'])) $this->PaymentProviderId = $o['PaymentProviderId'];
if (isset($o['BookOnlyOnExistingCustomers'])) $this->BookOnlyOnExistingCustomers = $o['BookOnlyOnExistingCustomers'];
if (isset($o['PaymentEnabled'])) $this->PaymentEnabled = $o['PaymentEnabled'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->EnableMobileApp)) $o['EnableMobileApp'] = $this->EnableMobileApp;
if (isset($this->BookingReceiptMessage)) $o['BookingReceiptMessage'] = $this->BookingReceiptMessage;
if (isset($this->ShowFreeTimesLeft)) $o['ShowFreeTimesLeft'] = $this->ShowFreeTimesLeft;
if (isset($this->EnableShowBookedTimes)) $o['EnableShowBookedTimes'] = $this->EnableShowBookedTimes;
if (isset($this->BookingAgreement)) $o['BookingAgreement'] = $this->BookingAgreement;
if (isset($this->WeekNumberSetting)) $o['WeekNumberSetting'] = $this->WeekNumberSetting;
if (isset($this->ShowBookedTimes)) $o['ShowBookedTimes'] = $this->ShowBookedTimes;
if (isset($this->PaymentProviderId)) $o['PaymentProviderId'] = $this->PaymentProviderId;
if (isset($this->BookOnlyOnExistingCustomers)) $o['BookOnlyOnExistingCustomers'] = $this->BookOnlyOnExistingCustomers;
if (isset($this->PaymentEnabled)) $o['PaymentEnabled'] = $this->PaymentEnabled;
return empty($o) ? new class(){} : $o;
}
}
class CompanySystemSettings implements JsonSerializable
{
public function __construct(
/** @description If the booking is active or not */
// @ApiMember(DataType="bool", Description="If the booking is active or not")
/** @var bool|null */
public ?bool $Active=null,
/** @description If the booking is not active, what message to show to the customers */
// @ApiMember(DataType="string", Description="If the booking is not active, what message to show to the customers")
/** @var string|null */
public ?string $InactiveMessage=null,
/** @description If the company should be visible in search results on hompage */
// @ApiMember(DataType="bool", Description="If the company should be visible in search results on hompage")
/** @var bool|null */
public ?bool $Searchable=null,
/** @description If you have a google analytics account and want to track your customers behaviors. */
// @ApiMember(DataType="string", Description="If you have a google analytics account and want to track your customers behaviors.")
/** @var string|null */
public ?string $GATrackingId=null,
/** @description If you have a google Ads Conversion Id account and want to track your customers behaviors. */
// @ApiMember(DataType="string", Description="If you have a google Ads Conversion Id account and want to track your customers behaviors.")
/** @var string|null */
public ?string $GoogleAdsConversionId=null,
/** @description If you have a LinkedIn account and want to track your customers behaviors. */
// @ApiMember(DataType="string", Description="If you have a LinkedIn account and want to track your customers behaviors.")
/** @var string|null */
public ?string $LinkedinTagId=null,
/** @description If you have a Google Ads Conversion Label and want to track your customers behaviors. */
// @ApiMember(DataType="string", Description="If you have a Google Ads Conversion Label and want to track your customers behaviors.")
/** @var string|null */
public ?string $GoogleAdsConversionLabel=null,
/** @description If you have a google tag manager account and want to track your customers behaviors. */
// @ApiMember(DataType="string", Description="If you have a google tag manager account and want to track your customers behaviors.")
/** @var string|null */
public ?string $GTMTrackingId=null,
/** @description If you have a facebook account and want to track your customers behaviors. */
// @ApiMember(DataType="string", Description="If you have a facebook account and want to track your customers behaviors.")
/** @var string|null */
public ?string $FacebookPixelId=null,
/** @description If you want your customers to be albe to change language on your homepage */
// @ApiMember(DataType="bool", Description="If you want your customers to be albe to change language on your homepage")
/** @var bool|null */
public ?bool $MultiLanguage=null,
/** @description If the company should be visible on the marketplace */
// @ApiMember(DataType="bool", Description="If the company should be visible on the marketplace")
/** @var bool|null */
public ?bool $ShowOnMarketplace=null,
/** @description If you want your own written text on your homepage to be translated using google analytics when a user changes language */
// @ApiMember(DataType="bool", Description="If you want your own written text on your homepage to be translated using google analytics when a user changes language")
/** @var bool|null */
public ?bool $EnableAPITranslation=null,
/** @description What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN */
// @ApiMember(DataType="string", Description="What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN")
/** @var string|null */
public ?string $DefaultLanguage=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['InactiveMessage'])) $this->InactiveMessage = $o['InactiveMessage'];
if (isset($o['Searchable'])) $this->Searchable = $o['Searchable'];
if (isset($o['GATrackingId'])) $this->GATrackingId = $o['GATrackingId'];
if (isset($o['GoogleAdsConversionId'])) $this->GoogleAdsConversionId = $o['GoogleAdsConversionId'];
if (isset($o['LinkedinTagId'])) $this->LinkedinTagId = $o['LinkedinTagId'];
if (isset($o['GoogleAdsConversionLabel'])) $this->GoogleAdsConversionLabel = $o['GoogleAdsConversionLabel'];
if (isset($o['GTMTrackingId'])) $this->GTMTrackingId = $o['GTMTrackingId'];
if (isset($o['FacebookPixelId'])) $this->FacebookPixelId = $o['FacebookPixelId'];
if (isset($o['MultiLanguage'])) $this->MultiLanguage = $o['MultiLanguage'];
if (isset($o['ShowOnMarketplace'])) $this->ShowOnMarketplace = $o['ShowOnMarketplace'];
if (isset($o['EnableAPITranslation'])) $this->EnableAPITranslation = $o['EnableAPITranslation'];
if (isset($o['DefaultLanguage'])) $this->DefaultLanguage = $o['DefaultLanguage'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->InactiveMessage)) $o['InactiveMessage'] = $this->InactiveMessage;
if (isset($this->Searchable)) $o['Searchable'] = $this->Searchable;
if (isset($this->GATrackingId)) $o['GATrackingId'] = $this->GATrackingId;
if (isset($this->GoogleAdsConversionId)) $o['GoogleAdsConversionId'] = $this->GoogleAdsConversionId;
if (isset($this->LinkedinTagId)) $o['LinkedinTagId'] = $this->LinkedinTagId;
if (isset($this->GoogleAdsConversionLabel)) $o['GoogleAdsConversionLabel'] = $this->GoogleAdsConversionLabel;
if (isset($this->GTMTrackingId)) $o['GTMTrackingId'] = $this->GTMTrackingId;
if (isset($this->FacebookPixelId)) $o['FacebookPixelId'] = $this->FacebookPixelId;
if (isset($this->MultiLanguage)) $o['MultiLanguage'] = $this->MultiLanguage;
if (isset($this->ShowOnMarketplace)) $o['ShowOnMarketplace'] = $this->ShowOnMarketplace;
if (isset($this->EnableAPITranslation)) $o['EnableAPITranslation'] = $this->EnableAPITranslation;
if (isset($this->DefaultLanguage)) $o['DefaultLanguage'] = $this->DefaultLanguage;
return empty($o) ? new class(){} : $o;
}
}
class CompanyWidgetSettings implements JsonSerializable
{
public function __construct(
/** @description The service layouts id. */
// @ApiMember(Description="The service layouts id.")
/** @var int */
public int $ServiceLayoutId=0,
/** @description The time layouts id. */
// @ApiMember(Description="The time layouts id.")
/** @var int */
public int $TimeLayoutId=0,
/** @description The booking layouts id. */
// @ApiMember(Description="The booking layouts id.")
/** @var int */
public int $BookingLayoutId=0,
/** @description The primary color of the booking widget. */
// @ApiMember(Description="The primary color of the booking widget.")
/** @var string|null */
public ?string $PrimaryColor=null,
/** @description If you should show the service image in the booking widget. */
// @ApiMember(Description="If you should show the service image in the booking widget.")
/** @var bool|null */
public ?bool $ShowServiceImage=null,
/** @description If you should show the rebate code field in the booking widget. */
// @ApiMember(Description="If you should show the rebate code field in the booking widget.")
/** @var bool|null */
public ?bool $ShowRebateCodeField=null,
/** @description If you should show the next available time in the booking widget. */
// @ApiMember(Description="If you should show the next available time in the booking widget.")
/** @var bool|null */
public ?bool $ShowNextAvailableTime=null,
/** @description If you should show the end time in the booking widget. */
// @ApiMember(Description="If you should show the end time in the booking widget.")
/** @var bool|null */
public ?bool $ShowEndTime=null,
/** @description What text to show on booked time slots. Default text is Booked */
// @ApiMember(Description="What text to show on booked time slots. Default text is Booked")
/** @var string|null */
public ?string $BookedTimeSlotText=null,
/** @description If the widget should be displayed in dark theme */
// @ApiMember(Description="If the widget should be displayed in dark theme")
/** @var bool|null */
public ?bool $DarkTheme=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ServiceLayoutId'])) $this->ServiceLayoutId = $o['ServiceLayoutId'];
if (isset($o['TimeLayoutId'])) $this->TimeLayoutId = $o['TimeLayoutId'];
if (isset($o['BookingLayoutId'])) $this->BookingLayoutId = $o['BookingLayoutId'];
if (isset($o['PrimaryColor'])) $this->PrimaryColor = $o['PrimaryColor'];
if (isset($o['ShowServiceImage'])) $this->ShowServiceImage = $o['ShowServiceImage'];
if (isset($o['ShowRebateCodeField'])) $this->ShowRebateCodeField = $o['ShowRebateCodeField'];
if (isset($o['ShowNextAvailableTime'])) $this->ShowNextAvailableTime = $o['ShowNextAvailableTime'];
if (isset($o['ShowEndTime'])) $this->ShowEndTime = $o['ShowEndTime'];
if (isset($o['BookedTimeSlotText'])) $this->BookedTimeSlotText = $o['BookedTimeSlotText'];
if (isset($o['DarkTheme'])) $this->DarkTheme = $o['DarkTheme'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ServiceLayoutId)) $o['ServiceLayoutId'] = $this->ServiceLayoutId;
if (isset($this->TimeLayoutId)) $o['TimeLayoutId'] = $this->TimeLayoutId;
if (isset($this->BookingLayoutId)) $o['BookingLayoutId'] = $this->BookingLayoutId;
if (isset($this->PrimaryColor)) $o['PrimaryColor'] = $this->PrimaryColor;
if (isset($this->ShowServiceImage)) $o['ShowServiceImage'] = $this->ShowServiceImage;
if (isset($this->ShowRebateCodeField)) $o['ShowRebateCodeField'] = $this->ShowRebateCodeField;
if (isset($this->ShowNextAvailableTime)) $o['ShowNextAvailableTime'] = $this->ShowNextAvailableTime;
if (isset($this->ShowEndTime)) $o['ShowEndTime'] = $this->ShowEndTime;
if (isset($this->BookedTimeSlotText)) $o['BookedTimeSlotText'] = $this->BookedTimeSlotText;
if (isset($this->DarkTheme)) $o['DarkTheme'] = $this->DarkTheme;
return empty($o) ? new class(){} : $o;
}
}
class HomepageSettingsResponse implements JsonSerializable
{
public function __construct(
/** @description The text for homepage heading */
// @ApiMember(Description="The text for homepage heading")
/** @var string|null */
public ?string $HomepageHeading=null,
/** @description The text for homepage startpage heading */
// @ApiMember(Description="The text for homepage startpage heading")
/** @var string|null */
public ?string $WelcomePageHeading=null,
/** @description The text for homepage startpage body */
// @ApiMember(Description="The text for homepage startpage body")
/** @var string|null */
public ?string $WelcomePageBody=null,
/** @description The text for homepage about us page heading */
// @ApiMember(Description="The text for homepage about us page heading")
/** @var string|null */
public ?string $AboutUsPageHeading=null,
/** @description The text for homepage about us page body */
// @ApiMember(Description="The text for homepage about us page body")
/** @var string|null */
public ?string $AboutUsPageBody=null,
/** @description The startpage image url */
// @ApiMember(Description="The startpage image url")
/** @var string|null */
public ?string $ImageUrl=null,
/** @description The cover image url */
// @ApiMember(Description="The cover image url")
/** @var string|null */
public ?string $CoverImage=null,
/** @description Show rating on the page */
// @ApiMember(Description="Show rating on the page")
/** @var bool|null */
public ?bool $ShowRating=null,
/** @description The template for the homepage */
// @ApiMember(Description="The template for the homepage")
/** @var int */
public int $HomePageTemplateId=0,
/** @description The hero section style for the homepage */
// @ApiMember(Description="The hero section style for the homepage")
/** @var int */
public int $HeroSectionStyleId=0,
/** @description Enable the BokaMera Homepage */
// @ApiMember(Description="Enable the BokaMera Homepage")
/** @var bool|null */
public ?bool $EnableHomepage=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['HomepageHeading'])) $this->HomepageHeading = $o['HomepageHeading'];
if (isset($o['WelcomePageHeading'])) $this->WelcomePageHeading = $o['WelcomePageHeading'];
if (isset($o['WelcomePageBody'])) $this->WelcomePageBody = $o['WelcomePageBody'];
if (isset($o['AboutUsPageHeading'])) $this->AboutUsPageHeading = $o['AboutUsPageHeading'];
if (isset($o['AboutUsPageBody'])) $this->AboutUsPageBody = $o['AboutUsPageBody'];
if (isset($o['ImageUrl'])) $this->ImageUrl = JsonConverters::from('string', $o['ImageUrl']);
if (isset($o['CoverImage'])) $this->CoverImage = JsonConverters::from('string', $o['CoverImage']);
if (isset($o['ShowRating'])) $this->ShowRating = $o['ShowRating'];
if (isset($o['HomePageTemplateId'])) $this->HomePageTemplateId = $o['HomePageTemplateId'];
if (isset($o['HeroSectionStyleId'])) $this->HeroSectionStyleId = $o['HeroSectionStyleId'];
if (isset($o['EnableHomepage'])) $this->EnableHomepage = $o['EnableHomepage'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->HomepageHeading)) $o['HomepageHeading'] = $this->HomepageHeading;
if (isset($this->WelcomePageHeading)) $o['WelcomePageHeading'] = $this->WelcomePageHeading;
if (isset($this->WelcomePageBody)) $o['WelcomePageBody'] = $this->WelcomePageBody;
if (isset($this->AboutUsPageHeading)) $o['AboutUsPageHeading'] = $this->AboutUsPageHeading;
if (isset($this->AboutUsPageBody)) $o['AboutUsPageBody'] = $this->AboutUsPageBody;
if (isset($this->ImageUrl)) $o['ImageUrl'] = JsonConverters::to('string', $this->ImageUrl);
if (isset($this->CoverImage)) $o['CoverImage'] = JsonConverters::to('string', $this->CoverImage);
if (isset($this->ShowRating)) $o['ShowRating'] = $this->ShowRating;
if (isset($this->HomePageTemplateId)) $o['HomePageTemplateId'] = $this->HomePageTemplateId;
if (isset($this->HeroSectionStyleId)) $o['HeroSectionStyleId'] = $this->HeroSectionStyleId;
if (isset($this->EnableHomepage)) $o['EnableHomepage'] = $this->EnableHomepage;
return empty($o) ? new class(){} : $o;
}
}
class CompanyRatingSummary implements JsonSerializable
{
public function __construct(
/** @description The average rating score */
// @ApiMember(Description="The average rating score")
/** @var float */
public float $AverageScore=0.0,
/** @description The number of ratings of score 1 */
// @ApiMember(Description="The number of ratings of score 1")
/** @var int */
public int $RatingScore1Count=0,
/** @description The number of ratings of score 2 */
// @ApiMember(Description="The number of ratings of score 2")
/** @var int */
public int $RatingScore2Count=0,
/** @description The number of ratings of score 3 */
// @ApiMember(Description="The number of ratings of score 3")
/** @var int */
public int $RatingScore3Count=0,
/** @description The number of ratings of score 4 */
// @ApiMember(Description="The number of ratings of score 4")
/** @var int */
public int $RaingScore4Count=0,
/** @description The number of ratings of score 5 */
// @ApiMember(Description="The number of ratings of score 5")
/** @var int */
public int $RatingScore5Count=0,
/** @description The number of ratings */
// @ApiMember(Description="The number of ratings")
/** @var int */
public int $Count=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AverageScore'])) $this->AverageScore = $o['AverageScore'];
if (isset($o['RatingScore1Count'])) $this->RatingScore1Count = $o['RatingScore1Count'];
if (isset($o['RatingScore2Count'])) $this->RatingScore2Count = $o['RatingScore2Count'];
if (isset($o['RatingScore3Count'])) $this->RatingScore3Count = $o['RatingScore3Count'];
if (isset($o['RaingScore4Count'])) $this->RaingScore4Count = $o['RaingScore4Count'];
if (isset($o['RatingScore5Count'])) $this->RatingScore5Count = $o['RatingScore5Count'];
if (isset($o['Count'])) $this->Count = $o['Count'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AverageScore)) $o['AverageScore'] = $this->AverageScore;
if (isset($this->RatingScore1Count)) $o['RatingScore1Count'] = $this->RatingScore1Count;
if (isset($this->RatingScore2Count)) $o['RatingScore2Count'] = $this->RatingScore2Count;
if (isset($this->RatingScore3Count)) $o['RatingScore3Count'] = $this->RatingScore3Count;
if (isset($this->RaingScore4Count)) $o['RaingScore4Count'] = $this->RaingScore4Count;
if (isset($this->RatingScore5Count)) $o['RatingScore5Count'] = $this->RatingScore5Count;
if (isset($this->Count)) $o['Count'] = $this->Count;
return empty($o) ? new class(){} : $o;
}
}
class RatingReviewResponse implements JsonSerializable
{
public function __construct(
/** @description The title for the review */
// @ApiMember(Description="The title for the review")
/** @var string|null */
public ?string $Title=null,
/** @description The description for the review */
// @ApiMember(Description="The description for the review")
/** @var string|null */
public ?string $Description=null,
/** @description The rating score */
// @ApiMember(Description="The rating score")
/** @var int */
public int $RatingScore=0,
/** @description The review author */
// @ApiMember(Description="The review author")
/** @var string|null */
public ?string $Author=null,
/** @description The created date */
// @ApiMember(Description="The created date")
/** @var DateTime */
public DateTime $Created=new DateTime(),
/** @description The review answer from the company */
// @ApiMember(Description="The review answer from the company")
/** @var string|null */
public ?string $ReviewAnswer=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['RatingScore'])) $this->RatingScore = $o['RatingScore'];
if (isset($o['Author'])) $this->Author = $o['Author'];
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['ReviewAnswer'])) $this->ReviewAnswer = $o['ReviewAnswer'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->RatingScore)) $o['RatingScore'] = $this->RatingScore;
if (isset($this->Author)) $o['Author'] = $this->Author;
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->ReviewAnswer)) $o['ReviewAnswer'] = $this->ReviewAnswer;
return empty($o) ? new class(){} : $o;
}
}
class CustomFieldValueResponse implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Value=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Value'])) $this->Value = $o['Value'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Value)) $o['Value'] = $this->Value;
return empty($o) ? new class(){} : $o;
}
}
class CustomFieldConfigData implements JsonSerializable
{
public function __construct(
/** @description Custom field id */
// @ApiMember(Description="Custom field id")
/** @var int */
public int $Id=0,
/** @description Configuration name. Example: 'Number of persons'. */
// @ApiMember(Description="Configuration name. Example: 'Number of persons'.")
/** @var string|null */
public ?string $Name=null,
/** @description Custom field description. Example: 'For how many persons is this booking?' */
// @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'")
/** @var string|null */
public ?string $Description=null,
/** @description Field width. Example: 20 for 20px */
// @ApiMember(Description="Field width. Example: 20 for 20px")
/** @var int|null */
public ?int $Width=null,
/** @description Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */
// @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")
/** @var string|null */
public ?string $DataType=null,
/** @description Default value of the field. Example: '3' */
// @ApiMember(Description="Default value of the field. Example: '3'")
/** @var string|null */
public ?string $DefaultValue=null,
/** @description Determines if the field is required to have a value or not */
// @ApiMember(Description="Determines if the field is required to have a value or not")
/** @var bool|null */
public ?bool $IsMandatory=null,
/** @description Error message shown to the user if the field data is required but not entered */
// @ApiMember(Description="Error message shown to the user if the field data is required but not entered")
/** @var string|null */
public ?string $MandatoryErrorMessage=null,
/** @description Max lenght of the field */
// @ApiMember(Description="Max lenght of the field")
/** @var int */
public int $MaxLength=0,
/** @description If the field should have multiple lines */
// @ApiMember(Description="If the field should have multiple lines")
/** @var bool|null */
public ?bool $MultipleLineText=null,
/** @description Regular expression used for validation of the field */
// @ApiMember(Description="Regular expression used for validation of the field")
/** @var string|null */
public ?string $RegEx=null,
/** @description Error message shown if the regular expression validation failed */
// @ApiMember(Description="Error message shown if the regular expression validation failed")
/** @var string|null */
public ?string $RegExErrorMessage=null,
/** @description The values to select from if Datatype is DropDown for this custom field */
// @ApiMember(Description="The values to select from if Datatype is DropDown for this custom field")
/** @var array<CustomFieldValueResponse>|null */
public ?array $Values=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Width'])) $this->Width = $o['Width'];
if (isset($o['DataType'])) $this->DataType = $o['DataType'];
if (isset($o['DefaultValue'])) $this->DefaultValue = $o['DefaultValue'];
if (isset($o['IsMandatory'])) $this->IsMandatory = $o['IsMandatory'];
if (isset($o['MandatoryErrorMessage'])) $this->MandatoryErrorMessage = $o['MandatoryErrorMessage'];
if (isset($o['MaxLength'])) $this->MaxLength = $o['MaxLength'];
if (isset($o['MultipleLineText'])) $this->MultipleLineText = $o['MultipleLineText'];
if (isset($o['RegEx'])) $this->RegEx = $o['RegEx'];
if (isset($o['RegExErrorMessage'])) $this->RegExErrorMessage = $o['RegExErrorMessage'];
if (isset($o['Values'])) $this->Values = JsonConverters::fromArray('CustomFieldValueResponse', $o['Values']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Width)) $o['Width'] = $this->Width;
if (isset($this->DataType)) $o['DataType'] = $this->DataType;
if (isset($this->DefaultValue)) $o['DefaultValue'] = $this->DefaultValue;
if (isset($this->IsMandatory)) $o['IsMandatory'] = $this->IsMandatory;
if (isset($this->MandatoryErrorMessage)) $o['MandatoryErrorMessage'] = $this->MandatoryErrorMessage;
if (isset($this->MaxLength)) $o['MaxLength'] = $this->MaxLength;
if (isset($this->MultipleLineText)) $o['MultipleLineText'] = $this->MultipleLineText;
if (isset($this->RegEx)) $o['RegEx'] = $this->RegEx;
if (isset($this->RegExErrorMessage)) $o['RegExErrorMessage'] = $this->RegExErrorMessage;
if (isset($this->Values)) $o['Values'] = JsonConverters::toArray('CustomFieldValueResponse', $this->Values);
return empty($o) ? new class(){} : $o;
}
}
class CompanyQueryResponse implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id='',
/** @var string|null */
public ?string $Name=null,
/** @description The organisation number will only be visible if your owner to the company */
// @ApiMember(DataType="string", Description="The organisation number will only be visible if your owner to the company")
/** @var string|null */
public ?string $OrganisationNumber=null,
/** @description What type of company. If it's used for personal use or as a company. */
// @ApiMember(DataType="int", Description="What type of company. If it's used for personal use or as a company.")
/** @var int|null */
public ?int $TypeId=null,
/** @var string|null */
public ?string $Details=null,
/** @var int */
public int $CategoryId=0,
/** @var string|null */
public ?string $Category=null,
/** @var string|null */
public ?string $LogoType=null,
/** @var string|null */
public ?string $CoverImage=null,
/** @var string|null */
public ?string $Street1=null,
/** @var string|null */
public ?string $Street2=null,
/** @var string|null */
public ?string $ZipCode=null,
/** @var string|null */
public ?string $City=null,
/** @var string|null */
public ?string $CountryId=null,
/** @var string|null */
public ?string $Longitude=null,
/** @var string|null */
public ?string $Latitude=null,
/** @var float|null */
public ?float $Distance=null,
/** @var string|null */
public ?string $Phone=null,
/** @var string|null */
public ?string $Email=null,
/** @var string|null */
public ?string $Homepage=null,
/** @var string|null */
public ?string $SitePath=null,
/** @var bool|null */
public ?bool $Active=null,
/** @var CodeLockSystemType|null */
public ?CodeLockSystemType $CodeLockSystem=null,
/** @var bool|null */
public ?bool $IsFreeAccount=null,
/** @description Will show when the company was updated, note it will only be shown if your logged in as admin for the company. */
// @ApiMember(DataType="datetime", Description="Will show when the company was updated, note it will only be shown if your logged in as admin for the company.")
/** @var DateTime|null */
public ?DateTime $Updated=null,
/** @description Will show when the company was created, note it will only be shown if your logged in as admin for the company. */
// @ApiMember(DataType="datetime", Description="Will show when the company was created, note it will only be shown if your logged in as admin for the company.")
/** @var DateTime|null */
public ?DateTime $Created=null,
/** @var int */
public int $StatusId=0,
/** @description If the company is marked as favourite for the logged in user */
// @ApiMember(DataType="boolean", Description="If the company is marked as favourite for the logged in user")
/** @var bool|null */
public ?bool $IsFavorite=null,
/** @var string|null */
public ?string $BookingAgreements=null,
/** @var CompanyBookingSettings|null */
public ?CompanyBookingSettings $BookingSettings=null,
/** @var CompanySystemSettings|null */
public ?CompanySystemSettings $SystemSettings=null,
/** @var CompanyWidgetSettings|null */
public ?CompanyWidgetSettings $WidgetSettings=null,
/** @var HomepageSettingsResponse|null */
public ?HomepageSettingsResponse $HomepageSettings=null,
/** @var CompanyRatingSummary|null */
public ?CompanyRatingSummary $RatingSummary=null,
/** @var array<RatingReviewResponse>|null */
public ?array $Reviews=null,
/** @var array<CustomFieldConfigData>|null */
public ?array $CustomerCustomFields=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['OrganisationNumber'])) $this->OrganisationNumber = $o['OrganisationNumber'];
if (isset($o['TypeId'])) $this->TypeId = $o['TypeId'];
if (isset($o['Details'])) $this->Details = $o['Details'];
if (isset($o['CategoryId'])) $this->CategoryId = $o['CategoryId'];
if (isset($o['Category'])) $this->Category = $o['Category'];
if (isset($o['LogoType'])) $this->LogoType = JsonConverters::from('string', $o['LogoType']);
if (isset($o['CoverImage'])) $this->CoverImage = JsonConverters::from('string', $o['CoverImage']);
if (isset($o['Street1'])) $this->Street1 = $o['Street1'];
if (isset($o['Street2'])) $this->Street2 = $o['Street2'];
if (isset($o['ZipCode'])) $this->ZipCode = $o['ZipCode'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['CountryId'])) $this->CountryId = $o['CountryId'];
if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
if (isset($o['Distance'])) $this->Distance = $o['Distance'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['Homepage'])) $this->Homepage = $o['Homepage'];
if (isset($o['SitePath'])) $this->SitePath = $o['SitePath'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['CodeLockSystem'])) $this->CodeLockSystem = JsonConverters::from('CodeLockSystemType', $o['CodeLockSystem']);
if (isset($o['IsFreeAccount'])) $this->IsFreeAccount = $o['IsFreeAccount'];
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['StatusId'])) $this->StatusId = $o['StatusId'];
if (isset($o['IsFavorite'])) $this->IsFavorite = $o['IsFavorite'];
if (isset($o['BookingAgreements'])) $this->BookingAgreements = $o['BookingAgreements'];
if (isset($o['BookingSettings'])) $this->BookingSettings = JsonConverters::from('CompanyBookingSettings', $o['BookingSettings']);
if (isset($o['SystemSettings'])) $this->SystemSettings = JsonConverters::from('CompanySystemSettings', $o['SystemSettings']);
if (isset($o['WidgetSettings'])) $this->WidgetSettings = JsonConverters::from('CompanyWidgetSettings', $o['WidgetSettings']);
if (isset($o['HomepageSettings'])) $this->HomepageSettings = JsonConverters::from('HomepageSettingsResponse', $o['HomepageSettings']);
if (isset($o['RatingSummary'])) $this->RatingSummary = JsonConverters::from('CompanyRatingSummary', $o['RatingSummary']);
if (isset($o['Reviews'])) $this->Reviews = JsonConverters::fromArray('RatingReviewResponse', $o['Reviews']);
if (isset($o['CustomerCustomFields'])) $this->CustomerCustomFields = JsonConverters::fromArray('CustomFieldConfigData', $o['CustomerCustomFields']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->OrganisationNumber)) $o['OrganisationNumber'] = $this->OrganisationNumber;
if (isset($this->TypeId)) $o['TypeId'] = $this->TypeId;
if (isset($this->Details)) $o['Details'] = $this->Details;
if (isset($this->CategoryId)) $o['CategoryId'] = $this->CategoryId;
if (isset($this->Category)) $o['Category'] = $this->Category;
if (isset($this->LogoType)) $o['LogoType'] = JsonConverters::to('string', $this->LogoType);
if (isset($this->CoverImage)) $o['CoverImage'] = JsonConverters::to('string', $this->CoverImage);
if (isset($this->Street1)) $o['Street1'] = $this->Street1;
if (isset($this->Street2)) $o['Street2'] = $this->Street2;
if (isset($this->ZipCode)) $o['ZipCode'] = $this->ZipCode;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->CountryId)) $o['CountryId'] = $this->CountryId;
if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
if (isset($this->Distance)) $o['Distance'] = $this->Distance;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->Homepage)) $o['Homepage'] = $this->Homepage;
if (isset($this->SitePath)) $o['SitePath'] = $this->SitePath;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->CodeLockSystem)) $o['CodeLockSystem'] = JsonConverters::to('CodeLockSystemType', $this->CodeLockSystem);
if (isset($this->IsFreeAccount)) $o['IsFreeAccount'] = $this->IsFreeAccount;
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->StatusId)) $o['StatusId'] = $this->StatusId;
if (isset($this->IsFavorite)) $o['IsFavorite'] = $this->IsFavorite;
if (isset($this->BookingAgreements)) $o['BookingAgreements'] = $this->BookingAgreements;
if (isset($this->BookingSettings)) $o['BookingSettings'] = JsonConverters::to('CompanyBookingSettings', $this->BookingSettings);
if (isset($this->SystemSettings)) $o['SystemSettings'] = JsonConverters::to('CompanySystemSettings', $this->SystemSettings);
if (isset($this->WidgetSettings)) $o['WidgetSettings'] = JsonConverters::to('CompanyWidgetSettings', $this->WidgetSettings);
if (isset($this->HomepageSettings)) $o['HomepageSettings'] = JsonConverters::to('HomepageSettingsResponse', $this->HomepageSettings);
if (isset($this->RatingSummary)) $o['RatingSummary'] = JsonConverters::to('CompanyRatingSummary', $this->RatingSummary);
if (isset($this->Reviews)) $o['Reviews'] = JsonConverters::toArray('RatingReviewResponse', $this->Reviews);
if (isset($this->CustomerCustomFields)) $o['CustomerCustomFields'] = JsonConverters::toArray('CustomFieldConfigData', $this->CustomerCustomFields);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class CreateCompanyCompanyUser implements JsonSerializable
{
public function __construct(
// @ApiMember(IsRequired=true)
/** @var string */
public string $Firstname='',
// @ApiMember(IsRequired=true)
/** @var string */
public string $Lastname='',
// @ApiMember(IsRequired=true)
/** @var string */
public string $Phone='',
// @ApiMember(IsRequired=true)
/** @var string */
public string $Email='',
// @ApiMember()
/** @var int|null */
public ?int $WorkerId=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['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['WorkerId'])) $this->WorkerId = $o['WorkerId'];
}
/** @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->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->WorkerId)) $o['WorkerId'] = $this->WorkerId;
return empty($o) ? new class(){} : $o;
}
}
class CreateCompanyBillingInformation implements JsonSerializable
{
public function __construct(
/** @description The prefered billing method. */
// @ApiMember(Description="The prefered billing method.", IsRequired=true)
/** @var int */
public int $BillingMethodId=0,
/** @description The name that should be printed on the billing information, normally this would be your company name. */
// @ApiMember(Description="The name that should be printed on the billing information, normally this would be your company name.")
/** @var string|null */
public ?string $Name=null,
/** @description If you want to add the attention to the billing address. */
// @ApiMember(Description="If you want to add the attention to the billing address.")
/** @var string|null */
public ?string $Attention=null,
/** @description The street for the billing adress. This is required when having postal invoice as billing method. */
// @ApiMember(Description="The street for the billing adress. This is required when having postal invoice as billing method.")
/** @var string|null */
public ?string $Street1=null,
/** @description The street for the billing adress. */
// @ApiMember(Description="The street for the billing adress.")
/** @var string|null */
public ?string $Street2=null,
/** @description The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method. */
// @ApiMember(Description="The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.")
/** @var string|null */
public ?string $ZipCode=null,
/** @description The city for the billing adress. This is required when having postal invoice as billing method. */
// @ApiMember(Description="The city for the billing adress. This is required when having postal invoice as billing method.")
/** @var string|null */
public ?string $City=null,
/** @description The country for the billing adress. This is required when having postal invoice as billing method. */
// @ApiMember(Description="The country for the billing adress. This is required when having postal invoice as billing method.")
/** @var string|null */
public ?string $CountryId=null,
/** @description The billing email. This is required when having email invoice as billing method. */
// @ApiMember(Description="The billing email. This is required when having email invoice as billing method.")
/** @var string|null */
public ?string $Email=null,
/** @description The billing payment terms in days. This is default 15 days. */
// @ApiMember(Description="The billing payment terms in days. This is default 15 days.")
/** @var int|null */
public ?int $PaymentTermsDays=null,
/** @description The company vat registration number. */
// @ApiMember(Description="The company vat registration number.")
/** @var string|null */
public ?string $VatRegistrationNumber=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['BillingMethodId'])) $this->BillingMethodId = $o['BillingMethodId'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Attention'])) $this->Attention = $o['Attention'];
if (isset($o['Street1'])) $this->Street1 = $o['Street1'];
if (isset($o['Street2'])) $this->Street2 = $o['Street2'];
if (isset($o['ZipCode'])) $this->ZipCode = $o['ZipCode'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['CountryId'])) $this->CountryId = $o['CountryId'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['PaymentTermsDays'])) $this->PaymentTermsDays = $o['PaymentTermsDays'];
if (isset($o['VatRegistrationNumber'])) $this->VatRegistrationNumber = $o['VatRegistrationNumber'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->BillingMethodId)) $o['BillingMethodId'] = $this->BillingMethodId;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Attention)) $o['Attention'] = $this->Attention;
if (isset($this->Street1)) $o['Street1'] = $this->Street1;
if (isset($this->Street2)) $o['Street2'] = $this->Street2;
if (isset($this->ZipCode)) $o['ZipCode'] = $this->ZipCode;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->CountryId)) $o['CountryId'] = $this->CountryId;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->PaymentTermsDays)) $o['PaymentTermsDays'] = $this->PaymentTermsDays;
if (isset($this->VatRegistrationNumber)) $o['VatRegistrationNumber'] = $this->VatRegistrationNumber;
return empty($o) ? new class(){} : $o;
}
}
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
class CreateCompany implements JsonSerializable
{
public function __construct(
/** @description */
// @ApiMember(DataType="string", Description="", IsRequired=true)
/** @var string */
public string $Name='',
/** @description */
// @ApiMember(DataType="string", Description="", IsRequired=true)
/** @var string */
public string $OrganisationNumber='',
/** @description What type of company. If it's used for personal use or as a company. 1 = Company use, 2 = Personal use */
// @ApiMember(DataType="int", Description="What type of company. If it's used for personal use or as a company. 1 = Company use, 2 = Personal use", IsRequired=true)
/** @var int */
public int $TypeId=0,
/** @description What company owner. 1 = BokaMera (default) */
// @ApiMember(DataType="int", Description="What company owner. 1 = BokaMera (default)", IsRequired=true)
/** @var int */
public int $CompanyOwnerId=0,
/** @description */
// @ApiMember(DataType="string", Description="", IsRequired=true)
/** @var string */
public string $OpeningHours='',
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $Details=null,
/** @description */
// @ApiMember(DataType="string", Description="", IsRequired=true)
/** @var int */
public int $CategoryId=0,
/** @description */
// @ApiMember(DataType="uri", Description="", IsRequired=true)
/** @var string */
public string $LogoType='',
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $Street1=null,
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $Street2=null,
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $ZipCode=null,
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $City=null,
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $CountryId=null,
/** @description */
// @ApiMember(DataType="string", Description="", IsRequired=true)
/** @var string */
public string $Longitude='',
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $Latitude=null,
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $Phone=null,
/** @description */
// @ApiMember(DataType="string", Description="", IsRequired=true)
/** @var string */
public string $Email='',
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $Fax=null,
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $Homepage=null,
/** @description */
// @ApiMember(DataType="string", Description="", IsRequired=true)
/** @var string */
public string $SitePath='',
/** @description */
// @ApiMember(Description="", IsRequired=true)
/** @var CreateCompanyCompanyUser|null */
public ?CreateCompanyCompanyUser $CompanyUser=null,
/** @var CreateCompanyBillingInformation|null */
public ?CreateCompanyBillingInformation $BillingInformation=null,
/** @description Id of the license type. If none is set it's free license */
// @ApiMember(Description="Id of the license type. If none is set it's free license", IsRequired=true)
/** @var int */
public int $LicenseTypeId=0,
/** @description */
// @ApiMember(DataType="string", Description="")
/** @var string|null */
public ?string $DomainName=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['OrganisationNumber'])) $this->OrganisationNumber = $o['OrganisationNumber'];
if (isset($o['TypeId'])) $this->TypeId = $o['TypeId'];
if (isset($o['CompanyOwnerId'])) $this->CompanyOwnerId = $o['CompanyOwnerId'];
if (isset($o['OpeningHours'])) $this->OpeningHours = $o['OpeningHours'];
if (isset($o['Details'])) $this->Details = $o['Details'];
if (isset($o['CategoryId'])) $this->CategoryId = $o['CategoryId'];
if (isset($o['LogoType'])) $this->LogoType = JsonConverters::from('string', $o['LogoType']);
if (isset($o['Street1'])) $this->Street1 = $o['Street1'];
if (isset($o['Street2'])) $this->Street2 = $o['Street2'];
if (isset($o['ZipCode'])) $this->ZipCode = $o['ZipCode'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['CountryId'])) $this->CountryId = $o['CountryId'];
if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['Fax'])) $this->Fax = $o['Fax'];
if (isset($o['Homepage'])) $this->Homepage = $o['Homepage'];
if (isset($o['SitePath'])) $this->SitePath = $o['SitePath'];
if (isset($o['CompanyUser'])) $this->CompanyUser = JsonConverters::from('CreateCompanyCompanyUser', $o['CompanyUser']);
if (isset($o['BillingInformation'])) $this->BillingInformation = JsonConverters::from('CreateCompanyBillingInformation', $o['BillingInformation']);
if (isset($o['LicenseTypeId'])) $this->LicenseTypeId = $o['LicenseTypeId'];
if (isset($o['DomainName'])) $this->DomainName = $o['DomainName'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->OrganisationNumber)) $o['OrganisationNumber'] = $this->OrganisationNumber;
if (isset($this->TypeId)) $o['TypeId'] = $this->TypeId;
if (isset($this->CompanyOwnerId)) $o['CompanyOwnerId'] = $this->CompanyOwnerId;
if (isset($this->OpeningHours)) $o['OpeningHours'] = $this->OpeningHours;
if (isset($this->Details)) $o['Details'] = $this->Details;
if (isset($this->CategoryId)) $o['CategoryId'] = $this->CategoryId;
if (isset($this->LogoType)) $o['LogoType'] = JsonConverters::to('string', $this->LogoType);
if (isset($this->Street1)) $o['Street1'] = $this->Street1;
if (isset($this->Street2)) $o['Street2'] = $this->Street2;
if (isset($this->ZipCode)) $o['ZipCode'] = $this->ZipCode;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->CountryId)) $o['CountryId'] = $this->CountryId;
if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->Fax)) $o['Fax'] = $this->Fax;
if (isset($this->Homepage)) $o['Homepage'] = $this->Homepage;
if (isset($this->SitePath)) $o['SitePath'] = $this->SitePath;
if (isset($this->CompanyUser)) $o['CompanyUser'] = JsonConverters::to('CreateCompanyCompanyUser', $this->CompanyUser);
if (isset($this->BillingInformation)) $o['BillingInformation'] = JsonConverters::to('CreateCompanyBillingInformation', $this->BillingInformation);
if (isset($this->LicenseTypeId)) $o['LicenseTypeId'] = $this->LicenseTypeId;
if (isset($this->DomainName)) $o['DomainName'] = $this->DomainName;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /companies/ HTTP/1.1
Host: testapi.bokamera.se
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Name":"String","OrganisationNumber":"String","TypeId":0,"CompanyOwnerId":0,"OpeningHours":"String","Details":"String","CategoryId":0,"Street1":"String","Street2":"String","ZipCode":"String","City":"String","CountryId":"String","Longitude":"String","Latitude":"String","Phone":"String","Email":"String","Fax":"String","Homepage":"String","SitePath":"String","CompanyUser":{"Firstname":"String","Lastname":"String","Phone":"String","Email":"String","WorkerId":0},"BillingInformation":{"BillingMethodId":0,"Name":"String","Attention":"String","Street1":"String","Street2":"String","ZipCode":"String","City":"String","CountryId":"String","Email":"String","PaymentTermsDays":0,"VatRegistrationNumber":"String"},"LicenseTypeId":0,"DomainName":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Name":"String","OrganisationNumber":"String","TypeId":0,"Details":"String","CategoryId":0,"Category":"String","Street1":"String","Street2":"String","ZipCode":"String","City":"String","CountryId":"String","Longitude":"String","Latitude":"String","Distance":0,"Phone":"String","Email":"String","Homepage":"String","SitePath":"String","Active":false,"CodeLockSystem":"Sample","IsFreeAccount":false,"Updated":"0001-01-01T00:00:00","Created":"0001-01-01T00:00:00","StatusId":0,"IsFavorite":false,"BookingAgreements":"String","BookingSettings":{"EnableMobileApp":false,"BookingReceiptMessage":"String","ShowFreeTimesLeft":false,"EnableShowBookedTimes":false,"BookingAgreement":"String","WeekNumberSetting":0,"ShowBookedTimes":false,"PaymentProviderId":0,"BookOnlyOnExistingCustomers":false,"PaymentEnabled":false},"SystemSettings":{"Active":false,"InactiveMessage":"String","Searchable":false,"GATrackingId":"String","GoogleAdsConversionId":"String","LinkedinTagId":"String","GoogleAdsConversionLabel":"String","GTMTrackingId":"String","FacebookPixelId":"String","MultiLanguage":false,"ShowOnMarketplace":false,"EnableAPITranslation":false,"DefaultLanguage":"String"},"WidgetSettings":{"ServiceLayoutId":0,"TimeLayoutId":0,"BookingLayoutId":0,"PrimaryColor":"String","ShowServiceImage":false,"ShowRebateCodeField":false,"ShowNextAvailableTime":false,"ShowEndTime":false,"BookedTimeSlotText":"String","DarkTheme":false},"HomepageSettings":{"HomepageHeading":"String","WelcomePageHeading":"String","WelcomePageBody":"String","AboutUsPageHeading":"String","AboutUsPageBody":"String","ShowRating":false,"HomePageTemplateId":0,"HeroSectionStyleId":0,"EnableHomepage":false},"RatingSummary":{"AverageScore":0,"RatingScore1Count":0,"RatingScore2Count":0,"RatingScore3Count":0,"RaingScore4Count":0,"RatingScore5Count":0,"Count":0},"Reviews":[{"Title":"String","Description":"String","RatingScore":0,"Author":"String","ReviewAnswer":"String"}],"CustomerCustomFields":[{"Id":0,"Name":"String","Description":"String","Width":0,"DataType":"String","DefaultValue":"String","IsMandatory":false,"MandatoryErrorMessage":"String","MaxLength":0,"MultipleLineText":false,"RegEx":"String","RegExErrorMessage":"String","Values":[{"Value":"String"}]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}