%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ |
Upload File : |
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalModel;
use PayPal\Converter\FormatConverter;
use PayPal\Validation\NumericValidator;
/**
* Class Currency
*
* Base object for all financial value related fields (balance, payment due, etc.)
*
* @package PayPal\Api
*
* @property string currency
* @property string value
*/
class Currency extends PayPalModel
{
/**
* 3 letter currency code as defined by ISO 4217.
*
* @param string $currency
*
* @return $this
*/
public function setCurrency($currency)
{
$this->currency = $currency;
return $this;
}
/**
* 3 letter currency code as defined by ISO 4217.
*
* @return string
*/
public function getCurrency()
{
return $this->currency;
}
/**
* amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code.
*
* @param string|double $value
*
* @return $this
*/
public function setValue($value)
{
NumericValidator::validate($value, "Value");
$value = FormatConverter::formatToPrice($value, $this->getCurrency());
$this->value = $value;
return $this;
}
/**
* amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code.
*
* @return string
*/
public function getValue()
{
return $this->value;
}
}