Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Gift Card Adjustment Resource #299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
tareqtms merged 3 commits into phpclassic:master from whobutsb:feature/giftcard-adjustments
Jun 28, 2023

Conversation

Copy link
Contributor

@whobutsb whobutsb commented Jun 27, 2023
edited
Loading

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

$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'
]);

PS - Could you also please consider - #276 😃

@tareqtms tareqtms merged commit c0103f9 into phpclassic:master Jun 28, 2023
Copy link
Contributor

@whobutsb
Regarding #276, Pls check my review comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@tareqtms tareqtms tareqtms approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /