/// <summary> /// Gets a collection of <see cref="IAppliedPayment"/>s by the payment key /// </summary> /// <param name="paymentKey">The payment key</param> /// <returns>A collection of <see cref="IAppliedPayment"/></returns> public IEnumerable <IAppliedPayment> GetAppliedPaymentsByPaymentKey(Guid paymentKey) { return(_appliedPaymentService.GetAppliedPaymentsByPaymentKey(paymentKey)); }
/// <summary> /// Gets a collection of <see cref="IInvoice"/> objects that are associated with a <see cref="IPayment"/> by the payments 'key' /// </summary> /// <param name="paymentKey">The <see cref="IPayment"/> key (GUID)</param> /// <returns>A collection of <see cref="IInvoice"/></returns> public IEnumerable <IInvoice> GetInvoicesByPaymentKey(Guid paymentKey) { var invoiceKeys = _appliedPaymentService.GetAppliedPaymentsByPaymentKey(paymentKey).Select(x => x.InvoiceKey).ToArray(); return(GetByKeys(invoiceKeys)); }