Menu

## Rates
in package

Rates.php : 22

##### 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

Rates.php : 27
`protected array<string|int, mixed> $rates`

Rate[]

### Methods

#### __construct()

Rates.php : 35

Rates constructor.

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

##### Parameters

$rates : array<string|int, mixed>

  Rate[]

##### Tags

throws
  BitPayException

#### getRate()

Rates.php : 71

Gets rate for the requested currency code.

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

##### Parameters

$currencyCode : string

  3-character currency code

##### Tags

throws
  BitPayException

##### Return values

float|null

#### getRates()

Rates.php : 46

Gets rates.

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

##### Return values

array<string|int, mixed> —

Rate[]

#### toArray()

Rates.php : 94

Return an array with rates value.

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

##### Return values

array<string|int, array<string|int, mixed>>

#### update()

Rates.php : 56

Update rates.

`public update(Client $bp) : void`

##### Parameters

$bp : Client

##### Tags

throws
  BitPayException

#### validateRates()

Rates.php : 113
`private validateRates(array<string|int, mixed> $rates) : void`

##### Parameters

$rates : array<string|int, mixed>

##### Tags

throws
  BitPayException

## Search results