The function is:

getAccountPaymentAppliedOptions()

however you are storing in the variables scope as:

variables.appliedAccountPayment[s]Options

Notice the [s] that I've highlighted.  Also, if you are storing anything in the variables scope, you should define a non-persistent property for it at the top of the file.  In addition, this method should sit inside of the comments that start below on line 228

// ============ START: Non-Persistent Property Methods =================