Skip to content

Commit

Permalink
Update data models (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
openactive-bot authored Jun 24, 2021
1 parent 3fe60bf commit 0a583be
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 4 deletions.
6 changes: 4 additions & 2 deletions OpenActive.NET/enums/OrderItemStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public enum OrderItemStatus
CustomerCancelled,
[EnumMember(Value = "https://openactive.io/OrderItemConfirmed")]
OrderItemConfirmed,
[EnumMember(Value = "https://openactive.io/CustomerAttended")]
CustomerAttended
[EnumMember(Value = "https://openactive.io/AttendeeAttended")]
AttendeeAttended,
[EnumMember(Value = "https://openactive.io/AttendeeAbsent")]
AttendeeAbsent
}
}
2 changes: 2 additions & 0 deletions OpenActive.NET/enums/TestOpportunityCriteriaEnumeration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public enum TestOpportunityCriteriaEnumeration
TestOpportunityBookableInPast,
[EnumMember(Value = "https://openactive.io/test-interface#TestOpportunityBookableNoSpaces")]
TestOpportunityBookableNoSpaces,
[EnumMember(Value = "https://openactive.io/test-interface#TestOpportunityBookableOneSpace")]
TestOpportunityBookableOneSpace,
[EnumMember(Value = "https://openactive.io/test-interface#TestOpportunityBookableFiveSpaces")]
TestOpportunityBookableFiveSpaces,
[EnumMember(Value = "https://openactive.io/test-interface#TestOpportunityBookableFree")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace OpenActive.NET
/// This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used.
/// </summary>
[DataContract]
public partial class OpportunityAttendanceUpdateSimulateAction : OpenBookingSimulateAction
public partial class AttendeeAbsentSimulateAction : OpenBookingSimulateAction
{
/// <summary>
/// Returns the JSON-LD representation of this instance.
Expand Down Expand Up @@ -43,6 +43,6 @@ public override string ToString()
/// Gets the name of the type as specified by schema.org.
/// </summary>
[DataMember(Name = "@type", Order = 1)]
public override string Type => "test:OpportunityAttendanceUpdateSimulateAction";
public override string Type => "test:AttendeeAbsentSimulateAction";
}
}
48 changes: 48 additions & 0 deletions OpenActive.NET/models/AttendeeAttendedSimulateAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace OpenActive.NET
{
/// <summary>
/// [NOTICE: This class is part of the Open Booking API Test Interface, and MUST NOT be used in production.]
/// This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used.
/// </summary>
[DataContract]
public partial class AttendeeAttendedSimulateAction : OpenBookingSimulateAction
{
/// <summary>
/// Returns the JSON-LD representation of this instance.
/// This method overrides Schema.NET ToString() to serialise using OpenActiveSerializer.
/// </summary>
/// <returns>A <see cref="string" /> that represents the JSON-LD representation of this instance.</returns>
public override string ToString()
{
return OpenActiveSerializer.Serialize(this);
}

/// <summary>
/// Returns the JSON-LD representation of this instance, including "https://schema.org" in the "@context".
///
/// This method must be used when you want to embed the output raw (as-is) into a web
/// page. It uses serializer settings with HTML escaping to avoid Cross-Site Scripting (XSS)
/// vulnerabilities if the object was constructed from an untrusted source.
///
/// This method overrides Schema.NET ToHtmlEscapedString() to serialise using OpenActiveSerializer.
/// </summary>
/// <returns>
/// A <see cref="string" /> that represents the JSON-LD representation of this instance.
/// </returns>
public new string ToHtmlEscapedString()
{
return OpenActiveSerializer.SerializeToHtmlEmbeddableString(this);
}

/// <summary>
/// Gets the name of the type as specified by schema.org.
/// </summary>
[DataMember(Name = "@type", Order = 1)]
public override string Type => "test:AttendeeAttendedSimulateAction";
}
}

0 comments on commit 0a583be

Please sign in to comment.