File tree Expand file tree Collapse file tree 2 files changed +23
-45
lines changed
Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2 Expand file tree Collapse file tree 2 files changed +23
-45
lines changed Original file line number Diff line number Diff line change 4
4
using System . Collections . Generic ;
5
5
using System . Runtime . Serialization ;
6
6
using Newtonsoft . Json ;
7
+ using Newtonsoft . Json . Converters ;
7
8
8
9
namespace FikaAmazonAPI . AmazonSpApiSDK . Models . ShippingV2 {
9
10
10
- /// <summary>
11
- /// The file format of the document.
12
- /// </summary>
13
- [ DataContract ]
14
- public class DocumentFormat {
15
-
16
11
/// <summary>
17
- /// Get the string presentation of the object
12
+ /// The file format of the document.
18
13
/// </summary>
19
- /// <returns>String presentation of the object</returns>
20
- public override string ToString ( ) {
21
- var sb = new StringBuilder ( ) ;
22
- sb . Append ( "class DocumentFormat {\n " ) ;
23
- sb . Append ( "}\n " ) ;
24
- return sb . ToString ( ) ;
25
- }
14
+ [ JsonConverter ( typeof ( StringEnumConverter ) ) ]
15
+ public enum DocumentFormat {
26
16
27
- /// <summary>
28
- /// Get the JSON string presentation of the object
29
- /// </summary>
30
- /// <returns>JSON string presentation of the object</returns>
31
- public string ToJson ( ) {
32
- return JsonConvert . SerializeObject ( this , Formatting . Indented ) ;
17
+ [ EnumMember ( Value = "PDF" ) ]
18
+ PDF ,
19
+ [ EnumMember ( Value = "PNG" ) ]
20
+ PNG ,
21
+ [ EnumMember ( Value = "ZPL" ) ]
22
+ ZPL
33
23
}
34
-
35
- }
36
24
}
Original file line number Diff line number Diff line change 4
4
using System . Collections . Generic ;
5
5
using System . Runtime . Serialization ;
6
6
using Newtonsoft . Json ;
7
+ using Newtonsoft . Json . Converters ;
7
8
8
9
namespace FikaAmazonAPI . AmazonSpApiSDK . Models . ShippingV2 {
9
10
10
- /// <summary>
11
- /// The type of shipping document.
12
- /// </summary>
13
- [ DataContract ]
14
- public class DocumentType {
15
-
16
11
/// <summary>
17
- /// Get the string presentation of the object
12
+ /// The type of shipping document.
18
13
/// </summary>
19
- /// <returns>String presentation of the object</returns>
20
- public override string ToString ( ) {
21
- var sb = new StringBuilder ( ) ;
22
- sb . Append ( "class DocumentType {\n " ) ;
23
- sb . Append ( "}\n " ) ;
24
- return sb . ToString ( ) ;
14
+ [ JsonConverter ( typeof ( StringEnumConverter ) ) ]
15
+ public enum DocumentType
16
+ {
17
+ [ EnumMember ( Value = "PACKSLIP" ) ]
18
+ PACKSLIP ,
19
+ [ EnumMember ( Value = "LABEL" ) ]
20
+ LABEL ,
21
+ [ EnumMember ( Value = "RECEIPT" ) ]
22
+ RECEIPT ,
23
+ [ EnumMember ( Value = "CUSTOM_FORM" ) ]
24
+ CUSTOM_FORM
25
25
}
26
-
27
- /// <summary>
28
- /// Get the JSON string presentation of the object
29
- /// </summary>
30
- /// <returns>JSON string presentation of the object</returns>
31
- public string ToJson ( ) {
32
- return JsonConvert . SerializeObject ( this , Formatting . Indented ) ;
33
- }
34
-
35
- }
36
26
}
You can’t perform that action at this time.
0 commit comments