Skip to content

Commit a77ba46

Browse files
committed
Additional documentation
1 parent 14ee96f commit a77ba46

5 files changed

Lines changed: 109 additions & 3 deletions

File tree

OpenTrans.net/BuyerProductId.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,16 @@ namespace OpenTrans.net
2121
/// <summary>
2222
/// Identifier of the product from the perspective of the buyer. The included elements ensure the capability of a unique identification of a product.
2323
/// </summary>
24-
public class BuyerProductId
24+
public class BuyerProductId
2525
{
26+
/// <summary>
27+
/// The actual Id that is assigned from the perspective of the buyer
28+
/// </summary>
2629
public string Id { get; set; }
30+
31+
/// <summary>
32+
/// This attribute specifies the type of ID, i.e. indicates the organization that has issued the ID.
33+
/// </summary>
2734
public BuyerProductIdTypes Type { get; set; }
2835
}
2936
}

OpenTrans.net/BuyerProductIdTypes.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
*/
1919
namespace OpenTrans.net
2020
{
21+
/// <summary>
22+
/// Types for the product number used by the buying company.
23+
/// </summary>
2124
public enum BuyerProductIdTypes
2225
{
2326
/// <summary> Artikelnummer des einkaufenden Unternehmens </summary>

OpenTrans.net/OpenTrans.net.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<PackageLicenseExpression>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseExpression>
66
<Authors>Stephan Stapel, stephan@s2-industries.com</Authors>
7-
<Version>4.0.1</Version>
8-
<AssemblyVersion>4.0.1.0</AssemblyVersion>
7+
<Version>4.0.2</Version>
8+
<AssemblyVersion>4.0.2.0</AssemblyVersion>
99
<FileVersion>4.0.1.0</FileVersion>
1010
</PropertyGroup>
1111

OpenTrans.net/Order.cs

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,99 @@
2525

2626
namespace 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();

OpenTrans.net/OrderResponse.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,29 @@ public class OrderResponse
3636

3737

3838

39+
/// <summary>
40+
/// Loads an order response from the given stream.
41+
///
42+
/// Make sure that the stream is open. After successful reading, the stream is left open, i.e.
43+
/// the caller of the library has to take care of the stream lifecycle.
44+
///
45+
/// If the stream is not open or readable, an IllegalStreamException exception is raised.
46+
/// </summary>
47+
/// <param name="stream"></param>
48+
/// <returns></returns>
3949
public static OrderResponse Load(Stream stream)
4050
{
4151
OrderResponseReader reader = new OrderResponseReader();
4252
return reader.Load(stream);
4353
} // !Load()
4454

4555

56+
/// <summary>
57+
/// Loads an order response from the given file.
58+
/// If the file does not exist, a FileNotFoundException exception is raised.
59+
/// </summary>
60+
/// <param name="filename"></param>
61+
/// <returns></returns>
4662
public static OrderResponse Load(string filename)
4763
{
4864
OrderResponseReader reader = new OrderResponseReader();
@@ -64,6 +80,10 @@ public void Save(Stream stream)
6480
} // !Save()
6581

6682

83+
/// <summary>
84+
/// Saves the order response into the given file.
85+
/// </summary>
86+
/// <param name="filename"></param>
6787
public void Save(string filename)
6888
{
6989
OrderResponseWriter writer = new OrderResponseWriter();

0 commit comments

Comments
 (0)