ebay GetUserCall的使用

最近帮助用户查看ebayUser的注册信息的情况使用到GetUserCall。使用给的该call能只要知道ebayAccountName就可以知道该User的一些信息。
eBay API explains
[quote]
GetUser returns data for a single, registered eBay user.
GetUser takes as input the eBay user ID for the user whose data you want to review, or the item ID of a successfully concluded listing in which the requestor and target user were participants as buyer and seller in the order.

A successful call returns the data for the specified user in a User container. Site-specific information (such as a subscription to SellingManagerPro) and non-site-specific information (such as registration date) is also returned. Site-specific information depends on the site you specify in the request, while non-site-specific information does not depend on the specified site.

After retrieving the user information, you can:

Inspect the properties of the User container to get the needed data values for the eBay user.
As applicable for the application, store the data for later use.

Sellers who engage in cross-border trading on sites that require a recoupment agreement must agree to the recoupment terms before adding items to the site. This agreement allows eBay to reimburse a buyer during a dispute and then recoup the cost from the seller. The list of the sites where a user has agreed to the recoupment terms is returned in the GetUser response.
[/quote]
该Call通常可以在战略上使用下,查看下你的竞争account的一些信息。然后调整你的策略
废话不说,直接贴代码

public static void getUser() throws ApiException, SdkException, Exception{
ApiContentUtil apiContentUtil = new ApiContentUtil();
GetUserCall call = new GetUserCall();
call.setApiContext(apiContentUtil.getApiContext());

call.setUserID(ebayAccountName);
//"zeus_group"
//motorsporthouse
//dartsracing

//call.setDetailLevel(new DetailLevelCodeType[]{DetailLevelCodeType.RETURN_ALL});
call.setIncludeExpressRequirements(true);
call.setIncludeFeatureEligibility(true);
//call.setEnableCompression(ture);
call.setSite(SiteCodeType.US);
//call.getUser();
UserType user = call.getUser();
AddressType addressType = user.getRegistrationAddress();
if(addressType != null){
System.out.println("AddressID: "+addressType.getAddressID());
System.out.println("CityName"+addressType.getCityName());
System.out.println("Country"+addressType.getCounty());
}

System.out.println(call.getRequestXml());
System.out.println("=------------------------------------------------");
System.out.println(call.getResponseXml());

}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值