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

     

    1.简介

    Call Index Doc:

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

     

    消息发送主要分为三类:

    AddMemberMessageRTQ

    允许卖家回复关于在线item的问题。

    AddMemberMessageAAQToPartner

    见 eBay消息发送(2)

    AddMemberMessagesAAQToBidder

    见 eBay消息发送(3)

     

    2.AddMemberMessageRTQ

    以MemberMessageType作为载体发送。

    2.1输入字段

     

    ItemID

    提问所应对的Item唯一ID。

     

    MemberMessage内容

    Body

    消息的主体,不支持原生的HTML,编码后的HTML也不会自动解码。最大长度为2000。

    DisplayToPublic

    表明这条消息是否在item listing中可见。

    ParentMessageID

    需要回复的消息ID。

    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

     

    2.3沙箱测试

    You can test this call in the Sandbox. To test AddMemberMessageRTQ, you must have at least two test users in the Sandbox environment.

    1. List an item in the Sandbox using AddItem.
    2. Have a different user send the seller a question about the item. You can use the Sandbox UI for this step.
    3. Using the seller as the authenticated user, call GetMemberMessages (this will be the user for AddMemberMessageRTQ).
    4. In the call to AddMemberMessageRTQ, set ParentMessageID to the value ofMemberMessage.MemberMessageExchange.Question.MessageID that was returned from the GetMemberMessages call.
    5. Set RecipientID to the user ID of the original sender.
    6. Type the response to the question in the Body field.

     

    3.样例代码

     

    1. public void SendMessagesRTQ(ApiContext context, string subject, string body, string recipientID, string parentMessageID, string senderID, string itemID)
    2. {
    3.     try
    4.     {
    5.         //回复客人消息
    6.         var addCall = new AddMemberMessageRTQCall(context);
    7.         var memberMessageType = new MemberMessageType()
    8.         {
    9.             Body = body,
    10.             ParentMessageID = parentMessageID,
    11.             RecipientID = new StringCollection { recipientID },
    12.             SenderID = senderID,
    13.             DisplayToPublic = false,
    14.             DisplayToPublicSpecified = true
    15.         };
    16.  
    17.         //用于回复买家Message的Call,不过只能用于回复买家关于在线商品的提问
    18.         addCall.AddMemberMessageRTQ(itemID, memberMessageType);
    19.     }
    20.     catch (Exception ex)
    21.     {
    22.         throw new EbayAPIExpcetion(ex.Message, ex.InnerException == null ? ex : ex.InnerException);
    23.     }
    24. }
  • 相关阅读:
    ubuntu下minicom和usb串口转接
    linux下 驱动模块编译步骤
    linux下的压缩解压命令
    GitLab 数据备份和恢复
    GitLab 项目创建后地址由Localhost改为实际IP的方法
    GitLab-Runner 安装配置
    GitLab 的安装及汉化
    用yum rpm 快速安装zabbix agent
    RabbitMQ的用户管理方法
    Linux下安装部署RabbitMQ
  • 原文地址:https://www.cnblogs.com/pengzhen/p/4536362.html
Copyright © 2011-2022 走看看