FedEX – Create open shipment

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WooCommerceWeb.Models
{
  
    public class AccountNumber
    {
        public string value { get; set; }
    }

    public class AdditionalMeasure
    {
        public double quantity { get; set; }
        public string units { get; set; }
    }

    public class Address
    {
        public List<string> streetLines { get; set; }
        public string city { get; set; }
        public string stateOrProvinceCode { get; set; }
        public string postalCode { get; set; }
        public string countryCode { get; set; }
        public bool residential { get; set; }
    }
public class AddTransportationChargesDetail
{
    public string rateType { get; set; }
    public string rateLevelType { get; set; }
    public string chargeLevelType { get; set; }
    public string chargeType { get; set; }
}

public class AlcoholDetail
{
    public string alcoholRecipientType { get; set; }
    public string shipperAgreementType { get; set; }
}

public class AttachedDocument
{
    public string documentType { get; set; }
    public string documentReference { get; set; }
    public string description { get; set; }
    public string documentId { get; set; }
}

public class BatteryDetail
{
    public string batteryPackingType { get; set; }
    public string batteryRegulatoryType { get; set; }
    public string batteryMaterialType { get; set; }
}

public class BillingDetails
{
    public string billingCode { get; set; }
    public string billingType { get; set; }
    public string aliasId { get; set; }
    public string accountNickname { get; set; }
    public string accountNumber { get; set; }
    public string accountNumberCountryCode { get; set; }
}

    public class Broker
    {
        public Broker broker { get; set; }
        public string type { get; set; }
    }

    public class Broker2
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
        public AccountNumber accountNumber { get; set; }
        public List<Tin> tins { get; set; }
        public string deliveryInstructions { get; set; }
    }

    public class CodCollectionAmount
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class CodRecipient
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
        public AccountNumber accountNumber { get; set; }
        public List<Tin> tins { get; set; }
    }

    public class CommercialInvoice
    {
        public string originatorName { get; set; }
        public List<string> comments { get; set; }
        public List<CustomerReference> customerReferences { get; set; }
        public TaxesOrMiscellaneousCharge taxesOrMiscellaneousCharge { get; set; }
        public string taxesOrMiscellaneousChargeType { get; set; }
        public FreightCharge freightCharge { get; set; }
        public PackingCosts packingCosts { get; set; }
        public HandlingCosts handlingCosts { get; set; }
        public string declarationStatement { get; set; }
        public string termsOfSale { get; set; }
        public string specialInstructions { get; set; }
        public string shipmentPurpose { get; set; }
        public EmailNotificationDetail emailNotificationDetail { get; set; }
    }

    public class Commodity
    {
        public UnitPrice unitPrice { get; set; }
        public List<AdditionalMeasure> additionalMeasures { get; set; }
        public int numberOfPieces { get; set; }
        public int quantity { get; set; }
        public string quantityUnits { get; set; }
        public CustomsValue customsValue { get; set; }
        public string countryOfManufacture { get; set; }
        public string cIMarksAndNumbers { get; set; }
        public string harmonizedCode { get; set; }
        public string description { get; set; }
        public string name { get; set; }
        public Weight weight { get; set; }
        public string exportLicenseNumber { get; set; }
        public DateTime exportLicenseExpirationDate { get; set; }
        public string partNumber { get; set; }
        public string purpose { get; set; }
        public UsmcaDetail usmcaDetail { get; set; }
    }

    public class Contact
    {
        public string personName { get; set; }
        public string emailAddress { get; set; }
        public string phoneExtension { get; set; }
        public string phoneNumber { get; set; }
        public string companyName { get; set; }
        public int faxNumber { get; set; }
    }

    public class ContentRecord
    {
        public string itemNumber { get; set; }
        public int receivedQuantity { get; set; }
        public string description { get; set; }
        public string partNumber { get; set; }
    }

    public class CustomerReference
    {
        public string customerReferenceType { get; set; }
        public string value { get; set; }
    }

    public class CustomsClearanceDetail
    {
        public string regulatoryControls { get; set; }
        public List<Broker> brokers { get; set; }
        public CommercialInvoice commercialInvoice { get; set; }
        public string freightOnValue { get; set; }
        public DutiesPayment dutiesPayment { get; set; }
        public List<Commodity> commodities { get; set; }
        public bool isDocumentOnly { get; set; }
        public RecipientCustomsId recipientCustomsId { get; set; }
        public CustomsOption customsOption { get; set; }
        public ImporterOfRecord importerOfRecord { get; set; }
        public string generatedDocumentLocale { get; set; }
        public ExportDetail exportDetail { get; set; }
        public TotalCustomsValue totalCustomsValue { get; set; }
        public bool partiesToTransactionAreRelated { get; set; }
        public DeclarationStatementDetail declarationStatementDetail { get; set; }
        public InsuranceCharge insuranceCharge { get; set; }
    }

    public class CustomsOption
    {
        public string description { get; set; }
        public string type { get; set; }
    }

    public class CustomsValue
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class DangerousGoodsDetail
    {
        public string accessibility { get; set; }
        public bool cargoAircraftOnly { get; set; }
        public List<string> options { get; set; }
    }

    public class DeclarationStatementDetail
    {
        public UsmcaLowValueStatementDetail usmcaLowValueStatementDetail { get; set; }
    }

    public class DeclaredValue
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class DeliveryOnInvoiceAcceptanceDetail
    {
        public Recipient recipient { get; set; }
    }

    public class DestinationControlDetail
    {
        public string endUser { get; set; }
        public string statementTypes { get; set; }
        public List<string> destinationCountries { get; set; }
    }

    public class Dimensionss
    {
        public int length { get; set; }
        public int width { get; set; }
        public int height { get; set; }
        public string units { get; set; }
    }

    public class DryIceWeight
    {
        public string units { get; set; }
        public int value { get; set; }
    }

    public class DutiesPayment
    {
        public Payor payor { get; set; }
        public BillingDetails billingDetails { get; set; }
        public string paymentType { get; set; }
    }

    public class EmailNotificationDetail
    {
        public string aggregationType { get; set; }
        public List<EmailNotificationRecipient> emailNotificationRecipients { get; set; }
        public string personalMessage { get; set; }
        public string emailAddress { get; set; }
        public string type { get; set; }
        public string recipientType { get; set; }
    }

    public class EmailNotificationRecipient
    {
        public string name { get; set; }
        public string emailNotificationRecipientType { get; set; }
        public string emailAddress { get; set; }
        public string notificationFormatType { get; set; }
        public string notificationType { get; set; }
        public string locale { get; set; }
        public List<string> notificationEventType { get; set; }
    }

    public class EtdDetail
    {
        public List<string> attributes { get; set; }
        public List<AttachedDocument> attachedDocuments { get; set; }
        public List<string> requestedDocumentTypes { get; set; }
    }

    public class ExportDetail
    {
        public DestinationControlDetail destinationControlDetail { get; set; }
        public string b13AFilingOption { get; set; }
        public string exportComplianceStatement { get; set; }
        public string permitNumber { get; set; }
    }

    public class ExpressFreightDetail
    {
        public string bookingConfirmationNumber { get; set; }
        public int shippersLoadAndCount { get; set; }
        public bool packingListEnclosed { get; set; }
    }

    public class FinancialInstitutionContactAndAddress
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
    }

    public class FixedValue
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class FreightCharge
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class HandlingCosts
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class HoldAtLocationDetail
    {
        public string locationId { get; set; }
        public LocationContactAndAddress locationContactAndAddress { get; set; }
        public string locationType { get; set; }
    }

    public class HomeDeliveryPremiumDetail
    {
        public PhoneNumber phoneNumber { get; set; }
        public string deliveryDate { get; set; }
        public string homedeliveryPremiumType { get; set; }
    }

    public class ImporterOfRecord
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
        public AccountNumber accountNumber { get; set; }
        public List<Tin> tins { get; set; }
    }

    public class InsuranceCharge
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class InternationalControlledExportDetail
    {
        public string licenseOrPermitExpirationDate { get; set; }
        public string licenseOrPermitNumber { get; set; }
        public string entryNumber { get; set; }
        public string foreignTradeZoneCode { get; set; }
        public string type { get; set; }
    }

    public class InternationalTrafficInArmsRegulationsDetail
    {
        public string licenseOrExemptionNumber { get; set; }
    }

    public class LocationContactAndAddress
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
    }

    public class Origin
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
    }

    public class PackageCODDetail
    {
        public CodCollectionAmount codCollectionAmount { get; set; }
    }

    public class PackageSpecialServices
    {
        public List<string> specialServiceTypes { get; set; }
        public string signatureOptionType { get; set; }
        public PriorityAlertDetail priorityAlertDetail { get; set; }
        public SignatureOptionDetail signatureOptionDetail { get; set; }
        public AlcoholDetail alcoholDetail { get; set; }
        public DangerousGoodsDetail dangerousGoodsDetail { get; set; }
        public PackageCODDetail packageCODDetail { get; set; }
        public int pieceCountVerificationBoxCount { get; set; }
        public List<BatteryDetail> batteryDetails { get; set; }
        public DryIceWeight dryIceWeight { get; set; }
    }

    public class PackingCosts
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class Payor
    {
        public ResponsibleParty responsibleParty { get; set; }
    }

    public class PhoneNumber
    {
        public string areaCode { get; set; }
        public string localNumber { get; set; }
        public string extension { get; set; }
        public string personalIdentificationNumber { get; set; }
    }

    public class PriorityAlertDetail
    {
        public List<string> enhancementTypes { get; set; }
        public List<string> content { get; set; }
    }

    public class Recipient
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
        public List<Tin> tins { get; set; }
        public string deliveryInstructions { get; set; }
    }

    public class Recipient2
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
        public List<Tin> tins { get; set; }
        public string deliveryInstructions { get; set; }
    }

    public class RecipientCustomsId
    {
        public string type { get; set; }
        public string value { get; set; }
    }

    public class RequestedPackageLineItem
    {
        public string sequenceNumber { get; set; }
        public string subPackagingType { get; set; }
        public List<CustomerReference> customerReferences { get; set; }
        public DeclaredValue declaredValue { get; set; }
        public Weight weight { get; set; }
        public Dimensionss dimensions { get; set; }
        public int groupPackageCount { get; set; }
        public string itemDescriptionForClearance { get; set; }
        public List<ContentRecord> contentRecord { get; set; }
        public string itemDescription { get; set; }
        public VariableHandlingChargeDetail variableHandlingChargeDetail { get; set; }
        public PackageSpecialServices packageSpecialServices { get; set; }
    }

    public class RequestedShipment
    {
        public string shipDatestamp { get; set; }
        public string pickupType { get; set; }
        public string serviceType { get; set; }
        public string packagingType { get; set; }
        public double totalWeight { get; set; }
        public Shipper shipper { get; set; }
        public List<Recipient> recipients { get; set; }
        public SoldTo soldTo { get; set; }
        public Origin origin { get; set; }
        public ShippingChargesPayment shippingChargesPayment { get; set; }
        public ShipmentSpecialServices shipmentSpecialServices { get; set; }
        public EmailNotificationDetail emailNotificationDetail { get; set; }
        public ExpressFreightDetail expressFreightDetail { get; set; }
        public VariableHandlingChargeDetail variableHandlingChargeDetail { get; set; }
        public CustomsClearanceDetail customsClearanceDetail { get; set; }
        public SmartPostInfoDetail smartPostInfoDetail { get; set; }
        public bool blockInsightVisibility { get; set; }
        public List<string> rateRequestType { get; set; }
        public string preferredCurrency { get; set; }
        public List<RequestedPackageLineItem> requestedPackageLineItems { get; set; }
    }

    public class ResponsibleParty
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
        public AccountNumber accountNumber { get; set; }
        public List<Tin> tins { get; set; }
    }

    public class CreateOpenShipApiRequest
    {
        public RequestedShipment requestedShipment { get; set; }
        public AccountNumber accountNumber { get; set; }
        public string openShipmentAction { get; set; }
        public string index { get; set; }
    }

    public class ShipmentCodAmount
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class ShipmentCODDetail
    {
        public AddTransportationChargesDetail addTransportationChargesDetail { get; set; }
        public CodRecipient codRecipient { get; set; }
        public string remitToName { get; set; }
        public string codCollectionType { get; set; }
        public FinancialInstitutionContactAndAddress financialInstitutionContactAndAddress { get; set; }
        public CodCollectionAmount codCollectionAmount { get; set; }
        public string returnReferenceIndicatorType { get; set; }
        public ShipmentCodAmount shipmentCodAmount { get; set; }
    }

    public class ShipmentDryIceDetail
    {
        public TotalWeight totalWeight { get; set; }
        public int packageCount { get; set; }
    }

    public class ShipmentSpecialServices
    {
        public List<string> specialServiceTypes { get; set; }
        public EtdDetail etdDetail { get; set; }
        public DeliveryOnInvoiceAcceptanceDetail deliveryOnInvoiceAcceptanceDetail { get; set; }
        public InternationalTrafficInArmsRegulationsDetail internationalTrafficInArmsRegulationsDetail { get; set; }
        public HoldAtLocationDetail holdAtLocationDetail { get; set; }
        public ShipmentCODDetail shipmentCODDetail { get; set; }
        public ShipmentDryIceDetail shipmentDryIceDetail { get; set; }
        public InternationalControlledExportDetail internationalControlledExportDetail { get; set; }
        public HomeDeliveryPremiumDetail homeDeliveryPremiumDetail { get; set; }
    }

    public class Shipper
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
        public List<Tin> tins { get; set; }
    }

    public class ShippingChargesPayment
    {
        public string paymentType { get; set; }
        public Payor payor { get; set; }
    }

    public class SignatureOptionDetail
    {
        public string signatureReleaseNumber { get; set; }
    }

    public class SmartPostInfoDetail
    {
        public string ancillaryEndorsement { get; set; }
        public string hubId { get; set; }
        public string indicia { get; set; }
        public string specialServices { get; set; }
    }

    public class SoldTo
    {
        public Address address { get; set; }
        public Contact contact { get; set; }
        public List<Tin> tins { get; set; }
        public AccountNumber accountNumber { get; set; }
    }

    public class TaxesOrMiscellaneousCharge
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class Tin
    {
        public string number { get; set; }
        public string tinType { get; set; }
        public string usage { get; set; }
        public DateTime effectiveDate { get; set; }
        public DateTime expirationDate { get; set; }
    }

    public class TotalCustomsValue
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class TotalWeight
    {
        public string units { get; set; }
        public int value { get; set; }
    }

    public class UnitPrice
    {
        public double amount { get; set; }
        public string currency { get; set; }
    }

    public class UsmcaDetail
    {
        public string originCriterion { get; set; }
    }

    public class UsmcaLowValueStatementDetail
    {
        public bool countryOfOriginLowValueDocumentRequested { get; set; }
        public string customsRole { get; set; }
    }

    public class VariableHandlingChargeDetail
    {
        public string rateType { get; set; }
        public double percentValue { get; set; }
        public string rateLevelType { get; set; }
        public FixedValue fixedValue { get; set; }
        public string rateElementBasis { get; set; }
    }

    public class Weight
    {
        public string units { get; set; }
        public int value { get; set; }
    }


}

Share


Categories

Leave a Reply

Your email address will not be published. Required fields are marked *