Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

UpdateOrderRequest.cs

using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using Nop.Plugin.Payments.PayPalCommerce.Services.Api.Models;

namespace Nop.Plugin.Payments.PayPalCommerce.Services.Api.Orders;

/// 
/// Represents the request to update the order
/// 
public class UpdateOrderRequest : List>, IAuthorizedRequest where TValue : class
{
    #region Ctor

    public UpdateOrderRequest(IEnumerable> collection) : base(collection)
    {
    }

    #endregion

    #region Properties

    /// 
    /// Gets or sets the ID of the order to update.
    /// 
    [JsonIgnore]
    public string OrderId { get; set; }

    /// 
    /// Gets the request path
    /// 
    [JsonIgnore]
    public string Path => $"v2/checkout/orders/{Uri.EscapeDataString(OrderId)}?";

    /// 
    /// Gets the request method
    /// 
    [JsonIgnore]
    public string Method => HttpMethods.Patch;

    #endregion
}