zoukankan      html  css  js  c++  java
  • eBay 消息发送(2)

     

    1.简介

    Call Index Doc:

    http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/index.html

     

    消息发送主要分为三类:

    AddMemberMessageRTQ

    见 eBay消息发送(1)

    AddMemberMessageAAQToPartner

    Seller和Buyer之间有订单关系的消息。

    AddMemberMessagesAAQToBidder

    见 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.样例代码

     

    1. public void SendMemberMessagesAAQToPartner(ApiContext context, string subject, string body, string recipientID, string itemID, string senderID)
    2. {
    3.     try
    4.     {
    5.         var addCall = new AddMemberMessageAAQToPartnerCall(context);
    6.  
    7.         MemberMessageType memberMessageType = new MemberMessageType()
    8.         {
    9.             Subject = subject,
    10.             Body = body,
    11.             RecipientID = new StringCollection { recipientID },
    12.             QuestionTypeSpecified = true,
    13.             QuestionType = QuestionTypeCodeType.General
    14.         };
    15.         addCall.AddMemberMessageAAQToPartner(itemID, memberMessageType);
    16.     }
    17.     catch (Exception ex)
    18.     {
    19.         throw new EbayAPIExpcetion(ex.Message, ex.InnerException == null ? ex : ex.InnerException);
    20.     }
    21. }
  • 相关阅读:
    SQL 操作总结
    WaitHandle.WaitOne的第二参数
    java泛型测试
    生成商品静态页的类和方法
    CodeSmith4.1在控制台根据模板生成文件
    Eclipse中最常用的热键
    struts2的struts.properties配置文件详解 (转)
    eclipse rcp 多线程
    eclipse RPC加载Spring 容器
    使用Apache+tomcat比单独使用tomcat能带来什么样的好处及坏处
  • 原文地址:https://www.cnblogs.com/pengzhen/p/4536484.html
Copyright © 2011-2022 走看看