$config = array(
'ShopUrl' => 'my-store.myshopify.com',
'AccessToken' => 'shpat_999999999999999999999'
);
$shopify = \PHPShopify\ShopifySDK::config($config);
$gift_card_id = 88888888888;
$gift_card_adjustment_id = 999999999999;
// Get all gift card adjustments
$shopify->GiftCard($gift_card_id)->Adjustment()->get();
// Get a single gift card adjustment
$shopify->GiftCard($gift_card_id)->Adjustment($gift_card_adjustment_id)->get();
// Create a gift card adjustment
$shopify->GiftCard($gift_card_id)->Adjustment()->post([
'amount' => 5,
'note' => 'Add $5 to gift card'
]);
Added the Gift Card Adjustment Resource to list adjustments and increment and decrement amounts on gift cards.
This is a Shopify Plus only feature and requires you to contact Shopify Support to enable the
gift_card_adjustments
access scope.API Documentation - https://shopify.dev/docs/api/admin-rest/2023-01/resources/gift-card-adjustment
Usage
PS - Could you also please consider - https://github.com/phpclassic/php-shopify/pull/276 😃