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. }
  • 相关阅读:
    PHP pcntl
    Linux 远程登录命令telnet
    git .gitignore不生效
    使用 GoLand 启动 运行 Go 项目
    Go语言: 万物皆异步
    MYSQL 单表一对多查询,将多条记录合并成一条记录
    详解PHP中instanceof关键字及instanceof关键字有什么作用
    all_user_func()详解
    python的反射
    python 的魔术方法
  • 原文地址:https://www.cnblogs.com/pengzhen/p/4536484.html
Copyright © 2011-2022 走看看