import { BaseRequest } from './base-request';
import {
  ConfirmationTypes,
  AdvancedOptions,
  InsuranceProviders,
  Package,
  Customs,
  ShipFrom,
  ShipTo,
  PudoLocation,
  FulfillmentPlanDetails,
  TimeWindow,
  BillTo,
  DisplayScheme,
} from '../models';
import { ShipmentItem } from '../models/shipment-item';

/** @description Basic structure for a request to get rates */
export class GetRatesRequest extends BaseRequest {
  service_code?: string;
  ship_datetime!: string;
  confirmation?: ConfirmationTypes;
  advanced_options?: AdvancedOptions;
  insurance_provider?: InsuranceProviders;
  is_return_label!: boolean;
  packages!: Package[];
  customs?: Customs;
  ship_to!: ShipTo;
  ship_from!: ShipFrom;
  pickup_location?: PudoLocation;
  international?: boolean;
  next_day?: boolean;
  fulfillment_plan_details?: FulfillmentPlanDetails;
  /** @description The carrier pickup window is the time designated when the carrier will pickup your package from the initial location */
  carrier_pickup_window?: TimeWindow;
  /** Items included in the shipment */
  items?: ShipmentItem[];
  /** @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;
  /** @description Display schemes in which the rate will be evaluated. Labels are used by default. */
  display_schemes?: DisplayScheme[];
}
