Skip to content

Commit c9fc2ea

Browse files
committed
Added Shopify API Deprecations Resource
1 parent d6b7737 commit c9fc2ea

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

lib/ApiDeprecations.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* @author Tareq Mahmood <[email protected]>
5+
* @author Steve Barbera <[email protected]>
6+
* Created at 8/18/16 3:39 PM UTC+06:00
7+
*
8+
* @see https://shopify.dev/api/admin-rest/2022-04/resources/deprecated-api-calls#get-deprecated-api-calls Shopify API Reference for API Deprecations
9+
*/
10+
11+
namespace PHPShopify;
12+
13+
14+
class ApiDeprecations extends ShopifyResource
15+
{
16+
/**
17+
* @inheritDoc
18+
*/
19+
protected $resourceKey = 'deprecated_api_calls';
20+
21+
/**
22+
* @inheritDoc
23+
*/
24+
public $readOnly = true;
25+
26+
/**
27+
* @inheritDoc
28+
*/
29+
public $countEnabled = false;
30+
31+
/**
32+
* @inheritDoc
33+
*/
34+
public function pluralizeKey()
35+
{
36+
//Only api deprecations, so no pluralize
37+
return 'deprecated_api_calls';
38+
}
39+
}

lib/ShopifySDK.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
/**
7070
* @property-read AbandonedCheckout $AbandonedCheckout
7171
* @property-read AccessScope $AccessScope
72+
* @property-read ApiDeprecations $ApiDeprecations
7273
* @property-read ApplicationCharge $ApplicationCharge
7374
* @property-read Blog $Blog
7475
* @property-read CarrierService $CarrierService
@@ -116,6 +117,7 @@
116117
*
117118
* @method AbandonedCheckout AbandonedCheckout(integer $id = null)
118119
* @method AccessScope AccessScope()
120+
* @method ApiDeprecations ApiDeprecations()
119121
* @method ApplicationCharge ApplicationCharge(integer $id = null)
120122
* @method Blog Blog(integer $id = null)
121123
* @method CarrierService CarrierService(integer $id = null)
@@ -172,6 +174,7 @@ class ShopifySDK
172174
protected $resources = array(
173175
'AbandonedCheckout',
174176
'AccessScope',
177+
'ApiDeprecations',
175178
'ApplicationCharge',
176179
'Blog',
177180
'CarrierService',

0 commit comments

Comments
 (0)