C# Class yycms.union.wechat.Ticket

Inheritance: SDK
Exibir arquivo Open project: seven1276/yycms

Public Methods

Method Description
Add_Cash ( String logo_url, String brand_name, String code_type, String title, String sub_title, String color, String notice, String service_phone, String description, int type, long begin_timestamp, long end_timestamp, int fixed_term, int fixed_begin_term, int quantity, int get_limit, bool use_custom_code, bool bind_openid, bool can_share, bool can_give_friend, int location_id_list, String custom_url_name, String custom_url, String custom_url_sub_title, String promotion_url_name, String promotion_url, String source, long least_cost, long reduce_cost ) : String

添加代金券

Add_Discount ( String logo_url, String brand_name, String code_type, String title, String sub_title, String color, String notice, String service_phone, String description, int type, long begin_timestamp, long end_timestamp, int fixed_term, int fixed_begin_term, int quantity, int get_limit, bool use_custom_code, bool bind_openid, bool can_share, bool can_give_friend, int location_id_list, String custom_url_name, String custom_url, String custom_url_sub_title, String promotion_url_name, String promotion_url, String source, int discount ) : String

添加折扣券

Add_General_Coupon ( String logo_url, String brand_name, String code_type, String title, String sub_title, String color, String notice, String service_phone, String description, int type, long begin_timestamp, long end_timestamp, int fixed_term, int fixed_begin_term, int quantity, int get_limit, bool use_custom_code, bool bind_openid, bool can_share, bool can_give_friend, int location_id_list, String custom_url_name, String custom_url, String custom_url_sub_title, String promotion_url_name, String promotion_url, String source, String default_detail ) : String

添加优惠券

Add_Gift ( String logo_url, String brand_name, String code_type, String title, String sub_title, String color, String notice, String service_phone, String description, int type, long begin_timestamp, long end_timestamp, int fixed_term, int fixed_begin_term, int quantity, int get_limit, bool use_custom_code, bool bind_openid, bool can_share, bool can_give_friend, int location_id_list, String custom_url_name, String custom_url, String custom_url_sub_title, String promotion_url_name, String promotion_url, String source, String gift ) : String

添加礼品券

Add_Groupon ( String logo_url, String brand_name, String code_type, String title, String sub_title, String color, String notice, String service_phone, String description, int type, long begin_timestamp, long end_timestamp, int fixed_term, int fixed_begin_term, int quantity, int get_limit, bool use_custom_code, bool bind_openid, bool can_share, bool can_give_friend, int location_id_list, String custom_url_name, String custom_url, String custom_url_sub_title, String promotion_url_name, String promotion_url, String source, String deal_detail ) : String

添加团购券

BatchGet ( int PageIndex ) : Newtonsoft.Json.Linq.JObject

批量查询卡券

Consume ( String _code ) : String

消耗卡券 code 接口是核销卡券的唯一接口,仅支持核销有效期内的卡券,否则会返回错误码 invalid time。 自定义 code(use_custom_code 为 true)的优惠券,在 code 被核销时,必须调用此 接口。用于将用户客户端的 code 状态变更。自定义 code 的卡券调用接口时, post 数据中 需包含 card_id,非自定义 code 不需上报。

Delete ( String cardId ) : System.Boolean

删除卡券 删除卡券接口允许商户删除任意一类卡券。 删除卡券后,该卡券对应已生成的领取用二维码、添加到卡包JS API均会失效。 注意:如用户在商家删除卡券前已领取一张或多张该卡券依旧有效。 即删除卡券不能删除已被用户领取,保存在微信客户端中的卡券。

Detail ( String cardid ) : Newtonsoft.Json.Linq.JObject

批量查询卡券

ModifyStock ( String cardId, int increase_stock_value, int reduce_stock_value ) : System.Boolean

修改库存 调用修改库存接口增减某张卡券的库存。

Ticket ( String _Accecc_Token ) : Newtonsoft.Json
Update ( String _cardType, String _card_id, String _logo_url, String _color, String _notice, String _service_phone, String _description, int _location_id_list, String _custom_url_name, String _custom_url, String _custom_url_sub_title, String _promotion_url_name, String _promotion_url, String _promotion_url_sub_title, String _code_type, long _get_limit, System.Boolean _can_share, System.Boolean _can_give_friend, int _type, long _begin_timestamp, long _end_timestamp ) : System.Boolean

更改卡券信息 支持更新所有卡券类型的部分通用字段及 特殊卡券(会员卡、飞机票、电影票、会议门票)中特定字段的信息。 开发者注意事项注 1. 更改卡券的部分字段后会重新提交审核,详情见字段说明,更新成功后可通过调用查看卡券详情接口核查更新结果; 2. 仅填入需要更新的字段,许多开发者在调用该接口时会填入brandname等不支持修改的字段,导致更新不成功。

Method Details

Add_Cash() public method

添加代金券
public Add_Cash ( String logo_url, String brand_name, String code_type, String title, String sub_title, String color, String notice, String service_phone, String description, int type, long begin_timestamp, long end_timestamp, int fixed_term, int fixed_begin_term, int quantity, int get_limit, bool use_custom_code, bool bind_openid, bool can_share, bool can_give_friend, int location_id_list, String custom_url_name, String custom_url, String custom_url_sub_title, String promotion_url_name, String promotion_url, String source, long least_cost, long reduce_cost ) : String
logo_url String 卡券的商户logo,建议像素为300*300。
brand_name String 商户名字,字数上限为12个汉字。
code_type String Code展示类型,"CODE_TYPE_TEXT",文本;"CODE_TYPE_BARCODE",一维码 ;"CODE_TYPE_QRCODE",二维码;"CODE_TYPE_ONLY_QRCODE",二维码无code显示;"CODE_TYPE_ONLY_BARCODE",一维码无code显示;
title String 卡券名,字数上限为9个汉字。(建议涵盖卡券属性、服务及金额)。
sub_title String 券名,字数上限为18个汉字。
color String 券颜色。按色彩规范标注填写Color010-Color100。
notice String 卡券使用提醒,字数上限为16个汉字。
service_phone String 客服电话。
description String 卡券使用说明,字数上限为1024个汉字。
type int 使用时间的类型,仅支持填写1或2。1为固定日期区间,2为固定时长(自领取后按天算)。
begin_timestamp long type为1时专用,表示起用时间。从1970年1月1日00:00:00至起用时间的秒数,最终需转换为字符串形态传入。(东八区时间,单位为秒)
end_timestamp long type为1时专用,表示结束时间,建议设置为截止日期的23:59:59过期。(东八区时间,单位为秒)
fixed_term int type为2时专用,表示自领取后多少天内有效,领取后当天有效填写0。(单位为天)
fixed_begin_term int type为2时专用,表示自领取后多少天开始生效。(单位为天)
quantity int 卡券库存的数量,不支持填写0,上限为100000000。
get_limit int 每人可领券的数量限制。
use_custom_code bool 是否自定义Code码。填写true或false,默认为false。通常自有优惠码系统的开发者选择自定义Code码,在卡券投放时带入。
bind_openid bool 是否指定用户领取,填写true或false。默认为false。
can_share bool 卡券领取页面是否可分享。
can_give_friend bool 卡券是否可转赠。
location_id_list int 门店位置ID。调用POI门店管理接口获取门店位置ID。
custom_url_name String 自定义跳转外链的入口名字。
custom_url String 自定义跳转的URL。
custom_url_sub_title String 显示在入口右侧的提示语。
promotion_url_name String 营销场景的自定义入口名称。
promotion_url String 入口跳转外链的地址链接
source String 第三方来源名,例如同程旅游、大众点评。
least_cost long 表示起用金额。(单位为分)
reduce_cost long 表示减免金额。(单位为分)
return String

Add_Discount() public method

添加折扣券
public Add_Discount ( String logo_url, String brand_name, String code_type, String title, String sub_title, String color, String notice, String service_phone, String description, int type, long begin_timestamp, long end_timestamp, int fixed_term, int fixed_begin_term, int quantity, int get_limit, bool use_custom_code, bool bind_openid, bool can_share, bool can_give_friend, int location_id_list, String custom_url_name, String custom_url, String custom_url_sub_title, String promotion_url_name, String promotion_url, String source, int discount ) : String
logo_url String 卡券的商户logo,建议像素为300*300。
brand_name String 商户名字,字数上限为12个汉字。
code_type String Code展示类型,"CODE_TYPE_TEXT",文本;"CODE_TYPE_BARCODE",一维码 ;"CODE_TYPE_QRCODE",二维码;"CODE_TYPE_ONLY_QRCODE",二维码无code显示;"CODE_TYPE_ONLY_BARCODE",一维码无code显示;
title String 卡券名,字数上限为9个汉字。(建议涵盖卡券属性、服务及金额)。
sub_title String 券名,字数上限为18个汉字。
color String 券颜色。按色彩规范标注填写Color010-Color100。
notice String 卡券使用提醒,字数上限为16个汉字。
service_phone String 客服电话。
description String 卡券使用说明,字数上限为1024个汉字。
type int 使用时间的类型,仅支持填写1或2。1为固定日期区间,2为固定时长(自领取后按天算)。
begin_timestamp long type为1时专用,表示起用时间。从1970年1月1日00:00:00至起用时间的秒数,最终需转换为字符串形态传入。(东八区时间,单位为秒)
end_timestamp long type为1时专用,表示结束时间,建议设置为截止日期的23:59:59过期。(东八区时间,单位为秒)
fixed_term int type为2时专用,表示自领取后多少天内有效,领取后当天有效填写0。(单位为天)
fixed_begin_term int type为2时专用,表示自领取后多少天开始生效。(单位为天)
quantity int 卡券库存的数量,不支持填写0,上限为100000000。
get_limit int 每人可领券的数量限制。
use_custom_code bool 是否自定义Code码。填写true或false,默认为false。通常自有优惠码系统的开发者选择自定义Code码,在卡券投放时带入。
bind_openid bool 是否指定用户领取,填写true或false。默认为false。
can_share bool 卡券领取页面是否可分享。
can_give_friend bool 卡券是否可转赠。
location_id_list int 门店位置ID。调用POI门店管理接口获取门店位置ID。
custom_url_name String 自定义跳转外链的入口名字。
custom_url String 自定义跳转的URL。
custom_url_sub_title String 显示在入口右侧的提示语。
promotion_url_name String 营销场景的自定义入口名称。
promotion_url String 入口跳转外链的地址链接
source String 第三方来源名,例如同程旅游、大众点评。
discount int 表示打折额度(百分比)。填30就是七折。
return String

Add_General_Coupon() public method

添加优惠券
public Add_General_Coupon ( String logo_url, String brand_name, String code_type, String title, String sub_title, String color, String notice, String service_phone, String description, int type, long begin_timestamp, long end_timestamp, int fixed_term, int fixed_begin_term, int quantity, int get_limit, bool use_custom_code, bool bind_openid, bool can_share, bool can_give_friend, int location_id_list, String custom_url_name, String custom_url, String custom_url_sub_title, String promotion_url_name, String promotion_url, String source, String default_detail ) : String
logo_url String 卡券的商户logo,建议像素为300*300。
brand_name String 商户名字,字数上限为12个汉字。
code_type String Code展示类型,"CODE_TYPE_TEXT",文本;"CODE_TYPE_BARCODE",一维码 ;"CODE_TYPE_QRCODE",二维码;"CODE_TYPE_ONLY_QRCODE",二维码无code显示;"CODE_TYPE_ONLY_BARCODE",一维码无code显示;
title String 卡券名,字数上限为9个汉字。(建议涵盖卡券属性、服务及金额)。
sub_title String 券名,字数上限为18个汉字。
color String 券颜色。按色彩规范标注填写Color010-Color100。
notice String 卡券使用提醒,字数上限为16个汉字。
service_phone String 客服电话。
description String 卡券使用说明,字数上限为1024个汉字。
type int 使用时间的类型,仅支持填写1或2。1为固定日期区间,2为固定时长(自领取后按天算)。
begin_timestamp long type为1时专用,表示起用时间。从1970年1月1日00:00:00至起用时间的秒数,最终需转换为字符串形态传入。(东八区时间,单位为秒)
end_timestamp long type为1时专用,表示结束时间,建议设置为截止日期的23:59:59过期。(东八区时间,单位为秒)
fixed_term int type为2时专用,表示自领取后多少天内有效,领取后当天有效填写0。(单位为天)
fixed_begin_term int type为2时专用,表示自领取后多少天开始生效。(单位为天)
quantity int 卡券库存的数量,不支持填写0,上限为100000000。
get_limit int 每人可领券的数量限制。
use_custom_code bool 是否自定义Code码。填写true或false,默认为false。通常自有优惠码系统的开发者选择自定义Code码,在卡券投放时带入。
bind_openid bool 是否指定用户领取,填写true或false。默认为false。
can_share bool 卡券领取页面是否可分享。
can_give_friend bool 卡券是否可转赠。
location_id_list int 门店位置ID。调用POI门店管理接口获取门店位置ID。
custom_url_name String 自定义跳转外链的入口名字。
custom_url String 自定义跳转的URL。
custom_url_sub_title String 显示在入口右侧的提示语。
promotion_url_name String 营销场景的自定义入口名称。
promotion_url String 入口跳转外链的地址链接
source String 第三方来源名,例如同程旅游、大众点评。
default_detail String 填写优惠详情。
return String

Add_Gift() public method

添加礼品券
public Add_Gift ( String logo_url, String brand_name, String code_type, String title, String sub_title, String color, String notice, String service_phone, String description, int type, long begin_timestamp, long end_timestamp, int fixed_term, int fixed_begin_term, int quantity, int get_limit, bool use_custom_code, bool bind_openid, bool can_share, bool can_give_friend, int location_id_list, String custom_url_name, String custom_url, String custom_url_sub_title, String promotion_url_name, String promotion_url, String source, String gift ) : String
logo_url String 卡券的商户logo,建议像素为300*300。
brand_name String 商户名字,字数上限为12个汉字。
code_type String Code展示类型,"CODE_TYPE_TEXT",文本;"CODE_TYPE_BARCODE",一维码 ;"CODE_TYPE_QRCODE",二维码;"CODE_TYPE_ONLY_QRCODE",二维码无code显示;"CODE_TYPE_ONLY_BARCODE",一维码无code显示;
title String 卡券名,字数上限为9个汉字。(建议涵盖卡券属性、服务及金额)。
sub_title String 券名,字数上限为18个汉字。
color String 券颜色。按色彩规范标注填写Color010-Color100。
notice String 卡券使用提醒,字数上限为16个汉字。
service_phone String 客服电话。
description String 卡券使用说明,字数上限为1024个汉字。
type int 使用时间的类型,仅支持填写1或2。1为固定日期区间,2为固定时长(自领取后按天算)。
begin_timestamp long type为1时专用,表示起用时间。从1970年1月1日00:00:00至起用时间的秒数,最终需转换为字符串形态传入。(东八区时间,单位为秒)
end_timestamp long type为1时专用,表示结束时间,建议设置为截止日期的23:59:59过期。(东八区时间,单位为秒)
fixed_term int type为2时专用,表示自领取后多少天内有效,领取后当天有效填写0。(单位为天)
fixed_begin_term int type为2时专用,表示自领取后多少天开始生效。(单位为天)
quantity int 卡券库存的数量,不支持填写0,上限为100000000。
get_limit int 每人可领券的数量限制。
use_custom_code bool 是否自定义Code码。填写true或false,默认为false。通常自有优惠码系统的开发者选择自定义Code码,在卡券投放时带入。
bind_openid bool 是否指定用户领取,填写true或false。默认为false。
can_share bool 卡券领取页面是否可分享。
can_give_friend bool 卡券是否可转赠。
location_id_list int 门店位置ID。调用POI门店管理接口获取门店位置ID。
custom_url_name String 自定义跳转外链的入口名字。
custom_url String 自定义跳转的URL。
custom_url_sub_title String 显示在入口右侧的提示语。
promotion_url_name String 营销场景的自定义入口名称。
promotion_url String 入口跳转外链的地址链接
source String 第三方来源名,例如同程旅游、大众点评。
gift String 填写礼品的名称。
return String

Add_Groupon() public method

添加团购券
public Add_Groupon ( String logo_url, String brand_name, String code_type, String title, String sub_title, String color, String notice, String service_phone, String description, int type, long begin_timestamp, long end_timestamp, int fixed_term, int fixed_begin_term, int quantity, int get_limit, bool use_custom_code, bool bind_openid, bool can_share, bool can_give_friend, int location_id_list, String custom_url_name, String custom_url, String custom_url_sub_title, String promotion_url_name, String promotion_url, String source, String deal_detail ) : String
logo_url String 卡券的商户logo,建议像素为300*300。
brand_name String 商户名字,字数上限为12个汉字。
code_type String Code展示类型,"CODE_TYPE_TEXT",文本;"CODE_TYPE_BARCODE",一维码 ;"CODE_TYPE_QRCODE",二维码;"CODE_TYPE_ONLY_QRCODE",二维码无code显示;"CODE_TYPE_ONLY_BARCODE",一维码无code显示;
title String 卡券名,字数上限为9个汉字。(建议涵盖卡券属性、服务及金额)。
sub_title String 券名,字数上限为18个汉字。
color String 券颜色。按色彩规范标注填写Color010-Color100。
notice String 卡券使用提醒,字数上限为16个汉字。
service_phone String 客服电话。
description String 卡券使用说明,字数上限为1024个汉字。
type int 使用时间的类型,仅支持填写1或2。1为固定日期区间,2为固定时长(自领取后按天算)。
begin_timestamp long type为1时专用,表示起用时间。从1970年1月1日00:00:00至起用时间的秒数,最终需转换为字符串形态传入。(东八区时间,单位为秒)
end_timestamp long type为1时专用,表示结束时间,建议设置为截止日期的23:59:59过期。(东八区时间,单位为秒)
fixed_term int type为2时专用,表示自领取后多少天内有效,领取后当天有效填写0。(单位为天)
fixed_begin_term int type为2时专用,表示自领取后多少天开始生效。(单位为天)
quantity int 卡券库存的数量,不支持填写0,上限为100000000。
get_limit int 每人可领券的数量限制。
use_custom_code bool 是否自定义Code码。填写true或false,默认为false。通常自有优惠码系统的开发者选择自定义Code码,在卡券投放时带入。
bind_openid bool 是否指定用户领取,填写true或false。默认为false。
can_share bool 卡券领取页面是否可分享。
can_give_friend bool 卡券是否可转赠。
location_id_list int 门店位置ID。调用POI门店管理接口获取门店位置ID。
custom_url_name String 自定义跳转外链的入口名字。
custom_url String 自定义跳转的URL。
custom_url_sub_title String 显示在入口右侧的提示语。
promotion_url_name String 营销场景的自定义入口名称。
promotion_url String 入口跳转外链的地址链接
source String 第三方来源名,例如同程旅游、大众点评。
deal_detail String 团购券专用,团购详情。
return String

BatchGet() public method

批量查询卡券
public BatchGet ( int PageIndex ) : Newtonsoft.Json.Linq.JObject
PageIndex int
return Newtonsoft.Json.Linq.JObject

Consume() public method

消耗卡券 code 接口是核销卡券的唯一接口,仅支持核销有效期内的卡券,否则会返回错误码 invalid time。 自定义 code(use_custom_code 为 true)的优惠券,在 code 被核销时,必须调用此 接口。用于将用户客户端的 code 状态变更。自定义 code 的卡券调用接口时, post 数据中 需包含 card_id,非自定义 code 不需上报。
public Consume ( String _code ) : String
_code String
return String

Delete() public method

删除卡券 删除卡券接口允许商户删除任意一类卡券。 删除卡券后,该卡券对应已生成的领取用二维码、添加到卡包JS API均会失效。 注意:如用户在商家删除卡券前已领取一张或多张该卡券依旧有效。 即删除卡券不能删除已被用户领取,保存在微信客户端中的卡券。
public Delete ( String cardId ) : System.Boolean
cardId String 卡券ID
return System.Boolean

Detail() public method

批量查询卡券
public Detail ( String cardid ) : Newtonsoft.Json.Linq.JObject
cardid String
return Newtonsoft.Json.Linq.JObject

ModifyStock() public method

修改库存 调用修改库存接口增减某张卡券的库存。
public ModifyStock ( String cardId, int increase_stock_value, int reduce_stock_value ) : System.Boolean
cardId String 卡券ID。
increase_stock_value int 增加多少库存,支持不填或填0。
reduce_stock_value int 减少多少库存,可以不填或填0。
return System.Boolean

Ticket() public method

public Ticket ( String _Accecc_Token ) : Newtonsoft.Json
_Accecc_Token String
return Newtonsoft.Json

Update() public method

更改卡券信息 支持更新所有卡券类型的部分通用字段及 特殊卡券(会员卡、飞机票、电影票、会议门票)中特定字段的信息。 开发者注意事项注 1. 更改卡券的部分字段后会重新提交审核,详情见字段说明,更新成功后可通过调用查看卡券详情接口核查更新结果; 2. 仅填入需要更新的字段,许多开发者在调用该接口时会填入brandname等不支持修改的字段,导致更新不成功。
public Update ( String _cardType, String _card_id, String _logo_url, String _color, String _notice, String _service_phone, String _description, int _location_id_list, String _custom_url_name, String _custom_url, String _custom_url_sub_title, String _promotion_url_name, String _promotion_url, String _promotion_url_sub_title, String _code_type, long _get_limit, System.Boolean _can_share, System.Boolean _can_give_friend, int _type, long _begin_timestamp, long _end_timestamp ) : System.Boolean
_cardType String 卡券类型
_card_id String 卡券ID
_logo_url String
_color String
_notice String 使用提醒,字数上限为16个汉字。
_service_phone String 客服电话。
_description String 使用说明。
_location_id_list int 支持更新适用门店列表。
_custom_url_name String 自定义跳转入口的名字。
_custom_url String 自定义跳转的URL。
_custom_url_sub_title String 显示在入口右侧的提示语。
_promotion_url_name String 营销场景的自定义入口名称。
_promotion_url String 入口跳转外链的地址链接。
_promotion_url_sub_title String 显示在营销入口右侧的提示语。
_code_type String Code码展示类型,"CODE_TYPE_TEXT",文本;"CODE_TYPE_BARCODE",一维码 ;"CODE_TYPE_QRCODE",二维码;"CODE_TYPE_ONLY_QRCODE",二维码无code显示;"CODE_TYPE_ONLY_BARCODE",一维码无code显示;
_get_limit long 每人可领券的数量限制。
_can_share System.Boolean 卡券原生领取页面是否可分享。
_can_give_friend System.Boolean 卡券是否可转赠。
_type int 有效期类型,仅支持更改type为1的时间戳,不支持填入2。
_begin_timestamp long 固定日期区间专用,表示起用时间。(单位为秒)
_end_timestamp long 固定日期区间专用,表示结束时间。结束时间仅支持往后延长。
return System.Boolean