/**
 * PostNL Ecommerce APIsLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

import { number, object, optional, Schema, string } from '../schema';

export interface Content {
  /** Description of goods */
  description: string;
  /** Fill in the total of the item(s) */
  quantity: number;
  /** Net weight of goods in gram(gr) */
  weight: number;
  /** Commercial (customs) value of goods. Fill in the value of the item(s). */
  value: number;
  /** Specify every item with the standard HS commodity code (6-8-10 digits HS-code), [more information](https://tarief.douane.nl/arctictariff-public-web/#!/home). Note: punctuation marks and symbols are not allowed. */
  hSTariffNr?: string;
  /** Fill in the code of the country where the item was produced (ISO-code), [more information](https://www.iso.org/home.html) */
  countryOfOrigin?: string;
}

export const contentSchema: Schema<Content> = object({
  description: ['Description', string()],
  quantity: ['Quantity', number()],
  weight: ['Weight', number()],
  value: ['Value', number()],
  hSTariffNr: ['HSTariffNr', optional(string())],
  countryOfOrigin: ['CountryOfOrigin', optional(string())],
});
