/// <summary> /// Redeems the deal specified in the request. /// </summary> /// <param name="request"> /// The deal redemption request. /// </param> /// <returns> /// A deal redemption response. /// </returns> /// <exception cref="ArgumentNullException"> /// Parameter request cannot be null. /// </exception> public pubRedemptionResponse1 pubRedemption(pubRedemptionRequest1 request) { if (request == null) { throw new ArgumentNullException("request", "Parameter request cannot be null."); } Stopwatch callTimer = Stopwatch.StartNew(); pubRedemptionResponse1 result = new pubRedemptionResponse1(new pubRedemptionResponse { reqID = request.pubRedemptionRequest.reqID }); // Build a context object to pass down the pipeline. CommerceContext context = CommerceContext.BuildSynchronousContext("First Data Redeem deal", request.pubRedemptionRequest, result.pubRedemptionResponse); // Process the call. HttpStatusCode httpStatusCode = ProcessFirstDataCall(context, callTimer, () => { FirstDataRedeemDealExecutor firstDataRedeemDealExecutor = new FirstDataRedeemDealExecutor(context); return(firstDataRedeemDealExecutor.Execute()); }); // Throw exception if the operation did not succeed. if (httpStatusCode != HttpStatusCode.OK) { throw new WebFaultException <pubRedemptionResponse1>(result, httpStatusCode); } return(result); }
public pubRedemptionResponse pubRedemption(pubRedemptionRequest pubRedemptionRequest) { pubRedemptionRequest1 inValue = new pubRedemptionRequest1(); inValue.pubRedemptionRequest = pubRedemptionRequest; pubRedemptionResponse1 retVal = ((providerInterface)(this)).pubRedemption(inValue); return(retVal.pubRedemptionResponse); }