Commit eebb7d56 authored by 王源's avatar 王源 🎧

shopify底层库添加发货相关文件

parent 14e7c9fd
...@@ -13,6 +13,8 @@ use Meibuyu\Micro\Shopify\lib\AbstractShopify; ...@@ -13,6 +13,8 @@ use Meibuyu\Micro\Shopify\lib\AbstractShopify;
use Meibuyu\Micro\Shopify\lib\Collect; use Meibuyu\Micro\Shopify\lib\Collect;
use Meibuyu\Micro\Shopify\lib\Collection; use Meibuyu\Micro\Shopify\lib\Collection;
use Meibuyu\Micro\Shopify\lib\CustomCollection; use Meibuyu\Micro\Shopify\lib\CustomCollection;
use Meibuyu\Micro\Shopify\lib\Event;
use Meibuyu\Micro\Shopify\lib\FulfillmentService;
use Meibuyu\Micro\Shopify\lib\InventoryItem; use Meibuyu\Micro\Shopify\lib\InventoryItem;
use Meibuyu\Micro\Shopify\lib\InventoryLevel; use Meibuyu\Micro\Shopify\lib\InventoryLevel;
use Meibuyu\Micro\Shopify\lib\Location; use Meibuyu\Micro\Shopify\lib\Location;
...@@ -39,6 +41,8 @@ use Meibuyu\Micro\Shopify\lib\Webhook; ...@@ -39,6 +41,8 @@ use Meibuyu\Micro\Shopify\lib\Webhook;
* @property-read InventoryLevel $InventoryLevel * @property-read InventoryLevel $InventoryLevel
* @property-read Location $Location * @property-read Location $Location
* @property-read Order $Order * @property-read Order $Order
* @property-read Event $Event
* @property-read FulfillmentService $FulfillmentService
* *
* @method Webhook Webhook(integer $id = null) * @method Webhook Webhook(integer $id = null)
* @method Collection Collection(integer $id = null) * @method Collection Collection(integer $id = null)
...@@ -51,6 +55,8 @@ use Meibuyu\Micro\Shopify\lib\Webhook; ...@@ -51,6 +55,8 @@ use Meibuyu\Micro\Shopify\lib\Webhook;
* @method InventoryLevel InventoryLevel(integer $id = null) * @method InventoryLevel InventoryLevel(integer $id = null)
* @method Location Location(integer $id = null) * @method Location Location(integer $id = null)
* @method Order Order(integer $id = null) * @method Order Order(integer $id = null)
* @method Event Event(integer $id = null)
* @method FulfillmentService FulfillmentService(integer $id = null)
* *
*/ */
class ShopifyApp class ShopifyApp
...@@ -69,6 +75,8 @@ class ShopifyApp ...@@ -69,6 +75,8 @@ class ShopifyApp
'InventoryLevel', 'InventoryLevel',
'Location', 'Location',
'Order', 'Order',
'Event',
'FulfillmentService',
]; ];
protected $childResources = array( protected $childResources = array(
......
<?php
/**
* Created by PhpStorm.
* User: Zero
* Date: 2020/9/2
* Time: 16:50
*/
namespace Meibuyu\Micro\Shopify\lib;
/**
* Class Event
* @package Meibuyu\Micro\Shopify\lib
*/
class Event extends AbstractShopify
{
protected $resourceKey = 'event';
}
<?php
/**
* Created by PhpStorm.
* User: Zero
* Date: 2020/9/2
* Time: 16:50
*/
namespace Meibuyu\Micro\Shopify\lib;
/**
* Class Fulfillment
* @package Meibuyu\Micro\Shopify\lib
*
* @property-read Event $Event
*
* @method Event Event(integer $id = null)
*
* @method array complete() Complete a fulfillment
* @method array open() Open a pending fulfillment
* @method array cancel() Cancel a fulfillment
*/
class Fulfillment extends AbstractShopify
{
protected $resourceKey = 'fulfillment';
protected $childResource = [
'FulfillmentEvent' => 'Event',
];
protected $customPostActions = [
'complete',
'open',
'cancel',
];
}
<?php
/**
* Created by PhpStorm.
* User: Zero
* Date: 2020/9/2
* Time: 16:50
*/
namespace Meibuyu\Micro\Shopify\lib;
/**
* Class FulfillmentEvent
* @package Meibuyu\Micro\Shopify\lib
*/
class FulfillmentEvent extends AbstractShopify
{
protected $resourceKey = 'event';
}
<?php
/**
* Created by PhpStorm.
* User: Zero
* Date: 2020/9/2
* Time: 16:50
*/
namespace Meibuyu\Micro\Shopify\lib;
/**
* Class FulfillmentService
* @package Meibuyu\Micro\Shopify\lib
*/
class FulfillmentService extends AbstractShopify
{
protected $resourceKey = 'fulfillment_service';
public $countEnabled = false;
}
...@@ -12,6 +12,12 @@ namespace Meibuyu\Micro\Shopify\lib; ...@@ -12,6 +12,12 @@ namespace Meibuyu\Micro\Shopify\lib;
* Class Order * Class Order
* @package Meibuyu\Micro\Shopify\lib * @package Meibuyu\Micro\Shopify\lib
* *
* @property-read Fulfillment $Fulfillment
* @property-read Event $Event
*
* @method Fulfillment Fulfillment(integer $id = null)
* @method Event Event(integer $id = null)
*
* @method array close() Close an Order * @method array close() Close an Order
* @method array open() Re-open a closed Order * @method array open() Re-open a closed Order
* @method array cancel(array $data) Cancel an Order * @method array cancel(array $data) Cancel an Order
...@@ -21,6 +27,11 @@ class Order extends AbstractShopify ...@@ -21,6 +27,11 @@ class Order extends AbstractShopify
protected $resourceKey = 'order'; protected $resourceKey = 'order';
protected $childResource = [
'Fulfillment',
'Event',
];
protected $customPostActions = [ protected $customPostActions = [
'close', 'close',
'open', 'open',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment