NewGaoKaoApi/PaymentSDK/AliPay/Domain/AlipayMarketingExchangevouc...

91 lines
6.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Xml.Serialization;
namespace Aop.Api.Domain
{
/// <summary>
/// AlipayMarketingExchangevoucherTemplateCreateModel Data Structure.
/// </summary>
[Serializable]
public class AlipayMarketingExchangevoucherTemplateCreateModel : AopObject
{
/// <summary>
/// 品牌名。用于在卡包中展示长度不能超过12个字符。
/// </summary>
[XmlElement("brand_name")]
public string BrandName { get; set; }
/// <summary>
/// 扩展字段JSON字符串。目前支持使用模式扩展{"useMode":"H5","useModeData":{"url":"http://www.yourdomian.com/yourusepage.htm","signKeys":"voucherId,userId,tag","charset":"UTF-8","signType":"RSA2","tag":"this is my tag"}} 其中useMode表示自定义的使用模式类型必填目前仅支持"H5"表示在券详情页按钮跳转至自定义H5页面useModeData表示使用模式对象数据必填其中url字段表示客制化使用按钮跳转链接必填在券详情使用时点击效果将会跳转此链接链接将进行白名单过滤如果无法接入成功请联系技术支持signKeys字段表示跳转至客制链接时的加签字段如果不传默认为voucherId,userId,tagsignType为加签类型目前支持RSA及RSA2,如果不传则不会加签charset为链接编码格式不传默认为UTF-8tag为自定义参数会直接透传回使用链接。本例中当传入合法加签信息后券使用链接将为http://www.yourdomain.com/yourusepage.htm?voucherId=当前券id&userId=当前用户id&tag=传入tag&sign=对应算法及key生成的加签数据。
/// </summary>
[XmlElement("extension_info")]
public string ExtensionInfo { get; set; }
/// <summary>
/// 券变动异步通知地址,传入此字段后,券的核销将会进行异步通知。
/// </summary>
[XmlElement("notify_uri")]
public string NotifyUri { get; set; }
/// <summary>
/// 外部业务单号。用作幂等控制。同一个pid下相同的外部业务单号作唯一键。
/// </summary>
[XmlElement("out_biz_no")]
public string OutBizNo { get; set; }
/// <summary>
/// 发放结束时间晚于该时间不能发券。券的发放结束时间和发放开始时间跨度不能大于90天。发放结束时间必须晚于发放开始时间。格式为yyyy-MM-dd HH:mm:ss
/// </summary>
[XmlElement("publish_end_time")]
public string PublishEndTime { get; set; }
/// <summary>
/// 发放开始时间早于该时间不能发券。发放开始时间不能大于当前时间15天。格式为yyyy-MM-dd HH:mm:ss
/// </summary>
[XmlElement("publish_start_time")]
public string PublishStartTime { get; set; }
/// <summary>
/// 用户核销方式设置必填。目前仅支持H5
/// </summary>
[XmlElement("use_type")]
public string UseType { get; set; }
/// <summary>
/// 券可用时段JSON数组字符串空数组即[],表示不限制,指定每周时间段示例:[{"day_rule": "1,2,3,4,5", "time_begin": "09:00:00", "time_end": "22:00:00"}, {"day_rule": "6,7", "time_begin": "08:00:00", "time_end": "23:00:00"}]数组中每个元素都包含三个keyday_rule, time_begin, time_end其中day_rule表示周几取值范围[1, 2, 3, 4, 5, 6, 7]周7表示星期日多个值使用英文逗号隔开time_begin和time_end分别表示生效起始时间和结束时间格式为HH:mm:ss。另外数组中各个时间规则是或关系。例如[{"day_rule": "1,2,3,4,5", "time_begin": "09:00:00", "time_end": "22:00:00"}, {"day_rule": "6,7", "time_begin": "08:00:00", "time_end": "23:00:00"}]表示在每周的一五的早上9点到晚上10点券可用或者每周的星期六和星期日的早上8点到晚上11点券可用。
/// </summary>
[XmlElement("voucher_available_time")]
public string VoucherAvailableTime { get; set; }
/// <summary>
/// 券使用说明。JSON数组字符串最多可以有10条每条最多50字。不采用时输入"[]"
/// </summary>
[XmlElement("voucher_description")]
public string VoucherDescription { get; set; }
/// <summary>
/// 券名称。用于在卡包中展示长度不能超过20个字符。展示的实际名称为券名称+兑换券。如voucher_name为咖啡。则卡包展示名称为咖啡兑换券。
/// </summary>
[XmlElement("voucher_name")]
public string VoucherName { get; set; }
/// <summary>
/// 拟发行券的数量。单位为张。该数值必须是大于0的整数。
/// </summary>
[XmlElement("voucher_quantity")]
public long VoucherQuantity { get; set; }
/// <summary>
/// 券类型目前仅支持兑换券EXCHANGE_VOUCHER
/// </summary>
[XmlElement("voucher_type")]
public string VoucherType { get; set; }
/// <summary>
/// 券有效期。有两种类型绝对时间和相对时间。使用JSON字符串表示。绝对时间有3个keytype、start、endtype取值固定为"ABSOLUTE"start和end分别表示券生效时间和失效时间格式为yyyy-MM-dd HH:mm:ss。绝对时间示例{"type": "ABSOLUTE", "start": "2017-01-10 00:00:00", "end": "2017-01-13 23:59:59"}。相对时间有3个keytype、duration、unittype取值固定为"RELATIVE"duration表示从发券时间开始到往后推duration个单位时间为止作为券的使用有效期unit表示有效时间单位有效时间单位可枚举MINUTE, HOUR, DAY。示例{"type": "RELATIVE", "duration": 1 , "unit": "DAY" }如果此刻发券那么该券从现在开始生效1(duration)天(unit)后失效。
/// </summary>
[XmlElement("voucher_valid_period")]
public string VoucherValidPeriod { get; set; }
}
}