aboutsummaryrefslogtreecommitdiff
path: root/src/Enmarcha.Backend/Services/FareService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Enmarcha.Backend/Services/FareService.cs')
-rw-r--r--src/Enmarcha.Backend/Services/FareService.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Enmarcha.Backend/Services/FareService.cs b/src/Enmarcha.Backend/Services/FareService.cs
index fda5eb5..294166d 100644
--- a/src/Enmarcha.Backend/Services/FareService.cs
+++ b/src/Enmarcha.Backend/Services/FareService.cs
@@ -25,6 +25,9 @@ public class FareService
private const decimal OurenseCashFare = 0.85M;
private const decimal OurenseCardFare = 0.49M;
+ private const decimal LugoCashFare = 0.64M;
+ private const decimal LugoCardFare = 0.45M;
+
public FareService(
IOptions<AppConfiguration> config,
XuntaFareProvider xuntaFareProvider,
@@ -77,6 +80,9 @@ public class FareService
case "ourense":
total += OurenseCashFare;
break;
+ case "lugo":
+ total += LugoCashFare;
+ break;
case "xunta":
// TODO: Handle potentiall blow-ups
if (leg.From is not { ZoneId: not null })
@@ -137,6 +143,12 @@ public class FareService
maxUsages = 2;
initialFare = OurenseCardFare;
break;
+ case "lugo":
+ // IDK About card rules, so we set it to zero
+ maxMinutes = 0;
+ maxUsages = 0;
+ initialFare = LugoCardFare;
+ break;
case "xunta":
if (leg.From?.ZoneId == null || leg.To?.ZoneId == null)
{