BitPay PHP SDK

Rates
in package

Tags
author

BitPay Integrations integrations@bitpay.com

license

http://www.opensource.org/licenses/mit-license.php MIT

see
https://bitpay.readme.io/reference/rates

REST API Rates

Table of Contents

Properties

$rates  : array<string|int, mixed>

Methods

__construct()  : mixed
Rates constructor.
getRate()  : float|null
Gets rate for the requested currency code.
getRates()  : array<string|int, mixed>
Gets rates.
toArray()  : array<string|int, array<string|int, mixed>>
Return an array with rates value.
update()  : void
Update rates.
validateRates()  : void

Properties

$rates

protected array<string|int, mixed> $rates

Rate[]

Methods

__construct()

Rates constructor.

public __construct(array<string|int, mixed> $rates) : mixed
Parameters
$rates : array<string|int, mixed>

Rate[]

Tags
throws
BitPayGenericException

getRate()

Gets rate for the requested currency code.

public getRate(string $currencyCode) : float|null
Parameters
$currencyCode : string

3-character currency code

Tags
throws
BitPayValidationException
Return values
float|null

getRates()

Gets rates.

public getRates() : array<string|int, mixed>
Return values
array<string|int, mixed>

Rate[]

toArray()

Return an array with rates value.

public toArray() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>

validateRates()

private validateRates(array<string|int, mixed> $rates) : void
Parameters
$rates : array<string|int, mixed>
Tags
throws
BitPayGenericException

        
On this page

Search results