Menu

## Rates
in package

Rates.php : 24

##### 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 : 29
`protected array<string|int, mixed> $rates`

Rate[]

### Methods

#### __construct()

Rates.php : 37

Rates constructor.

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

##### Parameters

$rates : array<string|int, mixed>

  Rate[]

##### Tags

throws
  BitPayGenericException

#### getRate()

Rates.php : 74

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()

Rates.php : 48

Gets rates.

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

##### Return values

array<string|int, mixed> —

Rate[]

#### toArray()

Rates.php : 97

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 : 59

Update rates.

`public update(Client $bp) : void`

##### Parameters

$bp : Client

##### Tags

throws
  BitPayApiException
throws
  BitPayGenericException

#### validateRates()

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

##### Parameters

$rates : array<string|int, mixed>

##### Tags

throws
  BitPayGenericException

## Search results