Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-micro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
without authentication
meibuyu-micro
Commits
5f5dbb1d
Commit
5f5dbb1d
authored
Sep 23, 2020
by
王源
🎧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加库存相关shopify底层库文件
parent
ac44eeed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
0 deletions
+82
-0
ShopifyApp.php
src/Shopify/ShopifyApp.php
+12
-0
InventoryItem.php
src/Shopify/lib/InventoryItem.php
+16
-0
InventoryLevel.php
src/Shopify/lib/InventoryLevel.php
+30
-0
Location.php
src/Shopify/lib/Location.php
+24
-0
No files found.
src/Shopify/ShopifyApp.php
View file @
5f5dbb1d
...
...
@@ -13,6 +13,9 @@ use Meibuyu\Micro\Shopify\lib\AbstractShopify;
use
Meibuyu\Micro\Shopify\lib\Collect
;
use
Meibuyu\Micro\Shopify\lib\Collection
;
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\Product
;
use
Meibuyu\Micro\Shopify\lib\ProductVariant
;
...
...
@@ -31,6 +34,9 @@ use Meibuyu\Micro\Shopify\lib\Webhook;
* @property-read Metafield $Metafield
* @property-read Product $Product
* @property-read ProductVariant $ProductVariant
* @property-read InventoryItem $InventoryItem
* @property-read InventoryLevel $InventoryLevel
* @property-read Location $Location
*
* @method Webhook Webhook(integer $id = null)
* @method Collection Collection(integer $id = null)
...
...
@@ -39,6 +45,9 @@ use Meibuyu\Micro\Shopify\lib\Webhook;
* @method Metafield Metafield(integer $id = null)
* @method Product Product(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
...
...
@@ -53,6 +62,9 @@ class ShopifyApp
'Metafield'
,
'Product'
,
'ProductVariant'
,
'InventoryItem'
,
'InventoryLevel'
,
'Location'
,
];
protected
$childResources
=
array
(
...
...
src/Shopify/lib/InventoryItem.php
0 → 100644
View file @
5f5dbb1d
<?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'
;
}
src/Shopify/lib/InventoryLevel.php
0 → 100644
View file @
5f5dbb1d
<?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'
,
];
}
src/Shopify/lib/Location.php
0 → 100644
View file @
5f5dbb1d
<?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'
,
];
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment