2525
2626namespace OpenTrans . net
2727{
28+ /// <summary>
29+ /// Order that is issues from a Buyer to a Seller.
30+ /// </summary>
2831 public class Order
2932 {
33+ /// <summary>
34+ /// Unique order number of the buyer
35+ /// </summary>
3036 public string Id { get ; set ; }
37+
38+ /// <summary>
39+ /// Date of the order
40+ /// </summary>
3141 public DateTime ? OrderDate { get ; set ; }
42+
43+ /// <summary>
44+ /// Date of shipment. The delivery date specifies the date the commissioned goods are accepted
45+ /// by the buyer.If the delivery date deviates from the one specified in the header, the
46+ /// delivery date on item level is valid.To specify exact one date for the shipment, e.g. in the
47+ /// RECEIPTACKNOWLEDGEMENT-document.
48+ ///
49+ /// This property is accompanied by the property DesiredDeliveryDateEnd which specifies the end of the
50+ /// delivery window.
51+ /// </summary>
3252 public DateTime DesiredDeliveryDateStart { get ; set ; }
53+
54+ /// <summary>
55+ /// Date of shipment. The delivery date specifies the date the commissioned goods are accepted
56+ /// by the buyer.If the delivery date deviates from the one specified in the header, the
57+ /// delivery date on item level is valid.To specify exact one date for the shipment, e.g. in the
58+ /// RECEIPTACKNOWLEDGEMENT-document.
59+ ///
60+ /// This property is accompanied by the property DesiredDeliveryDateStart which specifies the start of the
61+ /// delivery window.
62+ /// </summary>
3363 public DateTime DesiredDeliveryDateEnd { get ; set ; }
64+
65+ /// <summary>
66+ /// The element is related to an item and refers to the previous order where the item was ordered
67+ /// by the customer(purchasing party)
68+ /// </summary>
3469 public CustomerOrderReference CustomerOrderReference { get ; set ; }
70+
71+ /// <summary>
72+ /// Reference to the business partners integrated in the process of the document flow
73+ /// </summary>
3574 public OrderPartiesReference OrderPartiesReference { get ; set ; }
75+
76+ /// <summary>
77+ /// Provides the currency that is default for all price information in the catalog. If the price of a
78+ /// product has a different currency, or this element is not used, the the currency has to be
79+ /// specified in the corresponding element for the respective product.
80+ /// </summary>
3681 public string Currency { get ; set ; }
82+
83+ /// <summary>
84+ /// Flag to indicate whether partial shipment is allowed. If allowed the value is TRUE, FALSE
85+ /// otherwise.The flag is binding for the order, i.e. if the value is set to FALSE and only partial
86+ /// shipments can be made by the recipient of the order, the order shall be invalid.
87+ /// </summary>
3788 public bool PartialShipmentAllowed { get ; set ; }
89+
90+ /// <summary>
91+ /// List of parties that are relevant to this business document
92+ /// </summary>
3893 public List < Party > Parties { get ; set ; } = new List < Party > ( ) ;
3994 public List < OrderItem > OrderItems { get ; set ; } = new List < OrderItem > ( ) ;
4095 public OrderSummary OrderSummary { get ; set ; }
4196
97+
98+ /// <summary>
99+ /// Loads an order from the given stream.
100+ ///
101+ /// Make sure that the stream is open. After successful reading, the stream is left open, i.e.
102+ /// the caller of the library has to take care of the stream lifecycle.
103+ ///
104+ /// If the stream is not open or readable, an IllegalStreamException exception is raised.
105+ /// </summary>
106+ /// <param name="stream"></param>
107+ /// <returns></returns>
42108 public static Order Load ( Stream stream )
43109 {
44110 OrderReader reader = new OrderReader ( ) ;
45111 return reader . Load ( stream ) ;
46112 } // !Load()
47113
48114
115+ /// <summary>
116+ /// Loads an order from the given file.
117+ /// If the file does not exist, a FileNotFoundException exception is raised.
118+ /// </summary>
119+ /// <param name="filename"></param>
120+ /// <returns></returns>
49121 public static Order Load ( string filename )
50122 {
51123 OrderReader reader = new OrderReader ( ) ;
@@ -67,6 +139,10 @@ public void Save(Stream stream)
67139 } // !Save()
68140
69141
142+ /// <summary>
143+ /// Saves the order into the given file.
144+ /// </summary>
145+ /// <param name="filename"></param>
70146 public void Save ( string filename )
71147 {
72148 OrderWriter writer = new OrderWriter ( ) ;
0 commit comments