import { BaseRequest } from './base-request';
import {
  AdvancedOptions,
  ConfirmationTypes,
  FulfillmentPlanDetails,
  InsuranceProviders,
  DocumentFormat,
  LabelLayouts,
  Package,
  ReturnLabelDetails,
  ShipFrom,
  PudoLocation,
  ShipFromDisplay,
  ShipTo,
  Document,
  TimeWindow,
  RelayPointDetails,
  DisplayScheme,
  Customs,
  BillTo,
} from '../models';

/** @description Basic structure for a request to create a label */
export class CreateLabelRequest extends BaseRequest {
  service_code?: string;
  ship_datetime!: string;
  confirmation?: ConfirmationTypes;
  label_format?: DocumentFormat;
  label_layout?: LabelLayouts;
  /** @description Whether the request is for a test */
  is_test_label?: boolean;
  /** @description Any additional options a shipment may require, including custom options */
  advanced_options?: AdvancedOptions;
  insurance_provider?: InsuranceProviders;
  /** @description Whether the shipment is a return */
  is_return_label!: boolean;
  packages!: Package[];
  ship_to!: ShipTo;
  ship_from!: ShipFrom;
  pickup_location?: PudoLocation;
  relay_points?: RelayPointDetails;
  ship_from_display?: ShipFromDisplay;
  /** @description Whether the shipment requires next day shipping */
  next_day?: boolean;
  /** @description Whether the shipment is international */
  international?: boolean;
  reference?: string;
  return_details?: ReturnLabelDetails;
  fulfillment_plan_details?: FulfillmentPlanDetails;
  attachments?: Document[];
  /** @description The carrier pickup window is the time designated when the carrier will pickup your package from the initial location */
  carrier_pickup_window?: TimeWindow;
  /** @description Unique identifier for the carrier rate */
  carrier_rate_id?: string;
  /** @description Display schemes that the label will be returned in. Label is returned by default */
  display_schemes?: DisplayScheme[];
  customs?: Customs;
  /** @description Bill the shipping charges to this entity. If null, it should be assumed the "shipper" is responsible for the shipping charges. */
  bill_shipping_to?: BillTo;
}
