Skip to content

Commit 4ef5170

Browse files
authored
Merge pull request #246 from automit2021/access-scope-resource
AccessScope resource
2 parents 00b6142 + 0f42110 commit 4ef5170

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

lib/AccessScope.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace PHPShopify;
4+
5+
/**
6+
* Class AccessScope
7+
* @package PHPShopify
8+
* @author Alexey Sinkevich
9+
*/
10+
class AccessScope extends ShopifyResource
11+
{
12+
/**
13+
* @inheritDoc
14+
*/
15+
protected $resourceKey = 'access_scope';
16+
17+
/**
18+
* @inheritDoc
19+
*/
20+
public $countEnabled = true;
21+
22+
/**
23+
* @inheritDoc
24+
*/
25+
public $readOnly = true;
26+
27+
/**
28+
* @param array $urlParams
29+
* @param null $customAction
30+
* @return string
31+
*/
32+
public function generateUrl($urlParams = array(), $customAction = null)
33+
{
34+
return ShopifySDK::$config['AdminUrl'] . 'oauth/' . $this->getResourcePath() . '.json';
35+
}
36+
}

lib/ShopifySDK.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868

6969
/**
7070
* @property-read AbandonedCheckout $AbandonedCheckout
71+
* @property-read AccessScope $AccessScope
7172
* @property-read ApplicationCharge $ApplicationCharge
7273
* @property-read Blog $Blog
7374
* @property-read CarrierService $CarrierService
@@ -113,6 +114,7 @@
113114
* @property-read GraphQL $GraphQL
114115
*
115116
* @method AbandonedCheckout AbandonedCheckout(integer $id = null)
117+
* @method AccessScope AccessScope()
116118
* @method ApplicationCharge ApplicationCharge(integer $id = null)
117119
* @method Blog Blog(integer $id = null)
118120
* @method CarrierService CarrierService(integer $id = null)
@@ -166,6 +168,7 @@ class ShopifySDK
166168
*/
167169
protected $resources = array(
168170
'AbandonedCheckout',
171+
'AccessScope',
169172
'ApplicationCharge',
170173
'Blog',
171174
'CarrierService',

0 commit comments

Comments
 (0)