Skip to content

Commit 286231c

Browse files
committed
Documentation update
1 parent b3b2a10 commit 286231c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1163
-172
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ If you are using your own private API, provide the ApiKey and Password. For Thir
2727
$config = array(
2828
'ShopUrl' => 'yourshop.myshopify.com',
2929
'ApiKey' => '***YOUR-PRIVATE-API-KEY***',
30-
'Password' => '***YOUR-PRIVATE-API-PASSWORD',
30+
'Password' => '***YOUR-PRIVATE-API-PASSWORD***',
3131
);
3232
```
3333

@@ -37,7 +37,7 @@ Or
3737
<?php
3838
$config = array(
3939
'ShopUrl' => 'yourshop.myshopify.com',
40-
'AccessToken' => '***ACCESS-TOKEN-FOR-THIRD-PARTY-APPS***',
40+
'AccessToken' => '***ACCESS-TOKEN-FOR-THIRD-PARTY-APP***',
4141
);
4242
```
4343

lib/AbandonedCheckout.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
<?php
22
/**
33
* Created by PhpStorm.
4-
* User: tareq
5-
* Date: 8/18/16
6-
* Time: 9:50 AM
4+
* @author Tareq Mahmood <[email protected]>
5+
* Created at 8/18/16 9:50 AM UTC+06:00
6+
*
7+
* @see https://help.shopify.com/api/reference/abandoned_checkouts Shopify API Reference for Abandoned checkouts
78
*/
89

910
namespace PHPShopify;
1011

1112

1213
class AbandonedCheckout extends ShopifyAPI
1314
{
15+
/**
16+
* Key of the API Resource which is used to fetch data from request responses
17+
*
18+
* @var string
19+
*/
1420
protected $resourceKey = 'checkout';
1521
}

lib/ApplicationCharge.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
<?php
22
/**
33
* Created by PhpStorm.
4-
* User: tareq
5-
* Date: 8/18/16
6-
* Time: 9:50 AM
4+
* @author Tareq Mahmood <[email protected]>
5+
* Created at 8/18/16 9:50 AM UTC+06:00
6+
*
7+
* @see https://help.shopify.com/api/reference/applicationcharge Shopify API Reference for ApplicationCharge
78
*/
89

910
namespace PHPShopify;
1011

1112

1213
class ApplicationCharge extends ShopifyAPI
1314
{
15+
/**
16+
* Key of the API Resource which is used to fetch data from request responses
17+
*
18+
* @var string
19+
*/
1420
protected $resourceKey = 'application_charge';
1521
}

lib/Article.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
<?php
22
/**
33
* Created by PhpStorm.
4-
* User: tareq
5-
* Date: 8/18/16
6-
* Time: 3:18 PM
4+
* @author Tareq Mahmood <[email protected]>
5+
* Created at 8/18/16 3:18 PM UTC+06:00
6+
*
7+
* @see https://help.shopify.com/api/reference/article Shopify API Reference for Article
78
*/
89

910
namespace PHPShopify;
1011

1112

1213
class Article extends ShopifyAPI
1314
{
15+
/**
16+
* Key of the API Resource which is used to fetch data from request responses
17+
*
18+
* @var string
19+
*/
1420
protected $resourceKey = 'article';
1521
}

lib/Asset.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
<?php
22
/**
33
* Created by PhpStorm.
4-
* User: tareq
5-
* Date: 8/18/16
6-
* Time: 3:39 PM
4+
* @author Tareq Mahmood <[email protected]>
5+
* Created at 8/18/16 3:39 PM UTC+06:00
6+
*
7+
* @see https://help.shopify.com/api/reference/asset Shopify API Reference for Asset
78
*/
89

910
namespace PHPShopify;
1011

1112

1213
class Asset extends ShopifyAPI
1314
{
15+
/**
16+
* Key of the API Resource which is used to fetch data from request responses
17+
*
18+
* @var string
19+
*/
1420
protected $resourceKey = 'asset';
1521
}

lib/Blog.php

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,40 @@
11
<?php
22
/**
33
* Created by PhpStorm.
4-
* User: tareq
5-
* Date: 8/18/16
6-
* Time: 10:46 AM
4+
* @author Tareq Mahmood <[email protected]>
5+
* Created at 8/18/16 10:46 AM UTC+06:00
6+
*
7+
* @see https://help.shopify.com/api/reference/blog Shopify API Reference for Blog
78
*/
89

910
namespace PHPShopify;
1011

11-
12+
/*
13+
* --------------------------------------------------------------------------
14+
* Blog -> Child Resources
15+
* --------------------------------------------------------------------------
16+
* @property-read ShopifyAPI $Article
17+
*
18+
* @method ShopifyAPI Article(integer $id = null)
19+
*
20+
*/
1221
class Blog extends ShopifyAPI
1322
{
23+
/**
24+
* Key of the API Resource which is used to fetch data from request responses
25+
*
26+
* @var string
27+
*/
1428
public $resourceKey = 'blog';
15-
public $childResource = array(
29+
30+
/**
31+
* List of child Resource names / classes
32+
* If any array item has an associative key => value pair, value will be considered as the resource name
33+
* (by which it will be called) and key will be the associated class name.
34+
*
35+
* @var array
36+
*/
37+
protected $childResource = array(
1638
'Article',
1739
);
1840
}

lib/CarrierService.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
<?php
22
/**
33
* Created by PhpStorm.
4-
* User: tareq
5-
* Date: 8/19/16
6-
* Time: 10:49 AM
4+
* @author Tareq Mahmood <[email protected]>
5+
* Created at 8/19/16 10:49 AM UTC+06:00
6+
*
7+
* @see https://help.shopify.com/api/reference/carrierservice Shopify API Reference for CarrierService
78
*/
89

910
namespace PHPShopify;
1011

1112

1213
class CarrierService extends ShopifyAPI
1314
{
15+
/**
16+
* Key of the API Resource which is used to fetch data from request responses
17+
*
18+
* @var string
19+
*/
1420
protected $resourceKey = 'carrier_service';
1521
}

lib/Collect.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
<?php
22
/**
33
* Created by PhpStorm.
4-
* User: tareq
5-
* Date: 8/19/16
6-
* Time: 10:54 AM
4+
* @author Tareq Mahmood <[email protected]>
5+
* Created at 8/19/16 10:54 AM UTC+06:00
6+
*
7+
* @see https://help.shopify.com/api/reference/collect Shopify API Reference for Collect
78
*/
89

910
namespace PHPShopify;
1011

1112

1213
class Collect extends ShopifyAPI
1314
{
15+
/**
16+
* Key of the API Resource which is used to fetch data from request responses
17+
*
18+
* @var string
19+
*/
1420
protected $resourceKey = 'collect';
1521
}

lib/Comment.php

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,43 @@
11
<?php
22
/**
33
* Created by PhpStorm.
4-
* User: tareq
5-
* Date: 8/19/16
6-
* Time: 10:58 AM
4+
* @author Tareq Mahmood <[email protected]>
5+
* Created at 8/19/16 10:58 AM UTC+06:00
6+
*
7+
* @see https://help.shopify.com/api/reference/comment Shopify API Reference for Comment
78
*/
89

910
namespace PHPShopify;
1011

1112

13+
/*
14+
* --------------------------------------------------------------------------
15+
* Comment -> Custom actions
16+
* --------------------------------------------------------------------------
17+
* @method array spam() Mark a Comment as spam
18+
* @method array notSpam() Mark a Comment as not spam
19+
* @method array approve() Approve a Comment
20+
* @method array remove() Remove a Comment
21+
* @method array restore() Restore a Comment
22+
*
23+
*/
1224
class Comment extends ShopifyAPI
1325
{
26+
/**
27+
* Key of the API Resource which is used to fetch data from request responses
28+
*
29+
* @var string
30+
*/
1431
protected $resourceKey = 'comment';
32+
33+
/**
34+
* List of custom POST actions
35+
* @example: ['enable', 'disable', 'remove','default' => 'makeDefault']
36+
* Methods can be called like enable(), disable(), remove(), makeDefault() etc.
37+
* If any array item has an associative key => value pair, value will be considered as the method name and key will be the associated path to be used with the action.
38+
*
39+
* @var array
40+
*/
1541
protected $customPostActions = array(
1642
'spam',
1743
'not_spam' => 'notSpam',

lib/Country.php

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,49 @@
11
<?php
22
/**
33
* Created by PhpStorm.
4-
* User: tareq
5-
* Date: 8/19/16
6-
* Time: 11:44 AM
4+
* @author Tareq Mahmood <[email protected]>
5+
* Created at 8/19/16 11:44 AM UTC+06:00
6+
*
7+
* @see https://help.shopify.com/api/reference/country Shopify API Reference for Country
78
*/
89

910
namespace PHPShopify;
1011

1112

13+
/*
14+
* --------------------------------------------------------------------------
15+
* Country -> Child Resources
16+
* --------------------------------------------------------------------------
17+
* @property-read ShopifyAPI $Province
18+
*
19+
* @method ShopifyAPI Province(integer $id = null)
20+
*
21+
*/
1222
class Country extends ShopifyAPI
1323
{
24+
/**
25+
* Key of the API Resource which is used to fetch data from request responses
26+
*
27+
* @var string
28+
*/
1429
protected $resourceKey = 'country';
30+
31+
/**
32+
* List of child Resource names / classes
33+
* If any array item has an associative key => value pair, value will be considered as the resource name
34+
* (by which it will be called) and key will be the associated class name.
35+
*
36+
* @var array
37+
*/
1538
protected $childResource = array(
1639
'Province',
1740
);
1841

42+
/**
43+
* Get the pluralized version of the resource key
44+
*
45+
* @return string
46+
*/
1947
protected function pluralizeKey()
2048
{
2149
return 'countries';

0 commit comments

Comments
 (0)