mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-15 23:13:32 +08:00
feat(wxapi): 新增小程序自定义交易组件相关 API 封装
This commit is contained in:
parent
1eb42807c1
commit
e46bdc919f
@ -57,7 +57,7 @@
|
||||
| √ | 小程序搜索 | 小程序 | |
|
||||
| √ | 服务市场 | 小程序 | |
|
||||
| √ | 生物认证 | 小程序 | |
|
||||
| × | <del>行业能力乘车码</del> | <del>小程序</del> | _开发中_ |
|
||||
| × | <del>行业能力:乘车码</del> | <del>小程序</del> | _开发中_ |
|
||||
| √ | 城市服务 | 小程序 | |
|
||||
| √ | 虚拟支付 | 小游戏 | |
|
||||
| √ | 开放数据 | 小游戏 | |
|
||||
@ -81,7 +81,7 @@
|
||||
| √ | 优惠券管理 | 小商店 | |
|
||||
| √ | 店铺管理 | 小商店 | |
|
||||
| √ | 商家地址管理 | 小商店 | |
|
||||
| × | <del>自定义交易组件</del> | <del>小商店</del> | _开发中_ |
|
||||
| √ | 自定义交易组件 | 小商店 | |
|
||||
| √ | 小程序联盟 | 小商店 | |
|
||||
| √ | 微信登录功能 | 开放平台 | |
|
||||
| √ | 一次性订阅消息 | 开放平台 | |
|
||||
|
@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.open_product_account_register 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/callback/account_register.html </para>
|
||||
/// </summary>
|
||||
public class OpenProductAccountRegisterEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, WechatApiEvent.Types.IXmlSerializable
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class EventData
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置开通状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
[System.Xml.Serialization.XmlElement("status")]
|
||||
public int Status { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置事件数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("OpenProductAccountRegister")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("OpenProductAccountRegister")]
|
||||
[System.Xml.Serialization.XmlElement("OpenProductAccountRegister")]
|
||||
public Types.EventData EventData { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.open_product_brand_audit 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/callback/brand_audit.html </para>
|
||||
/// </summary>
|
||||
public class OpenProductBrandAuditEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, WechatApiEvent.Types.IXmlSerializable
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class EventData : OpenProductCategoryAuditEvent.Types.EventData
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置品牌 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
|
||||
[System.Xml.Serialization.XmlElement("brand_id")]
|
||||
public int BrandId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置事件数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("QualificationAuditResult")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("QualificationAuditResult")]
|
||||
[System.Xml.Serialization.XmlElement("QualificationAuditResult")]
|
||||
public Types.EventData EventData { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.open_product_category_audit 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/callback/category_audit.html </para>
|
||||
/// </summary>
|
||||
public class OpenProductCategoryAuditEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, WechatApiEvent.Types.IXmlSerializable
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class EventData
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置审核状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
[System.Xml.Serialization.XmlElement("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_id")]
|
||||
[System.Xml.Serialization.XmlElement("audit_id")]
|
||||
public string AuditId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核单类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_type")]
|
||||
[System.Xml.Serialization.XmlElement("audit_type")]
|
||||
public int AuditType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置拒绝原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reject_reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reject_reason")]
|
||||
[System.Xml.Serialization.XmlElement("reject_reason")]
|
||||
public string? RejectReason { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置事件数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("QualificationAuditResult")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("QualificationAuditResult")]
|
||||
[System.Xml.Serialization.XmlElement("QualificationAuditResult")]
|
||||
public Types.EventData EventData { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.open_product_spu_audit 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/callback/spu_audit.html </para>
|
||||
/// </summary>
|
||||
public class OpenProductSPUAuditEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, WechatApiEvent.Types.IXmlSerializable
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class EventData
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置审核状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
[System.Xml.Serialization.XmlElement("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
[System.Xml.Serialization.XmlElement("out_product_id")]
|
||||
public string OutProductId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||
[System.Xml.Serialization.XmlElement("product_id")]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置拒绝原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reject_reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reject_reason")]
|
||||
[System.Xml.Serialization.XmlElement("reject_reason")]
|
||||
public string? RejectReason { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置事件数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("OpenProductSpuAudit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("OpenProductSpuAudit")]
|
||||
[System.Xml.Serialization.XmlElement("OpenProductSpuAudit")]
|
||||
public Types.EventData EventData { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,670 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
{
|
||||
public static class WechatApiClientExecuteShopExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/img/upload 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/public/upload_img.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopImageUploadResponse> ExecuteShopImageUploadAsync(this WechatApiClient client, Models.ShopImageUploadRequest 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(HttpMethod.Post, "shop", "img", "upload")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x");
|
||||
string filename = "image.png";
|
||||
var httpContent = new MultipartFormDataContent(boundary);
|
||||
var fileContent = new ByteArrayContent(request.ImageFileBytes ?? new byte[0]);
|
||||
httpContent.Add(fileContent, "\"media\"", "\"" + filename + "\"");
|
||||
fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("image/png");
|
||||
fileContent.Headers.ContentLength = request.ImageFileBytes?.Length;
|
||||
httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary);
|
||||
return await client.SendRequestAsync<Models.ShopImageUploadResponse>(flurlReq, content: httpContent, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
#region Register
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/register/apply 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/enter/enter_apply.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopRegisterApplyResponse> ExecuteShopRegisterApplyAsync(this WechatApiClient client, Models.ShopRegisterApplyRequest 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(HttpMethod.Post, "shop", "register", "apply")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopRegisterApplyResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/register/check 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/enter/enter_check.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopRegisterCheckResponse> ExecuteShopRegisterCheckAsync(this WechatApiClient client, Models.ShopRegisterCheckRequest 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(HttpMethod.Post, "shop", "register", "check")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopRegisterCheckResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Category
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/cat/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/cat/get_children_cateogry.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopCategoryGetResponse> ExecuteShopCategoryGetAsync(this WechatApiClient client, Models.ShopCategoryGetRequest 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(HttpMethod.Post, "shop", "cat", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopCategoryGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Audit
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/audit/audit_brand 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/audit/audit_brand.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAuditAuditBrandResponse> ExecuteShopAuditAuditBrandAsync(this WechatApiClient client, Models.ShopAuditAuditBrandRequest 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(HttpMethod.Post, "shop", "audit", "audit_brand")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAuditAuditBrandResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/audit/audit_category 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/audit/audit_category.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAuditAuditCategoryResponse> ExecuteShopAuditAuditCategoryAsync(this WechatApiClient client, Models.ShopAuditAuditCategoryRequest 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(HttpMethod.Post, "shop", "audit", "audit_category")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAuditAuditCategoryResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/audit/result 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/audit/audit_result.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAuditResultResponse> ExecuteShopAuditResultAsync(this WechatApiClient client, Models.ShopAuditResultRequest 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(HttpMethod.Post, "shop", "audit", "result")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAuditResultResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/audit/get_miniapp_certificate 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/audit/get_miniapp_certificate.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAuditGetMiniAppCertificateResponse> ExecuteShopAuditGetMiniAppCertificateAsync(this WechatApiClient client, Models.ShopAuditGetMiniAppCertificateRequest 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(HttpMethod.Post, "shop", "audit", "get_miniapp_certificate")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAuditGetMiniAppCertificateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Account
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/account/get_category_list 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/account/category_list.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAccountGetCategoryListResponse> ExecuteShopAccountGetCategoryListAsync(this WechatApiClient client, Models.ShopAccountGetCategoryListRequest 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(HttpMethod.Post, "shop", "account", "get_category_list")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAccountGetCategoryListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/account/get_brand_list 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/account/brand_list.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAccountGetBrandListResponse> ExecuteShopAccountGetBrandListAsync(this WechatApiClient client, Models.ShopAccountGetBrandListRequest 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(HttpMethod.Post, "shop", "account", "get_brand_list")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAccountGetBrandListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/account/get_info 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/account/get_info.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAccountGetInfoResponse> ExecuteShopAccountGetInfoAsync(this WechatApiClient client, Models.ShopAccountGetInfoRequest 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(HttpMethod.Post, "shop", "account", "get_info")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAccountGetInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/account/update_info 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/account/update_info.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAccountUpdateInfoResponse> ExecuteShopAccountUpdateInfoAsync(this WechatApiClient client, Models.ShopAccountUpdateInfoRequest 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(HttpMethod.Post, "shop", "account", "update_info")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAccountUpdateInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SPU
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/spu/add 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/SPU/add_spu.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopSPUAddResponse> ExecuteShopSPUAddAsync(this WechatApiClient client, Models.ShopSPUAddRequest 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(HttpMethod.Post, "shop", "spu", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopSPUAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/spu/update 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/SPU/update_spu.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopSPUUpdateResponse> ExecuteShopSPUUpdateAsync(this WechatApiClient client, Models.ShopSPUUpdateRequest 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(HttpMethod.Post, "shop", "spu", "update")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopSPUUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/spu/del 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/SPU/del_spu.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopSPUDeleteResponse> ExecuteShopSPUDeleteAsync(this WechatApiClient client, Models.ShopSPUDeleteRequest 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(HttpMethod.Post, "shop", "spu", "del")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopSPUDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/spu/del_audit 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/SPU/del_spu_audit.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopSPUDeleteAuditResponse> ExecuteShopSPUDeleteAuditAsync(this WechatApiClient client, Models.ShopSPUDeleteAuditRequest 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(HttpMethod.Post, "shop", "spu", "del_audit")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopSPUDeleteAuditResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/spu/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/SPU/get_spu.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopSPUGetResponse> ExecuteShopSPUGetAsync(this WechatApiClient client, Models.ShopSPUGetRequest 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(HttpMethod.Post, "shop", "spu", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopSPUGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/spu/get_list 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/order/check_scene.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopSPUGetListResponse> ExecuteShopSPUGetListAsync(this WechatApiClient client, Models.ShopSPUGetListRequest 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(HttpMethod.Post, "shop", "spu", "get_list")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopSPUGetListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/spu/listing 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/SPU/listing_spu.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopSPUListingResponse> ExecuteShopSPUListingAsync(this WechatApiClient client, Models.ShopSPUListingRequest 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(HttpMethod.Post, "shop", "spu", "listing")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopSPUListingResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/spu/delisting 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/SPU/delisting_spu.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopSPUDelistingResponse> ExecuteShopSPUDelistingAsync(this WechatApiClient client, Models.ShopSPUDelistingRequest 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(HttpMethod.Post, "shop", "spu", "delisting")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopSPUDelistingResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Order
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/scene/check 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/order/check_scene.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopSceneCheckResponse> ExecuteShopSceneCheckAsync(this WechatApiClient client, Models.ShopSceneCheckRequest 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(HttpMethod.Post, "shop", "scene", "check")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopSceneCheckResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/order/add 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/order/add_order.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopOrderAddResponse> ExecuteShopOrderAddAsync(this WechatApiClient client, Models.ShopOrderAddRequest 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(HttpMethod.Post, "shop", "order", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopOrderAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/order/pay 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/order/pay_order.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopOrderPayResponse> ExecuteShopOrderPayAsync(this WechatApiClient client, Models.ShopOrderPayRequest 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(HttpMethod.Post, "shop", "order", "pay")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopOrderPayResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/order/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/order/get_order.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopOrderGetResponse> ExecuteShopOrderGetAsync(this WechatApiClient client, Models.ShopOrderGetRequest 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(HttpMethod.Post, "shop", "order", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopOrderGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Delivery
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/delivery/get_company_list 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/delivery/get_company_list.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopDeliveryGetCompanyListResponse> ExecuteShopDeliveryGetCompanyListAsync(this WechatApiClient client, Models.ShopDeliveryGetCompanyListRequest 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(HttpMethod.Post, "shop", "delivery", "get_company_list")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopDeliveryGetCompanyListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/delivery/send 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/delivery/send.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopDeliverySendResponse> ExecuteShopDeliverySendAsync(this WechatApiClient client, Models.ShopDeliverySendRequest 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(HttpMethod.Post, "shop", "delivery", "send")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopDeliverySendResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/delivery/recieve 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/delivery/recieve.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopDeliveryReceiveResponse> ExecuteShopDeliveryReceiveAsync(this WechatApiClient client, Models.ShopDeliveryReceiveRequest 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(HttpMethod.Post, "shop", "delivery", "recieve")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopDeliveryReceiveResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Aftersale
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/aftersale/add 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/aftersale/add.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAftersaleAddResponse> ExecuteShopAftersaleAddAsync(this WechatApiClient client, Models.ShopAftersaleAddRequest 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(HttpMethod.Post, "shop", "aftersale", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAftersaleAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/aftersale/update 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/aftersale/update.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAftersaleUpdateResponse> ExecuteShopAftersaleUpdateAsync(this WechatApiClient client, Models.ShopAftersaleUpdateRequest 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(HttpMethod.Post, "shop", "aftersale", "update")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAftersaleUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/aftersale/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/API/aftersale/get.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopAftersaleGetResponse> ExecuteShopAftersaleGetAsync(this WechatApiClient client, Models.ShopAftersaleGetRequest 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(HttpMethod.Post, "shop", "aftersale", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopAftersaleGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/account/get_brand_list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAccountGetBrandListRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/account/get_brand_list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAccountGetBrandListResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Brand
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置品牌 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
|
||||
public int BrandId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌词。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_wording")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_wording")]
|
||||
public string BrandWording { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Brand[] BrandList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/account/get_category_list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAccountGetCategoryListRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/account/get_category_list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAccountGetCategoryListResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Category : ShopCategoryGetResponse.Types.Category
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类目列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Category[] CategoryList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/account/get_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAccountGetInfoRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/account/get_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAccountGetInfoResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置客服页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("service_agent_path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("service_agent_path")]
|
||||
public string? ServiceAgentPagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置客服联系电话。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("service_agent_phone")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("service_agent_phone")]
|
||||
public string? ServiceAgentPhoneNumber { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/account/update_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAccountUpdateInfoRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置客服页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("service_agent_path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("service_agent_path")]
|
||||
public string? ServiceAgentPagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置客服联系电话。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("service_agent_phone")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("service_agent_phone")]
|
||||
public string? ServiceAgentPhoneNumber { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/account/update_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAccountUpdateInfoResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/aftersale/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAftersaleAddRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string OutProductId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_sku_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
|
||||
public string OutSKUId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置参与售后的商品数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_cnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_cnt")]
|
||||
public int? Count { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string OutOrderId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义售后单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_aftersale_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_aftersale_id")]
|
||||
public string OutAftersaleOrderId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序该售后单的页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||
public string PagePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发起申请时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否处理完成。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finish_all_aftersale")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finish_all_aftersale")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsFinishAll { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_infos")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_infos")]
|
||||
public IList<Types.Product> ProductList { get; set; } = new List<Types.Product>();
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/aftersale/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAftersaleAddResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/aftersale/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAftersaleGetRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。与字段 <see cref="OutOrderId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long? OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。与字段 <see cref="OrderId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string? OutOrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/aftersale/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAftersaleGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AftersaleOrder
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string OutProductId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_sku_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
|
||||
public string OutSKUId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置参与售后的商品数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_cnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_cnt")]
|
||||
public int? Count { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string OutOrderId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义售后单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_aftersale_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_aftersale_id")]
|
||||
public string OutAftersaleOrderId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序该售后单的页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||
public string PagePath { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发起申请时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_infos")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_infos")]
|
||||
public Types.Product[] ProductList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后单列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("aftersale_infos")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("aftersale_infos")]
|
||||
public Types.AftersaleOrder[] AftersaleOrderList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/aftersale/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAftersaleUpdateRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string OutOrderId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义售后单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_aftersale_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_aftersale_id")]
|
||||
public string OutAftersaleOrderId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否处理完成。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finish_all_aftersale")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finish_all_aftersale")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsFinishAll { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/aftersale/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAftersaleUpdateResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/audit/audit_brand 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAuditAuditBrandRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Audit
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Brand
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置认证审核类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_audit_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_audit_type")]
|
||||
public int BrandAuditType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌经营类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_management_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_management_type")]
|
||||
public int BrandManagementType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标分类。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trademark_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trademark_type")]
|
||||
public string TrademarkType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品产地类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("commodity_origin_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("commodity_origin_type")]
|
||||
public int CommodityOriginType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标或品牌词。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_wording")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_wording")]
|
||||
public string BrandWording { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置销售授权书图片 URL 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sale_authorization")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sale_authorization")]
|
||||
public IList<string>? SaleAuthorizationUrlList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标注册证书图片 URL 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trademark_registration_certificate")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trademark_registration_certificate")]
|
||||
public IList<string>? TrademarkRegistrationCertificateUrlList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标变更证明图片 URL 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trademark_change_certificate")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trademark_change_certificate")]
|
||||
public IList<string>? TrademarkChangeCertificateUrlList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标注册人姓名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trademark_registrant")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trademark_registrant")]
|
||||
public string? TrademarkRegistrant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标注册号或申请号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trademark_registrant_nu")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trademark_registrant_nu")]
|
||||
public string? TrademarkRegistrantNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标有效时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trademark_authorization_period")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trademark_authorization_period")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? TrademarkAuthorizationTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标注册申请受理通知书图片 URL 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trademark_registration_application")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trademark_registration_application")]
|
||||
public IList<string>? TrademarkRegistrationApplicationUrlList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标申请人姓名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trademark_applicant")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trademark_applicant")]
|
||||
public string? TrademarkApplicant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标申请时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trademark_application_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trademark_application_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? TrademarkApplicationTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置海关进口货物报关单图片 URL 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("imported_goods_form")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("imported_goods_form")]
|
||||
public IList<string>? ImportedGoodsFormUrlList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置营业执照或组织机构代码证图片 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("license")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("license")]
|
||||
public string LicenseUrl { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_info")]
|
||||
public Types.Brand Brand { get; set; } = new Types.Brand();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核单信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_req")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_req")]
|
||||
public Types.Audit Audit { get; set; } = new Types.Audit();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/audit/audit_brand 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAuditAuditBrandResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置审核单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_id")]
|
||||
public string AuditId { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/audit/audit_category 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAuditAuditCategoryRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Audit
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Category
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置一级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("level1")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("level1")]
|
||||
public int FirstCategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("level2")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("level2")]
|
||||
public int SecondCategroyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置三级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("level3")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("level3")]
|
||||
public int ThirdCategroyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资质材料图片 URL 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("certificate")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("certificate")]
|
||||
public IList<string>? QualificationUrlList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置营业执照或组织机构代码证图片 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("license")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("license")]
|
||||
public string LicenseUrl { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类目信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("category_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("category_info")]
|
||||
public Types.Category Category { get; set; } = new Types.Category();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核单信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_req")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_req")]
|
||||
public Types.Audit Audit { get; set; } = new Types.Audit();
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/audit/audit_category 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAuditAuditCategoryResponse : ShopAuditAuditBrandResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/audit/get_miniapp_certificate 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAuditGetMiniAppCertificateRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置请求类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("req_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("req_type")]
|
||||
public int RequestType { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/audit/get_miniapp_certificate 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAuditGetMiniAppCertificateResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Brand
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商标或品牌词。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_wording")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_wording")]
|
||||
public string BrandWording { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置销售授权书图片 URL 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sale_authorization")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sale_authorization")]
|
||||
public string[]? SaleAuthorizationUrlList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商标注册证书图片 URL 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trademark_registration_certificate")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trademark_registration_certificate")]
|
||||
public string[]? TrademarkRegistrationCertificateUrlList { get; set; }
|
||||
}
|
||||
|
||||
public class Category
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置一级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("first_category_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("first_category_id")]
|
||||
public int FirstCategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置一级类目名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("first_category_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("first_category_name")]
|
||||
public string FirstCategoryName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("second_category_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("second_category_id")]
|
||||
public int SecondCategroyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级类目名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("second_category_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("second_category_name")]
|
||||
public string SecondCategoryName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资质材料图片 URL 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("certificate_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("certificate_url")]
|
||||
public string[]? QualificationUrlList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_info")]
|
||||
public Types.Brand? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分类列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("category_info_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("category_info_list")]
|
||||
public Types.Category[]? CategoryList { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/audit/result 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopAuditResultRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置审核单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_id")]
|
||||
public string AuditId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/audit/result 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopAuditResultResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置审核状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
|
||||
public int? BrandId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置拒绝原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reject_reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reject_reason")]
|
||||
public string? RejectReason { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/cat/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopCategoryGetRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/cat/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopCategoryGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Category
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置一级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("first_cat_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("first_cat_id")]
|
||||
public int FirstCategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置一级类目 ID 名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("first_cat_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("first_cat_name")]
|
||||
public string FirstCategoryName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("second_cat_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("second_cat_id")]
|
||||
public int SecondCategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级类目 ID 名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("second_cat_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("second_cat_name")]
|
||||
public string SecondCategoryName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置三级类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("third_cat_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("third_cat_id")]
|
||||
public int ThirdCategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置三级类目 ID 名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("third_cat_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("third_cat_name")]
|
||||
public string ThirdCategoryName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类目资质类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_type")]
|
||||
public int QualificationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类目资质。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification")]
|
||||
public string? Qualification { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品资质类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_qualification_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_qualification_type")]
|
||||
public int ProductQualificationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品资质。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_qualification")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_qualification")]
|
||||
public string? ProductQualification { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类目列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("third_cat_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("third_cat_list")]
|
||||
public Types.Category[] CategoryList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/delivery/get_company_list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopDeliveryGetCompanyListRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/delivery/get_company_list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopDeliveryGetCompanyListResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class DeliveryCompanyList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置快递公司列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("company_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("company_list")]
|
||||
public DeliveryCompanyItem[] Items { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class DeliveryCompanyItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置快递公司 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
|
||||
public string DeliveryId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递公司名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_name")]
|
||||
public string DeliveryName { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递公司列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.DeliveryCompanyList DeliveryCompanyList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/delivery/recieve 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopDeliveryReceiveRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。与字段 <see cref="OutOrderId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long? OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。与字段 <see cref="OrderId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string? OutOrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/delivery/recieve 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopDeliveryReceiveResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/delivery/send 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopDeliverySendRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Delivery
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置快递公司 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
|
||||
public string DeliveryId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("waybill_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("waybill_id")]
|
||||
public string? WaybillId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。与字段 <see cref="OutOrderId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long? OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。与字段 <see cref="OrderId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string? OutOrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否发货完成。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finish_all_delivery")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finish_all_delivery")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsFinishAll { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_list")]
|
||||
public IList<Types.Delivery> DeliveryList { get; set; } = new List<Types.Delivery>();
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/delivery/send 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopDeliverySendResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,292 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/order/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopOrderAddRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class OrderDetail
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string OutProductId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_sku_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
|
||||
public string OutSKUId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_cnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_cnt")]
|
||||
public int Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品售价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sale_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sale_price")]
|
||||
public int SalePrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序商品页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||
public string PagePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品头图 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("head_img")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("head_img")]
|
||||
public string HeadImageUrl { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Payment
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置支付方式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_method_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_method_type")]
|
||||
public int PayType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置预支付单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("prepay_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("prepay_id")]
|
||||
public string PrepayId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置预支付时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("prepay_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("prepay_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset PrepayTime { get; set; }
|
||||
}
|
||||
|
||||
public class Amount
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_price")]
|
||||
public int OrderFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置运费(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("freight")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("freight")]
|
||||
public int FreightFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("discounted_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("discounted_price")]
|
||||
public int DiscountedFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附加金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("additional_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("additional_price")]
|
||||
public int AdditionalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附加金额备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("additional_remarks")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("additional_remarks")]
|
||||
public string? AdditionalRemark { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_infos")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_infos")]
|
||||
public IList<Types.Product> ProductList { get; set; } = new List<Types.Product>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_info")]
|
||||
public Types.Payment Payment { get; set; } = new Types.Payment();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置金额信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("price_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("price_info")]
|
||||
public Types.Amount Amount { get; set; } = new Types.Amount();
|
||||
}
|
||||
|
||||
public class Delivery
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置快递方式。
|
||||
/// <para>默认值:1</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_type")]
|
||||
public int DeliveryType { get; set; } = 1;
|
||||
}
|
||||
|
||||
public class Address
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置收件人姓名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("receiver_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("receiver_name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置国家。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("country")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("country")]
|
||||
public string? Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置省份。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("province")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("province")]
|
||||
public string? Province { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置城市。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("city")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("city")]
|
||||
public string? City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置区县。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("town")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("town")]
|
||||
public string? District { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置详细地址。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("detailed_address")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("detailed_address")]
|
||||
public string Detail { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置联系电话。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("tel_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("tel_number")]
|
||||
public string TeleNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string OutOrderId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义用户标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_user_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_user_id")]
|
||||
public string? OutUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场景值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("scene")]
|
||||
public int Scene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序订单页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||
public string PagePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单详细信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_detail")]
|
||||
public Types.OrderDetail OrderDetail { get; set; } = new Types.OrderDetail();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_detail")]
|
||||
public Types.Delivery Delivery { get; set; } = new Types.Delivery();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置地址信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("address_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("address_info")]
|
||||
public Types.Address? Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset CreateTime { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/order/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopOrderAddResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string OutOrderId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置拉起收银台的票据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ticket")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ticket")]
|
||||
public string Ticket { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置拉起收银台的票据有效时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ticket_expire_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ticket_expire_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset TicketExpireTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单最终价格(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("final_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("final_price")]
|
||||
public int FinalFee { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/order/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopOrderGetRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。与字段 <see cref="OutOrderId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long? OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。与字段 <see cref="OrderId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string? OutOrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,292 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/order/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopOrderGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class OrderDetail
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string OutProductId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
|
||||
public long SKUId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_sku_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
|
||||
public string OutSKUId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_cnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_cnt")]
|
||||
public int Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品售价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sale_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sale_price")]
|
||||
public int SalePrice { get; set; }
|
||||
}
|
||||
|
||||
public class Payment
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置支付方式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_method")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_method")]
|
||||
public string PayMethod { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置预支付单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("prepay_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("prepay_id")]
|
||||
public string PrepayId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置预支付时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("prepay_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("prepay_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset PrepayTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付交易单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("transaction_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
|
||||
public string? TransactionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置付款时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? PayTime { get; set; }
|
||||
}
|
||||
|
||||
public class Amount
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_price")]
|
||||
public int OrderFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置运费(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("freight")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("freight")]
|
||||
public int FreightFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("discounted_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("discounted_price")]
|
||||
public int DiscountedFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附加金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("additional_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("additional_price")]
|
||||
public int AdditionalPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附加金额备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("additional_remarks")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("additional_remarks")]
|
||||
public string? AdditionalRemark { get; set; }
|
||||
}
|
||||
|
||||
public class Delivery
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class DeliveryDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置快递公司 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
|
||||
public string DeliveryId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("waybill_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("waybill_id")]
|
||||
public string WaybillId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递方式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_type")]
|
||||
public int DeliveryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否发货完成。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finish_all_delivery")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finish_all_delivery")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsFinishAll { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递详情列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_list")]
|
||||
public Types.DeliveryDetail[]? DeliveryDetailList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_infos")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_infos")]
|
||||
public Types.Product[] ProductList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_info")]
|
||||
public Types.Payment? Payment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置多支付信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("multi_pay_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("multi_pay_info")]
|
||||
public Types.Payment[]? PaymentList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置金额信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("price_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("price_info")]
|
||||
public Types.Amount Amount { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_detail")]
|
||||
public Types.Delivery? Delivery { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string OutOrderId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序订单页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||
public string PagePath { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单详细信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_detail")]
|
||||
public Types.OrderDetail OrderDetail { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order")]
|
||||
public Types.Order Order { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/order/pay 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopOrderPayRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。与字段 <see cref="OutOrderId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long? OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义订单号。与字段 <see cref="OrderId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_order_id")]
|
||||
public string? OutOrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置操作类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("action_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("action_type")]
|
||||
public int ActionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置操作备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("action_remark")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("action_remark")]
|
||||
public string? ActionRemark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付交易单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("transaction_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
|
||||
public string? TransactionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置付款时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? PayTime { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/order/pay 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopOrderPayResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/scene/check 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopSceneCheckRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置场景值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("scene")]
|
||||
public int Scene { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/scene/check 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopSceneCheckResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否在支付校验范围内。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_matched")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_matched")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsMatched { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/register/apply 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopRegisterApplyRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/register/apply 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopRegisterApplyResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/register/check 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopRegisterCheckRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/register/check 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopRegisterCheckResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Access
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置上传商品并审核成功状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("spu_audit_success")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("spu_audit_success")]
|
||||
public int SPUAuditStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发起一笔订单并支付成功状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_order_success")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_order_success")]
|
||||
public int PayOrderStatus { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置接入相关信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("access_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("access_info")]
|
||||
public Types.Access? Access { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUAddRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Detail : ProductSPUAddRequest.Types.Detail
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Attribute : ProductSPUAddRequest.Types.Attribute
|
||||
{
|
||||
}
|
||||
|
||||
public class SKU
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string OutProductId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_sku_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
|
||||
public string OutSKUId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置缩略图 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("thumb_img")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("thumb_img")]
|
||||
public string ThumbnailUrl { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sale_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sale_price")]
|
||||
public int SalePrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置市场价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("market_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("market_price")]
|
||||
public int MarketPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置库存。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("stock_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("stock_num")]
|
||||
public int Stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品编码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_code")]
|
||||
public string? SKUCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置条形码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("barcode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("barcode")]
|
||||
public string? BarCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品属性列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_attrs")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_attrs")]
|
||||
public IList<Attribute> AttributeList { get; set; } = new List<Attribute>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string OutProductId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序商品页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||
public string PagePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主图 Url 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("head_img")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("head_img")]
|
||||
public IList<string> HeadImageUrlList { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品资质图片 Url 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_pics")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_pics")]
|
||||
public IList<string>? QualificationPictureUrlList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品详情信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc_info")]
|
||||
public Types.Detail? Detail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("third_cat_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("third_cat_id")]
|
||||
public int CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
|
||||
public int BrandId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置版本控制。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("info_version")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("info_version")]
|
||||
public string? InfoVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skus")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skus")]
|
||||
public IList<Types.SKU> SKUList { get; set; } = new List<Types.SKU>();
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUAddResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data : ProductSPUAddResponse.Types.Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SKU
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
|
||||
public long SKUId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_sku_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
|
||||
public string OutSKUId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skus")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skus")]
|
||||
public Types.SKU[] SKUList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/del_audit 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUDeleteAuditRequest : ShopSPUDeleteRequest
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/del_audit 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUDeleteAuditResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/del 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUDeleteRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。与字段 <see cref="OutProductId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||
public long? ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。与字段 <see cref="ProductId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string? OutProductId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/del 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUDeleteResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/delisting 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUDelistingRequest : ShopSPUListingRequest
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/delisting 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUDelistingResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/get_list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUGetListRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置指定创建时间的开始时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start_create_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("start_create_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? StartCreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置指定创建时间的结束时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_create_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_create_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? EndCreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置指定更新时间的开始时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start_update_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("start_update_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? StartUpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置指定更新时间的结束时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_update_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_update_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? EndUpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置指定商品上线状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int ListingStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数(从 1 开始)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page")]
|
||||
public int Page { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否获取草稿数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("need_edit_spu")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("need_edit_spu")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))]
|
||||
public bool? RequireEdittingSPU { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/get_list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUGetListResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SPU : ShopSPUGetResponse.Types.SPU
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SPU 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("spus")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("spus")]
|
||||
public Types.SPU[] SPUList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SPU 总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
|
||||
public int Total { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUGetRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。与字段 <see cref="OutProductId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||
public long? ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。与字段 <see cref="ProductId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string? OutProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否获取草稿数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("need_edit_spu")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("need_edit_spu")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))]
|
||||
public bool? RequireEdittingSPU { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,278 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SPU
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Detail
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc")]
|
||||
public string Description { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品详情图片 Url 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("imgs")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("imgs")]
|
||||
public string[] ImageUrlList { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class Audit
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置审核单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_id")]
|
||||
public string AuditId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提交时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("submit_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("submit_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset SubmitTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? AuditTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置拒绝原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reject_reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reject_reason")]
|
||||
public string? RejectReason { get; set; }
|
||||
}
|
||||
|
||||
public class Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置属性的 Key。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("attr_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("attr_key")]
|
||||
public string Key { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置属性的值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("attr_value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("attr_value")]
|
||||
public string Value { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class SKU
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
|
||||
public long SKUId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_sku_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
|
||||
public string OutSKUId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置缩略图 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("thumb_img")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("thumb_img")]
|
||||
public string ThumbnailUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sale_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sale_price")]
|
||||
public int SalePrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置市场价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("market_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("market_price")]
|
||||
public int MarketPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置库存。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("stock_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("stock_num")]
|
||||
public int Stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品编码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_code")]
|
||||
public string? SKUCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置条形码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("barcode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("barcode")]
|
||||
public string? BarCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品属性列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_attrs")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_attrs")]
|
||||
public Attribute[] AttributeList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string OutProductId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序商品页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||
public string PagePath { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主图 Url 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("head_img")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("head_img")]
|
||||
public string[] HeadImageUrlList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品资质图片 Url 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_pics")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_pics")]
|
||||
public string[]? QualificationPictureUrlList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品详情信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc_info")]
|
||||
public Types.Detail Detail { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品审核信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_info")]
|
||||
public Types.Audit Audit { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("third_cat_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("third_cat_id")]
|
||||
public int CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
|
||||
public int BrandId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置版本控制。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("info_version")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("info_version")]
|
||||
public string? InfoVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品上线状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int ListingStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品草稿状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("edit_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("edit_status")]
|
||||
public int EditingStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skus")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skus")]
|
||||
public Types.SKU[]? SKUList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonDateTimeOffsetConverter))]
|
||||
public DateTimeOffset CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SPU 信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("spu")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("spu")]
|
||||
public Types.SPU SPU { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/listing 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUListingRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。与字段 <see cref="OutProductId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||
public long? ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。与字段 <see cref="ProductId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string? OutProductId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/listing 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUListingResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUUpdateRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Detail : ShopSPUAddRequest.Types.Detail
|
||||
{
|
||||
}
|
||||
|
||||
public class Attribute : ShopSPUAddRequest.Types.Attribute
|
||||
{
|
||||
}
|
||||
|
||||
public class SKU : ShopSPUAddRequest.Types.SKU
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。与字段 <see cref="OutProductId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||
public long? ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。与字段 <see cref="ProductId"/> 二选一。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string? OutProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序商品页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||
public string PagePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主图 Url 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("head_img")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("head_img")]
|
||||
public IList<string> HeadImageUrlList { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品资质图片 Url 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualification_pics")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualification_pics")]
|
||||
public IList<string>? QualificationPictureUrlList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品详情信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc_info")]
|
||||
public Types.Detail? Detail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("third_cat_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("third_cat_id")]
|
||||
public int CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
|
||||
public int BrandId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置版本控制。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("info_version")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("info_version")]
|
||||
public string? InfoVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skus")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skus")]
|
||||
public IList<Types.SKU> SKUList { get; set; } = new List<Types.SKU>();
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/spu/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopSPUUpdateResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data : ProductSPUUpdateResponse.Types.Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SKU : ShopSPUAddResponse.Types.Data.Types.SKU
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skus")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skus")]
|
||||
public Types.SKU[] SKUList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/img/upload 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopImageUploadRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图片文件字节数组。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public byte[] ImageFileBytes { get; set; } = new byte[0];
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/img/upload 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopImageUploadResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Image
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("media_id")]
|
||||
public string MediaId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("img_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("img_info")]
|
||||
public Types.Image Image { get; set; } = default!;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user