Imports Tami.Pago.Core

Public Module PriceHelper
    <System.Runtime.CompilerServices.Extension()>
    Public Function GetTotalAmount(ByVal basket As RequestBasketBase) As Decimal
        If basket IsNot Nothing AndAlso basket.BasketItems IsNot Nothing AndAlso basket.BasketItems.Count > 0 Then
            Return basket.BasketItems.Sum(Function(m) m.TotalPrice)
        End If

        Return 0
    End Function
End Module
