Skip to content

Commit

Permalink
now with request bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
battis committed Feb 17, 2024
1 parent 191f370 commit 909464e
Show file tree
Hide file tree
Showing 32 changed files with 242 additions and 96 deletions.
7 changes: 5 additions & 2 deletions src/SKY/OneRoster/Endpoints/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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));
}
}
7 changes: 5 additions & 2 deletions src/SKY/OneRoster/Endpoints/lineItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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));
}
}
7 changes: 5 additions & 2 deletions src/SKY/OneRoster/Endpoints/results.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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));
}

/**
Expand Down
9 changes: 7 additions & 2 deletions src/SKY/School/Endpoints/v1/academics/sections/students.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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));
}
}
7 changes: 5 additions & 2 deletions src/SKY/School/Endpoints/v1/admissions/candidates.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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);
}
}
8 changes: 6 additions & 2 deletions src/SKY/School/Endpoints/v1/athletics/locations.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Battis\OpenAPI\Client\BaseEndpoint;
use Blackbaud\SKY\School\Objects\LocationCollection;
use Blackbaud\SKY\School\Objects\LocationCreateModel;

/**
* @api
Expand Down Expand Up @@ -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);
}
}
8 changes: 6 additions & 2 deletions src/SKY/School/Endpoints/v1/athletics/opponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Battis\OpenAPI\Client\BaseEndpoint;
use Blackbaud\SKY\School\Objects\OpponentFlyweightCollection;
use Blackbaud\SKY\School\Objects\OpponentUpdateModel;

/**
* @api
Expand Down Expand Up @@ -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);
}
}
7 changes: 5 additions & 2 deletions src/SKY/School/Endpoints/v1/athletics/result.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Blackbaud\SKY\School\Endpoints\v1\athletics;

use Battis\OpenAPI\Client\BaseEndpoint;
use Blackbaud\SKY\School\Objects\ResultCreate;

/**
* @api
Expand Down Expand Up @@ -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);
}
}
14 changes: 10 additions & 4 deletions src/SKY/School/Endpoints/v1/athletics/teams/schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

/**
Expand All @@ -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);
}

/**
Expand Down
14 changes: 10 additions & 4 deletions src/SKY/School/Endpoints/v1/athletics/teams/schedule/practice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}

/**
Expand All @@ -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);
}

/**
Expand Down
8 changes: 6 additions & 2 deletions src/SKY/School/Endpoints/v1/attendance.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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);
}
}
7 changes: 5 additions & 2 deletions src/SKY/School/Endpoints/v1/events/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -50,13 +51,15 @@ public function filterBy(array $params = [])
* <param name="eventCategory"></param><param
* name="cancellationToken"></param>
*
* @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));
}
}
15 changes: 11 additions & 4 deletions src/SKY/School/Endpoints/v1/medical/allergies.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

/**
Expand All @@ -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);
}
}
Loading

0 comments on commit 909464e

Please sign in to comment.