mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-10 17:56:21 +08:00
feat(wxapi): 新增微信小店申请关联供货商接口
This commit is contained in:
@@ -7947,6 +7947,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECSupplierRelationGetECListResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/supplier/relation/invite_supplier 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/supplier/relation/api_invite_supplier.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECSupplierRelationInviteSupplierResponse> ExecuteChannelsECSupplierRelationInviteSupplierAsync(this WechatApiClient client, Models.ChannelsECSupplierRelationInviteSupplierRequest 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
|
||||
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "supplier", "relation", "invite_supplier")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECSupplierRelationInviteSupplierResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/supplier/relation/invite_supplier 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECSupplierRelationInviteSupplierRequest : WechatApiRequest, IInferable<ChannelsECSupplierRelationInviteSupplierRequest, ChannelsECSupplierRelationInviteSupplierResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置供货商 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("supplier_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("supplier_appid")]
|
||||
public string SupplierAppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置第三方服务商 ServiceId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("service_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("service_id")]
|
||||
public int? ServiceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/supplier/relation/invite_supplier 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECSupplierRelationInviteSupplierResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"supplier_appid": "wx88888888supplier",
|
||||
"service_id": 123456,
|
||||
"remark": "服务商代发邀请"
|
||||
}
|
||||
Reference in New Issue
Block a user