From 909464e92f081c9b768cd0b87b0c982703b83b8b Mon Sep 17 00:00:00 2001 From: Seth Battis Date: Sat, 17 Feb 2024 15:56:45 -0500 Subject: [PATCH] now with request bodies --- src/SKY/OneRoster/Endpoints/categories.php | 7 +++-- src/SKY/OneRoster/Endpoints/lineItems.php | 7 +++-- src/SKY/OneRoster/Endpoints/results.php | 7 +++-- .../v1/academics/sections/students.php | 9 ++++-- .../Endpoints/v1/admissions/candidates.php | 7 +++-- .../Endpoints/v1/athletics/locations.php | 8 +++-- .../Endpoints/v1/athletics/opponents.php | 8 +++-- .../School/Endpoints/v1/athletics/result.php | 7 +++-- .../Endpoints/v1/athletics/teams/schedule.php | 14 ++++++--- .../v1/athletics/teams/schedule/practice.php | 14 ++++++--- src/SKY/School/Endpoints/v1/attendance.php | 8 +++-- .../School/Endpoints/v1/events/categories.php | 7 +++-- .../School/Endpoints/v1/medical/allergies.php | 15 +++++++--- .../v1/medical/allergiesconditions.php | 8 +++-- .../v1/medical/athleticclearance.php | 8 +++-- .../Endpoints/v1/medical/conditions.php | 15 +++++++--- .../Endpoints/v1/medical/immunizations.php | 8 +++-- .../Endpoints/v1/medical/medications.php | 15 +++++++--- src/SKY/School/Endpoints/v1/testscores.php | 6 ++-- src/SKY/School/Endpoints/v1/users.php | 16 +++++++--- .../School/Endpoints/v1/users/addresses.php | 14 ++++++--- .../Endpoints/v1/users/addresses/share.php | 7 +++-- .../Endpoints/v1/users/customfields.php | 16 +++++++--- .../Endpoints/v1/users/customfields/list_.php | 30 +++++++++++-------- .../School/Endpoints/v1/users/education.php | 14 ++++++--- .../v1/users/emergencycontacts/nonuser.php | 7 +++-- .../v1/users/emergencycontacts/user.php | 7 +++-- src/SKY/School/Endpoints/v1/users/enroll.php | 7 +++-- .../School/Endpoints/v1/users/occupations.php | 14 ++++++--- src/SKY/School/Endpoints/v1/users/phones.php | 14 ++++++--- .../Endpoints/v1/users/phones/share.php | 7 +++-- .../Endpoints/v1/users/relationships.php | 7 +++-- 32 files changed, 242 insertions(+), 96 deletions(-) diff --git a/src/SKY/OneRoster/Endpoints/categories.php b/src/SKY/OneRoster/Endpoints/categories.php index f2e8cda1..1dcbc36a 100644 --- a/src/SKY/OneRoster/Endpoints/categories.php +++ b/src/SKY/OneRoster/Endpoints/categories.php @@ -4,6 +4,7 @@ use Battis\OpenAPI\Client\BaseEndpoint; use Blackbaud\SKY\OneRoster\Objects\CategoriesOutputModel; +use Blackbaud\SKY\OneRoster\Objects\CategoryInputModel; use Blackbaud\SKY\OneRoster\Objects\CategoryOutputModel; /** @@ -48,13 +49,15 @@ public function get(array $params) * * @param array{id: string} $params An associative array * - id: sourcedId for the category + * @param Blackbaud\SKY\OneRoster\Objects\CategoryInputModel $requestBody + * input model for a category * * @return \Blackbaud\SKY\OneRoster\Objects\CategoryOutputModel * * @api */ - public function put(array $params) + public function put(array $params, CategoryInputModel $requestBody) { - return new CategoryOutputModel($this->send("put", ["{id}" => $params["id"]], [])); + return new CategoryOutputModel($this->send("put", ["{id}" => $params["id"]], [], $requestBody)); } } diff --git a/src/SKY/OneRoster/Endpoints/lineItems.php b/src/SKY/OneRoster/Endpoints/lineItems.php index 43bbf042..04454296 100644 --- a/src/SKY/OneRoster/Endpoints/lineItems.php +++ b/src/SKY/OneRoster/Endpoints/lineItems.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\OneRoster\Endpoints; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\OneRoster\Objects\LineItemInputModel; use Blackbaud\SKY\OneRoster\Objects\LineItemOutputModel; use Blackbaud\SKY\OneRoster\Objects\LineItemsOutputModel; @@ -48,13 +49,15 @@ public function get(array $params) * * @param array{id: string} $params An associative array * - id: sourcedId for the lineItem + * @param Blackbaud\SKY\OneRoster\Objects\LineItemInputModel $requestBody + * input model for the lineItem * * @return \Blackbaud\SKY\OneRoster\Objects\LineItemOutputModel * * @api */ - public function put(array $params) + public function put(array $params, LineItemInputModel $requestBody) { - return new LineItemOutputModel($this->send("put", ["{id}" => $params["id"]], [])); + return new LineItemOutputModel($this->send("put", ["{id}" => $params["id"]], [], $requestBody)); } } diff --git a/src/SKY/OneRoster/Endpoints/results.php b/src/SKY/OneRoster/Endpoints/results.php index d1e5fbaf..a661de79 100644 --- a/src/SKY/OneRoster/Endpoints/results.php +++ b/src/SKY/OneRoster/Endpoints/results.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\OneRoster\Endpoints; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\OneRoster\Objects\ResultInputModelSvc; use Blackbaud\SKY\OneRoster\Objects\ResultOutputModelSvc; use Blackbaud\SKY\OneRoster\Objects\ResultsOutputModelSvc; @@ -48,14 +49,16 @@ public function get(array $params) * * @param array{id: string} $params An associative array * - id: sourcedId for the result + * @param Blackbaud\SKY\OneRoster\Objects\ResultInputModelSvc $requestBody + * input model for the result * * @return \Blackbaud\SKY\OneRoster\Objects\ResultOutputModelSvc * * @api */ - public function put(array $params) + public function put(array $params, ResultInputModelSvc $requestBody) { - return new ResultOutputModelSvc($this->send("put", ["{id}" => $params["id"]], [])); + return new ResultOutputModelSvc($this->send("put", ["{id}" => $params["id"]], [], $requestBody)); } /** diff --git a/src/SKY/School/Endpoints/v1/academics/sections/students.php b/src/SKY/School/Endpoints/v1/academics/sections/students.php index 57ef539e..9fb414c8 100644 --- a/src/SKY/School/Endpoints/v1/academics/sections/students.php +++ b/src/SKY/School/Endpoints/v1/academics/sections/students.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\academics\sections; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\BulkEnrollment; use Blackbaud\SKY\School\Objects\PostResponse; use Blackbaud\SKY\School\Objects\StudentCollection; @@ -53,12 +54,16 @@ public function getBySection(array $params) * * - Schedule Manager * + * @param Blackbaud\SKY\School\Objects\BulkEnrollment $requestBody Defines + * which users (students and/or teachers) should be added to which + * offerings (via ```section_id``` and duration ```id```) + * * @return \Blackbaud\SKY\School\Objects\PostResponse * * @api */ - public function post() + public function post(BulkEnrollment $requestBody) { - return new PostResponse($this->send("post", [], [])); + return new PostResponse($this->send("post", [], [], $requestBody)); } } diff --git a/src/SKY/School/Endpoints/v1/admissions/candidates.php b/src/SKY/School/Endpoints/v1/admissions/candidates.php index 55e4e050..ad869016 100644 --- a/src/SKY/School/Endpoints/v1/admissions/candidates.php +++ b/src/SKY/School/Endpoints/v1/admissions/candidates.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\admissions; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\CandidateCreate; use Blackbaud\SKY\School\Objects\CandidateReadCollection; /** @@ -70,12 +71,14 @@ public function filterBy(array $params = []) * * - Admissions Staff * + * @param Blackbaud\SKY\School\Objects\CandidateCreate $requestBody + * * @return \int * * @api */ - public function post() + public function post(CandidateCreate $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/athletics/locations.php b/src/SKY/School/Endpoints/v1/athletics/locations.php index 408a54ed..e0b5b7ad 100644 --- a/src/SKY/School/Endpoints/v1/athletics/locations.php +++ b/src/SKY/School/Endpoints/v1/athletics/locations.php @@ -4,6 +4,7 @@ use Battis\OpenAPI\Client\BaseEndpoint; use Blackbaud\SKY\School\Objects\LocationCollection; +use Blackbaud\SKY\School\Objects\LocationCreateModel; /** * @api @@ -59,12 +60,15 @@ public function getAll() * * - Pending Coach * + * @param Blackbaud\SKY\School\Objects\LocationCreateModel $requestBody + * The location to be created + * * @return \int * * @api */ - public function post() + public function post(LocationCreateModel $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/athletics/opponents.php b/src/SKY/School/Endpoints/v1/athletics/opponents.php index 329b26fb..d84e0ff8 100644 --- a/src/SKY/School/Endpoints/v1/athletics/opponents.php +++ b/src/SKY/School/Endpoints/v1/athletics/opponents.php @@ -4,6 +4,7 @@ use Battis\OpenAPI\Client\BaseEndpoint; use Blackbaud\SKY\School\Objects\OpponentFlyweightCollection; +use Blackbaud\SKY\School\Objects\OpponentUpdateModel; /** * @api @@ -58,12 +59,15 @@ public function getAll() * * - Pending Coach * + * @param Blackbaud\SKY\School\Objects\OpponentUpdateModel $requestBody + * The opponent to be created + * * @return \int * * @api */ - public function post() + public function post(OpponentUpdateModel $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/athletics/result.php b/src/SKY/School/Endpoints/v1/athletics/result.php index 7c19eed0..ee263601 100644 --- a/src/SKY/School/Endpoints/v1/athletics/result.php +++ b/src/SKY/School/Endpoints/v1/athletics/result.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\athletics; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\ResultCreate; /** * @api @@ -32,12 +33,14 @@ class result extends BaseEndpoint * * - Pending Coach * + * @param Blackbaud\SKY\School\Objects\ResultCreate $requestBody + * * @return \void * * @api */ - public function post() + public function post(ResultCreate $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/athletics/teams/schedule.php b/src/SKY/School/Endpoints/v1/athletics/teams/schedule.php index 3bb48daf..a0d48136 100644 --- a/src/SKY/School/Endpoints/v1/athletics/teams/schedule.php +++ b/src/SKY/School/Endpoints/v1/athletics/teams/schedule.php @@ -3,6 +3,8 @@ namespace Blackbaud\SKY\School\Endpoints\v1\athletics\teams; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\GameCreate; +use Blackbaud\SKY\School\Objects\GameUpdate; /** * @api @@ -33,14 +35,16 @@ class schedule extends BaseEndpoint * @param array{team_id: int} $params An associative array * - team_id: Format - int32. ID of the team for the game to be * created + * @param Blackbaud\SKY\School\Objects\GameCreate $requestBody Information + * about the game to be created * * @return \int * * @api */ - public function postByTeam(array $params) + public function postByTeam(array $params, GameCreate $requestBody) { - return $this->send("post", ["{team_id}" => $params["team_id"]], []); + return $this->send("post", ["{team_id}" => $params["team_id"]], [], $requestBody); } /** @@ -63,14 +67,16 @@ public function postByTeam(array $params) * @param array{team_id: int} $params An associative array * - team_id: Format - int32. ID of the team for the game to be * updated + * @param Blackbaud\SKY\School\Objects\GameUpdate $requestBody Information + * for the game to be updated * * @return \void * * @api */ - public function patchByTeam(array $params) + public function patchByTeam(array $params, GameUpdate $requestBody) { - return $this->send("patch", ["{team_id}" => $params["team_id"]], []); + return $this->send("patch", ["{team_id}" => $params["team_id"]], [], $requestBody); } /** diff --git a/src/SKY/School/Endpoints/v1/athletics/teams/schedule/practice.php b/src/SKY/School/Endpoints/v1/athletics/teams/schedule/practice.php index 55004ea3..433c3314 100644 --- a/src/SKY/School/Endpoints/v1/athletics/teams/schedule/practice.php +++ b/src/SKY/School/Endpoints/v1/athletics/teams/schedule/practice.php @@ -3,6 +3,8 @@ namespace Blackbaud\SKY\School\Endpoints\v1\athletics\teams\schedule; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\PracticeCreate; +use Blackbaud\SKY\School\Objects\PracticeUpdate; /** * @api @@ -27,14 +29,16 @@ class practice extends BaseEndpoint * @param array{team_id: int} $params An associative array * - team_id: Format - int32. ID of the team for the practice to be * created + * @param Blackbaud\SKY\School\Objects\PracticeCreate $requestBody + * Information about the practice to be created * * @return \int * * @api */ - public function postByTeam(array $params) + public function postByTeam(array $params, PracticeCreate $requestBody) { - return $this->send("post", ["{team_id}" => $params["team_id"]], []); + return $this->send("post", ["{team_id}" => $params["team_id"]], [], $requestBody); } /** @@ -49,14 +53,16 @@ public function postByTeam(array $params) * @param array{team_id: int} $params An associative array * - team_id: Format - int32. The ID of the team for the practice to * be updated + * @param Blackbaud\SKY\School\Objects\PracticeUpdate $requestBody + * Information about the practice to be updated * * @return \void * * @api */ - public function patchByTeam(array $params) + public function patchByTeam(array $params, PracticeUpdate $requestBody) { - return $this->send("patch", ["{team_id}" => $params["team_id"]], []); + return $this->send("patch", ["{team_id}" => $params["team_id"]], [], $requestBody); } /** diff --git a/src/SKY/School/Endpoints/v1/attendance.php b/src/SKY/School/Endpoints/v1/attendance.php index 0d6cf3f9..b0452d60 100644 --- a/src/SKY/School/Endpoints/v1/attendance.php +++ b/src/SKY/School/Endpoints/v1/attendance.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\AttendanceCreate; use Blackbaud\SKY\School\Objects\AttendanceGetCollection; /** @@ -59,12 +60,15 @@ public function filterBy(array $params) * * - Attendance Manager * + * @param Blackbaud\SKY\School\Objects\AttendanceCreate $requestBody + * Information about the attendance report + * * @return \void * * @api */ - public function post() + public function post(AttendanceCreate $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/events/categories.php b/src/SKY/School/Endpoints/v1/events/categories.php index bdfc6780..710e55f0 100644 --- a/src/SKY/School/Endpoints/v1/events/categories.php +++ b/src/SKY/School/Endpoints/v1/events/categories.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\events; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\EventCategory; use Blackbaud\SKY\School\Objects\EventCategoryCollection; use Blackbaud\SKY\School\Objects\EventCategoryCreateResponseExample; @@ -50,13 +51,15 @@ public function filterBy(array $params = []) * * + * @param Blackbaud\SKY\School\Objects\EventCategory $requestBody + * * @return \Blackbaud\SKY\School\Objects\EventCategoryCreateResponseExample * * @api */ - public function post() + public function post(EventCategory $requestBody) { - return new EventCategoryCreateResponseExample($this->send("post", [], [])); + return new EventCategoryCreateResponseExample($this->send("post", [], [], $requestBody)); } } diff --git a/src/SKY/School/Endpoints/v1/medical/allergies.php b/src/SKY/School/Endpoints/v1/medical/allergies.php index aafc92c4..a05f235b 100644 --- a/src/SKY/School/Endpoints/v1/medical/allergies.php +++ b/src/SKY/School/Endpoints/v1/medical/allergies.php @@ -3,6 +3,8 @@ namespace Blackbaud\SKY\School\Endpoints\v1\medical; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\StudentAllergyUpdate; +use Blackbaud\SKY\School\Objects\StudentMedicalAllergy; /** * @api @@ -48,14 +50,16 @@ public function delete(array $params) * * @param array{allergy_id: int} $params An associative array * - allergy_id: Format - int32. The ID of the student's allergy. + * @param Blackbaud\SKY\School\Objects\StudentAllergyUpdate $requestBody + * The allergy changes * * @return \int * * @api */ - public function patch(array $params) + public function patch(array $params, StudentAllergyUpdate $requestBody) { - return $this->send("patch", ["{allergy_id}" => $params["allergy_id"]], []); + return $this->send("patch", ["{allergy_id}" => $params["allergy_id"]], [], $requestBody); } /** @@ -70,12 +74,15 @@ public function patch(array $params) * ***This endpoint is in BETA. It may be removed or replaced with a 90 * day deprecation period.*** * + * @param Blackbaud\SKY\School\Objects\StudentMedicalAllergy $requestBody + * The medical allergy to be created for student + * * @return \int * * @api */ - public function post() + public function post(StudentMedicalAllergy $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/medical/allergiesconditions.php b/src/SKY/School/Endpoints/v1/medical/allergiesconditions.php index 71429abc..c897eca0 100644 --- a/src/SKY/School/Endpoints/v1/medical/allergiesconditions.php +++ b/src/SKY/School/Endpoints/v1/medical/allergiesconditions.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\medical; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\StudentMedicalAllergyCondition; /** * @api @@ -26,12 +27,15 @@ class allergiesconditions extends BaseEndpoint * ***This endpoint is in BETA. It may be removed or replaced with a 90 * day deprecation period.*** * + * @param Blackbaud\SKY\School\Objects\StudentMedicalAllergyCondition + * $requestBody The medical allergy/condition to be created for student + * * @return \int * * @api */ - public function post() + public function post(StudentMedicalAllergyCondition $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/medical/athleticclearance.php b/src/SKY/School/Endpoints/v1/medical/athleticclearance.php index 20b091f9..c87a96a9 100644 --- a/src/SKY/School/Endpoints/v1/medical/athleticclearance.php +++ b/src/SKY/School/Endpoints/v1/medical/athleticclearance.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\medical; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\StudentAthleticRequirementUpdate; /** * @api @@ -24,12 +25,15 @@ class athleticclearance extends BaseEndpoint * ***This endpoint is in BETA. It may be removed or replaced with a 90 * day deprecation period.*** * + * @param Blackbaud\SKY\School\Objects\StudentAthleticRequirementUpdate + * $requestBody The athletics requirements to update + * * @return \string[] * * @api */ - public function post() + public function post(StudentAthleticRequirementUpdate $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/medical/conditions.php b/src/SKY/School/Endpoints/v1/medical/conditions.php index 722606dd..de6a38be 100644 --- a/src/SKY/School/Endpoints/v1/medical/conditions.php +++ b/src/SKY/School/Endpoints/v1/medical/conditions.php @@ -3,6 +3,8 @@ namespace Blackbaud\SKY\School\Endpoints\v1\medical; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\StudentConditionUpdate; +use Blackbaud\SKY\School\Objects\StudentMedicalCondition; /** * @api @@ -48,14 +50,16 @@ public function delete(array $params) * * @param array{condition_id: int} $params An associative array * - condition_id: Format - int32. The ID of the student's condition. + * @param Blackbaud\SKY\School\Objects\StudentConditionUpdate $requestBody + * The condition changes * * @return \int * * @api */ - public function patch(array $params) + public function patch(array $params, StudentConditionUpdate $requestBody) { - return $this->send("patch", ["{condition_id}" => $params["condition_id"]], []); + return $this->send("patch", ["{condition_id}" => $params["condition_id"]], [], $requestBody); } /** @@ -70,12 +74,15 @@ public function patch(array $params) * ***This endpoint is in BETA. It may be removed or replaced with a 90 * day deprecation period.*** * + * @param Blackbaud\SKY\School\Objects\StudentMedicalCondition + * $requestBody The medical condition to be created for student + * * @return \int * * @api */ - public function post() + public function post(StudentMedicalCondition $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/medical/immunizations.php b/src/SKY/School/Endpoints/v1/medical/immunizations.php index 31aaafc9..78a0c90d 100644 --- a/src/SKY/School/Endpoints/v1/medical/immunizations.php +++ b/src/SKY/School/Endpoints/v1/medical/immunizations.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\medical; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\StudentImmunizationUpdate; /** * @api @@ -24,12 +25,15 @@ class immunizations extends BaseEndpoint * ***This endpoint is in BETA. It may be removed or replaced with a 90 * day deprecation period.*** * + * @param Blackbaud\SKY\School\Objects\StudentImmunizationUpdate + * $requestBody The immunizations to update + * * @return \void * * @api */ - public function post() + public function post(StudentImmunizationUpdate $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/medical/medications.php b/src/SKY/School/Endpoints/v1/medical/medications.php index f4d2d7e0..ee5464f3 100644 --- a/src/SKY/School/Endpoints/v1/medical/medications.php +++ b/src/SKY/School/Endpoints/v1/medical/medications.php @@ -3,6 +3,8 @@ namespace Blackbaud\SKY\School\Endpoints\v1\medical; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\StudentMedicationCreate; +use Blackbaud\SKY\School\Objects\StudentMedicationUpdate; /** * @api @@ -26,13 +28,16 @@ class medications extends BaseEndpoint * ***This endpoint is in BETA. It may be removed or replaced with a 90 * day deprecation period.*** * + * @param Blackbaud\SKY\School\Objects\StudentMedicationCreate + * $requestBody The medication to be created for student + * * @return \int * * @api */ - public function post() + public function post(StudentMedicationCreate $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } /** @@ -70,13 +75,15 @@ public function delete(array $params) * * @param array{medication_id: int} $params An associative array * - medication_id: Format - int32. >The student medication ID + * @param Blackbaud\SKY\School\Objects\StudentMedicationUpdate + * $requestBody The medication changes to update * * @return \int * * @api */ - public function patch(array $params) + public function patch(array $params, StudentMedicationUpdate $requestBody) { - return $this->send("patch", ["{medication_id}" => $params["medication_id"]], []); + return $this->send("patch", ["{medication_id}" => $params["medication_id"]], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/testscores.php b/src/SKY/School/Endpoints/v1/testscores.php index f5917909..c55eb2d5 100644 --- a/src/SKY/School/Endpoints/v1/testscores.php +++ b/src/SKY/School/Endpoints/v1/testscores.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\TestScoreAdd; use Blackbaud\SKY\School\Objects\TestScoreCollection; /** @@ -43,13 +44,14 @@ public function filterBy(array $params = []) * * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The ID of the user. + * @param Blackbaud\SKY\School\Objects\TestScoreAdd $requestBody * * @return \int * * @api */ - public function post(array $params) + public function post(array $params, TestScoreAdd $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/users.php b/src/SKY/School/Endpoints/v1/users.php index a7825a14..f36a47c6 100644 --- a/src/SKY/School/Endpoints/v1/users.php +++ b/src/SKY/School/Endpoints/v1/users.php @@ -3,6 +3,8 @@ namespace Blackbaud\SKY\School\Endpoints\v1; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\UserAdd; +use Blackbaud\SKY\School\Objects\UserEdit; use Blackbaud\SKY\School\Objects\UserRead; use Blackbaud\SKY\School\Objects\UserReadCollection; @@ -81,13 +83,16 @@ public function filterBy(array $params) * * - Contact Card Manager * + * @param Blackbaud\SKY\School\Objects\UserAdd $requestBody The user to be + * created + * * @return \int * * @api */ - public function post() + public function post(UserAdd $requestBody) { - return $this->send("post", [], []); + return $this->send("post", [], [], $requestBody); } /** @@ -102,13 +107,16 @@ public function post() * * - Contact Card Manager * + * @param Blackbaud\SKY\School\Objects\UserEdit $requestBody User + * information to be updated + * * @return \int * * @api */ - public function patch() + public function patch(UserEdit $requestBody) { - return $this->send("patch", [], []); + return $this->send("patch", [], [], $requestBody); } /** diff --git a/src/SKY/School/Endpoints/v1/users/addresses.php b/src/SKY/School/Endpoints/v1/users/addresses.php index d1cddbeb..30edca1f 100644 --- a/src/SKY/School/Endpoints/v1/users/addresses.php +++ b/src/SKY/School/Endpoints/v1/users/addresses.php @@ -3,6 +3,8 @@ namespace Blackbaud\SKY\School\Endpoints\v1\users; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\AddressAdd; +use Blackbaud\SKY\School\Objects\AddressEdit; use Blackbaud\SKY\School\Objects\AddressReadCollection; /** @@ -49,14 +51,16 @@ public function getByUser(array $params) * * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The ID of the user. + * @param Blackbaud\SKY\School\Objects\AddressAdd $requestBody Address + * information to be updated. * * @return \int * * @api */ - public function postByUser(array $params) + public function postByUser(array $params, AddressAdd $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } /** @@ -75,15 +79,17 @@ public function postByUser(array $params) * array * - user_id: Format - int32. The ID of the user. * - address_id: Format - int32. The ID of the address to be updated. + * @param Blackbaud\SKY\School\Objects\AddressEdit $requestBody Address + * information to be updated. * * @return \int * * @api */ - public function patchByUser(array $params) + public function patchByUser(array $params, AddressEdit $requestBody) { return $this->send("patch", ["{user_id}" => $params["user_id"], - "{address_id}" => $params["address_id"]], []); + "{address_id}" => $params["address_id"]], [], $requestBody); } /** diff --git a/src/SKY/School/Endpoints/v1/users/addresses/share.php b/src/SKY/School/Endpoints/v1/users/addresses/share.php index 448b8fd9..ad72128d 100644 --- a/src/SKY/School/Endpoints/v1/users/addresses/share.php +++ b/src/SKY/School/Endpoints/v1/users/addresses/share.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\users\addresses; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\AddressShare; /** * @api @@ -34,13 +35,15 @@ class share extends BaseEndpoint * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The Id of the user the existing address * should be shared. + * @param Blackbaud\SKY\School\Objects\AddressShare $requestBody The + * details about the address that should be shared with the user. * * @return \int * * @api */ - public function postByUser(array $params) + public function postByUser(array $params, AddressShare $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/users/customfields.php b/src/SKY/School/Endpoints/v1/users/customfields.php index 1c051549..ecb57703 100644 --- a/src/SKY/School/Endpoints/v1/users/customfields.php +++ b/src/SKY/School/Endpoints/v1/users/customfields.php @@ -5,6 +5,8 @@ use Battis\OpenAPI\Client\BaseEndpoint; use Blackbaud\SKY\School\Objects\UserAdminCustomField; use Blackbaud\SKY\School\Objects\UserAdminCustomFieldCollection; +use Blackbaud\SKY\School\Objects\UserAdminCustomFieldCreate; +use Blackbaud\SKY\School\Objects\UserAdminCustomFieldUpdate; /** * @api @@ -93,14 +95,17 @@ public function getByUser(array $params) * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The Id of the user to create a custom * field for + * @param Blackbaud\SKY\School\Objects\UserAdminCustomFieldCreate + * $requestBody Object that describes the custom field that will be + * created. * * @return \bool * * @api */ - public function postByUser(array $params) + public function postByUser(array $params, UserAdminCustomFieldCreate $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } /** @@ -114,13 +119,16 @@ public function postByUser(array $params) * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The Id of the user to update an existing * custom field for. + * @param Blackbaud\SKY\School\Objects\UserAdminCustomFieldUpdate + * $requestBody Object that describes the custom field that should be + * updated. * * @return \bool * * @api */ - public function patchByUser(array $params) + public function patchByUser(array $params, UserAdminCustomFieldUpdate $requestBody) { - return $this->send("patch", ["{user_id}" => $params["user_id"]], []); + return $this->send("patch", ["{user_id}" => $params["user_id"]], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/users/customfields/list_.php b/src/SKY/School/Endpoints/v1/users/customfields/list_.php index 3d9782ae..3dff513f 100644 --- a/src/SKY/School/Endpoints/v1/users/customfields/list_.php +++ b/src/SKY/School/Endpoints/v1/users/customfields/list_.php @@ -12,14 +12,14 @@ class list_ extends BaseEndpoint /** * @var string url */ - protected static string $url = "https://api.sky.blackbaud.com/school/v1/users/{user_id}/customfields/list"; +protected static string $url = "https://api.sky.blackbaud.com/school/v1/users/{user_id}/customfields/list"; /** - * Creates a list of admin custom field for a user. + * Creates a list of admin custom field for a user. * * Does not create any of the ten default custom fields, every user has * those fields created for them by default. To update those fields see - * User Custom Field Values Update. + * User Custom Field Values Update. * * Requires at least one of the following roles in the Education * Management system: @@ -32,18 +32,21 @@ class list_ extends BaseEndpoint * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The Id of the user to create a custom * field for + * @param \Blackbaud\SKY\School\Objects\UserAdminCustomFieldCreate[] + * $requestBody Object that describes the list of custom fields that will + * be created for the user. * * @return \bool * * @api */ - public function postByUser(array $params) - { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); - } +public function postByUser(array $params, UserAdminCustomFieldCreate[] $requestBody) +{ +return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); +} /** - * Updates a list of admin custom field for a user. + * Updates a list of admin custom field for a user. * * Requires at least one of the following roles in the Education * Management system: @@ -53,13 +56,16 @@ public function postByUser(array $params) * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The Id of the user to update an existing * custom field for. + * @param \Blackbaud\SKY\School\Objects\UserAdminCustomFieldUpdate[] + * $requestBody Object that describes the custom field that should be + * updated. * * @return \bool * * @api */ - public function patchByUser(array $params) - { - return $this->send("patch", ["{user_id}" => $params["user_id"]], []); - } +public function patchByUser(array $params, UserAdminCustomFieldUpdate[] $requestBody) +{ +return $this->send("patch", ["{user_id}" => $params["user_id"]], [], $requestBody); +} } diff --git a/src/SKY/School/Endpoints/v1/users/education.php b/src/SKY/School/Endpoints/v1/users/education.php index 89f026b7..f17e82af 100644 --- a/src/SKY/School/Endpoints/v1/users/education.php +++ b/src/SKY/School/Endpoints/v1/users/education.php @@ -3,7 +3,9 @@ namespace Blackbaud\SKY\School\Endpoints\v1\users; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\EducationAdd; use Blackbaud\SKY\School\Objects\EducationReadCollection; +use Blackbaud\SKY\School\Objects\EducationUpdate; /** * @api @@ -53,14 +55,16 @@ public function getByUser(array $params) * * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The ID of the user. + * @param Blackbaud\SKY\School\Objects\EducationAdd $requestBody The + * education model. * * @return \int * * @api */ - public function postByUser(array $params) + public function postByUser(array $params, EducationAdd $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } /** @@ -112,14 +116,16 @@ public function deleteByUser(array $params) * array * - user_id: Format - int32. The ID of the user. * - education_id: Format - int32. The ID of the education. + * @param Blackbaud\SKY\School\Objects\EducationUpdate $requestBody The + * education model. * * @return \int * * @api */ - public function patchByUser(array $params) + public function patchByUser(array $params, EducationUpdate $requestBody) { return $this->send("patch", ["{user_id}" => $params["user_id"], - "{education_id}" => $params["education_id"]], []); + "{education_id}" => $params["education_id"]], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/users/emergencycontacts/nonuser.php b/src/SKY/School/Endpoints/v1/users/emergencycontacts/nonuser.php index 7c41793a..64cf6c7f 100644 --- a/src/SKY/School/Endpoints/v1/users/emergencycontacts/nonuser.php +++ b/src/SKY/School/Endpoints/v1/users/emergencycontacts/nonuser.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\users\emergencycontacts; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\EmergencyContactNonUserCreate; /** * @api @@ -24,13 +25,15 @@ class nonuser extends BaseEndpoint * * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The ID of the user. + * @param Blackbaud\SKY\School\Objects\EmergencyContactNonUserCreate + * $requestBody * * @return \void * * @api */ - public function postByUser(array $params) + public function postByUser(array $params, EmergencyContactNonUserCreate $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/users/emergencycontacts/user.php b/src/SKY/School/Endpoints/v1/users/emergencycontacts/user.php index f38d24fa..8eaa6cee 100644 --- a/src/SKY/School/Endpoints/v1/users/emergencycontacts/user.php +++ b/src/SKY/School/Endpoints/v1/users/emergencycontacts/user.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\users\emergencycontacts; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\EmergencyContactUserCreate; /** * @api @@ -29,13 +30,15 @@ class user extends BaseEndpoint * * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The ID of the user. + * @param Blackbaud\SKY\School\Objects\EmergencyContactUserCreate + * $requestBody * * @return \void * * @api */ - public function postByUser(array $params) + public function postByUser(array $params, EmergencyContactUserCreate $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/users/enroll.php b/src/SKY/School/Endpoints/v1/users/enroll.php index caf9582e..cfab53be 100644 --- a/src/SKY/School/Endpoints/v1/users/enroll.php +++ b/src/SKY/School/Endpoints/v1/users/enroll.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\users; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\UserEnrollmentCreate; use Blackbaud\SKY\School\Objects\UserEnrollmentResponse; /** @@ -23,12 +24,14 @@ class enroll extends BaseEndpoint * * - SKY API Data Sync * + * @param Blackbaud\SKY\School\Objects\UserEnrollmentCreate $requestBody + * * @return \Blackbaud\SKY\School\Objects\UserEnrollmentResponse * * @api */ - public function post() + public function post(UserEnrollmentCreate $requestBody) { - return new UserEnrollmentResponse($this->send("post", [], [])); + return new UserEnrollmentResponse($this->send("post", [], [], $requestBody)); } } diff --git a/src/SKY/School/Endpoints/v1/users/occupations.php b/src/SKY/School/Endpoints/v1/users/occupations.php index 14075f31..c2a4ea7b 100644 --- a/src/SKY/School/Endpoints/v1/users/occupations.php +++ b/src/SKY/School/Endpoints/v1/users/occupations.php @@ -3,7 +3,9 @@ namespace Blackbaud\SKY\School\Endpoints\v1\users; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\OccupationCreate; use Blackbaud\SKY\School\Objects\OccupationReadCollection; +use Blackbaud\SKY\School\Objects\OccupationUpdate; /** * @api @@ -51,14 +53,16 @@ public function getByUser(array $params) * * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The ID of the user. + * @param Blackbaud\SKY\School\Objects\OccupationCreate $requestBody The + * occupation information to be created. * * @return \int * * @api */ - public function postByUser(array $params) + public function postByUser(array $params, OccupationCreate $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } /** @@ -110,14 +114,16 @@ public function deleteByUser(array $params) * array * - user_id: Format - int32. The ID of the user. * - occupation_id: Format - int32. The ID of the occupation. + * @param Blackbaud\SKY\School\Objects\OccupationUpdate $requestBody The + * occupation information to be updated. * * @return \int * * @api */ - public function patchByUser(array $params) + public function patchByUser(array $params, OccupationUpdate $requestBody) { return $this->send("patch", ["{user_id}" => $params["user_id"], - "{occupation_id}" => $params["occupation_id"]], []); + "{occupation_id}" => $params["occupation_id"]], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/users/phones.php b/src/SKY/School/Endpoints/v1/users/phones.php index a525c774..40b4e15c 100644 --- a/src/SKY/School/Endpoints/v1/users/phones.php +++ b/src/SKY/School/Endpoints/v1/users/phones.php @@ -3,7 +3,9 @@ namespace Blackbaud\SKY\School\Endpoints\v1\users; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\PhoneAdd; use Blackbaud\SKY\School\Objects\PhoneReadCollection; +use Blackbaud\SKY\School\Objects\PhoneUpdate; /** * @api @@ -44,14 +46,16 @@ public function getByUser(array $params) * * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The ID of the user. + * @param Blackbaud\SKY\School\Objects\PhoneAdd $requestBody The phone + * information to be created. * * @return \int * * @api */ - public function postByUser(array $params) + public function postByUser(array $params, PhoneAdd $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } /** @@ -100,14 +104,16 @@ public function deleteByUserAndPhone(array $params) * - phone_id: Format - int32. The phone id to be updated. * - split_phone_if_shared: (Optional) Set to true if phone number is * shared + * @param Blackbaud\SKY\School\Objects\PhoneUpdate $requestBody The phone + * information to be updated. * * @return \int * * @api */ - public function patchByUser(array $params) + public function patchByUser(array $params, PhoneUpdate $requestBody) { return $this->send("patch", ["{user_id}" => $params["user_id"], - "{phone_id}" => $params["phone_id"]], ["split_phone_if_shared" => $params["split_phone_if_shared"]]); + "{phone_id}" => $params["phone_id"]], ["split_phone_if_shared" => $params["split_phone_if_shared"]], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/users/phones/share.php b/src/SKY/School/Endpoints/v1/users/phones/share.php index ecd68599..c918ba57 100644 --- a/src/SKY/School/Endpoints/v1/users/phones/share.php +++ b/src/SKY/School/Endpoints/v1/users/phones/share.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\users\phones; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\PhoneShare; /** * @api @@ -34,13 +35,15 @@ class share extends BaseEndpoint * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The Id of the user the existing address * should be shared. + * @param Blackbaud\SKY\School\Objects\PhoneShare $requestBody The details + * about the phone number that should be shared with the user. * * @return \int * * @api */ - public function postByUser(array $params) + public function postByUser(array $params, PhoneShare $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } } diff --git a/src/SKY/School/Endpoints/v1/users/relationships.php b/src/SKY/School/Endpoints/v1/users/relationships.php index 6f610ef2..10da48da 100644 --- a/src/SKY/School/Endpoints/v1/users/relationships.php +++ b/src/SKY/School/Endpoints/v1/users/relationships.php @@ -3,6 +3,7 @@ namespace Blackbaud\SKY\School\Endpoints\v1\users; use Battis\OpenAPI\Client\BaseEndpoint; +use Blackbaud\SKY\School\Objects\RelationshipCreate; use Blackbaud\SKY\School\Objects\RelationshipReadCollection; /** @@ -58,14 +59,16 @@ public function getByUser(array $params) * * @param array{user_id: int} $params An associative array * - user_id: Format - int32. The ID of the user. + * @param Blackbaud\SKY\School\Objects\RelationshipCreate $requestBody + * Defines the relationship to be created. * * @return \void * * @api */ - public function postByUser(array $params) + public function postByUser(array $params, RelationshipCreate $requestBody) { - return $this->send("post", ["{user_id}" => $params["user_id"]], []); + return $this->send("post", ["{user_id}" => $params["user_id"]], [], $requestBody); } /**