Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • Fixer
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class Fixer

Fixer.io Exchange Rate Processor

ExchangeRate
Extended by Fixer
Package: blesta\components\exchange\rates\fixer
Copyright: Copyright (c) 2017, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at components/exchange_rates/fixer/fixer.php
Methods summary
public
# __construct( Http $Http )

Initializes the exchange rate processor

Initializes the exchange rate processor

Parameters

$Http
The Http component to more easily facilitate HTTP requests to fetch data
public boolean
# requiresKey( )

Determines whether an API key is necessary to retrieve exchange rates via the processor

Determines whether an API key is necessary to retrieve exchange rates via the processor

Returns

boolean
True if an API key is required, or false otherwise

Overrides

ExchangeRate::requiresKey()
public mixed
# getRate( string $currency_from, string $currency_to, float $amount = 1.0 )

Fetches the exchange rate from currency A to currency B using the given amount

Fetches the exchange rate from currency A to currency B using the given amount

Parameters

$currency_from
The ISO 4217 currency code to convert from
$currency_to
The ISO 4217 currency code to convert to
$amount
The amount to convert

Returns

mixed

(boolean) false on error or an array containing the exchange rate information including:

  • rate The exchange rate for the supplied amount
  • updated The date/time of the last update in YYYY-MM-DD HH:MM:SS format in UTC time
Methods inherited from ExchangeRate
convertRates(), setKey()
Properties inherited from ExchangeRate
$key
Blesta API documentation generated by ApiGen