/// <summary> /// Records a response in the last RequestFlowItem stored in the Items list. /// </summary> /// <param name="responseObject"></param> public void RecordResponse(IPayPalSerializableObject responseObject) { if (responseObject != null && this.Items.Any()) { this.Items.Last().Response = Common.FormatJsonString(responseObject.ConvertToJson()); } }
/// <summary> /// Records a response in the last RequestFlowItem stored in the Items list. /// </summary> /// <param name="responseObject"></param> public void RecordResponse(IPayPalSerializableObject responseObject) { if(responseObject != null && this.Items.Any()) { this.Items.Last().Response = Common.FormatJsonString(responseObject.ConvertToJson()); } }
/// <summary> /// Adds a new RequestFlowItem to the list of Items. /// </summary> /// <param name="title">Title of this flow item.</param> /// <param name="requestObject">(Optional) The object used for the request.</param> /// <param name="description">(Optional) The description of the request.</param> public void AddNewRequest(string title, IPayPalSerializableObject requestObject = null, string description = "") { this.Items.Add(new RequestFlowItem() { Request = requestObject == null ? string.Empty : Common.FormatJsonString(requestObject.ConvertToJson()), Title = title, Description = description }); }
public static void LogRecord(IPayPalSerializableObject responseObject) { Tools.Tool.Log.Write("Paypal", FormatJsonString(responseObject.ConvertToJson())); }