Skip to content

Commit

Permalink
SubscriptionStatus enum added
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenba committed Dec 2, 2014
1 parent e745521 commit d996ca1
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SyntaxTree.FastSpring.Api
{
public enum Status
public enum OrderStatus
{
[XmlEnum("open")]
Open,
Expand Down
2 changes: 1 addition & 1 deletion src/SyntaxTree.FastSpring.Api/Payment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace SyntaxTree.FastSpring.Api
public sealed class Payment
{
[XmlElement("status")]
public Status Status { get; set; }
public OrderStatus OrderStatus { get; set; }

[XmlElement("statusChanged")]
public DateTime StatusChanged { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/SyntaxTree.FastSpring.Api/ShortOrder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ShortOrder
public string Reference { get; set; }

[XmlElement("status")]
public Status Status { get; set; }
public OrderStatus OrderStatus { get; set; }

[XmlElement("statusChanged")]
public DateTime StatusChanged { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/SyntaxTree.FastSpring.Api/Subscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ namespace SyntaxTree.FastSpring.Api
public sealed class Subscription
{
[XmlElement("status")]
public Status Status { get; set; }
public SubscriptionStatus OrderStatus { get; set; }

[XmlElement("statusChanged")]
public DateTime StatusChanged { get; set; }

[XmlElement("statusReason")]
public string StatusReason { get; set; }
public SubscriptionStatusReason StatusReason { get; set; }

[XmlElement("cancelable")]
public bool Cancelable { get; set; }
Expand Down
13 changes: 13 additions & 0 deletions src/SyntaxTree.FastSpring.Api/SubscriptionStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Xml.Serialization;

namespace SyntaxTree.FastSpring.Api
{
public enum SubscriptionStatus
{
[XmlEnum("active")]
Active,

[XmlEnum("inactive")]
Inactive
}
}
17 changes: 17 additions & 0 deletions src/SyntaxTree.FastSpring.Api/SubscriptionStatusReason.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Xml.Serialization;

namespace SyntaxTree.FastSpring.Api
{
public enum SubscriptionStatusReason
{
[XmlEnum("canceled-non-payment")]
CanceledNonPayent,


[XmlEnum("completed")]
Completed,

[XmlEnum("canceled")]
Canceled
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@
<Compile Include="PaymentDeclinationReason.cs" />
<Compile Include="PaymentMethod.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Status.cs" />
<Compile Include="OrderStatus.cs" />
<Compile Include="StoreCredential.cs" />
<Compile Include="Subscription.cs" />
<Compile Include="SubscriptionStatus.cs" />
<Compile Include="SubscriptionStatusReason.cs" />
</ItemGroup>
<ItemGroup>
<None Include="SyntaxTree.FastSpring.Api.nuspec" />
Expand Down

0 comments on commit d996ca1

Please sign in to comment.