Skip to content

Commit

Permalink
Custom actions for Order
Browse files Browse the repository at this point in the history
  • Loading branch information
tareqtms committed Sep 11, 2016
1 parent 1ca5963 commit 1452794
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,14 @@ The custom methods are specific to some resources which may not be available for
Disable a gift card.
- [search()](https://help.shopify.com/api/reference/gift_card#search)
Search for gift cards matching supplied query

- Order ->
- [close()](https://help.shopify.com/api/reference/order#close)
Close an Order
- [open()](https://help.shopify.com/api/reference/order#open)
Re-open a closed Order
- [cancel($data)](https://help.shopify.com/api/reference/order#cancel)
Cancel an Order

- Order -> Refund ->
- [calculate()](https://help.shopify.com/api/reference/refund#calculate)
Expand Down
16 changes: 16 additions & 0 deletions lib/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
* @method ShopifyResource Event(integer $id = null)
* @method ShopifyResource Metafield(integer $id = null)
*
* --------------------------------------------------------------------------
* Order -> Custom actions
* --------------------------------------------------------------------------
* @method array close() Close an Order
* @method array open() Re-open a closed Order
* @method array cancel($data) Cancel an Order
*
*/
class Order extends ShopifyResource
{
Expand All @@ -48,4 +55,13 @@ class Order extends ShopifyResource
'Event',
'Metafield',
);

/**
* @inheritDoc
*/
protected $customPostActions = array(
'close',
'open',
'cancel',
);
}

0 comments on commit 1452794

Please sign in to comment.