class SupportedCurrency in Payment 8.2
Provides a currency that is supported by a payment method.
Hierarchy
- class \Drupal\payment\Plugin\Payment\Method\SupportedCurrency implements SupportedCurrencyInterface
Expanded class hierarchy of SupportedCurrency
2 files declare their use of SupportedCurrency
- PaymentMethodBaseTest.php in tests/
src/ Unit/ Plugin/ Payment/ Method/ PaymentMethodBaseTest.php - SupportedCurrencyTest.php in tests/
src/ Unit/ Plugin/ Payment/ Method/ SupportedCurrencyTest.php
File
- src/
Plugin/ Payment/ Method/ SupportedCurrency.php, line 8
Namespace
Drupal\payment\Plugin\Payment\MethodView source
class SupportedCurrency implements SupportedCurrencyInterface {
/**
* The currency code.
*
* @var string
*/
protected $currencyCode;
/**
* The lowest supported amount.
*
* @var int|float
*/
protected $minimumAmount;
/**
* The highest supported amount.
*
* @var int|float
*/
protected $maximumAmount;
/**
* Constructs a new instance.
*
* @param string $currency_code
* The currency code.
* @param int|float|null $minimum_amount
* The minimum amount or NULL if there is no minimum amount.
* @param int|float|null @$maximum_amount
* The maximum amount or NULL if there is no maximum amount.
*/
public function __construct($currency_code, $minimum_amount = NULL, $maximum_amount = NULL) {
$this->currencyCode = $currency_code;
$this->minimumAmount = $minimum_amount;
$this->maximumAmount = $maximum_amount;
}
/**
* {@inheritdoc}
*/
public function getCurrencyCode() {
return $this->currencyCode;
}
/**
* {@inheritdoc}
*/
public function getMinimumAmount() {
return $this->minimumAmount;
}
/**
* {@inheritdoc}
*/
public function getMaximumAmount() {
return $this->maximumAmount;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SupportedCurrency:: |
protected | property | The currency code. | |
SupportedCurrency:: |
protected | property | The highest supported amount. | |
SupportedCurrency:: |
protected | property | The lowest supported amount. | |
SupportedCurrency:: |
public | function |
Gets the currency code. Overrides SupportedCurrencyInterface:: |
|
SupportedCurrency:: |
public | function |
Gets the highest supported amount. Overrides SupportedCurrencyInterface:: |
|
SupportedCurrency:: |
public | function |
Gets the lowest supported amount. Overrides SupportedCurrencyInterface:: |
|
SupportedCurrency:: |
public | function | Constructs a new instance. |