Skip to content

Commit

Permalink
Support string CategoryKey on ChartObjectInfo (#118)
Browse files Browse the repository at this point in the history
Adding a category supports string keys/guids.
Update the reports response object to support the
same.
  • Loading branch information
rahulpnath authored May 7, 2024
1 parent 313fb79 commit 5efaf58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SeatsioDotNet.Test/Reports/Charts/ChartReportsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public async Task ReportItemProperties(Func<SeatsioClient, string, Task> updateC
reportItem.Labels.Should().BeEquivalentTo(new Labels("1", "seat", "A", "row"));
reportItem.IDs.Should().BeEquivalentTo(new IDs("1", "A", null));
Assert.Equal("Cat1", reportItem.CategoryLabel);
Assert.Equal(9, reportItem.CategoryKey);
Assert.Equal("9", reportItem.CategoryKey);
Assert.Equal("seat", reportItem.ObjectType);
Assert.Null(reportItem.Section);
Assert.Null(reportItem.Entrance);
Expand Down
4 changes: 2 additions & 2 deletions SeatsioDotNet.Test/resources/sampleChartWithSections.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"label": "cat1",
"color": "#AEDB54",
"accessible": false,
"key": 1
"key": "019b4f41-9cd8-4988-9d74-308563a089a2"
},
{
"label": "cat2",
Expand Down Expand Up @@ -59,7 +59,7 @@
"labelRotationAngle": 0,
"uuid": "uuid2",
"categoryLabel": "cat1",
"categoryKey": 1,
"categoryKey": "019b4f41-9cd8-4988-9d74-308563a089a2",
"topLeft": {
"x": 0,
"y": 0
Expand Down
2 changes: 1 addition & 1 deletion SeatsioDotNet/Charts/ChartObjectInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class ChartObjectInfo
public Labels Labels { get; set; }
public IDs IDs { get; set; }
public string CategoryLabel { get; set; }
public int? CategoryKey { get; set; }
public string CategoryKey { get; set; }
public string ObjectType { get; set; }
public string Section { get; set; }
public string Entrance { get; set; }
Expand Down

0 comments on commit 5efaf58

Please sign in to comment.