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

添加shopify产品相关文件

parent a65a3b1b
...@@ -14,6 +14,8 @@ use Meibuyu\Micro\Shopify\lib\Collect; ...@@ -14,6 +14,8 @@ 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\Metafield; use Meibuyu\Micro\Shopify\lib\Metafield;
use Meibuyu\Micro\Shopify\lib\Product;
use Meibuyu\Micro\Shopify\lib\ProductVariant;
use Meibuyu\Micro\Shopify\lib\SmartCollection; use Meibuyu\Micro\Shopify\lib\SmartCollection;
use Meibuyu\Micro\Shopify\lib\Webhook; use Meibuyu\Micro\Shopify\lib\Webhook;
...@@ -27,12 +29,16 @@ use Meibuyu\Micro\Shopify\lib\Webhook; ...@@ -27,12 +29,16 @@ use Meibuyu\Micro\Shopify\lib\Webhook;
* @property-read CustomCollection $CustomCollection * @property-read CustomCollection $CustomCollection
* @property-read SmartCollection $SmartCollection * @property-read SmartCollection $SmartCollection
* @property-read Metafield $Metafield * @property-read Metafield $Metafield
* @property-read Product $Product
* @property-read ProductVariant $ProductVariant
* *
* @method Webhook Webhook(integer $id = null) * @method Webhook Webhook(integer $id = null)
* @method Collection Collection(integer $id = null) * @method Collection Collection(integer $id = null)
* @method CustomCollection CustomCollection(integer $id = null) * @method CustomCollection CustomCollection(integer $id = null)
* @method SmartCollection SmartCollection(integer $id = null) * @method SmartCollection SmartCollection(integer $id = null)
* @method Metafield Metafield(integer $id = null) * @method Metafield Metafield(integer $id = null)
* @method Product Product(integer $id = null)
* @method ProductVariant ProductVariant(integer $id = null)
* *
*/ */
class ShopifyApp class ShopifyApp
...@@ -45,6 +51,8 @@ class ShopifyApp ...@@ -45,6 +51,8 @@ class ShopifyApp
'CustomCollection', 'CustomCollection',
'SmartCollection', 'SmartCollection',
'Metafield', 'Metafield',
'Product',
'ProductVariant',
]; ];
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 Product
* @package Meibuyu\Micro\Shopify\lib
*
* @property-read ProductImage $Image
* @property-read ProductVariant $Variant
* @property-read Metafield $Metafield
*
* @method ProductImage Image(integer $id = null)
* @method ProductVariant Variant(integer $id = null)
* @method Metafield Metafield(integer $id = null)
*/
class Product extends AbstractShopify
{
protected $resourceKey = 'product';
protected $childResource = [
'ProductImage' => 'Image',
'ProductVariant' => 'Variant',
'Metafield',
];
}
<?php
/**
* Created by PhpStorm.
* User: Zero
* Date: 2020/9/2
* Time: 16:50
*/
namespace Meibuyu\Micro\Shopify\lib;
class ProductImage extends AbstractShopify
{
protected $resourceKey = 'image';
}
<?php
/**
* Created by PhpStorm.
* User: Zero
* Date: 2020/9/2
* Time: 16:50
*/
namespace Meibuyu\Micro\Shopify\lib;
/**
* Class ProductVariant
* @package Meibuyu\Micro\Shopify\lib
*
* @property-read Metafield $Metafield
*
* @method Metafield Metafield(integer $id = null)
*/
class ProductVariant extends AbstractShopify
{
protected $resourceKey = 'variant';
protected $childResource = [
'Metafield',
];
}
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