Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions openTRANS/DISPATCHNOTIFICATION/Dispatchnotification.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace openTRANS {
[XmlRoot("DISPATCHNOTIFICATION", Namespace = "http://www.opentrans.org/XMLSchema/2.1", IsNullable = false)]
public class Dispatchnotification {
[XmlAttribute("schemaLocation", Namespace = XmlSchema.InstanceNamespace)]
public string xsiSchemaLocation => "http://www.opentrans.org/XMLSchema/2.1%20opentrans_2_1.xsd";

[XmlAttribute("version")]
public string Version => "2.1";

[XmlElement("DISPATCHNOTIFICATION_HEADER")]
public DispatchnotificationHeader DispatchnotificationHeader { get; set; }

[XmlArray("DISPATCHNOTIFICATION_ITEM_LIST")]
[XmlArrayItem("DISPATCHNOTIFICATION_ITEM")]
public List<DispatchnotificationItem> DispatchnotificationItemList { get; set; }

[XmlElement("DISPATCHNOTIFICATION_SUMMARY")]
public DispatchnotificationSummary DispatchnotificationSummary {
get => new DispatchnotificationSummary(this);
set { }
}
}
}
11 changes: 11 additions & 0 deletions openTRANS/DISPATCHNOTIFICATION/DispatchnotificationHeader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Xml.Serialization;

namespace openTRANS {
public class DispatchnotificationHeader {
[XmlElement("CONTROL_INFO")]
public ControlInfo ControlInfo { get; set; }

[XmlElement("DISPATCHNOTIFICATION_INFO")]
public DispatchnotificationInfo DispatchnotificationInfo { get; set; }
}
}
57 changes: 57 additions & 0 deletions openTRANS/DISPATCHNOTIFICATION/DispatchnotificationInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using static openTRANS.Common;

namespace openTRANS {
public class DispatchnotificationInfo {
[XmlElement("DISPATCHNOTIFICATION_ID")]
public string DispatchnotificationId { get; set; }

[XmlElement("DISPATCHNOTIFICATION_DATE")]
public DateTime DispatchnotificationDate { get; set; }

[XmlElement("LANGUAGE")]
public Language Language { get; set; }

[XmlElement("MIME_ROOT")]
public string MimeRoot { get; set; }

[XmlElement("DELIVERY_DATE")]
public DeliveryDate DeliveryDate { get; set; }

[XmlArray("PARTIES")]
[XmlArrayItem("PARTY")]
public List<Party> Parties { get; set; }

[XmlElement("SUPPLIER_IDREF")]
public TypedItem SupplierIdref { get; set; }

[XmlElement("BUYER_IDREF")]
public TypedItem BuyerIdref { get; set; }

[XmlElement("SHIPMENT_PARTIES_REFERENCE")]
public ShipmentPartiesReference ShipmentPartiesReference { get; set; }

[XmlElement("SHIPMENT_ID")]
public string ShipmentId { get; set; }

[XmlElement("TRACKING_TRACING_URL")]
public string TrackingTracingUrl { get; set; }

[XmlElement("DOCEXCHANGE_PARTIES_REFERENCE")]
public DocExchangePartiesReference DocExchangePartiesReference { get; set; }

[XmlElement("LOGISTC_DETAILS_INFO")]
public LogisticDetailsInfo LogisticDetailsInfo { get; set; }

[XmlElement("INTERNATIONAL_RESTRICTIONS")]
public TypedItem InternationalRestrictions { get; set; }

[XmlElement("MIMEN_INFO")]
public MimeInfo MimeInfo { get; set; }

[XmlElement("REMARKS")]
public List<TypedItem> Remarks { get; set; }
}
}
58 changes: 58 additions & 0 deletions openTRANS/DISPATCHNOTIFICATION/DispatchnotificationItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using System.Collections.Generic;
using System.Xml.Serialization;
using static openTRANS.Common;

namespace openTRANS {
public class DispatchnotificationItem {
[XmlElement("LINE_ITEM_ID")]
public string LineItemId { get; set; }

[XmlElement("PRODUCT_ID")]
public ProductId ProductId { get; set; }

[XmlElement("PRODUCT_FEATURES")]
public ProductFeatures ProductFeatures { get; set; }

[XmlElement("PRODUCT_COMPONENTS")]
public ProductComponents ProductComponents { get; set; }

[XmlElement("QUANTITY")]
public decimal Quantity { get; set; }

[XmlElement("ORDER_UNIT", Namespace = Namespace.bmecat)]
public string OrderUnit { get; set; }

[XmlElement("PARTIAL_DELIVERY_LIST")]
public List<PartialDelivery> PartialDeliveryList { get; set; }

[XmlElement("DELIVERY_COMPLETED")]
public bool DeliveryCompleted { get; set; }

[XmlElement("DELIVERY_REFERNCE")]
public DeliveryReference DeliveryReference { get; set; }

[XmlElement("SUPPLIER_IDREF", Namespace = Namespace.bmecat)]
public TypedItem SupplierIdref { get; set; }

[XmlElement("ORDER_REFERENCE")]
public OrderReference OrderReference { get; set; }

[XmlElement("SUPPLIER_ORDER_REFERENCE")]
public SupplierOrderReference SupplierOrderReference { get; set; }

[XmlElement("CUSTOMER_ORDER_REFERENCE")]
public CustomerOrderReference CustomerOrderReference { get; set; }

[XmlElement("SHIPMENT_PARTIES_REFERENCE")]
public ShipmentPartiesReference ShipmentPartiesReference { get; set; }

[XmlElement("LOGISTIC_DETAILS")]
public LogisticDetails LogisticDetails { get; set; }

[XmlElement("MIME_INFO")]
public MimeInfo MimeInfo { get; set; }

[XmlElement("REMARKS")]
public List<TypedItem> Remarks { get; set; }
}
}
15 changes: 15 additions & 0 deletions openTRANS/DISPATCHNOTIFICATION/DispatchnotificationSummary.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.Xml.Serialization;

namespace openTRANS {
public class DispatchnotificationSummary {
public DispatchnotificationSummary() {

}
public DispatchnotificationSummary(Dispatchnotification dispatchnotification) {
TotalItemNum = dispatchnotification.DispatchnotificationItemList.Count;
}

[XmlElement("TOTAL_ITEM_NUM")]
public int TotalItemNum { get; set; }
}
}
6 changes: 0 additions & 6 deletions openTRANS/SHARED/Components.cs

This file was deleted.

23 changes: 23 additions & 0 deletions openTRANS/SHARED/__delete_after_merging_pulls.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;

namespace openTRANS {
[Obsolete("This class is implemented in one of the open pull requests on github! Merge first", true)]
public class PartialDelivery {
}

[Obsolete("This class is implemented in one of the open pull requests on github! Merge first", true)]
public class DeliveryReference {
}

[Obsolete("This class is implemented in one of the open pull requests on github! Merge first", true)]
public class OrderReference {
}

[Obsolete("This class is implemented in one of the open pull requests on github! Merge first", true)]
public class SupplierOrderReference {
}

[Obsolete("This class is implemented in one of the open pull requests on github! Merge first", true)]
public class LogisticDetails {
}
}
4 changes: 4 additions & 0 deletions openTRANS/SHARED/delete_after_merge_invoice.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
namespace openTRANS {
public class LogisticDetailsInfo {
}
}
1 change: 0 additions & 1 deletion openTRANS/openTRANS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

<ItemGroup>
<Folder Include="INVOICE\" />
<Folder Include="DISPATCHNOTIFICATION\" />
<Folder Include="QUOTATION\" />
</ItemGroup>

Expand Down