Skip to content

Commit eaab6ee

Browse files
committed
[Fixes #90] Currency Resource added
1 parent 35159c4 commit eaab6ee

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

lib/Currency.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: Tareq
5+
* Date: 6/10/2019
6+
* Time: 11:22 PM
7+
*
8+
* @see https://help.shopify.com/en/api/reference/store-properties/currency Shopify API Reference for Currency
9+
*/
10+
11+
namespace PHPShopify;
12+
13+
14+
class Currency extends ShopifyResource
15+
{
16+
/**
17+
* @inheritDoc
18+
*/
19+
protected $resourceKey = 'currency';
20+
21+
/**
22+
* @inheritDoc
23+
*/
24+
public $readOnly = true;
25+
26+
/**
27+
* @inheritDoc
28+
*/
29+
public function pluralizeKey()
30+
{
31+
return 'currencies';
32+
}
33+
}

tests/CurrencyTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: Tareq
5+
* Date: 6/10/2019
6+
* Time: 11:26 PM
7+
*/
8+
9+
namespace PHPShopify;
10+
11+
12+
class CurrencyTest
13+
{
14+
15+
}

0 commit comments

Comments
 (0)