feat(work): 新增第三方应用开放收银台订单相关接口

This commit is contained in:
fudiwei
2022-12-04 01:27:44 +08:00
parent 4a4853f778
commit e2a26fcc01
25 changed files with 777 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
{
/// <summary>
/// <para>表示 INFO.change_editon 事件的数据。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/91933 </para>
/// </summary>
public class ChangeEditionEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置第三方应用的 SuiteId。
/// </summary>
[System.Xml.Serialization.XmlElement("SuiteId")]
public string SuiteId { get; set; } = default!;
/// <summary>
/// 获取或设置购买方 CorpId。
/// </summary>
[System.Xml.Serialization.XmlElement("PaidCorpId")]
public string PayerCorpId { get; set; } = default!;
}
}

View File

@@ -0,0 +1,33 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
{
/// <summary>
/// <para>表示 INFO.change_order 事件的数据。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/91930 </para>
/// </summary>
public class ChangeOrderEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置第三方应用的 SuiteId。
/// </summary>
[System.Xml.Serialization.XmlElement("SuiteId")]
public string SuiteId { get; set; } = default!;
/// <summary>
/// 获取或设置购买方 CorpId。
/// </summary>
[System.Xml.Serialization.XmlElement("PaidCorpId")]
public string PayerCorpId { get; set; } = default!;
/// <summary>
/// 获取或设置原订单 ID。
/// </summary>
[System.Xml.Serialization.XmlElement("OldOrderId")]
public string OldOrderId { get; set; }= default!;
/// <summary>
/// 获取或设置新订单 ID。
/// </summary>
[System.Xml.Serialization.XmlElement("NewOrderId")]
public string NewOrderId { get; set; }= default!;
}
}

View File

@@ -0,0 +1,33 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
{
/// <summary>
/// <para>表示 INFO.open_order 事件的数据。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/91929 </para>
/// </summary>
public class OpenOrderEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置第三方应用的 SuiteId。
/// </summary>
[System.Xml.Serialization.XmlElement("SuiteId")]
public string SuiteId { get; set; } = default!;
/// <summary>
/// 获取或设置购买方 CorpId。
/// </summary>
[System.Xml.Serialization.XmlElement("PaidCorpId")]
public string PayerCorpId { get; set; } = default!;
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[System.Xml.Serialization.XmlElement("OrderId")]
public string OrderId { get; set; } = default!;
/// <summary>
/// 获取或设置操作员 ID。
/// </summary>
[System.Xml.Serialization.XmlElement("OperatorId", IsNullable = true)]
public string? OperatorId { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
{
/// <summary>
/// <para>表示 INFO.pay_for_app_success 事件的数据。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/91931 </para>
/// </summary>
public class PayForAppSuccessEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置第三方应用的 SuiteId。
/// </summary>
[System.Xml.Serialization.XmlElement("SuiteId")]
public string SuiteId { get; set; } = default!;
/// <summary>
/// 获取或设置购买方 CorpId。
/// </summary>
[System.Xml.Serialization.XmlElement("PaidCorpId")]
public string PayerCorpId { get; set; } = default!;
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[System.Xml.Serialization.XmlElement("OrderId")]
public string OrderId { get; set; } = default!;
}
}

View File

@@ -0,0 +1,27 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
{
/// <summary>
/// <para>表示 INFO.refund 事件的数据。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/91932 </para>
/// </summary>
public class RefundEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置第三方应用的 SuiteId。
/// </summary>
[System.Xml.Serialization.XmlElement("SuiteId")]
public string SuiteId { get; set; } = default!;
/// <summary>
/// 获取或设置购买方 CorpId。
/// </summary>
[System.Xml.Serialization.XmlElement("PaidCorpId")]
public string PayerCorpId { get; set; } = default!;
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[System.Xml.Serialization.XmlElement("OrderId")]
public string OrderId { get; set; } = default!;
}
}

View File

@@ -717,5 +717,67 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
return await client.SendRequestWithJsonAsync<Models.CgibinServiceCorpIdToOpenCorpIdResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#region Order
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/service/prolong_try 接口。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/91913 </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinServiceProlongTryResponse> ExecuteCgibinServiceProlongTryAsync(this WechatWorkClient client, Models.CgibinServiceProlongTryRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "service", "prolong_try")
.SetQueryParam("suite_access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.CgibinServiceProlongTryResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/service/get_order_list 接口。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/91910 </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinServiceGetOrderListResponse> ExecuteCgibinServiceGetOrderListAsync(this WechatWorkClient client, Models.CgibinServiceGetOrderListRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "service", "get_order_list")
.SetQueryParam("suite_access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.CgibinServiceGetOrderListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/service/get_order 接口。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/91909 </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinServiceGetOrderResponse> ExecuteCgibinServiceGetOrderAsync(this WechatWorkClient client, Models.CgibinServiceGetOrderRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "service", "get_order")
.SetQueryParam("suite_access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.CgibinServiceGetOrderResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
}
}

View File

@@ -1,4 +1,6 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
using System;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/service/get_app_qrcode 接口的请求。</para>
@@ -6,8 +8,9 @@
public class CgibinServiceGetAppQrcodeRequest : WechatWorkRequest
{
/// <summary>
/// 获取或设置第三方应用 ID。
/// 获取或设置第三方套件应用 ID。
/// </summary>
[Obsolete("相关接口或字段于 2020-01-13 下线。")]
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public int? AppId { get; set; }

View File

@@ -1,4 +1,6 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
using System;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/service/get_auth_info 接口的响应。</para>
@@ -211,8 +213,9 @@
public string RoundLogoUrl { get; set; } = default!;
/// <summary>
/// 获取或设置 AppId。
/// 获取或设置第三方套件应用 AppId。
/// </summary>
[Obsolete("相关接口或字段于 2020-01-13 下线。")]
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public int? AppId { get; set; }

View File

@@ -0,0 +1,29 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/service/get_order_list 接口的请求。</para>
/// </summary>
public class CgibinServiceGetOrderListRequest : WechatWorkRequest
{
/// <summary>
/// 获取或设置起始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("start_time")]
[System.Text.Json.Serialization.JsonPropertyName("start_time")]
public long StartTimestamp { get; set; }
/// <summary>
/// 获取或设置终止时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("end_time")]
[System.Text.Json.Serialization.JsonPropertyName("end_time")]
public long EndTimestamp { get; set; }
/// <summary>
/// 获取或设置测试模式。
/// </summary>
[Newtonsoft.Json.JsonProperty("test_mode")]
[System.Text.Json.Serialization.JsonPropertyName("test_mode")]
public int? TestMode { get; set; }
}
}

View File

@@ -0,0 +1,185 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/service/get_order_list 接口的响应。</para>
/// </summary>
public class CgibinServiceGetOrderListResponse : WechatWorkResponse
{
public static class Types
{
public class Order
{
public static class Types
{
public class DealerCorp : CgibinServiceGetAuthInfoResponse.Types.DealerCorp
{
}
}
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("orderid")]
[System.Text.Json.Serialization.JsonPropertyName("orderid")]
public string OrderId { get; set; } = default!;
/// <summary>
/// 获取或设置订单状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_status")]
[System.Text.Json.Serialization.JsonPropertyName("order_status")]
public int OrderStatus { get; set; }
/// <summary>
/// 获取或设置订单类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_type")]
[System.Text.Json.Serialization.JsonPropertyName("order_type")]
public int OrderType { get; set; }
/// <summary>
/// 获取或设置购买方 CorpId。
/// </summary>
[Newtonsoft.Json.JsonProperty("paid_corpid")]
[System.Text.Json.Serialization.JsonPropertyName("paid_corpid")]
public string PayerCorpId { get; set; } = default!;
/// <summary>
/// 获取或设置下单方 CorpId。
/// </summary>
[Newtonsoft.Json.JsonProperty("operator_corpid")]
[System.Text.Json.Serialization.JsonPropertyName("operator_corpid")]
public string? OperatorCorpId { get; set; }
/// <summary>
/// 获取或设置操作员 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("operator_id")]
[System.Text.Json.Serialization.JsonPropertyName("operator_id")]
public string? OperatorId { get; set; }
/// <summary>
/// 获取或设置第三方应用 SuiteId。
/// </summary>
[Newtonsoft.Json.JsonProperty("suiteid")]
[System.Text.Json.Serialization.JsonPropertyName("suiteid")]
public string? SuiteId { get; set; }
/// <summary>
/// 获取或设置第三方套件应用 ID。
/// </summary>
[Obsolete("相关接口或字段于 2020-01-13 下线。")]
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public int AppId { get; set; }
/// <summary>
/// 获取或设置版本 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("edition_id")]
[System.Text.Json.Serialization.JsonPropertyName("edition_id")]
public string EditionId { get; set; } = default!;
/// <summary>
/// 获取或设置版本名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("edition_name")]
[System.Text.Json.Serialization.JsonPropertyName("edition_name")]
public string EditionName { get; set; } = default!;
/// <summary>
/// 获取或设置订单价格(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("price")]
[System.Text.Json.Serialization.JsonPropertyName("price")]
public int Price { get; set; }
/// <summary>
/// 获取或设置购买的人数。
/// </summary>
[Newtonsoft.Json.JsonProperty("user_count")]
[System.Text.Json.Serialization.JsonPropertyName("user_count")]
public int PaidUserCount { get; set; }
/// <summary>
/// 获取或设置购买的天数。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_period")]
[System.Text.Json.Serialization.JsonPropertyName("order_period")]
public int PaidDayCount { get; set; }
/// <summary>
/// 获取或设置下单时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_time")]
[System.Text.Json.Serialization.JsonPropertyName("order_time")]
public long CreateTimestamp { get; set; }
/// <summary>
/// 获取或设置付款时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("paid_time")]
[System.Text.Json.Serialization.JsonPropertyName("paid_time")]
public long PayTimestamp { get; set; }
/// <summary>
/// 获取或设置购买生效期的开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("begin_time")]
[System.Text.Json.Serialization.JsonPropertyName("begin_time")]
public long BeginTimestamp { get; set; }
/// <summary>
/// 获取或设置购买生效期的结束时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("end_time")]
[System.Text.Json.Serialization.JsonPropertyName("end_time")]
public long EndTimestamp { get; set; }
/// <summary>
/// 获取或设置下单来源。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_from")]
[System.Text.Json.Serialization.JsonPropertyName("order_from")]
public int? OrderFrom { get; set; }
/// <summary>
/// 获取或设置服务商分成金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("service_share_amount")]
[System.Text.Json.Serialization.JsonPropertyName("service_share_amount")]
public int? ServiceShareAmount { get; set; }
/// <summary>
/// 获取或设置平台分成金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("platform_share_amount")]
[System.Text.Json.Serialization.JsonPropertyName("platform_share_amount")]
public int? PlatformShareAmount { get; set; }
/// <summary>
/// 获取或设置代理商分成金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("dealer_share_amount")]
[System.Text.Json.Serialization.JsonPropertyName("dealer_share_amount")]
public int? DealerShareAmount { get; set; }
/// <summary>
/// 获取或设置代理服务商企业信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("dealer_corp_info")]
[System.Text.Json.Serialization.JsonPropertyName("dealer_corp_info")]
public Types.DealerCorp? DealerCorp { get; set; }
}
}
/// <summary>
/// 获取或设置订单列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_list")]
[System.Text.Json.Serialization.JsonPropertyName("order_list")]
public Types.Order[] OrderList { get; set; } = default!;
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/service/get_order 接口的请求。</para>
/// </summary>
public class CgibinServiceGetOrderRequest : WechatWorkRequest
{
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("orderid")]
[System.Text.Json.Serialization.JsonPropertyName("orderid")]
public string OrderId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,172 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/service/get_order 接口的响应。</para>
/// </summary>
public class CgibinServiceGetOrderResponse : WechatWorkResponse
{
public static class Types
{
public class DealerCorp : CgibinServiceGetAuthInfoResponse.Types.DealerCorp
{
}
}
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("orderid")]
[System.Text.Json.Serialization.JsonPropertyName("orderid")]
public string OrderId { get; set; } = default!;
/// <summary>
/// 获取或设置订单状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_status")]
[System.Text.Json.Serialization.JsonPropertyName("order_status")]
public int OrderStatus { get; set; }
/// <summary>
/// 获取或设置订单类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_type")]
[System.Text.Json.Serialization.JsonPropertyName("order_type")]
public int OrderType { get; set; }
/// <summary>
/// 获取或设置购买方 CorpId。
/// </summary>
[Newtonsoft.Json.JsonProperty("paid_corpid")]
[System.Text.Json.Serialization.JsonPropertyName("paid_corpid")]
public string PayerCorpId { get; set; } = default!;
/// <summary>
/// 获取或设置下单方 CorpId。
/// </summary>
[Newtonsoft.Json.JsonProperty("operator_corpid")]
[System.Text.Json.Serialization.JsonPropertyName("operator_corpid")]
public string? OperatorCorpId { get; set; }
/// <summary>
/// 获取或设置操作员 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("operator_id")]
[System.Text.Json.Serialization.JsonPropertyName("operator_id")]
public string? OperatorId { get; set; }
/// <summary>
/// 获取或设置第三方应用 SuiteId。
/// </summary>
[Newtonsoft.Json.JsonProperty("suiteid")]
[System.Text.Json.Serialization.JsonPropertyName("suiteid")]
public string? SuiteId { get; set; }
/// <summary>
/// 获取或设置第三方套件应用 ID。
/// </summary>
[Obsolete("相关接口或字段于 2020-01-13 下线。")]
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public int AppId { get; set; }
/// <summary>
/// 获取或设置版本 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("edition_id")]
[System.Text.Json.Serialization.JsonPropertyName("edition_id")]
public string EditionId { get; set; } = default!;
/// <summary>
/// 获取或设置版本名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("edition_name")]
[System.Text.Json.Serialization.JsonPropertyName("edition_name")]
public string EditionName { get; set; } = default!;
/// <summary>
/// 获取或设置订单价格(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("price")]
[System.Text.Json.Serialization.JsonPropertyName("price")]
public int Price { get; set; }
/// <summary>
/// 获取或设置购买的人数。
/// </summary>
[Newtonsoft.Json.JsonProperty("user_count")]
[System.Text.Json.Serialization.JsonPropertyName("user_count")]
public int PaidUserCount { get; set; }
/// <summary>
/// 获取或设置购买的天数。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_period")]
[System.Text.Json.Serialization.JsonPropertyName("order_period")]
public int PaidDayCount { get; set; }
/// <summary>
/// 获取或设置下单时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_time")]
[System.Text.Json.Serialization.JsonPropertyName("order_time")]
public long CreateTimestamp { get; set; }
/// <summary>
/// 获取或设置付款时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("paid_time")]
[System.Text.Json.Serialization.JsonPropertyName("paid_time")]
public long PayTimestamp { get; set; }
/// <summary>
/// 获取或设置购买生效期的开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("begin_time")]
[System.Text.Json.Serialization.JsonPropertyName("begin_time")]
public long BeginTimestamp { get; set; }
/// <summary>
/// 获取或设置购买生效期的结束时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("end_time")]
[System.Text.Json.Serialization.JsonPropertyName("end_time")]
public long EndTimestamp { get; set; }
/// <summary>
/// 获取或设置下单来源。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_from")]
[System.Text.Json.Serialization.JsonPropertyName("order_from")]
public int? OrderFrom { get; set; }
/// <summary>
/// 获取或设置服务商分成金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("service_share_amount")]
[System.Text.Json.Serialization.JsonPropertyName("service_share_amount")]
public int? ServiceShareAmount { get; set; }
/// <summary>
/// 获取或设置平台分成金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("platform_share_amount")]
[System.Text.Json.Serialization.JsonPropertyName("platform_share_amount")]
public int? PlatformShareAmount { get; set; }
/// <summary>
/// 获取或设置代理商分成金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("dealer_share_amount")]
[System.Text.Json.Serialization.JsonPropertyName("dealer_share_amount")]
public int? DealerShareAmount { get; set; }
/// <summary>
/// 获取或设置代理服务商企业信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("dealer_corp_info")]
[System.Text.Json.Serialization.JsonPropertyName("dealer_corp_info")]
public Types.DealerCorp? DealerCorp { get; set; }
}
}

View File

@@ -0,0 +1,32 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/service/prolong_try 接口的请求。</para>
/// </summary>
public class CgibinServiceProlongTryRequest : WechatWorkRequest
{
/// <summary>
/// 获取或设置购买方 CorpId。
/// </summary>
[Newtonsoft.Json.JsonProperty("buyer_corpid")]
[System.Text.Json.Serialization.JsonPropertyName("buyer_corpid")]
public string BuyerCorpId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置延长天数。
/// </summary>
[Newtonsoft.Json.JsonProperty("prolong_days")]
[System.Text.Json.Serialization.JsonPropertyName("prolong_days")]
public int ProlongDays { get; set; }
/// <summary>
/// 获取或设置第三方套件应用 ID。
/// </summary>
[Obsolete("相关接口或字段于 2020-01-13 下线。")]
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public int? AppId { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/service/prolong_try 接口的响应。</para>
/// </summary>
public class CgibinServiceProlongTryResponse : WechatWorkResponse
{
/// <summary>
/// 获取或设置试用到期时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("try_end_time")]
[System.Text.Json.Serialization.JsonPropertyName("try_end_time")]
public long TryEndTimestamp { get; set; }
}
}

View File

@@ -0,0 +1,6 @@
<xml>
<SuiteId><![CDATA[ww4asffe99e54c0aaa]]></SuiteId>
<PaidCorpId><![CDATA[wxf8b4f85f3a794aaa]]></PaidCorpId>
<InfoType><![CDATA[change_editon]]></InfoType>
<TimeStamp>1403610513</TimeStamp>
</xml>

View File

@@ -0,0 +1,8 @@
<xml>
<SuiteId><![CDATA[ww4asffe99e54c0aaa]]></SuiteId>
<PaidCorpId><![CDATA[wxf8b4f85f3a794aaa]]></PaidCorpId>
<InfoType><![CDATA[change_order]]></InfoType>
<TimeStamp>1403610513</TimeStamp>
<OldOrderId><![CDATA[ORDERID]]></OldOrderId>
<NewOrderId><![CDATA[ORDERID]]></NewOrderId>
</xml>

View File

@@ -0,0 +1,8 @@
<xml>
<SuiteId><![CDATA[ww4asffe99e54c0aaa]]></SuiteId>
<PaidCorpId><![CDATA[wxf8b4f85f3a794aaa]]></PaidCorpId>
<InfoType><![CDATA[open_order]]></InfoType>
<TimeStamp>1403610513</TimeStamp>
<OrderId><![CDATA[ORDERID]]></OrderId>
<OperatorId><![CDATA[OPERATORID]]></OperatorId>
</xml>

View File

@@ -0,0 +1,7 @@
<xml>
<SuiteId><![CDATA[ww4asffe99e54c0aaa]]></SuiteId>
<PaidCorpId><![CDATA[wxf8b4f85f3a794aaa]]></PaidCorpId>
<InfoType><![CDATA[pay_for_app_success]]></InfoType>
<TimeStamp>1403610513</TimeStamp>
<OrderId><![CDATA[ORDERID]]></OrderId>
</xml>

View File

@@ -0,0 +1,7 @@
<xml>
<SuiteId><![CDATA[ww4asffe99e54c0aaa]]></SuiteId>
<PaidCorpId><![CDATA[wxf8b4f85f3a794aaa]]></PaidCorpId>
<InfoType><![CDATA[refund]]></InfoType>
<TimeStamp>1403610513</TimeStamp>
<OrderId><![CDATA[ORDERID]]></OrderId>
</xml>

View File

@@ -0,0 +1,5 @@
{
"start_time": 1542091572,
"end_time": 1542177972,
"test_mode": 1
}

View File

@@ -0,0 +1,33 @@
{
"errcode": 0,
"errmsg": "ok",
"order_list": [
{
"orderid": "2018091822ks1sd3s",
"order_status": 1,
"order_type": 1,
"paid_corpid": "wwfedd7e5292d63aaa",
"operator_id": "zhangsan",
"suiteid": "wx67cce113441cc7a6",
"appid": 1,
"edition_id": "RLS65535",
"edition_name": "协同版",
"price": 100,
"user_count": 1000,
"order_period": 365,
"order_time": 1533702999,
"paid_time": 1533702910,
"begin_time": 1533702910,
"end_time": 1553515904,
"order_from": 1,
"operator_corpid": "wwfedd7e5292d63aaa",
"service_share_amount": 60,
"platform_share_amount": 10,
"dealer_share_amount": 30,
"dealer_corp_info": {
"corpid": "xxxx",
"corp_name": "name"
}
}
]
}

View File

@@ -0,0 +1,3 @@
{
"orderid": "2018091822ks1sd3s"
}

View File

@@ -0,0 +1,29 @@
{
"errcode": 0,
"errmsg": "ok",
"orderid": "2018091822ks1sd3s",
"order_status": 1,
"order_type": 1,
"paid_corpid": "wwfedd7e5291d63aaa",
"operator_id": "zhangsan",
"suiteid": "wx67cce113441ccaaa",
"appid": 1,
"edition_id": "RLS65535",
"edition_name": "协同版",
"price": 100,
"user_count": 1000,
"order_period": 365,
"order_time": 1533702999,
"paid_time": 1533702910,
"begin_time": 1533702910,
"end_time": 1553515904,
"order_from": 1,
"operator_corpid": "wwfedd7e5292d63aaa",
"service_share_amount": 60,
"platform_share_amount": 10,
"dealer_share_amount": 30,
"dealer_corp_info": {
"corpid": "xxxx",
"corp_name": "name"
}
}

View File

@@ -0,0 +1,5 @@
{
"buyer_corpid": "wx7da9abf8ac62baaa",
"prolong_days": 7,
"appid": 1
}

View File

@@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"try_end_time": 1565152189
}