LedgerClient
in package
Handles interactions with the ledger endpoints.
Tags
Table of Contents
Properties
- $instance : self|null
- $restCli : RESTcli
- $tokenCache : Tokens
Methods
- get() : array<string|int, LedgerEntry>
- Retrieve a list of ledgers by date range using the merchant facade.
- getInstance() : static
- Factory method for Ledger Client.
- getLedgers() : array<string|int, Ledger>
- Retrieve a list of ledgers using the merchant facade.
- __construct() : mixed
Properties
$instance
private
static self|null
$instance
= null
$restCli
private
RESTcli
$restCli
$tokenCache
private
Tokens
$tokenCache
Methods
get()
Retrieve a list of ledgers by date range using the merchant facade.
public
get(string $currency, string $startDate, string $endDate) : array<string|int, LedgerEntry>
Parameters
- $currency : string
-
The three digit currency string for the ledger to retrieve.
- $startDate : string
-
The first date for the query filter.
- $endDate : string
-
The last date for the query filter.
Tags
Return values
array<string|int, LedgerEntry> —A Ledger object populated with the BitPay ledger entries list.
getInstance()
Factory method for Ledger Client.
public
static getInstance(Tokens $tokenCache, RESTcli $restCli) : static
Parameters
Return values
staticgetLedgers()
Retrieve a list of ledgers using the merchant facade.
public
getLedgers() : array<string|int, Ledger>
Tags
Return values
array<string|int, Ledger> —A list of Ledger objects populated with the currency and current balance of each one.
__construct()
private
__construct(Tokens $tokenCache, RESTcli $restCli) : mixed