Webiant Logo Webiant Logo
  1. No results found.

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

CreateHSClassificationRequest.cs

using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;

namespace Nop.Plugin.Tax.Avalara.ItemClassificationAPI;

/// 
/// Represents a request to HS classify an item for a single country of destination
/// 
public class CreateHSClassificationRequest : Request
{
    public CreateHSClassificationRequest(string companyId)
    {
        CompanyId = companyId;
    }

    /// 
    /// Gets or sets the company Id
    /// 
    [JsonIgnore]
    public string CompanyId { get; }

    /// 
    /// The id of the HS classification request. This id is created by CreateHSClassificationRequest and returned in the response
    /// 
    [JsonProperty(PropertyName = "id")]
    public string Id { get; set; }

    /// 
    /// Country of destination (ISO code of country)
    /// 
    /// 
    /// Required
    /// 
    [JsonProperty(PropertyName = "countryOfDestination")]
    public string CountryOfDestination { get; set; }

    /// 
    /// Item
    /// 
    /// 
    /// Required
    /// 
    [JsonProperty(PropertyName = "item")]
    public ItemClassificationModel Item { get; set; }

    /// 
    /// Gets the request path
    /// 
    public override string Path => $"api/v2/companies/{CompanyId}/classifications/hs/";

    /// 
    /// Gets the request method
    /// 
    public override string Method => HttpMethods.Post;
}