-
Notifications
You must be signed in to change notification settings - Fork 57
/
ProductApiAddRequest.cs
320 lines (283 loc) · 16.7 KB
/
ProductApiAddRequest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models
{
/// <summary>
/// <para>表示 [POST] /add 接口的请求。</para>
/// </summary>
public class ProductApiAddRequest : ByteDanceMicroAppProductApiRequest
{
public static class Types
{
public class Product
{
public static class Types
{
public class CommonProductInfo
{
public static class Types
{
public class PriceInfo
{
/// <summary>
/// 获取或设置价格粒度单位。
/// </summary>
[Newtonsoft.Json.JsonProperty("unit")]
[System.Text.Json.Serialization.JsonPropertyName("unit")]
public string Unit { get; set; } = string.Empty;
/// <summary>
/// 获取或设置价格(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("price")]
[System.Text.Json.Serialization.JsonPropertyName("price")]
public int Price { get; set; }
/// <summary>
/// 获取或设置实际成交价格(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("real_price")]
[System.Text.Json.Serialization.JsonPropertyName("real_price")]
public int? RealPrice { get; set; }
/// <summary>
/// 获取或设置当前服务的实际成交价格区间最低价格(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("range_min_price")]
[System.Text.Json.Serialization.JsonPropertyName("range_min_price")]
public int? RangeMinPrice { get; set; }
/// <summary>
/// 获取或设置当前服务的实际成交价格区间最高价格(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("range_max_price")]
[System.Text.Json.Serialization.JsonPropertyName("range_max_price")]
public int? RangeMaxPrice { get; set; }
}
public class PathInfo
{
/// <summary>
/// 获取或设置跳转的页面。
/// </summary>
[Newtonsoft.Json.JsonProperty("path")]
[System.Text.Json.Serialization.JsonPropertyName("text")]
public string PagePath { get; set; } = string.Empty;
/// <summary>
/// 获取或设置页面参数字典。
/// </summary>
[Newtonsoft.Json.JsonProperty("query")]
[System.Text.Json.Serialization.JsonPropertyName("query")]
public IDictionary<string, string>? QueryMap { get; set; }
}
public class ProductFulfilment
{
public static class Types
{
public class FulfillmentContent
{
/// <summary>
/// 获取或设置履约内容名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// 获取或设置文字内容。
/// </summary>
[Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")]
public string? Text { get; set; }
/// <summary>
/// 获取或设置履约文件资源路径。
/// </summary>
[Newtonsoft.Json.JsonProperty("fulfillment_uri")]
[System.Text.Json.Serialization.JsonPropertyName("fulfillment_uri")]
public string? FulfillmentPath { get; set; }
}
}
/// <summary>
/// 获取或设置履约详情。
/// </summary>
[Newtonsoft.Json.JsonProperty("fulfillment_content")]
[System.Text.Json.Serialization.JsonPropertyName("fulfillment_content")]
public Types.FulfillmentContent FulfillmentContent { get; set; } = new Types.FulfillmentContent();
/// <summary>
/// 获取或设置履约类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("fulfillment_type")]
[System.Text.Json.Serialization.JsonPropertyName("fulfillment_type")]
public int FulfillmentType { get; set; }
}
public class ProductDetail
{
public static class Types
{
public class RichText
{
/// <summary>
/// 获取或设置富文本字符串。
/// </summary>
[Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")]
public string? String { get; set; }
/// <summary>
/// 获取或设置富文本资源路径。
/// </summary>
[Newtonsoft.Json.JsonProperty("uri")]
[System.Text.Json.Serialization.JsonPropertyName("uri")]
public string? FilePath { get; set; }
}
}
/// <summary>
/// 获取或设置文字。
/// </summary>
[Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")]
public string? Text { get; set; }
/// <summary>
/// 获取或设置图片资源路径。
/// </summary>
[Newtonsoft.Json.JsonProperty("img_uri")]
[System.Text.Json.Serialization.JsonPropertyName("img_uri")]
public string? ImagePath { get; set; }
/// <summary>
/// 获取或设置富文本内容列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("rich_text")]
[System.Text.Json.Serialization.JsonPropertyName("rich_text")]
public IList<Types.RichText>? RichTextList { get; set; }
}
public class AnchorInfo
{
public static class Types
{
public class VideoAnchorInfo
{
/// <summary>
/// 获取或设置锚点文案。
/// </summary>
[Newtonsoft.Json.JsonProperty("anchor_title")]
[System.Text.Json.Serialization.JsonPropertyName("anchor_title")]
public string? AnchorTitle { get; set; }
}
}
/// <summary>
/// 获取或设置视频锚点信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("video_anchor_info")]
[System.Text.Json.Serialization.JsonPropertyName("video_anchor_info")]
public Types.VideoAnchorInfo? VideoAnchorInfo { get; set; }
}
}
/// <summary>
/// 获取或设置小程序的 AppId。如果不指定将使用构造 <see cref="ByteDanceMicroAppClient"/> 时的 <see cref="ByteDanceMicroAppClientOptions.AppId"/> 参数。
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public string? AppId { get; set; }
/// <summary>
/// 获取或设置一级商品分类。
/// </summary>
[Newtonsoft.Json.JsonProperty("first_class")]
[System.Text.Json.Serialization.JsonPropertyName("first_class")]
public int FirstClassId { get; set; }
/// <summary>
/// 获取或设置二级商品分类。
/// </summary>
[Newtonsoft.Json.JsonProperty("second_class")]
[System.Text.Json.Serialization.JsonPropertyName("second_class")]
public int SecondClassId { get; set; }
/// <summary>
/// 获取或设置商品名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string Title { get; set; } = string.Empty;
/// <summary>
/// 获取或设置商品资质资源路径列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("qualification_uris")]
[System.Text.Json.Serialization.JsonPropertyName("qualification_uris")]
public IList<string> QualificationPathList { get; set; } = new List<string>();
/// <summary>
/// 获取或设置购物须知。
/// </summary>
[Newtonsoft.Json.JsonProperty("purchase_precaution")]
[System.Text.Json.Serialization.JsonPropertyName("purchase_precaution")]
public string PurchasePrecaution { get; set; } = string.Empty;
/// <summary>
/// 获取或设置行业类目。
/// </summary>
[Newtonsoft.Json.JsonProperty("industry_type")]
[System.Text.Json.Serialization.JsonPropertyName("industry_type")]
public int IndustryType { get; set; }
/// <summary>
/// 获取或设置价格信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("price_info")]
[System.Text.Json.Serialization.JsonPropertyName("price_info")]
public Types.PriceInfo PriceInfo { get; set; } = new Types.PriceInfo();
/// <summary>
/// 获取或设置路径信息列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("path_info_lst")]
[System.Text.Json.Serialization.JsonPropertyName("path_info_lst")]
public IList<Types.PathInfo>? PathInfoList { get; set; }
/// <summary>
/// 获取或设置商品履约列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_fulfillment_lst")]
[System.Text.Json.Serialization.JsonPropertyName("product_fulfillment_lst")]
public IList<Types.ProductFulfilment>? ProductFulfillmentList { get; set; }
/// <summary>
/// 获取或设置商品详情列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_detail_lst")]
[System.Text.Json.Serialization.JsonPropertyName("product_detail_lst")]
public IList<Types.ProductDetail>? ProductDetailLst { get; set; } = new List<Types.ProductDetail>();
/// <summary>
/// 获取或设置锚点信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("anchor_info")]
[System.Text.Json.Serialization.JsonPropertyName("anchor_info")]
public Types.AnchorInfo? AnchorInfo { get; set; }
}
public class CourseInfo
{
/// <summary>
/// 获取或设置老师介绍。
/// </summary>
[Newtonsoft.Json.JsonProperty("teacher_introduction")]
[System.Text.Json.Serialization.JsonPropertyName("teacher_introduction")]
public string? TeacherIntroduction { get; set; }
}
}
/// <summary>
/// 获取或设置商品通用参数信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("common_product_params")]
[System.Text.Json.Serialization.JsonPropertyName("common_product_params")]
public Types.CommonProductInfo CommonProductInfo { get; set; } = new Types.CommonProductInfo();
/// <summary>
/// 获取或设置课程参数信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("course_params")]
[System.Text.Json.Serialization.JsonPropertyName("course_params")]
public Types.CourseInfo? CourseInfo { get; set; }
}
}
/// <summary>
/// <inheritdoc/>
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public override string? AppId { get; set; }
/// <summary>
/// 获取或设置商品类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_type")]
[System.Text.Json.Serialization.JsonPropertyName("product_type")]
public int ProductType { get; set; }
/// <summary>
/// 获取或设置商品信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("product")]
[System.Text.Json.Serialization.JsonPropertyName("product")]
public Types.Product Product { get; set; } = new Types.Product();
}
}