Skip to content

Commit f852aa4

Browse files
author
Tang, Yu(ytang1)
committed
Merge pull request #285 from magento-fearless-kiwis/develop
[FearlessKiwis] Defining public api and test coverage improvements
2 parents 79e7ce6 + 38f9431 commit f852aa4

35 files changed

+685
-123
lines changed

app/code/Magento/GoogleShopping/Model/Attribute/Tax.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ public function convertAttribute($product, $entry)
171171
foreach ($regions as $region) {
172172
$adjustments = $product->getPriceInfo()->getAdjustments();
173173
if (array_key_exists('tax', $adjustments)) {
174-
$taxIncluded = true;
174+
$isTaxIncluded = true;
175175
} else {
176-
$taxIncluded = false;
176+
$isTaxIncluded = false;
177177
}
178178

179179
$quoteDetailsItemDataArray = [
@@ -185,7 +185,7 @@ public function convertAttribute($product, $entry)
185185
],
186186
'unit_price' => $product->getPrice(),
187187
'quantity' => 1,
188-
'tax_included' => $taxIncluded,
188+
'is_tax_included' => $isTaxIncluded,
189189
'short_description' => $product->getName(),
190190
];
191191

app/code/Magento/GoogleShopping/Test/Unit/Model/Attribute/TaxTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function testConvertAttribute()
192192
],
193193
'unit_price' => $price,
194194
'quantity' => 1,
195-
'tax_included' => 1,
195+
'is_tax_included' => 1,
196196
'short_description' => $name,
197197
],
198198
],

app/code/Magento/Tax/Api/Data/AppliedTaxInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
*/
66
namespace Magento\Tax\Api\Data;
77

8+
/**
9+
* Applied tax interface.
10+
* @api
11+
*/
812
interface AppliedTaxInterface extends \Magento\Framework\Api\ExtensibleDataInterface
913
{
1014
/**

app/code/Magento/Tax/Api/Data/AppliedTaxRateInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
namespace Magento\Tax\Api\Data;
88

9+
/**
10+
* Applied tax rate interface.
11+
* @api
12+
*/
913
interface AppliedTaxRateInterface extends \Magento\Framework\Api\ExtensibleDataInterface
1014
{
1115
/**

app/code/Magento/Tax/Api/Data/QuoteDetailsInterface.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
namespace Magento\Tax\Api\Data;
88

9-
9+
/**
10+
* Quote details interface.
11+
* @api
12+
*/
1013
interface QuoteDetailsInterface extends \Magento\Framework\Api\ExtensibleDataInterface
1114
{
1215
/**

app/code/Magento/Tax/Api/Data/QuoteDetailsItemInterface.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
*/
66
namespace Magento\Tax\Api\Data;
77

8+
/**
9+
* Quote details item interface.
10+
* @api
11+
*/
812
interface QuoteDetailsItemInterface extends \Magento\Framework\Api\ExtensibleDataInterface
913
{
1014
/**
@@ -88,7 +92,7 @@ public function setQuantity($quantity);
8892
* @return bool
8993
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
9094
*/
91-
public function getTaxIncluded();
95+
public function getIsTaxIncluded();
9296

9397
/**
9498
* Set whether the tax is included in the unit price and row total

app/code/Magento/Tax/Api/Data/TaxClassInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
namespace Magento\Tax\Api\Data;
99

10+
/**
11+
* Tax class interface.
12+
* @api
13+
*/
1014
interface TaxClassInterface extends \Magento\Framework\Api\ExtensibleDataInterface
1115
{
1216
/**

app/code/Magento/Tax/Api/Data/TaxClassKeyInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
use Magento\Framework\Api\ExtensibleDataInterface;
1010

11+
/**
12+
* Tax class key interface.
13+
* @api
14+
*/
1115
interface TaxClassKeyInterface extends ExtensibleDataInterface
1216
{
1317
/**#@+

app/code/Magento/Tax/Api/Data/TaxClassSearchResultsInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
namespace Magento\Tax\Api\Data;
88

9+
/**
10+
* Interface for tax class search results.
11+
* @api
12+
*/
913
interface TaxClassSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface
1014
{
1115
/**

app/code/Magento/Tax/Api/Data/TaxDetailsInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
namespace Magento\Tax\Api\Data;
88

9+
/**
10+
* Tax details interface.
11+
* @api
12+
*/
913
interface TaxDetailsInterface extends \Magento\Framework\Api\ExtensibleDataInterface
1014
{
1115
/**

0 commit comments

Comments
 (0)