Ejemplo n.º 1
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->Id = Primitives::WriteInt($obj->Id);
     $dto->FirstName = Primitives::WriteString($obj->FirstName);
     $dto->LastName = Primitives::WriteString($obj->LastName);
     $dto->EmailAddress = Primitives::WriteString($obj->EmailAddress);
     $dto->DateOfBirth = Primitives::WriteLocalDate($obj->DateOfBirth);
     $dto->NationalityId = Primitives::WriteInt($obj->NationalityId);
     $dto->NationalityName = Primitives::WriteString($obj->NationalityName);
     $dto->IsDeleted = Primitives::WriteBoolean($obj->IsDeleted);
     if ($obj->Bookings !== NULL) {
         $tmpArray0 = array();
         $arrayIndex0 = 0;
         foreach ($obj->Bookings as $arrayItem0) {
             if ($arrayItem0 !== NULL) {
                 $tmpArray0[$arrayIndex0] = Booking::Serialize($arrayItem0);
             } else {
                 $tmpArray0[$arrayIndex0] = NULL;
             }
             ++$arrayIndex0;
         }
         $dto->Bookings = $tmpArray0;
     } else {
         $dto->Bookings = NULL;
     }
     return $dto;
 }
Ejemplo n.º 2
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->MinChangeSet = Primitives::WriteInt($obj->MinChangeSet);
     $dto->MaxChangeSet = Primitives::WriteInt($obj->MaxChangeSet);
     return $dto;
 }
Ejemplo n.º 3
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->CentreId = Primitives::WriteInt($obj->CentreId);
     $dto->CentreName = Primitives::WriteString($obj->CentreName);
     $dto->SchoolId = Primitives::WriteInt($obj->SchoolId);
     $dto->SchoolName = Primitives::WriteString($obj->SchoolName);
     $dto->StartDate = Primitives::WriteLocalDate($obj->StartDate);
     $dto->EndDate = Primitives::WriteLocalDate($obj->EndDate);
     $dto->HasArrived = Primitives::WriteBoolean($obj->HasArrived);
     if ($obj->Classes !== NULL) {
         $tmpArray0 = array();
         $arrayIndex0 = 0;
         foreach ($obj->Classes as $arrayItem0) {
             if ($arrayItem0 !== NULL) {
                 $tmpArray0[$arrayIndex0] = ClassAssignment::Serialize($arrayItem0);
             } else {
                 $tmpArray0[$arrayIndex0] = NULL;
             }
             ++$arrayIndex0;
         }
         $dto->Classes = $tmpArray0;
     } else {
         $dto->Classes = NULL;
     }
     return $dto;
 }
Ejemplo n.º 4
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->ClassId = Primitives::WriteInt($obj->ClassId);
     $dto->StartDate = Primitives::WriteLocalDate($obj->StartDate);
     $dto->EndDate = Primitives::WriteLocalDate($obj->EndDate);
     return $dto;
 }
Ejemplo n.º 5
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->IpAddress = Primitives::WriteString($obj->IpAddress);
     $dto->PageUrl = Primitives::WriteString($obj->PageUrl);
     $dto->PageName = Primitives::WriteString($obj->PageName);
     $dto->HubpotTrackingCode = Primitives::WriteString($obj->HubpotTrackingCode);
     return $dto;
 }
Ejemplo n.º 6
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->Id = Primitives::WriteInt($obj->Id);
     $dto->FirstName = Primitives::WriteString($obj->FirstName);
     $dto->LastName = Primitives::WriteString($obj->LastName);
     $dto->EmailAddress = Primitives::WriteString($obj->EmailAddress);
     $dto->CentreId = Primitives::WriteInt($obj->CentreId);
     $dto->CentreName = Primitives::WriteString($obj->CentreName);
     $dto->IsDeleted = Primitives::WriteBoolean($obj->IsDeleted);
     return $dto;
 }
Ejemplo n.º 7
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->Id = Primitives::WriteInt($obj->Id);
     $dto->Name = Primitives::WriteString($obj->Name);
     $dto->ClassLevel = Primitives::WriteString($obj->ClassLevel);
     $dto->ClassType = Primitives::WriteString($obj->ClassType);
     $dto->StartDate = Primitives::WriteLocalDate($obj->StartDate);
     $dto->EndDate = Primitives::WriteLocalDate($obj->EndDate);
     $dto->IsDeleted = Primitives::WriteBoolean($obj->IsDeleted);
     return $dto;
 }
Ejemplo n.º 8
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->BookingId = Primitives::WriteInt($obj->BookingId);
     $dto->StudentId = Primitives::WriteInt($obj->StudentId);
     $dto->TotalLessons = Primitives::WriteInt($obj->TotalLessons);
     $dto->LessonsToDate = Primitives::WriteInt($obj->LessonsToDate);
     $dto->LessonsToDateAbsent = Primitives::WriteInt($obj->LessonsToDateAbsent);
     $dto->TotalLessonMinutes = Primitives::WriteInt($obj->TotalLessonMinutes);
     $dto->LessonMinutesToDate = Primitives::WriteInt($obj->LessonMinutesToDate);
     $dto->LessonMinutesToDateAbsent = Primitives::WriteInt($obj->LessonMinutesToDateAbsent);
     $dto->IsDeleted = Primitives::WriteBoolean($obj->IsDeleted);
     return $dto;
 }
Ejemplo n.º 9
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->Id = Primitives::WriteInt($obj->Id);
     $dto->ClassId = Primitives::WriteInt($obj->ClassId);
     $dto->TeacherId = Primitives::WriteInt($obj->TeacherId);
     $dto->RoomId = Primitives::WriteInt($obj->RoomId);
     $dto->RoomName = Primitives::WriteString($obj->RoomName);
     $dto->Date = Primitives::WriteLocalDate($obj->Date);
     $dto->StartTime = Primitives::WriteLocalTime($obj->StartTime);
     $dto->EndTime = Primitives::WriteLocalTime($obj->EndTime);
     $dto->IsDeleted = Primitives::WriteBoolean($obj->IsDeleted);
     return $dto;
 }
Ejemplo n.º 10
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->Id = Primitives::WriteString($obj->Id);
     $dto->LastName = Primitives::WriteString($obj->LastName);
     $dto->FirstName = Primitives::WriteString($obj->FirstName);
     $dto->Email = Primitives::WriteString($obj->Email);
     if ($obj->StudentDetails !== NULL) {
         $dto->StudentDetails = StudentDetails::Serialize($obj->StudentDetails);
     } else {
         $dto->StudentDetails = NULL;
     }
     if ($obj->AgentUserDetails !== NULL) {
         $dto->AgentUserDetails = AgentUserDetails::Serialize($obj->AgentUserDetails);
     } else {
         $dto->AgentUserDetails = NULL;
     }
     return $dto;
 }
Ejemplo n.º 11
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->FirstName = Primitives::WriteString($obj->FirstName);
     $dto->LastName = Primitives::WriteString($obj->LastName);
     $dto->Email = Primitives::WriteString($obj->Email);
     $dto->PhoneNumber = Primitives::WriteString($obj->PhoneNumber);
     $dto->Nationality = Primitives::WriteString($obj->Nationality);
     $dto->Course = Primitives::WriteString($obj->Course);
     $dto->HowDidYouHearAboutUs = Primitives::WriteString($obj->HowDidYouHearAboutUs);
     $dto->Message = Primitives::WriteString($obj->Message);
     $dto->Locale = Primitives::WriteString($obj->Locale);
     if ($obj->Tracking !== NULL) {
         $dto->Tracking = FormTrackingDto::Serialize($obj->Tracking);
     } else {
         $dto->Tracking = NULL;
     }
     return $dto;
 }
Ejemplo n.º 12
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->Id = Primitives::WriteInt($obj->Id);
     return $dto;
 }
Ejemplo n.º 13
0
 public function testCanWiteOffsetDateTime()
 {
     $dateTime = new \EcEnglish\ApiClient\OffsetDateTime(3600, new DateTime('2015-03-02 13:22:33.876543', new \DateTimeZone('Etc/UTC')));
     $written = Primitives::WriteOffsetDateTime($dateTime);
     $this->assertEquals('2015-03-02T13:22:33.876543+01', $written);
 }
Ejemplo n.º 14
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->Message = Primitives::WriteString($obj->Message);
     return $dto;
 }
Ejemplo n.º 15
0
 public static function Serialize($obj)
 {
     $dto = new \stdClass();
     $dto->Locale = Primitives::WriteString($obj->Locale);
     $dto->FirstName = Primitives::WriteString($obj->FirstName);
     $dto->LastName = Primitives::WriteString($obj->LastName);
     $dto->Gender = Primitives::WriteString($obj->Gender);
     $dto->DateOfBirth = Primitives::WriteLocalDate($obj->DateOfBirth);
     $dto->Nationality = Primitives::WriteString($obj->Nationality);
     $dto->CountryOfResidence = Primitives::WriteString($obj->CountryOfResidence);
     $dto->LevelOfEnglish = Primitives::WriteString($obj->LevelOfEnglish);
     $dto->Email = Primitives::WriteString($obj->Email);
     $dto->PhoneNumber = Primitives::WriteString($obj->PhoneNumber);
     $dto->HowDidYouHearAboutUs = Primitives::WriteString($obj->HowDidYouHearAboutUs);
     $dto->PreferredCentre = Primitives::WriteString($obj->PreferredCentre);
     $dto->Course = Primitives::WriteString($obj->Course);
     $dto->CourseStartDate = Primitives::WriteLocalDate($obj->CourseStartDate);
     $dto->LessonsPerWeek = Primitives::WriteInt($obj->LessonsPerWeek);
     $dto->CourseNumberOfWeeks = Primitives::WriteInt($obj->CourseNumberOfWeeks);
     $dto->Accommodation = Primitives::WriteString($obj->Accommodation);
     $dto->AccommodationRoomOption = Primitives::WriteString($obj->AccommodationRoomOption);
     $dto->AccommodationCateringOption = Primitives::WriteString($obj->AccommodationCateringOption);
     $dto->AccommodationBathroomOption = Primitives::WriteString($obj->AccommodationBathroomOption);
     $dto->AccommodationMiscOption = Primitives::WriteString($obj->AccommodationMiscOption);
     $dto->AccommodationNumberOfWeeks = Primitives::WriteInt($obj->AccommodationNumberOfWeeks);
     if ($obj->Extras !== NULL) {
         $tmpArray0 = array();
         $arrayIndex0 = 0;
         foreach ($obj->Extras as $arrayItem0) {
             $tmpArray0[$arrayIndex0] = Primitives::WriteString($arrayItem0);
             ++$arrayIndex0;
         }
         $dto->Extras = $tmpArray0;
     } else {
         $dto->Extras = NULL;
     }
     $dto->Message = Primitives::WriteString($obj->Message);
     $dto->SpecialRequirements = Primitives::WriteString($obj->SpecialRequirements);
     $dto->AcceptsTerms = Primitives::WriteBoolean($obj->AcceptsTerms);
     if ($obj->Tracking !== NULL) {
         $dto->Tracking = FormTrackingDto::Serialize($obj->Tracking);
     } else {
         $dto->Tracking = NULL;
     }
     return $dto;
 }