eBay 消息发送(2)
1.简介
Call Index Doc:
http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/index.html
消息发送主要分为三类:
见 eBay消息发送(1) | |
Seller和Buyer之间有订单关系的消息。 | |
见 eBay消息发送(3) |
2. AddMemberMessageAAQToPartner
以MemberMessageType作为载体发送。
Seller和Buyer之间存在订单关系,且在Order line生命周期90天(3个月)以内,可以相互发送消息。
2.1输入字段
ItemID 提问所应对的Item唯一ID。
MemberMessage内容 Body 消息的主体,不支持原生的HTML,编码后的HTML也不会自动解码。最大长度为2000。 Subject 消息主题。 QuestionType CustomCode (in/out) Reserved for future or internal use. CustomizedSubject (in/out) Customized subjects set by the seller using SetMessagePreferences or the eBay Web site. General (in/out) General questions about the item. MultipleItemShipping (in/out) Questions related to the shipping of this item bundled with other items also purchased on eBay. None (in/out) No question type applies. This value doesn't apply to AddMemberMessageAAQToPartner. Note that the value of None can apply if Messages.Message.MessageType isn't set to AskSellerQuestion. Payment (in/out) Questions related to the payment for the item. Shipping (in/out) Questions related to the shipping of the item. 通常选General即可。 RecipientID 收件人,填入eBay用户ID。 SendID 发件人ID |
2.2输出
ApiResponse内容 Ack CustomCode (out) Reserved for internal or future use. Failure (out) Request processing failed Success (out) Request processing succeeded Warning (out) Request processing completed with warning information being included in the response message
Errors |
3.样例代码
- public void SendMemberMessagesAAQToPartner(ApiContext context, string subject, string body, string recipientID, string itemID, string senderID)
- {
- try
- {
- var addCall = new AddMemberMessageAAQToPartnerCall(context);
- MemberMessageType memberMessageType = new MemberMessageType()
- {
- Subject = subject,
- Body = body,
- RecipientID = new StringCollection { recipientID },
- QuestionTypeSpecified = true,
- QuestionType = QuestionTypeCodeType.General
- };
- addCall.AddMemberMessageAAQToPartner(itemID, memberMessageType);
- }
- catch (Exception ex)
- {
- throw new EbayAPIExpcetion(ex.Message, ex.InnerException == null ? ex : ex.InnerException);
- }
- }