Menu

## LedgerEntry
in package

LedgerEntry.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/ledgers

  REST API Ledgers

### Table of Contents

#### Properties

$amount : float|null
$buyerFields : Buyer
$code : int|null
$currency : string|null
$description : string|null
$id : string|null
$invoiceAmount : float|null
$invoiceCurrency : string|null
$invoiceId : string|null
$scale : int|null
$supportRequest : string|null
$timestamp : string|null
$transactionCurrency : string|null
$txType : string|null
$type : string|null

#### Methods

__construct() : mixed
getAmount() : float|null
  Gets Ledger entry amount, relative to the scale.
getBuyerFields() : Buyer
  Gets buyer fields
getCode() : int|null
  Gets code
getCurrency() : string|null
  Gets Ledger entry currency for the corresponding amount
getDescription() : string|null
  Gets description
getId() : string|null
  Gets Ledger resource Id
getInvoiceAmount() : float|null
  Gets Invoice price in the invoice original currency
getInvoiceCurrency() : string|null
  Gets Currency used for invoice creation
getInvoiceId() : string|null
  Gets BitPay invoice Id
getScale() : int|null
  Gets scale
getSupportRequest() : string|null
  Gets The refund requestId
getTimestamp() : string|null
  Gets Date and time of the ledger entry (UTC). ISO-8601 format yyyy-mm-ddThh:mm:ssZ
getTransactionCurrency() : string|null
  Gets Cryptocurrency selected by the consumer when paying an invoice.
getTxType() : string|null
  Gets tx type
getType() : string|null
  Gets type
setAmount() : void
  Sets Ledger entry amount, relative to the scale.
setBuyerFields() : void
  Sets buyer fields
setCode() : void
  Sets code
setCurrency() : void
  Sets Ledger entry currency for the corresponding amount
setDescription() : void
  Sets description
setId() : void
  Sets Ledger resource Id
setInvoiceAmount() : void
  Sets Invoice price in the invoice original currency
setInvoiceCurrency() : void
  Sets Currency used for invoice creation
setInvoiceId() : void
  Sets BitPay invoice Id
setScale() : void
  Sets scale
setSupportRequest() : void
  Sets The refund requestId
setTimestamp() : void
  Sets Date and time of the ledger entry (UTC). ISO-8601 format yyyy-mm-ddThh:mm:ssZ
setTransactionCurrency() : void
  Sets Cryptocurrency selected by the consumer when paying an invoice.
setTxType() : void
  Sets tx type
setType() : void
  Sets type
toArray() : array<string|int, mixed>
  Gets LedgerEntry as array

### Properties

#### $amount

LedgerEntry.php : 25
`protected float|null $amount = null`

#### $buyerFields

LedgerEntry.php : 35
`protected Buyer $buyerFields`

#### $code

LedgerEntry.php : 26
`protected int|null $code = null`

#### $currency

LedgerEntry.php : 28
`protected string|null $currency = null`

#### $description

LedgerEntry.php : 33
`protected string|null $description = null`

#### $id

LedgerEntry.php : 31
`protected string|null $id = null`

#### $invoiceAmount

LedgerEntry.php : 36
`protected float|null $invoiceAmount = null`

#### $invoiceCurrency

LedgerEntry.php : 37
`protected string|null $invoiceCurrency = null`

#### $invoiceId

LedgerEntry.php : 34
`protected string|null $invoiceId = null`

#### $scale

LedgerEntry.php : 30
`protected int|null $scale = null`

#### $supportRequest

LedgerEntry.php : 32
`protected string|null $supportRequest = null`

#### $timestamp

LedgerEntry.php : 27
`protected string|null $timestamp = null`

#### $transactionCurrency

LedgerEntry.php : 38
`protected string|null $transactionCurrency = null`

#### $txType

LedgerEntry.php : 29
`protected string|null $txType = null`

#### $type

LedgerEntry.php : 24
`protected string|null $type = null`

### Methods

#### __construct()

LedgerEntry.php : 40
`public __construct() : mixed`

#### getAmount()

LedgerEntry.php : 77

Gets Ledger entry amount, relative to the scale.

`public getAmount() : float|null`

The decimal amount can be obtained by dividing the amount field by the scale parameter.

##### Return values

float|null

#### getBuyerFields()

LedgerEntry.php : 300

Gets buyer fields

`public getBuyerFields() : Buyer`

If provided by the merchant in the buyer object during invoice creation

##### Return values

Buyer

#### getCode()

LedgerEntry.php : 101

Gets code

`public getCode() : int|null`

Contains the Ledger entry code. See the list of Ledger Entry Codes: https://bitpay.com/api/?php#ledger-entry-codes

##### Return values

int|null —

the code

#### getCurrency()

LedgerEntry.php : 144

Gets Ledger entry currency for the corresponding amount

`public getCurrency() : string|null`

##### Return values

string|null —

the currency

#### getDescription()

LedgerEntry.php : 255

Gets description

`public getDescription() : string|null`

Ledger entry description. Also contains an id depending on the type of entry (for instance payout id, settlement id, invoice orderId etc...)

##### Return values

string|null —

the description

#### getId()

LedgerEntry.php : 212

Gets Ledger resource Id

`public getId() : string|null`

##### Return values

string|null —

the id

#### getInvoiceAmount()

LedgerEntry.php : 320

Gets Invoice price in the invoice original currency

`public getInvoiceAmount() : float|null`

##### Return values

float|null —

the invoice amount

#### getInvoiceCurrency()

LedgerEntry.php : 340

Gets Currency used for invoice creation

`public getInvoiceCurrency() : string|null`

##### Return values

string|null —

the invoice currency

#### getInvoiceId()

LedgerEntry.php : 278

Gets BitPay invoice Id

`public getInvoiceId() : string|null`

##### Return values

string|null —

the invoice id

#### getScale()

LedgerEntry.php : 190

Gets scale

`public getScale() : int|null`

Power of 10 used for conversion

##### Return values

int|null —

the scale

#### getSupportRequest()

LedgerEntry.php : 232

Gets The refund requestId

`public getSupportRequest() : string|null`

##### Return values

string|null —

the support request

#### getTimestamp()

LedgerEntry.php : 124

Gets Date and time of the ledger entry (UTC). ISO-8601 format yyyy-mm-ddThh:mm:ssZ

`public getTimestamp() : string|null`

##### Return values

string|null —

the timestamp

#### getTransactionCurrency()

LedgerEntry.php : 360

Gets Cryptocurrency selected by the consumer when paying an invoice.

`public getTransactionCurrency() : string|null`

##### Return values

string|null —

the transaction currency

#### getTxType()

LedgerEntry.php : 166

Gets tx type

`public getTxType() : string|null`

[DEPRECRATED] see type

##### Return values

string|null —

the txType

#### getType()

LedgerEntry.php : 53

Gets type

`public getType() : string|null`

Contains the Ledger entry name. See the list of Ledger Entry Codes: https://bitpay.com/api/?php#ledger-entry-codes

##### Return values

string|null —

the type

#### setAmount()

LedgerEntry.php : 88

Sets Ledger entry amount, relative to the scale.

`public setAmount(float $amount) : void`

The decimal amount can be obtained by dividing the amount field by the scale parameter.

##### Parameters

$amount : float

  the amount

#### setBuyerFields()

LedgerEntry.php : 310

Sets buyer fields

`public setBuyerFields(Buyer $buyerFields) : void`

##### Parameters

$buyerFields : Buyer

  the buyer

#### setCode()

LedgerEntry.php : 114

Sets code

`public setCode(int $code) : void`

Contains the Ledger entry code. See the list of Ledger Entry Codes: https://bitpay.com/api/?php#ledger-entry-codes

##### Parameters

$code : int

  the code

#### setCurrency()

LedgerEntry.php : 154

Sets Ledger entry currency for the corresponding amount

`public setCurrency(string $currency) : void`

##### Parameters

$currency : string

  the currency

#### setDescription()

LedgerEntry.php : 268

Sets description

`public setDescription(string $description) : void`

Ledger entry description. Also contains an id depending on the type of entry (for instance payout id, settlement id, invoice orderId etc...)

##### Parameters

$description : string

  the description

#### setId()

LedgerEntry.php : 222

Sets Ledger resource Id

`public setId(string $id) : void`

##### Parameters

$id : string

  the id

#### setInvoiceAmount()

LedgerEntry.php : 330

Sets Invoice price in the invoice original currency

`public setInvoiceAmount(float $invoiceAmount) : void`

##### Parameters

$invoiceAmount : float

  the invoice amount

#### setInvoiceCurrency()

LedgerEntry.php : 350

Sets Currency used for invoice creation

`public setInvoiceCurrency(string $invoiceCurrency) : void`

##### Parameters

$invoiceCurrency : string

  the invoice currency

#### setInvoiceId()

LedgerEntry.php : 288

Sets BitPay invoice Id

`public setInvoiceId(string $invoiceId) : void`

##### Parameters

$invoiceId : string

  the invoice id

#### setScale()

LedgerEntry.php : 202

Sets scale

`public setScale(int $scale) : void`

Power of 10 used for conversion

##### Parameters

$scale : int

  the scale

#### setSupportRequest()

LedgerEntry.php : 242

Sets The refund requestId

`public setSupportRequest(string $supportRequest) : void`

##### Parameters

$supportRequest : string

  the support request

#### setTimestamp()

LedgerEntry.php : 134

Sets Date and time of the ledger entry (UTC). ISO-8601 format yyyy-mm-ddThh:mm:ssZ

`public setTimestamp(string $timestamp) : void`

##### Parameters

$timestamp : string

  the timestamp

#### setTransactionCurrency()

LedgerEntry.php : 370

Sets Cryptocurrency selected by the consumer when paying an invoice.

`public setTransactionCurrency(string $transactionCurrency) : void`

##### Parameters

$transactionCurrency : string

  the transaction currency

#### setTxType()

LedgerEntry.php : 178

Sets tx type

`public setTxType(string $txType) : void`

[DEPRECRATED] see type

##### Parameters

$txType : string

  the txType

#### setType()

LedgerEntry.php : 66

Sets type

`public setType(string $type) : void`

Contains the Ledger entry name. See the list of Ledger Entry Codes: https://bitpay.com/api/?php#ledger-entry-codes

##### Parameters

$type : string

  the type

#### toArray()

LedgerEntry.php : 380

Gets LedgerEntry as array

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

##### Return values

array<string|int, mixed> —

LedgerEntry as array

## Search results