PaymentCredit

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}")
}

Constructors

Link copied to clipboard
constructor(id: Int? = null, period: String? = null, visits: Int? = null, unitsEarned: Double? = null, issuedBy: String? = null)

Properties

Link copied to clipboard
var id: Int?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var visits: Int?

Functions

Link copied to clipboard
open override fun toString(): String