Skip to content

Commit

Permalink
Add Update Drops Entitlements endpoint (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHayman authored Feb 27, 2022
1 parent eff567c commit 7b10a2a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Resources/EntitlementsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ public function getDropsEntitlements(string $bearer, string $id = null, string $
return $this->getApi('entitlements/drops', $bearer, $queryParamsMap);
}

/**
* @throws GuzzleException
* @link https://dev.twitch.tv/docs/api/reference#update-drops-entitlements
*/
public function updateDropsEntitlements(string $bearer, array $entitlement_ids = null, string $fulfillment_status = null): ResponseInterface
{
$bodyParamsMap = [];

$bodyParamsMap[] = ['key' => 'entitlement_ids', 'value' => $entitlement_ids];
$bodyParamsMap[] = ['key' => 'fulfillment_status', 'value' => $fulfillment_status];

return $this->patchApi('entitlements/drops', $bearer, [], $bodyParamsMap);
}

/**
* @throws GuzzleException
* @link https://dev.twitch.tv/docs/api/reference#redeem-code
Expand Down

0 comments on commit 7b10a2a

Please sign in to comment.