/// <summary> /// Validates the cancellation data /// Sends a cancellation message for a specific order (id should already exist) to Riskified server for status and charge fees update /// </summary> /// <param name="orderCancellation"></param> /// <returns>The order notification result containing status,description and sent order id in case of successful transfer</returns> /// <exception cref="OrderFieldBadFormatException">On bad format of the order (missing fields data or invalid data)</exception> /// <exception cref="RiskifiedTransactionException">On errors with the transaction itself (network errors, bad response data)</exception> public OrderNotification Fulfill(OrderFulfillment orderFulfillment) { return SendOrder(orderFulfillment, HttpUtils.BuildUrl(_riskifiedBaseWebhookUrl, "/api/fulfill")); }
private static OrderFulfillment GenerateFulfillment(int fulfillOrderId) { FulfillmentDetails[] fulfillmentList = new FulfillmentDetails[] { new FulfillmentDetails( fulfillmentId: "123", createdAt: new DateTime(2013, 12, 8, 14, 12, 12, DateTimeKind.Local), status: FulfillmentStatusCode.Success, lineItems: new LineItem[] { new LineItem("Bag", 10.0, 1) }, trackingCompany: "TestCompany") }; OrderFulfillment orderFulfillment = new OrderFulfillment( merchantOrderId: fulfillOrderId, fulfillments: fulfillmentList); return orderFulfillment; }