Skip to content

Commit

Permalink
Merge pull request #4 from techouse/master
Browse files Browse the repository at this point in the history
Fix deleteCoOrganizer and resendInvitation and enable posting custom attributes to registrant creation
  • Loading branch information
dalpras authored Sep 3, 2020
2 parents f3ebcd1 + cdd86f5 commit 61e00b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Resources/CoOrganizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function createCoOrganizers($webinarKey, array $body): array
*
* @link https://developer.goto.com/GoToWebinarV2/#operation/deleteCoorganizer
*/
public function deleteCoOrganizer($webinarKey, $coOrganizerKey, bool $external = false): ?array
public function deleteCoOrganizer($webinarKey, $coOrganizerKey, bool $external = false)
{
$organizerKey = (new AccessTokenDecorator($this->accessToken))->getOrganizerKey();

Expand All @@ -86,7 +86,7 @@ public function deleteCoOrganizer($webinarKey, $coOrganizerKey, bool $external =
*
* @link https://developer.goto.com/GoToWebinarV2/#operation/resendCoorganizerInvitation
*/
public function resendInvitation($webinarKey, $coOrganizerKey, bool $external = false): ?array
public function resendInvitation($webinarKey, $coOrganizerKey, bool $external = false)
{
$organizerKey = (new AccessTokenDecorator($this->accessToken))->getOrganizerKey();

Expand Down
3 changes: 3 additions & 0 deletions src/Resources/Registrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ public function getRegistrantByEmail($webinarKey, $email):array {
public function createRegistrant($webinarKey, $body) : array {
$url = $this->provider->domain . '/G2W/rest/v2/organizers/' . (new AccessTokenDecorator($this->accessToken))->getOrganizerKey() . '/webinars/' . $webinarKey . '/registrants';
$request = $this->provider->getAuthenticatedRequest('POST', $url, $this->accessToken, [
'headers' => [
'Accept' => 'application/vnd.citrix.g2wapi-v1.1+json',
],
'body' => json_encode($body)
]);
return $this->provider->getParsedResponse($request);
Expand Down

0 comments on commit 61e00b1

Please sign in to comment.