Skip to content

Commit 7b10a2a

Browse files
authored
Add Update Drops Entitlements endpoint (#138)
1 parent eff567c commit 7b10a2a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Resources/EntitlementsApi.php

+14
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,20 @@ public function getDropsEntitlements(string $bearer, string $id = null, string $
7070
return $this->getApi('entitlements/drops', $bearer, $queryParamsMap);
7171
}
7272

73+
/**
74+
* @throws GuzzleException
75+
* @link https://dev.twitch.tv/docs/api/reference#update-drops-entitlements
76+
*/
77+
public function updateDropsEntitlements(string $bearer, array $entitlement_ids = null, string $fulfillment_status = null): ResponseInterface
78+
{
79+
$bodyParamsMap = [];
80+
81+
$bodyParamsMap[] = ['key' => 'entitlement_ids', 'value' => $entitlement_ids];
82+
$bodyParamsMap[] = ['key' => 'fulfillment_status', 'value' => $fulfillment_status];
83+
84+
return $this->patchApi('entitlements/drops', $bearer, [], $bodyParamsMap);
85+
}
86+
7387
/**
7488
* @throws GuzzleException
7589
* @link https://dev.twitch.tv/docs/api/reference#redeem-code

0 commit comments

Comments
 (0)