zhaojs
2023-09-27 74098f1401afe40f961d1d167bb18dd0a71c4d59
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
using AlibabaSDK.Api;
using AlibabaSDK.Domain;
using AlibabaSDK.Response;
using System;
using System.Collections.Generic;
using System.Text;
using CommonUtil;
 
namespace AlibabaSDK.Request
{
    /// <summary>
    /// 创建采购订单
    /// </summary>
    public class AlibabaTradeCreateRequest : IAlibabaApiRequest<AlibabaTradeCreateResponse>
    {
        public object ErrorObj()
        {
            throw new NotImplementedException();
        }
 
        public string GetApiName()
        {
            return "/param2/1/com.alibaba.trade/alibaba.trade.fastCreateOrder";
        }
 
        public Dictionary<string, object> GetParameters()
        {
            Dictionary<string, object> dic = new Dictionary<string, object>();
            dic.Add("flow", flow);
            if (!subUserId.IsNullOrEmpty())
            {
                dic.Add("subUserId", subUserId);
            }
            if (!message.IsNullOrEmpty())
            {
                dic.Add("message", message);
            }
            dic.Add("isvBizTypeStr", isvBizTypeStr);
            dic.Add("isvBizTypePD", isvBizTypePD);
            if (!shopPromotionId.IsNullOrEmpty())
            {
                dic.Add("shopPromotionId", shopPromotionId);
            }
            if (!tradeType.IsNullOrEmpty())
            {
                dic.Add("tradeType", tradeType);
            }
            if (!instanceId.IsNullOrEmpty())
            {
                dic.Add("instanceId", instanceId);
            }
            dic.Add("addressParam", addressParam);
            dic.Add("cargoParamList", cargoParamList);
            //if (!invoiceParam.IsNull())
            //{
            //    dic.Add("invoiceParam", invoiceParam);
            //}
            //if (!encryptOutOrderInfo.IsNull())
            //{
            //    dic.Add("encryptOutOrderInfo", encryptOutOrderInfo);
            //}
            return dic;
        }
 
        public void Validate()
        {
 
        }
        /// <summary>
        /// general(创建大市场订单),saleproxy(创建代销市场订单),fenxiao(最新淘货源下单),ttpft(精选货源下单)
        /// </summary>
        public string flow { get; set; }
        /// <summary>
        /// 子账号ID
        /// </summary>
        public string subUserId { get; set; }
        /// <summary>
        /// 买家留言
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 开放平台业务码,区分具体业务
        /// </summary>
        public string isvBizTypeStr { get; set; }
        /// <summary>
        /// 拍单场景时传入true。会修改默认的isvBizTyp为isv_pd_buy
        /// </summary>
        public bool isvBizTypePD { get; set; }
        /// <summary>
        /// 店铺优惠ID,通过“创建订单前预览数据接口”获得。为空默认使用默认优惠
        /// </summary>
        public string shopPromotionId { get; set; }
        /// <summary>
        /// 由于不同的商品支持的交易方式不同,没有一种交易方式是全局通用的,所以当前下单可使用的交易方式必须通过下单预览接口的tradeModeNameList获取。交易方式类型说明:fxassure(交易4.0通用担保交易),alipay(大市场通用的支付宝担保交易(目前在做切流,后续会下掉)),period(普通账期交易), assure(大买家企业采购询报价下单时需要使用的担保交易流程), creditBuy(诚E赊),bank(银行转账),631staged(631分阶段付款),37staged(37分阶段);此字段不传则系统默认会选取一个可用的交易方式下单,如果开通了诚E赊默认是creditBuy(诚E赊),未开通诚E赊默认使用的方式是支付宝担宝交易。
        /// </summary>
        public string tradeType { get; set; }
 
        /// <summary>
        /// 批发团instanceId,从alibaba.pifatuan.product.list获取
        /// </summary>
        public string instanceId { get; set; }
 
        /// <summary>
        ///收货地址信息
        /// </summary>
        public AddressParamItem addressParam { get; set; }
 
        /// <summary>
        /// 商品信息
        /// </summary>
        public List<CargoParamListItem> cargoParamList { get; set; }
 
        /// <summary>
        /// 发票信息
        /// </summary>
        public TradeInvoice invoiceParam { get; set; }
 
        /// <summary>
        /// 下游加密订单信息,用于下游打单使用
        /// </summary>
        public EncryptOutOrderInfo encryptOutOrderInfo { get; set; }
 
    }
}