You are here

class CommerceExchangerProvider in Commerce Exchanger 8

Defines a Commerce exchange rates provider item annotation object.

Plugin namespace: Plugin\Commerce\ExchangerProvider.

Hierarchy

Expanded class hierarchy of CommerceExchangerProvider

See also

\Drupal\commerce_exchanger\ExchangerProviderManager

Plugin API

1 file declares its use of CommerceExchangerProvider
ExchangerProviderManager.php in src/ExchangerProviderManager.php
7 classes are annotated with CommerceExchangerProvider
CurrencylayerExchanger in src/Plugin/Commerce/ExchangerProvider/CurrencylayerExchanger.php
Provides the Currencylayer.com exchange rates.
EuropeanCentralBankExchanger in src/Plugin/Commerce/ExchangerProvider/EuropeanCentralBankExchanger.php
Provides EuropeanCentralBank.
FixerExchanger in src/Plugin/Commerce/ExchangerProvider/FixerExchanger.php
Provides the Fixer.io exchange rates.
ManualExchanger in src/Plugin/Commerce/ExchangerProvider/ManualExchanger.php
Provides Manual handling currencies.
TestEnterpriseExchanger in tests/modules/commerce_exchanger_test/src/Plugin/Commerce/ExchangerProvider/TestEnterpriseExchanger.php
Provides the enterprise exchange rates.

... See full list

File

src/Annotation/CommerceExchangerProvider.php, line 17

Namespace

Drupal\commerce_exchanger\Annotation
View source
class CommerceExchangerProvider extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The label of the plugin.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $label;

  /**
   * If provider supports test / live mode.
   *
   * @var bool
   */
  public $modes = FALSE;

  /**
   * Base currency upon exchange rates are based.
   *
   * @var string
   */
  public $base_currency;

  /**
   * Define if external provider need api key.
   *
   * @var bool
   */
  public $api_key = FALSE;

  /**
   * Define if external provider need authentication.
   *
   * @var bool
   */
  public $auth = FALSE;

  /**
   * Define if external provider supports fetching by any currency.
   *
   * @var bool
   */
  public $enterprise = FALSE;

  /**
   * Define if external provider supports historical rates.
   *
   * @var bool
   */
  public $historical_rates = FALSE;

  /**
   * Define if external provider refresh currencies only once a day.
   *
   * @var bool
   */
  public $refresh_once = FALSE;

  /**
   * Define if plugin is manual, without importing data from external provider.
   *
   * @var bool
   */
  public $manual = FALSE;

  /**
   * Define what type of request required for fetching exchange rates.
   *
   * @var bool
   */
  public $method = 'GET';

  /**
   * Define if the rates needs to be transformed - reverse calculated.
   *
   * @var bool
   */
  public $transform_rates = FALSE;

}

Members

Namesort descending Modifiers Type Description Overrides
CommerceExchangerProvider::$api_key public property Define if external provider need api key.
CommerceExchangerProvider::$auth public property Define if external provider need authentication.
CommerceExchangerProvider::$base_currency public property Base currency upon exchange rates are based.
CommerceExchangerProvider::$enterprise public property Define if external provider supports fetching by any currency.
CommerceExchangerProvider::$historical_rates public property Define if external provider supports historical rates.
CommerceExchangerProvider::$id public property The plugin ID.
CommerceExchangerProvider::$label public property The label of the plugin.
CommerceExchangerProvider::$manual public property Define if plugin is manual, without importing data from external provider.
CommerceExchangerProvider::$method public property Define what type of request required for fetching exchange rates.
CommerceExchangerProvider::$modes public property If provider supports test / live mode.
CommerceExchangerProvider::$refresh_once public property Define if external provider refresh currencies only once a day.
CommerceExchangerProvider::$transform_rates public property Define if the rates needs to be transformed - reverse calculated.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2