Payment
extends DataTransferObject
in package
implements
DataModel
Payments are a record of the payments made on invoices.
Tags
Table of Contents
Interfaces
Constants
- RESPONSE_FIELD = 'payment'
Properties
- $accountingSystemId : string
- $amount : Money
- $bulkPaymentId : int|null
- $clientId : int
- $creditId : int
- $date : DateTime
- $fromCredit : bool
- $gateway : string
- $id : int
- $invoiceId : int
- $note : string
- $orderId : int|null
- $overpaymentId : int
- $paymentId : int
- $sendClientNotification : bool
- $type : string
- $updated : DateTimeImmutable
- $visState : int
Methods
- getContent() : array<string|int, mixed>
- Get the data as an array to POST or PUT to FreshBooks, removing any read-only fields.
Constants
RESPONSE_FIELD
public
mixed
RESPONSE_FIELD
= 'payment'
Properties
$accountingSystemId
public
string
$accountingSystemId
Unique identifier of account the payment exists on.
Attributes
- #[MapFrom]
- 'accounting_systemid'
$amount
public
Money
$amount
The amount of the payment.
Money object containing amount and currency code.
Attributes
- #[CastWith]
- \amcintosh\FreshBooks\Model\Caster\MoneyCaster::class
$bulkPaymentId
public
int|null
$bulkPaymentId
Attributes
- #[MapFrom]
- 'bulk_paymentid'
- #[MapTo]
- 'bulk_paymentid'
$clientId
public
int
$clientId
Id of client who made the payment.
Attributes
- #[MapFrom]
- 'clientid'
$creditId
public
int
$creditId
The id of a related credit resource.
Attributes
- #[MapFrom]
- 'creditid'
- #[MapTo]
- 'creditid'
$date
public
DateTime
$date
Date the payment was made.
The API returns this in YYYY-MM-DD format. It is converted to a DateTime.
Attributes
- #[CastWith]
- \amcintosh\FreshBooks\Model\Caster\DateCaster::class
- #[MapFrom]
- 'date'
$fromCredit
public
bool
$fromCredit
If the payment was converted from a Credit on a Client's account.
Attributes
- #[MapFrom]
- 'from_credit'
- #[MapTo]
- 'from_credit'
$gateway
public
string
$gateway
The payment processor (gateway) used to make the payment, if any.
Eg. "stripe"
$id
public
int
$id
The unique id (across this business) for the payment.
$invoiceId
public
int
$invoiceId
The id of a related Invoice resource.
Attributes
- #[MapFrom]
- 'invoiceid'
- #[MapTo]
- 'invoiceid'
$note
public
string
$note
Notes on payment, often used for credit card reference number.
Do not store actual credit card numbers here.*
$orderId
public
int|null
$orderId
Attributes
- #[MapFrom]
- 'orderid'
- #[MapTo]
- 'orderid'
$overpaymentId
public
int
$overpaymentId
Id of related overpayment Credit if relevant.
Attributes
- #[MapFrom]
- 'overpaymentid'
$paymentId
public
int
$paymentId
Duplicate of id.
Note: The API returns this as logid
.
Attributes
- #[MapFrom]
- 'logid'
$sendClientNotification
public
bool
$sendClientNotification
Whether to send the client a notification of this payment.
Attributes
- #[MapFrom]
- 'send_client_notification'
- #[MapTo]
- 'send_client_notification'
$type
public
string
$type
Type of payment made.
Eg. “Check”, “Credit”, “Cash”
$updated
public
DateTimeImmutable
$updated
The time of last modification.
Note: The API returns this data in "US/Eastern", but it is converted here to UTC.
Attributes
- #[CastWith]
- \amcintosh\FreshBooks\Model\Caster\AccountingDateTimeImmutableCaster::class
$visState
public
int
$visState
The visibility state: active, deleted, or archived
Attributes
- #[MapFrom]
- 'vis_state'
Methods
getContent()
Get the data as an array to POST or PUT to FreshBooks, removing any read-only fields.
public
getContent() : array<string|int, mixed>