LedgerEntry
in package
Tags
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
protected
float|null
$amount
= null
$buyerFields
protected
Buyer
$buyerFields
$code
protected
int|null
$code
= null
$currency
protected
string|null
$currency
= null
$description
protected
string|null
$description
= null
$id
protected
string|null
$id
= null
$invoiceAmount
protected
float|null
$invoiceAmount
= null
$invoiceCurrency
protected
string|null
$invoiceCurrency
= null
$invoiceId
protected
string|null
$invoiceId
= null
$scale
protected
int|null
$scale
= null
$supportRequest
protected
string|null
$supportRequest
= null
$timestamp
protected
string|null
$timestamp
= null
$transactionCurrency
protected
string|null
$transactionCurrency
= null
$txType
protected
string|null
$txType
= null
$type
protected
string|null
$type
= null
Methods
__construct()
public
__construct() : mixed
getAmount()
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|nullgetBuyerFields()
Gets buyer fields
public
getBuyerFields() : Buyer
If provided by the merchant in the buyer object during invoice creation
Return values
BuyergetCode()
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()
Gets Ledger entry currency for the corresponding amount
public
getCurrency() : string|null
Return values
string|null —the currency
getDescription()
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()
Gets Ledger resource Id
public
getId() : string|null
Return values
string|null —the id
getInvoiceAmount()
Gets Invoice price in the invoice original currency
public
getInvoiceAmount() : float|null
Return values
float|null —the invoice amount
getInvoiceCurrency()
Gets Currency used for invoice creation
public
getInvoiceCurrency() : string|null
Return values
string|null —the invoice currency
getInvoiceId()
Gets BitPay invoice Id
public
getInvoiceId() : string|null
Return values
string|null —the invoice id
getScale()
Gets scale
public
getScale() : int|null
Power of 10 used for conversion
Return values
int|null —the scale
getSupportRequest()
Gets The refund requestId
public
getSupportRequest() : string|null
Return values
string|null —the support request
getTimestamp()
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()
Gets Cryptocurrency selected by the consumer when paying an invoice.
public
getTransactionCurrency() : string|null
Return values
string|null —the transaction currency
getTxType()
Gets tx type
public
getTxType() : string|null
[DEPRECRATED] see type
Return values
string|null —the txType
getType()
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()
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()
Sets buyer fields
public
setBuyerFields(Buyer $buyerFields) : void
Parameters
- $buyerFields : Buyer
-
the buyer
setCode()
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()
Sets Ledger entry currency for the corresponding amount
public
setCurrency(string $currency) : void
Parameters
- $currency : string
-
the currency
setDescription()
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()
Sets Ledger resource Id
public
setId(string $id) : void
Parameters
- $id : string
-
the id
setInvoiceAmount()
Sets Invoice price in the invoice original currency
public
setInvoiceAmount(float $invoiceAmount) : void
Parameters
- $invoiceAmount : float
-
the invoice amount
setInvoiceCurrency()
Sets Currency used for invoice creation
public
setInvoiceCurrency(string $invoiceCurrency) : void
Parameters
- $invoiceCurrency : string
-
the invoice currency
setInvoiceId()
Sets BitPay invoice Id
public
setInvoiceId(string $invoiceId) : void
Parameters
- $invoiceId : string
-
the invoice id
setScale()
Sets scale
public
setScale(int $scale) : void
Power of 10 used for conversion
Parameters
- $scale : int
-
the scale
setSupportRequest()
Sets The refund requestId
public
setSupportRequest(string $supportRequest) : void
Parameters
- $supportRequest : string
-
the support request
setTimestamp()
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()
Sets Cryptocurrency selected by the consumer when paying an invoice.
public
setTransactionCurrency(string $transactionCurrency) : void
Parameters
- $transactionCurrency : string
-
the transaction currency
setTxType()
Sets tx type
public
setTxType(string $txType) : void
[DEPRECRATED] see type
Parameters
- $txType : string
-
the txType
setType()
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()
Gets LedgerEntry as array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —LedgerEntry as array