Skip to content

Commit

Permalink
fix cancellation model to receive id also as string
Browse files Browse the repository at this point in the history
  • Loading branch information
itaywaxman committed Apr 3, 2016
1 parent 5d4e706 commit 58cf634
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Riskified.SDK/Model/OrderCancellation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ public OrderCancellation(int merchantOrderId, DateTime cancelledAt, string cance
CancelReason = cancelReason;
}

/// <summary>
/// Creates an order cancellation
/// </summary>
/// <param name="merchantOrderId">The unique id of the order at the merchant systems</param>
/// <param name="cancelledAt">The date and time when the order was cancelled (optional)</param>
/// <param name="cancelReason">If the order was cancelled, the value will be one of the following:
/// "customer": The customer changed or cancelled the order.
/// "fraud": The order was fraudulent.
/// "inventory": Items in the order were not in inventory.
/// "other": The order was cancelled for a reason not in the list above. </param>
public OrderCancellation(string merchantOrderId, DateTime cancelledAt, string cancelReason) : base(merchantOrderId)
{
CancelledAt = cancelledAt;
CancelReason = cancelReason;
}

public override void Validate(Validations validationType = Validations.Weak)
{
base.Validate(validationType);
Expand Down

0 comments on commit 58cf634

Please sign in to comment.