Payment Credit
class PaymentCredit(var id: Int? = null, var period: String? = null, var visits: Int? = null, var unitsEarned: Double? = null, var issuedBy: String? = null)
PaymentCredit — represents a credit that contributes to a PaymentBill.
Credits are awarded based on visits in a given period and determine how much of the member’s activity counts toward the bill.
Properties
id Unique identifier for the credit transaction.
period Year and month of the credit (format
yyyy-MM, e.g.,"2022-02").visits Number of visits recorded in that period.
unitsEarned Units (monetary or point value) awarded for that period.
Example (Kotlin)
val bill = AFCore.payments().get().first()
bill?.credits?.forEach { credit ->
println("Credit: ${credit?.unitsEarned} units for ${credit?.visits} visits in ${credit?.period}")
}Content copied to clipboard