forked from LiveCarta/PayPal-PHP-SDK
Fixes to Model Object Property Type
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Converter\FormatConverter;
|
||||
use PayPal\Validation\NumericValidator;
|
||||
|
||||
/**
|
||||
* Class InvoiceItem
|
||||
@@ -70,12 +72,14 @@ class InvoiceItem extends PayPalModel
|
||||
/**
|
||||
* Quantity of the item. Range of 0 to 9999.999.
|
||||
*
|
||||
* @param \PayPal\Api\number $quantity
|
||||
* @param string|double $quantity
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setQuantity($quantity)
|
||||
{
|
||||
NumericValidator::validate($quantity, "Percent");
|
||||
$quantity = FormatConverter::formatToPrice($quantity);
|
||||
$this->quantity = $quantity;
|
||||
return $this;
|
||||
}
|
||||
@@ -83,7 +87,7 @@ class InvoiceItem extends PayPalModel
|
||||
/**
|
||||
* Quantity of the item. Range of 0 to 9999.999.
|
||||
*
|
||||
* @return \PayPal\Api\number
|
||||
* @return string
|
||||
*/
|
||||
public function getQuantity()
|
||||
{
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Converter\FormatConverter;
|
||||
use PayPal\Validation\NumericValidator;
|
||||
|
||||
/**
|
||||
* Class Tax
|
||||
@@ -67,12 +69,14 @@ class Tax extends PayPalModel
|
||||
/**
|
||||
* Rate of the specified tax. Range of 0.001 to 99.999.
|
||||
*
|
||||
* @param \PayPal\Api\number $percent
|
||||
* @param string|double $percent
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPercent($percent)
|
||||
{
|
||||
NumericValidator::validate($percent, "Percent");
|
||||
$percent = FormatConverter::formatToPrice($percent);
|
||||
$this->percent = $percent;
|
||||
return $this;
|
||||
}
|
||||
@@ -80,7 +84,7 @@ class Tax extends PayPalModel
|
||||
/**
|
||||
* Rate of the specified tax. Range of 0.001 to 99.999.
|
||||
*
|
||||
* @return \PayPal\Api\number
|
||||
* @return string
|
||||
*/
|
||||
public function getPercent()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user