Loading src/Service/Interfaces/Product/ShopifyServiceInterface.php 0 → 100644 +23 −0 Original line number Diff line number Diff line <?php /** * Created by PhpStorm. * User: Zero * Date: 2020/10/12 * Time: 9:39 */ namespace Meibuyu\Micro\Service\Interfaces\Product; interface ShopifyServiceInterface { /** * 拉取一个shopify订单数据 * @param $orderId * @param $shopifySiteId * @return array * @throws \Exception */ public function pullOrder($orderId, $shopifySiteId): array; } src/Shopify/ShopifyApp.php +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ use Meibuyu\Micro\Shopify\lib\InventoryItem; use Meibuyu\Micro\Shopify\lib\InventoryLevel; use Meibuyu\Micro\Shopify\lib\Location; use Meibuyu\Micro\Shopify\lib\Metafield; use Meibuyu\Micro\Shopify\lib\Order; use Meibuyu\Micro\Shopify\lib\Product; use Meibuyu\Micro\Shopify\lib\ProductVariant; use Meibuyu\Micro\Shopify\lib\SmartCollection; Loading @@ -37,6 +38,7 @@ use Meibuyu\Micro\Shopify\lib\Webhook; * @property-read InventoryItem $InventoryItem * @property-read InventoryLevel $InventoryLevel * @property-read Location $Location * @property-read Order $Order * * @method Webhook Webhook(integer $id = null) * @method Collection Collection(integer $id = null) Loading @@ -48,6 +50,7 @@ use Meibuyu\Micro\Shopify\lib\Webhook; * @method InventoryItem InventoryItem(integer $id = null) * @method InventoryLevel InventoryLevel(integer $id = null) * @method Location Location(integer $id = null) * @method Order Order(integer $id = null) * */ class ShopifyApp Loading @@ -65,6 +68,7 @@ class ShopifyApp 'InventoryItem', 'InventoryLevel', 'Location', 'Order', ]; protected $childResources = array( Loading src/Shopify/lib/Order.php 0 → 100644 +30 −0 Original line number Diff line number Diff line <?php /** * Created by PhpStorm. * User: Zero * Date: 2020/9/2 * Time: 16:50 */ namespace Meibuyu\Micro\Shopify\lib; /** * Class Order * @package Meibuyu\Micro\Shopify\lib * * @method array close() Close an Order * @method array open() Re-open a closed Order * @method array cancel(array $data) Cancel an Order */ class Order extends AbstractShopify { protected $resourceKey = 'order'; protected $customPostActions = [ 'close', 'open', 'cancel', ]; } Loading
src/Service/Interfaces/Product/ShopifyServiceInterface.php 0 → 100644 +23 −0 Original line number Diff line number Diff line <?php /** * Created by PhpStorm. * User: Zero * Date: 2020/10/12 * Time: 9:39 */ namespace Meibuyu\Micro\Service\Interfaces\Product; interface ShopifyServiceInterface { /** * 拉取一个shopify订单数据 * @param $orderId * @param $shopifySiteId * @return array * @throws \Exception */ public function pullOrder($orderId, $shopifySiteId): array; }
src/Shopify/ShopifyApp.php +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ use Meibuyu\Micro\Shopify\lib\InventoryItem; use Meibuyu\Micro\Shopify\lib\InventoryLevel; use Meibuyu\Micro\Shopify\lib\Location; use Meibuyu\Micro\Shopify\lib\Metafield; use Meibuyu\Micro\Shopify\lib\Order; use Meibuyu\Micro\Shopify\lib\Product; use Meibuyu\Micro\Shopify\lib\ProductVariant; use Meibuyu\Micro\Shopify\lib\SmartCollection; Loading @@ -37,6 +38,7 @@ use Meibuyu\Micro\Shopify\lib\Webhook; * @property-read InventoryItem $InventoryItem * @property-read InventoryLevel $InventoryLevel * @property-read Location $Location * @property-read Order $Order * * @method Webhook Webhook(integer $id = null) * @method Collection Collection(integer $id = null) Loading @@ -48,6 +50,7 @@ use Meibuyu\Micro\Shopify\lib\Webhook; * @method InventoryItem InventoryItem(integer $id = null) * @method InventoryLevel InventoryLevel(integer $id = null) * @method Location Location(integer $id = null) * @method Order Order(integer $id = null) * */ class ShopifyApp Loading @@ -65,6 +68,7 @@ class ShopifyApp 'InventoryItem', 'InventoryLevel', 'Location', 'Order', ]; protected $childResources = array( Loading
src/Shopify/lib/Order.php 0 → 100644 +30 −0 Original line number Diff line number Diff line <?php /** * Created by PhpStorm. * User: Zero * Date: 2020/9/2 * Time: 16:50 */ namespace Meibuyu\Micro\Shopify\lib; /** * Class Order * @package Meibuyu\Micro\Shopify\lib * * @method array close() Close an Order * @method array open() Re-open a closed Order * @method array cancel(array $data) Cancel an Order */ class Order extends AbstractShopify { protected $resourceKey = 'order'; protected $customPostActions = [ 'close', 'open', 'cancel', ]; }