# frozen_string_literal: true

# This file is generated. Do not edit.

require "peddler/types/vendor_shipments_v1/party_identification"
require "peddler/types/vendor_shipments_v1/item"
require "peddler/types/vendor_shipments_v1/carton"
require "peddler/types/vendor_shipments_v1/import_details"
require "peddler/types/vendor_shipments_v1/pallet"
require "peddler/types/vendor_shipments_v1/shipment_measurements"
require "peddler/types/vendor_shipments_v1/transportation_details_for_shipment_confirmation"

module Peddler
  module Types
    module VendorShipmentsV1
      # A list of one or more shipment confirmations.
      ShipmentConfirmation = Structure.new do
        # @return [PartyIdentification] Name/Address and tax details of the selling party.
        attribute(:selling_party, PartyIdentification, from: "sellingParty")

        # @return [PartyIdentification] Name/Address and tax details of the ship from party.
        attribute(:ship_from_party, PartyIdentification, from: "shipFromParty")

        # @return [PartyIdentification] Name/Address of the destination warehouse where the shipment is being shipped
        # to.
        attribute(:ship_to_party, PartyIdentification, from: "shipToParty")

        # @return [String] Date on which the shipment confirmation was submitted.
        attribute(:shipment_confirmation_date, String, from: "shipmentConfirmationDate")

        # @return [String] Indicates if this shipment confirmation is the initial confirmation, or intended to replace
        # an already posted shipment confirmation. If replacing an existing shipment confirmation, be sure to provide
        # the identical shipmentIdentifier and sellingParty information as in the previous confirmation.
        attribute(:shipment_confirmation_type, String, from: "shipmentConfirmationType")

        # @return [String] Unique shipment ID (not used over the last 365 days).
        attribute(:shipment_identifier, String, from: "shipmentIdentifier")

        # @return [Array<Item>] A list of the items in this shipment and their associated details. If any of the item
        # detail fields are common at a carton or a pallet level, provide them at the corresponding carton or pallet
        # level.
        attribute(:shipped_items, [Item], from: "shippedItems")

        # @return [String] The Amazon Reference Number is a unique identifier generated by Amazon for all Collect/WePay
        # shipments when you submit a routing request. This field is mandatory for Collect/WePay shipments.
        attribute?(:amazon_reference_number, String, from: "amazonReferenceNumber")

        # @return [Array<Carton>] A list of the cartons in this shipment.
        attribute?(:cartons, [Carton])

        # @return [String] The date and time on which the shipment is estimated to reach buyer's warehouse. It needs to
        # be an estimate based on the average transit time between ship from location and the destination. The exact
        # appointment time will be provided by the buyer and is potentially not known when creating the shipment
        # confirmation.
        attribute?(:estimated_delivery_date, String, from: "estimatedDeliveryDate")

        # @return [ImportDetails] Provide these fields only if this shipment is a direct import.
        attribute?(:import_details, ImportDetails, from: "importDetails")

        # @return [Array<Pallet>] A list of the pallets in this shipment.
        attribute?(:pallets, [Pallet])

        # @return [ShipmentMeasurements]
        attribute?(:shipment_measurements, ShipmentMeasurements, from: "shipmentMeasurements")

        # @return [String] Shipment hierarchical structure.
        attribute?(:shipment_structure, String, from: "shipmentStructure")

        # @return [String] The type of shipment.
        attribute?(:shipment_type, String, from: "shipmentType")

        # @return [String] The date and time of the departure of the shipment from the vendor's location. Vendors are
        # requested to send ASNs within 30 minutes of departure from their warehouse/distribution center or at least 6
        # hours prior to the appointment time at the buyer destination warehouse, whichever is sooner. Shipped date
        # mentioned in the shipment confirmation should not be in the future.
        attribute?(:shipped_date, String, from: "shippedDate")

        # @return [TransportationDetailsForShipmentConfirmation] Transportation details for this shipment.
        attribute?(:transportation_details, TransportationDetailsForShipmentConfirmation, from: "transportationDetails")
      end
    end
  end
end
