NewGaoKaoApi/PaymentSDK/AliPay/Domain/AlipayMarketingCashitemvouc...

157 lines
10 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>
/// AlipayMarketingCashitemvoucherTemplateCreateModel Data Structure.
/// </summary>
[Serializable]
public class AlipayMarketingCashitemvoucherTemplateCreateModel : AopObject
{
/// <summary>
/// 代金券面额。 当voucher_type为有资金单品代金券ITEM_BALANCE_FIX_VOUCHER时必选。币种为人民币单位为元。该数值不能小于0.1且不能大于999元代表订单金额达到使用门槛后本券可抵扣相应面额资金。 代金券面额以门槛消费金额为基准换算成折扣不能低于9.95折。 当voucher_type为有资金单品折扣券ITEM_BALANCE_DISCOUNT_VOUCHER和有资金单品特价券ITEM_BALANCE_SPE_VOUCHER时此值必须为空。
/// </summary>
[XmlElement("amount")]
public string Amount { get; set; }
/// <summary>
/// 商家品牌名称。最多12个字符 商户自定义在通用模板中展示在券LOGO下方。根据券使用场景的不同该信息的展示位置可能会有不同。
/// </summary>
[XmlElement("brand_name")]
public string BrandName { get; set; }
/// <summary>
/// 单品价格可以享受的折扣力度如填写0.9就表示9折。 该值必须大于等于0.1且小于1小数点以后最多保留两位voucher_type为有资金单品折扣券ITEM_BALANCE_DISCOUNT_VOUCHER时必选其他券类型场景此值必须为0。
/// </summary>
[XmlElement("discount")]
public long Discount { get; set; }
/// <summary>
/// 消费门槛金额。 达到消费门槛金额以后用户可以享受优惠消费门槛金额不能小于0.1元不能超过9999元。
/// </summary>
[XmlElement("floor_amount")]
public string FloorAmount { get; set; }
/// <summary>
/// 出资人登录账号。用于发券的资金会从该账号划拨到发券专用账户上。当调用创建接口成功后,会返回付款订单页面,仅当前传入资金账号可进行付款,付款完成后券变更为激活状态,可进行发放。
/// </summary>
[XmlElement("fund_account")]
public string FundAccount { get; set; }
/// <summary>
/// 所有商品最多可享折扣数量。 当用户购买多件时最多可以对几件特价支付。假设券类型为有资金单品特价券ITEM_BALANCE_SPE_VOUCHER商品编码填写A、B此参数传入2则订单中不管是A或者B一共只能优惠2件第3件以上原价。必须是整数最低数量为1最高99。券类型为有资金单品折扣券ITEM_BALANCE_DISCOUNT_VOUCHER和有资金单品特价券ITEM_BALANCE_SPE_VOUCHER时必填有资金单品代金券ITEM_BALANCE_FIX_VOUCHER下此值必须为0。
/// </summary>
[XmlElement("goods_ceiling_quantity")]
public long GoodsCeilingQuantity { get; set; }
/// <summary>
/// 单品券封面图片。 请先通过图片上传接口alipay.marketing.material.image.upload上传图片。通过图片上传接口获取获得图片资源id以后将该图片资源id传入单张大小不超过2MB格式支持png、gif、jpg、jpeg、bmp尺寸为800X600
/// </summary>
[XmlElement("goods_cover_image_id")]
public string GoodsCoverImageId { get; set; }
/// <summary>
/// 单品券详情图片。 请先通过图片上传接口alipay.marketing.material.image.upload上传图片。通过图片上传接口获取获得图片资源id以后将该图片资源id传入单张大小不超过2MB格式支持png、gif、jpg、jpeg、bmp尺寸为800X600。 最多支持3张单品详情图片图片资源id用英文逗号分隔不可含有重复资源ID。
/// </summary>
[XmlElement("goods_detail_image_ids")]
public string GoodsDetailImageIds { get; set; }
/// <summary>
/// 可优惠商品编码。多个编码标点隔开不能含有重复id最多3千个单品数量。当用户支付时交易中的商品编码和单品券配置的商品编码有任一匹配时可以使用单品优惠券。
/// </summary>
[XmlElement("goods_id")]
public string GoodsId { get; set; }
/// <summary>
/// 商品描述信息。 用于券面展示向用户介绍商品最多120字。
/// </summary>
[XmlElement("goods_info")]
public string GoodsInfo { get; set; }
/// <summary>
/// 商品名称。最多12个字
/// </summary>
[XmlElement("goods_name")]
public string GoodsName { get; set; }
/// <summary>
/// 商品原价。 当voucher_type为有资金单品折扣券ITEM_BALANCE_DISCOUNT_VOUCHER和有资金单品特价券ITEM_BALANCE_SPE_VOUCHER时必选有资金单品代金券类型ITEM_BALANCE_FIX_VOUCHER下此值必须为空。用于计算最大优惠价格最大优惠价格的计算方式请参考产品说明文档
/// </summary>
[XmlElement("goods_origin_price")]
public string GoodsOriginPrice { 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>
/// 重定向地址。支付成功后需要重定向的地址,如果为空则不做重定向。
/// </summary>
[XmlElement("redirect_uri")]
public string RedirectUri { get; set; }
/// <summary>
/// 规则配置JSON字符串{"PID": "2088512417841101,2088512417841102", "STORE": "123456,678901"}其中PID表示可以核销该券的pid列表多个值用英文逗号隔开PID为必传且必须签约当面付STORE表示可以核销该券的内部门店ID多个值用英文逗号隔开 。仅支持PID和STOREID核销规则PID列表和门店ID列表均不能含有重复ID并且门店ID数量最多支持3000个。
/// </summary>
[XmlElement("rule_conf")]
public string RuleConf { get; set; }
/// <summary>
/// 特价面额。使用特定价格购买单品币种为人民币最高特价面额不能超过999元不可为负值。voucher_type为有资金单品特价券ITEM_BALANCE_SPE_VOUCHER时必选其他券类型场景此值必须为空。
/// </summary>
[XmlElement("special_price")]
public string SpecialPrice { 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>
/// 券发放数量
/// </summary>
[XmlElement("voucher_quantity")]
public string VoucherQuantity { get; set; }
/// <summary>
/// 有资金单品券券类型目前仅支持有资金单品代金券ITEM_BALANCE_FIX_VOUCHER、有资金单品折扣券ITEM_BALANCE_DISCOUNT_VOUCHER、有资金单品特价券ITEM_BALANCE_SPE_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; }
}
}