diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/NotifyApplyICPFilingResultEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/NotifyApplyICPFilingResultEvent.cs index 0b63f1d2..026d10df 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/NotifyApplyICPFilingResultEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/NotifyApplyICPFilingResultEvent.cs @@ -1,4 +1,4 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Events.OpenComponent +namespace SKIT.FlurlHttpClient.Wechat.Api.Events { /// /// 表示 INFO.notify_apply_icpfiling_result 事件的数据。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExpressExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExpressExtensions.cs index 1212c5de..5cf514fd 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExpressExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExpressExtensions.cs @@ -29,330 +29,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return request; } - #region LocalBusiness - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/order/pre_add 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.preAddOrder.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessOrderPreAddAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderPreAddRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "pre_add") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/order/add 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.addOrder.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessOrderAddAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderAddRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "add") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/order/readd 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.addOrder.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessOrderReAddAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderReAddRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "readd") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/order/addtips 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.addTip.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessOrderAddTipsAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderAddTipsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "addtips") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/order/get 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.getOrder.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessOrderGetAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderGetRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "get") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/order/precancel 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.preCancelOrder.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessOrderPreCancelAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderPreCancelRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "precancel") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/order/cancel 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.cancelOrder.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessOrderCancelAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderCancelRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "cancel") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/order/confirm_return 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.abnormalConfirm.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessOrderConfirmReturnAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderConfirmReturnRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "confirm_return") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/delivery/getall 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.getAllImmeDelivery.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessDeliveryGetAllAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessDeliveryGetAllRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "delivery", "getall") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/shop/add 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.bindAccount.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessShopAddAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessShopAddRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "shop", "add") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/shop/get 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.getBindAccount.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessShopGetAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessShopGetRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "shop", "get") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/test_update_order 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.mockUpdateOrder.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessTestUpdateOrderAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessTestUpdateOrderRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "test_update_order") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/realmock_update_order 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.mockUpdateOrder.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessRealMockUpdateOrderAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessRealMockUpdateOrderRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "realmock_update_order") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/open 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.openDelivery.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessOpenAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOpenRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "open") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /cgi-bin/express/local/business/update_order 接口。 - /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.updateOrder.html - /// - /// - /// - /// - /// - public static async Task ExecuteCgibinExpressLocalBusinessUpdateOrderAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessUpdateOrderRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - PreprocessRequest(client, ref request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "update_order") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - #region Business /// /// 异步调用 [POST] /cgi-bin/express/business/order/add 接口。 @@ -918,5 +594,591 @@ namespace SKIT.FlurlHttpClient.Wechat.Api } #endregion #endregion + + #region Intracity + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/apply 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-1-%E5%BC%80%E9%80%9A%E9%97%A8%E5%BA%97%E6%9D%83%E9%99%90 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityApplyAsync(this WechatApiClient client, Models.CgibinExpressIntracityApplyRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "apply") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/createstore 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-2-%E5%88%9B%E5%BB%BA%E9%97%A8%E5%BA%97 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityCreateStoreAsync(this WechatApiClient client, Models.CgibinExpressIntracityCreateStoreRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "createstore") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/querystore 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-3-%E6%9F%A5%E8%AF%A2%E9%97%A8%E5%BA%97 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityQueryStoreAsync(this WechatApiClient client, Models.CgibinExpressIntracityQueryStoreRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "querystore") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/updatestore 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-4-%E6%9B%B4%E6%96%B0%E9%97%A8%E5%BA%97 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityUpdateStoreAsync(this WechatApiClient client, Models.CgibinExpressIntracityUpdateStoreRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "updatestore") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/storecharge 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-5-%E9%97%A8%E5%BA%97%E8%BF%90%E8%B4%B9%E5%85%85%E5%80%BC + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityStoreChargeAsync(this WechatApiClient client, Models.CgibinExpressIntracityStoreChargeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "storecharge") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/storerefund 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-6-%E9%97%A8%E5%BA%97%E8%BF%90%E8%B4%B9%E9%80%80%E6%AC%BE + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityStoreRefundAsync(this WechatApiClient client, Models.CgibinExpressIntracityStoreRefundRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "storerefund") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/queryflow 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-7-%E9%97%A8%E5%BA%97%E8%BF%90%E8%B4%B9%E6%B5%81%E6%B0%B4%E6%9F%A5%E8%AF%A2 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityQueryFlowAsync(this WechatApiClient client, Models.CgibinExpressIntracityQueryFlowRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "queryflow") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/balancequery 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-8-%E9%97%A8%E5%BA%97%E4%BD%99%E9%A2%9D%E6%9F%A5%E8%AF%A2 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityBalanceQueryAsync(this WechatApiClient client, Models.CgibinExpressIntracityBalanceQueryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "balancequery") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/preaddorder 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-9-%E6%9F%A5%E8%AF%A2%E8%BF%90%E8%B4%B9 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityPreAddOrderAsync(this WechatApiClient client, Models.CgibinExpressIntracityPreAddOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "preaddorder") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/addorder 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-10-%E5%88%9B%E5%BB%BA%E9%85%8D%E9%80%81%E5%8D%95 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityAddOrderAsync(this WechatApiClient client, Models.CgibinExpressIntracityAddOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "addorder") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/queryorder 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-11-%E6%9F%A5%E8%AF%A2%E9%85%8D%E9%80%81%E5%8D%95 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityQueryOrderAsync(this WechatApiClient client, Models.CgibinExpressIntracityQueryOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "queryorder") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/cancelorder 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_2-12-%E5%8F%96%E6%B6%88%E9%85%8D%E9%80%81%E5%8D%95 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityCancelOrderAsync(this WechatApiClient client, Models.CgibinExpressIntracityCancelOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "cancelorder") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/intracity/mocknotify 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html#_3-2-%E6%A8%A1%E6%8B%9F%E5%9B%9E%E8%B0%83%E6%8E%A5%E5%8F%A3 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressIntracityMockNotifyAsync(this WechatApiClient client, Models.CgibinExpressIntracityMockNotifyRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "intracity", "mocknotify") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region LocalBusiness + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/order/pre_add 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.preAddOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessOrderPreAddAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderPreAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "pre_add") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/order/add 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.addOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessOrderAddAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "add") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/order/readd 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.addOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessOrderReAddAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderReAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "readd") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/order/addtips 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.addTip.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessOrderAddTipsAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderAddTipsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "addtips") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/order/get 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.getOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessOrderGetAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/order/precancel 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.preCancelOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessOrderPreCancelAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderPreCancelRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "precancel") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/order/cancel 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.cancelOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessOrderCancelAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderCancelRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "cancel") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/order/confirm_return 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.abnormalConfirm.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessOrderConfirmReturnAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOrderConfirmReturnRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "confirm_return") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/delivery/getall 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.getAllImmeDelivery.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessDeliveryGetAllAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessDeliveryGetAllRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "delivery", "getall") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/shop/add 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.bindAccount.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessShopAddAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessShopAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "shop", "add") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/shop/get 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.getBindAccount.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessShopGetAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessShopGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "shop", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/test_update_order 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.mockUpdateOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessTestUpdateOrderAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessTestUpdateOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "test_update_order") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/realmock_update_order 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.mockUpdateOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessRealMockUpdateOrderAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessRealMockUpdateOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "realmock_update_order") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/open 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.openDelivery.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessOpenAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessOpenRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "open") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/local/business/update_order 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.updateOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressLocalBusinessUpdateOrderAsync(this WechatApiClient client, Models.CgibinExpressLocalBusinessUpdateOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + PreprocessRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "local", "business", "update_order") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderRequest.cs new file mode 100644 index 00000000..4bf8770a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderRequest.cs @@ -0,0 +1,150 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/addorder 接口的请求。 + /// + public class CgibinExpressIntracityAddOrderRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class CargoInfo : CgibinExpressIntracityPreAddOrderRequest.Types.CargoInfo + { + public static class Types + { + public class Item + { + /// + /// 获取或设置物品名称。 + /// + [Newtonsoft.Json.JsonProperty("item_name")] + [System.Text.Json.Serialization.JsonPropertyName("item_name")] + public string ItemName { get; set; } = string.Empty; + + /// + /// 获取或设置物品图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("item_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("item_pic_url")] + public string ItemPictureUrl { get; set; } = string.Empty; + + /// + /// 获取或设置物品数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int ItemCount { get; set; } + } + } + + /// + /// 获取或设置物品列表。 + /// + [Newtonsoft.Json.JsonProperty("item_list")] + [System.Text.Json.Serialization.JsonPropertyName("item_list")] + public IList ItemList { get; set; } = new List(); + } + } + + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = string.Empty; + + /// + /// 获取或设置门店订单编号。 + /// + [Newtonsoft.Json.JsonProperty("store_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("store_order_id")] + public string StoreOrderId { get; set; } = string.Empty; + + /// + /// 获取或设置收件人 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("user_openid")] + [System.Text.Json.Serialization.JsonPropertyName("user_openid")] + public string UserOpenId { get; set; } = string.Empty; + + /// + /// 获取或设置收件人姓名。 + /// + [Newtonsoft.Json.JsonProperty("user_name")] + [System.Text.Json.Serialization.JsonPropertyName("user_name")] + public string UserName { get; set; } = string.Empty; + + /// + /// 获取或设置收件人手机号。 + /// + [Newtonsoft.Json.JsonProperty("user_phone")] + [System.Text.Json.Serialization.JsonPropertyName("user_phone")] + public string UserPhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置收件用户位置经度。 + /// + [Newtonsoft.Json.JsonProperty("user_lng")] + [System.Text.Json.Serialization.JsonPropertyName("user_lng")] + public double UserLongitude { get; set; } + + /// + /// 获取或设置收件用户位置维度。 + /// + [Newtonsoft.Json.JsonProperty("user_lat")] + [System.Text.Json.Serialization.JsonPropertyName("user_lat")] + public double UserLatitude { get; set; } + + /// + /// 获取或设置收件用户详细地址。 + /// + [Newtonsoft.Json.JsonProperty("user_address")] + [System.Text.Json.Serialization.JsonPropertyName("user_address")] + public string UserAddress { get; set; } = string.Empty; + + /// + /// 获取或设置订单序号。 + /// + [Newtonsoft.Json.JsonProperty("order_seq")] + [System.Text.Json.Serialization.JsonPropertyName("order_seq")] + public string? OrderSequence { get; set; } + + /// + /// 获取或设置验证码类型。 + /// + [Newtonsoft.Json.JsonProperty("verify_code_type")] + [System.Text.Json.Serialization.JsonPropertyName("verify_code_type")] + public int? VerifyCodeType { get; set; } + + /// + /// 获取或设置跳转商家订单页面路径。 + /// + [Newtonsoft.Json.JsonProperty("order_detail_path")] + [System.Text.Json.Serialization.JsonPropertyName("order_detail_path")] + public string? OrderDetailPagePath { get; set; } + + /// + /// 获取或设置回调地址。 + /// + [Newtonsoft.Json.JsonProperty("callback_url")] + [System.Text.Json.Serialization.JsonPropertyName("callback_url")] + public string? CallbackUrl { get; set; } + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("cargo")] + [System.Text.Json.Serialization.JsonPropertyName("cargo")] + public Types.CargoInfo CargoInfo { get; set; } = new Types.CargoInfo(); + + /// + /// 获取或设置是否使用沙箱。 + /// + [Newtonsoft.Json.JsonProperty("use_sandbox")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("use_sandbox")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsSandbox { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderResponse.cs new file mode 100644 index 00000000..79318039 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderResponse.cs @@ -0,0 +1,78 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/addorder 接口的响应。 + /// + public class CgibinExpressIntracityAddOrderResponse : WechatApiResponse + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置门店订单编号。 + /// + [Newtonsoft.Json.JsonProperty("store_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("store_order_id")] + public string StoreOrderId { get; set; } = default!; + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("wx_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_order_id")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_id")] + public string ServiceTransId { get; set; } = default!; + + /// + /// 获取或设置运力订单号。 + /// + [Newtonsoft.Json.JsonProperty("trans_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("trans_order_id")] + public string TransOrderId { get; set; } = default!; + + /// + /// 获取或设置运力配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string? WaybillId { get; set; } + + /// + /// 获取或设置配送距离(单位:米)。 + /// + [Newtonsoft.Json.JsonProperty("distance")] + [System.Text.Json.Serialization.JsonPropertyName("distance")] + public int Distance { get; set; } + + /// + /// 获取或设置配送费(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("fee")] + [System.Text.Json.Serialization.JsonPropertyName("fee")] + public int Fee { get; set; } + + /// + /// 获取或设置取货码。 + /// + [Newtonsoft.Json.JsonProperty("fetch_code")] + [System.Text.Json.Serialization.JsonPropertyName("fetch_code")] + public string? FetchCode { get; set; } + + /// + /// 获取或设置订单序号。 + /// + [Newtonsoft.Json.JsonProperty("order_seq")] + [System.Text.Json.Serialization.JsonPropertyName("order_seq")] + public string? OrderSequence { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityApplyRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityApplyRequest.cs new file mode 100644 index 00000000..fbdaf4ee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityApplyRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/apply 接口的请求。 + /// + public class CgibinExpressIntracityApplyRequest : WechatApiRequest, IInferable + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityApplyResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityApplyResponse.cs new file mode 100644 index 00000000..97477599 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityApplyResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/apply 接口的响应。 + /// + public class CgibinExpressIntracityApplyResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryRequest.cs new file mode 100644 index 00000000..fcf5d40a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/balancequery 接口的请求。 + /// + public class CgibinExpressIntracityBalanceQueryRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = string.Empty; + + /// + /// 获取或设置运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_id")] + public string ServiceTransId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryResponse.cs new file mode 100644 index 00000000..5062a73b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryResponse.cs @@ -0,0 +1,112 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/balancequery 接口的响应。 + /// + public class CgibinExpressIntracityBalanceQueryResponse : WechatApiResponse + { + public static class Types + { + public class BalanceDetail + { + public static class Types + { + public class Order + { + /// + /// 获取或设置充值订单号。 + /// + [Newtonsoft.Json.JsonProperty("payorder_id")] + [System.Text.Json.Serialization.JsonPropertyName("payorder_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))] + public string PayOrderId { get; set; } = default!; + + /// + /// 获取或设置充值金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("charge_amt")] + [System.Text.Json.Serialization.JsonPropertyName("charge_amt")] + public int ChargeAmount { get; set; } + + /// + /// 获取或设置未使用的余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("unused_amt")] + [System.Text.Json.Serialization.JsonPropertyName("unused_amt")] + public int UnusedAmount { get; set; } + + /// + /// 获取或设置充值生效时间戳。 + /// + [Newtonsoft.Json.JsonProperty("begin_time")] + [System.Text.Json.Serialization.JsonPropertyName("begin_time")] + public long BeginTimestamp { get; set; } + + /// + /// 获取或设置充值失效时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + } + } + + /// + /// 获取或设置余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("balance")] + [System.Text.Json.Serialization.JsonPropertyName("balance")] + public int Balance { get; set; } + + /// + /// 获取或设置运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_id")] + public string ServiceTransId { get; set; } = default!; + + /// + /// 获取或设置运力名称。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_name")] + public string ServiceTransName { get; set; } = default!; + + /// + /// 获取或设置充值订单列表。 + /// + [Newtonsoft.Json.JsonProperty("order_list")] + [System.Text.Json.Serialization.JsonPropertyName("order_list")] + public Types.Order[]? OrderList { get; set; } + } + } + + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置总余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("all_balance")] + [System.Text.Json.Serialization.JsonPropertyName("all_balance")] + public int TotalBalance { get; set; } + + /// + /// 获取或设置余额详情列表。 + /// + [Newtonsoft.Json.JsonProperty("balance_detail")] + [System.Text.Json.Serialization.JsonPropertyName("balance_detail")] + public Types.BalanceDetail[] BalanceDetailList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderRequest.cs new file mode 100644 index 00000000..0b8b9aea --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderRequest.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/cancelorder 接口的请求。 + /// + public class CgibinExpressIntracityCancelOrderRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string? StoreId { get; set; } + + /// + /// 获取或设置门店订单编号。 + /// + [Newtonsoft.Json.JsonProperty("store_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("store_order_id")] + public string? StoreOrderId { get; set; } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("wx_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_order_id")] + public string? OrderId { get; set; } + + /// + /// 获取或设置取消原因 ID。 + /// + [Newtonsoft.Json.JsonProperty("cancel_reason_id")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_reason_id")] + public int CancelReasonId { get; set; } + + /// + /// 获取或设置取消原因描述。 + /// + [Newtonsoft.Json.JsonProperty("cancel_reason")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_reason")] + public string? CancelReason { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderResponse.cs new file mode 100644 index 00000000..3189fc47 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderResponse.cs @@ -0,0 +1,50 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/cancelorder 接口的响应。 + /// + public class CgibinExpressIntracityCancelOrderResponse : WechatApiResponse + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("wx_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_order_id")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置门店订单编号。 + /// + [Newtonsoft.Json.JsonProperty("store_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("store_order_id")] + public string StoreOrderId { get; set; } = default!; + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + + /// + /// 获取或设置违约金(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("deductfee")] + [System.Text.Json.Serialization.JsonPropertyName("deductfee")] + public int? DeductFee { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreRequest.cs new file mode 100644 index 00000000..7579ddf9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreRequest.cs @@ -0,0 +1,105 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/createstore 接口的请求。 + /// + public class CgibinExpressIntracityCreateStoreRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class AddressInfo + { + /// + /// 获取或设置省份。 + /// + [Newtonsoft.Json.JsonProperty("province")] + [System.Text.Json.Serialization.JsonPropertyName("province")] + public string Province { get; set; } = string.Empty; + + /// + /// 获取或设置城市。 + /// + [Newtonsoft.Json.JsonProperty("city")] + [System.Text.Json.Serialization.JsonPropertyName("city")] + public string City { get; set; } = string.Empty; + + /// + /// 获取或设置区县。 + /// + [Newtonsoft.Json.JsonProperty("area")] + [System.Text.Json.Serialization.JsonPropertyName("area")] + public string District { get; set; } = string.Empty; + + /// + /// 获取或设置街道。 + /// + [Newtonsoft.Json.JsonProperty("street")] + [System.Text.Json.Serialization.JsonPropertyName("street")] + public string Street { get; set; } = string.Empty; + + /// + /// 获取或设置详细地址。 + /// + [Newtonsoft.Json.JsonProperty("house")] + [System.Text.Json.Serialization.JsonPropertyName("house")] + public string Address { get; set; } = string.Empty; + + /// + /// 获取或设置经度。 + /// + [Newtonsoft.Json.JsonProperty("lng")] + [System.Text.Json.Serialization.JsonPropertyName("lng")] + public double Longitude { get; set; } + + /// + /// 获取或设置纬度。 + /// + [Newtonsoft.Json.JsonProperty("lat")] + [System.Text.Json.Serialization.JsonPropertyName("lat")] + public double Latitude { get; set; } + + /// + /// 获取或设置门店联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone")] + [System.Text.Json.Serialization.JsonPropertyName("phone")] + public string PhoneNumber { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置商家自定义门店编号。 + /// + [Newtonsoft.Json.JsonProperty("out_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_store_id")] + public string OutStoreId { get; set; } = string.Empty; + + /// + /// 获取或设置门店名称。 + /// + [Newtonsoft.Json.JsonProperty("store_name")] + [System.Text.Json.Serialization.JsonPropertyName("store_name")] + public string StoreName { get; set; } = string.Empty; + + /// + /// 获取或设置运力偏好类型。 + /// + [Newtonsoft.Json.JsonProperty("order_pattern")] + [System.Text.Json.Serialization.JsonPropertyName("order_pattern")] + public int? OrderPatternType { get; set; } + + /// + /// 获取或设置优先使用的运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_prefer")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_prefer")] + public string? ServiceTransIdPrefer { get; set; } + + /// + /// 获取或设置门店地址信息。 + /// + [Newtonsoft.Json.JsonProperty("address_info")] + [System.Text.Json.Serialization.JsonPropertyName("address_info")] + public Types.AddressInfo? AddressInfo { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreResponse.cs new file mode 100644 index 00000000..e93d1fbf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreResponse.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/createstore 接口的响应。 + /// + public class CgibinExpressIntracityCreateStoreResponse : WechatApiResponse + { + /// + /// 获取或设置商家自定义门店 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_store_id")] + public string OutStoreId { get; set; } = default!; + + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityMockNotifyRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityMockNotifyRequest.cs new file mode 100644 index 00000000..767f09fd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityMockNotifyRequest.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/mocknotify 接口的请求。 + /// + public class CgibinExpressIntracityMockNotifyRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string? StoreId { get; set; } + + /// + /// 获取或设置门店订单编号。 + /// + [Newtonsoft.Json.JsonProperty("store_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("store_order_id")] + public string? StoreOrderId { get; set; } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("wx_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_order_id")] + public string? OrderId { get; set; } + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityMockNotifyResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityMockNotifyResponse.cs new file mode 100644 index 00000000..ebdb7996 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityMockNotifyResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/mocknotify 接口的响应。 + /// + public class CgibinExpressIntracityMockNotifyResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderRequest.cs new file mode 100644 index 00000000..f70655d6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderRequest.cs @@ -0,0 +1,107 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/preaddorder 接口的请求。 + /// + public class CgibinExpressIntracityPreAddOrderRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class CargoInfo + { + /// + /// 获取或设置商品名称。 + /// + [Newtonsoft.Json.JsonProperty("cargo_name")] + [System.Text.Json.Serialization.JsonPropertyName("cargo_name")] + public string CargoName { get; set; } = string.Empty; + + /// + /// 获取或设置商品类型。 + /// + [Newtonsoft.Json.JsonProperty("cargo_type")] + [System.Text.Json.Serialization.JsonPropertyName("cargo_type")] + public int CargoType { get; set; } + + /// + /// 获取或设置商品重量(单位:克)。 + /// + [Newtonsoft.Json.JsonProperty("cargo_weight")] + [System.Text.Json.Serialization.JsonPropertyName("cargo_weight")] + public int CargoWeight { get; set; } + + /// + /// 获取或设置商品价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("cargo_price")] + [System.Text.Json.Serialization.JsonPropertyName("cargo_price")] + public int CargoPrice { get; set; } + + /// + /// 获取或设置商品数量。 + /// + [Newtonsoft.Json.JsonProperty("cargo_num")] + [System.Text.Json.Serialization.JsonPropertyName("cargo_num")] + public int CargoCount { get; set; } + } + } + + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = string.Empty; + + /// + /// 获取或设置收件人姓名。 + /// + [Newtonsoft.Json.JsonProperty("user_name")] + [System.Text.Json.Serialization.JsonPropertyName("user_name")] + public string UserName { get; set; } = string.Empty; + + /// + /// 获取或设置收件人手机号。 + /// + [Newtonsoft.Json.JsonProperty("user_phone")] + [System.Text.Json.Serialization.JsonPropertyName("user_phone")] + public string UserPhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置收件用户位置经度。 + /// + [Newtonsoft.Json.JsonProperty("user_lng")] + [System.Text.Json.Serialization.JsonPropertyName("user_lng")] + public double UserLongitude { get; set; } + + /// + /// 获取或设置收件用户位置维度。 + /// + [Newtonsoft.Json.JsonProperty("user_lat")] + [System.Text.Json.Serialization.JsonPropertyName("user_lat")] + public double UserLatitude { get; set; } + + /// + /// 获取或设置收件用户详细地址。 + /// + [Newtonsoft.Json.JsonProperty("user_address")] + [System.Text.Json.Serialization.JsonPropertyName("user_address")] + public string UserAddress { get; set; } = string.Empty; + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("cargo")] + [System.Text.Json.Serialization.JsonPropertyName("cargo")] + public Types.CargoInfo CargoInfo { get; set; } = new Types.CargoInfo(); + + /// + /// 获取或设置是否使用沙箱。 + /// + [Newtonsoft.Json.JsonProperty("use_sandbox")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("use_sandbox")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsSandbox { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderResponse.cs new file mode 100644 index 00000000..195d9084 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderResponse.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/preaddorder 接口的响应。 + /// + public class CgibinExpressIntracityPreAddOrderResponse : WechatApiResponse + { + /// + /// 获取或设置运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_id")] + public string ServiceTransId { get; set; } = default!; + + /// + /// 获取或设置配送距离(单位:米)。 + /// + [Newtonsoft.Json.JsonProperty("distance")] + [System.Text.Json.Serialization.JsonPropertyName("distance")] + public int Distance { get; set; } + + /// + /// 获取或设置预估配送费(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("est_fee")] + [System.Text.Json.Serialization.JsonPropertyName("est_fee")] + public int EstimatedFee { get; set; } + + /// + /// 获取或设置预计送达时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expected_finished_time")] + [System.Text.Json.Serialization.JsonPropertyName("expected_finished_time")] + public long? ExpectedFinishedTimestamp { get; set; } + + /// + /// 获取或设置预计配送时长(单位:分钟)。 + /// + [Newtonsoft.Json.JsonProperty("promise_delivery_time")] + [System.Text.Json.Serialization.JsonPropertyName("promise_delivery_time")] + public long? PromiseDeliveryTime { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowRequest.cs new file mode 100644 index 00000000..52012e41 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowRequest.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/queryflow 接口的请求。 + /// + public class CgibinExpressIntracityQueryFlowRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = string.Empty; + + /// + /// 获取或设置流水类型。 + /// + [Newtonsoft.Json.JsonProperty("flow_type")] + [System.Text.Json.Serialization.JsonPropertyName("flow_type")] + public int FlowType { get; set; } + + /// + /// 获取或设置运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_id")] + public string? ServiceTransId { get; set; } + + /// + /// 获取或设置开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("begin_time")] + [System.Text.Json.Serialization.JsonPropertyName("begin_time")] + public long? BeginTimestamp { get; set; } + + /// + /// 获取或设置结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long? EndTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowResponse.cs new file mode 100644 index 00000000..705689b2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowResponse.cs @@ -0,0 +1,183 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/queryflow 接口的响应。 + /// + public class CgibinExpressIntracityQueryFlowResponse : WechatApiResponse + { + public static class Types + { + public class Flow + { + /// + /// 获取或设置流水类型。 + /// + [Newtonsoft.Json.JsonProperty("flow_type")] + [System.Text.Json.Serialization.JsonPropertyName("flow_type")] + public int FlowType { get; set; } + + /// + /// 获取或设置 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置充值订单号。 + /// + [Newtonsoft.Json.JsonProperty("pay_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("pay_order_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))] + public string PayOrderId { get; set; } = default!; + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("wx_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_order_id")] + public string? OrderId { get; set; } = default!; + + /// + /// 获取或设置运单 ID。 + /// + [Newtonsoft.Json.JsonProperty("bill_id")] + [System.Text.Json.Serialization.JsonPropertyName("bill_id")] + public string? BillId { get; set; } = default!; + + /// + /// 获取或设置运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_id")] + public string ServiceTransId { get; set; } = default!; + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenId { get; set; } = default!; + + /// + /// 获取或设置支付金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("pay_amount")] + [System.Text.Json.Serialization.JsonPropertyName("pay_amount")] + public int PayAmount { get; set; } + + /// + /// 获取或设置退款金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_amount")] + public int? RefundAmount { get; set; } + + /// + /// 获取或设置扣除违约金(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("deduct_amount")] + [System.Text.Json.Serialization.JsonPropertyName("deduct_amount")] + public int? DeductAmount { get; set; } + + /// + /// 获取或设置支付状态。 + /// + [Newtonsoft.Json.JsonProperty("pay_status")] + [System.Text.Json.Serialization.JsonPropertyName("pay_status")] + public string PayStatus { get; set; } = default!; + + /// + /// 获取或设置退款状态。 + /// + [Newtonsoft.Json.JsonProperty("refund_status")] + [System.Text.Json.Serialization.JsonPropertyName("refund_status")] + public string? RefundStatus { get; set; } + + /// + /// 获取或设置支付时间戳。 + /// + [Newtonsoft.Json.JsonProperty("pay_time")] + [System.Text.Json.Serialization.JsonPropertyName("pay_time")] + public long PayTimestamp { get; set; } + + /// + /// 获取或设置退款时间戳。 + /// + [Newtonsoft.Json.JsonProperty("refund_time")] + [System.Text.Json.Serialization.JsonPropertyName("refund_time")] + public long RefundTimestamp { get; set; } + + /// + /// 获取或设置订单创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置有效截止日期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("consume_deadline")] + [System.Text.Json.Serialization.JsonPropertyName("consume_deadline")] + public long? ConsumeDeadlineTimestamp { get; set; } + + /// + /// 获取或设置运单状态。 + /// + [Newtonsoft.Json.JsonProperty("delivery_status")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_status")] + public int? DeliveryStatus { get; set; } + + /// + /// 获取或设置运单完成配送时间戳。 + /// + [Newtonsoft.Json.JsonProperty("delivery_finished_time")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_finished_time")] + public long? DeliveryFinishedTimestamp { get; set; } + } + } + + /// + /// 获取或设置总支付金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("total_pay_amt")] + [System.Text.Json.Serialization.JsonPropertyName("total_pay_amt")] + public int? TotalPayAmount { get; set; } + + /// + /// 获取或设置总退款金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("total_refund_amt")] + [System.Text.Json.Serialization.JsonPropertyName("total_refund_amt")] + public int? TotalRefundAmount { get; set; } + + /// + /// 获取或设置总违约金(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("total_deduct_amt")] + [System.Text.Json.Serialization.JsonPropertyName("total_deduct_amt")] + public int? TotalDeductAmount { get; set; } + + /// + /// 获取或设置流水列表。 + /// + [Newtonsoft.Json.JsonProperty("flow_list")] + [System.Text.Json.Serialization.JsonPropertyName("flow_list")] + public Types.Flow[] FlowList { get; set; } = default!; + + /// + /// 获取或设置流水总数。 + /// + [Newtonsoft.Json.JsonProperty("total")] + [System.Text.Json.Serialization.JsonPropertyName("total")] + public int Total { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderRequest.cs new file mode 100644 index 00000000..0c8bb220 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/queryorder 接口的请求。 + /// + public class CgibinExpressIntracityQueryOrderRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string? StoreId { get; set; } + + /// + /// 获取或设置门店订单编号。 + /// + [Newtonsoft.Json.JsonProperty("store_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("store_order_id")] + public string? StoreOrderId { get; set; } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("wx_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_order_id")] + public string? OrderId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderResponse.cs new file mode 100644 index 00000000..990283d9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderResponse.cs @@ -0,0 +1,320 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/queryorder 接口的响应。 + /// + public class CgibinExpressIntracityQueryOrderResponse : WechatApiResponse + { + public static class Types + { + public class CargoInfo : CgibinExpressIntracityPreAddOrderRequest.Types.CargoInfo + { + public static class Types + { + public class Item + { + /// + /// 获取或设置物品名称。 + /// + [Newtonsoft.Json.JsonProperty("item_name")] + [System.Text.Json.Serialization.JsonPropertyName("item_name")] + public string ItemName { get; set; } = default!; + + /// + /// 获取或设置物品图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("item_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("item_pic_url")] + public string ItemPictureUrl { get; set; } = default!; + + /// + /// 获取或设置物品数量。 + /// + [Newtonsoft.Json.JsonProperty("item_num")] + [System.Text.Json.Serialization.JsonPropertyName("item_num")] + public int ItemCount { get; set; } + } + } + + /// + /// 获取或设置物品列表。 + /// + [Newtonsoft.Json.JsonProperty("item_list")] + [System.Text.Json.Serialization.JsonPropertyName("item_list")] + public Types.Item[] ItemList { get; set; } = default!; + } + + public class ReceiverInfo + { + /// + /// 获取或设置收件人姓名。 + /// + [Newtonsoft.Json.JsonProperty("receiver_name")] + [System.Text.Json.Serialization.JsonPropertyName("receiver_name")] + public string ReceiverName { get; set; } = default!; + + /// + /// 获取或设置收件地址。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string Address { get; set; } = default!; + + /// + /// 获取或设置收件地址经度。 + /// + [Newtonsoft.Json.JsonProperty("lng")] + [System.Text.Json.Serialization.JsonPropertyName("lng")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Longitude { get; set; } + + /// + /// 获取或设置收件地址纬度。 + /// + [Newtonsoft.Json.JsonProperty("lat")] + [System.Text.Json.Serialization.JsonPropertyName("lat")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Latitude { get; set; } + + /// + /// 获取或设置收件人联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone_num")] + [System.Text.Json.Serialization.JsonPropertyName("phone_num")] + public string PhoneNumber { get; set; } = default!; + } + + public class StoreInfo + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置门店名称。 + /// + [Newtonsoft.Json.JsonProperty("store_name")] + [System.Text.Json.Serialization.JsonPropertyName("store_name")] + public string StoreName { get; set; } = default!; + + /// + /// 获取或设置门店详细地址。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string Address { get; set; } = default!; + + /// + /// 获取或设置门店经度。 + /// + [Newtonsoft.Json.JsonProperty("lng")] + [System.Text.Json.Serialization.JsonPropertyName("lng")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Longitude { get; set; } + + /// + /// 获取或设置门店纬度。 + /// + [Newtonsoft.Json.JsonProperty("lat")] + [System.Text.Json.Serialization.JsonPropertyName("lat")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Latitude { get; set; } + + /// + /// 获取或设置门店联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone_num")] + [System.Text.Json.Serialization.JsonPropertyName("phone_num")] + public string PhoneNumber { get; set; } = default!; + } + + public class TransporterInfo + { + /// + /// 获取或设置配送员姓名。 + /// + [Newtonsoft.Json.JsonProperty("transporter_name")] + [System.Text.Json.Serialization.JsonPropertyName("transporter_name")] + public string TransporterName { get; set; } = default!; + + /// + /// 获取或设置配送员电话号码。 + /// + [Newtonsoft.Json.JsonProperty("transporter_phone")] + [System.Text.Json.Serialization.JsonPropertyName("transporter_phone")] + public string TransporterPhoneNumber { get; set; } = default!; + } + } + + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("wx_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_order_id")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置门店订单编号。 + /// + [Newtonsoft.Json.JsonProperty("store_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("store_order_id")] + public string StoreOrderId { get; set; } = default!; + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + + /// + /// 获取或设置收件人 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("user_openid")] + [System.Text.Json.Serialization.JsonPropertyName("user_openid")] + public string UserOpenId { get; set; } = default!; + + /// + /// 获取或设置运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_id")] + public string ServiceTransId { get; set; } = default!; + + /// + /// 获取或设置运力订单号。 + /// + [Newtonsoft.Json.JsonProperty("delivery_no")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_no")] + public string TransOrderId { get; set; } = default!; + + /// + /// 获取或设置配送距离(单位:米)。 + /// + [Newtonsoft.Json.JsonProperty("distance")] + [System.Text.Json.Serialization.JsonPropertyName("distance")] + public int Distance { get; set; } + + /// + /// 获取或设置实际支付费用(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("actualfee")] + [System.Text.Json.Serialization.JsonPropertyName("actualfee")] + public int ActualFee { get; set; } + + /// + /// 获取或设置违约金(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("deductfee")] + [System.Text.Json.Serialization.JsonPropertyName("deductfee")] + public int DeductFee { get; set; } + + /// + /// 获取或设置发单时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置配送员接单时间戳。 + /// + [Newtonsoft.Json.JsonProperty("accept_time")] + [System.Text.Json.Serialization.JsonPropertyName("accept_time")] + public long? AcceptTimestamp { get; set; } + + /// + /// 获取或设置配送员取货时间戳。 + /// + [Newtonsoft.Json.JsonProperty("fetch_time")] + [System.Text.Json.Serialization.JsonPropertyName("fetch_time")] + public long? FetchTimestamp { get; set; } + + /// + /// 获取或设置配送员送达时间戳。 + /// + [Newtonsoft.Json.JsonProperty("finish_time")] + [System.Text.Json.Serialization.JsonPropertyName("finish_time")] + public long? FinishTimestamp { get; set; } + + /// + /// 获取或设置取消时间戳。 + /// + [Newtonsoft.Json.JsonProperty("cancel_time")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_time")] + public long? CancelTimestamp { get; set; } + + /// + /// 获取或设置预期送达时间。 + /// + [Newtonsoft.Json.JsonProperty("expected_finish_time")] + [System.Text.Json.Serialization.JsonPropertyName("expected_finish_time")] + public long? ExpectedFinishTimestamp { get; set; } + + /// + /// 获取或设置取货码。 + /// + [Newtonsoft.Json.JsonProperty("fetch_code")] + [System.Text.Json.Serialization.JsonPropertyName("fetch_code")] + public string? FetchCode { get; set; } + + /// + /// 获取或设置收货码。 + /// + [Newtonsoft.Json.JsonProperty("recv_code")] + [System.Text.Json.Serialization.JsonPropertyName("recv_code")] + public string? ReceiveCode { get; set; } + + /// + /// 获取或设置订单序号。 + /// + [Newtonsoft.Json.JsonProperty("order_seq")] + [System.Text.Json.Serialization.JsonPropertyName("order_seq")] + public string? OrderSequence { get; set; } + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("cargo_info")] + [System.Text.Json.Serialization.JsonPropertyName("cargo_info")] + public Types.CargoInfo CargoInfo { get; set; } = default!; + + /// + /// 获取或设置收件人信息。 + /// + [Newtonsoft.Json.JsonProperty("receiver_info")] + [System.Text.Json.Serialization.JsonPropertyName("receiver_info")] + public Types.ReceiverInfo ReceiverInfo { get; set; } = default!; + + /// + /// 获取或设置门店信息。 + /// + [Newtonsoft.Json.JsonProperty("store_info")] + [System.Text.Json.Serialization.JsonPropertyName("store_info")] + public Types.StoreInfo StoreInfo { get; set; } = default!; + + /// + /// 获取或设置配送员信息。 + /// + [Newtonsoft.Json.JsonProperty("transporter_info")] + [System.Text.Json.Serialization.JsonPropertyName("transporter_info")] + public Types.TransporterInfo? TransporterInfo { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreRequest.cs new file mode 100644 index 00000000..4ae530ec --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/querystore 接口的请求。 + /// + public class CgibinExpressIntracityQueryStoreRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置商家自定义门店 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_store_id")] + public string? OutStoreId { get; set; } + + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string? StoreId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreResponse.cs new file mode 100644 index 00000000..f5354727 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreResponse.cs @@ -0,0 +1,142 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/querystore 接口的响应。 + /// + public class CgibinExpressIntracityQueryStoreResponse : WechatApiResponse + { + public static class Types + { + public class Store + { + public static class Types + { + public class AddressInfo + { + /// + /// 获取或设置省份。 + /// + [Newtonsoft.Json.JsonProperty("province")] + [System.Text.Json.Serialization.JsonPropertyName("province")] + public string Province { get; set; } = default!; + + /// + /// 获取或设置城市。 + /// + [Newtonsoft.Json.JsonProperty("city")] + [System.Text.Json.Serialization.JsonPropertyName("city")] + public string City { get; set; } = default!; + + /// + /// 获取或设置区县。 + /// + [Newtonsoft.Json.JsonProperty("area")] + [System.Text.Json.Serialization.JsonPropertyName("area")] + public string District { get; set; } = default!; + + /// + /// 获取或设置街道。 + /// + [Newtonsoft.Json.JsonProperty("street")] + [System.Text.Json.Serialization.JsonPropertyName("street")] + public string Street { get; set; } = default!; + + /// + /// 获取或设置详细地址。 + /// + [Newtonsoft.Json.JsonProperty("house")] + [System.Text.Json.Serialization.JsonPropertyName("house")] + public string Address { get; set; } = default!; + + /// + /// 获取或设置经度。 + /// + [Newtonsoft.Json.JsonProperty("lng")] + [System.Text.Json.Serialization.JsonPropertyName("lng")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Longitude { get; set; } + + /// + /// 获取或设置纬度。 + /// + [Newtonsoft.Json.JsonProperty("lat")] + [System.Text.Json.Serialization.JsonPropertyName("lat")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Latitude { get; set; } + + /// + /// 获取或设置门店联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone")] + [System.Text.Json.Serialization.JsonPropertyName("phone")] + public string PhoneNumber { get; set; } = default!; + } + } + + /// + /// 获取或设置商家自定义门店 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_store_id")] + public string OutStoreId { get; set; } = default!; + + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置门店所在城市 ID。 + /// + [Newtonsoft.Json.JsonProperty("city_id")] + [System.Text.Json.Serialization.JsonPropertyName("city_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public int CityId { get; set; } + + /// + /// 获取或设置运力偏好类型。 + /// + [Newtonsoft.Json.JsonProperty("order_pattern")] + [System.Text.Json.Serialization.JsonPropertyName("order_pattern")] + public int OrderPatternType { get; set; } + + /// + /// 获取或设置优先使用的运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_prefer")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_prefer")] + public string? ServiceTransIdPrefer { get; set; } + + /// + /// 获取或设置门店地址信息。 + /// + [Newtonsoft.Json.JsonProperty("address_info")] + [System.Text.Json.Serialization.JsonPropertyName("address_info")] + public Types.AddressInfo? AddressInfo { get; set; } + } + } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置门店列表。 + /// + [Newtonsoft.Json.JsonProperty("store_list")] + [System.Text.Json.Serialization.JsonPropertyName("store_list")] + public Types.Store[] StoreList { get; set; } = default!; + + /// + /// 获取或设置门店总数。 + /// + [Newtonsoft.Json.JsonProperty("total")] + [System.Text.Json.Serialization.JsonPropertyName("total")] + public int Total { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeRequest.cs new file mode 100644 index 00000000..cef0dca2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/storecharge 接口的请求。 + /// + public class CgibinExpressIntracityStoreChargeRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = string.Empty; + + /// + /// 获取或设置运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_id")] + public string ServiceTransId { get; set; } = string.Empty; + + /// + /// 获取或设置充值金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + public int Amount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeResponse.cs new file mode 100644 index 00000000..9a4d351b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeResponse.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/storecharge 接口的响应。 + /// + public class CgibinExpressIntracityStoreChargeResponse : WechatApiResponse + { + /// + /// 获取或设置充值页面 URL。 + /// + [Newtonsoft.Json.JsonProperty("payurl")] + [System.Text.Json.Serialization.JsonPropertyName("payurl")] + public string PayUrl { get; set; } = default!; + + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundRequest.cs new file mode 100644 index 00000000..cd15563b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/storerefund 接口的请求。 + /// + public class CgibinExpressIntracityStoreRefundRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = string.Empty; + + /// + /// 获取或设置运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_id")] + public string ServiceTransId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundResponse.cs new file mode 100644 index 00000000..b659674c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundResponse.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/storerefund 接口的响应。 + /// + public class CgibinExpressIntracityStoreRefundResponse : WechatApiResponse + { + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置退款金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_amount")] + public int RefundAmount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityUpdateStoreRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityUpdateStoreRequest.cs new file mode 100644 index 00000000..54c98a24 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityUpdateStoreRequest.cs @@ -0,0 +1,80 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/updatestore 接口的请求。 + /// + public class CgibinExpressIntracityUpdateStoreRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Key + { + /// + /// 获取或设置商家自定义门店 ID。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("out_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_store_id")] + public string? OutStoreId { get; set; } + + /// + /// 获取或设置微信门店编号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string? StoreId { get; set; } + } + + public class Content + { + public static class Types + { + public class AddressInfo : CgibinExpressIntracityCreateStoreRequest.Types.AddressInfo + { + } + } + + /// + /// 获取或设置门店名称。 + /// + [Newtonsoft.Json.JsonProperty("store_name")] + [System.Text.Json.Serialization.JsonPropertyName("store_name")] + public string? StoreName { get; set; } + + /// + /// 获取或设置运力偏好类型。 + /// + [Newtonsoft.Json.JsonProperty("order_pattern")] + [System.Text.Json.Serialization.JsonPropertyName("order_pattern")] + public int? OrderPatternType { get; set; } + + /// + /// 获取或设置优先使用的运力 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_trans_prefer")] + [System.Text.Json.Serialization.JsonPropertyName("service_trans_prefer")] + public string? ServiceTransIdPrefer { get; set; } + + /// + /// 获取或设置门店地址信息。 + /// + [Newtonsoft.Json.JsonProperty("address_info")] + [System.Text.Json.Serialization.JsonPropertyName("address_info")] + public Types.AddressInfo? AddressInfo { get; set; } + } + } + + /// + /// 获取或设置门店编号。 + /// + [Newtonsoft.Json.JsonProperty("keys")] + [System.Text.Json.Serialization.JsonPropertyName("keys")] + public Types.Key Key { get; set; } = new Types.Key(); + + /// + /// 获取或设置更新内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public Types.Content Content { get; set; } = new Types.Content(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityUpdateStoreResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityUpdateStoreResponse.cs new file mode 100644 index 00000000..a2c42946 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Intracity/CgibinExpressIntracityUpdateStoreResponse.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/intracity/updatestore 接口的响应。 + /// + public class CgibinExpressIntracityUpdateStoreResponse : WechatApiResponse + { + /// + /// 获取或设置商家自定义门店 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_store_id")] + public string OutStoreId { get; set; } = default!; + + /// + /// 获取或设置微信门店编号。 + /// + [Newtonsoft.Json.JsonProperty("wx_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("wx_store_id")] + public string StoreId { get; set; } = default!; + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderRequest.json new file mode 100644 index 00000000..7a1b6641 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderRequest.json @@ -0,0 +1,31 @@ +{ + "wx_store_id": "4000000000000042001", + "store_order_id": "testorder123", + "user_openid": "ozMQO0WsxkA3E56SWBGrLGQ4WVZY", + "user_lng": "116.353093", + "user_lat": "40.01496", + "user_address": "北京市海淀区学清嘉创大厦A座15层)", + "user_name": "顺丰同城", + "user_phone": "13881979410", + "callback_url": "https://testcallback.com", + "use_sandbox": 1, + "cargo": { + "cargo_name": "榴莲披萨套餐", + "cargo_type": 1, + "cargo_num": 3, + "cargo_price": 5000, + "cargo_weight": 500, + "item_list": [ + { + "item_name": "8寸榴莲", + "count": 1, + "item_pic_url": "https://www.qq.com" + }, + { + "item_name": "可口可乐", + "count": 2, + "item_pic_url": "https://www.qq.com" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderResponse.json new file mode 100644 index 00000000..3e8ef047 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityAddOrderResponse.json @@ -0,0 +1,10 @@ +{ + "errcode": 0, + "errmsg": "ok", + "service_trans_id": "SFTC", + "wx_store_id": "1000000000000023002", + "store_order_id": "testorder123", + "distance": 2358, + "fee": 1300, + "trans_order_id": "JS123143DA" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryRequest.json new file mode 100644 index 00000000..0ac27242 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryRequest.json @@ -0,0 +1,4 @@ +{ + "wx_store_id": "4000000000000042001", + "service_trans_id": "DADA" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryResponse.json new file mode 100644 index 00000000..271fd209 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityBalanceQueryResponse.json @@ -0,0 +1,23 @@ +{ + "appid": "wx539e0b4872f196d1", + "wx_store_id": "4000000000000042001", + "all_balance": 10, + "balance_detail": [ + { + "balance": 10, + "service_trans_id": "DADA", + "service_trans_name": "达达快送", + "order_list": [ + { + "payorder_id": "2978080038359269380", + "unused_amt": 10, + "charge_amt": 10, + "begin_time": 1687099701, + "end_time": 1689691701 + } + ] + } + ], + "errcode": 0, + "errmsg": "OK" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderRequest.json new file mode 100644 index 00000000..7423fb13 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderRequest.json @@ -0,0 +1,6 @@ +{ + "wx_store_id": "4000000000000042001", + "wx_order_id": "2000000000000092001", + "cancel_reason_id": 1, + "cancel_reason": "不需要了" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderResponse.json new file mode 100644 index 00000000..7ec15512 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCancelOrderResponse.json @@ -0,0 +1,10 @@ +{ + "errcode": 0, + "errmsg": "ok", + "wx_order_id": "2000000000000092001", + "store_order_id": "testorder12345879", + "wx_store_id": "4000000000000042001", + "appid": "wx539e0b4872f196d1", + "order_status": 20000, + "deductfee": 0 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreRequest.json new file mode 100644 index 00000000..ad1dfb83 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreRequest.json @@ -0,0 +1,15 @@ +{ + "out_store_id": "123", + "store_name": "测试门店1", + "order_pattern": 1, + "address_info": { + "province": "广东省", + "city": "深圳市", + "area": "南山区", + "street": "南头街道", + "house": "深南大道10000号", + "lat": 22.540366, + "lng": 113.934559, + "phone": "1380000138" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreResponse.json new file mode 100644 index 00000000..7fc0a4c1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityCreateStoreResponse.json @@ -0,0 +1,7 @@ +{ + "errcode": 0, + "errmsg": "ok", + "wx_store_id": "4000000000000042001", + "appid": "wx539e0b4872f196d1", + "out_store_id": "123" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityMockNotifyRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityMockNotifyRequest.json new file mode 100644 index 00000000..0f2928bb --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityMockNotifyRequest.json @@ -0,0 +1,4 @@ +{ + "wx_order_id": "2000000000000092001", + "order_status": 30000 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderRequest.json new file mode 100644 index 00000000..6e763782 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderRequest.json @@ -0,0 +1,16 @@ +{ + "wx_store_id": "4000000000000042001", + "user_lng": "116.353093", + "user_lat": "40.01496", + "user_address": "北京市海淀区学清嘉创大厦A座15层)", + "use_sandbox": 1, + "user_name": "顺丰同城", + "user_phone": "13800000138", + "cargo": { + "cargo_name": "榴莲披萨套餐", + "cargo_type": 1, + "cargo_num": 7, + "cargo_price": 5000, + "cargo_weight": 500 + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderResponse.json new file mode 100644 index 00000000..de762008 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityPreAddOrderResponse.json @@ -0,0 +1,9 @@ +{ + "errcode": 0, + "errmsg": "OK", + "distance": 1000, + "est_fee": 870, + "service_trans_id": "SFTC", + "promise_delivery_time": 50, + "expected_finished_time": 1692163151 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowRequest.json new file mode 100644 index 00000000..332f3bff --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowRequest.json @@ -0,0 +1,5 @@ +{ + "wx_store_id": "4000000000000042002", + "flow_type": 1, + "service_trans_id": "SFTC" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowResponse.json new file mode 100644 index 00000000..026affa1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryFlowResponse.json @@ -0,0 +1,23 @@ +{ + "total": 1, + "flow_list": [ + { + "flow_type": 1, + "appid": "wx539e0b4872f196d1", + "wx_store_id": "4000000000000042002", + "pay_order_id": "2920020938702667776", + "service_trans_id": "SFTC", + "pay_amount": 1, + "refund_amount": 1, + "create_time": 1683639082, + "pay_time": 1683639151, + "refund_time": 1683653491, + "consume_deadline": 1686231082, + "pay_status": "SUCCESS" + } + ], + "errcode": 0, + "errmsg": "ok", + "total_pay_amt": 1, + "total_refund_amt": 1 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderRequest.json new file mode 100644 index 00000000..a3fa6a24 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderRequest.json @@ -0,0 +1,3 @@ +{ + "wx_store_id": "4000000000000042001" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderResponse.json new file mode 100644 index 00000000..fa6dd260 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryOrderResponse.json @@ -0,0 +1,48 @@ +{ + "wx_order_id": "2000000000000042007", + "store_order_id": "testorder12345", + "order_status": 10000, + "appid": "wx539e0b4872f196d1", + "user_openid": "ozMQO0ehr_FBgL5mWa5_duxH71Yw", + "service_trans_id": "SFTC", + "delivery_no": "SF6508800795950", + "distance": 2358, + "actualfee": 201, + "deductfee": 0, + "create_time": 1682318663, + "expected_finish_time": 1682319663, + "store_info": { + "phone_num": "13800000138", + "address": "北京市海淀区西三旗街道永辉超市", + "lng": 116.354787, + "lat": 40.030613, + "store_name": "测试门店3" + }, + "receiver_info": { + "phone_num": "顺丰同城", + "address": "北京市海淀区学清嘉创大厦A座15层)", + "lng": 116.353093, + "lat": 40.01496 + }, + "cargo_info": { + "cargo_name": "榴莲披萨套餐", + "cargo_weight": 500, + "cargo_price": 5000, + "cargo_num": 3, + "cargo_type": 1, + "item_list": [ + { + "item_name": "8寸榴莲", + "item_num": 1, + "item_pic_url": "https://www.qq.com" + }, + { + "item_name": "可口可乐", + "item_num": 2, + "item_pic_url": "https://www.qq.com" + } + ] + }, + "errcode": 0, + "errmsg": "ok" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreRequest.json new file mode 100644 index 00000000..a3fa6a24 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreRequest.json @@ -0,0 +1,3 @@ +{ + "wx_store_id": "4000000000000042001" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreResponse.json new file mode 100644 index 00000000..8554deb6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityQueryStoreResponse.json @@ -0,0 +1,25 @@ +{ + "errcode": 0, + "errmsg": "ok", + "total": 1, + "appid": "wx539e0b4872f196d1", + "store_list": [ + { + "wx_store_id": "4000000000000042001", + "out_store_id": "123", + "city_id": 440300, + "address_info": { + "province": "广东省", + "city": "深圳市", + "area": "南山区", + "street": "南头街道", + "house": "深南大道10000号", + "lat": 22.540366, + "lng": 113.934559, + "phone": "1380000138" + }, + "order_pattern": 0, + "service_trans_prefer": "" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeRequest.json new file mode 100644 index 00000000..ce2b4ccb --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeRequest.json @@ -0,0 +1,5 @@ +{ + "wx_store_id": "4000000000000042001", + "service_trans_id": "SFTC", + "amount": 10000 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeResponse.json new file mode 100644 index 00000000..f11e5e21 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreChargeResponse.json @@ -0,0 +1,5 @@ +{ + "payurl": "https://fuwu.weixin.qq.com/service/common/buy?orderId=2886882380534202368&hasApply=1", + "appid": "wx539e0b4872f196d1", + "wx_store_id": "4000000000000042001" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundRequest.json new file mode 100644 index 00000000..0adbfe49 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundRequest.json @@ -0,0 +1,4 @@ +{ + "wx_store_id": "4000000000000042001", + "service_trans_id": "SFTC" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundResponse.json new file mode 100644 index 00000000..b98da668 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityStoreRefundResponse.json @@ -0,0 +1,5 @@ +{ + "appid": "wx539e0b4872f196d1", + "wx_store_id": "4000000000000042001", + "refund_amount": 3000 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityUpdateStoreRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityUpdateStoreRequest.json new file mode 100644 index 00000000..773950e4 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CgibinExpress/Intracity/CgibinExpressIntracityUpdateStoreRequest.json @@ -0,0 +1,20 @@ +{ + "keys": { + "wx_store_id": "4000000000000042001" + }, + "content": { + "store_name": "测试门店3", + "address_info": { + "province": "北京市", + "city": "北京市", + "area": "海淀区", + "street": "西三旗街道", + "house": "海淀区清河龙岗路51号清润家园小区 永辉", + "phone": "13800000138", + "lat": 40.030613, + "lng": 116.354787 + }, + "order_pattern": 2, + "service_trans_prefer": "SFTC" + } +}