c# - 获取 ebay sdk 业务策略
问题描述
我是 eBay SDK 和 eBay 交易 API 的新手。如何使用 API 或 SDK 获取所有业务政策(付款、运输和退货政策)?我查看了文档,但还没有运气。
解决方案
在eBay Trading API中找到业务政策。从调用的输出中,您可以期待以下内容的简要说明。
检查返回容器的属性以获取经过身份验证的用户的首选项数据。在适用的情况下,存储数据(可能在表格中),或将其显示给用户,以便他们可以验证他们当前的偏好。
示例 C# 调用
public GetUserPreferencesCall GetEbayUserPreferences()
{
if (this.Context == null) // context needs to be defined first
{
throw new NullReferenceException("ApiContext is not defined!");
}
GetUserPreferencesCall userPreferences = new GetUserPreferencesCall(Context);
userPreferences.ShowSellerProfilePreferences = true;
try { userPreferences.Execute(); }
catch (Exception ex)
{
// handle exception
}
return userPreferences;
}
推荐阅读
- vba - VBA:尝试遍历文件并出现溢出错误
- spring-boot - EnableFeignClients 使 Spring 无法加载上下文
- sql - SQL 复制错误:“在订阅者处未找到该行”但指向另一个发布的表
- c# - 为什么属性网格没有显示正确的颜色?
- sql-server - SSIS 包问题 - 更新要上传的每日 Excel 文件会导致 SSIS 包变得“不同步”
- java - 在自由上使用带有 jndi 的 spring 时无法获取 JDBC 连接
- rpm - 升级时不应删除的 RPM 目录
- go - 在分块数据的 HTTP 响应中如何设置 Content-Length
- azure-functions - 在 Azure Durable Function Activity 中使用 Task.Delay
- android - 在 Android 9.0 中创建进入主屏幕的快捷方式