Skip to content

Commit

Permalink
Fix TariffRestrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyDurov committed Sep 4, 2023
1 parent e9e113b commit 8b9f0f0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/OCPI.Net.Contracts/Tariff/OcpiTariffElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ public class OcpiTariffElement
public IEnumerable<OcpiPriceComponent>? PriceComponents { get; set; }

[JsonPropertyName("restrictions")]
public IEnumerable<OcpiTariffRestriction>? Restrictions { get; set; }
public OcpiTariffRestrictions? Restrictions { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace OCPI.Contracts;

public class OcpiTariffRestriction
public class OcpiTariffRestrictions
{
[JsonPropertyName("start_time")]
public string? StartTime { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public OcpiTariffElementValidator(ActionType actionType) : base(actionType)
RuleForEach(x => x.PriceComponents)
.SetValidator(new OcpiPriceComponentValidator(actionType));

RuleForEach(x => x.Restrictions)
JsonRuleFor(x => x.Restrictions!)
.SetValidator(new OcpiTariffRestrictionValidator(actionType));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace OCPI.Contracts;

public class OcpiTariffRestrictionValidator : ActionValidator<OcpiTariffRestriction>
public class OcpiTariffRestrictionValidator : ActionValidator<OcpiTariffRestrictions>
{
public OcpiTariffRestrictionValidator(ActionType actionType) : base(actionType)
{
Expand Down

0 comments on commit 8b9f0f0

Please sign in to comment.