Commit 3543942c authored by 王源's avatar 王源 🎧

Merge branch 'shopify' into test

parents ac44eeed 5f5dbb1d
...@@ -13,6 +13,9 @@ use Meibuyu\Micro\Shopify\lib\AbstractShopify; ...@@ -13,6 +13,9 @@ 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\InventoryItem;
use Meibuyu\Micro\Shopify\lib\InventoryLevel;
use Meibuyu\Micro\Shopify\lib\Location;
use Meibuyu\Micro\Shopify\lib\Metafield; use Meibuyu\Micro\Shopify\lib\Metafield;
use Meibuyu\Micro\Shopify\lib\Product; use Meibuyu\Micro\Shopify\lib\Product;
use Meibuyu\Micro\Shopify\lib\ProductVariant; use Meibuyu\Micro\Shopify\lib\ProductVariant;
...@@ -31,6 +34,9 @@ use Meibuyu\Micro\Shopify\lib\Webhook; ...@@ -31,6 +34,9 @@ use Meibuyu\Micro\Shopify\lib\Webhook;
* @property-read Metafield $Metafield * @property-read Metafield $Metafield
* @property-read Product $Product * @property-read Product $Product
* @property-read ProductVariant $ProductVariant * @property-read ProductVariant $ProductVariant
* @property-read InventoryItem $InventoryItem
* @property-read InventoryLevel $InventoryLevel
* @property-read Location $Location
* *
* @method Webhook Webhook(integer $id = null) * @method Webhook Webhook(integer $id = null)
* @method Collection Collection(integer $id = null) * @method Collection Collection(integer $id = null)
...@@ -39,6 +45,9 @@ use Meibuyu\Micro\Shopify\lib\Webhook; ...@@ -39,6 +45,9 @@ use Meibuyu\Micro\Shopify\lib\Webhook;
* @method Metafield Metafield(integer $id = null) * @method Metafield Metafield(integer $id = null)
* @method Product Product(integer $id = null) * @method Product Product(integer $id = null)
* @method ProductVariant ProductVariant(integer $id = null) * @method ProductVariant ProductVariant(integer $id = null)
* @method InventoryItem InventoryItem(integer $id = null)
* @method InventoryLevel InventoryLevel(integer $id = null)
* @method Location Location(integer $id = null)
* *
*/ */
class ShopifyApp class ShopifyApp
...@@ -53,6 +62,9 @@ class ShopifyApp ...@@ -53,6 +62,9 @@ class ShopifyApp
'Metafield', 'Metafield',
'Product', 'Product',
'ProductVariant', 'ProductVariant',
'InventoryItem',
'InventoryLevel',
'Location',
]; ];
protected $childResources = array( protected $childResources = array(
......
<?php
/**
* Created by PhpStorm.
* User: Zero
* Date: 2020/9/23
* Time: 8:58
*/
namespace Meibuyu\Micro\Shopify\lib;
class InventoryItem extends AbstractShopify
{
protected $resourceKey = 'inventory_item';
}
<?php
/**
* Created by PhpStorm.
* User: Zero
* Date: 2020/9/23
* Time: 8:58
*/
namespace Meibuyu\Micro\Shopify\lib;
/**
* Class InventoryLevel
* @package Meibuyu\Micro\Shopify\lib
*
* @method array adjust($data) Adjust inventory level.
* @method array connect($data) Connect an inventory item to a location.
* @method array set($data) Sets an inventory level for a single inventory item within a location.
*/
class InventoryLevel extends AbstractShopify
{
protected $resourceKey = 'inventory_level';
protected $customPostActions = [
'adjust',
'connect',
'set',
];
}
<?php
/**
* Created by PhpStorm.
* User: Zero
* Date: 2020/9/23
* Time: 8:58
*/
namespace Meibuyu\Micro\Shopify\lib;
/**
* Class Location
* @package Meibuyu\Micro\Shopify\lib
*/
class Location extends AbstractShopify
{
protected $resourceKey = 'location';
protected $childResource = [
'InventoryLevel',
];
}
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