-
Notifications
You must be signed in to change notification settings - Fork 212
/
Copy pathGiftCardAdjustment.php
40 lines (32 loc) · 1.02 KB
/
GiftCardAdjustment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* Created by PhpStorm.
* @author Tareq Mahmood <tareqtms@yahoo.com>
* Created at: 8/21/16 8:39 AM UTC+06:00
*
* @see https://shopify.dev/docs/api/admin-rest/2023-01/resources/gift-card-adjustment Shopify API Reference for Gift Card Adjustment
* @note - requires gift_card_adjustments access scope enabled by Shopify Support
*
* @usage:
*
$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'
]);
*/
namespace PHPShopify;
class GiftCardAdjustment extends ShopifyResource
{
/**
* @inheritDoc
*/
protected $resourceKey = 'adjustment';
}