From dc78ea65774847e4c183e645e04a2c329a76eb2f Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Fri, 28 May 2021 19:23:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(wxapi):=20=E5=B0=81=E8=A3=85=E5=85=AC?= =?UTF-8?q?=E4=BC=97=E5=B9=B3=E5=8F=B0=E3=80=81=E5=BC=80=E6=94=BE=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Card/CardMerchantCheckResultEvent.cs | 30 + .../Events/Card/CardNotPassCheckEvent.cs | 18 + .../Events/Card/CardPassCheckEvent.cs | 18 + .../Events/Card/CardSKURemindEvent.cs | 24 + .../Events/Card/GiftCardPayDoneEvent.cs | 24 + .../Events/Card/GiftCardSendToFriendEvent.cs | 36 + .../Events/Card/GiftCardUserAcceptEvent.cs | 30 + .../Card/OrderStatusFinanceSuccessEvent.cs | 84 + .../Card/SubmitMemberCardUserInfoEvent.cs | 24 + .../Events/Card/UpdateMemberCardEvent.cs | 36 + .../Events/Card/UserConsumeCardEvent.cs | 72 + .../Events/Card/UserDeleteCardEvent.cs | 24 + .../Card/UserEnterSessionFromCardEvent.cs | 24 + .../Events/Card/UserGetCardEvent.cs | 75 + .../Events/Card/UserGiftingCardEvent.cs | 42 + .../Events/Card/UserPayFromPayCellEvent.cs | 55 + .../Events/Card/UserViewCardEvent.cs | 36 + .../CardInvoice/CloudInvoiceResultEvent.cs | 30 + .../CardInvoice/SubmitInvoiceTitleEvent.cs | 60 + .../CardInvoice/UpdateInvoiceStatusEvent.cs | 31 + .../CardInvoice/UserAuthorizeInvoiceEvent.cs | 32 + .../Events/Merchant/MerchantOrderEvent.cs | 36 + .../MpAccreditation/AnnualRenewEvent.cs | 18 + .../MpAccreditation/NamingVerifyFailEvent.cs | 24 + .../NamingVerifySuccessEvent.cs | 18 + .../QualificationVerifyFailEvent.cs | 24 + .../QualificationVerifySuccessEvent.cs | 18 + .../MpAccreditation/VerifyExpiredEvent.cs | 18 + .../Events/MpGuide/GuideQrcodeScanEvent.cs | 54 + .../Events/MpJob/MassSendJobFinishEvent.cs | 48 + .../MpJob/TemplateSendJobFinishEvent.cs | 24 + .../Events/MpMessage/ImageMessageEvent.cs | 30 + .../Events/MpMessage/LocationMessageEvent.cs | 42 + .../MpMessage/ShortVideoMessageEvent.cs | 13 + .../Events/MpMessage/TextMessageEvent.cs | 24 + .../Events/MpMessage/VideoMessageEvent.cs | 30 + .../Events/MpMessage/VoiceMessageEvent.cs | 30 + .../Events/MpPush/ClickPushEvent.cs | 19 + .../Events/MpPush/LocationPushEvent.cs | 30 + .../Events/MpPush/ScanCodePushEvent.cs | 42 + .../Events/MpPush/ScanPushEvent.cs | 24 + .../Events/MpPush/SubscribePushEvent.cs | 25 + .../Events/MpPush/UnsubscribePushEvent.cs | 13 + .../Events/MpPush/ViewMiniProgramPushEvent.cs | 24 + .../Events/MpPush/ViewPushEvent.cs | 25 + .../SubscribeMessageChangeEvent.cs | 48 + .../SubscribeMessagePopupEvent.cs | 54 + .../SubscribeMessageSentEvent.cs | 60 + .../OpenComponent/ComponentAuthorizedEvent.cs | 48 + .../ComponentUnauthorizedEvent.cs | 30 + .../ComponentUpdateAuthorizedEvent.cs | 13 + .../ComponentVerifyTicketEvent.cs | 30 + .../Events/POI/POICheckNotifyEvent.cs | 36 + .../Events/WxaExpress/AddExpressPathEvent.cs | 90 ++ .../Events/WxaExpress/AddWaybillEvent.cs | 311 ++++ .../Events/WxaExpress/CancelWaybillEvent.cs | 52 + .../Events/WxaExpress/CheckBusinessEvent.cs | 100 ++ .../Events/WxaExpress/GetQuotaEvent.cs | 36 + .../UpdateBusinessBindResultEvent.cs | 28 + .../CancelAuthAccountEvent.cs | 26 + .../WxaImmediateDelivery/GetAuthInfoEvent.cs | 26 + .../GetPreAuthCodeEvent.cs | 19 + .../MockUpdateOrderStatusEvent.cs | 68 + .../TransportAddOrderEvent.cs | 19 + .../TransportAddTipsEvent.cs | 61 + .../TransportCancelOrderEvent.cs | 13 + .../TransportConfirmReturnToBusinessEvent.cs | 47 + .../TransportGetAgentPosEvent.cs | 40 + .../TransportPreCancelOrderEvent.cs | 61 + .../TransportPreCreateOrderEvent.cs | 87 + .../TransportQueryOrderStatusEvent.cs | 47 + .../TransportReAddOrderEvent.cs | 13 + .../TransportSetRiderScoreEvent.cs | 61 + .../UpdateWaybillStatusEvent.cs | 95 ++ .../Events/WxaSecurity/WxaMediaCheckEvent.cs | 50 + .../WechatApiClientEventExtensions.cs | 44 + .../WechatApiClientExecuteCVExtensions.cs | 303 ++++ .../WechatApiClientExecuteCardExtensions.cs | 1097 +++++++++++++ ...atApiClientExecuteCardInvoiceExtensions.cs | 584 +++++++ ...ApiClientExecuteCgibinCommentExtensions.cs | 184 +++ ...iClientExecuteCgibinComponentExtensions.cs | 234 +++ ...entExecuteCgibinCustomServiceExtensions.cs | 57 + ...ApiClientExecuteCgibinExpressExtensions.cs | 713 ++++++++ .../WechatApiClientExecuteCgibinExtensions.cs | 26 + ...atApiClientExecuteCgibinGuideExtensions.cs | 1045 ++++++++++++ ...piClientExecuteCgibinMaterialExtensions.cs | 254 +++ ...atApiClientExecuteCgibinMediaExtensions.cs | 290 ++++ ...hatApiClientExecuteCgibinMenuExtensions.cs | 163 ++ ...entExecuteCgibinMessageCustomExtensions.cs | 58 + ...lientExecuteCgibinMessageMassExtensions.cs | 164 ++ ...ExecuteCgibinMessageSubscribeExtensions.cs | 37 + ...tExecuteCgibinMessageTemplateExtensions.cs | 35 + ...gibinMessageTemplateSubscribeExtensions.cs | 36 + ...entExecuteCgibinMessageWxopenExtensions.cs | 58 + ...atApiClientExecuteCgibinMidasExtensions.cs | 242 +++ ...hatApiClientExecuteCgibinOpenExtensions.cs | 98 ++ ...chatApiClientExecuteCgibinPOIExtensions.cs | 119 ++ ...tApiClientExecuteCgibinQrcodeExtensions.cs | 35 + ...ApiClientExecuteCgibinShortenExtensions.cs | 78 + ...atApiClientExecuteCgibinSoterExtensions.cs | 35 + ...hatApiClientExecuteCgibinTagsExtensions.cs | 4 + ...piClientExecuteCgibinTemplateExtensions.cs | 120 ++ ...tApiClientExecuteCgibinWxaappExtensions.cs | 37 + ...tApiClientExecuteCgibinWxopenExtensions.cs | 121 ++ ...ApiClientExecuteCustomServiceExtensions.cs | 268 +++ ...echatApiClientExecuteDataCubeExtensions.cs | 700 ++++++++ ...piClientExecuteIntpMarketCodeExtensions.cs | 140 ++ ...tApiClientExecuteIntpRealNameExtensions.cs | 35 + ...echatApiClientExecuteMerchantExtensions.cs | 704 ++++++++ .../WechatApiClientExecuteNontaxExtensions.cs | 412 +++++ ...WechatApiClientExecuteProductExtensions.cs | 60 + ...ApiClientExecutePublisherStatExtensions.cs | 92 ++ ...echatApiClientExecuteSemanticExtensions.cs | 41 + .../WechatApiClientExecuteSnsExtensions.cs | 38 + .../WechatApiClientExecuteTcbExtensions.cs | 302 ++++ .../WechatApiClientExecuteWxaApiExtensions.cs | 1057 ++++++++++++ ...atApiClientExecuteWxaBusinessExtensions.cs | 236 +++ .../WechatApiClientExecuteWxaExtensions.cs | 852 ++++++++++ .../WechatApiClientParameterExtensions.cs | 81 + .../Models/CV/Image/CVImageAICropRequest.cs | 18 + .../Models/CV/Image/CVImageAICropResponse.cs | 63 + .../Models/CV/Image/CVImageQrcodeRequest.cs | 25 + .../Models/CV/Image/CVImageQrcodeResponse.cs | 123 ++ .../CV/Image/CVImageSuperResolutionRequest.cs | 12 + .../Image/CVImageSuperResolutionResponse.cs | 18 + .../Models/CV/OCR/CVOCRBankCardRequest.cs | 12 + .../Models/CV/OCR/CVOCRBankCardResponse.cs | 18 + .../CV/OCR/CVOCRBusinessLicenseRequest.cs | 12 + .../CV/OCR/CVOCRBusinessLicenseResponse.cs | 133 ++ .../Models/CV/OCR/CVOCRCommonRequest.cs | 25 + .../Models/CV/OCR/CVOCRCommonResponse.cs | 56 + .../CV/OCR/CVOCRDrivingLicenseRequest.cs | 12 + .../CV/OCR/CVOCRDrivingLicenseResponse.cs | 88 + .../Models/CV/OCR/CVOCRDrivingRequest.cs | 12 + .../Models/CV/OCR/CVOCRDrivingResponse.cs | 168 ++ .../Models/CV/OCR/CVOCRIdCardRequest.cs | 19 + .../Models/CV/OCR/CVOCRIdCardResponse.cs | 84 + .../Models/CV/OCR/CVOCRPlateNumberRequest.cs | 12 + .../Models/CV/OCR/CVOCRPlateNumberResponse.cs | 18 + .../Models/Card/CardBatchGetRequest.cs | 32 + .../Models/Card/CardBatchGetResponse.cs | 25 + .../Models/Card/CardCreateRequest.cs | 1436 +++++++++++++++++ .../Models/Card/CardCreateResponse.cs | 18 + .../Models/Card/CardDeleteRequest.cs | 18 + .../Models/Card/CardDeleteResponse.cs | 12 + .../Models/Card/CardGetRequest.cs | 18 + .../Models/Card/CardGetResponse.cs | 1084 +++++++++++++ .../Card/CardLandingPageCreateRequest.cs | 66 + .../Card/CardLandingPageCreateResponse.cs | 26 + .../Models/Card/CardModifyStockRequest.cs | 32 + .../Models/Card/CardModifyStockResponse.cs | 12 + .../Models/Card/CardMpnewsGetHtmlRequest.cs | 18 + .../Models/Card/CardMpnewsGetHtmlResponse.cs | 18 + .../Models/Card/CardPayCellSetRequest.cs | 25 + .../Models/Card/CardPayCellSetResponse.cs | 12 + .../Models/Card/CardQrcodeCreateRequest.cs | 110 ++ .../Models/Card/CardQrcodeCreateResponse.cs | 39 + .../Card/CardSelfConsumeCellSetRequest.cs | 39 + .../Card/CardSelfConsumeCellSetResponse.cs | 12 + .../Card/CardTestWhiteListSetRequest.cs | 25 + .../Card/CardTestWhiteListSetResponse.cs | 12 + .../Models/Card/CardUpdateRequest.cs | 999 ++++++++++++ .../Models/Card/CardUpdateResponse.cs | 18 + .../Card/Code/CardCodeCheckCodeRequest.cs | 25 + .../Card/Code/CardCodeCheckCodeResponse.cs | 25 + .../Card/Code/CardCodeConsumeRequest.cs | 25 + .../Card/Code/CardCodeConsumeResponse.cs | 38 + .../Card/Code/CardCodeDecryptRequest.cs | 18 + .../Card/Code/CardCodeDecryptResponse.cs | 18 + .../Card/Code/CardCodeDepositRequest.cs | 25 + .../Card/Code/CardCodeDepositResponse.cs | 12 + .../Code/CardCodeGetDepositCountRequest.cs | 18 + .../Code/CardCodeGetDepositCountResponse.cs | 18 + .../Models/Card/Code/CardCodeGetRequest.cs | 32 + .../Models/Card/Code/CardCodeGetResponse.cs | 154 ++ .../Card/Code/CardCodeUnavailableRequest.cs | 32 + .../Card/Code/CardCodeUnavailableResponse.cs | 12 + .../Models/Card/Code/CardCodeUpdateRequest.cs | 32 + .../Card/Code/CardCodeUpdateResponse.cs | 12 + .../CardGeneralCardUpdateUserRequest.cs | 88 + .../CardGeneralCardUpdateUserResponse.cs | 34 + .../CardGiftCardMaintainSetRequest.cs | 32 + .../CardGiftCardMaintainSetResponse.cs | 73 + .../GiftCard/CardGiftCardPageAddRequest.cs | 255 +++ .../GiftCard/CardGiftCardPageAddResponse.cs | 19 + .../CardGiftCardPageBatchGetRequest.cs | 12 + .../CardGiftCardPageBatchGetResponse.cs | 18 + .../GiftCard/CardGiftCardPageGetRequest.cs | 18 + .../GiftCard/CardGiftCardPageGetResponse.cs | 25 + .../GiftCard/CardGiftCardPageUpdateRequest.cs | 31 + .../CardGiftCardPageUpdateResponse.cs | 12 + .../CardGiftCardPaySubMerchantBindRequest.cs | 25 + .../CardGiftCardPaySubMerchantBindResponse.cs | 12 + .../CardGiftCardPayWhiteListAddRequest.cs | 18 + .../CardGiftCardPayWhiteListAddResponse.cs | 18 + .../GiftCard/CardGiftCardWxaSetRequest.cs | 25 + .../GiftCard/CardGiftCardWxaSetResponse.cs | 12 + .../Order/CardGiftCardOrderBatchGetRequest.cs | 47 + .../CardGiftCardOrderBatchGetResponse.cs | 32 + .../Order/CardGiftCardOrderGetRequest.cs | 18 + .../Order/CardGiftCardOrderGetResponse.cs | 156 ++ .../Order/CardGiftCardOrderRefundRequest.cs | 18 + .../Order/CardGiftCardOrderRefundResponse.cs | 12 + .../CardMemberCardActivateGetUrlRequest.cs | 25 + .../CardMemberCardActivateGetUrlResponse.cs | 31 + .../CardMemberCardActivateRequest.cs | 95 ++ .../CardMemberCardActivateResponse.cs | 14 + ...ardMemberCardActivateTempInfoGetRequest.cs | 18 + ...rdMemberCardActivateTempInfoGetResponse.cs | 27 + ...ardMemberCardActivateUserFormSetRequest.cs | 124 ++ ...rdMemberCardActivateUserFormSetResponse.cs | 14 + .../CardMemberCardUpdateUserRequest.cs | 143 ++ .../CardMemberCardUpdateUserResponse.cs | 34 + .../CardMemberCardUserInfoGetRequest.cs | 25 + .../CardMemberCardUserInfoGetResponse.cs | 106 ++ .../PayGiftCard/CardPayGiftCardAddRequest.cs | 118 ++ .../PayGiftCard/CardPayGiftCardAddResponse.cs | 73 + .../CardPayGiftCardBatchGetRequest.cs | 40 + .../CardPayGiftCardBatchGetResponse.cs | 32 + .../CardPayGiftCardDeleteRequest.cs | 18 + .../CardPayGiftCardDeleteResponse.cs | 12 + .../CardPayGiftCardGetByIdRequest.cs | 18 + .../CardPayGiftCardGetByIdResponse.cs | 138 ++ .../CardBoardingPassCheckinRequest.cs | 67 + .../CardBoardingPassCheckinResponse.cs | 12 + .../CardMeetingTicketUpdateUserRequest.cs | 60 + .../CardMeetingTicketUpdateUserResponse.cs | 12 + .../CardMovieTicketUpdateUserRequest.cs | 60 + .../CardMovieTicketUpdateUserResponse.cs | 12 + .../CardGetApplyProtocolRequest.cs | 12 + .../CardGetApplyProtocolResponse.cs | 69 + .../CardSubMerchantBatchGetRequest.cs | 32 + .../CardSubMerchantBatchGetResponse.cs | 33 + .../SubMerchant/CardSubMerchantGetRequest.cs | 18 + .../SubMerchant/CardSubMerchantGetResponse.cs | 102 ++ .../CardSubMerchantSubmitRequest.cs | 87 + .../CardSubMerchantSubmitResponse.cs | 12 + .../CardSubMerchantUpdateRequest.cs | 31 + .../CardSubMerchantUpdateResponse.cs | 12 + .../Card/User/CardUserGetCardListRequest.cs | 25 + .../Card/User/CardUserGetCardListResponse.cs | 45 + .../CardInvoiceClearOutInvoiceRequest.cs | 66 + .../CardInvoiceClearOutInvoiceResponse.cs | 12 + .../CardInvoiceGetAuthDataRequest.cs | 25 + .../CardInvoiceGetAuthDataResponse.cs | 155 ++ .../CardInvoiceGetAuthUrlRequest.cs | 67 + .../CardInvoiceGetAuthUrlResponse.cs | 25 + .../CardInvoice/CardInvoiceInsertRequest.cs | 252 +++ .../CardInvoice/CardInvoiceInsertResponse.cs | 32 + .../CardInvoiceMakeOutInvoiceRequest.cs | 278 ++++ .../CardInvoiceMakeOutInvoiceResponse.cs | 12 + .../CardInvoiceQueryInvoiceInfoRequest.cs | 25 + .../CardInvoiceQueryInvoiceInfoResponse.cs | 66 + .../CardInvoiceRejectInsertRequest.cs | 39 + .../CardInvoiceRejectInsertResponse.cs | 12 + .../CardInvoiceSetAuthFieldRequest.cs | 152 ++ .../CardInvoiceSetAuthFieldResponse.cs | 12 + .../CardInvoiceSetContactRequest.cs | 38 + .../CardInvoiceSetContactResponse.cs | 12 + .../CardInvoiceSetPayMerchantRequest.cs | 38 + .../CardInvoiceSetPayMerchantResponse.cs | 12 + .../CardInvoice/CardInvoiceSetUrlRequest.cs | 12 + .../CardInvoice/CardInvoiceSetUrlResponse.cs | 18 + .../CardInvoicePlatformCreateCardRequest.cs | 107 ++ .../CardInvoicePlatformCreateCardResponse.cs | 18 + .../CardInvoicePlatformGetPdfRequest.cs | 25 + .../CardInvoicePlatformGetPdfResponse.cs | 25 + .../CardInvoicePlatformSetPdfRequest.cs | 18 + .../CardInvoicePlatformSetPdfResponse.cs | 19 + .../CardInvoicePlatformUpdateStatusRequest.cs | 32 + ...CardInvoicePlatformUpdateStatusResponse.cs | 12 + ...InvoiceBusinessGetSelectTitleUrlRequest.cs | 25 + ...nvoiceBusinessGetSelectTitleUrlResponse.cs | 18 + ...rdInvoiceBusinessGetUserTitleUrlRequest.cs | 69 + ...dInvoiceBusinessGetUserTitleUrlResponse.cs | 18 + .../CardInvoiceBusinessScanTitleRequest.cs | 18 + .../CardInvoiceBusinessScanTitleResponse.cs | 60 + ...dInvoiceReimburseGetInvoiceBatchRequest.cs | 38 + ...InvoiceReimburseGetInvoiceBatchResponse.cs | 94 ++ ...rdInvoiceReimburseGetInvoiceInfoRequest.cs | 25 + ...dInvoiceReimburseGetInvoiceInfoResponse.cs | 241 +++ ...oiceReimburseUpdateInvoiceStatusRequest.cs | 32 + ...iceReimburseUpdateInvoiceStatusResponse.cs | 12 + ...nvoiceReimburseUpdateStatusBatchRequest.cs | 39 + ...voiceReimburseUpdateStatusBatchResponse.cs | 12 + .../CardInvoiceGetAuthFieldRequest.cs | 12 + .../CardInvoiceGetAuthFieldResponse.cs | 25 + .../CardInvoiceGetContactRequest.cs | 12 + .../CardInvoiceGetContactResponse.cs | 25 + .../CardInvoiceGetPayMerchantRequest.cs | 12 + .../CardInvoiceGetPayMerchantResponse.cs | 25 + .../Models/Cgibin/CgibinClearQuotaRequest.cs | 18 + .../Models/Cgibin/CgibinClearQuotaResponse.cs | 12 + .../Cgibin/CgibinTicketGetTicketRequest.cs | 5 +- .../Models/Cgibin/CgibinTokenRequest.cs | 2 + .../CgibinCommentCloseRequest.cs | 12 + .../CgibinCommentCloseResponse.cs | 12 + .../CgibinCommentDeleteRequest.cs | 12 + .../CgibinCommentDeleteResponse.cs | 12 + .../CgibinComment/CgibinCommentListRequest.cs | 46 + .../CgibinCommentListResponse.cs | 95 ++ .../CgibinCommentMarkElectRequest.cs | 32 + .../CgibinCommentMarkElectResponse.cs | 12 + .../CgibinComment/CgibinCommentOpenRequest.cs | 25 + .../CgibinCommentOpenResponse.cs | 12 + .../CgibinCommentUnmarkElectRequest.cs | 12 + .../CgibinCommentUnmarkElectResponse.cs | 12 + .../Reply/CgibinCommentReplyAddRequest.cs | 18 + .../Reply/CgibinCommentReplyAddResponse.cs | 12 + .../Reply/CgibinCommentReplyDeleteRequest.cs | 12 + .../Reply/CgibinCommentReplyDeleteResponse.cs | 12 + ...gibinComponentApiAuthorizerTokenRequest.cs | 39 + ...ibinComponentApiAuthorizerTokenResponse.cs | 32 + ...CgibinComponentApiComponentTokenRequest.cs | 32 + ...gibinComponentApiComponentTokenResponse.cs | 25 + ...binComponentApiCreatePreAuthCodeRequest.cs | 25 + ...inComponentApiCreatePreAuthCodeResponse.cs | 25 + ...binComponentApiGetAuthorizerInfoRequest.cs | 32 + ...inComponentApiGetAuthorizerInfoResponse.cs | 286 ++++ ...binComponentApiGetAuthorizerListRequest.cs | 39 + ...inComponentApiGetAuthorizerListResponse.cs | 52 + ...nComponentApiGetAuthorizerOptionRequest.cs | 39 + ...ComponentApiGetAuthorizerOptionResponse.cs | 33 + .../CgibinComponentApiQueryAuthRequest.cs | 32 + .../CgibinComponentApiQueryAuthResponse.cs | 85 + ...nComponentApiSetAuthorizerOptionRequest.cs | 46 + ...ComponentApiSetAuthorizerOptionResponse.cs | 12 + ...gibinComponentApiStartPushTicketRequest.cs | 25 + ...ibinComponentApiStartPushTicketResponse.cs | 12 + .../CgibinCustomServiceGetKfListRequest.cs | 12 + .../CgibinCustomServiceGetKfListResponse.cs | 80 + ...ibinCustomServiceGetOnlineKfListRequest.cs | 12 + ...binCustomServiceGetOnlineKfListResponse.cs | 52 + ...CgibinExpressBusinessAccountBindRequest.cs | 46 + ...gibinExpressBusinessAccountBindResponse.cs | 12 + ...ibinExpressBusinessAccountGetAllRequest.cs | 12 + ...binExpressBusinessAccountGetAllResponse.cs | 115 ++ ...binExpressBusinessDeliveryGetAllRequest.cs | 12 + ...inExpressBusinessDeliveryGetAllResponse.cs | 97 ++ .../CgibinExpressBusinessOrderAddRequest.cs | 328 ++++ .../CgibinExpressBusinessOrderAddResponse.cs | 58 + ...ibinExpressBusinessOrderBatchGetRequest.cs | 45 + ...binExpressBusinessOrderBatchGetResponse.cs | 87 + ...CgibinExpressBusinessOrderCancelRequest.cs | 39 + ...gibinExpressBusinessOrderCancelResponse.cs | 30 + .../CgibinExpressBusinessOrderGetRequest.cs | 39 + .../CgibinExpressBusinessOrderGetResponse.cs | 73 + .../CgibinExpressBusinessPathGetRequest.cs | 12 + .../CgibinExpressBusinessPathGetResponse.cs | 73 + ...ibinExpressBusinessPrinterGetAllRequest.cs | 12 + ...binExpressBusinessPrinterGetAllResponse.cs | 32 + ...ibinExpressBusinessPrinterUpdateRequest.cs | 34 + ...binExpressBusinessPrinterUpdateResponse.cs | 12 + .../CgibinExpressBusinessQuotaGetRequest.cs | 25 + .../CgibinExpressBusinessQuotaGetResponse.cs | 18 + ...inExpressBusinessTestUpdateOrderRequest.cs | 60 + ...nExpressBusinessTestUpdateOrderResponse.cs | 12 + .../CgibinExpressDeliveryContactGetRequest.cs | 25 + ...CgibinExpressDeliveryContactGetResponse.cs | 70 + .../CgibinExpressDeliveryPathUpdateRequest.cs | 46 + ...CgibinExpressDeliveryPathUpdateResponse.cs | 12 + ...essDeliveryServiceBusinessUpdateRequest.cs | 39 + ...ssDeliveryServiceBusinessUpdateResponse.cs | 12 + ...inExpressDeliveryTemplatePreviewRequest.cs | 267 +++ ...nExpressDeliveryTemplatePreviewResponse.cs | 25 + .../CgibinExpressLocalBusinessRequestBase.cs | 29 + ...pressLocalBusinessDeliveryGetAllRequest.cs | 12 + ...ressLocalBusinessDeliveryGetAllResponse.cs | 57 + .../CgibinExpressLocalBusinessOpenRequest.cs | 12 + .../CgibinExpressLocalBusinessOpenResponse.cs | 30 + ...ibinExpressLocalBusinessOrderAddRequest.cs | 18 + ...binExpressLocalBusinessOrderAddResponse.cs | 16 + ...ExpressLocalBusinessOrderAddTipsRequest.cs | 46 + ...xpressLocalBusinessOrderAddTipsResponse.cs | 30 + ...nExpressLocalBusinessOrderCancelRequest.cs | 12 + ...ExpressLocalBusinessOrderCancelResponse.cs | 16 + ...sLocalBusinessOrderConfirmReturnRequest.cs | 32 + ...LocalBusinessOrderConfirmReturnResponse.cs | 30 + ...ibinExpressLocalBusinessOrderGetRequest.cs | 18 + ...binExpressLocalBusinessOrderGetResponse.cs | 106 ++ ...nExpressLocalBusinessOrderPreAddRequest.cs | 428 +++++ ...ExpressLocalBusinessOrderPreAddResponse.cs | 114 ++ ...pressLocalBusinessOrderPreCancelRequest.cs | 46 + ...ressLocalBusinessOrderPreCancelResponse.cs | 44 + ...inExpressLocalBusinessOrderReAddRequest.cs | 18 + ...nExpressLocalBusinessOrderReAddResponse.cs | 16 + ...LocalBusinessRealMockUpdateOrderRequest.cs | 12 + ...ocalBusinessRealMockUpdateOrderResponse.cs | 16 + ...gibinExpressLocalBusinessShopAddRequest.cs | 18 + ...ibinExpressLocalBusinessShopAddResponse.cs | 30 + ...gibinExpressLocalBusinessShopGetRequest.cs | 12 + ...ibinExpressLocalBusinessShopGetResponse.cs | 64 + ...ressLocalBusinessTestUpdateOrderRequest.cs | 32 + ...essLocalBusinessTestUpdateOrderResponse.cs | 30 + ...nExpressLocalBusinessUpdateOrderRequest.cs | 82 + ...ExpressLocalBusinessUpdateOrderResponse.cs | 16 + .../CgibinGuideAddGuideAccountRequest.cs | 39 + .../CgibinGuideAddGuideAccountResponse.cs | 12 + .../CgibinGuideDeleteGuideAccountRequest.cs | 25 + .../CgibinGuideDeleteGuideAccountResponse.cs | 12 + .../CgibinGuideGetGuideAccountRequest.cs | 25 + .../CgibinGuideGetGuideAccountResponse.cs | 46 + .../CgibinGuideUpdateGuideAccountRequest.cs | 12 + .../CgibinGuideUpdateGuideAccountResponse.cs | 12 + ...ibinGuideGetGuideBuyerChatRecordRequest.cs | 60 + ...binGuideGetGuideBuyerChatRecordResponse.cs | 73 + ...CgibinGuideAddGuideBuyerRelationRequest.cs | 66 + ...gibinGuideAddGuideBuyerRelationResponse.cs | 45 + ...binGuideDeleteGuideBuyerRelationRequest.cs | 39 + ...inGuideDeleteGuideBuyerRelationResponse.cs | 25 + ...uideGetGuideBuyerRelationByBuyerRequest.cs | 18 + ...ideGetGuideBuyerRelationByBuyerResponse.cs | 46 + ...inGuideGetGuideBuyerRelationListRequest.cs | 39 + ...nGuideGetGuideBuyerRelationListResponse.cs | 52 + ...CgibinGuideGetGuideBuyerRelationRequest.cs | 32 + ...gibinGuideGetGuideBuyerRelationResponse.cs | 32 + ...nGuideRebindGuideAccountForBuyerRequest.cs | 53 + ...GuideRebindGuideAccountForBuyerResponse.cs | 25 + ...binGuideUpdateGuideBuyerRelationRequest.cs | 39 + ...inGuideUpdateGuideBuyerRelationResponse.cs | 12 + ...CgibinGuideGetGuideAccountConfigRequest.cs | 12 + ...gibinGuideGetGuideAccountConfigResponse.cs | 62 + .../CgibinGuideGetGuideConfigRequest.cs | 25 + .../CgibinGuideGetGuideConfigResponse.cs | 76 + ...CgibinGuideSetGuideAccountConfigRequest.cs | 55 + ...gibinGuideSetGuideAccountConfigResponse.cs | 12 + .../CgibinGuideSetGuideConfigRequest.cs | 83 + .../CgibinGuideSetGuideConfigResponse.cs | 12 + .../CgibinGuideAddGuide2GuideGroupRequest.cs | 25 + .../CgibinGuideAddGuide2GuideGroupResponse.cs | 12 + ...gibinGuideDeleteGuide2GuideGroupRequest.cs | 25 + ...ibinGuideDeleteGuide2GuideGroupResponse.cs | 12 + .../CgibinGuideDeleteGuideGroupRequest.cs | 18 + .../CgibinGuideDeleteGuideGroupResponse.cs | 12 + .../CgibinGuideGetGroupByGuideRequest.cs | 18 + .../CgibinGuideGetGroupByGuideResponse.cs | 18 + .../Group/CgibinGuideGetGroupInfoRequest.cs | 32 + .../Group/CgibinGuideGetGroupInfoResponse.cs | 66 + .../CgibinGuideGetGuideGroupListRequest.cs | 12 + .../CgibinGuideGetGuideGroupListResponse.cs | 52 + .../Group/CgibinGuideNewGuideGroupRequest.cs | 18 + .../Group/CgibinGuideNewGuideGroupResponse.cs | 18 + .../CgibinGuideAddGuideMassSendJobRequest.cs | 108 ++ .../CgibinGuideAddGuideMassSendJobResponse.cs | 38 + ...gibinGuideCancelGuideMassSendJobRequest.cs | 18 + ...ibinGuideCancelGuideMassSendJobResponse.cs | 12 + ...ibinGuideGetGuideMassSendJobListRequest.cs | 46 + ...binGuideGetGuideMassSendJobListResponse.cs | 32 + .../CgibinGuideGetGuideMassSendJobRequest.cs | 18 + .../CgibinGuideGetGuideMassSendJobResponse.cs | 159 ++ ...gibinGuideUpdateGuideMassSendJobRequest.cs | 60 + ...ibinGuideUpdateGuideMassSendJobResponse.cs | 12 + ...ibinGuideDeleteGuideCardMaterialRequest.cs | 39 + ...binGuideDeleteGuideCardMaterialResponse.cs | 12 + ...binGuideDeleteGuideImageMaterialRequest.cs | 25 + ...inGuideDeleteGuideImageMaterialResponse.cs | 12 + ...ibinGuideDeleteGuideWordMaterialRequest.cs | 25 + ...binGuideDeleteGuideWordMaterialResponse.cs | 12 + .../CgibinGuideGetGuideCardMaterialRequest.cs | 18 + ...CgibinGuideGetGuideCardMaterialResponse.cs | 66 + ...CgibinGuideGetGuideImageMaterialRequest.cs | 32 + ...gibinGuideGetGuideImageMaterialResponse.cs | 38 + .../CgibinGuideGetGuideWordMaterialRequest.cs | 32 + ...CgibinGuideGetGuideWordMaterialResponse.cs | 45 + .../CgibinGuideSetGuideCardMaterialRequest.cs | 46 + ...CgibinGuideSetGuideCardMaterialResponse.cs | 12 + ...CgibinGuideSetGuideImageMaterialRequest.cs | 25 + ...gibinGuideSetGuideImageMaterialResponse.cs | 12 + .../CgibinGuideSetGuideWordMaterialRequest.cs | 25 + ...CgibinGuideSetGuideWordMaterialResponse.cs | 12 + .../Qrcode/CgibinGuideCreateQrcodeRequest.cs | 32 + .../Qrcode/CgibinGuideCreateQrcodeResponse.cs | 18 + ...ibinGuideAddGuideBuyerDisplayTagRequest.cs | 39 + ...binGuideAddGuideBuyerDisplayTagResponse.cs | 12 + .../Tag/CgibinGuideAddGuideBuyerTagRequest.cs | 46 + .../CgibinGuideAddGuideBuyerTagResponse.cs | 45 + .../CgibinGuideAddGuideTagOptionRequest.cs | 12 + .../CgibinGuideAddGuideTagOptionResponse.cs | 12 + .../CgibinGuideDeleteGuideBuyerTagRequest.cs | 12 + .../CgibinGuideDeleteGuideBuyerTagResponse.cs | 25 + .../CgibinGuideDeleteGuideTagOptionRequest.cs | 18 + ...CgibinGuideDeleteGuideTagOptionResponse.cs | 12 + ...ibinGuideGetGuideBuyerDisplayTagRequest.cs | 32 + ...binGuideGetGuideBuyerDisplayTagResponse.cs | 18 + .../Tag/CgibinGuideGetGuideBuyerTagRequest.cs | 32 + .../CgibinGuideGetGuideBuyerTagResponse.cs | 18 + .../CgibinGuideGetGuideTagOptionRequest.cs | 12 + .../CgibinGuideGetGuideTagOptionResponse.cs | 38 + .../CgibinGuideNewGuideTagOptionRequest.cs | 25 + .../CgibinGuideNewGuideTagOptionResponse.cs | 12 + .../CgibinGuideQueryGuideBuyerByTagRequest.cs | 39 + ...CgibinGuideQueryGuideBuyerByTagResponse.cs | 18 + .../CgibinMaterialAddMaterialRequest.cs | 53 + .../CgibinMaterialAddMaterialResponse.cs | 25 + .../CgibinMaterialAddNewsRequest.cs | 93 ++ .../CgibinMaterialAddNewsResponse.cs | 18 + .../CgibinMaterialBatchGetMaterialRequest.cs | 32 + .../CgibinMaterialBatchGetMaterialResponse.cs | 107 ++ .../CgibinMaterialDeleteMaterialRequest.cs | 18 + .../CgibinMaterialDeleteMaterialResponse.cs | 12 + .../CgibinMaterialGetMaterialAsNewsRequest.cs | 12 + ...CgibinMaterialGetMaterialAsNewsResponse.cs | 100 ++ ...CgibinMaterialGetMaterialAsVideoRequest.cs | 12 + ...gibinMaterialGetMaterialAsVideoResponse.cs | 32 + .../CgibinMaterialGetMaterialCountRequest.cs | 12 + .../CgibinMaterialGetMaterialCountResponse.cs | 39 + .../CgibinMaterialGetMaterialRequest.cs | 18 + .../CgibinMaterialGetMaterialResponse.cs | 16 + .../CgibinMaterialUpdateNewsRequest.cs | 39 + .../CgibinMaterialUpdateNewsResponse.cs | 12 + .../CgibinMedia/CgibinMediaGetRequest.cs | 18 + .../CgibinMedia/CgibinMediaGetResponse.cs | 16 + .../CgibinMediaUploadImageRequest.cs | 32 + .../CgibinMediaUploadImageResponse.cs | 18 + .../CgibinMediaUploadNewsRequest.cs | 25 + .../CgibinMediaUploadNewsResponse.cs | 12 + .../CgibinMedia/CgibinMediaUploadRequest.cs | 39 + .../CgibinMedia/CgibinMediaUploadResponse.cs | 32 + .../CgibinMediaUploadVideoRequest.cs | 32 + .../CgibinMediaUploadVideoResponse.cs | 12 + .../CgibinMediaGetFeedbackMediaRequest.cs | 18 + .../CgibinMediaGetFeedbackMediaResponse.cs | 16 + ...oiceAddVoiceToRecognitionForTextRequest.cs | 39 + ...iceAddVoiceToRecognitionForTextResponse.cs | 12 + ...iceQueryRecognitionResultForTextRequest.cs | 25 + ...ceQueryRecognitionResultForTextResponse.cs | 18 + ...CgibinMediaVoiceTranslateContentRequest.cs | 32 + ...gibinMediaVoiceTranslateContentResponse.cs | 25 + .../CgibinGetCurrentSelfMenuInfoRequest.cs | 12 + .../CgibinGetCurrentSelfMenuInfoResponse.cs | 172 ++ .../CgibinMenu/CgibinMenuCreateRequest.cs | 80 + .../CgibinMenu/CgibinMenuCreateResponse.cs | 12 + .../CgibinMenu/CgibinMenuDeleteRequest.cs | 12 + .../CgibinMenu/CgibinMenuDeleteResponse.cs | 12 + .../Models/CgibinMenu/CgibinMenuGetRequest.cs | 12 + .../CgibinMenu/CgibinMenuGetResponse.cs | 180 +++ .../CgibinMenuAddConditionalRequest.cs | 85 + .../CgibinMenuAddConditionalResponse.cs | 19 + .../CgibinMenuDeleteConditionalRequest.cs | 19 + .../CgibinMenuDeleteConditionalResponse.cs | 12 + .../Conditional/CgibinMenuTryMatchRequest.cs | 18 + .../Conditional/CgibinMenuTryMatchResponse.cs | 25 + .../CgibinMessageCustomSendRequest.cs | 372 +++++ .../CgibinMessageCustomSendResponse.cs | 12 + .../CgibinMessageCustomTypingRequest.cs | 25 + .../CgibinMessageCustomTypingResponse.cs | 12 + .../CgibinMessageMassDeleteRequest.cs | 25 + .../CgibinMessageMassDeleteResponse.cs | 12 + .../CgibinMessageMassGetRequest.cs | 18 + .../CgibinMessageMassGetResponse.cs | 26 + .../CgibinMessageMassPreviewRequest.cs | 181 +++ .../CgibinMessageMassPreviewResponse.cs | 12 + .../CgibinMessageMassSendAllRequest.cs | 127 ++ .../CgibinMessageMassSendAllResponse.cs | 12 + .../CgibinMessageMassSendRequest.cs | 110 ++ .../CgibinMessageMassSendResponse.cs | 27 + .../Speed/CgibinMessageMassSpeedGetRequest.cs | 12 + .../CgibinMessageMassSpeedGetResponse.cs | 25 + .../Speed/CgibinMessageMassSpeedSetRequest.cs | 18 + .../CgibinMessageMassSpeedSetResponse.cs | 12 + ...ibinMessageSubscribeBusinessSendRequest.cs | 76 + ...binMessageSubscribeBusinessSendResponse.cs | 12 + .../CgibinMessageTemplateSendRequest.cs | 83 + .../CgibinMessageTemplateSendResponse.cs | 18 + .../CgibinMessageTemplateSubscribeRequest.cs | 97 ++ .../CgibinMessageTemplateSubscribeResponse.cs | 12 + ...binMessageWxopenActivityIdCreateRequest.cs | 25 + ...inMessageWxopenActivityIdCreateResponse.cs | 25 + ...essageWxopenUpdatableMessageSendRequest.cs | 65 + ...ssageWxopenUpdatableMessageSendResponse.cs | 12 + .../Abstractions/CgibinMidasRequestBase.cs | 72 + .../CgibinMidasCancelPayRequest.cs | 25 + .../CgibinMidasCancelPayResponse.cs | 18 + .../CgibinMidasGetBalanceRequest.cs | 12 + .../CgibinMidasGetBalanceResponse.cs | 62 + .../CgibinMidas/CgibinMidasPayRequest.cs | 39 + .../CgibinMidas/CgibinMidasPayResponse.cs | 32 + .../CgibinMidas/CgibinMidasPresentRequest.cs | 25 + .../CgibinMidas/CgibinMidasPresentResponse.cs | 25 + .../CgibinMidasSandboxCancelPayRequest.cs | 12 + .../CgibinMidasSandboxCancelPayResponse.cs | 12 + .../CgibinMidasSandboxGetBalanceRequest.cs | 12 + .../CgibinMidasSandboxGetBalanceResponse.cs | 12 + .../Sandbox/CgibinMidasSandboxPayRequest.cs | 12 + .../Sandbox/CgibinMidasSandboxPayResponse.cs | 12 + .../CgibinMidasSandboxPresentRequest.cs | 12 + .../CgibinMidasSandboxPresentResponse.cs | 12 + .../CgibinOpen/CgibinOpenBindRequest.cs | 18 + .../CgibinOpen/CgibinOpenBindResponse.cs | 12 + .../CgibinOpen/CgibinOpenCreateRequest.cs | 25 + .../CgibinOpen/CgibinOpenCreateResponse.cs | 18 + .../Models/CgibinOpen/CgibinOpenGetRequest.cs | 12 + .../CgibinOpen/CgibinOpenGetResponse.cs | 12 + .../CgibinOpen/CgibinOpenUnbindRequest.cs | 12 + .../CgibinOpen/CgibinOpenUnbindResponse.cs | 12 + .../CgibinPOI/CgibinPOIAddPOIRequest.cs | 176 ++ .../CgibinPOI/CgibinPOIAddPOIResponse.cs | 12 + .../CgibinPOI/CgibinPOIDeletePOIRequest.cs | 18 + .../CgibinPOI/CgibinPOIDeletePOIResponse.cs | 12 + .../CgibinPOI/CgibinPOIGetPOIListRequest.cs | 25 + .../CgibinPOI/CgibinPOIGetPOIListResponse.cs | 52 + .../CgibinPOI/CgibinPOIGetPOIRequest.cs | 18 + .../CgibinPOI/CgibinPOIGetPOIResponse.cs | 190 +++ .../CgibinPOI/CgibinPOIUpdatePOIRequest.cs | 107 ++ .../CgibinPOI/CgibinPOIUpdatePOIResponse.cs | 12 + .../CgibinQrcode/CgibinQrcodeCreateRequest.cs | 65 + .../CgibinQrcodeCreateResponse.cs | 32 + .../CgibinShorten/CgibinShortUrlRequest.cs | 25 + .../CgibinShorten/CgibinShortUrlResponse.cs | 18 + .../CgibinShortenFetchRequest.cs | 18 + .../CgibinShortenFetchResponse.cs | 32 + .../CgibinShortenGenerateRequest.cs | 25 + .../CgibinShortenGenerateResponse.cs | 18 + .../GgibinSoterVerifySignatureRequest.cs | 32 + .../GgibinSoterVerifySignatureResponse.cs | 18 + .../CgibinTemplateAddTemplateRequest.cs | 18 + .../CgibinTemplateAddTemplateResponse.cs | 18 + ...binTemplateDeletePrivateTemplateRequest.cs | 18 + ...inTemplateDeletePrivateTemplateResponse.cs | 12 + ...binTemplateGetAllPrivateTemplateRequest.cs | 12 + ...inTemplateGetAllPrivateTemplateResponse.cs | 66 + .../CgibinTemplateGetIndustryRequest.cs | 12 + .../CgibinTemplateGetIndustryResponse.cs | 45 + .../CgibinTemplateSetIndustryRequest.cs | 25 + .../CgibinTemplateSetIndustryResponse.cs | 12 + .../CgibinUserInfoBatchGetResponse.cs | 10 +- .../CgibinUser/CgibinUserInfoResponse.cs | 10 +- .../CgibinWxaappCreateWxaQrcodeRequest.cs | 25 + .../CgibinWxaappCreateWxaQrcodeResponse.cs | 16 + .../CgibinWxopenQrcodeJumpAddRequest.cs | 62 + .../CgibinWxopenQrcodeJumpAddResponse.cs | 12 + .../CgibinWxopenQrcodeJumpDeleteRequest.cs | 18 + .../CgibinWxopenQrcodeJumpDeleteResponse.cs | 12 + .../CgibinWxopenQrcodeJumpDownloadRequest.cs | 12 + .../CgibinWxopenQrcodeJumpDownloadResponse.cs | 25 + .../CgibinWxopenQrcodeJumpGetRequest.cs | 12 + .../CgibinWxopenQrcodeJumpGetResponse.cs | 89 + .../CgibinWxopenQrcodeJumpPublishRequest.cs | 18 + .../CgibinWxopenQrcodeJumpPublishResponse.cs | 12 + .../CustomServiceKfAccountAddRequest.cs | 32 + .../CustomServiceKfAccountAddResponse.cs | 12 + .../CustomServiceKfAccountDeleteRequest.cs | 18 + .../CustomServiceKfAccountDeleteResponse.cs | 12 + ...stomServiceKfAccountInviteWorkerRequest.cs | 25 + ...tomServiceKfAccountInviteWorkerResponse.cs | 12 + .../CustomServiceKfAccountUpdateRequest.cs | 12 + .../CustomServiceKfAccountUpdateResponse.cs | 12 + ...mServiceKfAccountUploadHeadImageRequest.cs | 25 + ...ServiceKfAccountUploadHeadImageResponse.cs | 12 + .../CustomServiceKfSessionCloseRequest.cs | 12 + .../CustomServiceKfSessionCloseResponse.cs | 12 + .../CustomServiceKfSessionCreateRequest.cs | 25 + .../CustomServiceKfSessionCreateResponse.cs | 12 + ...omServiceKfSessionGetSessionListRequest.cs | 18 + ...mServiceKfSessionGetSessionListResponse.cs | 38 + ...CustomServiceKfSessionGetSessionRequest.cs | 18 + ...ustomServiceKfSessionGetSessionResponse.cs | 25 + ...ustomServiceKfSessionGetWaitCaseRequest.cs | 12 + ...stomServiceKfSessionGetWaitCaseResponse.cs | 45 + ...rviceMessageRecordGetMessageListRequest.cs | 39 + ...viceMessageRecordGetMessageListResponse.cs | 73 + .../DataCubeGetArticleSummaryRequest.cs | 25 + .../DataCubeGetArticleSummaryResponse.cs | 101 ++ .../Article/DataCubeGetArticleTotalRequest.cs | 12 + .../DataCubeGetArticleTotalResponse.cs | 240 +++ .../Article/DataCubeGetUserReadHourRequest.cs | 12 + .../DataCubeGetUserReadHourResponse.cs | 31 + .../Article/DataCubeGetUserReadRequest.cs | 12 + .../Article/DataCubeGetUserReadResponse.cs | 94 ++ .../DataCubeGetUserShareHourRequest.cs | 12 + .../DataCubeGetUserShareHourResponse.cs | 31 + .../Article/DataCubeGetUserShareRequest.cs | 12 + .../Article/DataCubeGetUserShareResponse.cs | 52 + .../DataCubeGetCardBusinessInfoRequest.cs | 32 + .../DataCubeGetCardBusinessInfoResponse.cs | 101 ++ .../Card/DataCubeGetCardCardInfoRequest.cs | 18 + .../Card/DataCubeGetCardCardInfoResponse.cs | 38 + .../DataCubeGetCardMemberCardDetailRequest.cs | 32 + ...DataCubeGetCardMemberCardDetailResponse.cs | 67 + .../DataCubeGetCardMemberCardInfoRequest.cs | 12 + .../DataCubeGetCardMemberCardInfoResponse.cs | 101 ++ .../DataCubeGetGameAnalysisDataRequest.cs | 73 + .../DataCubeGetGameAnalysisDataResponse.cs | 72 + .../DataCubeGetInterfaceSummaryHourRequest.cs | 12 + ...DataCubeGetInterfaceSummaryHourResponse.cs | 31 + .../DataCubeGetInterfaceSummaryRequest.cs | 25 + .../DataCubeGetInterfaceSummaryResponse.cs | 59 + ...UpstreamMessageDistributionMonthRequest.cs | 12 + ...pstreamMessageDistributionMonthResponse.cs | 25 + ...beGetUpstreamMessageDistributionRequest.cs | 12 + ...eGetUpstreamMessageDistributionResponse.cs | 45 + ...tUpstreamMessageDistributionWeekRequest.cs | 12 + ...UpstreamMessageDistributionWeekResponse.cs | 25 + .../DataCubeGetUpstreamMessageHourRequest.cs | 12 + .../DataCubeGetUpstreamMessageHourResponse.cs | 31 + .../DataCubeGetUpstreamMessageMonthRequest.cs | 12 + ...DataCubeGetUpstreamMessageMonthResponse.cs | 25 + .../DataCubeGetUpstreamMessageRequest.cs | 25 + .../DataCubeGetUpstreamMessageResponse.cs | 52 + .../DataCubeGetUpstreamMessageWeekRequest.cs | 12 + .../DataCubeGetUpstreamMessageWeekResponse.cs | 25 + .../User/DataCubeGetUserCumulateRequest.cs | 12 + .../User/DataCubeGetUserCumulateResponse.cs | 38 + .../User/DataCubeGetUserSummaryRequest.cs | 25 + .../User/DataCubeGetUserSummaryResponse.cs | 52 + ...etWeAnalysisAppIdDailyRetainInfoRequest.cs | 25 + ...tWeAnalysisAppIdDailyRetainInfoResponse.cs | 52 + ...WeAnalysisAppIdDailySummaryTrendRequest.cs | 12 + ...eAnalysisAppIdDailySummaryTrendResponse.cs | 52 + ...etWeAnalysisAppIdDailyVisitTrendRequest.cs | 12 + ...tWeAnalysisAppIdDailyVisitTrendResponse.cs | 80 + ...WeAnalysisAppIdMonthlyRetainInfoRequest.cs | 12 + ...eAnalysisAppIdMonthlyRetainInfoResponse.cs | 18 + ...WeAnalysisAppIdMonthlyVisitTrendRequest.cs | 12 + ...eAnalysisAppIdMonthlyVisitTrendResponse.cs | 31 + ...beGetWeAnalysisAppIdUserPortraitRequest.cs | 12 + ...eGetWeAnalysisAppIdUserPortraitResponse.cs | 107 ++ ...WeAnalysisAppIdVisitDistributionRequest.cs | 12 + ...eAnalysisAppIdVisitDistributionResponse.cs | 65 + ...aCubeGetWeAnalysisAppIdVisitPageRequest.cs | 12 + ...CubeGetWeAnalysisAppIdVisitPageResponse.cs | 87 + ...tWeAnalysisAppIdWeeklyRetainInfoRequest.cs | 12 + ...WeAnalysisAppIdWeeklyRetainInfoResponse.cs | 18 + ...tWeAnalysisAppIdWeeklyVisitTrendRequest.cs | 12 + ...WeAnalysisAppIdWeeklyVisitTrendResponse.cs | 31 + .../IntpMarketCodeActiveCodeQueryRequest.cs | 39 + .../IntpMarketCodeActiveCodeQueryResponse.cs | 95 ++ .../IntpMarketCodeActiveCodeRequest.cs | 81 + .../IntpMarketCodeActiveCodeResponse.cs | 12 + .../IntpMarketCodeApplyCodeDownloadRequest.cs | 32 + ...IntpMarketCodeApplyCodeDownloadResponse.cs | 18 + .../IntpMarketCodeApplyCodeQueryRequest.cs | 25 + .../IntpMarketCodeApplyCodeQueryResponse.cs | 73 + .../IntpMarketCodeApplyCodeRequest.cs | 25 + .../IntpMarketCodeApplyCodeResponse.cs | 18 + .../IntpMarketCodeTicketToCodeRequest.cs | 25 + .../IntpMarketCodeTicketToCodeResponse.cs | 12 + .../IntpRealNameGetAuthUrlRequest.cs | 18 + .../IntpRealNameGetAuthUrlResponse.cs | 32 + .../MerchantCategoryGetPropertyRequest.cs | 18 + .../MerchantCategoryGetPropertyResponse.cs | 65 + .../Category/MerchantCategoryGetSKURequest.cs | 18 + .../MerchantCategoryGetSKUResponse.cs | 65 + .../Category/MerchantCategoryGetSubRequest.cs | 18 + .../MerchantCategoryGetSubResponse.cs | 39 + .../MerchantCommonUploadImageRequest.cs | 25 + .../MerchantCommonUploadImageResponse.cs | 18 + .../Merchant/Group/MerchantGroupAddRequest.cs | 38 + .../Group/MerchantGroupAddResponse.cs | 18 + .../Group/MerchantGroupDeleteRequest.cs | 18 + .../Group/MerchantGroupDeleteResponse.cs | 12 + .../Group/MerchantGroupGetAllRequest.cs | 12 + .../Group/MerchantGroupGetAllResponse.cs | 38 + .../Group/MerchantGroupGetByIdRequest.cs | 18 + .../Group/MerchantGroupGetByIdResponse.cs | 45 + .../MerchantGroupProductModifyRequest.cs | 45 + .../MerchantGroupProductModifyResponse.cs | 12 + .../MerchantGroupPropertyModifyRequest.cs | 25 + .../MerchantGroupPropertyModifyResponse.cs | 12 + .../Order/MerchantOrderCloseRequest.cs | 18 + .../Order/MerchantOrderCloseResponse.cs | 12 + .../Order/MerchantOrderGetByFilterRequest.cs | 32 + .../Order/MerchantOrderGetByFilterResponse.cs | 25 + .../Order/MerchantOrderGetByIdRequest.cs | 18 + .../Order/MerchantOrderGetByIdResponse.cs | 240 +++ .../Order/MerchantOrderSetDeliveryRequest.cs | 50 + .../Order/MerchantOrderSetDeliveryResponse.cs | 12 + .../Merchant/Product/MerchantCreateRequest.cs | 324 ++++ .../Product/MerchantCreateResponse.cs | 18 + .../Merchant/Product/MerchantDeleteRequest.cs | 18 + .../Product/MerchantDeleteResponse.cs | 12 + .../Product/MerchantGetByStatusRequest.cs | 18 + .../Product/MerchantGetByStatusResponse.cs | 31 + .../Merchant/Product/MerchantGetRequest.cs | 18 + .../Merchant/Product/MerchantGetResponse.cs | 184 +++ .../MerchantModifyProductStatusRequest.cs | 25 + .../MerchantModifyProductStatusResponse.cs | 12 + .../Merchant/Product/MerchantUpdateRequest.cs | 65 + .../Product/MerchantUpdateResponse.cs | 12 + .../Merchant/Shelf/MerchantShelfAddRequest.cs | 129 ++ .../Shelf/MerchantShelfAddResponse.cs | 18 + .../Shelf/MerchantShelfDeleteRequest.cs | 18 + .../Shelf/MerchantShelfDeleteResponse.cs | 12 + .../Shelf/MerchantShelfGetAllRequest.cs | 12 + .../Shelf/MerchantShelfGetAllResponse.cs | 59 + .../Shelf/MerchantShelfGetByIdRequest.cs | 18 + .../Shelf/MerchantShelfGetByIdResponse.cs | 136 ++ .../Shelf/MerchantShelfModifyRequest.cs | 46 + .../Shelf/MerchantShelfModifyResponse.cs | 12 + .../Merchant/Stock/MerchantStockAddRequest.cs | 32 + .../Stock/MerchantStockAddResponse.cs | 12 + .../Stock/MerchantStockReduceRequest.cs | 32 + .../Stock/MerchantStockReduceResponse.cs | 12 + .../Bill/NontaxCreateBillCardRequest.cs | 51 + .../Bill/NontaxCreateBillCardResponse.cs | 18 + .../Bill/NontaxGetBillAuthUrlRequest.cs | 60 + .../Bill/NontaxGetBillAuthUrlResponse.cs | 25 + .../Nontax/Bill/NontaxInsertBillRequest.cs | 113 ++ .../Nontax/Bill/NontaxInsertBillResponse.cs | 25 + .../Nontax/NontaxDownloadBillRequest.cs | 39 + .../Nontax/NontaxDownloadBillResponse.cs | 16 + .../Nontax/NontaxGetOrderListRequest.cs | 46 + .../Nontax/NontaxGetOrderListResponse.cs | 25 + .../Models/Nontax/NontaxGetOrderRequest.cs | 32 + .../Models/Nontax/NontaxGetOrderResponse.cs | 387 +++++ .../Models/Nontax/NontaxGetRealNameRequest.cs | 18 + .../Nontax/NontaxGetRealNameResponse.cs | 39 + .../Models/Nontax/NontaxMicroPayRequest.cs | 137 ++ .../Models/Nontax/NontaxMicroPayResponse.cs | 18 + .../Nontax/NontaxMockNotificationRequest.cs | 33 + .../Nontax/NontaxMockNotificationResponse.cs | 12 + .../Nontax/NontaxMockQueryFeeRequest.cs | 12 + .../Nontax/NontaxMockQueryFeeResponse.cs | 12 + .../NontaxNotifyInconsistentOrderRequest.cs | 25 + .../NontaxNotifyInconsistentOrderResponse.cs | 12 + .../Models/Nontax/NontaxQueryFeeRequest.cs | 60 + .../Models/Nontax/NontaxQueryFeeResponse.cs | 88 + .../Models/Nontax/NontaxRefundRequest.cs | 46 + .../Models/Nontax/NontaxRefundResponse.cs | 18 + .../Nontax/NontaxUnifiedOrderRequest.cs | 227 +++ .../Nontax/NontaxUnifiedOrderResponse.cs | 66 + .../NontaxVehicleEntranceNotifyRequest.cs | 115 ++ .../NontaxVehicleEntranceNotifyResponse.cs | 18 + .../Vehicle/NontaxVehiclePayApplyRequest.cs | 213 +++ .../Vehicle/NontaxVehiclePayApplyResponse.cs | 18 + .../Vehicle/NontaxVehicleQueryStateRequest.cs | 88 + .../NontaxVehicleQueryStateResponse.cs | 46 + .../Product/ProductImageUploadRequest.cs | 46 + .../Product/ProductImageUploadResponse.cs | 45 + .../PublisherStatAdposGeneralRequest.cs | 18 + .../PublisherStatAdposGeneralResponse.cs | 127 ++ .../PublisherStatCpsGeneralRequest.cs | 12 + .../PublisherStatCpsGeneralResponse.cs | 120 ++ .../PublisherStatSettlementRequest.cs | 39 + .../PublisherStatSettlementResponse.cs | 171 ++ .../Semantic/SemanticSemproxySearchRequest.cs | 67 + .../SemanticSemproxySearchResponse.cs | 1259 +++++++++++++++ .../SnsComponentJsCode2SessionRequest.cs | 32 + .../SnsComponentJsCode2SessionResponse.cs | 12 + .../Models/Sns/SnsAuthRequest.cs | 2 + .../Models/Sns/SnsJsCode2SessionRequest.cs | 4 + .../Models/Sns/SnsJsCode2SessionResponse.cs | 2 +- .../Models/Sns/SnsOAuth2AccessTokenRequest.cs | 4 + .../Sns/SnsOAuth2RefreshTokenRequest.cs | 4 + .../Models/Sns/SnsUserInfoRequest.cs | 4 + .../Tcb/TcbAddDelayedFunctionTaskRequest.cs | 39 + .../Tcb/TcbAddDelayedFunctionTaskResponse.cs | 12 + .../Models/Tcb/TcbCloudBaseReportRequest.cs | 60 + .../Models/Tcb/TcbCloudBaseReportResponse.cs | 12 + .../Tcb/TcbCreatePressureTestTaskRequest.cs | 39 + .../Tcb/TcbCreatePressureTestTaskResponse.cs | 18 + .../Models/Tcb/TcbCreateSendSmsTaskRequest.cs | 25 + .../Tcb/TcbCreateSendSmsTaskResponse.cs | 18 + .../TcbDescribeExtensionUploadInfoRequest.cs | 51 + .../TcbDescribeExtensionUploadInfoResponse.cs | 72 + .../Tcb/TcbDescribeSmsRecordsRequest.cs | 73 + .../Tcb/TcbDescribeSmsRecordsResponse.cs | 111 ++ .../Models/Tcb/TcbGetOpenDataRequest.cs | 25 + .../Models/Tcb/TcbGetOpenDataResponse.cs | 38 + .../Tcb/TcbGetPressureTestReportRequest.cs | 18 + .../Tcb/TcbGetPressureTestReportResponse.cs | 162 ++ .../Tcb/TcbGetPressureTestStatusRequest.cs | 18 + .../Tcb/TcbGetPressureTestStatusResponse.cs | 32 + .../Models/Tcb/TcbGetStatisticsRequest.cs | 96 ++ .../Models/Tcb/TcbGetStatisticsResponse.cs | 70 + .../Models/Tcb/TcbGetVoIPSignRequest.cs | 39 + .../Models/Tcb/TcbGetVoIPSignResponse.cs | 18 + .../Models/Tcb/TcbSendSmsRequest.cs | 60 + .../Models/Tcb/TcbSendSmsResponse.cs | 59 + .../Models/Tcb/TcbSendSmsV2Request.cs | 46 + .../Models/Tcb/TcbSendSmsV2Response.cs | 25 + .../WxaBusinessPerformanceBootRequest.cs | 69 + .../WxaBusinessPerformanceBootResponse.cs | 111 ++ .../LockStep/WxaCreateWxaGameRoomRequest.cs | 67 + .../LockStep/WxaCreateWxaGameRoomResponse.cs | 31 + .../Wxa/LockStep/WxaGetWxaGameFrameRequest.cs | 32 + .../LockStep/WxaGetWxaGameFrameResponse.cs | 85 + .../WxaGetWxaGameIdentityInfoRequest.cs | 18 + .../WxaGetWxaGameIdentityInfoResponse.cs | 51 + .../LockStep/WxaGetWxaGameRoomInfoRequest.cs | 18 + .../LockStep/WxaGetWxaGameRoomInfoResponse.cs | 184 +++ .../Wxa/NearybyPOI/WxaAddNearbyPOIRequest.cs | 412 +++++ .../Wxa/NearybyPOI/WxaAddNearbyPOIResponse.cs | 47 + .../NearybyPOI/WxaDeleteNearbyPOIRequest.cs | 18 + .../NearybyPOI/WxaDeleteNearbyPOIResponse.cs | 12 + .../NearybyPOI/WxaGetNearbyPOIListRequest.cs | 25 + .../NearybyPOI/WxaGetNearbyPOIListResponse.cs | 181 +++ .../WxaSetNearbyPOIShowStatusRequest.cs | 27 + .../WxaSetNearbyPOIShowStatusResponse.cs | 12 + .../Wxa/Operation/WxaGetWxaDevInfoRequest.cs | 18 + .../Wxa/Operation/WxaGetWxaDevInfoResponse.cs | 53 + .../Wxa/Plugin/WxaDevPluginDevAgreeRequest.cs | 25 + .../Plugin/WxaDevPluginDevAgreeResponse.cs | 12 + .../Plugin/WxaDevPluginDevApplyListRequest.cs | 32 + .../WxaDevPluginDevApplyListResponse.cs | 101 ++ .../Plugin/WxaDevPluginDevDeleteRequest.cs | 18 + .../Plugin/WxaDevPluginDevDeleteResponse.cs | 12 + .../Plugin/WxaDevPluginDevRefuseRequest.cs | 25 + .../Plugin/WxaDevPluginDevRefuseResponse.cs | 12 + .../Wxa/Plugin/WxaPluginApplyRequest.cs | 32 + .../Wxa/Plugin/WxaPluginApplyResponse.cs | 12 + .../Models/Wxa/Plugin/WxaPluginListRequest.cs | 18 + .../Wxa/Plugin/WxaPluginListResponse.cs | 52 + .../Wxa/Plugin/WxaPluginUnbindRequest.cs | 25 + .../Wxa/Plugin/WxaPluginUnbindResponse.cs | 12 + .../RiskControl/WxaGetUserRiskRankRequest.cs | 81 + .../RiskControl/WxaGetUserRiskRankResponse.cs | 26 + .../Wxa/Search/WxaImageSearchRequest.cs | 18 + .../Wxa/Search/WxaImageSearchResponse.cs | 52 + .../WxaSearchWxaApiSubmitPagesRequest.cs | 38 + .../WxaSearchWxaApiSubmitPagesResponse.cs | 12 + .../Models/Wxa/Search/WxaSiteSearchRequest.cs | 25 + .../Wxa/Search/WxaSiteSearchResponse.cs | 74 + .../Security/WxaImageSecurityCheckRequest.cs | 18 + .../Security/WxaImageSecurityCheckResponse.cs | 12 + .../Wxa/Security/WxaMediaCheckRequest.cs | 25 + .../Wxa/Security/WxaMediaCheckResponse.cs | 18 + .../WxaMessageSecurityCheckRequest.cs | 18 + .../WxaMessageSecurityCheckResponse.cs | 12 + .../ServiceMarket/WxaServiceMarketRequest.cs | 46 + .../ServiceMarket/WxaServiceMarketResponse.cs | 25 + .../WxaServiceMarketRetrieveRequest.cs | 18 + .../WxaServiceMarketRetrieveResponse.cs | 18 + .../Storage/WxaRemoveUserStorageRequest.cs | 40 + .../Storage/WxaRemoveUserStorageResponse.cs | 12 + .../WxaSetUserInteractiveDataRequest.cs | 60 + .../WxaSetUserInteractiveDataResponse.cs | 12 + .../Wxa/Storage/WxaSetUserStorageRequest.cs | 60 + .../Wxa/Storage/WxaSetUserStorageResponse.cs | 12 + .../Wxa/UrlLink/WxaGenerateUrlLinkRequest.cs | 94 ++ .../Wxa/UrlLink/WxaGenerateUrlLinkResponse.cs | 18 + .../Wxa/UrlScheme/WxaGenerateSchemeRequest.cs | 52 + .../UrlScheme/WxaGenerateSchemeResponse.cs | 18 + .../Models/Wxa/WxaCheckSessionRequest.cs | 33 + .../Models/Wxa/WxaCheckSessionResponse.cs | 12 + .../Wxa/WxaCode/WxaGetWxaCodeRequest.cs | 73 + .../Wxa/WxaCode/WxaGetWxaCodeResponse.cs | 16 + .../WxaCode/WxaGetWxaCodeUnlimitRequest.cs | 18 + .../WxaCode/WxaGetWxaCodeUnlimitResponse.cs | 16 + .../Models/Wxa/WxaGetPaidUnionIdRequest.cs | 39 + .../Models/Wxa/WxaGetPaidUnionIdResponse.cs | 18 + ...WxaApiBroadcastGetGoodsWarehouseRequest.cs | 18 + ...xaApiBroadcastGetGoodsWarehouseResponse.cs | 101 ++ .../Goods/WxaApiBroadcastGoodsAddRequest.cs | 73 + .../Goods/WxaApiBroadcastGoodsAddResponse.cs | 25 + .../Goods/WxaApiBroadcastGoodsAuditRequest.cs | 18 + .../WxaApiBroadcastGoodsAuditResponse.cs | 18 + .../WxaApiBroadcastGoodsDeleteRequest.cs | 18 + .../WxaApiBroadcastGoodsDeleteResponse.cs | 12 + .../WxaApiBroadcastGoodsGetApprovedRequest.cs | 32 + ...WxaApiBroadcastGoodsGetApprovedResponse.cs | 94 ++ .../WxaApiBroadcastGoodsResetAuditRequest.cs | 25 + .../WxaApiBroadcastGoodsResetAuditResponse.cs | 12 + .../WxaApiBroadcastGoodsUpdateRequest.cs | 31 + .../WxaApiBroadcastGoodsUpdateResponse.cs | 12 + .../Role/WxaApiBroadcastRoleAddRoleRequest.cs | 25 + .../WxaApiBroadcastRoleAddRoleResponse.cs | 12 + .../WxaApiBroadcastRoleDeleteRoleRequest.cs | 12 + .../WxaApiBroadcastRoleDeleteRoleResponse.cs | 12 + .../WxaApiBroadcastRoleGetRoleListRequest.cs | 39 + .../WxaApiBroadcastRoleGetRoleListResponse.cs | 73 + .../WxaApiBroadcastRoomAddSubAnchorRequest.cs | 25 + ...WxaApiBroadcastRoomAddSubAnchorResponse.cs | 12 + ...aApiBroadcastRoomDeleteSubAnchorRequest.cs | 18 + ...ApiBroadcastRoomDeleteSubAnchorResponse.cs | 12 + .../WxaApiBroadcastRoomGetSubAnchorRequest.cs | 18 + ...WxaApiBroadcastRoomGetSubAnchorResponse.cs | 18 + ...aApiBroadcastRoomModifySubAnchorRequest.cs | 12 + ...ApiBroadcastRoomModifySubAnchorResponse.cs | 12 + .../WxaApiBroadcastRoomAddAssistantRequest.cs | 45 + ...WxaApiBroadcastRoomAddAssistantResponse.cs | 12 + ...ApiBroadcastRoomGetAssistantListRequest.cs | 18 + ...piBroadcastRoomGetAssistantListResponse.cs | 73 + ...aApiBroadcastRoomModifyAssistantRequest.cs | 32 + ...ApiBroadcastRoomModifyAssistantResponse.cs | 12 + ...aApiBroadcastRoomRemoveAssistantRequest.cs | 25 + ...ApiBroadcastRoomRemoveAssistantResponse.cs | 12 + ...WxaApiBroadcastGoodsDeleteInRoomRequest.cs | 25 + ...xaApiBroadcastGoodsDeleteInRoomResponse.cs | 12 + .../WxaApiBroadcastGoodsGetVideoRequest.cs | 25 + .../WxaApiBroadcastGoodsGetVideoResponse.cs | 18 + .../WxaApiBroadcastGoodsOnSaleRequest.cs | 34 + .../WxaApiBroadcastGoodsOnSaleResponse.cs | 12 + .../WxaApiBroadcastGoodsPushRequest.cs | 25 + .../WxaApiBroadcastGoodsPushResponse.cs | 12 + .../WxaApiBroadcastGoodsSortRequest.cs | 38 + .../WxaApiBroadcastGoodsSortResponse.cs | 12 + .../WxaApiBroadcastRoomAddGoodsRequest.cs | 25 + .../WxaApiBroadcastRoomAddGoodsResponse.cs | 12 + .../WxaApiBroadcastRoomCreateRequest.cs | 151 ++ .../WxaApiBroadcastRoomCreateResponse.cs | 25 + .../WxaApiBroadcastRoomDeleteRoomRequest.cs | 18 + .../WxaApiBroadcastRoomDeleteRoomResponse.cs | 12 + .../WxaApiBroadcastRoomEditRoomRequest.cs | 18 + .../WxaApiBroadcastRoomEditRoomResponse.cs | 12 + .../WxaApiBroadcastRoomGetPushUrlRequest.cs | 18 + .../WxaApiBroadcastRoomGetPushUrlResponse.cs | 18 + ...WxaApiBroadcastRoomGetSharedCodeRequest.cs | 25 + ...xaApiBroadcastRoomGetSharedCodeResponse.cs | 32 + ...WxaApiBroadcastRoomUpdateCommentRequest.cs | 27 + ...xaApiBroadcastRoomUpdateCommentResponse.cs | 12 + ...ApiBroadcastRoomUpdateFeedPublicRequest.cs | 27 + ...piBroadcastRoomUpdateFeedPublicResponse.cs | 12 + .../WxaApiBroadcastRoomUpdateKfRequest.cs | 27 + .../WxaApiBroadcastRoomUpdateKfResponse.cs | 12 + .../WxaApiBroadcastRoomUpdateReplayRequest.cs | 27 + ...WxaApiBroadcastRoomUpdateReplayResponse.cs | 12 + .../WxaApiNewTemplateAddTemplateRequest.cs | 32 + .../WxaApiNewTemplateAddTemplateResponse.cs | 18 + .../WxaApiNewTemplateDeleteTemplateRequest.cs | 18 + ...WxaApiNewTemplateDeleteTemplateResponse.cs | 12 + .../WxaApiNewTemplateGetCategoryRequest.cs | 12 + .../WxaApiNewTemplateGetCategoryResponse.cs | 38 + ...emplateGetPublicTemplateKeywordsRequest.cs | 18 + ...mplateGetPublicTemplateKeywordsResponse.cs | 52 + ...wTemplateGetPublicTemplateTitlesRequest.cs | 32 + ...TemplateGetPublicTemplateTitlesResponse.cs | 59 + .../WxaApiNewTemplateGetTemplateRequest.cs | 12 + .../WxaApiNewTemplateGetTemplateResponse.cs | 59 + .../Operation/WxaApiFeedbackListRequest.cs | 32 + .../Operation/WxaApiFeedbackListResponse.cs | 102 ++ .../WxaApiLogGetClientVersionRequest.cs | 12 + .../WxaApiLogGetClientVersionResponse.cs | 38 + .../WxaApiLogGetPerformanceRequest.cs | 60 + .../WxaApiLogGetPerformanceResponse.cs | 138 ++ .../Operation/WxaApiLogGetSceneRequest.cs | 12 + .../Operation/WxaApiLogGetSceneResponse.cs | 39 + .../WxaApiLogJsErrorDetailRequest.cs | 97 ++ .../WxaApiLogJsErrorDetailResponse.cs | 167 ++ .../Operation/WxaApiLogJsErrorListRequest.cs | 83 + .../Operation/WxaApiLogJsErrorListResponse.cs | 87 + .../Operation/WxaApiUserLogSearchRequest.cs | 81 + .../Operation/WxaApiUserLogSearchResponse.cs | 141 ++ ...BusinessGameMatchCreateMatchRuleRequest.cs | 89 + ...usinessGameMatchCreateMatchRuleResponse.cs | 18 + ...BusinessGameMatchDeleteMatchRuleRequest.cs | 18 + ...usinessGameMatchDeleteMatchRuleResponse.cs | 12 + ...BusinessGameMatchGetAllMatchRuleRequest.cs | 12 + ...usinessGameMatchGetAllMatchRuleResponse.cs | 123 ++ ...sinessGameMatchSetMatchOpenStateRequest.cs | 25 + ...inessGameMatchSetMatchOpenStateResponse.cs | 12 + ...BusinessGameMatchUpdateMatchRuleRequest.cs | 18 + ...usinessGameMatchUpdateMatchRuleResponse.cs | 12 + .../WxaBusinessGetLiveInfoRequest.cs | 25 + .../WxaBusinessGetLiveInfoResponse.cs | 231 +++ .../WxaBusinessGetLiveReplayRequest.cs | 39 + .../WxaBusinessGetLiveReplayResponse.cs | 52 + .../WxaBusinessGetWxaFollowersRequest.cs | 25 + .../WxaBusinessGetWxaFollowersResponse.cs | 59 + .../WxaBusinessPushMessageRequest.cs | 25 + .../WxaBusinessPushMessageResponse.cs | 18 + .../WxaBusinessRuntimeAddDeviceRequest.cs | 32 + .../WxaBusinessRuntimeAddDeviceResponse.cs | 12 + .../WxaBusinessGetPayForOrderRequest.cs | 32 + .../WxaBusinessGetPayForOrderResponse.cs | 87 + .../WechatApiClient.cs | 41 +- .../WechatApiClientOptions.cs | 15 + .../WechatApiEvent.cs | 65 + .../WechatApiRequest.cs | 3 +- 1059 files changed, 56397 insertions(+), 19 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardMerchantCheckResultEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardNotPassCheckEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardPassCheckEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardSKURemindEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardPayDoneEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardSendToFriendEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardUserAcceptEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/OrderStatusFinanceSuccessEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/SubmitMemberCardUserInfoEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UpdateMemberCardEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserConsumeCardEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserDeleteCardEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserEnterSessionFromCardEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserGetCardEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserGiftingCardEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserPayFromPayCellEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserViewCardEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/CloudInvoiceResultEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/SubmitInvoiceTitleEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/UpdateInvoiceStatusEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/UserAuthorizeInvoiceEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Merchant/MerchantOrderEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/AnnualRenewEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/NamingVerifyFailEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/NamingVerifySuccessEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/QualificationVerifyFailEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/QualificationVerifySuccessEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/VerifyExpiredEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpGuide/GuideQrcodeScanEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpJob/MassSendJobFinishEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpJob/TemplateSendJobFinishEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/ImageMessageEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/LocationMessageEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/ShortVideoMessageEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/TextMessageEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/VideoMessageEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/VoiceMessageEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ClickPushEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/LocationPushEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ScanCodePushEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ScanPushEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/SubscribePushEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/UnsubscribePushEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ViewMiniProgramPushEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ViewPushEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessageChangeEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessagePopupEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessageSentEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentAuthorizedEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentUnauthorizedEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentUpdateAuthorizedEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentVerifyTicketEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/POI/POICheckNotifyEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/AddExpressPathEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/AddWaybillEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/CancelWaybillEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/CheckBusinessEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/GetQuotaEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/UpdateBusinessBindResultEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/CancelAuthAccountEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/GetAuthInfoEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/GetPreAuthCodeEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/MockUpdateOrderStatusEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportAddOrderEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportAddTipsEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportCancelOrderEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportConfirmReturnToBusinessEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportGetAgentPosEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportPreCancelOrderEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportPreCreateOrderEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportQueryOrderStatusEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportReAddOrderEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportSetRiderScoreEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/UpdateWaybillStatusEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaSecurity/WxaMediaCheckEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientEventExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCVExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCardExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCardInvoiceExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinCommentExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinComponentExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinCustomServiceExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExpressExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinGuideExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMaterialExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMediaExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMenuExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageCustomExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageMassExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageSubscribeExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageTemplateExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageTemplateSubscribeExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageWxopenExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMidasExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinOpenExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinPOIExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinQrcodeExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinShortenExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinSoterExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinTemplateExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinWxaappExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinWxopenExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCustomServiceExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteDataCubeExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteIntpMarketCodeExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteIntpRealNameExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteMerchantExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteNontaxExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteProductExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecutePublisherStatExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteSemanticExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteTcbExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaApiExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientParameterExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageAICropRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageAICropResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageQrcodeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageQrcodeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageSuperResolutionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageSuperResolutionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBankCardRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBankCardResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBusinessLicenseRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBusinessLicenseResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRCommonRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRCommonResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingLicenseRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingLicenseResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRIdCardRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRIdCardResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRPlateNumberRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRPlateNumberResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardBatchGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardBatchGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardCreateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardCreateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardLandingPageCreateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardLandingPageCreateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardModifyStockRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardModifyStockResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardMpnewsGetHtmlRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardMpnewsGetHtmlResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardPayCellSetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardPayCellSetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardQrcodeCreateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardQrcodeCreateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardSelfConsumeCellSetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardSelfConsumeCellSetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardTestWhiteListSetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardTestWhiteListSetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeCheckCodeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeCheckCodeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeConsumeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeConsumeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDecryptRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDecryptResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDepositRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDepositResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetDepositCountRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetDepositCountResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUnavailableRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUnavailableResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGeneralCardUpdateUserRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGeneralCardUpdateUserResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardMaintainSetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardMaintainSetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageBatchGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageBatchGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPaySubMerchantBindRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPaySubMerchantBindResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPayWhiteListAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPayWhiteListAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardWxaSetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardWxaSetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderBatchGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderBatchGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderRefundRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderRefundResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateGetUrlRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateGetUrlResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateTempInfoGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateTempInfoGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateUserFormSetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateUserFormSetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUpdateUserRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUpdateUserResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUserInfoGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUserInfoGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardBatchGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardBatchGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardGetByIdRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardGetByIdResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardBoardingPassCheckinRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardBoardingPassCheckinResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMeetingTicketUpdateUserRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMeetingTicketUpdateUserResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMovieTicketUpdateUserRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMovieTicketUpdateUserResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardGetApplyProtocolRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardGetApplyProtocolResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantBatchGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantBatchGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantSubmitRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantSubmitResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/User/CardUserGetCardListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/User/CardUserGetCardListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceClearOutInvoiceRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceClearOutInvoiceResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthDataRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthDataResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthUrlRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthUrlResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceInsertRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceInsertResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceMakeOutInvoiceRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceMakeOutInvoiceResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceQueryInvoiceInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceQueryInvoiceInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceRejectInsertRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceRejectInsertResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetAuthFieldRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetAuthFieldResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetContactRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetContactResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetPayMerchantRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetPayMerchantResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetUrlRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetUrlResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformCreateCardRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformCreateCardResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformGetPdfRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformGetPdfResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformSetPdfRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformSetPdfResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformUpdateStatusRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformUpdateStatusResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetSelectTitleUrlRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetSelectTitleUrlResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetUserTitleUrlRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetUserTitleUrlResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessScanTitleRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessScanTitleResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceBatchRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceBatchResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateInvoiceStatusRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateInvoiceStatusResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateStatusBatchRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateStatusBatchResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetAuthFieldRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetAuthFieldResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetContactRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetContactResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetPayMerchantRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetPayMerchantResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinClearQuotaRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinClearQuotaResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentCloseRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentCloseResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentMarkElectRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentMarkElectResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentOpenRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentOpenResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentUnmarkElectRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentUnmarkElectResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiAuthorizerTokenRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiAuthorizerTokenResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiComponentTokenRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiComponentTokenResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiCreatePreAuthCodeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiCreatePreAuthCodeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerOptionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerOptionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiSetAuthorizerOptionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiSetAuthorizerOptionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiStartPushTicketRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiStartPushTicketResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetKfListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetKfListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetOnlineKfListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetOnlineKfListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountBindRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountBindResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountGetAllRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountGetAllResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessDeliveryGetAllRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessDeliveryGetAllResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderBatchGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderBatchGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderCancelRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderCancelResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPathGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPathGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterGetAllRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterGetAllResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessQuotaGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessQuotaGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessTestUpdateOrderRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessTestUpdateOrderResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryContactGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryContactGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryPathUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryPathUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryServiceBusinessUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryServiceBusinessUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryTemplatePreviewRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryTemplatePreviewResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/Abstractions/CgibinExpressLocalBusinessRequestBase.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessDeliveryGetAllRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessDeliveryGetAllResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOpenRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOpenResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddTipsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddTipsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderCancelRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderCancelResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderConfirmReturnRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderConfirmReturnResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreCancelRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreCancelResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderReAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderReAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessRealMockUpdateOrderRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessRealMockUpdateOrderResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessTestUpdateOrderRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessTestUpdateOrderResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessUpdateOrderRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessUpdateOrderResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideAddGuideAccountRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideAddGuideAccountResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideDeleteGuideAccountRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideDeleteGuideAccountResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideGetGuideAccountRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideGetGuideAccountResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideUpdateGuideAccountRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideUpdateGuideAccountResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerChatRecord/CgibinGuideGetGuideBuyerChatRecordRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerChatRecord/CgibinGuideGetGuideBuyerChatRecordResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideAddGuideBuyerRelationRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideAddGuideBuyerRelationResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideDeleteGuideBuyerRelationRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideDeleteGuideBuyerRelationResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationByBuyerRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationByBuyerResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideRebindGuideAccountForBuyerRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideRebindGuideAccountForBuyerResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideUpdateGuideBuyerRelationRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideUpdateGuideBuyerRelationResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideAccountConfigRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideAccountConfigResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideConfigRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideConfigResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideAccountConfigRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideAccountConfigResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideConfigRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideConfigResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideAddGuide2GuideGroupRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideAddGuide2GuideGroupResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuide2GuideGroupRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuide2GuideGroupResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuideGroupRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuideGroupResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupByGuideRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupByGuideResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGuideGroupListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGuideGroupListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideNewGuideGroupRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideNewGuideGroupResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideAddGuideMassSendJobRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideAddGuideMassSendJobResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideCancelGuideMassSendJobRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideCancelGuideMassSendJobResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideUpdateGuideMassSendJobRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideUpdateGuideMassSendJobResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideCardMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideCardMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideImageMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideImageMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideWordMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideWordMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideCardMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideCardMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideImageMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideImageMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideWordMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideWordMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideCardMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideCardMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideImageMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideImageMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideWordMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideWordMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Qrcode/CgibinGuideCreateQrcodeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Qrcode/CgibinGuideCreateQrcodeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerDisplayTagRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerDisplayTagResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerTagRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerTagResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideTagOptionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideTagOptionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideBuyerTagRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideBuyerTagResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideTagOptionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideTagOptionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerDisplayTagRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerDisplayTagResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerTagRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerTagResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideTagOptionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideTagOptionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideNewGuideTagOptionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideNewGuideTagOptionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideQueryGuideBuyerByTagRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideQueryGuideBuyerByTagResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddNewsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddNewsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialBatchGetMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialBatchGetMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialDeleteMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialDeleteMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsNewsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsNewsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsVideoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsVideoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialCountRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialCountResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialUpdateNewsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialUpdateNewsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadImageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadImageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadNewsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadNewsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadVideoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadVideoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Operation/CgibinMediaGetFeedbackMediaRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Operation/CgibinMediaGetFeedbackMediaResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceAddVoiceToRecognitionForTextRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceAddVoiceToRecognitionForTextResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceQueryRecognitionResultForTextRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceQueryRecognitionResultForTextResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceTranslateContentRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceTranslateContentResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinGetCurrentSelfMenuInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinGetCurrentSelfMenuInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinMenuCreateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinMenuCreateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinMenuDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinMenuDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinMenuGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinMenuGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/Conditional/CgibinMenuAddConditionalRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/Conditional/CgibinMenuAddConditionalResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/Conditional/CgibinMenuDeleteConditionalRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/Conditional/CgibinMenuDeleteConditionalResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/Conditional/CgibinMenuTryMatchRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/Conditional/CgibinMenuTryMatchResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageCustom/CgibinMessageCustomSendRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageCustom/CgibinMessageCustomSendResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageCustom/CgibinMessageCustomTypingRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageCustom/CgibinMessageCustomTypingResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/CgibinMessageMassDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/CgibinMessageMassDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/CgibinMessageMassGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/CgibinMessageMassGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/CgibinMessageMassPreviewRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/CgibinMessageMassPreviewResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/CgibinMessageMassSendAllRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/CgibinMessageMassSendAllResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/CgibinMessageMassSendRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/CgibinMessageMassSendResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/Speed/CgibinMessageMassSpeedGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/Speed/CgibinMessageMassSpeedGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/Speed/CgibinMessageMassSpeedSetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageMass/Speed/CgibinMessageMassSpeedSetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageSubscribe/CgibinMessageSubscribeBusinessSendRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageSubscribe/CgibinMessageSubscribeBusinessSendResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageTemplate/CgibinMessageTemplateSendRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageTemplate/CgibinMessageTemplateSendResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageTemplateSubscribe/CgibinMessageTemplateSubscribeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageTemplateSubscribe/CgibinMessageTemplateSubscribeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageWxopen/CgibinMessageWxopenActivityIdCreateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageWxopen/CgibinMessageWxopenActivityIdCreateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageWxopen/CgibinMessageWxopenUpdatableMessageSendRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMessageWxopen/CgibinMessageWxopenUpdatableMessageSendResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/Abstractions/CgibinMidasRequestBase.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/CgibinMidasCancelPayRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/CgibinMidasCancelPayResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/CgibinMidasGetBalanceRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/CgibinMidasGetBalanceResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/CgibinMidasPayRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/CgibinMidasPayResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/CgibinMidasPresentRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/CgibinMidasPresentResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/Sandbox/CgibinMidasSandboxCancelPayRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/Sandbox/CgibinMidasSandboxCancelPayResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/Sandbox/CgibinMidasSandboxGetBalanceRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/Sandbox/CgibinMidasSandboxGetBalanceResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/Sandbox/CgibinMidasSandboxPayRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/Sandbox/CgibinMidasSandboxPayResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/Sandbox/CgibinMidasSandboxPresentRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMidas/Sandbox/CgibinMidasSandboxPresentResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinOpen/CgibinOpenBindRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinOpen/CgibinOpenBindResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinOpen/CgibinOpenCreateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinOpen/CgibinOpenCreateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinOpen/CgibinOpenGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinOpen/CgibinOpenGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinOpen/CgibinOpenUnbindRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinOpen/CgibinOpenUnbindResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinPOI/CgibinPOIAddPOIRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinPOI/CgibinPOIAddPOIResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinPOI/CgibinPOIDeletePOIRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinPOI/CgibinPOIDeletePOIResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinPOI/CgibinPOIGetPOIListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinPOI/CgibinPOIGetPOIListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinPOI/CgibinPOIGetPOIRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinPOI/CgibinPOIGetPOIResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinPOI/CgibinPOIUpdatePOIRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinPOI/CgibinPOIUpdatePOIResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinQrcode/CgibinQrcodeCreateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinQrcode/CgibinQrcodeCreateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinShorten/CgibinShortUrlRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinShorten/CgibinShortUrlResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinShorten/CgibinShortenFetchRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinShorten/CgibinShortenFetchResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinShorten/CgibinShortenGenerateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinShorten/CgibinShortenGenerateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinSoter/GgibinSoterVerifySignatureRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinSoter/GgibinSoterVerifySignatureResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinTemplate/CgibinTemplateAddTemplateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinTemplate/CgibinTemplateAddTemplateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinTemplate/CgibinTemplateDeletePrivateTemplateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinTemplate/CgibinTemplateDeletePrivateTemplateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinTemplate/CgibinTemplateGetAllPrivateTemplateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinTemplate/CgibinTemplateGetAllPrivateTemplateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinTemplate/CgibinTemplateGetIndustryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinTemplate/CgibinTemplateGetIndustryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinTemplate/CgibinTemplateSetIndustryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinTemplate/CgibinTemplateSetIndustryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxaapp/CgibinWxaappCreateWxaQrcodeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxaapp/CgibinWxaappCreateWxaQrcodeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxopen/QrcodeJump/CgibinWxopenQrcodeJumpAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxopen/QrcodeJump/CgibinWxopenQrcodeJumpAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxopen/QrcodeJump/CgibinWxopenQrcodeJumpDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxopen/QrcodeJump/CgibinWxopenQrcodeJumpDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxopen/QrcodeJump/CgibinWxopenQrcodeJumpDownloadRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxopen/QrcodeJump/CgibinWxopenQrcodeJumpDownloadResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxopen/QrcodeJump/CgibinWxopenQrcodeJumpGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxopen/QrcodeJump/CgibinWxopenQrcodeJumpGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxopen/QrcodeJump/CgibinWxopenQrcodeJumpPublishRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinWxopen/QrcodeJump/CgibinWxopenQrcodeJumpPublishResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfAccount/CustomServiceKfAccountAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfAccount/CustomServiceKfAccountAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfAccount/CustomServiceKfAccountDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfAccount/CustomServiceKfAccountDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfAccount/CustomServiceKfAccountInviteWorkerRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfAccount/CustomServiceKfAccountInviteWorkerResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfAccount/CustomServiceKfAccountUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfAccount/CustomServiceKfAccountUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfAccount/CustomServiceKfAccountUploadHeadImageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfAccount/CustomServiceKfAccountUploadHeadImageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfSession/CustomServiceKfSessionCloseRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfSession/CustomServiceKfSessionCloseResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfSession/CustomServiceKfSessionCreateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfSession/CustomServiceKfSessionCreateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfSession/CustomServiceKfSessionGetSessionListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfSession/CustomServiceKfSessionGetSessionListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfSession/CustomServiceKfSessionGetSessionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfSession/CustomServiceKfSessionGetSessionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfSession/CustomServiceKfSessionGetWaitCaseRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/KfSession/CustomServiceKfSessionGetWaitCaseResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/MessageRecord/CustomServiceMessageRecordGetMessageListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CustomService/MessageRecord/CustomServiceMessageRecordGetMessageListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetArticleSummaryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetArticleSummaryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetArticleTotalRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetArticleTotalResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetUserReadHourRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetUserReadHourResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetUserReadRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetUserReadResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetUserShareHourRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetUserShareHourResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetUserShareRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Article/DataCubeGetUserShareResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Card/DataCubeGetCardBusinessInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Card/DataCubeGetCardBusinessInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Card/DataCubeGetCardCardInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Card/DataCubeGetCardCardInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Card/DataCubeGetCardMemberCardDetailRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Card/DataCubeGetCardMemberCardDetailResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Card/DataCubeGetCardMemberCardInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Card/DataCubeGetCardMemberCardInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/GameAnalysis/DataCubeGetGameAnalysisDataRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/GameAnalysis/DataCubeGetGameAnalysisDataResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Interface/DataCubeGetInterfaceSummaryHourRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Interface/DataCubeGetInterfaceSummaryHourResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Interface/DataCubeGetInterfaceSummaryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/Interface/DataCubeGetInterfaceSummaryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageDistributionMonthRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageDistributionMonthResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageDistributionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageDistributionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageDistributionWeekRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageDistributionWeekResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageHourRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageHourResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageMonthRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageMonthResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageWeekRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/UpstreamMessage/DataCubeGetUpstreamMessageWeekResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/User/DataCubeGetUserCumulateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/User/DataCubeGetUserCumulateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/User/DataCubeGetUserSummaryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/User/DataCubeGetUserSummaryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdDailyRetainInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdDailyRetainInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdDailySummaryTrendRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdDailySummaryTrendResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdDailyVisitTrendRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdDailyVisitTrendResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdMonthlyRetainInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdMonthlyRetainInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdMonthlyVisitTrendRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdMonthlyVisitTrendResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdUserPortraitRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdUserPortraitResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdVisitDistributionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdVisitDistributionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdVisitPageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdVisitPageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdWeeklyRetainInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdWeeklyRetainInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdWeeklyVisitTrendRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/DataCube/WeAnalysis/DataCubeGetWeAnalysisAppIdWeeklyVisitTrendResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeActiveCodeQueryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeActiveCodeQueryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeActiveCodeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeActiveCodeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeApplyCodeDownloadRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeApplyCodeDownloadResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeApplyCodeQueryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeApplyCodeQueryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeApplyCodeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeApplyCodeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeTicketToCodeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpMarketCode/IntpMarketCodeTicketToCodeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpRealName/IntpRealNameGetAuthUrlRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/IntpRealName/IntpRealNameGetAuthUrlResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Category/MerchantCategoryGetPropertyRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Category/MerchantCategoryGetPropertyResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Category/MerchantCategoryGetSKURequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Category/MerchantCategoryGetSKUResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Category/MerchantCategoryGetSubRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Category/MerchantCategoryGetSubResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Common/MerchantCommonUploadImageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Common/MerchantCommonUploadImageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupGetAllRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupGetAllResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupGetByIdRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupGetByIdResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupProductModifyRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupProductModifyResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupPropertyModifyRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Group/MerchantGroupPropertyModifyResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Order/MerchantOrderCloseRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Order/MerchantOrderCloseResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Order/MerchantOrderGetByFilterRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Order/MerchantOrderGetByFilterResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Order/MerchantOrderGetByIdRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Order/MerchantOrderGetByIdResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Order/MerchantOrderSetDeliveryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Order/MerchantOrderSetDeliveryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantCreateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantCreateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantGetByStatusRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantGetByStatusResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantModifyProductStatusRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantModifyProductStatusResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Product/MerchantUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Shelf/MerchantShelfAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Shelf/MerchantShelfAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Shelf/MerchantShelfDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Shelf/MerchantShelfDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Shelf/MerchantShelfGetAllRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Shelf/MerchantShelfGetAllResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Shelf/MerchantShelfGetByIdRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Shelf/MerchantShelfGetByIdResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Shelf/MerchantShelfModifyRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Shelf/MerchantShelfModifyResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Stock/MerchantStockAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Stock/MerchantStockAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Stock/MerchantStockReduceRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Stock/MerchantStockReduceResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Bill/NontaxCreateBillCardRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Bill/NontaxCreateBillCardResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Bill/NontaxGetBillAuthUrlRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Bill/NontaxGetBillAuthUrlResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Bill/NontaxInsertBillRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Bill/NontaxInsertBillResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxDownloadBillRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxDownloadBillResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxGetOrderListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxGetOrderListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxGetOrderRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxGetOrderResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxGetRealNameRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxGetRealNameResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxMicroPayRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxMicroPayResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxMockNotificationRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxMockNotificationResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxMockQueryFeeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxMockQueryFeeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxNotifyInconsistentOrderRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxNotifyInconsistentOrderResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxQueryFeeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxQueryFeeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxRefundRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxRefundResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxUnifiedOrderRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/NontaxUnifiedOrderResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Vehicle/NontaxVehicleEntranceNotifyRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Vehicle/NontaxVehicleEntranceNotifyResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Vehicle/NontaxVehiclePayApplyRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Vehicle/NontaxVehiclePayApplyResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Vehicle/NontaxVehicleQueryStateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Nontax/Vehicle/NontaxVehicleQueryStateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/ProductImageUploadRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/ProductImageUploadResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/PublisherStat/PublisherStatAdposGeneralRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/PublisherStat/PublisherStatAdposGeneralResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/PublisherStat/PublisherStatCpsGeneralRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/PublisherStat/PublisherStatCpsGeneralResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/PublisherStat/PublisherStatSettlementRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/PublisherStat/PublisherStatSettlementResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Semantic/SemanticSemproxySearchRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Semantic/SemanticSemproxySearchResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Sns/Component/SnsComponentJsCode2SessionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Sns/Component/SnsComponentJsCode2SessionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbAddDelayedFunctionTaskRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbAddDelayedFunctionTaskResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbCloudBaseReportRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbCloudBaseReportResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbCreatePressureTestTaskRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbCreatePressureTestTaskResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbCreateSendSmsTaskRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbCreateSendSmsTaskResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbDescribeExtensionUploadInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbDescribeExtensionUploadInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbDescribeSmsRecordsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbDescribeSmsRecordsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbGetOpenDataRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbGetOpenDataResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbGetPressureTestReportRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbGetPressureTestReportResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbGetPressureTestStatusRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbGetPressureTestStatusResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbGetStatisticsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbGetStatisticsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbGetVoIPSignRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbGetVoIPSignResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbSendSmsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbSendSmsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbSendSmsV2Request.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Tcb/TcbSendSmsV2Response.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Analysis/WxaBusinessPerformanceBootRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Analysis/WxaBusinessPerformanceBootResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/LockStep/WxaCreateWxaGameRoomRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/LockStep/WxaCreateWxaGameRoomResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/LockStep/WxaGetWxaGameFrameRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/LockStep/WxaGetWxaGameFrameResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/LockStep/WxaGetWxaGameIdentityInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/LockStep/WxaGetWxaGameIdentityInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/LockStep/WxaGetWxaGameRoomInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/LockStep/WxaGetWxaGameRoomInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/NearybyPOI/WxaAddNearbyPOIRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/NearybyPOI/WxaAddNearbyPOIResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/NearybyPOI/WxaDeleteNearbyPOIRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/NearybyPOI/WxaDeleteNearbyPOIResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/NearybyPOI/WxaGetNearbyPOIListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/NearybyPOI/WxaGetNearbyPOIListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/NearybyPOI/WxaSetNearbyPOIShowStatusRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/NearybyPOI/WxaSetNearbyPOIShowStatusResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Operation/WxaGetWxaDevInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Operation/WxaGetWxaDevInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaDevPluginDevAgreeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaDevPluginDevAgreeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaDevPluginDevApplyListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaDevPluginDevApplyListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaDevPluginDevDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaDevPluginDevDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaDevPluginDevRefuseRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaDevPluginDevRefuseResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginApplyRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginApplyResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginUnbindRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginUnbindResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/RiskControl/WxaGetUserRiskRankRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/RiskControl/WxaGetUserRiskRankResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Search/WxaImageSearchRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Search/WxaImageSearchResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Search/WxaSearchWxaApiSubmitPagesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Search/WxaSearchWxaApiSubmitPagesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Search/WxaSiteSearchRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Search/WxaSiteSearchResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Security/WxaImageSecurityCheckRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Security/WxaImageSecurityCheckResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Security/WxaMediaCheckRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Security/WxaMediaCheckResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Security/WxaMessageSecurityCheckRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Security/WxaMessageSecurityCheckResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketRetrieveRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketRetrieveResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Storage/WxaRemoveUserStorageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Storage/WxaRemoveUserStorageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Storage/WxaSetUserInteractiveDataRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Storage/WxaSetUserInteractiveDataResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Storage/WxaSetUserStorageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Storage/WxaSetUserStorageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/UrlLink/WxaGenerateUrlLinkRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/UrlLink/WxaGenerateUrlLinkResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/UrlScheme/WxaGenerateSchemeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/UrlScheme/WxaGenerateSchemeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/WxaCheckSessionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/WxaCheckSessionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/WxaCode/WxaGetWxaCodeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/WxaCode/WxaGetWxaCodeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/WxaCode/WxaGetWxaCodeUnlimitRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/WxaCode/WxaGetWxaCodeUnlimitResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/WxaGetPaidUnionIdRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/WxaGetPaidUnionIdResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGetGoodsWarehouseRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGetGoodsWarehouseResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsAuditRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsAuditResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsDeleteRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsDeleteResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsGetApprovedRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsGetApprovedResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsResetAuditRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsResetAuditResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Goods/WxaApiBroadcastGoodsUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Role/WxaApiBroadcastRoleAddRoleRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Role/WxaApiBroadcastRoleAddRoleResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Role/WxaApiBroadcastRoleDeleteRoleRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Role/WxaApiBroadcastRoleDeleteRoleResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Role/WxaApiBroadcastRoleGetRoleListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/Role/WxaApiBroadcastRoleGetRoleListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAnchor/WxaApiBroadcastRoomAddSubAnchorRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAnchor/WxaApiBroadcastRoomAddSubAnchorResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAnchor/WxaApiBroadcastRoomDeleteSubAnchorRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAnchor/WxaApiBroadcastRoomDeleteSubAnchorResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAnchor/WxaApiBroadcastRoomGetSubAnchorRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAnchor/WxaApiBroadcastRoomGetSubAnchorResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAnchor/WxaApiBroadcastRoomModifySubAnchorRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAnchor/WxaApiBroadcastRoomModifySubAnchorResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAssistant/WxaApiBroadcastRoomAddAssistantRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAssistant/WxaApiBroadcastRoomAddAssistantResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAssistant/WxaApiBroadcastRoomGetAssistantListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAssistant/WxaApiBroadcastRoomGetAssistantListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAssistant/WxaApiBroadcastRoomModifyAssistantRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAssistant/WxaApiBroadcastRoomModifyAssistantResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAssistant/WxaApiBroadcastRoomRemoveAssistantRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomAssistant/WxaApiBroadcastRoomRemoveAssistantResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastGoodsDeleteInRoomRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastGoodsDeleteInRoomResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastGoodsGetVideoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastGoodsGetVideoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastGoodsOnSaleRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastGoodsOnSaleResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastGoodsPushRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastGoodsPushResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastGoodsSortRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastGoodsSortResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastRoomAddGoodsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/RoomGoods/WxaApiBroadcastRoomAddGoodsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomCreateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomCreateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomDeleteRoomRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomDeleteRoomResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomEditRoomRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomEditRoomResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomGetPushUrlRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomGetPushUrlResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomGetSharedCodeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomGetSharedCodeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomUpdateCommentRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomUpdateCommentResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomUpdateFeedPublicRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomUpdateFeedPublicResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomUpdateKfRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomUpdateKfResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomUpdateReplayRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/LiveBroadcast/WxaApiBroadcastRoomUpdateReplayResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateAddTemplateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateAddTemplateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateDeleteTemplateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateDeleteTemplateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateGetCategoryRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateGetCategoryResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateGetPublicTemplateKeywordsRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateGetPublicTemplateKeywordsResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateGetPublicTemplateTitlesRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateGetPublicTemplateTitlesResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateGetTemplateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/NewTemplate/WxaApiNewTemplateGetTemplateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiFeedbackListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiFeedbackListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiLogGetClientVersionRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiLogGetClientVersionResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiLogGetPerformanceRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiLogGetPerformanceResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiLogGetSceneRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiLogGetSceneResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiLogJsErrorDetailRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiLogJsErrorDetailResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiLogJsErrorListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiLogJsErrorListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiUserLogSearchRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaApi/Operation/WxaApiUserLogSearchResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/GameMatch/WxaBusinessGameMatchCreateMatchRuleRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/GameMatch/WxaBusinessGameMatchCreateMatchRuleResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/GameMatch/WxaBusinessGameMatchDeleteMatchRuleRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/GameMatch/WxaBusinessGameMatchDeleteMatchRuleResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/GameMatch/WxaBusinessGameMatchGetAllMatchRuleRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/GameMatch/WxaBusinessGameMatchGetAllMatchRuleResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/GameMatch/WxaBusinessGameMatchSetMatchOpenStateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/GameMatch/WxaBusinessGameMatchSetMatchOpenStateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/GameMatch/WxaBusinessGameMatchUpdateMatchRuleRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/GameMatch/WxaBusinessGameMatchUpdateMatchRuleResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/LiveBroadcast/WxaBusinessGetLiveInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/LiveBroadcast/WxaBusinessGetLiveInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/LiveBroadcast/WxaBusinessGetLiveReplayRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/LiveBroadcast/WxaBusinessGetLiveReplayResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/LiveBroadcast/WxaBusinessGetWxaFollowersRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/LiveBroadcast/WxaBusinessGetWxaFollowersResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/LiveBroadcast/WxaBusinessPushMessageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/LiveBroadcast/WxaBusinessPushMessageResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/Runtime/WxaBusinessRuntimeAddDeviceRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/Runtime/WxaBusinessRuntimeAddDeviceResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/WxaBusinessGetPayForOrderRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/WxaBusinessGetPayForOrderResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/WechatApiEvent.cs diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardMerchantCheckResultEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardMerchantCheckResultEvent.cs new file mode 100644 index 00000000..f3a6e3ef --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardMerchantCheckResultEvent.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.card_merchant_check_result 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Third-party_developer_mode.html#2 + /// + public class CardMerchantCheckResultEvent : CardPassCheckEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置子商户 ID。 + /// + [System.Xml.Serialization.XmlElement("MerchantId")] + public string MerchantId { get; set; } = default!; + + /// + /// 获取或设置是否通过。 + /// + [System.Xml.Serialization.XmlElement("IsPass")] + public bool IsPassed { get; set; } + + /// + /// 获取或设置驳回原因。 + /// + [System.Xml.Serialization.XmlElement("Reason", IsNullable = true)] + public string? RefuseReason { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardNotPassCheckEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardNotPassCheckEvent.cs new file mode 100644 index 00000000..14eee11a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardNotPassCheckEvent.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.card_not_pass_check 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#1 + /// + public class CardNotPassCheckEvent : CardPassCheckEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置审核不通过原因。 + /// + [System.Xml.Serialization.XmlElement("RefuseReason")] + public string RefuseReason { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardPassCheckEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardPassCheckEvent.cs new file mode 100644 index 00000000..2ae0679b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardPassCheckEvent.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.card_pass_check 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#1 + /// + public class CardPassCheckEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardSKURemindEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardSKURemindEvent.cs new file mode 100644 index 00000000..3ada8155 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/CardSKURemindEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.card_sku_remind 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#10 + /// + public class CardSKURemindEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置报警详细信息。 + /// + [System.Xml.Serialization.XmlElement("Detail")] + public string Detail { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardPayDoneEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardPayDoneEvent.cs new file mode 100644 index 00000000..e0c4f9b3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardPayDoneEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.giftcard_pay_done 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html#_10-1%E3%80%81%E7%94%A8%E6%88%B7%E8%B4%AD%E4%B9%B0%E7%A4%BC%E5%93%81%E5%8D%A1%E4%BB%98%E6%AC%BE%E6%88%90%E5%8A%9FCallBack + /// + public class GiftCardPayDoneEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置货架 ID。 + /// + [System.Xml.Serialization.XmlElement("PageId")] + public string PageId { get; set; } = default!; + + /// + /// 获取或设置订单号。 + /// + [System.Xml.Serialization.XmlElement("OrderId")] + public string OrderId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardSendToFriendEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardSendToFriendEvent.cs new file mode 100644 index 00000000..35657ead --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardSendToFriendEvent.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.giftcard_send_to_friend 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html#_10-2%E3%80%81%E7%94%A8%E6%88%B7%E8%B4%AD%E4%B9%B0%E5%90%8E%E8%B5%A0%E9%80%81CallBack + /// + public class GiftCardSendToFriendEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置货架 ID。 + /// + [System.Xml.Serialization.XmlElement("PageId")] + public string PageId { get; set; } = default!; + + /// + /// 获取或设置订单号。 + /// + [System.Xml.Serialization.XmlElement("OrderId")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置是否转增退回。 + /// + [System.Xml.Serialization.XmlElement("IsReturnBack")] + public bool IsReturnBack { get; set; } + + /// + /// 获取或设置是否是群转增。 + /// + [System.Xml.Serialization.XmlElement("IsChatRoom")] + public bool IsFromChatroom { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardUserAcceptEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardUserAcceptEvent.cs new file mode 100644 index 00000000..4d973861 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/GiftCardUserAcceptEvent.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.giftcard_user_accept 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html#_10-3%E3%80%81%E7%94%A8%E6%88%B7%E9%A2%86%E5%8F%96%E7%A4%BC%E5%93%81%E5%8D%A1%E6%88%90%E5%8A%9FCallBack + /// + public class GiftCardUserAcceptEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置货架 ID。 + /// + [System.Xml.Serialization.XmlElement("PageId")] + public string PageId { get; set; } = default!; + + /// + /// 获取或设置订单号。 + /// + [System.Xml.Serialization.XmlElement("OrderId")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置是否是群转增。 + /// + [System.Xml.Serialization.XmlElement("IsChatRoom")] + public bool IsFromChatroom { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/OrderStatusFinanceSuccessEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/OrderStatusFinanceSuccessEvent.cs new file mode 100644 index 00000000..3590b1ed --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/OrderStatusFinanceSuccessEvent.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.ORDER_STATUS_FINANCE_SUCC 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#11 + /// + public class OrderStatusFinanceSuccessEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置订单号。 + /// + [System.Xml.Serialization.XmlElement("OrderId")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置订单类型。 + /// + [System.Xml.Serialization.XmlElement("OrderType")] + public string OrderType { get; set; } = default!; + + /// + /// 获取或设置订单状态。 + /// + [System.Xml.Serialization.XmlElement("Status")] + public string OrderStatus { get; set; } = default!; + + /// + /// 获取或设置订单生成时间戳。 + /// + [System.Xml.Serialization.XmlElement("CreateOrderTime")] + public long OrderCreateTimestamp { get; set; } + + /// + /// 获取或设置订单支付成功时间戳。 + /// + [System.Xml.Serialization.XmlElement("PayFinishTime")] + public long OrderPayTimestamp { get; set; } + + /// + /// 获取或设置支付方式。 + /// + [System.Xml.Serialization.XmlElement("Desc", IsNullable = true)] + public string? Description { get; set; } + + /// + /// 获取或设置剩余免费券点数量。 + /// + [System.Xml.Serialization.XmlElement("FreeCoinCount")] + public int FreeCoinCount { get; set; } + + /// + /// 获取或设置剩余付费券点数量。 + /// + [System.Xml.Serialization.XmlElement("PayCoinCount")] + public int PayCoinCount { get; set; } + + /// + /// 获取或设置本次变动的免费券点数量。 + /// + [System.Xml.Serialization.XmlElement("RefundFreeCoinCount")] + public int RefundFreeCoinCount { get; set; } + + /// + /// 获取或设置本次变动的付费券点数量。 + /// + [System.Xml.Serialization.XmlElement("RefundPayCoinCount")] + public int RefundPayCoinCount { get; set; } + + /// + /// 获取或设置所开收据的详情。 + /// + [System.Xml.Serialization.XmlElement("ReceiptInfo", IsNullable = true)] + public string? Receipt { get; set; } + + /// + /// 获取或设置系统备注。 + /// + [System.Xml.Serialization.XmlElement("Memo", IsNullable = true)] + public string? Remark { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/SubmitMemberCardUserInfoEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/SubmitMemberCardUserInfoEvent.cs new file mode 100644 index 00000000..3d3776a6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/SubmitMemberCardUserInfoEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.submit_membercard_user_info 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#12 + /// + public class SubmitMemberCardUserInfoEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("UserCardCode")] + public string CardCode { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UpdateMemberCardEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UpdateMemberCardEvent.cs new file mode 100644 index 00000000..7589e54c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UpdateMemberCardEvent.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.update_member_card 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#9 + /// + public class UpdateMemberCardEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("UserCardCode")] + public string CardCode { get; set; } = default!; + + /// + /// 获取或设置变动的积分值。 + /// + [System.Xml.Serialization.XmlElement("ModifyBonus", IsNullable = true)] + public int? ModifiedBonus { get; set; } + + /// + /// 获取或设置变动的余额值(单位:分)。 + /// + [System.Xml.Serialization.XmlElement("ModifyBalance", IsNullable = true)] + public int? ModifiedBalance { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserConsumeCardEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserConsumeCardEvent.cs new file mode 100644 index 00000000..147488bf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserConsumeCardEvent.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.user_consume_card 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#5 + /// + public class UserConsumeCardEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("UserCardCode")] + public string CardCode { get; set; } = default!; + + /// + /// 获取或设置核销来源。 + /// + [System.Xml.Serialization.XmlElement("ConsumeSource")] + public string ConsumeSource { get; set; } = default!; + + /// + /// 获取或设置门店 ID。 + /// + [System.Xml.Serialization.XmlElement("LocationId", IsNullable = true)] + public long? POIId { get; set; } + + /// + /// 获取或设置门店名称。 + /// + [System.Xml.Serialization.XmlElement("LocationName", IsNullable = true)] + public string? POIName { get; set; } + + /// + /// 获取或设置核销员的 OpenId。 + /// + [System.Xml.Serialization.XmlElement("StaffOpenId", IsNullable = true)] + public string? StaffOpenId { get; set; } + + /// + /// 获取或设置自助核销时用户输入的验证码。 + /// + [System.Xml.Serialization.XmlElement("VerifyCode", IsNullable = true)] + public string? VerifyCode { get; set; } + + /// + /// 获取或设置自助核销时用户输入的备注金额。 + /// + [System.Xml.Serialization.XmlElement("RemarkAmount", IsNullable = true)] + public string? RemarkAmount { get; set; } + + /// + /// 获取或设置商户自定义数值。 + /// + [System.Xml.Serialization.XmlElement("OuterId", IsNullable = true)] + public string? OuterId { get; set; } + + /// + /// 获取或设置商户自定义字符串。 + /// + [System.Xml.Serialization.XmlElement("OuterStr", IsNullable = true)] + public string? OuterString { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserDeleteCardEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserDeleteCardEvent.cs new file mode 100644 index 00000000..1accedb7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserDeleteCardEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.user_del_card 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#4 + /// + public class UserDeleteCardEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("UserCardCode")] + public string CardCode { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserEnterSessionFromCardEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserEnterSessionFromCardEvent.cs new file mode 100644 index 00000000..59ff0e7f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserEnterSessionFromCardEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.user_enter_session_from_card 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#8 + /// + public class UserEnterSessionFromCardEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("UserCardCode")] + public string CardCode { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserGetCardEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserGetCardEvent.cs new file mode 100644 index 00000000..691b83b8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserGetCardEvent.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.user_get_card 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Distributing_Coupons_Vouchers_and_Cards.html#11 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#2 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Create_a_membership_card.html#13 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html#_10-4%E3%80%81%E8%B5%A0%E9%80%8124%E5%B0%8F%E6%97%B6%E5%AF%B9%E6%96%B9%E6%9C%AA%E9%A2%86%E5%8F%96%E9%80%80%E5%9B%9E%E5%90%8E%E7%9A%84%E4%BA%8B%E4%BB%B6 + /// + public class UserGetCardEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("UserCardCode")] + public string CardCode { get; set; } = default!; + + /// + /// 获取或设置转赠前的卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("OldUserCardCode", IsNullable = true)] + public string? OldCardCode { get; set; } + + /// + /// 获取或设置领券用户的 UnionId。 + /// + [System.Xml.Serialization.XmlElement("UnionId", IsNullable = true)] + public string? UnionId { get; set; } = default!; + + /// + /// 获取或设置是否来自好友转增。 + /// + [System.Xml.Serialization.XmlElement("IsGiveByFriend")] + public bool IsTransferedByFriend { get; set; } + + /// + /// 获取或设置转赠用户的 OpenId。 + /// + [System.Xml.Serialization.XmlElement("FriendUserName", IsNullable = true)] + public string? FriendOpenId { get; set; } + + /// + /// 获取或设置是否是找回会员卡。 + /// + [System.Xml.Serialization.XmlElement("IsRestoreMemberCard", IsNullable = true)] + public bool? IsRestoreMemberCard { get; set; } + + /// + /// 获取或设置是否是来自好友推荐。 + /// + [System.Xml.Serialization.XmlElement("IsRecommendByFriend", IsNullable = true)] + public bool? IsRecommendByFriend { get; set; } + + /// + /// 获取或设置商户自定义数值。 + /// + [System.Xml.Serialization.XmlElement("OuterId", IsNullable = true)] + public string? OuterId { get; set; } + + /// + /// 获取或设置商户自定义字符串。 + /// + [System.Xml.Serialization.XmlElement("OuterStr", IsNullable = true)] + public string? OuterString { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserGiftingCardEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserGiftingCardEvent.cs new file mode 100644 index 00000000..1803a81c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserGiftingCardEvent.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.user_gifting_card 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#3 + /// + public class UserGiftingCardEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("UserCardCode")] + public string CardCode { get; set; } = default!; + + /// + /// 获取或设置接收卡券用户的 OpenId。 + /// + [System.Xml.Serialization.XmlElement("FriendUserName")] + public string FriendOpenId { get; set; } = default!; + + /// + /// 获取或设置是否转增退回。 + /// + [System.Xml.Serialization.XmlElement("IsReturnBack")] + public bool IsReturnBack { get; set; } + + /// + /// 获取或设置是否是群转增。 + /// + [System.Xml.Serialization.XmlElement("IsChatRoom")] + public bool IsFromChatroom { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserPayFromPayCellEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserPayFromPayCellEvent.cs new file mode 100644 index 00000000..55144d99 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserPayFromPayCellEvent.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.user_pay_from_pay_cell 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Create_a_Coupon_Voucher_or_Card.html#13 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#6 + /// + public class UserPayFromPayCellEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("UserCardCode")] + public string CardCode { get; set; } = default!; + + /// + /// 获取或设置微信支付交易订单号。 + /// + [System.Xml.Serialization.XmlElement("TransId", IsNullable = true)] + public string? TransactionId { get; set; } + + /// + /// 获取或设置门店 ID。 + /// + [System.Xml.Serialization.XmlElement("LocationId", IsNullable = true)] + public long? POIId { get; set; } + + /// + /// 获取或设置门店名称。 + /// + [System.Xml.Serialization.XmlElement("LocationName", IsNullable = true)] + public string? POIName { get; set; } + + /// + /// 获取或设置实付金额(单位:分)。 + /// + [System.Xml.Serialization.XmlElement("Fee")] + public int Fee { get; set; } + + /// + /// 获取或设置应付金额(单位:分)。 + /// + [System.Xml.Serialization.XmlElement("OriginalFee")] + public int OriginalFee { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserViewCardEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserViewCardEvent.cs new file mode 100644 index 00000000..d01dcc42 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Card/UserViewCardEvent.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.user_view_card 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons_Vouchers_and_Cards_Event_Push_Messages.html#7 + /// + public class UserViewCardEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("UserCardCode")] + public string CardCode { get; set; } = default!; + + /// + /// 获取或设置商户自定义数值。 + /// + [System.Xml.Serialization.XmlElement("OuterId", IsNullable = true)] + public string? OuterId { get; set; } + + /// + /// 获取或设置商户自定义字符串。 + /// + [System.Xml.Serialization.XmlElement("OuterStr", IsNullable = true)] + public string? OuterString { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/CloudInvoiceResultEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/CloudInvoiceResultEvent.cs new file mode 100644 index 00000000..52b5b38d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/CloudInvoiceResultEvent.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.cloud_invoice_invoiceresult_event 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#19 + /// + public class CloudInvoiceResultEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置开票状态码。 + /// + [System.Xml.Serialization.XmlElement("status")] + public int StatusCode { get; set; } + + /// + /// 获取或设置发票请求流水号。 + /// + [System.Xml.Serialization.XmlElement("fpqqlsh")] + public string InvoiceSerialNumber { get; set; } = default!; + + /// + /// 获取或设置纳税人识别码。 + /// + [System.Xml.Serialization.XmlElement("nsrsbh")] + public string SellerTaxNumber { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/SubmitInvoiceTitleEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/SubmitInvoiceTitleEvent.cs new file mode 100644 index 00000000..be34c5b4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/SubmitInvoiceTitleEvent.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.submit_invoice_title 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Quick_issuing/Interface_Instructions.html + /// + public class SubmitInvoiceTitleEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置发票抬头类型。 + /// + [System.Xml.Serialization.XmlElement("title_type")] + public string TitleType { get; set; } = default!; + + /// + /// 获取或设置发票抬头。 + /// + [System.Xml.Serialization.XmlElement("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置税号。 + /// + [System.Xml.Serialization.XmlElement("tax_no", IsNullable = true)] + public string? TaxNumber { get; set; } + + /// + /// 获取或设置联系电话。 + /// + [System.Xml.Serialization.XmlElement("phone", IsNullable = true)] + public string? PhoneNumber { get; set; } + + /// + /// 获取或设置联系地址。 + /// + [System.Xml.Serialization.XmlElement("addr", IsNullable = true)] + public string? Address { get; set; } + + /// + /// 获取或设置开户行。 + /// + [System.Xml.Serialization.XmlElement("bank_type", IsNullable = true)] + public string? Bank { get; set; } + + /// + /// 获取或设置银行账号。 + /// + [System.Xml.Serialization.XmlElement("bank_no", IsNullable = true)] + public string? BankNumber { get; set; } + + /// + /// 获取或设置附加信息。 + /// + [System.Xml.Serialization.XmlElement("attach", IsNullable = true)] + public string? Attachment { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/UpdateInvoiceStatusEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/UpdateInvoiceStatusEvent.cs new file mode 100644 index 00000000..3250f47d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/UpdateInvoiceStatusEvent.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.update_invoice_status 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Invoicing_Platform_API_List.html#7 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#3.6 + /// + public class UpdateInvoiceStatusEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置发票或非税票据卡券模板编号。 + /// + [System.Xml.Serialization.XmlElement("CardId")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置发票或非税票据卡券 Code。 + /// + [System.Xml.Serialization.XmlElement("Code")] + public string CardCode { get; set; } = default!; + + /// + /// 获取或设置发票或非税票据报销状态。 + /// + [System.Xml.Serialization.XmlElement("Status", IsNullable = true)] + public string? ReimburseStatus { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/UserAuthorizeInvoiceEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/UserAuthorizeInvoiceEvent.cs new file mode 100644 index 00000000..107877f3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/CardInvoice/UserAuthorizeInvoiceEvent.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.user_authorize_invoice 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html#_12-2-2-4%E6%8E%A5%E6%94%B6%E5%BC%80%E7%A5%A8%E4%BA%8B%E4%BB%B6 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#6 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#2.3 + /// + public class UserAuthorizeInvoiceEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置授权成功的订单号。 + /// + [System.Xml.Serialization.XmlElement("SuccOrderId", IsNullable = true)] + public string? SuccessOrderId { get; set; } + + /// + /// 获取或设置授权失败的订单号。 + /// + [System.Xml.Serialization.XmlElement("FailOrderId", IsNullable = true)] + public string? FailOrderId { get; set; } + + /// + /// 获取或设置授权来源。 + /// + [System.Xml.Serialization.XmlElement("Source")] + public string Source { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Merchant/MerchantOrderEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Merchant/MerchantOrderEvent.cs new file mode 100644 index 00000000..91651ac5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Merchant/MerchantOrderEvent.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.merchant_order 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Stores/WeChat_Store_Interface.html#8 + /// + public class MerchantOrderEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置订单号。 + /// + [System.Xml.Serialization.XmlElement("OrderId")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置订单状态。 + /// + [System.Xml.Serialization.XmlElement("OrderStatus")] + public int OrderStatus { get; set; } + + /// + /// 获取或设置商品 ID。 + /// + [System.Xml.Serialization.XmlElement("ProductId")] + public string ProductId { get; set; } = default!; + + /// + /// 获取或设置 SKU 信息。 + /// + [System.Xml.Serialization.XmlElement("SkuInfo")] + public string SKUInformation { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/AnnualRenewEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/AnnualRenewEvent.cs new file mode 100644 index 00000000..aadbaec2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/AnnualRenewEvent.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.annual_renew 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Wechat_Accreditation_Event_Push.html#4 + /// + public class AnnualRenewEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置过期时间戳。 + /// + [System.Xml.Serialization.XmlElement("ExpiredTime")] + public long ExpireTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/NamingVerifyFailEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/NamingVerifyFailEvent.cs new file mode 100644 index 00000000..ab7d8def --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/NamingVerifyFailEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.naming_verify_fail 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Wechat_Accreditation_Event_Push.html#3 + /// + public class NamingVerifyFailEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置失败时间戳。 + /// + [System.Xml.Serialization.XmlElement("FailTime")] + public long FailTimestamp { get; set; } + + /// + /// 获取或设置失败原因。 + /// + [System.Xml.Serialization.XmlElement("FailReason")] + public string FailReason { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/NamingVerifySuccessEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/NamingVerifySuccessEvent.cs new file mode 100644 index 00000000..b0189a68 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/NamingVerifySuccessEvent.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.naming_verify_success 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Wechat_Accreditation_Event_Push.html#2 + /// + public class NamingVerifySuccessEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置过期时间戳。 + /// + [System.Xml.Serialization.XmlElement("ExpiredTime")] + public long ExpireTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/QualificationVerifyFailEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/QualificationVerifyFailEvent.cs new file mode 100644 index 00000000..17037442 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/QualificationVerifyFailEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.qualification_verify_fail 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Wechat_Accreditation_Event_Push.html#1 + /// + public class QualificationVerifyFailEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置失败时间戳。 + /// + [System.Xml.Serialization.XmlElement("FailTime")] + public long FailTimestamp { get; set; } + + /// + /// 获取或设置失败原因。 + /// + [System.Xml.Serialization.XmlElement("FailReason")] + public string FailReason { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/QualificationVerifySuccessEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/QualificationVerifySuccessEvent.cs new file mode 100644 index 00000000..d2ce63ff --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/QualificationVerifySuccessEvent.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.qualification_verify_success 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Wechat_Accreditation_Event_Push.html#0 + /// + public class QualificationVerifySuccessEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置过期时间戳。 + /// + [System.Xml.Serialization.XmlElement("ExpiredTime")] + public long ExpireTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/VerifyExpiredEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/VerifyExpiredEvent.cs new file mode 100644 index 00000000..5b3e1bf3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpAccreditation/VerifyExpiredEvent.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.verify_expired 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Wechat_Accreditation_Event_Push.html#5 + /// + public class VerifyExpiredEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置过期时间戳。 + /// + [System.Xml.Serialization.XmlElement("ExpiredTime")] + public long ExpireTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpGuide/GuideQrcodeScanEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpGuide/GuideQrcodeScanEvent.cs new file mode 100644 index 00000000..49ae3847 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpGuide/GuideQrcodeScanEvent.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.guide_qrcode_scan_event 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.onGuideCreateQrCode.html + /// + public class GuideQrcodeScanEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + public new static class Types + { + public class Data + { + /// + /// 获取或设置顾问微信号。 + /// + [System.Xml.Serialization.XmlElement("qrcode_guide_account")] + public string GuideAccount { get; set; } = default!; + + /// + /// 获取或设置顾问 OpenId。 + /// + [System.Xml.Serialization.XmlElement("qrcode_guide_openid", IsNullable = true)] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置扫码用户 OpenId。 + /// + [System.Xml.Serialization.XmlElement("openid")] + public string BuyerOpenId { get; set; } = default!; + + /// + /// 获取或设置扫码类型。 + /// + [System.Xml.Serialization.XmlElement("action")] + public int Action { get; set; } + + /// + /// 获取或设置生成二维码时的扩展信息。 + /// + [System.Xml.Serialization.XmlElement("qrcode_info", IsNullable = true)] + public string? QrcodeExt { get; set; } + } + } + + /// + /// 获取或设置事件数据。 + /// + [System.Xml.Serialization.XmlElement("MsgID")] + public Types.Data EventData { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpJob/MassSendJobFinishEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpJob/MassSendJobFinishEvent.cs new file mode 100644 index 00000000..0d7076cb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpJob/MassSendJobFinishEvent.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.MASSSENDJOBFINISH 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#7 + /// + public class MassSendJobFinishEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置消息 ID。 + /// + [System.Xml.Serialization.XmlElement("MsgID")] + public long MessageId { get; set; } + + /// + /// 获取或设置发送状态。 + /// + [System.Xml.Serialization.XmlElement("Status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置总人数。 + /// + [System.Xml.Serialization.XmlElement("TotalCount")] + public int TotalCount { get; set; } + + /// + /// 获取或设置过滤人数。 + /// + [System.Xml.Serialization.XmlElement("FilterCount")] + public int FilterCount { get; set; } + + /// + /// 获取或设置发送成功人数。 + /// + [System.Xml.Serialization.XmlElement("SentCount")] + public int SentCount { get; set; } + + /// + /// 获取或设置发送失败人数。 + /// + [System.Xml.Serialization.XmlElement("ErrorCount")] + public int ErrorCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpJob/TemplateSendJobFinishEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpJob/TemplateSendJobFinishEvent.cs new file mode 100644 index 00000000..449115f9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpJob/TemplateSendJobFinishEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.TEMPLATESENDJOBFINISH 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Template_Message_Interface.html#%E4%BA%8B%E4%BB%B6%E6%8E%A8%E9%80%81 + /// + public class TemplateSendJobFinishEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置消息 ID。 + /// + [System.Xml.Serialization.XmlElement("MsgID")] + public long MessageId { get; set; } + + /// + /// 获取或设置发送状态。 + /// + [System.Xml.Serialization.XmlElement("Status")] + public string Status { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/ImageMessageEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/ImageMessageEvent.cs new file mode 100644 index 00000000..937feee7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/ImageMessageEvent.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 IMAGE 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html#%E5%9B%BE%E7%89%87%E6%B6%88%E6%81%AF + /// + public class ImageMessageEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置消息 ID。 + /// + [System.Xml.Serialization.XmlElement("MsgId")] + public long MessageId { get; set; } + + /// + /// 获取或设置图片 URL。 + /// + [System.Xml.Serialization.XmlElement("PicUrl")] + public string PictureUrl { get; set; } = default!; + + /// + /// 获取或设置图片消息 MediaId。 + /// + [System.Xml.Serialization.XmlElement("MediaId")] + public string MediaId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/LocationMessageEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/LocationMessageEvent.cs new file mode 100644 index 00000000..0862ae18 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/LocationMessageEvent.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 LOCATION 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html#%E5%9C%B0%E7%90%86%E4%BD%8D%E7%BD%AE%E6%B6%88%E6%81%AF + /// + public class LocationMessageEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置消息 ID。 + /// + [System.Xml.Serialization.XmlElement("MsgId")] + public long MessageId { get; set; } + + /// + /// 获取或设置纬度坐标。 + /// + [System.Xml.Serialization.XmlElement("Location_X")] + public double Latitude { get; set; } + + /// + /// 获取或设置经度坐标。 + /// + [System.Xml.Serialization.XmlElement("Location_Y")] + public double Longitude { get; set; } + + /// + /// 获取或设置地图缩放大小。 + /// + [System.Xml.Serialization.XmlElement("Scale")] + public double Scale { get; set; } + + /// + /// 获取或设置地理位置信息。 + /// + [System.Xml.Serialization.XmlElement("Label")] + public string Label { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/ShortVideoMessageEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/ShortVideoMessageEvent.cs new file mode 100644 index 00000000..6f76e2ad --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/ShortVideoMessageEvent.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 SHORTVIDEO 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html#%E5%B0%8F%E8%A7%86%E9%A2%91%E6%B6%88%E6%81%AF + /// + public class ShortVideoMessageEvent : VideoMessageEvent, WechatApiEvent.Types.IXmlSerializable + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/TextMessageEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/TextMessageEvent.cs new file mode 100644 index 00000000..f5a39442 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/TextMessageEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 TEXT 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html#%E6%96%87%E6%9C%AC%E6%B6%88%E6%81%AF + /// + public class TextMessageEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置消息 ID。 + /// + [System.Xml.Serialization.XmlElement("MsgId")] + public long MessageId { get; set; } + + /// + /// 获取或设置消息内容。 + /// + [System.Xml.Serialization.XmlElement("Content")] + public string Content { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/VideoMessageEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/VideoMessageEvent.cs new file mode 100644 index 00000000..50188446 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/VideoMessageEvent.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 VIDEO 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html#%E8%A7%86%E9%A2%91%E6%B6%88%E6%81%AF + /// + public class VideoMessageEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置消息 ID。 + /// + [System.Xml.Serialization.XmlElement("MsgId")] + public long MessageId { get; set; } + + /// + /// 获取或设置视频消息 MediaId。 + /// + [System.Xml.Serialization.XmlElement("MediaId")] + public string MediaId { get; set; } = default!; + + /// + /// 获取或设置视频消息缩略图 MediaId。 + /// + [System.Xml.Serialization.XmlElement("ThumbMediaId")] + public string ThumbnailMediaId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/VoiceMessageEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/VoiceMessageEvent.cs new file mode 100644 index 00000000..f3c5e5f5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/VoiceMessageEvent.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 VOICE 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html#%E8%AF%AD%E9%9F%B3%E6%B6%88%E6%81%AF + /// + public class VoiceMessageEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置消息 ID。 + /// + [System.Xml.Serialization.XmlElement("MsgId")] + public long MessageId { get; set; } + + /// + /// 获取或设置语音格式。 + /// + [System.Xml.Serialization.XmlElement("Format")] + public string Format { get; set; } = default!; + + /// + /// 获取或设置语音消息 MediaId。 + /// + [System.Xml.Serialization.XmlElement("MediaId")] + public string MediaId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ClickPushEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ClickPushEvent.cs new file mode 100644 index 00000000..969f4929 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ClickPushEvent.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.CLICK 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%8F%9C%E5%8D%95%E4%BA%8B%E4%BB%B6 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Custom_Menu_Push_Events.html#0 + /// + public class ClickPushEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置事件 Key,即自定义菜单接口中的 Key 值。 + /// + [System.Xml.Serialization.XmlElement("EventKey")] + public string EventKey { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/LocationPushEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/LocationPushEvent.cs new file mode 100644 index 00000000..c6f1ad0a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/LocationPushEvent.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.LOCATION 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html#%E4%B8%8A%E6%8A%A5%E5%9C%B0%E7%90%86%E4%BD%8D%E7%BD%AE%E4%BA%8B%E4%BB%B6 + /// + public class LocationPushEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置地理位置纬度。 + /// + [System.Xml.Serialization.XmlElement("Latitude")] + public double Latitude { get; set; } + + /// + /// 获取或设置地理位置经度。 + /// + [System.Xml.Serialization.XmlElement("Longitude")] + public double Longitude { get; set; } + + /// + /// 获取或设置地理位置精度。 + /// + [System.Xml.Serialization.XmlElement("Precision")] + public double Precision { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ScanCodePushEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ScanCodePushEvent.cs new file mode 100644 index 00000000..ca8f4322 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ScanCodePushEvent.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.scancode_push 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Custom_Menu_Push_Events.html#2 + /// + public class ScanCodePushEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + public new static class Types + { + public class ScanCode + { + /// + /// 获取或设置扫描类型。 + /// + [System.Xml.Serialization.XmlElement("ScanType")] + public string ScanType { get; set; } = default!; + + /// + /// 获取或设置扫描结果。 + /// + [System.Xml.Serialization.XmlElement("ScanResult")] + public string ScanResult { get; set; } = default!; + } + } + + /// + /// 获取或设置事件 Key,即自定义菜单接口中的 Key 值。 + /// + [System.Xml.Serialization.XmlElement("EventKey")] + public string EventKey { get; set; } = default!; + + /// + /// 获取或设置扫描信息。 + /// + [System.Xml.Serialization.XmlElement("ScanCodeInfo")] + public Types.ScanCode ScanCode { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ScanPushEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ScanPushEvent.cs new file mode 100644 index 00000000..e7a5c041 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ScanPushEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.SCAN 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html#%E6%89%AB%E6%8F%8F%E5%B8%A6%E5%8F%82%E6%95%B0%E4%BA%8C%E7%BB%B4%E7%A0%81%E4%BA%8B%E4%BB%B6 + /// + public class ScanPushEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置事件 Key,即创建二维码时的 SceneId。 + /// + [System.Xml.Serialization.XmlElement("EventKey")] + public string EventKey { get; set; } = default!; + + /// + /// 获取或设置二维码的 Ticket。 + /// + [System.Xml.Serialization.XmlElement("Ticket")] + public string Ticket { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/SubscribePushEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/SubscribePushEvent.cs new file mode 100644 index 00000000..6e870ad1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/SubscribePushEvent.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.subscribe 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html#%E5%85%B3%E6%B3%A8-%E5%8F%96%E6%B6%88%E5%85%B3%E6%B3%A8%E4%BA%8B%E4%BB%B6 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html#%E6%89%AB%E6%8F%8F%E5%B8%A6%E5%8F%82%E6%95%B0%E4%BA%8C%E7%BB%B4%E7%A0%81%E4%BA%8B%E4%BB%B6 + /// + public class SubscribePushEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置事件 Key,即创建二维码时的 SceneId。 + /// + [System.Xml.Serialization.XmlElement("EventKey", IsNullable = true)] + public string? EventKey { get; set; } + + /// + /// 获取或设置二维码的 Ticket。 + /// + [System.Xml.Serialization.XmlElement("Ticket", IsNullable = true)] + public string? Ticket { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/UnsubscribePushEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/UnsubscribePushEvent.cs new file mode 100644 index 00000000..c397fb22 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/UnsubscribePushEvent.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.unsubscribe 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html#%E5%85%B3%E6%B3%A8-%E5%8F%96%E6%B6%88%E5%85%B3%E6%B3%A8%E4%BA%8B%E4%BB%B6 + /// + public class UnsubscribePushEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ViewMiniProgramPushEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ViewMiniProgramPushEvent.cs new file mode 100644 index 00000000..8fe7bef1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ViewMiniProgramPushEvent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.view_miniprogram 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Custom_Menu_Push_Events.html#8 + /// + public class ViewMiniProgramPushEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置个性化菜单 ID。 + /// + [System.Xml.Serialization.XmlElement("MenuId", IsNullable = true)] + public string? MenuId { get; set; } + + /// + /// 获取或设置事件 Key,即跳转的小程序路径。 + /// + [System.Xml.Serialization.XmlElement("EventKey")] + public string EventKey { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ViewPushEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ViewPushEvent.cs new file mode 100644 index 00000000..6f1d61b5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpPush/ViewPushEvent.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.VIEW 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%8F%9C%E5%8D%95%E4%BA%8B%E4%BB%B6 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Custom_Menu_Push_Events.html#1 + /// + public class ViewPushEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置个性化菜单 ID。 + /// + [System.Xml.Serialization.XmlElement("MenuId", IsNullable = true)] + public string? MenuId { get; set; } + + /// + /// 获取或设置事件 Key,即跳转的 URL。 + /// + [System.Xml.Serialization.XmlElement("EventKey")] + public string EventKey { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessageChangeEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessageChangeEvent.cs new file mode 100644 index 00000000..04e43c9c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessageChangeEvent.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.subscribe_msg_change_event 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html#%E4%BA%8B%E4%BB%B6%E6%8E%A8%E9%80%81 + /// + public class SubscribeMessageChangeEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + public new static class Types + { + public class Data + { + public static class Types + { + public class EventItem + { + /// + /// 获取或设置订阅消息模板 ID。 + /// + [System.Xml.Serialization.XmlElement("TemplateId")] + public string TemplateId { get; set; } = default!; + + /// + /// 获取或设置用户点击行为。 + /// + [System.Xml.Serialization.XmlElement("SubscribeStatusString")] + public string SubscribeStatus { get; set; } = default!; + } + } + + /// + /// 获取或设置用户管理订阅通知数据列表。 + /// + [System.Xml.Serialization.XmlArray("List")] + public Types.EventItem[] EventList { get; set; } = default!; + } + } + + /// + /// 获取或设置事件数据。 + /// + [System.Xml.Serialization.XmlElement("SubscribeMsgChangeEvent")] + public Types.Data EventData { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessagePopupEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessagePopupEvent.cs new file mode 100644 index 00000000..b99c0298 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessagePopupEvent.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.subscribe_msg_popup_event 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html#%E4%BA%8B%E4%BB%B6%E6%8E%A8%E9%80%81 + /// + public class SubscribeMessagePopupEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + public new static class Types + { + public class Data + { + public static class Types + { + public class EventItem + { + /// + /// 获取或设置订阅消息模板 ID。 + /// + [System.Xml.Serialization.XmlElement("TemplateId")] + public string TemplateId { get; set; } = default!; + + /// + /// 获取或设置用户点击行为。 + /// + [System.Xml.Serialization.XmlElement("SubscribeStatusString")] + public string SubscribeStatus { get; set; } = default!; + + /// + /// 获取或设置场景。 + /// + [System.Xml.Serialization.XmlElement("PopupScene")] + public int PopupScene { get; set; } + } + } + + /// + /// 获取或设置用户订阅通知弹窗数据列表。 + /// + [System.Xml.Serialization.XmlArray("List")] + public Types.EventItem[] EventList { get; set; } = default!; + } + } + + /// + /// 获取或设置事件数据。 + /// + [System.Xml.Serialization.XmlElement("SubscribeMsgPopupEvent")] + public Types.Data EventData { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessageSentEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessageSentEvent.cs new file mode 100644 index 00000000..ed311390 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpSubscribeMessage/SubscribeMessageSentEvent.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.subscribe_msg_sent_event 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html#%E4%BA%8B%E4%BB%B6%E6%8E%A8%E9%80%81 + /// + public class SubscribeMessageSentEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + public new static class Types + { + public class Data + { + public static class Types + { + public class EventItem + { + /// + /// 获取或设置订阅消息模板 ID。 + /// + [System.Xml.Serialization.XmlElement("TemplateId")] + public string TemplateId { get; set; } = default!; + + /// + /// 获取或设置消息 ID。 + /// + [System.Xml.Serialization.XmlElement("MsgID")] + public long? MessageId { get; set; } + + /// + /// 获取或设置推送结果状态码。 + /// + [System.Xml.Serialization.XmlElement("ErrorCode")] + public int ErrorCode { get; set; } + + /// + /// 获取或设置推送结果状态含义。 + /// + [System.Xml.Serialization.XmlElement("ErrorStatus")] + public string ErrorMessage { get; set; } = default!; + } + } + + /// + /// 获取或设置发送订阅通知数据列表。 + /// + [System.Xml.Serialization.XmlArray("List")] + public Types.EventItem[] EventList { get; set; } = default!; + } + } + + /// + /// 获取或设置事件数据。 + /// + [System.Xml.Serialization.XmlElement("SubscribeMsgSentEvent")] + public Types.Data EventData { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentAuthorizedEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentAuthorizedEvent.cs new file mode 100644 index 00000000..54f4f813 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentAuthorizedEvent.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 INFO.authorized 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/authorize_event.html + /// + public class ComponentAuthorizedEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置第三方平台 AppId。 + /// + [System.Xml.Serialization.XmlElement("AppId")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置信息类型。 + /// + [System.Xml.Serialization.XmlElement("InfoType")] + public string InfoType { get; set; } = default!; + + /// + /// 获取或设置授权方 AppId。 + /// + [System.Xml.Serialization.XmlElement("AuthorizerAppid")] + public string AuthorizerAppid { get; set; } = default!; + + /// + /// 获取或设置预授权码。 + /// + [System.Xml.Serialization.XmlElement("PreAuthCode")] + public string PreAuthCode { get; set; } = default!; + + /// + /// 获取或设置授权码。 + /// + [System.Xml.Serialization.XmlElement("AuthorizationCode")] + public string AuthCode { get; set; } = default!; + + /// + /// 获取或设置授权码过期时间戳。 + /// + [System.Xml.Serialization.XmlElement("AuthorizationCodeExpiredTime")] + public long AuthCodeExpireTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentUnauthorizedEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentUnauthorizedEvent.cs new file mode 100644 index 00000000..5eaad006 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentUnauthorizedEvent.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 INFO.unauthorized 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/authorize_event.html + /// + public class ComponentUnauthorizedEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置第三方平台 AppId。 + /// + [System.Xml.Serialization.XmlElement("AppId")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置信息类型。 + /// + [System.Xml.Serialization.XmlElement("InfoType")] + public string InfoType { get; set; } = default!; + + /// + /// 获取或设置授权方 AppId。 + /// + [System.Xml.Serialization.XmlElement("AuthorizerAppid")] + public string AuthorizerAppid { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentUpdateAuthorizedEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentUpdateAuthorizedEvent.cs new file mode 100644 index 00000000..c1c7d44a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentUpdateAuthorizedEvent.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 INFO.unauthorized 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/authorize_event.html + /// + public class ComponentUpdateAuthorizedEvent : ComponentAuthorizedEvent, WechatApiEvent.Types.IXmlSerializable + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentVerifyTicketEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentVerifyTicketEvent.cs new file mode 100644 index 00000000..5f5fb6e6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/OpenComponent/ComponentVerifyTicketEvent.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 INFO.component_verify_ticket 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/component_verify_ticket.html + /// + public class ComponentVerifyTicketEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置第三方平台 AppId。 + /// + [System.Xml.Serialization.XmlElement("AppId")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置信息类型。 + /// + [System.Xml.Serialization.XmlElement("InfoType")] + public string InfoType { get; set; } = default!; + + /// + /// 获取或设置验证票据。 + /// + [System.Xml.Serialization.XmlElement("ComponentVerifyTicket")] + public string ComponentVerifyTicket { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/POI/POICheckNotifyEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/POI/POICheckNotifyEvent.cs new file mode 100644 index 00000000..6b8b1b4c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/POI/POICheckNotifyEvent.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.poi_check_notify 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Stores/WeChat_Store_Interface.html#8 + /// + public class POICheckNotifyEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置商户门店 ID。 + /// + [System.Xml.Serialization.XmlElement("UniqId")] + public string? SID { get; set; } + + /// + /// 获取或设置门店 ID。 + /// + [System.Xml.Serialization.XmlElement("PoiId")] + public string POIId { get; set; } = default!; + + /// + /// 获取或设置审核结果。 + /// + [System.Xml.Serialization.XmlElement("Result")] + public string Result { get; set; } = default!; + + /// + /// 获取或设置审核信息。 + /// + [System.Xml.Serialization.XmlElement("msg")] + public string ResultMessage { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/AddExpressPathEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/AddExpressPathEvent.cs new file mode 100644 index 00000000..ca28c975 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/AddExpressPathEvent.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.add_express_path 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.onPathUpdate.html + /// + public class AddExpressPathEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, WechatApiEvent.Types.IXmlSerializable + { + public new static class Types + { + public class Action + { + /// + /// 获取或设置轨迹节点时间戳。 + /// + [Newtonsoft.Json.JsonProperty("ActionTime")] + [System.Text.Json.Serialization.JsonPropertyName("ActionTime")] + [System.Xml.Serialization.XmlElement("ActionTime")] + public long ActionTimestamp { get; set; } + + /// + /// 获取或设置轨迹节点时间戳。 + /// + [Newtonsoft.Json.JsonProperty("ActionType")] + [System.Text.Json.Serialization.JsonPropertyName("ActionType")] + [System.Xml.Serialization.XmlElement("ActionType")] + public int ActionType { get; set; } + + /// + /// 获取或设置轨迹节点详情。 + /// + [Newtonsoft.Json.JsonProperty("ActionMsg")] + [System.Text.Json.Serialization.JsonPropertyName("ActionMsg")] + [System.Xml.Serialization.XmlElement("ActionMsg")] + public string ActionMessage { get; set; } = default!; + } + } + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("DeliveryID")] + [System.Text.Json.Serialization.JsonPropertyName("DeliveryID")] + [System.Xml.Serialization.XmlElement("DeliveryID")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("OrderId")] + [System.Text.Json.Serialization.JsonPropertyName("OrderId")] + [System.Xml.Serialization.XmlElement("OrderId")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("WayBillId")] + [System.Text.Json.Serialization.JsonPropertyName("WayBillId")] + [System.Xml.Serialization.XmlElement("WayBillId")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置轨迹版本号。 + /// + [Newtonsoft.Json.JsonProperty("Version")] + [System.Text.Json.Serialization.JsonPropertyName("Version")] + [System.Xml.Serialization.XmlElement("Version")] + public int Version { get; set; } + + /// + /// 获取或设置轨迹节点数。 + /// + [Newtonsoft.Json.JsonProperty("Count")] + [System.Text.Json.Serialization.JsonPropertyName("Count")] + [System.Xml.Serialization.XmlElement("Count")] + public int ActionCount { get; set; } + + /// + /// 获取或设置轨迹列表。 + /// + [Newtonsoft.Json.JsonProperty("Actions")] + [System.Text.Json.Serialization.JsonPropertyName("Actions")] + [System.Xml.Serialization.XmlArray("Actions")] + public Types.Action[] ActionList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/AddWaybillEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/AddWaybillEvent.cs new file mode 100644 index 00000000..415d2fa6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/AddWaybillEvent.cs @@ -0,0 +1,311 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.add_waybill 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.onAddOrder.html + /// + public class AddWaybillEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, WechatApiEvent.Types.IXmlSerializable + { + public new static class Types + { + public class Sender + { + /// + /// 获取或设置姓名。 + /// + [Newtonsoft.Json.JsonProperty("Name")] + [System.Text.Json.Serialization.JsonPropertyName("Name")] + [System.Xml.Serialization.XmlElement("Name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置座机号码。 + /// + [Newtonsoft.Json.JsonProperty("Tel")] + [System.Text.Json.Serialization.JsonPropertyName("Tel")] + [System.Xml.Serialization.XmlElement("Tel", IsNullable = true)] + public string? TeleNumber { get; set; } + + /// + /// 获取或设置手机号码。 + /// + [Newtonsoft.Json.JsonProperty("Mobile")] + [System.Text.Json.Serialization.JsonPropertyName("Mobile")] + [System.Xml.Serialization.XmlElement("Mobile", IsNullable = true)] + public string? MobileNumber { get; set; } + + /// + /// 获取或设置公司名称。 + /// + [Newtonsoft.Json.JsonProperty("Company")] + [System.Text.Json.Serialization.JsonPropertyName("Company")] + [System.Xml.Serialization.XmlElement("Company", IsNullable = true)] + public string? Company { get; set; } + + /// + /// 获取或设置邮编。 + /// + [Newtonsoft.Json.JsonProperty("PostCode")] + [System.Text.Json.Serialization.JsonPropertyName("PostCode")] + [System.Xml.Serialization.XmlElement("PostCode", IsNullable = true)] + public string? PostCode { get; set; } + + /// + /// 获取或设置国家。 + /// + [Newtonsoft.Json.JsonProperty("Country")] + [System.Text.Json.Serialization.JsonPropertyName("Country")] + [System.Xml.Serialization.XmlElement("Country", IsNullable = true)] + public string? Country { get; set; } + + /// + /// 获取或设置省份。 + /// + [Newtonsoft.Json.JsonProperty("Province")] + [System.Text.Json.Serialization.JsonPropertyName("Province")] + [System.Xml.Serialization.XmlElement("Province")] + public string Province { get; set; } = default!; + + /// + /// 获取或设置城市。 + /// + [Newtonsoft.Json.JsonProperty("City")] + [System.Text.Json.Serialization.JsonPropertyName("City")] + [System.Xml.Serialization.XmlElement("City")] + public string City { get; set; } = default!; + + /// + /// 获取或设置区县。 + /// + [Newtonsoft.Json.JsonProperty("Area")] + [System.Text.Json.Serialization.JsonPropertyName("Area")] + [System.Xml.Serialization.XmlElement("Area")] + public string District { get; set; } = default!; + + /// + /// 获取或设置详细地址。 + /// + [Newtonsoft.Json.JsonProperty("Address")] + [System.Text.Json.Serialization.JsonPropertyName("Address")] + [System.Xml.Serialization.XmlElement("Address")] + public string Address { get; set; } = default!; + } + + public class Receiver : Sender + { + } + + public class Cargo + { + public static class Types + { + public class GoodsDetail + { + /// + /// 获取或设置商品名。 + /// + [Newtonsoft.Json.JsonProperty("Name")] + [System.Text.Json.Serialization.JsonPropertyName("Name")] + [System.Xml.Serialization.XmlElement("Name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置商品数量。 + /// + [Newtonsoft.Json.JsonProperty("Count")] + [System.Text.Json.Serialization.JsonPropertyName("Count")] + [System.Xml.Serialization.XmlElement("Count")] + public int Count { get; set; } + } + } + + /// + /// 获取或设置包裹数量。 + /// + [Newtonsoft.Json.JsonProperty("Count")] + [System.Text.Json.Serialization.JsonPropertyName("Count")] + [System.Xml.Serialization.XmlElement("Count")] + public int Count { get; set; } + + /// + /// 获取或设置包裹长度(单位:厘米)。 + /// + [Newtonsoft.Json.JsonProperty("Space_X")] + [System.Text.Json.Serialization.JsonPropertyName("Space_X")] + [System.Xml.Serialization.XmlElement("Space_X", IsNullable = true)] + public double? Length { get; set; } + + /// + /// 获取或设置包裹宽度(单位:厘米)。 + /// + [Newtonsoft.Json.JsonProperty("Space_Y")] + [System.Text.Json.Serialization.JsonPropertyName("Space_Y")] + [System.Xml.Serialization.XmlElement("Space_Y", IsNullable = true)] + public double? Width { get; set; } + + /// + /// 获取或设置包裹高度(单位:厘米)。 + /// + [Newtonsoft.Json.JsonProperty("space_z")] + [System.Text.Json.Serialization.JsonPropertyName("space_z")] + [System.Xml.Serialization.XmlElement("Space_Z", IsNullable = true)] + public double? Height { get; set; } + + /// + /// 获取或设置包裹重量(单位:千克)。 + /// + [Newtonsoft.Json.JsonProperty("weight")] + [System.Text.Json.Serialization.JsonPropertyName("weight")] + [System.Xml.Serialization.XmlElement("Weight", IsNullable = true)] + public double? Weight { get; set; } + + /// + /// 获取或设置商品详情列表。 + /// + [Newtonsoft.Json.JsonProperty("DetailList")] + [System.Text.Json.Serialization.JsonPropertyName("DetailList")] + [System.Xml.Serialization.XmlArray("DetailList", IsNullable = true)] + public Types.GoodsDetail[]? GoodsDetailList { get; set; } + } + + public class Insurance + { + /// + /// 获取或设置是否保价。 + /// + [Newtonsoft.Json.JsonProperty("UseInsured")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("UseInsured")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + [System.Xml.Serialization.XmlElement("UseInsured")] + public bool UseInsured { get; set; } + + /// + /// 获取或设置保价金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("InsuredValue")] + [System.Text.Json.Serialization.JsonPropertyName("InsuredValue")] + [System.Xml.Serialization.XmlElement("InsuredValue")] + public int InsuredValue { get; set; } + } + + public class Service + { + /// + /// 获取或设置服务类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("ServiceType")] + [System.Text.Json.Serialization.JsonPropertyName("ServiceType")] + [System.Xml.Serialization.XmlElement("ServiceType")] + public int ServiceType { get; set; } + + /// + /// 获取或设置服务类型名称。 + /// + [Newtonsoft.Json.JsonProperty("ServiceName")] + [System.Text.Json.Serialization.JsonPropertyName("ServiceName")] + [System.Xml.Serialization.XmlElement("ServiceName")] + public string ServiceName { get; set; } = default!; + } + } + + /// + /// 获取或设置微信订单 Token。 + /// + [Newtonsoft.Json.JsonProperty("Token")] + [System.Text.Json.Serialization.JsonPropertyName("Token")] + [System.Xml.Serialization.XmlElement("Token")] + public string Token { get; set; } = default!; + + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("BizID")] + [System.Text.Json.Serialization.JsonPropertyName("BizID")] + [System.Xml.Serialization.XmlElement("BizID")] + public string BusinessId { get; set; } = default!; + + /// + /// 获取或设置快递公司客户密码。 + /// + [Newtonsoft.Json.JsonProperty("BizPwd")] + [System.Text.Json.Serialization.JsonPropertyName("BizPwd")] + [System.Xml.Serialization.XmlElement("BizPwd", IsNullable = true)] + public string? BusinessPassword { get; set; } + + /// + /// 获取或设置商户的小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("ShopAppID")] + [System.Text.Json.Serialization.JsonPropertyName("ShopAppID")] + [System.Xml.Serialization.XmlElement("ShopAppID", IsNullable = true)] + public string? ShopAppId { get; set; } + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("OrderId")] + [System.Text.Json.Serialization.JsonPropertyName("OrderId")] + [System.Xml.Serialization.XmlElement("OrderId")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("WayBillID")] + [System.Text.Json.Serialization.JsonPropertyName("WayBillID")] + [System.Xml.Serialization.XmlElement("WayBillID")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置快递备注。 + /// + [Newtonsoft.Json.JsonProperty("Remark")] + [System.Text.Json.Serialization.JsonPropertyName("Remark")] + [System.Xml.Serialization.XmlElement("Remark", IsNullable = true)] + public string? Remark { get; set; } + + /// + /// 获取或设置发件人信息。 + /// + [Newtonsoft.Json.JsonProperty("Sender")] + [System.Text.Json.Serialization.JsonPropertyName("Sender")] + [System.Xml.Serialization.XmlElement("Sender")] + public Types.Sender Sender { get; set; } = default!; + + /// + /// 获取或设置收件人信息。 + /// + [Newtonsoft.Json.JsonProperty("Receiver")] + [System.Text.Json.Serialization.JsonPropertyName("Receiver")] + [System.Xml.Serialization.XmlElement("Receiver")] + public Types.Receiver Receiver { get; set; } = default!; + + /// + /// 获取或设置包裹信息。 + /// + [Newtonsoft.Json.JsonProperty("Cargo")] + [System.Text.Json.Serialization.JsonPropertyName("Cargo")] + [System.Xml.Serialization.XmlElement("Cargo", IsNullable = true)] + public Types.Cargo? Cargo { get; set; } + + /// + /// 获取或设置保价信息。 + /// + [Newtonsoft.Json.JsonProperty("Insured")] + [System.Text.Json.Serialization.JsonPropertyName("Insured")] + [System.Xml.Serialization.XmlElement("Insured", IsNullable = true)] + public Types.Insurance? Insurance { get; set; } + + /// + /// 获取或设置服务类型信息。 + /// + [Newtonsoft.Json.JsonProperty("Service")] + [System.Text.Json.Serialization.JsonPropertyName("Service")] + [System.Xml.Serialization.XmlElement("Service", IsNullable = true)] + public Types.Service? Service { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/CancelWaybillEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/CancelWaybillEvent.cs new file mode 100644 index 00000000..0d6e8c6d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/CancelWaybillEvent.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.cancel_waybill 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.onCancelOrder.html + /// + public class CancelWaybillEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("BizID")] + [System.Text.Json.Serialization.JsonPropertyName("BizID")] + [System.Xml.Serialization.XmlElement("BizID")] + public string BusinessId { get; set; } = default!; + + /// + /// 获取或设置快递公司客户密码。 + /// + [Newtonsoft.Json.JsonProperty("BizPwd")] + [System.Text.Json.Serialization.JsonPropertyName("BizPwd")] + [System.Xml.Serialization.XmlElement("BizPwd", IsNullable = true)] + public string? BusinessPassword { get; set; } + + /// + /// 获取或设置商户的小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("ShopAppID")] + [System.Text.Json.Serialization.JsonPropertyName("ShopAppID")] + [System.Xml.Serialization.XmlElement("ShopAppID", IsNullable = true)] + public string? ShopAppId { get; set; } + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("OrderId")] + [System.Text.Json.Serialization.JsonPropertyName("OrderId")] + [System.Xml.Serialization.XmlElement("OrderId")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("WayBillID")] + [System.Text.Json.Serialization.JsonPropertyName("WayBillID")] + [System.Xml.Serialization.XmlElement("WayBillID")] + public string WaybillId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/CheckBusinessEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/CheckBusinessEvent.cs new file mode 100644 index 00000000..0de031fb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/CheckBusinessEvent.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.check_biz 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.onCheckBusiness.html + /// + public class CheckBusinessEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("BizID")] + [System.Text.Json.Serialization.JsonPropertyName("BizID")] + [System.Xml.Serialization.XmlElement("BizID")] + public string BusinessId { get; set; } = default!; + + /// + /// 获取或设置快递公司客户密码。 + /// + [Newtonsoft.Json.JsonProperty("BizPwd")] + [System.Text.Json.Serialization.JsonPropertyName("BizPwd")] + [System.Xml.Serialization.XmlElement("BizPwd", IsNullable = true)] + public string? BusinessPassword { get; set; } + + /// + /// 获取或设置商户的小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("ShopAppID")] + [System.Text.Json.Serialization.JsonPropertyName("ShopAppID")] + [System.Xml.Serialization.XmlElement("ShopAppID", IsNullable = true)] + public string? ShopAppId { get; set; } + + /// + /// 获取或设置商户名称。 + /// + [Newtonsoft.Json.JsonProperty("ShopName")] + [System.Text.Json.Serialization.JsonPropertyName("ShopName")] + [System.Xml.Serialization.XmlElement("ShopName", IsNullable = true)] + public string? ShopName { get; set; } + + /// + /// 获取或设置商户联系电话。 + /// + [Newtonsoft.Json.JsonProperty("ShopTelphone")] + [System.Text.Json.Serialization.JsonPropertyName("ShopTelphone")] + [System.Xml.Serialization.XmlElement("ShopTelphone", IsNullable = true)] + public string? ShopTeleNumber { get; set; } + + /// + /// 获取或设置商户联系人姓名。 + /// + [Newtonsoft.Json.JsonProperty("ShopContact")] + [System.Text.Json.Serialization.JsonPropertyName("ShopContact")] + [System.Xml.Serialization.XmlElement("ShopContact", IsNullable = true)] + public string? ShopContact { get; set; } + + /// + /// 获取或设置预开通的服务类型名称。 + /// + [Newtonsoft.Json.JsonProperty("ServiceName")] + [System.Text.Json.Serialization.JsonPropertyName("ServiceName")] + [System.Xml.Serialization.XmlElement("ServiceName", IsNullable = true)] + public string? ServiceName { get; set; } + + /// + /// 获取或设置商户发货省份。 + /// + [Newtonsoft.Json.JsonProperty("SenderProvince")] + [System.Text.Json.Serialization.JsonPropertyName("SenderProvince")] + [System.Xml.Serialization.XmlElement("SenderProvince", IsNullable = true)] + public string? SenderProvince { get; set; } + + /// + /// 获取或设置商户发货城市。 + /// + [Newtonsoft.Json.JsonProperty("SenderCity")] + [System.Text.Json.Serialization.JsonPropertyName("SenderCity")] + [System.Xml.Serialization.XmlElement("SenderCity", IsNullable = true)] + public string? SenderCity { get; set; } + + /// + /// 获取或设置商户发货区县。 + /// + [Newtonsoft.Json.JsonProperty("SenderArea")] + [System.Text.Json.Serialization.JsonPropertyName("SenderArea")] + [System.Xml.Serialization.XmlElement("SenderArea", IsNullable = true)] + public string? SenderDistrict { get; set; } + + /// + /// 获取或设置商户发货地址。 + /// + [Newtonsoft.Json.JsonProperty("SenderAddress")] + [System.Text.Json.Serialization.JsonPropertyName("SenderAddress")] + [System.Xml.Serialization.XmlElement("SenderAddress", IsNullable = true)] + public string? SenderAddress { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/GetQuotaEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/GetQuotaEvent.cs new file mode 100644 index 00000000..704baad2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/GetQuotaEvent.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.get_quota 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.onGetQuota.html + /// + public class GetQuotaEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("BizID")] + [System.Text.Json.Serialization.JsonPropertyName("BizID")] + [System.Xml.Serialization.XmlElement("BizID")] + public string BusinessId { get; set; } = default!; + + /// + /// 获取或设置快递公司客户密码。 + /// + [Newtonsoft.Json.JsonProperty("BizPwd")] + [System.Text.Json.Serialization.JsonPropertyName("BizPwd")] + [System.Xml.Serialization.XmlElement("BizPwd", IsNullable = true)] + public string? BusinessPassword { get; set; } + + /// + /// 获取或设置商户的小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("ShopAppID")] + [System.Text.Json.Serialization.JsonPropertyName("ShopAppID")] + [System.Xml.Serialization.XmlElement("ShopAppID", IsNullable = true)] + public string? ShopAppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/UpdateBusinessBindResultEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/UpdateBusinessBindResultEvent.cs new file mode 100644 index 00000000..397ee0aa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaExpress/UpdateBusinessBindResultEvent.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.update_business_bind_result 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.onBindResultUpdate.html + /// + public class UpdateBusinessBindResultEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, WechatApiEvent.Types.IXmlSerializable + { + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + [System.Xml.Serialization.XmlElement("delivery_id")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("biz_id")] + [System.Text.Json.Serialization.JsonPropertyName("biz_id")] + [System.Xml.Serialization.XmlElement("biz_id")] + public string BusinessId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/CancelAuthAccountEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/CancelAuthAccountEvent.cs new file mode 100644 index 00000000..d70de6ae --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/CancelAuthAccountEvent.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.cancel_auth_account 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onCancelAuth.html + /// + public class CancelAuthAccountEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置发起授权的商户小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("wx_appid")] + [System.Text.Json.Serialization.JsonPropertyName("wx_appid")] + public string MiniProgramAppId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/GetAuthInfoEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/GetAuthInfoEvent.cs new file mode 100644 index 00000000..a85d2b5a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/GetAuthInfoEvent.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.get_auth_info 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onAuthInfoGet.html + /// + public class GetAuthInfoEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置发起授权的商户小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("wx_appid")] + [System.Text.Json.Serialization.JsonPropertyName("wx_appid")] + public string MiniProgramAppId { get; set; } = default!; + + /// + /// 获取或设置授权码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string Code { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/GetPreAuthCodeEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/GetPreAuthCodeEvent.cs new file mode 100644 index 00000000..610469be --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/GetPreAuthCodeEvent.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.get_pre_auth_code 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onPreAuthCodeGet.html + /// + public class GetPreAuthCodeEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置发起授权的商户小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("wx_appid")] + [System.Text.Json.Serialization.JsonPropertyName("wx_appid")] + public string MiniProgramAppId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/MockUpdateOrderStatusEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/MockUpdateOrderStatusEvent.cs new file mode 100644 index 00000000..af049483 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/MockUpdateOrderStatusEvent.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.mock_update_order_status 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onMockUpdateOrder.html + /// + public class MockUpdateOrderStatusEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("shop_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_order_id")] + public string ShopOrderId { get; set; } = default!; + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = default!; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置校验串。 + /// + [Newtonsoft.Json.JsonProperty("delivery_sign")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_sign")] + public string DeliverySignature { get; set; } = default!; + + /// + /// 获取或设置配送状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + + /// + /// 获取或设置状态变更时间戳。 + /// + [Newtonsoft.Json.JsonProperty("action_time")] + [System.Text.Json.Serialization.JsonPropertyName("action_time")] + public long ActionTimestamp { get; set; } + + /// + /// 获取或设置附加信息。 + /// + [Newtonsoft.Json.JsonProperty("action_msg")] + [System.Text.Json.Serialization.JsonPropertyName("action_msg")] + public string? ActionMessage { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportAddOrderEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportAddOrderEvent.cs new file mode 100644 index 00000000..28e8fb69 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportAddOrderEvent.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.transport_add_order 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onOrderAdd.html + /// + public class TransportAddOrderEvent : TransportPreCreateOrderEvent + { + /// + /// 获取或设置微信订单 Token。 + /// + [Newtonsoft.Json.JsonProperty("wx_token")] + [System.Text.Json.Serialization.JsonPropertyName("wx_token")] + public string Token { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportAddTipsEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportAddTipsEvent.cs new file mode 100644 index 00000000..5409450d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportAddTipsEvent.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.transport_add_tips 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onOrderAddTips.html + /// + public class TransportAddTipsEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("shop_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_order_id")] + public string ShopOrderId { get; set; } = default!; + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = default!; + + /// + /// 获取或设置校验串。 + /// + [Newtonsoft.Json.JsonProperty("delivery_sign")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_sign")] + public string DeliverySignature { get; set; } = default!; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string? WaybillId { get; set; } + + /// + /// 获取或设置小费金额(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("tips")] + [System.Text.Json.Serialization.JsonPropertyName("tips")] + public double TipValue { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string Remark { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportCancelOrderEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportCancelOrderEvent.cs new file mode 100644 index 00000000..d3531b55 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportCancelOrderEvent.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.transport_cancel_order 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onOrderCancel.html + /// + public class TransportCancelOrderEvent : TransportPreCancelOrderEvent + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportConfirmReturnToBusinessEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportConfirmReturnToBusinessEvent.cs new file mode 100644 index 00000000..45c12f6d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportConfirmReturnToBusinessEvent.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.transport_confirm_return_to_biz 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onOrderPreCancel.html + /// + public class TransportConfirmReturnToBusinessEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("shop_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_order_id")] + public string ShopOrderId { get; set; } = default!; + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = default!; + + /// + /// 获取或设置校验串。 + /// + [Newtonsoft.Json.JsonProperty("delivery_sign")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_sign")] + public string DeliverySignature { get; set; } = default!; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string? WaybillId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportGetAgentPosEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportGetAgentPosEvent.cs new file mode 100644 index 00000000..8315db66 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportGetAgentPosEvent.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.transport_get_agent_pos 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onAgentPosQuery.html + /// + public class TransportGetAgentPosEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("shop_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_order_id")] + public string ShopOrderId { get; set; } = default!; + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = default!; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportPreCancelOrderEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportPreCancelOrderEvent.cs new file mode 100644 index 00000000..66183567 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportPreCancelOrderEvent.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.transport_precancel_order 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onOrderPreCancel.html + /// + public class TransportPreCancelOrderEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("shop_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_order_id")] + public string ShopOrderId { get; set; } = default!; + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = default!; + + /// + /// 获取或设置校验串。 + /// + [Newtonsoft.Json.JsonProperty("delivery_sign")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_sign")] + public string DeliverySignature { get; set; } = default!; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string? WaybillId { 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/Events/WxaImmediateDelivery/TransportPreCreateOrderEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportPreCreateOrderEvent.cs new file mode 100644 index 00000000..a0a2a8f6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportPreCreateOrderEvent.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.transport_precreate_order 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onOrderPreAdd.html + /// + public class TransportPreCreateOrderEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + public new static class Types + { + public class Sender : Models.CgibinExpressLocalBusinessOrderAddRequest.Types.Sender + { + } + + public class Receiver : Models.CgibinExpressLocalBusinessOrderAddRequest.Types.Receiver + { + } + + public class Cargo : Models.CgibinExpressLocalBusinessOrderAddRequest.Types.Cargo + { + } + + public class Order : Models.CgibinExpressLocalBusinessOrderAddRequest.Types.Order + { + } + } + + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("shop_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_order_id")] + public string ShopOrderId { get; set; } = default!; + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = default!; + + /// + /// 获取或设置校验串。 + /// + [Newtonsoft.Json.JsonProperty("delivery_sign")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_sign")] + public string DeliverySignature { get; set; } = default!; + + /// + /// 获取或设置发件人信息。 + /// + [Newtonsoft.Json.JsonProperty("sender")] + [System.Text.Json.Serialization.JsonPropertyName("sender")] + public Types.Sender? Sender { get; set; } + + /// + /// 获取或设置收件人信息。 + /// + [Newtonsoft.Json.JsonProperty("receiver")] + [System.Text.Json.Serialization.JsonPropertyName("receiver")] + public Types.Receiver Receiver { get; set; } = default!; + + /// + /// 获取或设置货物信息。 + /// + [Newtonsoft.Json.JsonProperty("cargo")] + [System.Text.Json.Serialization.JsonPropertyName("cargo")] + public Types.Cargo Cargo { get; set; } = default!; + + /// + /// 获取或设置订单信息。 + /// + [Newtonsoft.Json.JsonProperty("order_info")] + [System.Text.Json.Serialization.JsonPropertyName("order_info")] + public Types.Order Order { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportQueryOrderStatusEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportQueryOrderStatusEvent.cs new file mode 100644 index 00000000..1407f67c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportQueryOrderStatusEvent.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.transport_query_order_status 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onOrderQuery.html + /// + public class TransportQueryOrderStatusEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("shop_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_order_id")] + public string ShopOrderId { get; set; } = default!; + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = default!; + + /// + /// 获取或设置校验串。 + /// + [Newtonsoft.Json.JsonProperty("delivery_sign")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_sign")] + public string DeliverySignature { get; set; } = default!; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string? WaybillId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportReAddOrderEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportReAddOrderEvent.cs new file mode 100644 index 00000000..d0388b7c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportReAddOrderEvent.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.transport_readd_order 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onOrderReAdd.html + /// + public class TransportReAddOrderEvent : TransportAddOrderEvent + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportSetRiderScoreEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportSetRiderScoreEvent.cs new file mode 100644 index 00000000..2f298918 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/TransportSetRiderScoreEvent.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.transport_set_rider_score 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onRiderScoreSet.html + /// + public class TransportSetRiderScoreEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("shop_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_order_id")] + public string ShopOrderId { get; set; } = default!; + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = default!; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置配送准时分数。 + /// + [Newtonsoft.Json.JsonProperty("delivery_ontime_score")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_ontime_score")] + public int DeliveryOntimeScore { get; set; } + + /// + /// 获取或设置货物完整分数。 + /// + [Newtonsoft.Json.JsonProperty("cargo_intact_score")] + [System.Text.Json.Serialization.JsonPropertyName("cargo_intact_score")] + public int CargoIntactScore { get; set; } + + /// + /// 获取或设置服务态度分数。 + /// + [Newtonsoft.Json.JsonProperty("attitude_score")] + [System.Text.Json.Serialization.JsonPropertyName("attitude_score")] + public int AttitudeScore { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/UpdateWaybillStatusEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/UpdateWaybillStatusEvent.cs new file mode 100644 index 00000000..b6ca5fe0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaImmediateDelivery/UpdateWaybillStatusEvent.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.update_waybill_status 事件的数据。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-business/immediateDelivery.onOrderStatus.html + /// + public class UpdateWaybillStatusEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + public new static class Types + { + public class Agent + { + /// + /// 获取或设置骑手姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置骑手电话。 + /// + [Newtonsoft.Json.JsonProperty("phone")] + [System.Text.Json.Serialization.JsonPropertyName("phone")] + public string PhoneNumber { get; set; } = default!; + + /// + /// 获取或设置预计送达时间戳。 + /// + [Newtonsoft.Json.JsonProperty("reach_time")] + [System.Text.Json.Serialization.JsonPropertyName("reach_time")] + public long? ReachTimestamp { get; set; } + } + } + + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("shop_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_order_id")] + public string ShopOrderId { get; set; } = default!; + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = default!; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置配送状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + + /// + /// 获取或设置状态变更时间戳。 + /// + [Newtonsoft.Json.JsonProperty("action_time")] + [System.Text.Json.Serialization.JsonPropertyName("action_time")] + public long ActionTimestamp { get; set; } + + /// + /// 获取或设置附加信息。 + /// + [Newtonsoft.Json.JsonProperty("action_msg")] + [System.Text.Json.Serialization.JsonPropertyName("action_msg")] + public string? ActionMessage { get; set; } + + /// + /// 获取或设置骑手信息。 + /// + [Newtonsoft.Json.JsonProperty("agent")] + [System.Text.Json.Serialization.JsonPropertyName("agent")] + public Types.Agent? Agent { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaSecurity/WxaMediaCheckEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaSecurity/WxaMediaCheckEvent.cs new file mode 100644 index 00000000..5a196a60 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaSecurity/WxaMediaCheckEvent.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.wxa_media_check 事件的数据。 + /// https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html + /// https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html + /// + public class WxaMediaCheckEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable + { + /// + /// 获取或设置微信商户号。 + /// + [Newtonsoft.Json.JsonProperty("isrisky")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("isrisky")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool IsRisky { get; set; } + + /// + /// 获取或设置 JSON 格式附加信息。 + /// + [Newtonsoft.Json.JsonProperty("extra_info_json")] + [System.Text.Json.Serialization.JsonPropertyName("extra_info_json")] + public string? JsonExt { get; set; } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("trace_id")] + [System.Text.Json.Serialization.JsonPropertyName("trace_id")] + public string TraceId { get; set; } = default!; + + /// + /// 获取或设置任务状态码。 + /// + [Newtonsoft.Json.JsonProperty("status_code")] + [System.Text.Json.Serialization.JsonPropertyName("status_code")] + public int StatusCode { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientEventExtensions.cs new file mode 100644 index 00000000..d0016662 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientEventExtensions.cs @@ -0,0 +1,44 @@ +using System; +using System.IO; +using System.Xml.Serialization; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + /// + /// 为 提供回调通知事件的扩展方法。 + /// + public static class WechatApiClientEventExtensions + { + /// + /// 从 JSON 反序列化得到 对象。 + /// + /// + /// + /// + public static TEvent DeserializeEventFromJson(this WechatApiClient client, string callbackJson) + where TEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable, new() + { + if (client == null) throw new ArgumentNullException(nameof(client)); + if (string.IsNullOrEmpty(callbackJson)) throw new ArgumentNullException(callbackJson); + + return client.JsonSerializer.Deserialize(callbackJson); + } + + /// + /// 从 XML 反序列化得到 对象。 + /// + /// + /// + /// + public static TEvent DeserializeEventFromXml(this WechatApiClient client, string callbackXml) + where TEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable, new() + { + if (client == null) throw new ArgumentNullException(nameof(client)); + if (string.IsNullOrEmpty(callbackXml)) throw new ArgumentNullException(callbackXml); + + using StringReader reader = new StringReader(callbackXml); + XmlSerializer xmlSerializer = new XmlSerializer(typeof(TEvent), new XmlRootAttribute("xml")); + return (TEvent)xmlSerializer.Deserialize(reader); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCVExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCVExtensions.cs new file mode 100644 index 00000000..b7ce3bdc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCVExtensions.cs @@ -0,0 +1,303 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCVExtensions + { + private static HttpContent CreateRequestHttpContent(byte[]? fileBytes = null) + { + string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x"); + var httpContent = new MultipartFormDataContent(boundary); + + if (fileBytes != null && fileBytes.Any()) + { + string filename = "image.png"; + var fileContent = new ByteArrayContent(fileBytes); + httpContent.Add(fileContent, "\"img\"", "\"" + filename + "\""); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("image/png"); + fileContent.Headers.ContentLength = fileBytes.Length; + } + + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary); + + return httpContent; + } + + #region Image + /// + /// 异步调用 [POST] /cv/img/qrcode 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/Img_Proc.html#%E4%BA%8C%E3%80%81%E4%BA%8C%E7%BB%B4%E7%A0%81-%E6%9D%A1%E7%A0%81%E8%AF%86%E5%88%AB%E6%8E%A5%E5%8F%A3 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/img/img.scanQRCode.html + /// + /// + /// + /// + /// + public static async Task ExecuteCVImageQrcodeAsync(this WechatApiClient client, Models.CVImageQrcodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cv", "img", "qrcode") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + flurlReq.SetQueryParam("img_url", request.ImageUrl); + + using var httpContent = CreateRequestHttpContent(request.ImageFileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cv/img/superresolution 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/Img_Proc.html#%E4%B8%89%E3%80%81%E5%9B%BE%E7%89%87%E9%AB%98%E6%B8%85%E5%8C%96%E6%8E%A5%E5%8F%A3 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/img/img.superresolution.html + /// + /// + /// + /// + /// + public static async Task ExecuteCVImageSuperResolutionAsync(this WechatApiClient client, Models.CVImageSuperResolutionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cv", "img", "superresolution") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + flurlReq.SetQueryParam("img_url", request.ImageUrl); + + using var httpContent = CreateRequestHttpContent(request.ImageFileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cv/img/aicrop 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/Img_Proc.html#%E5%9B%9B%E3%80%81%E5%9B%BE%E7%89%87%E6%99%BA%E8%83%BD%E8%A3%81%E5%89%AA%E6%8E%A5%E5%8F%A3 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/img/img.aiCrop.html + /// + /// + /// + /// + /// + public static async Task ExecuteCVImageAICropAsync(this WechatApiClient client, Models.CVImageAICropRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cv", "img", "aicrop") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + flurlReq.SetQueryParam("img_url", request.ImageUrl); + + using var httpContent = CreateRequestHttpContent(request.ImageFileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + #endregion + + #region OCR + /// + /// 异步调用 [POST] /cv/ocr/idcard 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/OCR.html + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/ocr/ocr.idcard.html + /// + /// + /// + /// + /// + public static async Task ExecuteCVOCRIdCardAsync(this WechatApiClient client, Models.CVOCRIdCardRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cv", "ocr", "idcard") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("type", request.ImageMode); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + flurlReq.SetQueryParam("img_url", request.ImageUrl); + + using var httpContent = CreateRequestHttpContent(request.ImageFileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cv/ocr/bankcard 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/OCR.html + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/ocr/ocr.bankcard.html + /// + /// + /// + /// + /// + public static async Task ExecuteCVOCRBankCardAsync(this WechatApiClient client, Models.CVOCRBankCardRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cv", "ocr", "bankcard") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("type", request.ImageMode); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + flurlReq.SetQueryParam("img_url", request.ImageUrl); + + using var httpContent = CreateRequestHttpContent(request.ImageFileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cv/ocr/driving 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/OCR.html + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/ocr/ocr.vehicleLicense.html + /// + /// + /// + /// + /// + public static async Task ExecuteCVOCRDrivingAsync(this WechatApiClient client, Models.CVOCRDrivingRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cv", "ocr", "driving") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("type", request.ImageMode); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + flurlReq.SetQueryParam("img_url", request.ImageUrl); + + using var httpContent = CreateRequestHttpContent(request.ImageFileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cv/ocr/drivinglicense 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/OCR.html + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/ocr/ocr.driverLicense.html + /// + /// + /// + /// + /// + public static async Task ExecuteCVOCRDrivingLicenseAsync(this WechatApiClient client, Models.CVOCRDrivingLicenseRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cv", "ocr", "drivinglicense") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("type", request.ImageMode); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + flurlReq.SetQueryParam("img_url", request.ImageUrl); + + using var httpContent = CreateRequestHttpContent(request.ImageFileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cv/ocr/bizlicense 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/OCR.html + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/ocr/ocr.businessLicense.html + /// + /// + /// + /// + /// + public static async Task ExecuteCVOCRBusinessLicenseAsync(this WechatApiClient client, Models.CVOCRBusinessLicenseRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cv", "ocr", "bizlicense") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("type", request.ImageMode); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + flurlReq.SetQueryParam("img_url", request.ImageUrl); + + using var httpContent = CreateRequestHttpContent(request.ImageFileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cv/ocr/comm 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/OCR.html + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/ocr/ocr.printedText.html + /// + /// + /// + /// + /// + public static async Task ExecuteCVOCRCommonAsync(this WechatApiClient client, Models.CVOCRCommonRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cv", "ocr", "comm") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + flurlReq.SetQueryParam("img_url", request.ImageUrl); + + using var httpContent = CreateRequestHttpContent(request.ImageFileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cv/ocr/platenum 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/OCR.html + /// + /// + /// + /// + /// + public static async Task ExecuteCVOCRPlateNumberAsync(this WechatApiClient client, Models.CVOCRPlateNumberRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cv", "ocr", "platenum") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + flurlReq.SetQueryParam("img_url", request.ImageUrl); + + using var httpContent = CreateRequestHttpContent(request.ImageFileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCardExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCardExtensions.cs new file mode 100644 index 00000000..71738fdd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCardExtensions.cs @@ -0,0 +1,1097 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCardExtensions + { + /// + /// 异步调用 [POST] /card/create 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Create_a_Coupon_Voucher_or_Card.html#8 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Create_a_membership_card.html#3 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Special_ticket.html#1 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Special_ticket.html#4 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Special_ticket.html#6 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Special_ticket.html#9 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#5 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Third-party_developer_mode.html#7 + /// + /// + /// + /// + /// + public static async Task ExecuteCardCreateAsync(this WechatApiClient client, Models.CardCreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "create") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteCardGetAsync(this WechatApiClient client, Models.CardGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/batchget 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#3 + /// + /// + /// + /// + /// + public static async Task ExecuteCardBatchGetAsync(this WechatApiClient client, Models.CardBatchGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "batchget") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/update 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#4 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#2 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#3 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCardUpdateAsync(this WechatApiClient client, Models.CardUpdateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "update") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/modifystock 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCardModifyStockAsync(this WechatApiClient client, Models.CardModifyStockRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "modifystock") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/delete 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#7 + /// + /// + /// + /// + /// + public static async Task ExecuteCardDeleteAsync(this WechatApiClient client, Models.CardDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "delete") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/paycell/set 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Create_a_Coupon_Voucher_or_Card.html#11 + /// + /// + /// + /// + /// + public static async Task ExecuteCardPayCellSetAsync(this WechatApiClient client, Models.CardPayCellSetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "paycell", "set") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/selfconsumecell/set 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Create_a_Coupon_Voucher_or_Card.html#14 + /// + /// + /// + /// + /// + public static async Task ExecuteCardSelfConsumeCellSetAsync(this WechatApiClient client, Models.CardSelfConsumeCellSetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "selfconsumecell", "set") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/qrcode/create 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Distributing_Coupons_Vouchers_and_Cards.html#0 + /// + /// + /// + /// + /// + public static async Task ExecuteCardQrcodeCreateAsync(this WechatApiClient client, Models.CardQrcodeCreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "qrcode", "create") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/landingpage/create 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Distributing_Coupons_Vouchers_and_Cards.html#3 + /// + /// + /// + /// + /// + public static async Task ExecuteCardLandingPageCreateAsync(this WechatApiClient client, Models.CardLandingPageCreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "landingpage", "create") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/mpnews/gethtml 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Distributing_Coupons_Vouchers_and_Cards.html#6 + /// + /// + /// + /// + /// + public static async Task ExecuteCardMpnewsGetHtmlAsync(this WechatApiClient client, Models.CardMpnewsGetHtmlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "mpnews", "gethtml") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/testwhitelist/set 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Distributing_Coupons_Vouchers_and_Cards.html#12 + /// + /// + /// + /// + /// + public static async Task ExecuteCardTestWhiteListSetAsync(this WechatApiClient client, Models.CardTestWhiteListSetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "testwhitelist", "set") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + #region Code + /// + /// 异步调用 [POST] /card/code/deposit 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Distributing_Coupons_Vouchers_and_Cards.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCardCodeDepositAsync(this WechatApiClient client, Models.CardCodeDepositRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "code", "deposit") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/code/getdepositcount 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Distributing_Coupons_Vouchers_and_Cards.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCardCodeGetDepositCountAsync(this WechatApiClient client, Models.CardCodeGetDepositCountRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "code", "getdepositcount") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/code/checkcode 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Distributing_Coupons_Vouchers_and_Cards.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCardCodeCheckCodeAsync(this WechatApiClient client, Models.CardCodeCheckCodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "code", "checkcode") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/code/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Redeeming_a_coupon_voucher_or_card.html#1 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#0 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons-Mini_Program_Start_Up.html#%E6%8E%A5%E5%8F%A34%EF%BC%9A%E8%8E%B7%E5%8F%96%E7%94%A8%E6%88%B7%E5%BC%80%E5%8D%A1%E6%97%B6%E6%8F%90%E4%BA%A4%E7%9A%84%E4%BF%A1%E6%81%AF%EF%BC%88%E9%9D%9E%E8%B7%B3%E8%BD%AC%E5%9E%8B%E5%BC%80%E5%8D%A1%E7%BB%84%E4%BB%B6%EF%BC%89 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html#_11-4-%E6%9F%A5%E8%AF%A2%E7%A4%BC%E5%93%81%E5%8D%A1%E4%BF%A1%E6%81%AF%E6%8E%A5%E5%8F%A3 + /// + /// + /// + /// + /// + public static async Task ExecuteCardCodeGetAsync(this WechatApiClient client, Models.CardCodeGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "code", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/code/consume 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Redeeming_a_coupon_voucher_or_card.html#2 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardCodeConsumeAsync(this WechatApiClient client, Models.CardCodeConsumeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "code", "consume") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/code/decrypt 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Redeeming_a_coupon_voucher_or_card.html#5 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Invoicing_Platform_API_List.html#8 + /// + /// + /// + /// + /// + public static async Task ExecuteCardCodeDecryptAsync(this WechatApiClient client, Models.CardCodeDecryptRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "code", "decrypt") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/code/update 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#6 + /// + /// + /// + /// + /// + public static async Task ExecuteCardCodeUpdateAsync(this WechatApiClient client, Models.CardCodeUpdateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "code", "update") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/code/unavailable 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#8 + /// + /// + /// + /// + /// + public static async Task ExecuteCardCodeUnavailableAsync(this WechatApiClient client, Models.CardCodeUnavailableRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "code", "unavailable") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region User + /// + /// 异步调用 [POST] /card/user/getcardlist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#1 + /// + /// + /// + /// + /// + public static async Task ExecuteCardUserGetCardListAsync(this WechatApiClient client, Models.CardUserGetCardListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "user", "getcardlist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region MemberCard + /// + /// 异步调用 [POST] /card/membercard/activate/geturl 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons-Mini_Program_Start_Up.html#%E6%8E%A5%E5%8F%A31%EF%BC%9A%E8%8E%B7%E5%8F%96%E5%BC%80%E5%8D%A1%E6%8F%92%E4%BB%B6%E5%8F%82%E6%95%B0 + /// + /// + /// + /// + /// + public static async Task ExecuteCardMemberCardActivateGetUrlAsync(this WechatApiClient client, Models.CardMemberCardActivateGetUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "membercard", "activate", "geturl") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/membercard/activatetempinfo/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons-Mini_Program_Start_Up.html#%E6%8E%A5%E5%8F%A33%EF%BC%9A%E8%8E%B7%E5%8F%96%E7%94%A8%E6%88%B7%E5%BC%80%E5%8D%A1%E6%97%B6%E6%8F%90%E4%BA%A4%E7%9A%84%E4%BF%A1%E6%81%AF%EF%BC%88%E8%B7%B3%E8%BD%AC%E5%9E%8B%E5%BC%80%E5%8D%A1%E7%BB%84%E4%BB%B6%EF%BC%89 + /// + /// + /// + /// + /// + public static async Task ExecuteCardMemberCardActivateTempInfoGetAsync(this WechatApiClient client, Models.CardMemberCardActivateTempInfoGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "membercard", "activatetempinfo", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/membercard/activate 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Coupons-Mini_Program_Start_Up.html#%E6%8E%A5%E5%8F%A35%EF%BC%9A%E6%BF%80%E6%B4%BB%E7%94%A8%E6%88%B7%E9%A2%86%E5%8F%96%E7%9A%84%E4%BC%9A%E5%91%98%E5%8D%A1%EF%BC%88%E8%B7%B3%E8%BD%AC%E5%9E%8B%E5%BC%80%E5%8D%A1%E7%BB%84%E4%BB%B6%EF%BC%89 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Create_a_membership_card.html#15 + /// + /// + /// + /// + /// + public static async Task ExecuteCardMemberCardActivateAsync(this WechatApiClient client, Models.CardMemberCardActivateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "membercard", "activate") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/membercard/activateuserform/set 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Create_a_membership_card.html#16 + /// + /// + /// + /// + /// + public static async Task ExecuteCardMemberCardActivateUserFormSetAsync(this WechatApiClient client, Models.CardMemberCardActivateUserFormSetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "membercard", "activateuserform", "set") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/membercard/updateuser 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Create_a_membership_card.html#18 + /// + /// + /// + /// + /// + public static async Task ExecuteCardMemberCardUpdateUserAsync(this WechatApiClient client, Models.CardMemberCardUpdateUserRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "membercard", "updateuser") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/membercard/userinfo/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#1 + /// + /// + /// + /// + /// + public static async Task ExecuteCardMemberCardUserInfoGetAsync(this WechatApiClient client, Models.CardMemberCardUserInfoGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "membercard", "userinfo", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region SpecialTicket + /// + /// 异步调用 [POST] /card/meetingticket/updateuser 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Special_ticket.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteCardMeetingTicketUpdateUserAsync(this WechatApiClient client, Models.CardMeetingTicketUpdateUserRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "meetingticket", "updateuser") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/movieticket/updateuser 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Special_ticket.html#7 + /// + /// + /// + /// + /// + public static async Task ExecuteCardMovieTicketUpdateUserAsync(this WechatApiClient client, Models.CardMovieTicketUpdateUserRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "movieticket", "updateuser") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/boardingpass/checkin 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Special_ticket.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCardBoardingPassCheckinAsync(this WechatApiClient client, Models.CardBoardingPassCheckinRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "boardingpass", "checkin") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region GiftCard + /// + /// 异步调用 [POST] /card/giftcard/page/add 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardPageAddAsync(this WechatApiClient client, Models.CardGiftCardPageAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "giftcard", "page", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/giftcard/page/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardPageGetAsync(this WechatApiClient client, Models.CardGiftCardPageGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "giftcard", "page", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/giftcard/page/update 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardPageUpdateAsync(this WechatApiClient client, Models.CardGiftCardPageUpdateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "giftcard", "page", "update") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/giftcard/page/batchget 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardPageBatchGetAsync(this WechatApiClient client, Models.CardGiftCardPageBatchGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "giftcard", "page", "batchget") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/giftcard/maintain/set 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardMaintainSetAsync(this WechatApiClient client, Models.CardGiftCardMaintainSetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "giftcard", "maintain", "set") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/giftcard/pay/whitelist/add 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardPayWhiteListAddAsync(this WechatApiClient client, Models.CardGiftCardPayWhiteListAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "giftcard", "pay", "whitelist", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/giftcard/pay/submch/bind 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardPaySubMerchantBindAsync(this WechatApiClient client, Models.CardGiftCardPaySubMerchantBindRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "giftcard", "pay", "submch", "bind") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/giftcard/wxa/set 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardWxaSetAsync(this WechatApiClient client, Models.CardGiftCardWxaSetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "giftcard", "wxa", "set") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/generalcard/updateuser 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardGeneralCardUpdateUserAsync(this WechatApiClient client, Models.CardGeneralCardUpdateUserRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "generalcard", "updateuser") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + #region GiftCardOrder + /// + /// 异步调用 [POST] /card/paygiftcard/order/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardOrderGetAsync(this WechatApiClient client, Models.CardGiftCardOrderGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "paygiftcard", "order", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/paygiftcard/order/batchget 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardOrderBatchGetAsync(this WechatApiClient client, Models.CardGiftCardOrderBatchGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "paygiftcard", "order", "batchget") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/paygiftcard/order/refund 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCardGiftCardOrderRefundAsync(this WechatApiClient client, Models.CardGiftCardOrderRefundRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "paygiftcard", "order", "refund") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + #endregion + + #region PayGiftCard + /// + /// 异步调用 [POST] /card/paygiftcard/add 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCardPayGiftCardAddAsync(this WechatApiClient client, Models.CardPayGiftCardAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "paygiftcard", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/paygiftcard/delete 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCardPayGiftCardDeleteAsync(this WechatApiClient client, Models.CardPayGiftCardDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "paygiftcard", "delete") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/paygiftcard/getbyid 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCardPayGiftCardGetByIdAsync(this WechatApiClient client, Models.CardPayGiftCardGetByIdRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "paygiftcard", "getbyid") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/paygiftcard/batchget 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Membership_Cards/Manage_Member_Card.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCardPayGiftCardBatchGetAsync(this WechatApiClient client, Models.CardPayGiftCardBatchGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "paygiftcard", "batchget") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region SubMerchant + /// + /// 异步调用 [POST] /card/submerchant/submit 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Third-party_developer_mode.html#1 + /// + /// + /// + /// + /// + public static async Task ExecuteCardSubMerchantSubmitAsync(this WechatApiClient client, Models.CardSubMerchantSubmitRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "submerchant", "submit") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /card/getapplyprotocol 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Third-party_developer_mode.html#3 + /// + /// + /// + /// + /// + public static async Task ExecuteCardGetApplyProtocolAsync(this WechatApiClient client, Models.CardGetApplyProtocolRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "card", "getapplyprotocol") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/submerchant/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Third-party_developer_mode.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCardSubMerchantGetAsync(this WechatApiClient client, Models.CardSubMerchantGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "submerchant", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/submerchant/batchget 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Third-party_developer_mode.html#6 + /// + /// + /// + /// + /// + public static async Task ExecuteCardSubMerchantBatchGetAsync(this WechatApiClient client, Models.CardSubMerchantBatchGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "submerchant", "batchget") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCardInvoiceExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCardInvoiceExtensions.cs new file mode 100644 index 00000000..757e4bdf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCardInvoiceExtensions.cs @@ -0,0 +1,584 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCardInvoiceExtensions + { + /// + /// 异步调用 [POST] /card/invoice/getauthurl 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceGetAuthUrlAsync(this WechatApiClient client, Models.CardInvoiceGetAuthUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (!request.Timestamp.HasValue) + request.Timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds(); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "getauthurl") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/getauthdata 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#7 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#2.4 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceGetAuthDataAsync(this WechatApiClient client, Models.CardInvoiceGetAuthDataRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "getauthdata") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/rejectinsert 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#8 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#2.5 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceRejectInsertAsync(this WechatApiClient client, Models.CardInvoiceRejectInsertRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "rejectinsert") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/makeoutinvoice 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#14 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceMakeOutInvoiceAsync(this WechatApiClient client, Models.CardInvoiceMakeOutInvoiceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "makeoutinvoice") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/clearoutinvoice 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#15 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceClearOutInvoiceAsync(this WechatApiClient client, Models.CardInvoiceClearOutInvoiceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "clearoutinvoice") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/queryinvoceinfo 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#16 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceQueryInvoiceInfoAsync(this WechatApiClient client, Models.CardInvoiceQueryInvoiceInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "queryinvoceinfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/seturl 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Invoicing_Platform_API_List.html#1 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#3.1 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceSetUrlAsync(this WechatApiClient client, Models.CardInvoiceSetUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "seturl") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/insert 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Invoicing_Platform_API_List.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceInsertAsync(this WechatApiClient client, Models.CardInvoiceInsertRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + if (request.CardExt != null && string.IsNullOrEmpty(request.CardExt.Nonce)) + request.CardExt.Nonce = Guid.NewGuid().ToString("N"); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "insert") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + #region SetBusinessAttribute + /// + /// 异步调用 [POST] /card/invoice/setbizattr?action=set_pay_mch 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#11 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceSetPayMerchantAsync(this WechatApiClient client, Models.CardInvoiceSetPayMerchantRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "setbizattr") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("action", "set_pay_mch"); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/setbizattr?action=get_pay_mch 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#12 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceGetPayMerchantAsync(this WechatApiClient client, Models.CardInvoiceGetPayMerchantRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "setbizattr") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("action", "get_pay_mch"); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/setbizattr?action=set_contact 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#17 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceSetContactAsync(this WechatApiClient client, Models.CardInvoiceSetContactRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "setbizattr") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("action", "set_contact"); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/setbizattr?action=get_contact 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#18 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceGetContactAsync(this WechatApiClient client, Models.CardInvoiceGetContactRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "setbizattr") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("action", "get_contact"); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/setbizattr?action=set_auth_field 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#9 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceSetAuthFieldAsync(this WechatApiClient client, Models.CardInvoiceSetAuthFieldRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "setbizattr") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("action", "set_auth_field"); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/setbizattr?action=get_auth_field 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/gift_card.html + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#10 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceGetAuthFieldAsync(this WechatApiClient client, Models.CardInvoiceGetAuthFieldRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "setbizattr") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("action", "get_auth_field"); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Platform + /// + /// 异步调用 [POST] /card/invoice/platform/createcard 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Invoicing_Platform_API_List.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoicePlatformCreateCardAsync(this WechatApiClient client, Models.CardInvoicePlatformCreateCardRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "platform", "createcard") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/platform/setpdf 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Invoicing_Platform_API_List.html#3 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#3.3 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoicePlatformSetPdfAsync(this WechatApiClient client, Models.CardInvoicePlatformSetPdfRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "platform", "setpdf") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x"); + string filename = "invoice.pdf"; + var httpContent = new MultipartFormDataContent(boundary); + var fileContent = new ByteArrayContent(request.FileBytes ?? new byte[0]); + httpContent.Add(fileContent, "\"pdf\"", "\"" + filename + "\""); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/pdf"); + fileContent.Headers.ContentLength = request.FileBytes?.Length; + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/platform/getpdf 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Invoicing_Platform_API_List.html#4 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#3.4 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoicePlatformGetPdfAsync(this WechatApiClient client, Models.CardInvoicePlatformGetPdfRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + request.Action = "get_url"; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "platform", "getpdf") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/platform/updatestatus 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Invoicing_Platform_API_List.html#6 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#3.7 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoicePlatformUpdateStatusAsync(this WechatApiClient client, Models.CardInvoicePlatformUpdateStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "platform", "updatestatus") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Reimburse + /// + /// 异步调用 [POST] /card/invoice/reimburse/getinvoiceinfo 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Reimburser_API_List.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceReimburseGetInvoiceInfoAsync(this WechatApiClient client, Models.CardInvoiceReimburseGetInvoiceInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "reimburse", "getinvoiceinfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/reimburse/getinvoicebatch 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Reimburser_API_List.html#6 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceReimburseGetInvoiceBatchAsync(this WechatApiClient client, Models.CardInvoiceReimburseGetInvoiceBatchRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "reimburse", "getinvoicebatch") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/reimburse/updatestatusbatch 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Reimburser_API_List.html#8 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceReimburseUpdateStatusBatchAsync(this WechatApiClient client, Models.CardInvoiceReimburseUpdateStatusBatchRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "reimburse", "updatestatusbatch") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/reimburse/updateinvoicestatus 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Reimburser_API_List.html#7 + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceReimburseUpdateInvoiceStatusAsync(this WechatApiClient client, Models.CardInvoiceReimburseUpdateInvoiceStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "reimburse", "updateinvoicestatus") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Quick + /// + /// 异步调用 [POST] /card/invoice/biz/getusertitleurl 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Quick_issuing/Interface_Instructions.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceBusinessGetUserTitleUrlAsync(this WechatApiClient client, Models.CardInvoiceBusinessGetUserTitleUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "biz", "getusertitleurl") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/biz/getselecttitleurl 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Quick_issuing/Interface_Instructions.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceBusinessGetSelectTitleUrlAsync(this WechatApiClient client, Models.CardInvoiceBusinessGetSelectTitleUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "biz", "getselecttitleurl") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /card/invoice/scantitle 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Quick_issuing/Interface_Instructions.html + /// + /// + /// + /// + /// + public static async Task ExecuteCardInvoiceBusinessScanTitleAsync(this WechatApiClient client, Models.CardInvoiceBusinessScanTitleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "card", "invoice", "scantitle") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinCommentExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinCommentExtensions.cs new file mode 100644 index 00000000..29b70f4e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinCommentExtensions.cs @@ -0,0 +1,184 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinCommentExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/comment/open 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Comments_management/Image_Comments_Management_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinCommentOpenAsync(this WechatApiClient client, Models.CgibinCommentOpenRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "comment", "open") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/comment/close 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Comments_management/Image_Comments_Management_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinCommentCloseAsync(this WechatApiClient client, Models.CgibinCommentCloseRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "comment", "close") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/comment/list 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Comments_management/Image_Comments_Management_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinCommentListAsync(this WechatApiClient client, Models.CgibinCommentListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "comment", "list") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/comment/markelect 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Comments_management/Image_Comments_Management_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinCommentMarkElectAsync(this WechatApiClient client, Models.CgibinCommentMarkElectRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "comment", "markelect") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/comment/unmarkelect 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Comments_management/Image_Comments_Management_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinCommentUnmarkElectAsync(this WechatApiClient client, Models.CgibinCommentUnmarkElectRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "comment", "unmarkelect") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/comment/delete 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Comments_management/Image_Comments_Management_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinCommentDeleteAsync(this WechatApiClient client, Models.CgibinCommentDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "comment", "delete") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + #region Reply + /// + /// 异步调用 [POST] /cgi-bin/comment/reply/add 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Comments_management/Image_Comments_Management_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinCommentReplyAddAsync(this WechatApiClient client, Models.CgibinCommentReplyAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "comment", "reply", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/comment/reply/delete 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Comments_management/Image_Comments_Management_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinCommentReplyDeleteAsync(this WechatApiClient client, Models.CgibinCommentReplyDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "comment", "reply", "delete") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinComponentExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinComponentExtensions.cs new file mode 100644 index 00000000..a2467264 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinComponentExtensions.cs @@ -0,0 +1,234 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinComponentExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/component/api_start_push_ticket 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/component_verify_ticket_service.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinComponentApiStartPushTicketAsync(this WechatApiClient client, Models.CgibinComponentApiStartPushTicketRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ComponentAppId)) + request.ComponentAppId = client.AppId; + + if (string.IsNullOrEmpty(request.ComponentSecret)) + request.ComponentSecret = client.AppSecret; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "component", "api_start_push_ticket") + .SetOptions(request); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/component/api_component_token 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/component_access_token.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinComponentApiComponentTokenAsync(this WechatApiClient client, Models.CgibinComponentApiComponentTokenRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ComponentAppId)) + request.ComponentAppId = client.AppId; + + if (string.IsNullOrEmpty(request.ComponentSecret)) + request.ComponentSecret = client.AppSecret; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "component", "api_component_token") + .SetOptions(request); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/component/api_create_preauthcode 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/pre_auth_code.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinComponentApiCreatePreAuthCodeAsync(this WechatApiClient client, Models.CgibinComponentApiCreatePreAuthCodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ComponentAppId)) + request.ComponentAppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "component", "api_create_preauthcode") + .SetOptions(request) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/component/api_query_auth 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/authorization_info.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinComponentApiQueryAuthAsync(this WechatApiClient client, Models.CgibinComponentApiQueryAuthRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ComponentAppId)) + request.ComponentAppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "component", "api_query_auth") + .SetOptions(request) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/component/api_authorizer_token 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/api_authorizer_token.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinComponentApiAuthorizerTokenAsync(this WechatApiClient client, Models.CgibinComponentApiAuthorizerTokenRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ComponentAppId)) + request.ComponentAppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "component", "api_authorizer_token") + .SetOptions(request) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/component/api_get_authorizer_info 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/api_get_authorizer_info.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinComponentApiGetAuthorizerInfoAsync(this WechatApiClient client, Models.CgibinComponentApiGetAuthorizerInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ComponentAppId)) + request.ComponentAppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "component", "api_get_authorizer_info") + .SetOptions(request) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/component/api_get_authorizer_list 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/Account_Authorization/api_get_authorizer_list.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinComponentApiGetAuthorizerListAsync(this WechatApiClient client, Models.CgibinComponentApiGetAuthorizerListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ComponentAppId)) + request.ComponentAppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "component", "api_get_authorizer_list") + .SetOptions(request) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/component/api_get_authorizer_option 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/Account_Authorization/api_get_authorizer_option.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinComponentApiGetAuthorizerOptionAsync(this WechatApiClient client, Models.CgibinComponentApiGetAuthorizerOptionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ComponentAppId)) + request.ComponentAppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "component", "api_get_authorizer_option") + .SetOptions(request) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/component/api_set_authorizer_option 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/Account_Authorization/api_set_authorizer_option.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinComponentApiSetAuthorizerOptionAsync(this WechatApiClient client, Models.CgibinComponentApiSetAuthorizerOptionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ComponentAppId)) + request.ComponentAppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "component", "api_set_authorizer_option") + .SetOptions(request) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinCustomServiceExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinCustomServiceExtensions.cs new file mode 100644 index 00000000..12b26d92 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinCustomServiceExtensions.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinCustomServiceExtensions + { + /// + /// 异步调用 [GET] /cgi-bin/customservice/getkflist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html#5 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html#0 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinCustomServiceGetKfListAsync(this WechatApiClient client, Models.CgibinCustomServiceGetKfListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "customservice", "getkflist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/customservice/getonlinekflist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html#0 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinCustomServiceGetOnlineKfListAsync(this WechatApiClient client, Models.CgibinCustomServiceGetOnlineKfListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "customservice", "getonlinekflist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExpressExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExpressExtensions.cs new file mode 100644 index 00000000..1a5d08fa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExpressExtensions.cs @@ -0,0 +1,713 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinExpressExtensions + { + private static T InitRequest(WechatApiClient client, ref T request) + where T : Models.CgibinExpressLocalBusinessRequestBase, new() + { + if (client == null) throw new ArgumentNullException(nameof(request)); + if (client == null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ShopId)) + { + request.ShopId = client.ImmeDeliveryAppKey; + } + + if (string.IsNullOrEmpty(request.DeliverySignature)) + { + string plainText = $"{request.ShopId}{request.ShopOrderId}{client.ImmeDeliveryAppSecret}"; + request.DeliverySignature = Utilities.Sha1Util.Hash(plainText).ToLower(); + } + + 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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "pre_add") + .SetOptions(request) + .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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "add") + .SetOptions(request) + .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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "readd") + .SetOptions(request) + .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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "addtips") + .SetOptions(request) + .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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "get") + .SetOptions(request) + .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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "precancel") + .SetOptions(request) + .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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "cancel") + .SetOptions(request) + .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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "order", "confirm_return") + .SetOptions(request) + .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(HttpMethod.Post, "cgi-bin", "express", "local", "business", "delivery", "getall") + .SetOptions(request) + .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(HttpMethod.Post, "cgi-bin", "express", "local", "business", "shop", "add") + .SetOptions(request) + .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(HttpMethod.Post, "cgi-bin", "express", "local", "business", "shop", "get") + .SetOptions(request) + .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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "test_update_order") + .SetOptions(request) + .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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "realmock_update_order") + .SetOptions(request) + .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(HttpMethod.Post, "cgi-bin", "express", "local", "business", "open") + .SetOptions(request) + .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)); + + InitRequest(client, ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "local", "business", "update_order") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Business + /// + /// 异步调用 [POST] /cgi-bin/express/business/order/add 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.addOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessOrderAddAsync(this WechatApiClient client, Models.CgibinExpressBusinessOrderAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "business", "order", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/business/order/get 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.getOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessOrderGetAsync(this WechatApiClient client, Models.CgibinExpressBusinessOrderGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "business", "order", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/business/order/batchget 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.batchGetOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessOrderBatchGetAsync(this WechatApiClient client, Models.CgibinExpressBusinessOrderBatchGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "business", "order", "batchget") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/business/order/cancel 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.cancelOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessOrderCancelAsync(this WechatApiClient client, Models.CgibinExpressBusinessOrderCancelRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "business", "order", "cancel") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/business/path/get 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.getPath.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessPathGetAsync(this WechatApiClient client, Models.CgibinExpressBusinessPathGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "business", "path", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/express/business/delivery/getall 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.getAllDelivery.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessDeliveryGetAllAsync(this WechatApiClient client, Models.CgibinExpressBusinessDeliveryGetAllRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "express", "business", "delivery", "getall") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/express/business/account/getall 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.getAllAccount.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessAccountGetAllAsync(this WechatApiClient client, Models.CgibinExpressBusinessAccountGetAllRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "express", "business", "account", "getall") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/business/account/bind 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.bindAccount.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessAccountBindAsync(this WechatApiClient client, Models.CgibinExpressBusinessAccountBindRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "business", "account", "bind") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/express/business/printer/getall 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.getPrinter.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessPrinterGetAllAsync(this WechatApiClient client, Models.CgibinExpressBusinessPrinterGetAllRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "express", "business", "printer", "getall") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/business/printer/update 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.updatePrinter.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessPrinterUpdateAsync(this WechatApiClient client, Models.CgibinExpressBusinessPrinterUpdateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "business", "printer", "update") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/business/quota/get 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.getQuota.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessQuotaGetAsync(this WechatApiClient client, Models.CgibinExpressBusinessQuotaGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "business", "quota", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/business/test_update_order 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-business/logistics.testUpdateOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressBusinessTestUpdateOrderAsync(this WechatApiClient client, Models.CgibinExpressBusinessTestUpdateOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "business", "test_update_order") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Delivery + /// + /// 异步调用 [POST] /cgi-bin/express/delivery/contact/get 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.getContact.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressDeliveryContactGetAsync(this WechatApiClient client, Models.CgibinExpressDeliveryContactGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "delivery", "contact", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/delivery/template/preview 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.previewTemplate.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressDeliveryTemplatePreviewAsync(this WechatApiClient client, Models.CgibinExpressDeliveryTemplatePreviewRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "delivery", "template", "preview") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/delivery/service/business/update 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.updateBusiness.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressDeliveryServiceBusinessUpdateAsync(this WechatApiClient client, Models.CgibinExpressDeliveryServiceBusinessUpdateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "delivery", "service", "business", "update") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/express/delivery/path/update 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.updatePath.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinExpressDeliveryPathUpdateAsync(this WechatApiClient client, Models.CgibinExpressDeliveryPathUpdateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "express", "delivery", "path", "update") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExtensions.cs index 69677779..948d9f6a 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinExtensions.cs @@ -39,6 +39,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// /// 异步调用 [GET] /cgi-bin/ticket/getticket 接口。 /// REF: https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#54 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#1 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#2.1 /// /// /// @@ -99,5 +101,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); } + + /// + /// 异步调用 [POST] /cgi-bin/clear_quota 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/API_Call_Limits.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinClearQuotaAsync(this WechatApiClient client, Models.CgibinClearQuotaRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "clear_quota") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinGuideExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinGuideExtensions.cs new file mode 100644 index 00000000..ba4d5bb6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinGuideExtensions.cs @@ -0,0 +1,1045 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinGuideExtensions + { + #region Account + /// + /// 异步调用 [POST] /cgi-bin/guide/addguideacct 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.addGuideAcct.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideAddGuideAccountAsync(this WechatApiClient client, Models.CgibinGuideAddGuideAccountRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "addguideacct") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/guide/getguideacct 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.getGuideAcct.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideAccountAsync(this WechatApiClient client, Models.CgibinGuideGetGuideAccountRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "guide", "getguideacct") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + if (!string.IsNullOrEmpty(request.GuideAccount)) + flurlReq.SetQueryParam("guide_account", request.GuideAccount); + else if (!string.IsNullOrEmpty(request.GuideOpenId)) + flurlReq.SetQueryParam("guide_openid", request.GuideOpenId); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/updateguideacct 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.updateGuideAcct.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideUpdateGuideAccountAsync(this WechatApiClient client, Models.CgibinGuideUpdateGuideAccountRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "updateguideacct") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/delguideacct 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.delGuideAcct.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideDeleteGuideAccountAsync(this WechatApiClient client, Models.CgibinGuideDeleteGuideAccountRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "delguideacct") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Qrcode + /// + /// 异步调用 [POST] /cgi-bin/guide/guidecreateqrcode 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.guideCreateQrCode.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideCreateQrcodeAsync(this WechatApiClient client, Models.CgibinGuideCreateQrcodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "guidecreateqrcode") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Config + /// + /// 异步调用 [POST] /cgi-bin/guide/setguideconfig 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.setGuideConfig.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideSetGuideConfigAsync(this WechatApiClient client, Models.CgibinGuideSetGuideConfigRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "setguideconfig") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguideconfig 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.getGuideConfig.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideConfigAsync(this WechatApiClient client, Models.CgibinGuideGetGuideConfigRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguideconfig") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/setguideacctconfig 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.setGuideAcctConfig.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideSetGuideAccountConfigAsync(this WechatApiClient client, Models.CgibinGuideSetGuideAccountConfigRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "setguideacctconfig") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguideacctconfig 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.getGuideAcctConfig.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideAccountConfigAsync(this WechatApiClient client, Models.CgibinGuideGetGuideAccountConfigRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguideacctconfig") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Group + /// + /// 异步调用 [POST] /cgi-bin/guide/newguidegroup 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.newGuideGroup.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideNewGuideGroupAsync(this WechatApiClient client, Models.CgibinGuideNewGuideGroupRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "newguidegroup") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidegrouplist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.getGuideGroupList.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideGroupListAsync(this WechatApiClient client, Models.CgibinGuideGetGuideGroupListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidegrouplist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getgroupinfo 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.getGroupInfo.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGroupInfoAsync(this WechatApiClient client, Models.CgibinGuideGetGroupInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getgroupinfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/addguide2guidegroup 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.addGuide2GuideGroup.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideAddGuide2GuideGroupAsync(this WechatApiClient client, Models.CgibinGuideAddGuide2GuideGroupRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "addguide2guidegroup") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/delguide2guidegroup 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.delGuide2GuideGroup.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideDeleteGuide2GuideGroupAsync(this WechatApiClient client, Models.CgibinGuideDeleteGuide2GuideGroupRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "delguide2guidegroup") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getgroupbyguide 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.getGroupByGuide.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGroupByGuideAsync(this WechatApiClient client, Models.CgibinGuideGetGroupByGuideRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getgroupbyguide") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/delguidegroup 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.delGuideGroup.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideDeleteGuideGroupAsync(this WechatApiClient client, Models.CgibinGuideDeleteGuideGroupRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "delguidegroup") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region BuyerRelation + /// + /// 异步调用 [POST] /cgi-bin/guide/addguidebuyerrelation 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.addGuideBuyerRelation.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideAddGuideBuyerRelationAsync(this WechatApiClient client, Models.CgibinGuideAddGuideBuyerRelationRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "addguidebuyerrelation") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/delguidebuyerrelation 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.delGuideBuyerRelation.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideDeleteGuideBuyerRelationAsync(this WechatApiClient client, Models.CgibinGuideDeleteGuideBuyerRelationRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "delguidebuyerrelation") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidebuyerrelationlist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.getGuideBuyerRelationList.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideBuyerRelationListAsync(this WechatApiClient client, Models.CgibinGuideGetGuideBuyerRelationListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidebuyerrelationlist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/rebindguideacctforbuyer 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.rebindGuideAcctForBuyer.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideRebindGuideAccountForBuyerAsync(this WechatApiClient client, Models.CgibinGuideRebindGuideAccountForBuyerRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "rebindguideacctforbuyer") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/updateguidebuyerrelation 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.updateGuideBuyerRelation.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideUpdateGuideBuyerRelationAsync(this WechatApiClient client, Models.CgibinGuideUpdateGuideBuyerRelationRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "updateguidebuyerrelation") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidebuyerrelationbybuyer 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.getGuideBuyerRelationByBuyer.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideBuyerRelationByBuyerAsync(this WechatApiClient client, Models.CgibinGuideGetGuideBuyerRelationByBuyerRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidebuyerrelationbybuyer") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidebuyerrelation 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/buyer-account/shopping-guide.getGuideBuyerRelation.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideBuyerRelationAsync(this WechatApiClient client, Models.CgibinGuideGetGuideBuyerRelationRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidebuyerrelation") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region BuyerChatRecord + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidebuyerchatrecord 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/guide-account/shopping-guide.getGuideBuyerChatRecord.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideBuyerChatRecordAsync(this WechatApiClient client, Models.CgibinGuideGetGuideBuyerChatRecordRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidebuyerchatrecord") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Tag + /// + /// 异步调用 [POST] /cgi-bin/guide/newguidetagoption 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/tag-account/shopping-guide.newGuideTagOption.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideNewGuideTagOptionAsync(this WechatApiClient client, Models.CgibinGuideNewGuideTagOptionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "newguidetagoption") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/delguidetagoption 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/tag-account/shopping-guide.delguidetagoption.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideDeleteGuideTagOptionAsync(this WechatApiClient client, Models.CgibinGuideDeleteGuideTagOptionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "delguidetagoption") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/addguidetagoption 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/tag-account/shopping-guide.addGuideTagOption.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideAddGuideTagOptionAsync(this WechatApiClient client, Models.CgibinGuideAddGuideTagOptionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "addguidetagoption") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidetagoption 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/tag-account/shopping-guide.getGuideTagOption.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideTagOptionAsync(this WechatApiClient client, Models.CgibinGuideGetGuideTagOptionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidetagoption") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/addguidebuyertag 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/tag-account/shopping-guide.addGuideBuyerTag.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideAddGuideBuyerTagAsync(this WechatApiClient client, Models.CgibinGuideAddGuideBuyerTagRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "addguidebuyertag") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidebuyertag 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/tag-account/shopping-guide.getGuideBuyerTag.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideBuyerTagAsync(this WechatApiClient client, Models.CgibinGuideGetGuideBuyerTagRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidebuyertag") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/queryguidebuyerbytag 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/tag-account/shopping-guide.queryGuideBuyerByTag.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideQueryGuideBuyerByTagAsync(this WechatApiClient client, Models.CgibinGuideQueryGuideBuyerByTagRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "queryguidebuyerbytag") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/delguidebuyertag 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/tag-account/shopping-guide.delGuideBuyerTag.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideDeleteGuideBuyerTagAsync(this WechatApiClient client, Models.CgibinGuideDeleteGuideBuyerTagRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "delguidebuyertag") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/addguidebuyerdisplaytag 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/tag-account/shopping-guide.addGuideBuyerDisplayTag.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideAddGuideBuyerDisplayTagAsync(this WechatApiClient client, Models.CgibinGuideAddGuideBuyerDisplayTagRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "addguidebuyerdisplaytag") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidebuyerdisplaytag 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/tag-account/shopping-guide.getGuideBuyerDisplayTag.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideBuyerDisplayTagAsync(this WechatApiClient client, Models.CgibinGuideGetGuideBuyerDisplayTagRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidebuyerdisplaytag") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Material + /// + /// 异步调用 [POST] /cgi-bin/guide/setguidecardmaterial 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/model-account/shopping-guide.setGuideCardMaterial.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideSetGuideCardMaterialAsync(this WechatApiClient client, Models.CgibinGuideSetGuideCardMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "setguidecardmaterial") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidecardmaterial 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/model-account/shopping-guide.getGuideCardMaterial.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideCardMaterialAsync(this WechatApiClient client, Models.CgibinGuideGetGuideCardMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidecardmaterial") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/delguidecardmaterial 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/model-account/shopping-guide.delGuideCardMaterial.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideDeleteGuideCardMaterialAsync(this WechatApiClient client, Models.CgibinGuideDeleteGuideCardMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "delguidecardmaterial") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/setguideimagematerial 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/model-account/shopping-guide.setGuideImageMaterial.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideSetGuideImageMaterialAsync(this WechatApiClient client, Models.CgibinGuideSetGuideImageMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "setguideimagematerial") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguideimagematerial 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/model-account/shopping-guide.getGuideImageMaterial.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideImageMaterialAsync(this WechatApiClient client, Models.CgibinGuideGetGuideImageMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguideimagematerial") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/delguideimagematerial 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/model-account/shopping-guide.delGuideImageMaterial.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideDeleteGuideImageMaterialAsync(this WechatApiClient client, Models.CgibinGuideDeleteGuideImageMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "delguideimagematerial") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/setguidewordmaterial 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/model-account/shopping-guide.setGuideWordMaterial.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideSetGuideWordMaterialAsync(this WechatApiClient client, Models.CgibinGuideSetGuideWordMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "setguidewordmaterial") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidewordmaterial 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/model-account/shopping-guide.getGuideWordMaterial.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideWordMaterialAsync(this WechatApiClient client, Models.CgibinGuideGetGuideWordMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidewordmaterial") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/delguidewordmaterial 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/model-account/shopping-guide.delGuideWordMaterial.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideDeleteGuideWordMaterialAsync(this WechatApiClient client, Models.CgibinGuideDeleteGuideWordMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "delguidewordmaterial") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region MassSendJob + /// + /// 异步调用 [POST] /cgi-bin/guide/addguidemassendjob 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/task-account/shopping-guide.addGuideMassendJob.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideAddGuideMassSendJobAsync(this WechatApiClient client, Models.CgibinGuideAddGuideMassSendJobRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "addguidemassendjob") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidemassendjoblist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/task-account/shopping-guide.getGuideMassendJobList.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideMassSendJobListAsync(this WechatApiClient client, Models.CgibinGuideGetGuideMassSendJobListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidemassendjoblist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/getguidemassendjob 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/task-account/shopping-guide.getGuideMassendJob.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideGetGuideMassSendJobAsync(this WechatApiClient client, Models.CgibinGuideGetGuideMassSendJobRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "getguidemassendjob") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/updateguidemassendjob 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/task-account/shopping-guide.updateGuideMassendJob.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideUpdateGuideMassSendJobAsync(this WechatApiClient client, Models.CgibinGuideUpdateGuideMassSendJobRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "updateguidemassendjob") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/guide/cancelguidemassendjob 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Shopping_Guide/task-account/shopping-guide.cancelGuideMassendJob.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGuideCancelGuideMassSendJobAsync(this WechatApiClient client, Models.CgibinGuideCancelGuideMassSendJobRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "guide", "cancelguidemassendjob") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMaterialExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMaterialExtensions.cs new file mode 100644 index 00000000..0345d87e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMaterialExtensions.cs @@ -0,0 +1,254 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinMaterialExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/material/add_news 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html#%E6%96%B0%E5%A2%9E%E6%B0%B8%E4%B9%85%E5%9B%BE%E6%96%87%E7%B4%A0%E6%9D%90 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMaterialAddNewsAsync(this WechatApiClient client, Models.CgibinMaterialAddNewsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "material", "add_news") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/material/add_material 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html#%E6%96%B0%E5%A2%9E%E5%85%B6%E4%BB%96%E7%B1%BB%E5%9E%8B%E6%B0%B8%E4%B9%85%E7%B4%A0%E6%9D%90 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMaterialAddMaterialAsync(this WechatApiClient client, Models.CgibinMaterialAddMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.FileName)) + { + string ext = ""; + if ("image".Equals(request.Type)) + ext = ".png"; + else if ("thumb".Equals(request.Type)) + ext = ".jpg"; + else if ("voice".Equals(request.Type)) + ext = ".mp3"; + else if ("video".Equals(request.Type)) + ext = ".mp4"; + + request.FileName = Guid.NewGuid().ToString("N").ToLower() + ext; + } + + if (string.IsNullOrEmpty(request.FileContentType)) + { + if (request.FileName!.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "image/jpeg"; + else if (request.FileName!.EndsWith(".jpeg", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "image/jpeg"; + else if (request.FileName!.EndsWith(".png", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "image/png"; + else if (request.FileName!.EndsWith(".gif", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "image/gif"; + else if (request.FileName!.EndsWith(".mp3", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "audio/mpeg"; + else if (request.FileName!.EndsWith(".amr", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "audio/amr"; + else if (request.FileName!.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "video/mp4"; + else + request.FileContentType = "application/octet-stream"; + } + + string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x"); + using var fileContent = new ByteArrayContent(request.FileBytes ?? new byte[0]); + using var descContent = new ByteArrayContent(Encoding.UTF8.GetBytes(client.JsonSerializer.Serialize(request))); + using var httpContent = new MultipartFormDataContent(boundary); + httpContent.Add(fileContent, "\"media\"", "\"" + request.FileName + "\""); + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse(request.FileContentType); + fileContent.Headers.ContentLength = request.FileBytes?.Length ?? 0; + + if ("video".Equals(request.Type)) + { + httpContent.Add(descContent, "\"description\""); + } + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "material", "add_material") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("type", request.Type); + + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/material/get_material 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Getting_Permanent_Assets.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMaterialGetMaterialAsync(this WechatApiClient client, Models.CgibinMaterialGetMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "material", "get_material") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/material/get_material 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Getting_Permanent_Assets.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMaterialGetMaterialAsNewsAsync(this WechatApiClient client, Models.CgibinMaterialGetMaterialAsNewsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "material", "get_material") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/material/get_material 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Getting_Permanent_Assets.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMaterialGetMaterialAsVideoAsync(this WechatApiClient client, Models.CgibinMaterialGetMaterialAsVideoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "material", "get_material") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/material/del_material 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Deleting_Permanent_Assets.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMaterialDeleteMaterialAsync(this WechatApiClient client, Models.CgibinMaterialDeleteMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "material", "del_material") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/material/update_news 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Editing_Permanent_Rich_Media_Assets.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMaterialUpdateNewsAsync(this WechatApiClient client, Models.CgibinMaterialUpdateNewsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "material", "update_news") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/material/get_materialcount 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Get_the_total_of_all_materials.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMaterialGetMaterialCountAsync(this WechatApiClient client, Models.CgibinMaterialGetMaterialCountRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "material", "get_materialcount") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/material/batchget_material 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Get_materials_list.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMaterialBatchGetMaterialAsync(this WechatApiClient client, Models.CgibinMaterialBatchGetMaterialRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "material", "batchget_material") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMediaExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMediaExtensions.cs new file mode 100644 index 00000000..cc14884a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMediaExtensions.cs @@ -0,0 +1,290 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinMediaExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/media/upload 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.html + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/customer-message/customerServiceMessage.uploadTempMedia.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMediaUploadAsync(this WechatApiClient client, Models.CgibinMediaUploadRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.FileName)) + { + string ext = ""; + if ("image".Equals(request.Type)) + ext = ".png"; + else if ("thumb".Equals(request.Type)) + ext = ".jpg"; + else if ("voice".Equals(request.Type)) + ext = ".mp3"; + else if ("video".Equals(request.Type)) + ext = ".mp4"; + + request.FileName = Guid.NewGuid().ToString("N").ToLower() + ext; + } + + if (string.IsNullOrEmpty(request.FileContentType)) + { + if (request.FileName!.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "image/jpeg"; + else if (request.FileName!.EndsWith(".jpeg", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "image/jpeg"; + else if (request.FileName!.EndsWith(".png", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "image/png"; + else if (request.FileName!.EndsWith(".gif", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "image/gif"; + else if (request.FileName!.EndsWith(".mp3", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "audio/mpeg"; + else if (request.FileName!.EndsWith(".amr", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "audio/amr"; + else if (request.FileName!.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "video/mp4"; + else + request.FileContentType = "application/octet-stream"; + } + + string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x"); + using var fileContent = new ByteArrayContent(request.FileBytes ?? new byte[0]); + using var httpContent = new MultipartFormDataContent(boundary); + httpContent.Add(fileContent, "\"media\"", "\"" + request.FileName + "\""); + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse(request.FileContentType); + fileContent.Headers.ContentLength = request.FileBytes?.Length ?? 0; + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "media", "upload") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("type", request.Type); + + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/media/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Get_temporary_materials.html + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/customer-message/customerServiceMessage.getTempMedia.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMediaGetAsync(this WechatApiClient client, Models.CgibinMediaGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "media", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("media_id", request.MediaId); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/media/uploadimg 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#0 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html#%E4%B8%8A%E4%BC%A0%E5%9B%BE%E6%96%87%E6%B6%88%E6%81%AF%E5%86%85%E7%9A%84%E5%9B%BE%E7%89%87%E8%8E%B7%E5%8F%96URL + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Create_a_Coupon_Voucher_or_Card.html#4 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Stores/WeChat_Store_Interface.html#6 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMediaUploadImageAsync(this WechatApiClient client, Models.CgibinMediaUploadImageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.FileName)) + request.FileName = Guid.NewGuid().ToString("N").ToLower() + ".png"; + + if (string.IsNullOrEmpty(request.FileContentType)) + { + if (request.FileName!.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "image/jpeg"; + else if (request.FileName!.EndsWith(".jpeg", StringComparison.OrdinalIgnoreCase)) + request.FileContentType = "image/jpeg"; + else + request.FileContentType = "image/png"; + } + + string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x"); + using var fileContent = new ByteArrayContent(request.FileBytes ?? new byte[0]); + using var httpContent = new MultipartFormDataContent(boundary); + httpContent.Add(fileContent, "\"media\"", "\"" + request.FileName + "\""); + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse(request.FileContentType); + fileContent.Headers.ContentLength = request.FileBytes?.Length ?? 0; + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "media", "uploadimg") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/media/uploadnews 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#1 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMediaUploadNewsAsync(this WechatApiClient client, Models.CgibinMediaUploadNewsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "media", "uploadnews") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/media/uploadvideo 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#3 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMediaUploadVideoAsync(this WechatApiClient client, Models.CgibinMediaUploadVideoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "media", "uploadvideo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + #region Voice + /// + /// 异步调用 [POST] /cgi-bin/media/voice/addvoicetorecofortext 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/AI_Open_API.html#%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3%E2%80%94%E2%80%94%E6%8F%90%E4%BA%A4%E8%AF%AD%E9%9F%B3 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMediaVoiceAddVoiceToRecognitionForTextAsync(this WechatApiClient client, Models.CgibinMediaVoiceAddVoiceToRecognitionForTextRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "media", "voice", "addvoicetorecofortext") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("format", request.Format) + .SetQueryParam("voice_id", request.VoiceId) + .SetQueryParam("lang", request.Language); + + using var httpContent = new ByteArrayContent(request.VoiceBytes); + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("audio/mp3"); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/media/voice/queryrecoresultfortext 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/AI_Open_API.html#%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3%E2%80%94%E2%80%94%E8%8E%B7%E5%8F%96%E8%AF%AD%E9%9F%B3%E8%AF%86%E5%88%AB%E7%BB%93%E6%9E%9C + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMediaVoiceQueryRecognitionResultForTextAsync(this WechatApiClient client, Models.CgibinMediaVoiceQueryRecognitionResultForTextRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "media", "voice", "queryrecoresultfortext") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("voice_id", request.VoiceId) + .SetQueryParam("lang", request.Language); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/media/voice/translatecontent 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/AI_Open_API.html#%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3%E2%80%94%E2%80%94%E5%BE%AE%E4%BF%A1%E7%BF%BB%E8%AF%91 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMediaVoiceTranslateContentAsync(this WechatApiClient client, Models.CgibinMediaVoiceTranslateContentRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "media", "voice", "translatecontent") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("lfrom", request.FromLanguage) + .SetQueryParam("lto", request.ToLanguage); + + using var httpContent = new ByteArrayContent(request.VoiceBytes); + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("audio/mp3"); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + #endregion + + #region Operation + /// + /// 异步调用 [GET] /cgi-bin/media/getfeedbackmedia 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/operation/operation.getFeedbackmedia.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMediaGetFeedbackMediaAsync(this WechatApiClient client, Models.CgibinMediaGetFeedbackMediaRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "media", "getfeedbackmedia") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("record_id", request.RecordId) + .SetQueryParam("media_id", request.MediaId); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMenuExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMenuExtensions.cs new file mode 100644 index 00000000..55ca62fb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMenuExtensions.cs @@ -0,0 +1,163 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinMenuExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/menu/create 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Creating_Custom-Defined_Menu.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMenuCreateAsync(this WechatApiClient client, Models.CgibinMenuCreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "menu", "create") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/get_current_selfmenu_info 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Querying_Custom_Menus.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinGetCurrentSelfMenuInfoAsync(this WechatApiClient client, Models.CgibinGetCurrentSelfMenuInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "get_current_selfmenu_info") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/menu/delete 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Deleting_Custom-Defined_Menu.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMenuDeleteAsync(this WechatApiClient client, Models.CgibinMenuDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "menu", "delete") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/menu/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Getting_Custom_Menu_Configurations.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMenuGetAsync(this WechatApiClient client, Models.CgibinMenuGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "menu", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + #region Conditional + /// + /// 异步调用 [POST] /cgi-bin/menu/addconditional 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Personalized_menu_interface.html#0 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMenuAddConditionalAsync(this WechatApiClient client, Models.CgibinMenuAddConditionalRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "menu", "addconditional") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/menu/delconditional 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Personalized_menu_interface.html#1 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMenuDeleteConditionalAsync(this WechatApiClient client, Models.CgibinMenuDeleteConditionalRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "menu", "delconditional") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/menu/trymatch 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Personalized_menu_interface.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMenuTryMatchAsync(this WechatApiClient client, Models.CgibinMenuTryMatchRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "menu", "trymatch") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageCustomExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageCustomExtensions.cs new file mode 100644 index 00000000..774f87da --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageCustomExtensions.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinMessageCustomExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/message/custom/send 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html#7 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/customer-message/customerServiceMessage.send.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageCustomSendAsync(this WechatApiClient client, Models.CgibinMessageCustomSendRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "custom", "send") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/message/custom/typing 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html#8 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/customer-message/customerServiceMessage.setTyping.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageCustomTypingAsync(this WechatApiClient client, Models.CgibinMessageCustomTypingRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "custom", "typing") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageMassExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageMassExtensions.cs new file mode 100644 index 00000000..472e452e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageMassExtensions.cs @@ -0,0 +1,164 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinMessageMassExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/message/mass/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#6 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageMassGetAsync(this WechatApiClient client, Models.CgibinMessageMassGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "mass", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/message/mass/sendall 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageMassSendAllAsync(this WechatApiClient client, Models.CgibinMessageMassSendAllRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "mass", "sendall") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/message/mass/send 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#3 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageMassSendAsync(this WechatApiClient client, Models.CgibinMessageMassSendRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "mass", "send") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/message/mass/preview 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageMassPreviewAsync(this WechatApiClient client, Models.CgibinMessageMassPreviewRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "mass", "preview") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/message/mass/delete 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageMassDeleteAsync(this WechatApiClient client, Models.CgibinMessageMassDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "mass", "delete") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + #region Speed + /// + /// 异步调用 [GET] /cgi-bin/message/mass/speed/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#9 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageMassSpeedGetAsync(this WechatApiClient client, Models.CgibinMessageMassSpeedGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "message", "mass", "speed", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/message/mass/speed/set 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#9 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageMassSpeedSetAsync(this WechatApiClient client, Models.CgibinMessageMassSpeedSetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "mass", "speed", "set") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageSubscribeExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageSubscribeExtensions.cs new file mode 100644 index 00000000..72cfec09 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageSubscribeExtensions.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinMessageSubscribeExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/message/subscribe/bizsend 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html#send%E5%8F%91%E9%80%81%E8%AE%A2%E9%98%85%E9%80%9A%E7%9F%A5 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.send.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/subscribe-message/subscribeMessage.send.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageSubscribeBusinessSendAsync(this WechatApiClient client, Models.CgibinMessageSubscribeBusinessSendRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "subscribe", "bizsend") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageTemplateExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageTemplateExtensions.cs new file mode 100644 index 00000000..e700b6f7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageTemplateExtensions.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinMessageTemplateExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/message/template/send 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Template_Message_Interface.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageTemplateSendAsync(this WechatApiClient client, Models.CgibinMessageTemplateSendRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "template", "send") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageTemplateSubscribeExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageTemplateSubscribeExtensions.cs new file mode 100644 index 00000000..36b96e2b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageTemplateSubscribeExtensions.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinMessageTemplateSubscribeExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/message/template/subscribe 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/One-time_subscription_info.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Mobile_App/One-time_subscription_info.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageTemplateSubscribeAsync(this WechatApiClient client, Models.CgibinMessageTemplateSubscribeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "template", "subscribe") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageWxopenExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageWxopenExtensions.cs new file mode 100644 index 00000000..954facfa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMessageWxopenExtensions.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinMessageWxopenExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/message/wxopen/activityid/create 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageWxopenActivityIdCreateAsync(this WechatApiClient client, Models.CgibinMessageWxopenActivityIdCreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "wxopen", "activityid", "create") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/message/wxopen/updatablemsg/send 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/updatable-message/updatableMessage.setUpdatableMsg.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/updatable-message/updatableMessage.setUpdatableMsg.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMessageWxopenUpdatableMessageSendAsync(this WechatApiClient client, Models.CgibinMessageWxopenUpdatableMessageSendRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "message", "wxopen", "updatablemsg", "send") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMidasExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMidasExtensions.cs new file mode 100644 index 00000000..e51f9ee7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinMidasExtensions.cs @@ -0,0 +1,242 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using System.Web; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinMidasExtensions + { + private static T InitRequest(WechatApiClient client, string method, string reqLoc, ref T request) + where T : Models.CgibinMidasRequestBase, new () + { + if (client == null) throw new ArgumentNullException(nameof(request)); + if (method == null) throw new ArgumentNullException(nameof(method)); + if (reqLoc == null) throw new ArgumentNullException(nameof(reqLoc)); + if (request == null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + { + request.AppId = client.AppId; + } + + if (!request.Timestamp.HasValue) + { + request.Timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds(); + } + + if (string.IsNullOrEmpty(request.Signature)) + { + IDictionary paramMap = new SortedDictionary( + new Dictionary() + { + { "appid", HttpUtility.UrlEncode(request.AppId ?? string.Empty) }, + { "openid", HttpUtility.UrlEncode(request.OpenId ?? string.Empty) }, + { "offer_id", HttpUtility.UrlEncode(request.MidasOfferId ?? string.Empty) }, + { "zone_id", HttpUtility.UrlEncode(request.MidasZoneId ?? string.Empty) }, + { "pf", HttpUtility.UrlEncode(request.Platform ?? string.Empty) }, + { "ts", request.Timestamp.ToString() } + } + ); + string plainText = string.Join("&", paramMap.Select(e => $"{e.Key}={e.Value}")) + + $"&org_loc={reqLoc}" + + $"&method={method.ToUpper()}" + + $"&secret={client.MidasAppKey}"; + request.Signature = Utilities.HmacSha256Util.Hash(client.MidasAppKey ?? string.Empty, plainText).ToLower(); + } + + return request; + } + + /// + /// 异步调用 [POST] /cgi-bin/midas/cancelpay 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/midas.cancelPay.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMidasCancelPayAsync(this WechatApiClient client, Models.CgibinMidasCancelPayRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + InitRequest(client, HttpMethod.Post.Method, "/cgi-bin/midas/cancelpay", ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "midas", "cancelpay") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/midas/getbalance 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/midas.getBalance.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMidasGetBalanceAsync(this WechatApiClient client, Models.CgibinMidasGetBalanceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + InitRequest(client, HttpMethod.Post.Method, "/cgi-bin/midas/getbalance", ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "midas", "getbalance") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/midas/pay 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/midas.pay.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMidasPayAsync(this WechatApiClient client, Models.CgibinMidasPayRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + InitRequest(client, HttpMethod.Post.Method, "/cgi-bin/midas/pay", ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "midas", "pay") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/midas/present 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/midas.present.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMidasPresentAsync(this WechatApiClient client, Models.CgibinMidasPresentRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + InitRequest(client, HttpMethod.Post.Method, "/cgi-bin/midas/present", ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "midas", "present") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + #region Sandbox + /// + /// 异步调用 [POST] /cgi-bin/midas/sandbox/cancelpay 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/midas.cancelPay.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMidasSandboxCancelPayAsync(this WechatApiClient client, Models.CgibinMidasSandboxCancelPayRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + InitRequest(client, HttpMethod.Post.Method, "/cgi-bin/midas/sandbox/cancelpay", ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "midas", "sandbox", "cancelpay") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/midas/sandbox/getbalance 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/midas.getBalance.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMidasSandboxGetBalanceAsync(this WechatApiClient client, Models.CgibinMidasSandboxGetBalanceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + InitRequest(client, HttpMethod.Post.Method, "/cgi-bin/midas/sandbox/getbalance", ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "midas", "sandbox", "getbalance") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/midas/sandbox/pay 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/midas.pay.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMidasSandboxPayAsync(this WechatApiClient client, Models.CgibinMidasSandboxPayRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + InitRequest(client, HttpMethod.Post.Method, "/cgi-bin/midas/sandbox/pay", ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "midas", "sandbox", "pay") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/midas/sandbox/present 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/midas.present.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinMidasSandboxPresentAsync(this WechatApiClient client, Models.CgibinMidasSandboxPresentRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + InitRequest(client, HttpMethod.Post.Method, "/cgi-bin/midas/sandbox/present", ref request); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "midas", "sandbox", "present") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinOpenExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinOpenExtensions.cs new file mode 100644 index 00000000..0a196f5a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinOpenExtensions.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinOpenExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/open/create 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/account/create.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinOpenCreateAsync(this WechatApiClient client, Models.CgibinOpenCreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "open", "create") + .SetOptions(request) + .SetQueryParam("access_token", request.AuthorizerAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/open/bind 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/account/bind.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinOpenBindAsync(this WechatApiClient client, Models.CgibinOpenBindRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "open", "bind") + .SetOptions(request) + .SetQueryParam("access_token", request.AuthorizerAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/open/unbind 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/account/unbind.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinOpenUnbindAsync(this WechatApiClient client, Models.CgibinOpenUnbindRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "open", "unbind") + .SetOptions(request) + .SetQueryParam("access_token", request.AuthorizerAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/open/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/account/get.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinOpenGetAsync(this WechatApiClient client, Models.CgibinOpenGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "open", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AuthorizerAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinPOIExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinPOIExtensions.cs new file mode 100644 index 00000000..955b1202 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinPOIExtensions.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinPOIExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/poi/addpoi 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Stores/WeChat_Store_Interface.html#7 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinPOIAddPOIAsync(this WechatApiClient client, Models.CgibinPOIAddPOIRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "poi", "addpoi") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/poi/getpoi 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Stores/WeChat_Store_Interface.html#9 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinPOIGetPOIAsync(this WechatApiClient client, Models.CgibinPOIGetPOIRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "poi", "getpoi") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/poi/getpoilist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Stores/WeChat_Store_Interface.html#10 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinPOIGetPOIListAsync(this WechatApiClient client, Models.CgibinPOIGetPOIListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "poi", "getpoilist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/poi/updatepoi 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Stores/WeChat_Store_Interface.html#11 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinPOIUpdatePOIAsync(this WechatApiClient client, Models.CgibinPOIUpdatePOIRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "poi", "updatepoi") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/poi/delpoi 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Stores/WeChat_Store_Interface.html#12 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinPOIDeletePOIAsync(this WechatApiClient client, Models.CgibinPOIDeletePOIRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "poi", "delpoi") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinQrcodeExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinQrcodeExtensions.cs new file mode 100644 index 00000000..4c2e142e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinQrcodeExtensions.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinQrcodeExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/qrcode/create 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Generating_a_Parametric_QR_Code.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinQrcodeCreateAsync(this WechatApiClient client, Models.CgibinQrcodeCreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "qrcode", "create") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinShortenExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinShortenExtensions.cs new file mode 100644 index 00000000..7d027f40 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinShortenExtensions.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinShortenExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/shorturl 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/URL_Shortener.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/qrcode/shorturl.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinShortUrlAsync(this WechatApiClient client, Models.CgibinShortUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "shorturl") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/shorten/gen 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/KEY_Shortener.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinShortenGenerateAsync(this WechatApiClient client, Models.CgibinShortenGenerateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "shorten", "gen") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/shorten/fetch 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Account_Management/KEY_Shortener.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinShortenFetchAsync(this WechatApiClient client, Models.CgibinShortenFetchRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "shorten", "fetch") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinSoterExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinSoterExtensions.cs new file mode 100644 index 00000000..e2f0cd5c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinSoterExtensions.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinSoterExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/soter/verify_signature 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/soter/soter.verifySignature.html + /// + /// + /// + /// + /// + public static async Task ExecuteGgibinSoterVerifySignatureAsync(this WechatApiClient client, Models.GgibinSoterVerifySignatureRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "soter", "verify_signature") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinTagsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinTagsExtensions.cs index 14d8c60e..54c1a428 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinTagsExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinTagsExtensions.cs @@ -116,6 +116,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } + #region Members /// /// 异步调用 [POST] /cgi-bin/tags/members/batchtagging 接口。 /// REF: https://developers.weixin.qq.com/doc/offiaccount/User_Management/User_Tag_Management.html @@ -178,7 +179,9 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } + #endregion + #region MembersBlackList /// /// 异步调用 [POST] /cgi-bin/tags/members/getblacklist 接口。 /// REF: https://developers.weixin.qq.com/doc/offiaccount/User_Management/Manage_blacklist.html @@ -241,5 +244,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } + #endregion } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinTemplateExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinTemplateExtensions.cs new file mode 100644 index 00000000..235486cc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinTemplateExtensions.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinTemplateExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/template/api_set_industry 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Template_Message_Interface.html#0 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinTemplateSetIndustryAsync(this WechatApiClient client, Models.CgibinTemplateSetIndustryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "template", "api_set_industry") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/template/get_industry 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Template_Message_Interface.html#1 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinTemplateGetIndustryAsync(this WechatApiClient client, Models.CgibinTemplateGetIndustryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "template", "get_industry") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/template/api_add_template 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Template_Message_Interface.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinTemplateAddTemplateAsync(this WechatApiClient client, Models.CgibinTemplateAddTemplateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "template", "api_add_template") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /cgi-bin/template/get_all_private_template 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Template_Message_Interface.html#3 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinTemplateGetAllPrivateTemplateAsync(this WechatApiClient client, Models.CgibinTemplateGetAllPrivateTemplateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "cgi-bin", "template", "get_all_private_template") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/template/del_private_template 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Template_Message_Interface.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinTemplateDeletePrivateTemplateAsync(this WechatApiClient client, Models.CgibinTemplateDeletePrivateTemplateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "template", "del_private_template") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinWxaappExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinWxaappExtensions.cs new file mode 100644 index 00000000..84beb8ae --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinWxaappExtensions.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinWxaappExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/wxaapp/createwxaqrcode 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.createQRCode.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/qr-code/wxacode.createQRCode.html + /// REF: https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=ACCESS_TOKEN + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinWxaappCreateWxaQrcodeAsync(this WechatApiClient client, Models.CgibinWxaappCreateWxaQrcodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "wxaapp", "createwxaqrcode") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinWxopenExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinWxopenExtensions.cs new file mode 100644 index 00000000..94905632 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCgibinWxopenExtensions.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCgibinWxopenExtensions + { + #region QrcodeJump + /// + /// 异步调用 [POST] /cgi-bin/wxopen/qrcodejumpget 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/qrcode/qrcodejumpget.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinWxopenQrcodeJumpGetAsync(this WechatApiClient client, Models.CgibinWxopenQrcodeJumpGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "wxopen", "qrcodejumpget") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/wxopen/qrcodejumpdownload 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/qrcode/qrcodejumpdownload.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinWxopenQrcodeJumpDownloadAsync(this WechatApiClient client, Models.CgibinWxopenQrcodeJumpDownloadRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "wxopen", "qrcodejumpdownload") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/wxopen/qrcodejumpadd 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/qrcode/qrcodejumpadd.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinWxopenQrcodeJumpAddAsync(this WechatApiClient client, Models.CgibinWxopenQrcodeJumpAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "wxopen", "qrcodejumpadd") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/wxopen/qrcodejumppublish 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/qrcode/qrcodejumppublish.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinWxopenQrcodeJumpPublishAsync(this WechatApiClient client, Models.CgibinWxopenQrcodeJumpPublishRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "wxopen", "qrcodejumppublish") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /cgi-bin/wxopen/qrcodejumpdelete 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/qrcode/qrcodejumppublish.html + /// + /// + /// + /// + /// + public static async Task ExecuteCgibinWxopenQrcodeJumpDeleteAsync(this WechatApiClient client, Models.CgibinWxopenQrcodeJumpDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "cgi-bin", "wxopen", "qrcodejumpdelete") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCustomServiceExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCustomServiceExtensions.cs new file mode 100644 index 00000000..444840cb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCustomServiceExtensions.cs @@ -0,0 +1,268 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteCustomServiceExtensions + { + #region KfAccount + /// + /// 异步调用 [POST] /customservice/kfaccount/add 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html#1 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceKfAccountAddAsync(this WechatApiClient client, Models.CustomServiceKfAccountAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "customservice", "kfaccount", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /customservice/kfaccount/update 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html#2 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceKfAccountUpdateAsync(this WechatApiClient client, Models.CustomServiceKfAccountUpdateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "customservice", "kfaccount", "update") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /customservice/kfaccount/del 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html#3 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html#6 + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceKfAccountDeleteAsync(this WechatApiClient client, Models.CustomServiceKfAccountDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "customservice", "kfaccount", "del") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("kf_account", request.KfAccount); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /customservice/kfaccount/uploadheadimg 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html#4 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceKfAccountUploadHeadImageAsync(this WechatApiClient client, Models.CustomServiceKfAccountUploadHeadImageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + string filename = Guid.NewGuid().ToString("N") + ".jpg"; + string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x"); + using var fileContent = new ByteArrayContent(request.HeadImageFileBytes ?? new byte[0]); + using var httpContent = new MultipartFormDataContent(boundary); + httpContent.Add(fileContent, "\"media\"", "\"" + filename + "\""); + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("image/jpeg"); + fileContent.Headers.ContentLength = request.HeadImageFileBytes?.Length ?? 0; + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "customservice", "kfaccount", "uploadheadimg") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("kf_account", request.KfAccount); + + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /customservice/kfaccount/inviteworker 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html#3 + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceKfAccountInviteWorkerAsync(this WechatApiClient client, Models.CustomServiceKfAccountInviteWorkerRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "customservice", "kfaccount", "inviteworker") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region KfSession + /// + /// 异步调用 [POST] /customservice/kfsession/create 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Session_control.html + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceKfSessionCreateAsync(this WechatApiClient client, Models.CustomServiceKfSessionCreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "customservice", "kfsession", "create") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /customservice/kfsession/close 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Session_control.html + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceKfSessionCloseAsync(this WechatApiClient client, Models.CustomServiceKfSessionCloseRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "customservice", "kfsession", "close") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /customservice/kfsession/getsession 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Session_control.html + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceKfSessionGetSessionAsync(this WechatApiClient client, Models.CustomServiceKfSessionGetSessionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "customservice", "kfsession", "getsession") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("openid", request.OpenId); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /customservice/kfsession/getsessionlist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Session_control.html + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceKfSessionGetSessionListAsync(this WechatApiClient client, Models.CustomServiceKfSessionGetSessionListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "customservice", "kfsession", "getsessionlist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("kf_account", request.KfAccount); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /customservice/kfsession/getwaitcase 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Session_control.html + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceKfSessionGetWaitCaseAsync(this WechatApiClient client, Models.CustomServiceKfSessionGetWaitCaseRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "customservice", "kfsession", "getwaitcase") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + + #region MessageRecord + /// + /// 异步调用 [POST] /customservice/msgrecord/getmsglist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Obtain_chat_transcript.html + /// + /// + /// + /// + /// + public static async Task ExecuteCustomServiceMessageRecordGetMessageListAsync(this WechatApiClient client, Models.CustomServiceMessageRecordGetMessageListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "customservice", "msgrecord", "getmsglist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteDataCubeExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteDataCubeExtensions.cs new file mode 100644 index 00000000..94185820 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteDataCubeExtensions.cs @@ -0,0 +1,700 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteDataCubeExtensions + { + #region Article + /// + /// 异步调用 [POST] /datacube/getusersummary 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/User_Analysis_Data_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUserSummaryAsync(this WechatApiClient client, Models.DataCubeGetUserSummaryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getusersummary") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getusercumulate 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/User_Analysis_Data_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUserCumulateAsync(this WechatApiClient client, Models.DataCubeGetUserCumulateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getusercumulate") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getarticlesummary 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Graphic_Analysis_Data_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetArticleSummaryAsync(this WechatApiClient client, Models.DataCubeGetArticleSummaryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getarticlesummary") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getarticletotal 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Graphic_Analysis_Data_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetArticleTotalAsync(this WechatApiClient client, Models.DataCubeGetArticleTotalRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getarticletotal") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region User + /// + /// 异步调用 [POST] /datacube/getuserread 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Graphic_Analysis_Data_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUserReadAsync(this WechatApiClient client, Models.DataCubeGetUserReadRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getuserread") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getuserreadhour 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Graphic_Analysis_Data_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUserReadHourAsync(this WechatApiClient client, Models.DataCubeGetUserReadHourRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getuserreadhour") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getusershare 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Graphic_Analysis_Data_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUserShareAsync(this WechatApiClient client, Models.DataCubeGetUserShareRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getusershare") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getusersharehour 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Graphic_Analysis_Data_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUserShareHourAsync(this WechatApiClient client, Models.DataCubeGetUserShareHourRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getusersharehour") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region UpstreamMessage + /// + /// 异步调用 [POST] /datacube/getupstreammsg 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Message_analysis_data_interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUpstreamMessageAsync(this WechatApiClient client, Models.DataCubeGetUpstreamMessageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getupstreammsg") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getupstreammsghour 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Message_analysis_data_interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUpstreamMessageHourAsync(this WechatApiClient client, Models.DataCubeGetUpstreamMessageHourRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getupstreammsghour") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getupstreammsgweek 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Message_analysis_data_interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUpstreamMessageWeekAsync(this WechatApiClient client, Models.DataCubeGetUpstreamMessageWeekRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getupstreammsgweek") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getupstreammsgmonth 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Message_analysis_data_interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUpstreamMessageMonthAsync(this WechatApiClient client, Models.DataCubeGetUpstreamMessageMonthRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getupstreammsgmonth") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getupstreammsgdist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Message_analysis_data_interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUpstreamMessageDistributionAsync(this WechatApiClient client, Models.DataCubeGetUpstreamMessageDistributionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getupstreammsgdist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getupstreammsgdistweek 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Message_analysis_data_interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUpstreamMessageDistributionWeekAsync(this WechatApiClient client, Models.DataCubeGetUpstreamMessageDistributionWeekRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getupstreammsgdistweek") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getupstreammsgdistmonth 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Message_analysis_data_interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetUpstreamMessageDistributionMonthAsync(this WechatApiClient client, Models.DataCubeGetUpstreamMessageDistributionMonthRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getupstreammsgdistmonth") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Interface + /// + /// 异步调用 [POST] /datacube/getinterfacesummary 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Analytics_API.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetInterfaceSummaryAsync(this WechatApiClient client, Models.DataCubeGetInterfaceSummaryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getinterfacesummary") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getinterfacesummaryhour 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Analytics_API.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetInterfaceSummaryHourAsync(this WechatApiClient client, Models.DataCubeGetInterfaceSummaryHourRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getinterfacesummaryhour") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Card + /// + /// 异步调用 [POST] /datacube/getcardbizuininfo 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#10 + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetCardBusinessInfoAsync(this WechatApiClient client, Models.DataCubeGetCardBusinessInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getcardbizuininfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getcardcardinfo 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#11 + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetCardCardInfoAsync(this WechatApiClient client, Models.DataCubeGetCardCardInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getcardcardinfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getcardmembercardinfo 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#12 + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetCardMemberCardInfoAsync(this WechatApiClient client, Models.DataCubeGetCardMemberCardInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getcardmembercardinfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getcardmembercarddetail 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Cards_and_Offer/Managing_Coupons_Vouchers_and_Cards.html#13 + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetCardMemberCardDetailAsync(this WechatApiClient client, Models.DataCubeGetCardMemberCardDetailRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getcardmembercarddetail") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region WeAnalysis + /// + /// 异步调用 [POST] /datacube/getweanalysisappiddailyretaininfo 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/visit-retain/analysis.getDailyRetain.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetWeAnalysisAppIdDailyRetainInfoAsync(this WechatApiClient client, Models.DataCubeGetWeAnalysisAppIdDailyRetainInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getweanalysisappiddailyretaininfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getweanalysisappidmonthlyretaininfo 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/visit-retain/analysis.getMonthlyRetain.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetWeAnalysisAppIdMonthlyRetainInfoAsync(this WechatApiClient client, Models.DataCubeGetWeAnalysisAppIdMonthlyRetainInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getweanalysisappidmonthlyretaininfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getweanalysisappidweeklyretaininfo 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/visit-retain/analysis.getWeeklyRetain.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetWeAnalysisAppIdWeeklyRetainInfoAsync(this WechatApiClient client, Models.DataCubeGetWeAnalysisAppIdWeeklyRetainInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getweanalysisappidweeklyretaininfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getweanalysisappiddailysummarytrend 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/analysis.getDailySummary.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetWeAnalysisAppIdDailySummaryTrendAsync(this WechatApiClient client, Models.DataCubeGetWeAnalysisAppIdDailySummaryTrendRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getweanalysisappiddailysummarytrend") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getweanalysisappiddailyvisittrend 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/visit-trend/analysis.getDailyVisitTrend.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetWeAnalysisAppIdDailyVisitTrendAsync(this WechatApiClient client, Models.DataCubeGetWeAnalysisAppIdDailyVisitTrendRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getweanalysisappiddailyvisittrend") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getweanalysisappidmonthlyvisittrend 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/visit-trend/analysis.getMonthlyVisitTrend.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetWeAnalysisAppIdMonthlyVisitTrendAsync(this WechatApiClient client, Models.DataCubeGetWeAnalysisAppIdMonthlyVisitTrendRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getweanalysisappidmonthlyvisittrend") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getweanalysisappidweeklyvisittrend 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/visit-trend/analysis.getWeeklyVisitTrend.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetWeAnalysisAppIdWeeklyVisitTrendAsync(this WechatApiClient client, Models.DataCubeGetWeAnalysisAppIdWeeklyVisitTrendRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getweanalysisappidweeklyvisittrend") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getweanalysisappiduserportrait 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/analysis.getUserPortrait.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetWeAnalysisAppIdUserPortraitAsync(this WechatApiClient client, Models.DataCubeGetWeAnalysisAppIdUserPortraitRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getweanalysisappiduserportrait") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getweanalysisappidvisitdistribution 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/analysis.getVisitDistribution.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetWeAnalysisAppIdVisitDistributionAsync(this WechatApiClient client, Models.DataCubeGetWeAnalysisAppIdVisitDistributionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getweanalysisappidvisitdistribution") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /datacube/getweanalysisappidvisitpage 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/analysis.getVisitPage.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetWeAnalysisAppIdVisitPageAsync(this WechatApiClient client, Models.DataCubeGetWeAnalysisAppIdVisitPageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getweanalysisappidvisitpage") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region GameAnalysis + /// + /// 异步调用 [POST] /datacube/getgameanalysisdata 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data-analysis/analysis.getGameAnalysisData.html + /// + /// + /// + /// + /// + public static async Task ExecuteDataCubeGetGameAnalysisDataAsync(this WechatApiClient client, Models.DataCubeGetGameAnalysisDataRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "datacube", "getgameanalysisdata") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteIntpMarketCodeExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteIntpMarketCodeExtensions.cs new file mode 100644 index 00000000..4ebb68fb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteIntpMarketCodeExtensions.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteIntpMarketCodeExtensions + { + /// + /// 异步调用 [POST] /intp/marketcode/applycode 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Unique_Item_Code/Unique_Item_Code_API_Documentation.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteIntpMarketCodeApplyCodeAsync(this WechatApiClient client, Models.IntpMarketCodeApplyCodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "intp", "marketcode", "applycode") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /intp/marketcode/applycodequery 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Unique_Item_Code/Unique_Item_Code_API_Documentation.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteIntpMarketCodeApplyCodeQueryAsync(this WechatApiClient client, Models.IntpMarketCodeApplyCodeQueryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "intp", "marketcode", "applycodequery") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /intp/marketcode/applycodedownload 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Unique_Item_Code/Unique_Item_Code_API_Documentation.html#6 + /// + /// + /// + /// + /// + public static async Task ExecuteIntpMarketCodeApplyCodeDownloadAsync(this WechatApiClient client, Models.IntpMarketCodeApplyCodeDownloadRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "intp", "marketcode", "applycodedownload") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /intp/marketcode/codeactive 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Unique_Item_Code/Unique_Item_Code_API_Documentation.html#7 + /// + /// + /// + /// + /// + public static async Task ExecuteIntpMarketCodeActiveCodeAsync(this WechatApiClient client, Models.IntpMarketCodeActiveCodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "intp", "marketcode", "codeactive") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /intp/marketcode/codeactivequery 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Unique_Item_Code/Unique_Item_Code_API_Documentation.html#8 + /// + /// + /// + /// + /// + public static async Task ExecuteIntpMarketCodeActiveCodeQueryAsync(this WechatApiClient client, Models.IntpMarketCodeActiveCodeQueryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "intp", "marketcode", "codeactivequery") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /intp/marketcode/tickettocode 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Unique_Item_Code/Unique_Item_Code_API_Documentation.html#9 + /// + /// + /// + /// + /// + public static async Task ExecuteIntpMarketCodeTicketToCodeAsync(this WechatApiClient client, Models.IntpMarketCodeTicketToCodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "intp", "marketcode", "tickettocode") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteIntpRealNameExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteIntpRealNameExtensions.cs new file mode 100644 index 00000000..7adefb97 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteIntpRealNameExtensions.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteIntpRealNameExtensions + { + /// + /// 异步调用 [POST] /intp/realname/getauthurl 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#9.2 + /// + /// + /// + /// + /// + public static async Task ExecuteIntpRealNameGetAuthUrlAsync(this WechatApiClient client, Models.IntpRealNameGetAuthUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "intp", "realname", "getauthurl") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteMerchantExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteMerchantExtensions.cs new file mode 100644 index 00000000..f48dcf23 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteMerchantExtensions.cs @@ -0,0 +1,704 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteMerchantExtensions + { + #region Product + /// + /// 异步调用 [POST] /merchant/create 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantCreateAsync(this WechatApiClient client, Models.MerchantCreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "create") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/del 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantDeleteAsync(this WechatApiClient client, Models.MerchantDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "del") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/update 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantUpdateAsync(this WechatApiClient client, Models.MerchantUpdateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "update") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /merchant/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantGetAsync(this WechatApiClient client, Models.MerchantGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "merchant", "get") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("product_id", request.ProductId); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/getbystatus 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantGetByStatusAsync(this WechatApiClient client, Models.MerchantGetByStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "getbystatus") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/modproductstatus 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantModifyProductStatusAsync(this WechatApiClient client, Models.MerchantModifyProductStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "modproductstatus") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Category + /// + /// 异步调用 [POST] /merchant/category/getsub 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantCategoryGetSubAsync(this WechatApiClient client, Models.MerchantCategoryGetSubRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "category", "getsub") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/category/getsku 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantCategoryGetSKUAsync(this WechatApiClient client, Models.MerchantCategoryGetSKURequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "category", "getsku") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/category/getproperty 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantCategoryGetPropertyAsync(this WechatApiClient client, Models.MerchantCategoryGetPropertyRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "category", "getproperty") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Stock + /// + /// 异步调用 [POST] /merchant/stock/add 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantStockAddAsync(this WechatApiClient client, Models.MerchantStockAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "stock", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/stock/reduce 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantStockReduceAsync(this WechatApiClient client, Models.MerchantStockReduceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "stock", "reduce") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Express + /// + /// 异步调用 [POST] /merchant/express/add 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantExpressAddAsync(this WechatApiClient client, Models.MerchantExpressAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "express", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/express/del 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantExpressDeleteAsync(this WechatApiClient client, Models.MerchantExpressDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "express", "del") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/express/update 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantExpressUpdateAsync(this WechatApiClient client, Models.MerchantExpressUpdateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "express", "update") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/express/getbyid 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantExpressGetByIdAsync(this WechatApiClient client, Models.MerchantExpressGetByIdRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "express", "getbyid") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /merchant/express/getall 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantExpressGetAllAsync(this WechatApiClient client, Models.MerchantExpressGetAllRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "merchant", "express", "getall") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + + #region Group + /// + /// 异步调用 [POST] /merchant/group/add 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantGroupAddAsync(this WechatApiClient client, Models.MerchantGroupAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "group", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/group/del 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantGroupDeleteAsync(this WechatApiClient client, Models.MerchantGroupDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "group", "del") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/group/propertymod 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantGroupPropertyModifyAsync(this WechatApiClient client, Models.MerchantGroupPropertyModifyRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "group", "propertymod") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/group/productmod 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantGroupProductModifyAsync(this WechatApiClient client, Models.MerchantGroupProductModifyRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "group", "productmod") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/group/getbyid 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantGroupGetByIdAsync(this WechatApiClient client, Models.MerchantGroupGetByIdRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "group", "getbyid") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /merchant/group/getall 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantGroupGetAllAsync(this WechatApiClient client, Models.MerchantGroupGetAllRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "merchant", "group", "getall") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + + #region Shelf + /// + /// 异步调用 [POST] /merchant/shelf/add 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantShelfAddAsync(this WechatApiClient client, Models.MerchantShelfAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "shelf", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/shelf/del 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantShelfDeleteAsync(this WechatApiClient client, Models.MerchantShelfDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "shelf", "del") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/shelf/mod 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantShelfModifyAsync(this WechatApiClient client, Models.MerchantShelfModifyRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "shelf", "mod") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/shelf/getbyid 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantShelfGetByIdAsync(this WechatApiClient client, Models.MerchantShelfGetByIdRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "shelf", "getbyid") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /merchant/shelf/getall 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantShelfGetAllAsync(this WechatApiClient client, Models.MerchantShelfGetAllRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "merchant", "shelf", "getbyid") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + + #region Order + /// + /// 异步调用 [POST] /merchant/order/getbyid 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantOrderGetByIdAsync(this WechatApiClient client, Models.MerchantOrderGetByIdRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "order", "getbyid") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/order/getbyfilter 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantOrderGetByFilterAsync(this WechatApiClient client, Models.MerchantOrderGetByFilterRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "order", "getbyfilter") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/order/setdelivery 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantOrderSetDeliveryAsync(this WechatApiClient client, Models.MerchantOrderSetDeliveryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "order", "setdelivery") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /merchant/order/close 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantOrderCloseAsync(this WechatApiClient client, Models.MerchantOrderCloseRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "order", "close") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Common + /// + /// 异步调用 [POST] /merchant/common/upload_img 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html + /// + /// + /// + /// + /// + public static async Task ExecuteMerchantCommonUploadImageAsync(this WechatApiClient client, Models.MerchantCommonUploadImageRequest request, CancellationToken cancellationToken = default) + { + if (string.IsNullOrEmpty(request.FileName)) + request.FileName = Guid.NewGuid().ToString("N").ToLower() + ".png"; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "merchant", "common", "upload_img") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + using var httpContent = new ByteArrayContent(request.FileBytes ?? new byte[0]); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); +} + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteNontaxExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteNontaxExtensions.cs new file mode 100644 index 00000000..37b92c1f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteNontaxExtensions.cs @@ -0,0 +1,412 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteNontaxExtensions + { + #region Bill + /// + /// 异步调用 [POST] /nontax/getbillauthurl 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#2.2 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxGetBillAuthUrlAsync(this WechatApiClient client, Models.NontaxGetBillAuthUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (!request.Timestamp.HasValue) + request.Timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds(); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "getbillauthurl") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/createbillcard 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#3.2 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxCreateBillCardAsync(this WechatApiClient client, Models.NontaxCreateBillCardRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "createbillcard") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/insertbill 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html#3.5 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxInsertBillAsync(this WechatApiClient client, Models.NontaxInsertBillRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "insertbill") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + /// + /// 异步调用 [POST] /nontax/queryfee 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#6.1.1 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxQueryFeeAsync(this WechatApiClient client, Models.NontaxQueryFeeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "queryfee") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/unifiedorder 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#6.1.2 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxUnifiedOrderAsync(this WechatApiClient client, Models.NontaxUnifiedOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "unifiedorder") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/getorder 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#6.1.3 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxGetOrderAsync(this WechatApiClient client, Models.NontaxGetOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "getorder") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/refund 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#6.1.4 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxRefundAsync(this WechatApiClient client, Models.NontaxRefundRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "refund") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/downloadbill 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#6.1.5 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxDownloadBillAsync(this WechatApiClient client, Models.NontaxDownloadBillRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "downloadbill") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/notifyinconsistentorder 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#6.1.6 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxNotifyInconsistentOrderAsync(this WechatApiClient client, Models.NontaxNotifyInconsistentOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "notifyinconsistentorder") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/mocknotification 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#6.1.7 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxMockNotificationAsync(this WechatApiClient client, Models.NontaxMockNotificationRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "mocknotification") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/mockqueryfee 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#6.1.8 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxMockQueryFeeAsync(this WechatApiClient client, Models.NontaxMockQueryFeeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "mockqueryfee") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/micropay 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#6.1.9 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxMicroPayAsync(this WechatApiClient client, Models.NontaxMicroPayRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "micropay") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/getorderlist 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#6.1.9 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxGetOrderListAsync(this WechatApiClient client, Models.NontaxGetOrderListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "getorderlist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/getrealname 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html#9.3 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxGetRealNameAsync(this WechatApiClient client, Models.NontaxGetRealNameRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "getrealname") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + #region Vehicle + /// + /// 异步调用 [POST] /nontax/vehicle/querystate 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/Non-tax_driver_platform.html#2.1 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxVehicleQueryStateAsync(this WechatApiClient client, Models.NontaxVehicleQueryStateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "vehicle", "querystate") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/vehicle/entrancenotify 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/Non-tax_driver_platform.html#2.2 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxVehicleEntranceNotifyAsync(this WechatApiClient client, Models.NontaxVehicleEntranceNotifyRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "vehicle", "entrancenotify") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /nontax/vehicle/payapply 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/Non-tax_driver_platform.html#2.3 + /// + /// + /// + /// + /// + public static async Task ExecuteNontaxVehiclePayApplyAsync(this WechatApiClient client, Models.NontaxVehiclePayApplyRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "nontax", "vehicle", "payapply") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteProductExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteProductExtensions.cs new file mode 100644 index 00000000..3b51b717 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteProductExtensions.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteProductExtensions + { + /// + /// 异步调用 [POST] /product/img/upload 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent/API/register/uploadimg.html + /// + /// + /// + /// + /// + public static async Task ExecuteProductImageUploadAsync(this WechatApiClient client, Models.ProductImageUploadRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "product", "img", "upload") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("resp_type", request.ResponseType); + + if (!string.IsNullOrEmpty(request.ImageUrl)) + { + flurlReq.SetQueryParam("upload_type", 1) + .SetQueryParam("img_url", request.ImageUrl); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + else + { + flurlReq.SetQueryParam("upload_type", 0) + .SetQueryParam("height", request.Height) + .SetQueryParam("width", request.Width); + + string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x"); + string filename = "image.png"; + var httpContent = new MultipartFormDataContent(boundary); + var fileContent = new ByteArrayContent(request.ImageFileBytes ?? new byte[0]); + httpContent.Add(fileContent, "\"media\"", "\"" + filename + "\""); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("image/png"); + fileContent.Headers.ContentLength = request.ImageFileBytes?.Length; + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary); + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecutePublisherStatExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecutePublisherStatExtensions.cs new file mode 100644 index 00000000..c399aa78 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecutePublisherStatExtensions.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecutePublisherStatExtensions + { + /// + /// 异步调用 [GET] /publisher/stat?action=publisher_adpos_general 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Ad_Analysis.html#%E4%B8%80%E3%80%81%E8%8E%B7%E5%8F%96%E5%85%AC%E4%BC%97%E5%8F%B7%E5%88%86%E5%B9%BF%E5%91%8A%E4%BD%8D%E6%95%B0%E6%8D%AE%EF%BC%88publisher-adpos-general%EF%BC%89 + /// + /// + /// + /// + /// + public static async Task ExecutePublisherStatAdposGeneralAsync(this WechatApiClient client, Models.PublisherStatAdposGeneralRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "publisher", "stat") + .SetOptions(request) + .SetQueryParam("action", "publisher_adpos_general") + .SetQueryParam("page", request.Page) + .SetQueryParam("page_size", request.Limit) + .SetQueryParam("start_date", request.StartDateString) + .SetQueryParam("end_date", request.EndDateString); + + if (!string.IsNullOrEmpty(request.AdSlotName)) + flurlReq.SetQueryParam("ad_slot", request.AdSlotName); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /publisher/stat?action=publisher_cps_general 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Ad_Analysis.html#%E4%BA%8C%E3%80%81%E8%8E%B7%E5%8F%96%E5%85%AC%E4%BC%97%E5%8F%B7%E8%BF%94%E4%BD%A3%E5%95%86%E5%93%81%E6%95%B0%E6%8D%AE%EF%BC%88publisher-cps-general%EF%BC%89 + /// + /// + /// + /// + /// + public static async Task ExecutePublisherStatCpsGeneralAsync(this WechatApiClient client, Models.PublisherStatCpsGeneralRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "publisher", "stat") + .SetOptions(request) + .SetQueryParam("action", "publisher_cps_general") + .SetQueryParam("page", request.Page) + .SetQueryParam("page_size", request.Limit) + .SetQueryParam("start_date", request.StartDateString) + .SetQueryParam("end_date", request.EndDateString); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /publisher/stat?action=publisher_settlement 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Analytics/Ad_Analysis.html#%E4%B8%89%E3%80%81%E8%8E%B7%E5%8F%96%E5%85%AC%E4%BC%97%E5%8F%B7%E7%BB%93%E7%AE%97%E6%94%B6%E5%85%A5%E6%95%B0%E6%8D%AE%E5%8F%8A%E7%BB%93%E7%AE%97%E4%B8%BB%E4%BD%93%E4%BF%A1%E6%81%AF%EF%BC%88publisher-settlement%EF%BC%89 + /// + /// + /// + /// + /// + public static async Task ExecutePublisherStatSettlementAsync(this WechatApiClient client, Models.PublisherStatSettlementRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "publisher", "stat") + .SetOptions(request) + .SetQueryParam("action", "publisher_settlement") + .SetQueryParam("page", request.Page) + .SetQueryParam("page_size", request.Limit) + .SetQueryParam("start_date", request.StartDateString) + .SetQueryParam("end_date", request.EndDateString); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteSemanticExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteSemanticExtensions.cs new file mode 100644 index 00000000..65d753d4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteSemanticExtensions.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteSemanticExtensions + { + /// + /// 异步调用 [POST] /semantic/semproxy/search 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Intelligent_Interface/Natural_Language_Processing.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Mobile_App/WeChat_Smart_APIs/Semantic_Understanding.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Smart_APIs/Semantic_Understanding.html + /// + /// + /// + /// + /// + public static async Task> ExecuteSemanticSemproxySearchAsync(this WechatApiClient client, Models.SemanticSemproxySearchRequest request, CancellationToken cancellationToken = default) + where TDetail : Models.SemanticSemproxySearchResponse.Types.IDetail + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "semantic", "semproxy", "search") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync>(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteSnsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteSnsExtensions.cs index 3cc572e7..c73b185b 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteSnsExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteSnsExtensions.cs @@ -14,6 +14,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// /// 异步调用 [GET] /sns/oauth2/access_token 接口。 /// REF: https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html#1 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Mobile_App/WeChat_Login/Development_Guide.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html /// /// /// @@ -38,6 +40,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// /// 异步调用 [GET] /sns/oauth2/refresh_token 接口。 /// REF: https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html#1 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Mobile_App/WeChat_Login/Development_Guide.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html /// /// /// @@ -61,6 +65,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// /// 异步调用 [GET] /sns/userinfo 接口。 /// REF: https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html#3 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Mobile_App/WeChat_Login/Authorized_API_call_UnionID.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Authorized_Interface_Calling_UnionID.html /// /// /// @@ -84,6 +90,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// /// 异步调用 [GET] /sns/auth 接口。 /// REF: https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html#4 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Mobile_App/WeChat_Login/Development_Guide.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html /// /// /// @@ -127,5 +135,35 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); } + + #region Component + /// + /// 异步调用 [GET] /sns/component/jscode2session 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/others/WeChat_login.html + /// + /// + /// + /// + /// + public static async Task ExecuteSnsComponentJsCode2SessionAsync(this WechatApiClient client, Models.SnsComponentJsCode2SessionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.ComponentAppId)) + request.ComponentAppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "sns", "component", "jscode2session") + .SetOptions(request) + .SetQueryParam("grant_type", request.GrantType) + .SetQueryParam("appid", request.AppId) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken) + .SetQueryParam("js_code", request.JsCode); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteTcbExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteTcbExtensions.cs new file mode 100644 index 00000000..8f7dd81d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteTcbExtensions.cs @@ -0,0 +1,302 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteTcbExtensions + { + /// + /// 异步调用 [POST] /tcb/adddelayedfunctiontask 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.addDelayedFunctionTask.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbAddDelayedFunctionTaskAsync(this WechatApiClient client, Models.TcbAddDelayedFunctionTaskRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "adddelayedfunctiontask") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/createpressuretesttask 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.createPressureTest.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbCreatePressureTestTaskAsync(this WechatApiClient client, Models.TcbCreatePressureTestTaskRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "createpressuretesttask") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/createsendsmstask 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.createSendSmsTask.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/cloudbase/cloudbase.createSendSmsTask.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbCreateSendSmsTaskAsync(this WechatApiClient client, Models.TcbCreateSendSmsTaskRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "createsendsmstask") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/describeextensionuploadinfo 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.describeExtensionUploadInfo.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/cloudbase/cloudbase.describeExtensionUploadInfo.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbDescribeExtensionUploadInfoAsync(this WechatApiClient client, Models.TcbDescribeExtensionUploadInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "describeextensionuploadinfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/describesmsrecords 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.describeSmsRecords.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/cloudbase/cloudbase.describeSmsRecords.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbDescribeSmsRecordsAsync(this WechatApiClient client, Models.TcbDescribeSmsRecordsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "describesmsrecords") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/getopendata 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.getOpenData.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbGetOpenDataAsync(this WechatApiClient client, Models.TcbGetOpenDataRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "getopendata") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("openid", request.OpenId); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/getpressuretestreport 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.getPressureTestReport.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbGetPressureTestReportAsync(this WechatApiClient client, Models.TcbGetPressureTestReportRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "getpressuretestreport") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/getpressureteststatus 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.getPressureTestStatus.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbGetPressureTestStatusAsync(this WechatApiClient client, Models.TcbGetPressureTestStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "getpressureteststatus") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/getstatistics 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.getStatistics.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/cloudbase/cloudbase.getStatistics.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbGetStatisticsAsync(this WechatApiClient client, Models.TcbGetStatisticsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "getstatistics") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/getvoipsign 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.getVoIPSign.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbGetVoIPSignAsync(this WechatApiClient client, Models.TcbGetVoIPSignRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.Nonce)) + request.Nonce = Guid.NewGuid().ToString("N"); + + if (!request.Timestamp.HasValue) + request.Timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds(); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "getvoipsign") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("openid", request.OpenId); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/cloudbasereport 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.report.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/cloudbase/cloudbase.report.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbCloudBaseReportAsync(this WechatApiClient client, Models.TcbCloudBaseReportRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "cloudbasereport") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/sendsms 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.sendSms.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/cloudbase/cloudbase.sendSms.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbSendSmsAsync(this WechatApiClient client, Models.TcbSendSmsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "sendsms") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/sendsmsv2 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.sendSmsV2.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/cloudbase/cloudbase.sendSmsV2.html + /// + /// + /// + /// + /// + public static async Task ExecuteTcbSendSmsV2Async(this WechatApiClient client, Models.TcbSendSmsV2Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "tcb", "sendsmsv2") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaApiExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaApiExtensions.cs new file mode 100644 index 00000000..ed4dec9e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaApiExtensions.cs @@ -0,0 +1,1057 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteWxaApiExtensions + { + #region NewTemplate + /// + /// 异步调用 [POST] /wxaapi/newtmpl/addtemplate 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html#addTemplate%E9%80%89%E7%94%A8%E6%A8%A1%E6%9D%BF + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.addTemplate.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiNewTemplateAddTemplateAsync(this WechatApiClient client, Models.WxaApiNewTemplateAddTemplateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "newtmpl", "addtemplate") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/newtmpl/deltemplate 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html#deleteTemplate%E5%88%A0%E9%99%A4%E6%A8%A1%E6%9D%BF + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.deleteTemplate.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiNewTemplateDeleteTemplateAsync(this WechatApiClient client, Models.WxaApiNewTemplateDeleteTemplateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "newtmpl", "deltemplate") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/newtmpl/getcategory 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html#getCategory%E8%8E%B7%E5%8F%96%E5%85%AC%E4%BC%97%E5%8F%B7%E7%B1%BB%E7%9B%AE + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.getCategory.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiNewTemplateGetCategoryAsync(this WechatApiClient client, Models.WxaApiNewTemplateGetCategoryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "newtmpl", "getcategory") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/newtmpl/getpubtemplatekeywords 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html#getPubTemplateKeyWordsById%E8%8E%B7%E5%8F%96%E6%A8%A1%E6%9D%BF%E4%B8%AD%E7%9A%84%E5%85%B3%E9%94%AE%E8%AF%8D + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.getPubTemplateKeyWordsById.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiNewTemplateGetPublicTemplateKeywordsAsync(this WechatApiClient client, Models.WxaApiNewTemplateGetPublicTemplateKeywordsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "newtmpl", "getpubtemplatekeywords") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("tid", request.TemplateTitleId); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/newtmpl/getpubtemplatetitles 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html#getPubTemplateTitleList%E8%8E%B7%E5%8F%96%E7%B1%BB%E7%9B%AE%E4%B8%8B%E7%9A%84%E5%85%AC%E5%85%B1%E6%A8%A1%E6%9D%BF + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.getPubTemplateTitleList.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiNewTemplateGetPublicTemplateTitlesAsync(this WechatApiClient client, Models.WxaApiNewTemplateGetPublicTemplateTitlesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "newtmpl", "getpubtemplatetitles") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("ids", "\"" + string.Join(",", request.CategoryIdList) + "\"") + .SetQueryParam("start", request.Offset) + .SetQueryParam("limit", request.Limit); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/newtmpl/gettemplate 接口。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html#getTemplateList%E8%8E%B7%E5%8F%96%E7%A7%81%E6%9C%89%E6%A8%A1%E6%9D%BF%E5%88%97%E8%A1%A8 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.getTemplateList.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiNewTemplateGetTemplateAsync(this WechatApiClient client, Models.WxaApiNewTemplateGetTemplateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "newtmpl", "gettemplate") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + + #region Opertaion + /// + /// 异步调用 [GET] /wxaapi/feedback/list 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/operation/operation.getFeedback.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiFeedbackListAsync(this WechatApiClient client, Models.WxaApiFeedbackListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "feedback", "list") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("page", request.Page) + .SetQueryParam("num", request.Limit); + + if (request.Type.HasValue) + flurlReq.SetQueryParam("type", request.Type); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/log/jserr_detail 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/operation/operation.getJsErrDetail.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiLogJsErrorDetailAsync(this WechatApiClient client, Models.WxaApiLogJsErrorDetailRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "log", "jserr_detail") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/log/jserr_list 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/operation/operation.getJsErrList.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiLogJsErrorListAsync(this WechatApiClient client, Models.WxaApiLogJsErrorListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "log", "jserr_list") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/log/get_performance 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/operation/operation.getPerformance.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiLogGetPerformanceAsync(this WechatApiClient client, Models.WxaApiLogGetPerformanceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "log", "get_performance") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/log/get_scene 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/operation/operation.getSceneList.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiLogGetSceneAsync(this WechatApiClient client, Models.WxaApiLogGetSceneRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "log", "get_scene") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/log/get_client_version 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/operation/operation.getVersionList.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiLogGetClientVersionAsync(this WechatApiClient client, Models.WxaApiLogGetClientVersionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "log", "get_client_version") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/userlog/userlog_search 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/operation/operation.realtimelogSearch.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiUserLogSearchAsync(this WechatApiClient client, Models.WxaApiUserLogSearchRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "log", "get_client_version") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("date", request.DateString) + .SetQueryParam("begintime", request.BeginTimestamp) + .SetQueryParam("endtime", request.EndTimestamp); + + if (!string.IsNullOrEmpty(request.TraceId)) + flurlReq.SetQueryParam("traceId", request.TraceId); + + if (!string.IsNullOrEmpty(request.PagePath)) + flurlReq.SetQueryParam("url", request.PagePath); + + if (!string.IsNullOrEmpty(request.UserId)) + flurlReq.SetQueryParam("id", request.UserId); + + if (!string.IsNullOrEmpty(request.FilterMessage)) + flurlReq.SetQueryParam("filterMsg", request.FilterMessage); + + if (request.LogLevel.HasValue) + flurlReq.SetQueryParam("level", request.LogLevel.Value); + + if (request.Offset.HasValue) + flurlReq.SetQueryParam("start", request.Offset.Value); + + if (request.Limit.HasValue) + flurlReq.SetQueryParam("limit", request.Limit.Value); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + + #region LiveBroadcast + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/create 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#1 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomCreateAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomCreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "create") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/deleteroom 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomDeleteRoomAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomDeleteRoomRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "deleteroom") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/editroom 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#6 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomEditRoomAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomEditRoomRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "editroom") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/broadcast/room/getpushurl 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#7 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomGetPushUrlAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomGetPushUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "broadcast", "room", "getpushurl") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("roomId", request.RoomId); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/broadcast/room/getsharedcode 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#8 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomGetSharedCodeAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomGetSharedCodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "broadcast", "room", "getsharedcode") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("roomId", request.RoomId); + + if (!string.IsNullOrEmpty(request.CustomParameter)) + flurlReq.SetQueryParam("params", request.CustomParameter); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/updatefeedpublic 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#17 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomUpdateFeedPublicAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomUpdateFeedPublicRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "updatefeedpublic") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/updatereplay 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#18 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomUpdateReplayAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomUpdateReplayRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "updatereplay") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/updatekf 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#19 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomUpdateKfAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomUpdateKfRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "updatekf") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/updatecomment 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#20 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomUpdateCommentAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomUpdateCommentRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "updatecomment") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + #region LiveBroadcastRoomGoods + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/addgoods 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomAddGoodsAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomAddGoodsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "addgoods") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/goods/onsale 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#21 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsOnSaleAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsOnSaleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "goods", "onsale") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/goods/deleteInRoom 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#22 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsDeleteInRoomAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsDeleteInRoomRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "goods", "deleteInRoom") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/goods/push 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#23 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsPushAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsPushRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "goods", "push") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/goods/sort 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#24 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsSortAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsSortRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "goods", "sort") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/goods/getVideo 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#25 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsGetVideoAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsGetVideoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "goods", "getVideo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region LiveBroadcastRoomAssistant + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/addassistant 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#9 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomAddAssistantAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomAddAssistantRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "addassistant") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/modifyassistant 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#10 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomModifyAssistantAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomModifyAssistantRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "modifyassistant") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/removeassistant 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#11 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomRemoveAssistantAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomRemoveAssistantRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "removeassistant") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/broadcast/room/getassistantlist 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#12 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomGetAssistantListAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomGetAssistantListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "getassistantlist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("roomId", request.RoomId); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region LiveBroadcastRoomAnchor + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/addsubanchor 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#13 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomAddSubAnchorAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomAddSubAnchorRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "addsubanchor") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/modifysubanchor 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#14 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomModifySubAnchorAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomModifySubAnchorRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "modifysubanchor") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/room/deletesubanchor 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#15 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomDeleteSubAnchorAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomDeleteSubAnchorRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "deletesubanchor") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/broadcast/room/getsubanchor 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#16 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoomGetSubAnchorAsync(this WechatApiClient client, Models.WxaApiBroadcastRoomGetSubAnchorRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "room", "getsubanchor") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("roomId", request.RoomId); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + + #region LiveBroadcastGoods + /// + /// 异步调用 [POST] /wxaapi/broadcast/goods/add 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/commodity-api.html#1 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsAddAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "goods", "add") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/goods/resetaudit 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/commodity-api.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsResetAuditAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsResetAuditRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "goods", "resetaudit") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/goods/audit 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/commodity-api.html#3 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsAuditAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsAuditRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "goods", "audit") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/goods/delete 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/commodity-api.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsDeleteAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "goods", "delete") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/goods/update 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/commodity-api.html#5 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsUpdateAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsUpdateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "goods", "update") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/getgoodswarehouse 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/commodity-api.html#6 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGetGoodsWarehouseAsync(this WechatApiClient client, Models.WxaApiBroadcastGetGoodsWarehouseRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "getgoodswarehouse") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/broadcast/goods/getapproved 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/commodity-api.html#7 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastGoodsGetApprovedAsync(this WechatApiClient client, Models.WxaApiBroadcastGoodsGetApprovedRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "broadcast", "goods", "getapproved") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("offset", request.Offset) + .SetQueryParam("limit", request.Limit) + .SetQueryParam("status", request.AuditStatus); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + + #region LiveBroadcastRole + /// + /// 异步调用 [POST] /wxaapi/broadcast/role/addrole 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/role-manage.html#1 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoleAddRoleAsync(this WechatApiClient client, Models.WxaApiBroadcastRoleAddRoleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "role", "addrole") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxaapi/broadcast/role/deleterole 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/role-manage.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoleDeleteRoleAsync(this WechatApiClient client, Models.WxaApiBroadcastRoleDeleteRoleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxaapi", "broadcast", "role", "deleterole") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxaapi/broadcast/role/getrolelist 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/role-manage.html#4 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaApiBroadcastRoleGetRoleListAsync(this WechatApiClient client, Models.WxaApiBroadcastRoleGetRoleListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxaapi", "broadcast", "role", "getrolelist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + if (!string.IsNullOrEmpty(request.Keyword)) + flurlReq.SetQueryParam("keyword", request.Keyword); + + if (request.Role.HasValue) + flurlReq.SetQueryParam("role", request.Role.Value); + + if (request.Offset.HasValue) + flurlReq.SetQueryParam("offset", request.Offset.Value); + + if (request.Limit.HasValue) + flurlReq.SetQueryParam("limit", request.Limit.Value); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs new file mode 100644 index 00000000..75983ea7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs @@ -0,0 +1,236 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteWxaBusinessExtensions + { + /// + /// 异步调用 [POST] /wxa/business/getpayfororder 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/business.getPayForOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGetPayForOrderAsync(this WechatApiClient client, Models.WxaBusinessGetPayForOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "getpayfororder") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + #region GameMatch + /// + /// 异步调用 [POST] /wxa/business/gamematch/creatematchrule 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/gamematch/gamematch.createMatchRule.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGameMatchCreateMatchRuleAsync(this WechatApiClient client, Models.WxaBusinessGameMatchCreateMatchRuleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "gamematch", "creatematchrule") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/business/gamematch/deletematchrule 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/gamematch/gamematch.deleteMatchRule.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGameMatchDeleteMatchRuleAsync(this WechatApiClient client, Models.WxaBusinessGameMatchDeleteMatchRuleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "gamematch", "deletematchrule") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/business/gamematch/getallmatchrule 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/gamematch/gamematch.getAllMatchRule.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGameMatchGetAllMatchRuleAsync(this WechatApiClient client, Models.WxaBusinessGameMatchGetAllMatchRuleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "gamematch", "getallmatchrule") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/business/gamematch/setmatchopenstate 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/gamematch/gamematch.setMatchIdOpenState.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGameMatchSetMatchOpenStateAsync(this WechatApiClient client, Models.WxaBusinessGameMatchSetMatchOpenStateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "gamematch", "setmatchopenstate") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/business/gamematch/updatematchrule 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/gamematch/gamematch.updateMatchRule.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGameMatchUpdateMatchRuleAsync(this WechatApiClient client, Models.WxaBusinessGameMatchUpdateMatchRuleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "gamematch", "updatematchrule") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region LiveBroadcast + /// + /// 异步调用 [POST] /wxa/business/getliveinfo 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#2 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGetLiveInfoAsync(this WechatApiClient client, Models.WxaBusinessGetLiveInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "getliveinfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/business/getliveinfo?action=get_replay 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#3 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGetLiveReplayAsync(this WechatApiClient client, Models.WxaBusinessGetLiveReplayRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + request.Action = "get_replay"; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "getliveinfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/business/get_wxa_followers 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/subscribe-api.html#_1-%E8%8E%B7%E5%8F%96%E9%95%BF%E6%9C%9F%E8%AE%A2%E9%98%85%E7%94%A8%E6%88%B7 + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGetWxaFollowersAsync(this WechatApiClient client, Models.WxaBusinessGetWxaFollowersRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "get_wxa_followers") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Runtime + /// + /// 异步调用 [POST] /wxa/business/runtime/adddevice 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Miniprogram_Frame/deviceId.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessRuntimeAddDeviceAsync(this WechatApiClient client, Models.WxaBusinessRuntimeAddDeviceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "runtime", "adddevice") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaExtensions.cs new file mode 100644 index 00000000..c3c28507 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaExtensions.cs @@ -0,0 +1,852 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + public static class WechatApiClientExecuteWxaExtensions + { + /// + /// 异步调用 [GET] /wxa/checksession 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/login/auth.checkSessionKey.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaCheckSessionAsync(this WechatApiClient client, Models.WxaCheckSessionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxa", "checksession") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("openid", request.OpenId) + .SetQueryParam("signature", request.Signature) + .SetQueryParam("sig_method", request.SignMethod); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxa/getpaidunionid 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/user-info/auth.getPaidUnionId.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/others/User_Management.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGetPaidUnionIdAsync(this WechatApiClient client, Models.WxaGetPaidUnionIdRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxa", "getpaidunionid") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("openid", request.OpenId); + + if (!string.IsNullOrEmpty(request.TransactionId)) + flurlReq.SetQueryParam("transaction_id", request.TransactionId); + else if (!string.IsNullOrEmpty(request.OutTradeNumber)) + flurlReq.SetQueryParam("mch_id", request.MerchantId) + .SetQueryParam("out_trade_no", request.OutTradeNumber); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + #region Plugin + /// + /// 异步调用 [POST] /wxa/plugin?action=apply 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/plugin-management/pluginManager.applyPlugin.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaPluginApplyAsync(this WechatApiClient client, Models.WxaPluginApplyRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + request.Action = "apply"; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "plugin") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/plugin?action=unbind 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/plugin-management/pluginManager.unbindPlugin.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaPluginUnbindAsync(this WechatApiClient client, Models.WxaPluginUnbindRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + request.Action = "unbind"; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "plugin") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/plugin?action=list 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/plugin-management/pluginManager.unbindPlugin.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaPluginListAsync(this WechatApiClient client, Models.WxaPluginListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + request.Action = "list"; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "plugin") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/devplugin?action=dev_apply_list 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/plugin-management/pluginManager.getPluginDevApplyList.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaDevPluginDevApplyListAsync(this WechatApiClient client, Models.WxaDevPluginDevApplyListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + request.Action = "dev_apply_list"; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "devplugin") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/devplugin?action=dev_agree 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/plugin-management/pluginManager.setDevPluginApplyStatus.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaDevPluginDevAgreeAsync(this WechatApiClient client, Models.WxaDevPluginDevAgreeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + request.Action = "dev_agree"; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "devplugin") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/devplugin?action=dev_refuse 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/plugin-management/pluginManager.setDevPluginApplyStatus.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaDevPluginDevRefuseAsync(this WechatApiClient client, Models.WxaDevPluginDevRefuseRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + request.Action = "dev_refuse"; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "devplugin") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/devplugin?action=dev_delete 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/plugin-management/pluginManager.setDevPluginApplyStatus.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaDevPluginDevDeleteAsync(this WechatApiClient client, Models.WxaDevPluginDevDeleteRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + request.Action = "dev_delete"; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "devplugin") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region WxaCode + /// + /// 异步调用 [POST] /wxa/getwxacode 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.get.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/qr-code/wxacode.get.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/qrcode/getwxacode.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGetWxaCodeAsync(this WechatApiClient client, Models.WxaGetWxaCodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "getwxacode") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/getwxacodeunlimit 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.getUnlimited.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/qr-code/wxacode.getUnlimited.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/qrcode/getwxacodeunlimit.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGetWxaCodeUnlimitAsync(this WechatApiClient client, Models.WxaGetWxaCodeUnlimitRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "getwxacodeunlimit") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region UrlScheme + /// + /// 异步调用 [POST] /wxa/generatescheme 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-scheme/urlscheme.generate.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/url-scheme/urlscheme.generate.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGenerateSchemeAsync(this WechatApiClient client, Models.WxaGenerateSchemeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "generatescheme") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region UrlLink + /// + /// 异步调用 [POST] /wxa/generate_urllink 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-link/urllink.generate.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/url-link/urllink.generate.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGenerateUrlLinkAsync(this WechatApiClient client, Models.WxaGenerateUrlLinkRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "generate_urllink") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Security + /// + /// 异步调用 [POST] /wxa/img_sec_check 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.imgSecCheck.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.imgSecCheck.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaImageSecurityCheckAsync(this WechatApiClient client, Models.WxaImageSecurityCheckRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + string filename = Guid.NewGuid().ToString("N").ToLower() + ".png"; + string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x"); + using var fileContent = new ByteArrayContent(request.FileBytes ?? new byte[0]); + using var httpContent = new MultipartFormDataContent(boundary); + httpContent.Add(fileContent, "\"media\"", "\"" + filename + "\""); + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("image/png"); + fileContent.Headers.ContentLength = request.FileBytes?.Length ?? 0; + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "img_sec_check") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/media_check_async 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaMediaCheckAsync(this WechatApiClient client, Models.WxaMediaCheckRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "media_check_async") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/msg_sec_check 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.msgSecCheck.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.msgSecCheck.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaMessageSecurityCheckAsync(this WechatApiClient client, Models.WxaMessageSecurityCheckRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "msg_sec_check") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region RiskControl + /// + /// 异步调用 [POST] /wxa/getuserriskrank 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/safety-control-capability/riskControl.getUserRiskRank.html + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/safety-control-capability/riskControl.getUserRiskRank.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGetUserRiskRankAsync(this WechatApiClient client, Models.WxaGetUserRiskRankRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (string.IsNullOrEmpty(request.AppId)) + request.AppId = client.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "getuserriskrank") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Analysis + /// + /// 异步调用 [POST] /wxa/business/performance/boot 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/analysis.getPerformanceData.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessPerformanceBootAsync(this WechatApiClient client, Models.WxaBusinessPerformanceBootRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "business", "performance", "boot") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region Storage + /// + /// 异步调用 [POST] /wxa/remove_user_storage 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data/storage.removeUserStorage.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaRemoveUserStorageAsync(this WechatApiClient client, Models.WxaRemoveUserStorageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "remove_user_storage") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("openid", request.OpenId) + .SetQueryParam("signature", request.Signature) + .SetQueryParam("sig_method", request.SignMethod); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/setuserinteractivedata 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data/storage.setUserInteractiveData.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaSetUserInteractiveDataAsync(this WechatApiClient client, Models.WxaSetUserInteractiveDataRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "setuserinteractivedata") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("openid", request.OpenId) + .SetQueryParam("signature", request.Signature) + .SetQueryParam("sig_method", request.SignMethod); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/set_user_storage 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data/storage.setUserStorage.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaSetUserStorageAsync(this WechatApiClient client, Models.WxaSetUserStorageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "set_user_storage") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("openid", request.OpenId) + .SetQueryParam("signature", request.Signature) + .SetQueryParam("sig_method", request.SignMethod); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region NearybyPOI + /// + /// 异步调用 [POST] /wxa/addnearbypoi 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/nearby-poi/nearbyPoi.add.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaAddNearbyPOIAsync(this WechatApiClient client, Models.WxaAddNearbyPOIRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "addnearbypoi") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/delnearbypoi 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/nearby-poi/nearbyPoi.delete.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaDeleteNearbyPOIAsync(this WechatApiClient client, Models.WxaDeleteNearbyPOIRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "delnearbypoi") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxa/getnearbypoilist 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/nearby-poi/nearbyPoi.getList.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGetNearbyPOIListAsync(this WechatApiClient client, Models.WxaGetNearbyPOIListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxa", "getnearbypoilist") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("page", request.Page) + .SetQueryParam("page_rows", request.Limit); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/setnearbypoishowstatus 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/nearby-poi/nearbyPoi.setShowStatus.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaSetNearbyPOIShowStatusAsync(this WechatApiClient client, Models.WxaSetNearbyPOIShowStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "setnearbypoishowstatus") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region LockStep + /// + /// 异步调用 [POST] /wxa/createwxagameroom 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/lock-step/lock-step.createGameRoom.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaCreateWxaGameRoomAsync(this WechatApiClient client, Models.WxaCreateWxaGameRoomRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "createwxagameroom") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxa/getwxagameframe 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/lock-step/lock-step.createGameRoom.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGetWxaGameFrameAsync(this WechatApiClient client, Models.WxaGetWxaGameFrameRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxa", "getwxagameframe") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("access_info", request.AccessInformation) + .SetQueryParam("begin_frame_id", request.BeginFrameId) + .SetQueryParam("end_frame_id", request.EndFrameId); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxa/getwxagameidentityinfo 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/lock-step/lock-step.getGameIdentityInfo.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGetWxaGameIdentityInfoAsync(this WechatApiClient client, Models.WxaGetWxaGameIdentityInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxa", "getwxagameidentityinfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("access_info", request.AccessInformation); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [GET] /wxa/getwxagameroominfo 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/lock-step/lock-step.getGameRoomInfo.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGetWxaGameRoomInfoAsync(this WechatApiClient client, Models.WxaGetWxaGameRoomInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxa", "getwxagameroominfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("access_info", request.AccessInformation); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + + #region Operation + /// + /// 异步调用 [GET] /wxa/getwxadevinfo 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/operation/operation.getDomainInfo.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaGetWxaDevInfoAsync(this WechatApiClient client, Models.WxaGetWxaDevInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Get, "wxa", "getwxadevinfo") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + if (!string.IsNullOrEmpty(request.Action)) + flurlReq.SetQueryParam("action", request.Action); + + return await client.SendRequestAsync(flurlReq, cancellationToken: cancellationToken); + } + #endregion + + #region Search + /// + /// 异步调用 [POST] /wxa/imagesearch 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/search/search.imageSearch.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaImageSearchAsync(this WechatApiClient client, Models.WxaImageSearchRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "imagesearch") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + + string boundary = "--BOUNDARY--" + DateTimeOffset.Now.Ticks.ToString("x"); + string filename = "image.png"; + using var httpContent = new MultipartFormDataContent(boundary); + using var fileContent = new ByteArrayContent(request.ImageFileBytes ?? new byte[0]); + httpContent.Add(fileContent, "\"img\"", "\"" + filename + "\""); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("image/png"); + fileContent.Headers.ContentLength = request.ImageFileBytes?.Length ?? 0; + httpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("multipart/form-data; boundary=" + boundary); + + return await client.SendRequestAsync(flurlReq, content: httpContent, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/sitesearch 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/search/search.siteSearch.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaSiteSearchAsync(this WechatApiClient client, Models.WxaSiteSearchRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "sitesearch") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/search/wxaapi_submitpages 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/search/search.submitPages.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaSearchWxaApiSubmitPagesAsync(this WechatApiClient client, Models.WxaSearchWxaApiSubmitPagesRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "search", "wxaapi_submitpages") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + + #region ServiceMarket + /// + /// 异步调用 [POST] /wxa/servicemarket 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/service-market/serviceMarket.invokeService.html + /// REF: https://developers.weixin.qq.com/doc/oplatform/service_market/buyer_guideline/API/invokeService.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaServiceMarketAsync(this WechatApiClient client, Models.WxaServiceMarketRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "servicemarket") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/servicemarketretrieve 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/service_market/buyer_guideline/API/retrieve.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaServiceMarketRetrieveAsync(this WechatApiClient client, Models.WxaServiceMarketRetrieveRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(HttpMethod.Post, "wxa", "servicemarketretrieve") + .SetOptions(request) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientParameterExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientParameterExtensions.cs new file mode 100644 index 00000000..4a8d7a4a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientParameterExtensions.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Web; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.Wechat.Api +{ + /// + /// 为 提供客户端调起 JS-SDK 签名的扩展方法。 + /// + public static class WechatApiClientParameterExtensions + { + /// + /// 生成客户端 JS-SDK 初始化所需的参数。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#62 + /// + /// + /// + /// + /// + public static IDictionary GenerateParametersForJssdkConfigRequest(this WechatApiClient client, string jsapiTicket, string url) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (jsapiTicket is null) throw new ArgumentNullException(nameof(jsapiTicket)); + if (url is null) throw new ArgumentNullException(nameof(url)); + + string timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds().ToString(); + string nonce = Guid.NewGuid().ToString("N"); + string sign = Utilities.Sha1Util.Hash($"jsapi_ticket={jsapiTicket}&noncestr={nonce}×tamp={timestamp}&url={url.Split('#')[0]}").ToLower(); + + return new ReadOnlyDictionary(new Dictionary() + { + { "appId", client.AppId }, + { "timestamp", timestamp }, + { "nonceStr", nonce }, + { "signature", sign } + }); + } + + /// + /// 生成客户端 JS-SDK `wx.chooseInvoice` 接口所需的参数。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Auto-print/API_Documentation.html#_6-4-%E5%8F%91%E7%A5%A8%E7%AD%BE%E5%90%8D%E6%96%B9%E6%B3%95 + /// + /// + /// + /// + public static IDictionary GenerateParametersForJssdkChooseInvoiceRequest(this WechatApiClient client, string wxcardTicket) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (wxcardTicket is null) throw new ArgumentNullException(nameof(wxcardTicket)); + + string timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds().ToString(); + string nonce = Guid.NewGuid().ToString("N"); + string cardType = "INVOICE"; + + SortedSet sortedParams = new SortedSet(); + sortedParams.Add(cardType); + sortedParams.Add(timestamp); + sortedParams.Add(client.AppId); + sortedParams.Add(nonce); + sortedParams.Add(wxcardTicket); + string cardSign = Utilities.Sha1Util.Hash(string.Join(string.Empty, sortedParams)).ToLower(); + + return new ReadOnlyDictionary(new Dictionary() + { + { "timestamp", timestamp }, + { "nonceStr", nonce }, + { "signType", "SHA1" }, + { "cardType", cardType }, + { "cardSign", cardSign } + }); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageAICropRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageAICropRequest.cs new file mode 100644 index 00000000..a1ea133e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageAICropRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/img/aicrop 接口的请求。 + /// + public class CVImageAICropRequest : CVImageQrcodeRequest + { + /// + /// 获取或设置裁剪宽高比列表。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public IList? RatioList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageAICropResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageAICropResponse.cs new file mode 100644 index 00000000..ca87d32b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageAICropResponse.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/img/aicrop 接口的响应。 + /// + public class CVImageAICropResponse : WechatApiResponse + { + public static class Types + { + public class ImageResult + { + /// + /// 获取或设置智能裁剪左边距(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("crop_left")] + [System.Text.Json.Serialization.JsonPropertyName("crop_left")] + public int CropLeft { get; set; } + + /// + /// 获取或设置智能裁剪上边距(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("crop_top")] + [System.Text.Json.Serialization.JsonPropertyName("crop_top")] + public int CropTop { get; set; } + + /// + /// 获取或设置智能裁剪右边距(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("crop_right")] + [System.Text.Json.Serialization.JsonPropertyName("crop_right")] + public int CropRight { get; set; } + + /// + /// 获取或设置智能裁剪左边距(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("crop_bottom")] + [System.Text.Json.Serialization.JsonPropertyName("crop_bottom")] + public int CropBottom { get; set; } + } + + public class ImageSize : CVImageQrcodeResponse.Types.ImageSize + { + } + } + + /// + /// 获取或设置裁剪结果列表。 + /// + [Newtonsoft.Json.JsonProperty("results")] + [System.Text.Json.Serialization.JsonPropertyName("results")] + public Types.ImageResult[] ResultList { get; set; } = default!; + + /// + /// 获取或设置图片大小信息。 + /// + [Newtonsoft.Json.JsonProperty("img_size")] + [System.Text.Json.Serialization.JsonPropertyName("img_size")] + public Types.ImageSize ImageSize { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageQrcodeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageQrcodeRequest.cs new file mode 100644 index 00000000..e4f2e1e8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageQrcodeRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/img/qrcode 接口的请求。 + /// + public class CVImageQrcodeRequest : WechatApiRequest + { + /// + /// 获取或设置要识别的图片 URL。与字段 二选一。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageUrl { get; set; } + + /// + /// 获取或设置要识别的图片文件字节数组。与字段 二选一。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[]? ImageFileBytes { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageQrcodeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageQrcodeResponse.cs new file mode 100644 index 00000000..a1f929ed --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageQrcodeResponse.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/img/qrcode 接口的响应。 + /// + public class CVImageQrcodeResponse : WechatApiResponse + { + public static class Types + { + public class CodeResult + { + public static class Types + { + public class Position + { + public static class Types + { + public class Point + { + /// + /// 获取或设置 X 轴坐标(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("x")] + [System.Text.Json.Serialization.JsonPropertyName("x")] + public int X { get; set; } + + /// + /// 获取或设置 Y 轴桌标(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("y")] + [System.Text.Json.Serialization.JsonPropertyName("y")] + public int Y { get; set; } + } + } + + /// + /// 获取或设置左上角坐标信息。 + /// + [Newtonsoft.Json.JsonProperty("left_top")] + [System.Text.Json.Serialization.JsonPropertyName("left_top")] + public Types.Point LeftTop { get; set; } = default!; + + /// + /// 获取或设置右上角坐标信息。 + /// + [Newtonsoft.Json.JsonProperty("right_top")] + [System.Text.Json.Serialization.JsonPropertyName("right_top")] + public Types.Point RightTop { get; set; } = default!; + + /// + /// 获取或设置右下角坐标信息。 + /// + [Newtonsoft.Json.JsonProperty("right_bottom")] + [System.Text.Json.Serialization.JsonPropertyName("right_bottom")] + public Types.Point RightBottom { get; set; } = default!; + + /// + /// 获取或设置左下角坐标信息。 + /// + [Newtonsoft.Json.JsonProperty("left_bottom")] + [System.Text.Json.Serialization.JsonPropertyName("left_bottom")] + public Types.Point LeftBottom { get; set; } = default!; + } + } + + /// + /// 获取或设置识别类型名称。 + /// + [Newtonsoft.Json.JsonProperty("type_name")] + [System.Text.Json.Serialization.JsonPropertyName("type_name")] + public string TypeName { get; set; } = default!; + + /// + /// 获取或设置识别内容。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// 获取或设置识别坐标信息。 + /// + [Newtonsoft.Json.JsonProperty("pos")] + [System.Text.Json.Serialization.JsonPropertyName("pos")] + public Types.Position? Position { get; set; } + } + + public class ImageSize + { + /// + /// 获取或设置智能裁剪宽度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("w")] + [System.Text.Json.Serialization.JsonPropertyName("w")] + public int Width { get; set; } + + /// + /// 获取或设置智能裁剪高度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("h")] + [System.Text.Json.Serialization.JsonPropertyName("h")] + public int Height { get; set; } + } + } + + /// + /// 获取或设置识别结果列表。 + /// + [Newtonsoft.Json.JsonProperty("code_results")] + [System.Text.Json.Serialization.JsonPropertyName("code_results")] + public Types.CodeResult[] ResultList { get; set; } = default!; + + /// + /// 获取或设置图片大小信息。 + /// + [Newtonsoft.Json.JsonProperty("img_size")] + [System.Text.Json.Serialization.JsonPropertyName("img_size")] + public Types.ImageSize ImageSize { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageSuperResolutionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageSuperResolutionRequest.cs new file mode 100644 index 00000000..db8e337d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageSuperResolutionRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/img/superresolution 接口的请求。 + /// + public class CVImageSuperResolutionRequest : CVImageQrcodeRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageSuperResolutionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageSuperResolutionResponse.cs new file mode 100644 index 00000000..5897b246 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/Image/CVImageSuperResolutionResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/img/superresolution 接口的响应。 + /// + public class CVImageSuperResolutionResponse : WechatApiResponse + { + /// + /// 获取或设置超清化图片媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBankCardRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBankCardRequest.cs new file mode 100644 index 00000000..3aa2728f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBankCardRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/bankcard 接口的请求。 + /// + public class CVOCRBankCardRequest : CVOCRIdCardRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBankCardResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBankCardResponse.cs new file mode 100644 index 00000000..4ce887b2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBankCardResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/bankcard 接口的响应。 + /// + public class CVOCRBankCardResponse : WechatApiResponse + { + /// + /// 获取或设置银行卡号。 + /// + [Newtonsoft.Json.JsonProperty("number")] + [System.Text.Json.Serialization.JsonPropertyName("number")] + public string BankNumber { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBusinessLicenseRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBusinessLicenseRequest.cs new file mode 100644 index 00000000..44a71cf5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBusinessLicenseRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/bizlicense 接口的请求。 + /// + public class CVOCRBusinessLicenseRequest : CVOCRIdCardRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBusinessLicenseResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBusinessLicenseResponse.cs new file mode 100644 index 00000000..e7650740 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRBusinessLicenseResponse.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/bizlicense 接口的响应。 + /// + public class CVOCRBusinessLicenseResponse : WechatApiResponse + { + public static class Types + { + public class CertificationPosition + { + public static class Types + { + public class Position : CVImageQrcodeResponse.Types.CodeResult.Types.Position + { + } + } + + /// + /// 获取或设置识别坐标信息。 + /// + [Newtonsoft.Json.JsonProperty("pos")] + [System.Text.Json.Serialization.JsonPropertyName("pos")] + public Types.Position Position { get; set; } = default!; + } + + public class ImageSize : CVImageQrcodeResponse.Types.ImageSize + { + } + } + + /// + /// 获取或设置注册号。 + /// + [Newtonsoft.Json.JsonProperty("reg_num")] + [System.Text.Json.Serialization.JsonPropertyName("reg_num")] + public string RegistrationNumber { get; set; } = default!; + + /// + /// 获取或设置编号。 + /// + [Newtonsoft.Json.JsonProperty("serial")] + [System.Text.Json.Serialization.JsonPropertyName("serial")] + public string SerialNumber { get; set; } = default!; + + /// + /// 获取或设置法定代表人姓名。 + /// + [Newtonsoft.Json.JsonProperty("legal_representative")] + [System.Text.Json.Serialization.JsonPropertyName("legal_representative")] + public string LegalRepresentative { get; set; } = default!; + + /// + /// 获取或设置组成形式。 + /// + [Newtonsoft.Json.JsonProperty("type_of_organization")] + [System.Text.Json.Serialization.JsonPropertyName("type_of_organization")] + public string OrganizationType { get; set; } = default!; + + /// + /// 获取或设置企业名称。 + /// + [Newtonsoft.Json.JsonProperty("enterprise_name")] + [System.Text.Json.Serialization.JsonPropertyName("enterprise_name")] + public string EnterpriseName { get; set; } = default!; + + /// + /// 获取或设置公司类型。 + /// + [Newtonsoft.Json.JsonProperty("type_of_enterprise")] + [System.Text.Json.Serialization.JsonPropertyName("type_of_enterprise")] + public string EnterpriseType { get; set; } = default!; + + /// + /// 获取或设置经营场所或企业住所。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string Address { get; set; } = default!; + + /// + /// 获取或设置经营范围。 + /// + [Newtonsoft.Json.JsonProperty("business_scope")] + [System.Text.Json.Serialization.JsonPropertyName("business_scope")] + public string BusinessScope { get; set; } = default!; + + /// + /// 获取或设置注册资本。 + /// + [Newtonsoft.Json.JsonProperty("registered_capital")] + [System.Text.Json.Serialization.JsonPropertyName("registered_capital")] + public string RegisteredCapital { get; set; } = default!; + + /// + /// 获取或设置实收资本。 + /// + [Newtonsoft.Json.JsonProperty("paid_in_capital")] + [System.Text.Json.Serialization.JsonPropertyName("paid_in_capital")] + public string? PaidInCapital { get; set; } + + /// + /// 获取或设置营业期限。 + /// + [Newtonsoft.Json.JsonProperty("valid_period")] + [System.Text.Json.Serialization.JsonPropertyName("valid_period")] + public string ValidDate { get; set; } = default!; + + /// + /// 获取或设置注册日期。 + /// + [Newtonsoft.Json.JsonProperty("registered_date")] + [System.Text.Json.Serialization.JsonPropertyName("registered_date")] + public string RegisteredDate { get; set; } = default!; + + /// + /// 获取或设置营业执照位置信息。 + /// + [Newtonsoft.Json.JsonProperty("cert_position")] + [System.Text.Json.Serialization.JsonPropertyName("cert_position")] + public Types.CertificationPosition? CertificationPosition { get; set; } + + /// + /// 获取或设置图片大小信息。 + /// + [Newtonsoft.Json.JsonProperty("img_size")] + [System.Text.Json.Serialization.JsonPropertyName("img_size")] + public Types.ImageSize ImageSize { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRCommonRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRCommonRequest.cs new file mode 100644 index 00000000..a0560419 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRCommonRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/comm 接口的请求。 + /// + public class CVOCRCommonRequest : WechatApiRequest + { + /// + /// 获取或设置要识别的图片 URL。与字段 二选一。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageUrl { get; set; } + + /// + /// 获取或设置要识别的图片文件字节数组。与字段 二选一。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[]? ImageFileBytes { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRCommonResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRCommonResponse.cs new file mode 100644 index 00000000..a53fa524 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRCommonResponse.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/bankcard 接口的响应。 + /// + public class CVOCRCommonResponse : WechatApiResponse + { + public static class Types + { + public class Result + { + public static class Types + { + public class Position : CVImageQrcodeResponse.Types.CodeResult.Types.Position + { + } + } + + /// + /// 获取或设置识别文本信息。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string Text { get; set; } = default!; + + /// + /// 获取或设置识别坐标信息。 + /// + [Newtonsoft.Json.JsonProperty("pos")] + [System.Text.Json.Serialization.JsonPropertyName("pos")] + public Types.Position Position { get; set; } = default!; + } + + public class ImageSize : CVImageQrcodeResponse.Types.ImageSize + { + } + } + + /// + /// 获取或设置识别结果列表。 + /// + [Newtonsoft.Json.JsonProperty("items")] + [System.Text.Json.Serialization.JsonPropertyName("items")] + public Types.Result[] ResultList { get; set; } = default!; + + /// + /// 获取或设置图片大小信息。 + /// + [Newtonsoft.Json.JsonProperty("img_size")] + [System.Text.Json.Serialization.JsonPropertyName("img_size")] + public Types.ImageSize ImageSize { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingLicenseRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingLicenseRequest.cs new file mode 100644 index 00000000..20ec67c4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingLicenseRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/drivinglicense 接口的请求。 + /// + public class CVOCRDrivingLicenseRequest : CVOCRIdCardRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingLicenseResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingLicenseResponse.cs new file mode 100644 index 00000000..099e33d4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingLicenseResponse.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/drivinglicense 接口的响应。 + /// + public class CVOCRDrivingLicenseResponse : WechatApiResponse + { + /// + /// 获取或设置证件号。 + /// + [Newtonsoft.Json.JsonProperty("id_num")] + [System.Text.Json.Serialization.JsonPropertyName("id_num")] + public string IdNumber { get; set; } = default!; + + /// + /// 获取或设置姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置性别。 + /// + [Newtonsoft.Json.JsonProperty("sex")] + [System.Text.Json.Serialization.JsonPropertyName("sex")] + public string Sex { get; set; } = default!; + + /// + /// 获取或设置国籍。 + /// + [Newtonsoft.Json.JsonProperty("nationality")] + [System.Text.Json.Serialization.JsonPropertyName("nationality")] + public string Nationality { get; set; } = default!; + + /// + /// 获取或设置地址。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string Address { get; set; } = default!; + + /// + /// 获取或设置出生日期。 + /// + [Newtonsoft.Json.JsonProperty("birth_date")] + [System.Text.Json.Serialization.JsonPropertyName("birth_date")] + public string BirthDate { get; set; } = default!; + + /// + /// 获取或设置初次领证日期。 + /// + [Newtonsoft.Json.JsonProperty("issue_date")] + [System.Text.Json.Serialization.JsonPropertyName("issue_date")] + public string IssueDate { get; set; } = default!; + + /// + /// 获取或设置准驾车型。 + /// + [Newtonsoft.Json.JsonProperty("car_class")] + [System.Text.Json.Serialization.JsonPropertyName("car_class")] + public string CarClass { get; set; } = default!; + + /// + /// 获取或设置有效期限起始日。 + /// + [Newtonsoft.Json.JsonProperty("valid_from")] + [System.Text.Json.Serialization.JsonPropertyName("valid_from")] + public string ValidDateFrom { get; set; } = default!; + + /// + /// 获取或设置有效期限终止日。 + /// + [Newtonsoft.Json.JsonProperty("valid_to")] + [System.Text.Json.Serialization.JsonPropertyName("valid_to")] + public string ValidDateTo { get; set; } = default!; + + /// + /// 获取或设置印章文构。 + /// + [Newtonsoft.Json.JsonProperty("official_seal")] + [System.Text.Json.Serialization.JsonPropertyName("official_seal")] + public string OfficialSeal { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingRequest.cs new file mode 100644 index 00000000..a26ba375 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/driving 接口的请求。 + /// + public class CVOCRDrivingRequest : CVOCRIdCardRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingResponse.cs new file mode 100644 index 00000000..be7baebe --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRDrivingResponse.cs @@ -0,0 +1,168 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/driving 接口的响应。 + /// + public class CVOCRDrivingResponse : WechatApiResponse + { + public static class Types + { + public class CardPosition + { + public static class Types + { + public class Position : CVImageQrcodeResponse.Types.CodeResult.Types.Position + { + } + } + + /// + /// 获取或设置识别坐标信息。 + /// + [Newtonsoft.Json.JsonProperty("pos")] + [System.Text.Json.Serialization.JsonPropertyName("pos")] + public Types.Position Position { get; set; } = default!; + } + + public class ImageSize : CVImageQrcodeResponse.Types.ImageSize + { + } + } + + /// + /// 获取或设置车牌号码。 + /// + [Newtonsoft.Json.JsonProperty("plate_num")] + [System.Text.Json.Serialization.JsonPropertyName("plate_num")] + public string PlateNumber { get; set; } = default!; + + /// + /// 获取或设置车辆类型。 + /// + [Newtonsoft.Json.JsonProperty("vehicle_type")] + [System.Text.Json.Serialization.JsonPropertyName("vehicle_type")] + public string VehicleType { get; set; } = default!; + + /// + /// 获取或设置所有人。 + /// + [Newtonsoft.Json.JsonProperty("owner")] + [System.Text.Json.Serialization.JsonPropertyName("owner")] + public string Owner { get; set; } = default!; + + /// + /// 获取或设置住址。 + /// + [Newtonsoft.Json.JsonProperty("addr")] + [System.Text.Json.Serialization.JsonPropertyName("addr")] + public string Address { get; set; } = default!; + + /// + /// 获取或设置使用性质。 + /// + [Newtonsoft.Json.JsonProperty("use_character")] + [System.Text.Json.Serialization.JsonPropertyName("use_character")] + public string UseCharacter { get; set; } = default!; + + /// + /// 获取或设置品牌型号。 + /// + [Newtonsoft.Json.JsonProperty("model")] + [System.Text.Json.Serialization.JsonPropertyName("model")] + public string VehicleModel { get; set; } = default!; + + /// + /// 获取或设置车辆识别代号。 + /// + [Newtonsoft.Json.JsonProperty("vin")] + [System.Text.Json.Serialization.JsonPropertyName("vin")] + public string VIN { get; set; } = default!; + + /// + /// 获取或设置发动机号码。 + /// + [Newtonsoft.Json.JsonProperty("engine_num")] + [System.Text.Json.Serialization.JsonPropertyName("engine_num")] + public string EngineNumber { get; set; } = default!; + + /// + /// 获取或设置注册日期。 + /// + [Newtonsoft.Json.JsonProperty("register_date")] + [System.Text.Json.Serialization.JsonPropertyName("register_date")] + public string RegisterDate { get; set; } = default!; + + /// + /// 获取或设置发证日期。 + /// + [Newtonsoft.Json.JsonProperty("issue_date")] + [System.Text.Json.Serialization.JsonPropertyName("issue_date")] + public string IssueDate { get; set; } = default!; + + /// + /// 获取或设置车牌号码。 + /// + [Newtonsoft.Json.JsonProperty("plate_num_b")] + [System.Text.Json.Serialization.JsonPropertyName("plate_num_b")] + public string PlateNumberB { get; set; } = default!; + + /// + /// 获取或设置号牌。 + /// + [Newtonsoft.Json.JsonProperty("record")] + [System.Text.Json.Serialization.JsonPropertyName("record")] + public string Record { get; set; } = default!; + + /// + /// 获取或设置核定载人数。 + /// + [Newtonsoft.Json.JsonProperty("passengers_num")] + [System.Text.Json.Serialization.JsonPropertyName("passengers_num")] + public string Passengers { get; set; } = default!; + + /// + /// 获取或设置总质量。 + /// + [Newtonsoft.Json.JsonProperty("total_quality")] + [System.Text.Json.Serialization.JsonPropertyName("total_quality")] + public string TotalQuality { get; set; } = default!; + + /// + /// 获取或设置整备质量。 + /// + [Newtonsoft.Json.JsonProperty("prepare_quality")] + [System.Text.Json.Serialization.JsonPropertyName("prepare_quality")] + public string PrepareQuality { get; set; } = default!; + + /// + /// 获取或设置外廓尺寸。 + /// + [Newtonsoft.Json.JsonProperty("overall_size")] + [System.Text.Json.Serialization.JsonPropertyName("overall_size")] + public string OverallSize { get; set; } = default!; + + /// + /// 获取或设置卡片正面位置信息。 + /// + [Newtonsoft.Json.JsonProperty("card_position_front")] + [System.Text.Json.Serialization.JsonPropertyName("card_position_front")] + public Types.CardPosition? CardFrontPosition { get; set; } + + /// + /// 获取或设置卡片反面位置信息。 + /// + [Newtonsoft.Json.JsonProperty("card_position_back")] + [System.Text.Json.Serialization.JsonPropertyName("card_position_back")] + public Types.CardPosition? CardBackPosition { get; set; } + + /// + /// 获取或设置图片大小信息。 + /// + [Newtonsoft.Json.JsonProperty("img_size")] + [System.Text.Json.Serialization.JsonPropertyName("img_size")] + public Types.ImageSize ImageSize { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRIdCardRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRIdCardRequest.cs new file mode 100644 index 00000000..b534a631 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRIdCardRequest.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/idcard 接口的请求。 + /// + public class CVOCRIdCardRequest : CVOCRCommonRequest + { + /// + /// 获取或设置图片识别模式。 + /// 默认值:photo + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ImageMode { get; set; } = "photo"; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRIdCardResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRIdCardResponse.cs new file mode 100644 index 00000000..3f68c124 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRIdCardResponse.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/idcard 接口的响应。 + /// + public class CVOCRIdCardResponse : WechatApiResponse + { + public static class Types + { + public class CertificationPosition + { + public static class Types + { + public class Position : CVImageQrcodeResponse.Types.CodeResult.Types.Position + { + } + } + + /// + /// 获取或设置识别坐标信息。 + /// + [Newtonsoft.Json.JsonProperty("pos")] + [System.Text.Json.Serialization.JsonPropertyName("pos")] + public Types.Position Position { get; set; } = default!; + } + + public class ImageSize : CVImageQrcodeResponse.Types.ImageSize + { + } + } + + /// + /// 获取或设置正反面类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置身份证号。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string? IdNumber { get; set; } + + /// + /// 获取或设置姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// 获取或设置住址。 + /// + [Newtonsoft.Json.JsonProperty("addr")] + [System.Text.Json.Serialization.JsonPropertyName("addr")] + public string? Address { get; set; } + + /// + /// 获取或设置性别。 + /// + [Newtonsoft.Json.JsonProperty("gender")] + [System.Text.Json.Serialization.JsonPropertyName("gender")] + public string? Gender { get; set; } + + /// + /// 获取或设置民族。 + /// + [Newtonsoft.Json.JsonProperty("nationality")] + [System.Text.Json.Serialization.JsonPropertyName("nationality")] + public string? Nationality { get; set; } + + /// + /// 获取或设置有效期至。 + /// + [Newtonsoft.Json.JsonProperty("valid_date")] + [System.Text.Json.Serialization.JsonPropertyName("valid_date")] + public string? ValidDate { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRPlateNumberRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRPlateNumberRequest.cs new file mode 100644 index 00000000..3b80480f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRPlateNumberRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/platenum 接口的请求。 + /// + public class CVOCRPlateNumberRequest : CVOCRCommonRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRPlateNumberResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRPlateNumberResponse.cs new file mode 100644 index 00000000..8962fcf8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CV/OCR/CVOCRPlateNumberResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cv/ocr/platenum 接口的响应。 + /// + public class CVOCRPlateNumberResponse : WechatApiResponse + { + /// + /// 获取或设置车牌号。 + /// + [Newtonsoft.Json.JsonProperty("number")] + [System.Text.Json.Serialization.JsonPropertyName("number")] + public string PlateNumber { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardBatchGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardBatchGetRequest.cs new file mode 100644 index 00000000..effdffdf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardBatchGetRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/batchget 接口的请求。 + /// + public class CardBatchGetRequest : WechatApiRequest + { + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Limit { get; set; } = 10; + + /// + /// 获取或设置指定状态列表。 + /// + [Newtonsoft.Json.JsonProperty("status_list")] + [System.Text.Json.Serialization.JsonPropertyName("status_list")] + public IList? StatusList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardBatchGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardBatchGetResponse.cs new file mode 100644 index 00000000..57abf03c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardBatchGetResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/batchget 接口的响应。 + /// + public class CardBatchGetResponse : WechatApiResponse + { + /// + /// 获取或设置卡券模板编号 列表。 + /// + [Newtonsoft.Json.JsonProperty("card_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("card_id_list")] + public string[] CardIdList { get; set; } = default!; + + /// + /// 获取或设置卡券总数。 + /// + [Newtonsoft.Json.JsonProperty("total_num")] + [System.Text.Json.Serialization.JsonPropertyName("total_num")] + public int Total { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardCreateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardCreateRequest.cs new file mode 100644 index 00000000..d341db5d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardCreateRequest.cs @@ -0,0 +1,1436 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/create 接口的请求。 + /// + public class CardCreateRequest : WechatApiRequest + { + public static class Types + { + public class Card + { + /// + /// 获取或设置卡券类型。 + /// + [Newtonsoft.Json.JsonProperty("card_type")] + [System.Text.Json.Serialization.JsonPropertyName("card_type")] + public string CardType { get; set; } = string.Empty; + + /// + /// 获取或设置团购券信息。 + /// + [Newtonsoft.Json.JsonProperty("groupon")] + [System.Text.Json.Serialization.JsonPropertyName("groupon")] + public GrouponCard? Groupon { get; set; } + + /// + /// 获取或设置代金券信息。 + /// + [Newtonsoft.Json.JsonProperty("cash")] + [System.Text.Json.Serialization.JsonPropertyName("cash")] + public CashCard? Cash { get; set; } + + /// + /// 获取或设置折扣券信息。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public DiscountCard? Discount { get; set; } + + /// + /// 获取或设置兑换券信息。 + /// + [Newtonsoft.Json.JsonProperty("gift")] + [System.Text.Json.Serialization.JsonPropertyName("gift")] + public GiftCard? Gift { get; set; } + + /// + /// 获取或设置优惠券信息。 + /// + [Newtonsoft.Json.JsonProperty("general_coupon")] + [System.Text.Json.Serialization.JsonPropertyName("general_coupon")] + public GeneralCouponCard? GeneralCoupon { get; set; } + + /// + /// 获取或设置礼品卡信息。 + /// + [Newtonsoft.Json.JsonProperty("general_card")] + [System.Text.Json.Serialization.JsonPropertyName("general_card")] + public GeneralCard? GeneralCard { get; set; } + + /// + /// 获取或设置会员卡信息。 + /// + [Newtonsoft.Json.JsonProperty("member_card")] + [System.Text.Json.Serialization.JsonPropertyName("member_card")] + public MembershipCard? Membership { get; set; } + + /// + /// 获取或设置会议门票信息。 + /// + [Newtonsoft.Json.JsonProperty("meeting_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("meeting_ticket")] + public MeetingTicketCard? MeetingTicket { get; set; } + + /// + /// 获取或设置景区门票信息。 + /// + [Newtonsoft.Json.JsonProperty("scenic_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("scenic_ticket")] + public ScenicTicketCard? ScenicTicket { get; set; } + + /// + /// 获取或设置电影票信息。 + /// + [Newtonsoft.Json.JsonProperty("movie_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("movie_ticket")] + public MovieTicketCard? MovieTicket { get; set; } + + /// + /// 获取或设置飞机票信息。 + /// + [Newtonsoft.Json.JsonProperty("boarding_pass")] + [System.Text.Json.Serialization.JsonPropertyName("boarding_pass")] + public BoardingPassCard? BoardingPass { get; set; } + } + + public class GrouponCard + { + public static class Types + { + public class Base + { + public static class Types + { + public class SubMerchant + { + /// + /// 获取或设置子商户 ID。 + /// + [Newtonsoft.Json.JsonProperty("merchant_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] + public string SubMerchantId { get; set; } = string.Empty; + } + + public class SKU + { + /// + /// 获取或设置卡券库存的数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } = 100000000; + } + + public class Date + { + /// + /// 获取或设置使用时间的类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置起用时间戳。 + /// + [Newtonsoft.Json.JsonProperty("begin_timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("begin_timestamp")] + public long? BeginTimestamp { get; set; } + + /// + /// 获取或设置过期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("end_timestamp")] + public long? EndTimestamp { get; set; } + + /// + /// 获取或设置自领取后 N 天内有效。 + /// + [Newtonsoft.Json.JsonProperty("fixed_term")] + [System.Text.Json.Serialization.JsonPropertyName("fixed_term")] + public int? AvailableDaysAfterReceive { get; set; } + + /// + /// 获取或设置自领取后 N 天后生效。 + /// + [Newtonsoft.Json.JsonProperty("fixed_begin_term")] + [System.Text.Json.Serialization.JsonPropertyName("fixed_begin_term")] + public int? WaitDaysAfterReceive { get; set; } + } + } + + /// + /// 获取或设置子商户信息。 + /// + [Newtonsoft.Json.JsonProperty("sub_merchant_info")] + [System.Text.Json.Serialization.JsonPropertyName("sub_merchant_info")] + public Types.SubMerchant? SubMerchant { get; set; } + + /// + /// 获取或设置商户 Logo URL。 + /// + [Newtonsoft.Json.JsonProperty("logo_url")] + [System.Text.Json.Serialization.JsonPropertyName("logo_url")] + public string LogoUrl { get; set; } = string.Empty; + + /// + /// 获取或设置码型。 + /// + [Newtonsoft.Json.JsonProperty("code_type")] + [System.Text.Json.Serialization.JsonPropertyName("code_type")] + public string CodeType { get; set; } = string.Empty; + + /// + /// 获取或设置商户名字。 + /// + [Newtonsoft.Json.JsonProperty("brand_name")] + [System.Text.Json.Serialization.JsonPropertyName("brand_name")] + public string BrandName { get; set; } = string.Empty; + + /// + /// 获取或设置卡券名。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置卡券颜色。 + /// + [Newtonsoft.Json.JsonProperty("color")] + [System.Text.Json.Serialization.JsonPropertyName("color")] + public string Color { get; set; } = string.Empty; + + /// + /// 获取或设置卡券使用提醒。 + /// + [Newtonsoft.Json.JsonProperty("notice")] + [System.Text.Json.Serialization.JsonPropertyName("notice")] + public string Notice { get; set; } = string.Empty; + + /// + /// 获取或设置卡券使用说明。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = string.Empty; + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("sku")] + [System.Text.Json.Serialization.JsonPropertyName("sku")] + public Types.SKU SKU { get; set; } = new Types.SKU(); + + /// + /// 获取或设置使用日期信息。 + /// + [Newtonsoft.Json.JsonProperty("date_info")] + [System.Text.Json.Serialization.JsonPropertyName("date_info")] + public Types.Date Date { get; set; } = new Types.Date(); + + /// + /// 获取或设置是否自定义券码。 + /// + [Newtonsoft.Json.JsonProperty("use_custom_code")] + [System.Text.Json.Serialization.JsonPropertyName("use_custom_code")] + public bool? UseCustomCode { get; set; } + + /// + /// 获取或设置自定义券码模式。 + /// + [Newtonsoft.Json.JsonProperty("get_custom_code_mode")] + [System.Text.Json.Serialization.JsonPropertyName("get_custom_code_mode")] + public string? GetCustomCodeMode { get; set; } + + /// + /// 获取或设置是否指定用户领取。 + /// + [Newtonsoft.Json.JsonProperty("bind_openid")] + [System.Text.Json.Serialization.JsonPropertyName("bind_openid")] + public bool? IsBindOpenId { get; set; } + + /// + /// 获取或设置客服电话。 + /// + [Newtonsoft.Json.JsonProperty("service_phone")] + [System.Text.Json.Serialization.JsonPropertyName("service_phone")] + public string? ServicePhoneNumber { get; set; } + + /// + /// 获取或设置门店 Id 列表。 + /// + [Newtonsoft.Json.JsonProperty("location_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("location_id_list")] + public IList? POIIdList { get; set; } + + /// + /// 获取或设置是否支持全部门店。 + /// + [Newtonsoft.Json.JsonProperty("use_all_locations")] + [System.Text.Json.Serialization.JsonPropertyName("use_all_locations")] + public bool? UseAllPOIs { get; set; } + + /// + /// 获取或设置显示在顶部居中的按钮文字。 + /// + [Newtonsoft.Json.JsonProperty("center_title")] + [System.Text.Json.Serialization.JsonPropertyName("center_title")] + public string? CenterTitle { get; set; } + + /// + /// 获取或设置显示在入口下方的提示语。 + /// + [Newtonsoft.Json.JsonProperty("center_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("center_sub_title")] + public string? CenterSubTitle { get; set; } + + /// + /// 获取或设置顶部居中的 URL。 + /// + [Newtonsoft.Json.JsonProperty("center_url")] + [System.Text.Json.Serialization.JsonPropertyName("center_url")] + public string? CenterUrl { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的原始 ID。 + /// + [Newtonsoft.Json.JsonProperty("center_app_brand_user_name")] + [System.Text.Json.Serialization.JsonPropertyName("center_app_brand_user_name")] + public string? CenterBrandMiniProgramUsername { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的页面路径。 + /// + [Newtonsoft.Json.JsonProperty("center_app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("center_app_brand_pass")] + public string? CenterBrandMiniProgramPath { get; set; } + + /// + /// 获取或设置自定义跳转外链的入口名字。 + /// + [Newtonsoft.Json.JsonProperty("custom_url_name")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url_name")] + public string? CustomUrlTitle { get; set; } + + /// + /// 获取或设置自定义跳转外链的入口右侧提示语。 + /// + [Newtonsoft.Json.JsonProperty("custom_url_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url_sub_title")] + public string? CustomUrlSubTitle { get; set; } + + /// + /// 获取或设置自定义跳转外链。 + /// + [Newtonsoft.Json.JsonProperty("custom_url")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url")] + public string? CustomUrl { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的原始 ID。 + /// + [Newtonsoft.Json.JsonProperty("custom_app_brand_user_name")] + [System.Text.Json.Serialization.JsonPropertyName("custom_app_brand_user_name")] + public string? CustomBrandMiniProgramUsername { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的页面路径。 + /// + [Newtonsoft.Json.JsonProperty("custom_app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("custom_app_brand_pass")] + public string? CustomBrandMiniProgramPath { get; set; } + + /// + /// 获取或设置营销场景的入口名称。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url_name")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url_name")] + public string? PromotionUrlTitle { get; set; } + + /// + /// 获取或设置营销场景的入口右侧的提示语。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url_sub_title")] + public string? PromotionUrlSubTitle { get; set; } + + /// + /// 获取或设置营销场景外链。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url")] + public string? PromotionUrl { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的原始 ID。 + /// + [Newtonsoft.Json.JsonProperty("promotion_app_brand_user_name")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_app_brand_user_name")] + public string? PromotionBrandMiniProgramUsername { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的页面路径。 + /// + [Newtonsoft.Json.JsonProperty("promotion_app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_app_brand_pass")] + public string? PromotionBrandMiniProgramPath { get; set; } + + /// + /// 获取或设置每人可领券的数量限制。 + /// + [Newtonsoft.Json.JsonProperty("get_limit")] + [System.Text.Json.Serialization.JsonPropertyName("get_limit")] + public int? GetLimitPerUser { get; set; } + + /// + /// 获取或设置每人可核销的数量限制。 + /// + [Newtonsoft.Json.JsonProperty("use_limit")] + [System.Text.Json.Serialization.JsonPropertyName("use_limit")] + public int? UseLimitPerUser { get; set; } + + /// + /// 获取或设置卡券领取页面是否可分享。 + /// + [Newtonsoft.Json.JsonProperty("can_share")] + [System.Text.Json.Serialization.JsonPropertyName("can_share")] + public bool? CanShare { get; set; } + + /// + /// 获取或设置卡券是否可转赠。 + /// + [Newtonsoft.Json.JsonProperty("can_give_friend")] + [System.Text.Json.Serialization.JsonPropertyName("can_give_friend")] + public bool? CanTransfer { get; set; } + + /// + /// 获取或设置第三方来源名。 + /// + [Newtonsoft.Json.JsonProperty("source")] + [System.Text.Json.Serialization.JsonPropertyName("source")] + public string? Source { get; set; } + } + + public class Advance + { + public static class Types + { + public class UseCondition + { + /// + /// 获取或设置可用的商品类目。 + /// + [Newtonsoft.Json.JsonProperty("accept_category")] + [System.Text.Json.Serialization.JsonPropertyName("accept_category")] + public string? AcceptCategory { get; set; } + + /// + /// 获取或设置不可用的商品类目。 + /// + [Newtonsoft.Json.JsonProperty("reject_category")] + [System.Text.Json.Serialization.JsonPropertyName("reject_category")] + public string? RejectCategory { get; set; } + + /// + /// 获取或设置满减门槛(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("least_cost")] + [System.Text.Json.Serialization.JsonPropertyName("least_cost")] + public int LeastCost { get; set; } + + /// + /// 获取或设置可用类型门槛。 + /// + [Newtonsoft.Json.JsonProperty("object_use_for")] + [System.Text.Json.Serialization.JsonPropertyName("object_use_for")] + public string? ObjectUseFor { get; set; } + + /// + /// 获取或设置是否可与其他类型共享门槛。 + /// + [Newtonsoft.Json.JsonProperty("can_use_with_other_discount")] + [System.Text.Json.Serialization.JsonPropertyName("can_use_with_other_discount")] + public bool? CanUseWithOtherDiscount { get; set; } + } + + public class Abstract + { + /// + /// 获取或设置封面摘要简介。 + /// + [Newtonsoft.Json.JsonProperty("abstract")] + [System.Text.Json.Serialization.JsonPropertyName("abstract")] + public string Description { get; set; } = string.Empty; + + /// + /// 获取或设置封面图片 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("icon_url_list")] + [System.Text.Json.Serialization.JsonPropertyName("icon_url_list")] + public IList? IconUrlList { get; set; } + } + + public class TextImage + { + /// + /// 获取或设置图片描述。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string Text { get; set; } = string.Empty; + + /// + /// 获取或设置封面图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("image_url")] + [System.Text.Json.Serialization.JsonPropertyName("image_url")] + public string ImageUrl { get; set; } = string.Empty; + } + + public class TimeLimit + { + /// + /// 获取或设置限制类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置起始时间小时(格式:H)。 + /// + [Newtonsoft.Json.JsonProperty("begin_hour")] + [System.Text.Json.Serialization.JsonPropertyName("begin_hour")] + public int? BeginHour { get; set; } + + /// + /// 获取或设置起始时间分钟(格式:m)。 + /// + [Newtonsoft.Json.JsonProperty("begin_minute")] + [System.Text.Json.Serialization.JsonPropertyName("begin_minute")] + public int? BeginMinute { get; set; } + + /// + /// 获取或设置结束时间小时(格式:H)。 + /// + [Newtonsoft.Json.JsonProperty("end_hour")] + [System.Text.Json.Serialization.JsonPropertyName("end_hour")] + public int? EndHour { get; set; } + + /// + /// 获取或设置结束时间小时(格式:m)。 + /// + [Newtonsoft.Json.JsonProperty("end_minute")] + [System.Text.Json.Serialization.JsonPropertyName("end_minute")] + public int? EndMinute { get; set; } + } + } + + /// + /// 获取或设置使用门槛信息。 + /// + [Newtonsoft.Json.JsonProperty("use_condition")] + [System.Text.Json.Serialization.JsonPropertyName("use_condition")] + public Types.UseCondition? UseCondition { get; set; } + + /// + /// 获取或设置封面摘要信息。 + /// + [Newtonsoft.Json.JsonProperty("abstract")] + [System.Text.Json.Serialization.JsonPropertyName("abstract")] + public Types.Abstract? Abstract { get; set; } + + /// + /// 获取或设置图文列表。 + /// + [Newtonsoft.Json.JsonProperty("text_image_list")] + [System.Text.Json.Serialization.JsonPropertyName("text_image_list")] + public IList? TextImageList { get; set; } + + /// + /// 获取或设置商家服务类型。 + /// + [Newtonsoft.Json.JsonProperty("business_service")] + [System.Text.Json.Serialization.JsonPropertyName("business_service")] + public IList? BusinessServiceList { get; set; } + + /// + /// 获取或设置使用时段限制列表。 + /// + [Newtonsoft.Json.JsonProperty("time_limit")] + [System.Text.Json.Serialization.JsonPropertyName("time_limit")] + public IList? TimeLimitList { get; set; } + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置团购详情。 + /// + [Newtonsoft.Json.JsonProperty("deal_detail")] + [System.Text.Json.Serialization.JsonPropertyName("deal_detail")] + public string DealDetail { get; set; } = string.Empty; + } + + public class CashCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置起用金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("least_cost")] + [System.Text.Json.Serialization.JsonPropertyName("least_cost")] + public int LeastCost { get; set; } + + /// + /// 获取或设置减免金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("reduce_cost")] + [System.Text.Json.Serialization.JsonPropertyName("reduce_cost")] + public int ReduceCost { get; set; } + } + + public class DiscountCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置打折额度。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public int Discount { get; set; } + } + + public class GiftCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置兑换内容。 + /// + [Newtonsoft.Json.JsonProperty("gift")] + [System.Text.Json.Serialization.JsonPropertyName("gift")] + public string GiftDetail { get; set; } = string.Empty; + } + + public class GeneralCouponCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置优惠详情。 + /// + [Newtonsoft.Json.JsonProperty("default_detail")] + [System.Text.Json.Serialization.JsonPropertyName("default_detail")] + public string DefaultDetail { get; set; } = string.Empty; + } + + public class GeneralCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + public new static class Types + { + public class GiftCard + { + /// + /// 获取或设置礼品卡价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public int Price { get; set; } + } + } + + /// + /// 获取或设置礼品卡信息。 + /// + [Newtonsoft.Json.JsonProperty("giftcard_info")] + [System.Text.Json.Serialization.JsonPropertyName("giftcard_info")] + public Types.GiftCard GiftCard { get; set; } = new Types.GiftCard(); + + /// + /// 获取或设置礼品卡最大可赠送次数。 + /// + [Newtonsoft.Json.JsonProperty("max_give_friend_times")] + [System.Text.Json.Serialization.JsonPropertyName("max_give_friend_times")] + public int MaxGiveFriendTimes { get; set; } + + /// + /// 获取或设置进入礼品卡时是否推送事件。 + /// + [Newtonsoft.Json.JsonProperty("need_push_on_view")] + [System.Text.Json.Serialization.JsonPropertyName("need_push_on_view")] + public bool? RequirePushOnView { get; set; } + } + + public class Advance : GrouponCard.Types.Advance + { + } + + public class CustomField : MembershipCard.Types.CustomField + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置卡类型。 + /// + [Newtonsoft.Json.JsonProperty("sub_card_type")] + [System.Text.Json.Serialization.JsonPropertyName("sub_card_type")] + public string SubCardType { get; set; } = string.Empty; + + /// + /// 获取或设置礼品卡背景图 URL。 + /// + [Newtonsoft.Json.JsonProperty("background_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("background_pic_url")] + public string? BackgrounPictureUrl { get; set; } + + /// + /// 获取或设置礼品卡特权说明。 + /// + [Newtonsoft.Json.JsonProperty("prerogative")] + [System.Text.Json.Serialization.JsonPropertyName("prerogative")] + public string Prerogative { get; set; } = string.Empty; + + /// + /// 获取或设置是否领取后自动激活。 + /// + [Newtonsoft.Json.JsonProperty("auto_activate")] + [System.Text.Json.Serialization.JsonPropertyName("auto_activate")] + public bool? IsAutoActivate { get; set; } + + /// + /// 获取或设置是否支持积分。 + /// + [Newtonsoft.Json.JsonProperty("supply_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("supply_bonus")] + public bool IsSupplyBonus { get; set; } + + /// + /// 获取或设置初始积分。 + /// + [Newtonsoft.Json.JsonProperty("init_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("init_bonus")] + public int? InitialBouns { get; set; } + + /// + /// 获取或设置是否支持余额。 + /// + [Newtonsoft.Json.JsonProperty("supply_balance")] + [System.Text.Json.Serialization.JsonPropertyName("supply_balance")] + public bool IsSupplyBalance { get; set; } + + /// + /// 获取或设置初始余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("init_balance")] + [System.Text.Json.Serialization.JsonPropertyName("init_balance")] + public int? InitialBalance { get; set; } + + /// + /// 获取或设置自定义会员信息类目 1 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field1")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field1")] + public Types.CustomField? CustomField1 { get; set; } + + /// + /// 获取或设置自定义会员信息类目 2 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field2")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field2")] + public Types.CustomField? CustomField2 { get; set; } + + /// + /// 获取或设置自定义会员信息类目 3 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field3")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field3")] + public Types.CustomField? CustomField3 { get; set; } + } + + public class MembershipCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + public new static class Types + { + public class Payment + { + public static class Types + { + public class SwipingCard + { + /// + /// 获取或设置是否支持微信支付刷卡。 + /// + [Newtonsoft.Json.JsonProperty("is_swipe_card")] + [System.Text.Json.Serialization.JsonPropertyName("is_swipe_card")] + public bool CanSwipe { get; set; } + } + } + + /// + /// 获取或设置是否支持微信支付刷卡。 + /// + [Newtonsoft.Json.JsonProperty("swipe_card")] + [System.Text.Json.Serialization.JsonPropertyName("swipe_card")] + public Types.SwipingCard? SwipingCard { get; set; } + } + } + + /// + /// 获取或设置进入会员卡时是否推送事件。 + /// + [Newtonsoft.Json.JsonProperty("need_push_on_view")] + [System.Text.Json.Serialization.JsonPropertyName("need_push_on_view")] + public bool? RequirePushOnView { get; set; } + + /// + /// 获取或设置微信支付信息。 + /// + [Newtonsoft.Json.JsonProperty("pay_info")] + [System.Text.Json.Serialization.JsonPropertyName("pay_info")] + public Types.Payment? Payment { get; set; } + } + + public class Advance : GrouponCard.Types.Advance + { + } + + public class CustomField + { + /// + /// 获取或设置会员信息类目自定义名称类型。 + /// + [Newtonsoft.Json.JsonProperty("name_type")] + [System.Text.Json.Serialization.JsonPropertyName("name_type")] + public string? NameType { get; set; } + + /// + /// 获取或设置会员信息类目自定义名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// 获取或设置点击类目跳转外链。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + } + + public class CustomCell + { + /// + /// 获取或设置入口名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置入口右侧提示语。 + /// + [Newtonsoft.Json.JsonProperty("tips")] + [System.Text.Json.Serialization.JsonPropertyName("tips")] + public string Tips { get; set; } = string.Empty; + + /// + /// 获取或设置入口跳转链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = string.Empty; + } + + public class BonusRule + { + /// + /// 获取或设置单次消费金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("cost_money_unit")] + [System.Text.Json.Serialization.JsonPropertyName("cost_money_unit")] + public int? CostMoneyUnit { get; set; } + + /// + /// 获取或设置对应增加的积分。 + /// + [Newtonsoft.Json.JsonProperty("increase_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("increase_bonus")] + public int? IncreaseBonus { get; set; } + + /// + /// 获取或设置单次可获取的积分上限。 + /// + [Newtonsoft.Json.JsonProperty("max_increase_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("max_increase_bonus")] + public int? MaxIncreaseBonus { get; set; } + + /// + /// 获取或设置初始积分。 + /// + [Newtonsoft.Json.JsonProperty("init_increase_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("init_increase_bonus")] + public int? InitialIncreaseBonus { get; set; } + + /// + /// 获取或设置单次消费积分。 + /// + [Newtonsoft.Json.JsonProperty("cost_bonus_unit")] + [System.Text.Json.Serialization.JsonPropertyName("cost_bonus_unit")] + public int? CostBonusUnit { get; set; } + + /// + /// 获取或设置积分抵扣金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("reduce_money")] + [System.Text.Json.Serialization.JsonPropertyName("reduce_money")] + public int? ReduceMoney { get; set; } + + /// + /// 获取或设置积分抵扣门槛(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("least_money_to_use_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("least_money_to_use_bonus")] + public int? LeastMoneyToUseBonus { get; set; } + + /// + /// 获取或设置单次可使用积分的上限。 + /// + [Newtonsoft.Json.JsonProperty("max_reduce_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("max_reduce_bonus")] + public int? MaxReduceBonus { get; set; } + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置会员卡背景图 URL。 + /// + [Newtonsoft.Json.JsonProperty("background_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("background_pic_url")] + public string? BackgrounPictureUrl { get; set; } + + /// + /// 获取或设置会员卡特权说明。 + /// + [Newtonsoft.Json.JsonProperty("prerogative")] + [System.Text.Json.Serialization.JsonPropertyName("prerogative")] + public string Prerogative { get; set; } = string.Empty; + + /// + /// 获取或设置是否领取后自动激活。 + /// + [Newtonsoft.Json.JsonProperty("auto_activate")] + [System.Text.Json.Serialization.JsonPropertyName("auto_activate")] + public bool? IsAutoActivate { get; set; } + + /// + /// 获取或设置是否支持一键开卡。 + /// + [Newtonsoft.Json.JsonProperty("wx_activate")] + [System.Text.Json.Serialization.JsonPropertyName("wx_activate")] + public bool? IsWechatActivate { get; set; } + + /// + /// 获取或设置是否支持跳转型一键激活。 + /// + [Newtonsoft.Json.JsonProperty("wx_activate_after_submit")] + [System.Text.Json.Serialization.JsonPropertyName("wx_activate_after_submit")] + public bool? IsWechatActivateAfterSubmit { get; set; } + + /// + /// 获取或设置激活会员卡外链。 + /// + [Newtonsoft.Json.JsonProperty("activate_url")] + [System.Text.Json.Serialization.JsonPropertyName("activate_url")] + public string? ActivateUrl { get; set; } + + /// + /// 获取或设置激活会员卡对应的小程序原始 ID。 + /// + [Newtonsoft.Json.JsonProperty("activate_app_brand_user_name")] + [System.Text.Json.Serialization.JsonPropertyName("activate_app_brand_user_name")] + public string? ActivateBrandMiniProgramUsername { get; set; } + + /// + /// 获取或设置激活会员卡对应的小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("activate_app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("activate_app_brand_pass")] + public string? ActivateBrandMiniProgramPath { get; set; } + + /// + /// 获取或设置跳转型一键激活的跳转外链。 + /// + [Newtonsoft.Json.JsonProperty("wx_activate_after_submit_url")] + [System.Text.Json.Serialization.JsonPropertyName("wx_activate_after_submit_url")] + public string? WechatActivateAfterSubmitUrl { get; set; } + + /// + /// 获取或设置是否支持积分。 + /// + [Newtonsoft.Json.JsonProperty("supply_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("supply_bonus")] + public bool IsSupplyBonus { get; set; } + + /// + /// 获取或设置查看积分详情外链。 + /// + [Newtonsoft.Json.JsonProperty("bonus_url")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_url")] + public string? BonusUrl { get; set; } + + /// + /// 获取或设置积分清零规则。 + /// + [Newtonsoft.Json.JsonProperty("bonus_cleared")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_cleared")] + public string? BonusClearedString { get; set; } + + /// + /// 获取或设置积分规则。 + /// + [Newtonsoft.Json.JsonProperty("bonus_rules")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_rules")] + public string? BonusRulesString { get; set; } + + /// + /// 获取或设置积分规则。 + /// + [Newtonsoft.Json.JsonProperty("bonus_rule")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_rule")] + public Types.BonusRule? BonusRule { get; set; } + + /// + /// 获取或设置是否支持储值。 + /// + [Newtonsoft.Json.JsonProperty("supply_balance")] + [System.Text.Json.Serialization.JsonPropertyName("supply_balance")] + public bool IsSupplyBalance { get; set; } + + /// + /// 获取或设置查看余额详情外链。 + /// + [Newtonsoft.Json.JsonProperty("balance_url")] + [System.Text.Json.Serialization.JsonPropertyName("balance_url")] + public string? BalanceUrl { get; set; } + + /// + /// 获取或设置储值规则。 + /// + [Newtonsoft.Json.JsonProperty("balance_rules")] + [System.Text.Json.Serialization.JsonPropertyName("balance_rules")] + public string? BalanceRules { get; set; } + + /// + /// 获取或设置自定义会员信息类目 1 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field1")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field1")] + public Types.CustomField? CustomField1 { get; set; } + + /// + /// 获取或设置自定义会员信息类目 2 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field2")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field2")] + public Types.CustomField? CustomField2 { get; set; } + + /// + /// 获取或设置自定义会员信息类目 3 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field3")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field3")] + public Types.CustomField? CustomField3 { get; set; } + + /// + /// 获取或设置自定义会员服务入口 1 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_cell1")] + [System.Text.Json.Serialization.JsonPropertyName("custom_cell1")] + public Types.CustomCell? CustomCell1 { get; set; } + + /// + /// 获取或设置自定义会员服务入口 2 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_cell2")] + [System.Text.Json.Serialization.JsonPropertyName("custom_cell2")] + public Types.CustomCell? CustomCell2 { get; set; } + + /// + /// 获取或设置自定义会员服务入口 3 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_cell3")] + [System.Text.Json.Serialization.JsonPropertyName("custom_cell3")] + public Types.CustomCell? CustomCell3 { get; set; } + + /// + /// 获取或设置折扣优惠。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public int? Discount { get; set; } + } + + public class MeetingTicketCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置会议详情。 + /// + [Newtonsoft.Json.JsonProperty("meeting_detail")] + [System.Text.Json.Serialization.JsonPropertyName("meeting_detail")] + public string MeetingDetail { get; set; } = string.Empty; + + /// + /// 获取或设置会场导览图 URL。 + /// + [Newtonsoft.Json.JsonProperty("map_url")] + [System.Text.Json.Serialization.JsonPropertyName("map_url")] + public string? MapUrl { get; set; } + } + + public class ScenicTicketCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置票类型。 + /// + [Newtonsoft.Json.JsonProperty("ticket_class")] + [System.Text.Json.Serialization.JsonPropertyName("ticket_class")] + public string TicketClass { get; set; } = string.Empty; + + /// + /// 获取或设置景区导览图 URL。 + /// + [Newtonsoft.Json.JsonProperty("guide_url")] + [System.Text.Json.Serialization.JsonPropertyName("guide_url")] + public string? GuideUrl { get; set; } + } + + public class MovieTicketCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置电影详情。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public string MovieDetail { get; set; } = string.Empty; + } + + public class BoardingPassCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = new Types.Advance(); + + /// + /// 获取或设置起点。 + /// + [Newtonsoft.Json.JsonProperty("from")] + [System.Text.Json.Serialization.JsonPropertyName("from")] + public string From { get; set; } = string.Empty; + + /// + /// 获取或设置终点。 + /// + [Newtonsoft.Json.JsonProperty("to")] + [System.Text.Json.Serialization.JsonPropertyName("to")] + public string To { get; set; } = string.Empty; + + /// + /// 获取或设置航班。 + /// + [Newtonsoft.Json.JsonProperty("flight")] + [System.Text.Json.Serialization.JsonPropertyName("flight")] + public string Flight { get; set; } = string.Empty; + + /// + /// 获取或设置登机口。 + /// + [Newtonsoft.Json.JsonProperty("gate")] + [System.Text.Json.Serialization.JsonPropertyName("gate")] + public string? Gate { get; set; } + + /// + /// 获取或设置在线值机外链。 + /// + [Newtonsoft.Json.JsonProperty("check_in_url")] + [System.Text.Json.Serialization.JsonPropertyName("check_in_url")] + public string? CheckinUrl { get; set; } + + /// + /// 获取或设置机型。 + /// + [Newtonsoft.Json.JsonProperty("air_model")] + [System.Text.Json.Serialization.JsonPropertyName("air_model")] + public string AirModel { get; set; } = string.Empty; + + /// + /// 获取或设置起飞时间戳。 + /// + [Newtonsoft.Json.JsonProperty("departure_time")] + [System.Text.Json.Serialization.JsonPropertyName("departure_time")] + public long DepartureTimestamp { get; set; } + + /// + /// 获取或设置降落时间戳。 + /// + [Newtonsoft.Json.JsonProperty("landing_time")] + [System.Text.Json.Serialization.JsonPropertyName("landing_time")] + public long LandingTimestamp { get; set; } + } + } + + /// + /// 获取或设置卡券信息。 + /// + [Newtonsoft.Json.JsonProperty("card")] + [System.Text.Json.Serialization.JsonPropertyName("card")] + public Types.Card Card { get; set; } = new Types.Card(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardCreateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardCreateResponse.cs new file mode 100644 index 00000000..8a606b87 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardCreateResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/create 接口的响应。 + /// + public class CardCreateResponse : WechatApiResponse + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardDeleteRequest.cs new file mode 100644 index 00000000..a1438467 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardDeleteRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/delete 接口的请求。 + /// + public class CardDeleteRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardDeleteResponse.cs new file mode 100644 index 00000000..0ef87458 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardDeleteResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/delete 接口的响应。 + /// + public class CardDeleteResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardGetRequest.cs new file mode 100644 index 00000000..b29cbb49 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardGetRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/get 接口的请求。 + /// + public class CardGetRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardGetResponse.cs new file mode 100644 index 00000000..d13ab647 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardGetResponse.cs @@ -0,0 +1,1084 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/get 接口的响应。 + /// + public class CardGetResponse : WechatApiResponse + { + public static class Types + { + public class Card + { + /// + /// 获取或设置卡券类型。 + /// + [Newtonsoft.Json.JsonProperty("card_type")] + [System.Text.Json.Serialization.JsonPropertyName("card_type")] + public string CardType { get; set; } = default!; + + /// + /// 获取或设置团购券信息。 + /// + [Newtonsoft.Json.JsonProperty("groupon")] + [System.Text.Json.Serialization.JsonPropertyName("groupon")] + public GrouponCard? Groupon { get; set; } + + /// + /// 获取或设置代金券信息。 + /// + [Newtonsoft.Json.JsonProperty("cash")] + [System.Text.Json.Serialization.JsonPropertyName("cash")] + public CashCard? Cash { get; set; } + + /// + /// 获取或设置折扣券信息。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public DiscountCard? Discount { get; set; } + + /// + /// 获取或设置兑换券信息。 + /// + [Newtonsoft.Json.JsonProperty("gift")] + [System.Text.Json.Serialization.JsonPropertyName("gift")] + public GiftCard? Gift { get; set; } + + /// + /// 获取或设置优惠券信息。 + /// + [Newtonsoft.Json.JsonProperty("general_coupon")] + [System.Text.Json.Serialization.JsonPropertyName("general_coupon")] + public GeneralCouponCard? GeneralCoupon { get; set; } + + /// + /// 获取或设置会员卡信息。 + /// + [Newtonsoft.Json.JsonProperty("member_card")] + [System.Text.Json.Serialization.JsonPropertyName("member_card")] + public MembershipCard? Membership { get; set; } + + /// + /// 获取或设置会议门票信息。 + /// + [Newtonsoft.Json.JsonProperty("meeting_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("meeting_ticket")] + public MeetingTicketCard? MeetingTicket { get; set; } + + /// + /// 获取或设置景区门票信息。 + /// + [Newtonsoft.Json.JsonProperty("scenic_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("scenic_ticket")] + public ScenicTicketCard? ScenicTicket { get; set; } + + /// + /// 获取或设置电影票信息。 + /// + [Newtonsoft.Json.JsonProperty("movie_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("movie_ticket")] + public MovieTicketCard? MovieTicket { get; set; } + + /// + /// 获取或设置飞机票信息。 + /// + [Newtonsoft.Json.JsonProperty("boarding_pass")] + [System.Text.Json.Serialization.JsonPropertyName("boarding_pass")] + public BoardingPassCard? BoardingPass { get; set; } + } + + public class GrouponCard + { + public static class Types + { + public class Base + { + public static class Types + { + public class SKU + { + /// + /// 获取或设置卡券库存的剩余数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + + /// + /// 获取或设置卡券库存的总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_quantity")] + [System.Text.Json.Serialization.JsonPropertyName("total_quantity")] + public int TotalQuantity { get; set; } + } + + public class Date + { + /// + /// 获取或设置使用时间的类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置起用时间戳。 + /// + [Newtonsoft.Json.JsonProperty("begin_timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("begin_timestamp")] + public long? BeginTimestamp { get; set; } + + /// + /// 获取或设置过期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("end_timestamp")] + public long? EndTimestamp { get; set; } + + /// + /// 获取或设置自领取后 N 天内有效。 + /// + [Newtonsoft.Json.JsonProperty("fixed_term")] + [System.Text.Json.Serialization.JsonPropertyName("fixed_term")] + public int? AvailableDaysAfterReceive { get; set; } + + /// + /// 获取或设置自领取后 N 天后生效。 + /// + [Newtonsoft.Json.JsonProperty("fixed_begin_term")] + [System.Text.Json.Serialization.JsonPropertyName("fixed_begin_term")] + public int? WaitDaysAfterReceive { get; set; } + } + } + + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string Id { get; set; } = default!; + + /// + /// 获取或设置商户 Logo URL。 + /// + [Newtonsoft.Json.JsonProperty("logo_url")] + [System.Text.Json.Serialization.JsonPropertyName("logo_url")] + public string LogoUrl { get; set; } = default!; + + /// + /// 获取或设置码型。 + /// + [Newtonsoft.Json.JsonProperty("code_type")] + [System.Text.Json.Serialization.JsonPropertyName("code_type")] + public string CodeType { get; set; } = default!; + + /// + /// 获取或设置商户名字。 + /// + [Newtonsoft.Json.JsonProperty("brand_name")] + [System.Text.Json.Serialization.JsonPropertyName("brand_name")] + public string BrandName { get; set; } = default!; + + /// + /// 获取或设置卡券名。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置卡券颜色。 + /// + [Newtonsoft.Json.JsonProperty("color")] + [System.Text.Json.Serialization.JsonPropertyName("color")] + public string Color { get; set; } = default!; + + /// + /// 获取或设置卡券使用提醒。 + /// + [Newtonsoft.Json.JsonProperty("notice")] + [System.Text.Json.Serialization.JsonPropertyName("notice")] + public string Notice { get; set; } = default!; + + /// + /// 获取或设置卡券使用说明。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("sku")] + [System.Text.Json.Serialization.JsonPropertyName("sku")] + public Types.SKU SKU { get; set; } = default!; + + /// + /// 获取或设置使用日期信息。 + /// + [Newtonsoft.Json.JsonProperty("date_info")] + [System.Text.Json.Serialization.JsonPropertyName("date_info")] + public Types.Date Date { get; set; } = default!; + + /// + /// 获取或设置卡券状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置是否自定义券码。 + /// + [Newtonsoft.Json.JsonProperty("use_custom_code")] + [System.Text.Json.Serialization.JsonPropertyName("use_custom_code")] + public bool UseCustomCode { get; set; } + + /// + /// 获取或设置自定义券码模式。 + /// + [Newtonsoft.Json.JsonProperty("get_custom_code_mode")] + [System.Text.Json.Serialization.JsonPropertyName("get_custom_code_mode")] + public string? GetCustomCodeMode { get; set; } + + /// + /// 获取或设置是否指定用户领取。 + /// + [Newtonsoft.Json.JsonProperty("bind_openid")] + [System.Text.Json.Serialization.JsonPropertyName("bind_openid")] + public bool? IsBindOpenId { get; set; } + + /// + /// 获取或设置客服电话。 + /// + [Newtonsoft.Json.JsonProperty("service_phone")] + [System.Text.Json.Serialization.JsonPropertyName("service_phone")] + public string? ServicePhoneNumber { get; set; } + + /// + /// 获取或设置门店 Id 列表。 + /// + [Newtonsoft.Json.JsonProperty("location_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("location_id_list")] + public long[]? POIIdList { get; set; } + + /// + /// 获取或设置是否支持全部门店。 + /// + [Newtonsoft.Json.JsonProperty("use_all_locations")] + [System.Text.Json.Serialization.JsonPropertyName("use_all_locations")] + public bool? UseAllPOIs { get; set; } + + /// + /// 获取或设置显示在顶部居中的按钮文字。 + /// + [Newtonsoft.Json.JsonProperty("center_title")] + [System.Text.Json.Serialization.JsonPropertyName("center_title")] + public string? CenterTitle { get; set; } + + /// + /// 获取或设置显示在入口下方的提示语。 + /// + [Newtonsoft.Json.JsonProperty("center_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("center_sub_title")] + public string? CenterSubTitle { get; set; } + + /// + /// 获取或设置顶部居中的 URL。 + /// + [Newtonsoft.Json.JsonProperty("center_url")] + [System.Text.Json.Serialization.JsonPropertyName("center_url")] + public string? CenterUrl { get; set; } + + /// + /// 获取或设置自定义跳转外链的入口名字。 + /// + [Newtonsoft.Json.JsonProperty("custom_url_name")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url_name")] + public string? CustomUrlTitle { get; set; } + + /// + /// 获取或设置自定义跳转外链的入口右侧提示语。 + /// + [Newtonsoft.Json.JsonProperty("custom_url_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url_sub_title")] + public string? CustomUrlSubTitle { get; set; } + + /// + /// 获取或设置自定义跳转外链。 + /// + [Newtonsoft.Json.JsonProperty("custom_url")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url")] + public string? CustomUrl { get; set; } + + /// + /// 获取或设置营销场景的入口名称。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url_name")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url_name")] + public string? PromotionUrlTitle { get; set; } + + /// + /// 获取或设置营销场景的入口右侧的提示语。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url_sub_title")] + public string? PromotionUrlSubTitle { get; set; } + + /// + /// 获取或设置营销场景外链。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url")] + public string? PromotionUrl { get; set; } + + /// + /// 获取或设置每人可领券的数量限制。 + /// + [Newtonsoft.Json.JsonProperty("get_limit")] + [System.Text.Json.Serialization.JsonPropertyName("get_limit")] + public int? GetLimitPerUser { get; set; } + + /// + /// 获取或设置每人可核销的数量限制。 + /// + [Newtonsoft.Json.JsonProperty("use_limit")] + [System.Text.Json.Serialization.JsonPropertyName("use_limit")] + public int? UseLimitPerUser { get; set; } + + /// + /// 获取或设置卡券领取页面是否可分享。 + /// + [Newtonsoft.Json.JsonProperty("can_share")] + [System.Text.Json.Serialization.JsonPropertyName("can_share")] + public bool CanShare { get; set; } + + /// + /// 获取或设置卡券是否可转赠。 + /// + [Newtonsoft.Json.JsonProperty("can_give_friend")] + [System.Text.Json.Serialization.JsonPropertyName("can_give_friend")] + public bool CanTransfer { get; set; } + + /// + /// 获取或设置第三方来源名。 + /// + [Newtonsoft.Json.JsonProperty("source")] + [System.Text.Json.Serialization.JsonPropertyName("source")] + public string? Source { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + + public class Advance + { + public static class Types + { + public class UseCondition + { + /// + /// 获取或设置可用的商品类目。 + /// + [Newtonsoft.Json.JsonProperty("accept_category")] + [System.Text.Json.Serialization.JsonPropertyName("accept_category")] + public string? AcceptCategory { get; set; } + + /// + /// 获取或设置不可用的商品类目。 + /// + [Newtonsoft.Json.JsonProperty("reject_category")] + [System.Text.Json.Serialization.JsonPropertyName("reject_category")] + public string? RejectCategory { get; set; } + + /// + /// 获取或设置满减门槛(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("least_cost")] + [System.Text.Json.Serialization.JsonPropertyName("least_cost")] + public int LeastCost { get; set; } + + /// + /// 获取或设置可用类型门槛。 + /// + [Newtonsoft.Json.JsonProperty("object_use_for")] + [System.Text.Json.Serialization.JsonPropertyName("object_use_for")] + public string? ObjectUseFor { get; set; } + + /// + /// 获取或设置是否可与其他类型共享门槛。 + /// + [Newtonsoft.Json.JsonProperty("can_use_with_other_discount")] + [System.Text.Json.Serialization.JsonPropertyName("can_use_with_other_discount")] + public bool? CanUseWithOtherDiscount { get; set; } + } + + public class Abstract + { + /// + /// 获取或设置封面摘要简介。 + /// + [Newtonsoft.Json.JsonProperty("abstract")] + [System.Text.Json.Serialization.JsonPropertyName("abstract")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置封面图片 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("icon_url_list")] + [System.Text.Json.Serialization.JsonPropertyName("icon_url_list")] + public string[] IconUrlList { get; set; } = default!; + } + + public class TextImage + { + /// + /// 获取或设置图片描述。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string Text { get; set; } = default!; + + /// + /// 获取或设置封面图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("image_url")] + [System.Text.Json.Serialization.JsonPropertyName("image_url")] + public string ImageUrl { get; set; } = default!; + } + + public class TimeLimit + { + /// + /// 获取或设置限制类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置起始时间小时(格式:H)。 + /// + [Newtonsoft.Json.JsonProperty("begin_hour")] + [System.Text.Json.Serialization.JsonPropertyName("begin_hour")] + public int? BeginHour { get; set; } + + /// + /// 获取或设置起始时间分钟(格式:m)。 + /// + [Newtonsoft.Json.JsonProperty("begin_minute")] + [System.Text.Json.Serialization.JsonPropertyName("begin_minute")] + public int? BeginMinute { get; set; } + + /// + /// 获取或设置结束时间小时(格式:H)。 + /// + [Newtonsoft.Json.JsonProperty("end_hour")] + [System.Text.Json.Serialization.JsonPropertyName("end_hour")] + public int? EndHour { get; set; } + + /// + /// 获取或设置结束时间小时(格式:m)。 + /// + [Newtonsoft.Json.JsonProperty("end_minute")] + [System.Text.Json.Serialization.JsonPropertyName("end_minute")] + public int? EndMinute { get; set; } + } + } + + /// + /// 获取或设置使用门槛信息。 + /// + [Newtonsoft.Json.JsonProperty("use_condition")] + [System.Text.Json.Serialization.JsonPropertyName("use_condition")] + public Types.UseCondition? UseCondition { get; set; } + + /// + /// 获取或设置封面摘要信息。 + /// + [Newtonsoft.Json.JsonProperty("abstract")] + [System.Text.Json.Serialization.JsonPropertyName("abstract")] + public Types.Abstract? Abstract { get; set; } + + /// + /// 获取或设置图文列表。 + /// + [Newtonsoft.Json.JsonProperty("text_image_list")] + [System.Text.Json.Serialization.JsonPropertyName("text_image_list")] + public Types.TextImage[]? TextImageList { get; set; } + + /// + /// 获取或设置商家服务类型。 + /// + [Newtonsoft.Json.JsonProperty("business_service")] + [System.Text.Json.Serialization.JsonPropertyName("business_service")] + public string[]? BusinessServiceList { get; set; } + + /// + /// 获取或设置使用时段限制列表。 + /// + [Newtonsoft.Json.JsonProperty("time_limit")] + [System.Text.Json.Serialization.JsonPropertyName("time_limit")] + public Types.TimeLimit[]? TimeLimitList { get; set; } + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = default!; + + /// + /// 获取或设置团购详情。 + /// + [Newtonsoft.Json.JsonProperty("deal_detail")] + [System.Text.Json.Serialization.JsonPropertyName("deal_detail")] + public string DealDetail { get; set; } = default!; + } + + public class CashCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = default!; + + /// + /// 获取或设置起用金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("least_cost")] + [System.Text.Json.Serialization.JsonPropertyName("least_cost")] + public int LeastCost { get; set; } + + /// + /// 获取或设置减免金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("reduce_cost")] + [System.Text.Json.Serialization.JsonPropertyName("reduce_cost")] + public int ReduceCost { get; set; } + } + + public class DiscountCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = default!; + + /// + /// 获取或设置打折额度。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public int Discount { get; set; } + } + + public class GiftCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = default!; + + /// + /// 获取或设置兑换内容。 + /// + [Newtonsoft.Json.JsonProperty("gift")] + [System.Text.Json.Serialization.JsonPropertyName("gift")] + public string GiftDetail { get; set; } = default!; + } + + public class GeneralCouponCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = default!; + + /// + /// 获取或设置优惠详情。 + /// + [Newtonsoft.Json.JsonProperty("default_detail")] + [System.Text.Json.Serialization.JsonPropertyName("default_detail")] + public string DefaultDetail { get; set; } = default!; + } + + public class MembershipCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + /// + /// 获取或设置进入会员卡时是否推送事件。 + /// + [Newtonsoft.Json.JsonProperty("need_push_on_view")] + [System.Text.Json.Serialization.JsonPropertyName("need_push_on_view")] + public bool RequirePushOnView { get; set; } + } + + public class Advance : GrouponCard.Types.Advance + { + } + + public class BonusRule + { + /// + /// 获取或设置单次消费金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("cost_money_unit")] + [System.Text.Json.Serialization.JsonPropertyName("cost_money_unit")] + public int? CostMoneyUnit { get; set; } + + /// + /// 获取或设置对应增加的积分。 + /// + [Newtonsoft.Json.JsonProperty("increase_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("increase_bonus")] + public int? IncreaseBonus { get; set; } + + /// + /// 获取或设置单次可获取的积分上限。 + /// + [Newtonsoft.Json.JsonProperty("max_increase_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("max_increase_bonus")] + public int? MaxIncreaseBonus { get; set; } + + /// + /// 获取或设置初始积分。 + /// + [Newtonsoft.Json.JsonProperty("init_increase_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("init_increase_bonus")] + public int? InitialIncreaseBonus { get; set; } + + /// + /// 获取或设置单次消费积分。 + /// + [Newtonsoft.Json.JsonProperty("cost_bonus_unit")] + [System.Text.Json.Serialization.JsonPropertyName("cost_bonus_unit")] + public int? CostBonusUnit { get; set; } + + /// + /// 获取或设置积分抵扣金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("reduce_money")] + [System.Text.Json.Serialization.JsonPropertyName("reduce_money")] + public int? ReduceMoney { get; set; } + + /// + /// 获取或设置积分抵扣门槛(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("least_money_to_use_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("least_money_to_use_bonus")] + public int? LeastMoneyToUseBonus { get; set; } + + /// + /// 获取或设置单次可使用积分的上限。 + /// + [Newtonsoft.Json.JsonProperty("max_reduce_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("max_reduce_bonus")] + public int? MaxReduceBonus { get; set; } + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = default!; + + /// + /// 获取或设置会员卡特权说明。 + /// + [Newtonsoft.Json.JsonProperty("prerogative")] + [System.Text.Json.Serialization.JsonPropertyName("prerogative")] + public string Prerogative { get; set; } = default!; + + /// + /// 获取或设置绑定旧卡的外链。 + /// + [Newtonsoft.Json.JsonProperty("bind_old_card_url")] + [System.Text.Json.Serialization.JsonPropertyName("bind_old_card_url")] + public string? BindOldCardUrl { get; set; } + + /// + /// 获取或设置激活会员卡的外链。 + /// + [Newtonsoft.Json.JsonProperty("activate_url")] + [System.Text.Json.Serialization.JsonPropertyName("activate_url")] + public string? ActivateUrl { get; set; } + + /// + /// 获取或设置是否显示积分。 + /// + [Newtonsoft.Json.JsonProperty("supply_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("supply_bonus")] + public bool IsSupplyBonus { get; set; } + + /// + /// 获取或设置积分清零规则。 + /// + [Newtonsoft.Json.JsonProperty("bonus_cleared")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_cleared")] + public string? BonusClearedString { get; set; } + + /// + /// 获取或设置积分规则。 + /// + [Newtonsoft.Json.JsonProperty("bonus_rules")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_rules")] + public string? BonusRulesString { get; set; } + + /// + /// 获取或设置积分规则。 + /// + [Newtonsoft.Json.JsonProperty("bonus_rule")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_rule")] + public Types.BonusRule? BonusRule { get; set; } + + /// + /// 获取或设置是否支持储值。 + /// + [Newtonsoft.Json.JsonProperty("supply_balance")] + [System.Text.Json.Serialization.JsonPropertyName("supply_balance")] + public bool IsSupplyBalance { get; set; } + + /// + /// 获取或设置储值规则。 + /// + [Newtonsoft.Json.JsonProperty("balance_rules")] + [System.Text.Json.Serialization.JsonPropertyName("balance_rules")] + public string? BalanceRules { get; set; } + + /// + /// 获取或设置折扣优惠。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public int? Discount { get; set; } + } + + public class MeetingTicketCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = default!; + + /// + /// 获取或设置会议详情。 + /// + [Newtonsoft.Json.JsonProperty("meeting_detail")] + [System.Text.Json.Serialization.JsonPropertyName("meeting_detail")] + public string MeetingDetail { get; set; } = default!; + + /// + /// 获取或设置会场导览图 URL。 + /// + [Newtonsoft.Json.JsonProperty("map_url")] + [System.Text.Json.Serialization.JsonPropertyName("map_url")] + public string? MapUrl { get; set; } + } + + public class ScenicTicketCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = default!; + + /// + /// 获取或设置票类型。 + /// + [Newtonsoft.Json.JsonProperty("ticket_class")] + [System.Text.Json.Serialization.JsonPropertyName("ticket_class")] + public string TicketClass { get; set; } = default!; + + /// + /// 获取或设置景区导览图 URL。 + /// + [Newtonsoft.Json.JsonProperty("guide_url")] + [System.Text.Json.Serialization.JsonPropertyName("guide_url")] + public string? GuideUrl { get; set; } + } + + public class MovieTicketCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = default!; + + /// + /// 获取或设置电影详情。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public string MovieDetail { get; set; } = default!; + } + + public class BoardingPassCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + + public class Advance : GrouponCard.Types.Advance + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置卡券高级信息。 + /// + [Newtonsoft.Json.JsonProperty("advanced_info")] + [System.Text.Json.Serialization.JsonPropertyName("advanced_info")] + public Types.Advance Advance { get; set; } = default!; + + /// + /// 获取或设置起点。 + /// + [Newtonsoft.Json.JsonProperty("from")] + [System.Text.Json.Serialization.JsonPropertyName("from")] + public string From { get; set; } = default!; + + /// + /// 获取或设置终点。 + /// + [Newtonsoft.Json.JsonProperty("to")] + [System.Text.Json.Serialization.JsonPropertyName("to")] + public string To { get; set; } = default!; + + /// + /// 获取或设置航班。 + /// + [Newtonsoft.Json.JsonProperty("flight")] + [System.Text.Json.Serialization.JsonPropertyName("flight")] + public string Flight { get; set; } = default!; + + /// + /// 获取或设置登机口。 + /// + [Newtonsoft.Json.JsonProperty("gate")] + [System.Text.Json.Serialization.JsonPropertyName("gate")] + public string? Gate { get; set; } + + /// + /// 获取或设置在线值机外链。 + /// + [Newtonsoft.Json.JsonProperty("check_in_url")] + [System.Text.Json.Serialization.JsonPropertyName("check_in_url")] + public string? CheckinUrl { get; set; } + + /// + /// 获取或设置机型。 + /// + [Newtonsoft.Json.JsonProperty("air_model")] + [System.Text.Json.Serialization.JsonPropertyName("air_model")] + public string AirModel { get; set; } = default!; + + /// + /// 获取或设置起飞时间戳。 + /// + [Newtonsoft.Json.JsonProperty("departure_time")] + [System.Text.Json.Serialization.JsonPropertyName("departure_time")] + public long DepartureTimestamp { get; set; } + + /// + /// 获取或设置降落时间戳。 + /// + [Newtonsoft.Json.JsonProperty("landing_time")] + [System.Text.Json.Serialization.JsonPropertyName("landing_time")] + public long LandingTimestamp { get; set; } + } + } + + /// + /// 获取或设置卡券信息。 + /// + [Newtonsoft.Json.JsonProperty("card")] + [System.Text.Json.Serialization.JsonPropertyName("card")] + public Types.Card Card { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardLandingPageCreateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardLandingPageCreateRequest.cs new file mode 100644 index 00000000..e4a7c121 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardLandingPageCreateRequest.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/landingpage/create 接口的请求。 + /// + public class CardLandingPageCreateRequest : WechatApiRequest + { + public static class Types + { + public class Card + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置缩略图 URL。 + /// + [Newtonsoft.Json.JsonProperty("thumb_url")] + [System.Text.Json.Serialization.JsonPropertyName("thumb_url")] + public string ThumbnailUrl { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置 Banner 图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("banner")] + [System.Text.Json.Serialization.JsonPropertyName("banner")] + public string BannerUrl { get; set; } = string.Empty; + + /// + /// 获取或设置页面标题。 + /// + [Newtonsoft.Json.JsonProperty("page_title")] + [System.Text.Json.Serialization.JsonPropertyName("page_title")] + public string PageTitle { get; set; } = string.Empty; + + /// + /// 获取或设置页面是否可以分享。 + /// + [Newtonsoft.Json.JsonProperty("can_share")] + [System.Text.Json.Serialization.JsonPropertyName("can_share")] + public bool CanShare { get; set; } + + /// + /// 获取或设置场景值。 + /// + [Newtonsoft.Json.JsonProperty("scene")] + [System.Text.Json.Serialization.JsonPropertyName("scene")] + public string Scene { get; set; } = string.Empty; + + /// + /// 获取或设置卡券列表。 + /// + [Newtonsoft.Json.JsonProperty("card_list")] + [System.Text.Json.Serialization.JsonPropertyName("card_list")] + public IList CardList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardLandingPageCreateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardLandingPageCreateResponse.cs new file mode 100644 index 00000000..d294fc51 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardLandingPageCreateResponse.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/landingpage/create 接口的响应。 + /// + public class CardLandingPageCreateResponse : WechatApiResponse + { + /// + /// 获取或设置货架 ID。 + /// + [Newtonsoft.Json.JsonProperty("page_id")] + [System.Text.Json.Serialization.JsonPropertyName("page_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedStringConverter))] + public string PageId { get; set; } = default!; + + /// + /// 获取或设置货架链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string PageUrl { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardModifyStockRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardModifyStockRequest.cs new file mode 100644 index 00000000..91412305 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardModifyStockRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/modifystock 接口的请求。 + /// + public class CardModifyStockRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置增加库存数量。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("increase_stock_value")] + [System.Text.Json.Serialization.JsonPropertyName("increase_stock_value")] + public int? IncreaseStockValue { get; set; } + + /// + /// 获取或设置减少库存数量。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("reduce_stock_value")] + [System.Text.Json.Serialization.JsonPropertyName("reduce_stock_value")] + public int? ReduceStockValue { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardModifyStockResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardModifyStockResponse.cs new file mode 100644 index 00000000..3c4aa193 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardModifyStockResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/modifystock 接口的响应。 + /// + public class CardModifyStockResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardMpnewsGetHtmlRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardMpnewsGetHtmlRequest.cs new file mode 100644 index 00000000..ca0fa936 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardMpnewsGetHtmlRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/mpnews/gethtml 接口的请求。 + /// + public class CardMpnewsGetHtmlRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardMpnewsGetHtmlResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardMpnewsGetHtmlResponse.cs new file mode 100644 index 00000000..88cc291d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardMpnewsGetHtmlResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/mpnews/gethtml 接口的响应。 + /// + public class CardMpnewsGetHtmlResponse : WechatApiResponse + { + /// + /// 获取或设置 HTML 内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string ContentHtml { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardPayCellSetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardPayCellSetRequest.cs new file mode 100644 index 00000000..a3b6b15f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardPayCellSetRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/paycell/set 接口的请求。 + /// + public class CardPayCellSetRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置是否开启买单功能。 + /// + [Newtonsoft.Json.JsonProperty("is_open")] + [System.Text.Json.Serialization.JsonPropertyName("is_open")] + public bool IsOpen { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardPayCellSetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardPayCellSetResponse.cs new file mode 100644 index 00000000..a70c73a1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardPayCellSetResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/paycell/set 接口的响应。 + /// + public class CardPayCellSetResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardQrcodeCreateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardQrcodeCreateRequest.cs new file mode 100644 index 00000000..285628e1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardQrcodeCreateRequest.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/qrcode/create 接口的请求。 + /// + public class CardQrcodeCreateRequest : WechatApiRequest + { + public static class Types + { + public class Action + { + public static class Types + { + public class Card + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string? CardCode { get; set; } + + /// + /// 获取或设置指定领取者的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenId { get; set; } + + /// + /// 获取或设置二维码是否领取后不可再次扫描。 + /// + [Newtonsoft.Json.JsonProperty("is_unique_code")] + [System.Text.Json.Serialization.JsonPropertyName("is_unique_code")] + public bool? IsUnique { get; set; } + + /// + /// 获取或设置商家自定义数值。 + /// + [Newtonsoft.Json.JsonProperty("outer_id")] + [System.Text.Json.Serialization.JsonPropertyName("outer_id")] + public int? OuterId { get; set; } + + /// + /// 获取或设置商家自定义字符串。 + /// + [Newtonsoft.Json.JsonProperty("outer_str")] + [System.Text.Json.Serialization.JsonPropertyName("outer_str")] + public string? OuterString { get; set; } + } + + public class MultipleCard + { + /// + /// 获取或设置卡券列表。 + /// + [Newtonsoft.Json.JsonProperty("card_list")] + [System.Text.Json.Serialization.JsonPropertyName("card_list")] + public IList CardList { get; set; } = new List(); + } + } + + /// + /// 获取或设置单张卡券信息。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("card")] + [System.Text.Json.Serialization.JsonPropertyName("card")] + public Types.Card? Card { get; set; } + + /// + /// 获取或设置多张卡券信息。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("multiple_card")] + [System.Text.Json.Serialization.JsonPropertyName("multiple_card")] + public Types.MultipleCard? MultipleCard { get; set; } + } + } + + /// + /// 获取或设置二维码有效时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expire_seconds")] + [System.Text.Json.Serialization.JsonPropertyName("expire_seconds")] + public int? ExpiresIn { get; set; } + + /// + /// 获取或设置二维码类型。 + /// + [Newtonsoft.Json.JsonProperty("action_name")] + [System.Text.Json.Serialization.JsonPropertyName("action_name")] + public string ActionType { get; set; } = string.Empty; + + /// + /// 获取或设置二维码详细信息。 + /// + [Newtonsoft.Json.JsonProperty("action_info")] + [System.Text.Json.Serialization.JsonPropertyName("action_info")] + public Types.Action Action { get; set; } = new Types.Action(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardQrcodeCreateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardQrcodeCreateResponse.cs new file mode 100644 index 00000000..109ae511 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardQrcodeCreateResponse.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/qrcode/create 接口的响应。 + /// + public class CardQrcodeCreateResponse : WechatApiResponse + { + /// + /// 获取或设置二维码有效时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expire_seconds")] + [System.Text.Json.Serialization.JsonPropertyName("expire_seconds")] + public int ExpiresIn { get; set; } + + /// + /// 获取或设置获取二维码的 Ticket。 + /// + [Newtonsoft.Json.JsonProperty("ticket")] + [System.Text.Json.Serialization.JsonPropertyName("ticket")] + public string Ticket { get; set; } = default!; + + /// + /// 获取或设置二维码图片解析后的地址。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置二维码显示地址。 + /// + [Newtonsoft.Json.JsonProperty("show_qrcode_url")] + [System.Text.Json.Serialization.JsonPropertyName("show_qrcode_url")] + public string QrcodeUrl { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardSelfConsumeCellSetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardSelfConsumeCellSetRequest.cs new file mode 100644 index 00000000..0cf92954 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardSelfConsumeCellSetRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/selfconsumecell/set 接口的请求。 + /// + public class CardSelfConsumeCellSetRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置是否开启自助核销功能。 + /// + [Newtonsoft.Json.JsonProperty("is_open")] + [System.Text.Json.Serialization.JsonPropertyName("is_open")] + public bool IsOpen { get; set; } + + /// + /// 获取或设置用户核销时是否需要输入验证码。 + /// + [Newtonsoft.Json.JsonProperty("need_verify_cod")] + [System.Text.Json.Serialization.JsonPropertyName("need_verify_cod")] + public bool RequireVerifyCode { get; set; } + + /// + /// 获取或设置用户核销时是否需要备注核销金额。 + /// + [Newtonsoft.Json.JsonProperty("need_remark_amount")] + [System.Text.Json.Serialization.JsonPropertyName("need_remark_amount")] + public bool RequireRemarkAmount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardSelfConsumeCellSetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardSelfConsumeCellSetResponse.cs new file mode 100644 index 00000000..cda359a0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardSelfConsumeCellSetResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/selfconsumecell/set 接口的响应。 + /// + public class CardSelfConsumeCellSetResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardTestWhiteListSetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardTestWhiteListSetRequest.cs new file mode 100644 index 00000000..6b169b51 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardTestWhiteListSetRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/testwhitelist/set 接口的请求。 + /// + public class CardTestWhiteListSetRequest : WechatApiRequest + { + /// + /// 获取或设置测试用户的 OpenId 列表。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public IList? OpenIdList { get; set; } + + /// + /// 获取或设置测试用户的微信号列表。 + /// + [Newtonsoft.Json.JsonProperty("username")] + [System.Text.Json.Serialization.JsonPropertyName("username")] + public IList? UsernameList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardTestWhiteListSetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardTestWhiteListSetResponse.cs new file mode 100644 index 00000000..6eddf5f9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardTestWhiteListSetResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/testwhitelist/set 接口的响应。 + /// + public class CardTestWhiteListSetResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardUpdateRequest.cs new file mode 100644 index 00000000..48427369 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardUpdateRequest.cs @@ -0,0 +1,999 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/update 接口的请求。 + /// + public class CardUpdateRequest : WechatApiRequest + { + public static class Types + { + public class GrouponCard + { + public static class Types + { + public class Base + { + public static class Types + { + public class Date : CardCreateRequest.Types.GrouponCard.Types.Base.Types.Date + { + } + } + + /// + /// 获取或设置商户 Logo URL。 + /// + [Newtonsoft.Json.JsonProperty("logo_url")] + [System.Text.Json.Serialization.JsonPropertyName("logo_url")] + public string? LogoUrl { get; set; } + + /// + /// 获取或设置码型。 + /// + [Newtonsoft.Json.JsonProperty("code_type")] + [System.Text.Json.Serialization.JsonPropertyName("code_type")] + public string? CodeType { get; set; } + + /// + /// 获取或设置商户名字。 + /// + [Newtonsoft.Json.JsonProperty("brand_name")] + [System.Text.Json.Serialization.JsonPropertyName("brand_name")] + public string? BrandName { get; set; } + + /// + /// 获取或设置卡券名。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// 获取或设置卡券颜色。 + /// + [Newtonsoft.Json.JsonProperty("color")] + [System.Text.Json.Serialization.JsonPropertyName("color")] + public string? Color { get; set; } + + /// + /// 获取或设置卡券使用提醒。 + /// + [Newtonsoft.Json.JsonProperty("notice")] + [System.Text.Json.Serialization.JsonPropertyName("notice")] + public string? Notice { get; set; } + + /// + /// 获取或设置卡券使用说明。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// 获取或设置使用日期信息。 + /// + [Newtonsoft.Json.JsonProperty("date_info")] + [System.Text.Json.Serialization.JsonPropertyName("date_info")] + public Types.Date? Date { get; set; } + + /// + /// 获取或设置客服电话。 + /// + [Newtonsoft.Json.JsonProperty("service_phone")] + [System.Text.Json.Serialization.JsonPropertyName("service_phone")] + public string? ServicePhoneNumber { get; set; } + + /// + /// 获取或设置门店 Id 列表。 + /// + [Newtonsoft.Json.JsonProperty("location_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("location_id_list")] + public IList? POIIdList { get; set; } + + /// + /// 获取或设置是否支持全部门店。 + /// + [Newtonsoft.Json.JsonProperty("use_all_locations")] + [System.Text.Json.Serialization.JsonPropertyName("use_all_locations")] + public bool? UseAllPOIs { get; set; } + + /// + /// 获取或设置显示在顶部居中的按钮文字。 + /// + [Newtonsoft.Json.JsonProperty("center_title")] + [System.Text.Json.Serialization.JsonPropertyName("center_title")] + public string? CenterTitle { get; set; } + + /// + /// 获取或设置显示在入口下方的提示语。 + /// + [Newtonsoft.Json.JsonProperty("center_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("center_sub_title")] + public string? CenterSubTitle { get; set; } + + /// + /// 获取或设置顶部居中的 URL。 + /// + [Newtonsoft.Json.JsonProperty("center_url")] + [System.Text.Json.Serialization.JsonPropertyName("center_url")] + public string? CenterUrl { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的原始 ID。 + /// + [Newtonsoft.Json.JsonProperty("center_app_brand_user_name")] + [System.Text.Json.Serialization.JsonPropertyName("center_app_brand_user_name")] + public string? CenterBrandMiniProgramUsername { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的页面路径。 + /// + [Newtonsoft.Json.JsonProperty("center_app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("center_app_brand_pass")] + public string? CenterBrandMiniProgramPath { get; set; } + + /// + /// 获取或设置自定义跳转外链的入口名字。 + /// + [Newtonsoft.Json.JsonProperty("custom_url_name")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url_name")] + public string? CustomUrlTitle { get; set; } + + /// + /// 获取或设置自定义跳转外链的入口右侧提示语。 + /// + [Newtonsoft.Json.JsonProperty("custom_url_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url_sub_title")] + public string? CustomUrlSubTitle { get; set; } + + /// + /// 获取或设置自定义跳转外链。 + /// + [Newtonsoft.Json.JsonProperty("custom_url")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url")] + public string? CustomUrl { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的原始 ID。 + /// + [Newtonsoft.Json.JsonProperty("custom_app_brand_user_name")] + [System.Text.Json.Serialization.JsonPropertyName("custom_app_brand_user_name")] + public string? CustomBrandMiniProgramUsername { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的页面路径。 + /// + [Newtonsoft.Json.JsonProperty("custom_app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("custom_app_brand_pass")] + public string? CustomBrandMiniProgramPath { get; set; } + + /// + /// 获取或设置营销场景的入口名称。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url_name")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url_name")] + public string? PromotionUrlTitle { get; set; } + + /// + /// 获取或设置营销场景的入口右侧的提示语。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url_sub_title")] + public string? PromotionUrlSubTitle { get; set; } + + /// + /// 获取或设置营销场景外链。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url")] + public string? PromotionUrl { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的原始 ID。 + /// + [Newtonsoft.Json.JsonProperty("promotion_app_brand_user_name")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_app_brand_user_name")] + public string? PromotionBrandMiniProgramUsername { get; set; } + + /// + /// 获取或设置卡券跳转的小程序的页面路径。 + /// + [Newtonsoft.Json.JsonProperty("promotion_app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_app_brand_pass")] + public string? PromotionBrandMiniProgramPath { get; set; } + + /// + /// 获取或设置每人可领券的数量限制。 + /// + [Newtonsoft.Json.JsonProperty("get_limit")] + [System.Text.Json.Serialization.JsonPropertyName("get_limit")] + public int? GetLimitPerUser { get; set; } + + /// + /// 获取或设置每人可核销的数量限制。 + /// + [Newtonsoft.Json.JsonProperty("use_limit")] + [System.Text.Json.Serialization.JsonPropertyName("use_limit")] + public int? UseLimitPerUser { get; set; } + + /// + /// 获取或设置卡券领取页面是否可分享。 + /// + [Newtonsoft.Json.JsonProperty("can_share")] + [System.Text.Json.Serialization.JsonPropertyName("can_share")] + public bool? CanShare { get; set; } + + /// + /// 获取或设置卡券是否可转赠。 + /// + [Newtonsoft.Json.JsonProperty("can_give_friend")] + [System.Text.Json.Serialization.JsonPropertyName("can_give_friend")] + public bool? CanTransfer { get; set; } + + /// + /// 获取或设置第三方来源名。 + /// + [Newtonsoft.Json.JsonProperty("source")] + [System.Text.Json.Serialization.JsonPropertyName("source")] + public string? Source { get; set; } + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置团购详情。 + /// + [Newtonsoft.Json.JsonProperty("deal_detail")] + [System.Text.Json.Serialization.JsonPropertyName("deal_detail")] + public string? DealDetail { get; set; } + } + + public class CashCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置起用金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("least_cost")] + [System.Text.Json.Serialization.JsonPropertyName("least_cost")] + public int? LeastCost { get; set; } + + /// + /// 获取或设置减免金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("reduce_cost")] + [System.Text.Json.Serialization.JsonPropertyName("reduce_cost")] + public int? ReduceCost { get; set; } + } + + public class DiscountCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置打折额度。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public int? Discount { get; set; } + } + + public class GiftCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置兑换内容。 + /// + [Newtonsoft.Json.JsonProperty("gift")] + [System.Text.Json.Serialization.JsonPropertyName("gift")] + public string? GiftDetail { get; set; } + } + + public class GeneralCouponCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置优惠详情。 + /// + [Newtonsoft.Json.JsonProperty("default_detail")] + [System.Text.Json.Serialization.JsonPropertyName("default_detail")] + public string? DefaultDetail { get; set; } + } + + + public class GeneralCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + /// + /// 获取或设置进入礼品卡时是否推送事件。 + /// + [Newtonsoft.Json.JsonProperty("need_push_on_view")] + [System.Text.Json.Serialization.JsonPropertyName("need_push_on_view")] + public bool? RequirePushOnView { get; set; } + } + + public class CustomField : CardCreateRequest.Types.GeneralCard.Types.CustomField + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置礼品卡背景图 URL。 + /// + [Newtonsoft.Json.JsonProperty("background_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("background_pic_url")] + public string? BackgrounPictureUrl { get; set; } + + /// + /// 获取或设置礼品卡特权说明。 + /// + [Newtonsoft.Json.JsonProperty("prerogative")] + [System.Text.Json.Serialization.JsonPropertyName("prerogative")] + public string? Prerogative { get; set; } + + /// + /// 获取或设置是否领取后自动激活。 + /// + [Newtonsoft.Json.JsonProperty("auto_activate")] + [System.Text.Json.Serialization.JsonPropertyName("auto_activate")] + public bool? IsAutoActivate { get; set; } + + /// + /// 获取或设置是否支持积分。 + /// + [Newtonsoft.Json.JsonProperty("supply_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("supply_bonus")] + public bool? IsSupplyBonus { get; set; } + + /// + /// 获取或设置是否支持余额。 + /// + [Newtonsoft.Json.JsonProperty("supply_balance")] + [System.Text.Json.Serialization.JsonPropertyName("supply_balance")] + public bool? IsSupplyBalance { get; set; } + + /// + /// 获取或设置自定义会员信息类目 1 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field1")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field1")] + public Types.CustomField? CustomField1 { get; set; } + + /// + /// 获取或设置自定义会员信息类目 2 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field2")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field2")] + public Types.CustomField? CustomField2 { get; set; } + + /// + /// 获取或设置自定义会员信息类目 3 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field3")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field3")] + public Types.CustomField? CustomField3 { get; set; } + } + + public class MembershipCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + public new static class Types + { + public class Payment + { + public static class Types + { + public class SwipingCard + { + /// + /// 获取或设置是否支持微信支付刷卡。 + /// + [Newtonsoft.Json.JsonProperty("is_swipe_card")] + [System.Text.Json.Serialization.JsonPropertyName("is_swipe_card")] + public bool CanSwipe { get; set; } + } + } + + /// + /// 获取或设置是否支持微信支付刷卡。 + /// + [Newtonsoft.Json.JsonProperty("swipe_card")] + [System.Text.Json.Serialization.JsonPropertyName("swipe_card")] + public Types.SwipingCard? SwipingCard { get; set; } + } + } + + /// + /// 获取或设置进入会员卡时是否推送事件。 + /// + [Newtonsoft.Json.JsonProperty("need_push_on_view")] + [System.Text.Json.Serialization.JsonPropertyName("need_push_on_view")] + public bool? RequirePushOnView { get; set; } + + /// + /// 获取或设置微信支付信息。 + /// + [Newtonsoft.Json.JsonProperty("pay_info")] + [System.Text.Json.Serialization.JsonPropertyName("pay_info")] + public Types.Payment? Payment { get; set; } + } + + public class CustomField : CardCreateRequest.Types.MembershipCard.Types.CustomField + { + } + + public class CustomCell : CardCreateRequest.Types.MembershipCard.Types.CustomCell + { + } + + public class BonusRule : CardCreateRequest.Types.MembershipCard.Types.BonusRule + { + } + + public class Operation + { + public static class Types + { + public class UrlCell + { + /// + /// 获取或设置送券的 CardId 列表。 + /// + [Newtonsoft.Json.JsonProperty("card_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("card_id_list")] + public IList? CardIdList { get; set; } + + /// + /// 获取或设置推荐位展示的截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long? EndTimestamp { get; set; } + + /// + /// 获取或设置文本内容。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// 获取或设置跳转链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// 获取或设置跳转链接对应的小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_brand_id")] + public string? BrandMiniProgramAppId { get; set; } + + /// + /// 获取或设置跳转链接对应的小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("app_brand_pass")] + public string? BrandMiniProgramPath { get; set; } + } + } + + /// + /// 获取或设置推荐内容信息。 + /// + [Newtonsoft.Json.JsonProperty("url_cell")] + [System.Text.Json.Serialization.JsonPropertyName("url_cell")] + public Types.UrlCell? UrlCell { get; set; } + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置会员卡背景图 URL。 + /// + [Newtonsoft.Json.JsonProperty("background_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("background_pic_url")] + public string? BackgrounPictureUrl { get; set; } + + /// + /// 获取或设置会员卡特权说明。 + /// + [Newtonsoft.Json.JsonProperty("prerogative")] + [System.Text.Json.Serialization.JsonPropertyName("prerogative")] + public string? Prerogative { get; set; } + + /// + /// 获取或设置是否领取后自动激活。 + /// + [Newtonsoft.Json.JsonProperty("auto_activate")] + [System.Text.Json.Serialization.JsonPropertyName("auto_activate")] + public bool? IsAutoActivate { get; set; } + + /// + /// 获取或设置是否支持一键开卡。 + /// + [Newtonsoft.Json.JsonProperty("wx_activate")] + [System.Text.Json.Serialization.JsonPropertyName("wx_activate")] + public bool? IsWechatActivate { get; set; } + + /// + /// 获取或设置是否支持跳转型一键激活。 + /// + [Newtonsoft.Json.JsonProperty("wx_activate_after_submit")] + [System.Text.Json.Serialization.JsonPropertyName("wx_activate_after_submit")] + public bool? IsWechatActivateAfterSubmit { get; set; } + + /// + /// 获取或设置激活会员卡外链。 + /// + [Newtonsoft.Json.JsonProperty("activate_url")] + [System.Text.Json.Serialization.JsonPropertyName("activate_url")] + public string? ActivateUrl { get; set; } + + /// + /// 获取或设置激活会员卡对应的小程序原始 ID。 + /// + [Newtonsoft.Json.JsonProperty("activate_app_brand_user_name")] + [System.Text.Json.Serialization.JsonPropertyName("activate_app_brand_user_name")] + public string? ActivateBrandMiniProgramUsername { get; set; } + + /// + /// 获取或设置激活会员卡对应的小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("activate_app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("activate_app_brand_pass")] + public string? ActivateBrandMiniProgramPath { get; set; } + + /// + /// 获取或设置跳转型一键激活的跳转外链。 + /// + [Newtonsoft.Json.JsonProperty("wx_activate_after_submit_url")] + [System.Text.Json.Serialization.JsonPropertyName("wx_activate_after_submit_url")] + public string? WechatActivateAfterSubmitUrl { get; set; } + + /// + /// 获取或设置是否支持积分。 + /// + [Newtonsoft.Json.JsonProperty("supply_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("supply_bonus")] + public bool? IsSupplyBonus { get; set; } + + /// + /// 获取或设置查看积分详情外链。 + /// + [Newtonsoft.Json.JsonProperty("bonus_url")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_url")] + public string? BonusUrl { get; set; } + + /// + /// 获取或设置积分清零规则。 + /// + [Newtonsoft.Json.JsonProperty("bonus_cleared")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_cleared")] + public string? BonusClearedString { get; set; } + + /// + /// 获取或设置积分规则。 + /// + [Newtonsoft.Json.JsonProperty("bonus_rules")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_rules")] + public string? BonusRulesString { get; set; } + + /// + /// 获取或设置积分规则。 + /// + [Newtonsoft.Json.JsonProperty("bonus_rule")] + [System.Text.Json.Serialization.JsonPropertyName("bonus_rule")] + public Types.BonusRule? BonusRule { get; set; } + + /// + /// 获取或设置是否支持储值。 + /// + [Newtonsoft.Json.JsonProperty("supply_balance")] + [System.Text.Json.Serialization.JsonPropertyName("supply_balance")] + public bool? IsSupplyBalance { get; set; } + + /// + /// 获取或设置查看余额详情外链。 + /// + [Newtonsoft.Json.JsonProperty("balance_url")] + [System.Text.Json.Serialization.JsonPropertyName("balance_url")] + public string? BalanceUrl { get; set; } + + /// + /// 获取或设置储值规则。 + /// + [Newtonsoft.Json.JsonProperty("balance_rules")] + [System.Text.Json.Serialization.JsonPropertyName("balance_rules")] + public string? BalanceRules { get; set; } + + /// + /// 获取或设置自定义会员信息类目 1 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field1")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field1")] + public Types.CustomField? CustomField1 { get; set; } + + /// + /// 获取或设置自定义会员信息类目 2 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field2")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field2")] + public Types.CustomField? CustomField2 { get; set; } + + /// + /// 获取或设置自定义会员信息类目 3 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_field3")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field3")] + public Types.CustomField? CustomField3 { get; set; } + + /// + /// 获取或设置自定义会员服务入口 1 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_cell1")] + [System.Text.Json.Serialization.JsonPropertyName("custom_cell1")] + public Types.CustomCell? CustomCell1 { get; set; } + + /// + /// 获取或设置自定义会员服务入口 2 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_cell2")] + [System.Text.Json.Serialization.JsonPropertyName("custom_cell2")] + public Types.CustomCell? CustomCell2 { get; set; } + + /// + /// 获取或设置自定义会员服务入口 3 信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_cell3")] + [System.Text.Json.Serialization.JsonPropertyName("custom_cell3")] + public Types.CustomCell? CustomCell3 { get; set; } + + /// + /// 获取或设置折扣优惠。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public int? Discount { get; set; } + + /// + /// 获取或设置积分余额等变动消息赠券信息。 + /// + [Newtonsoft.Json.JsonProperty("modify_msg_operation")] + [System.Text.Json.Serialization.JsonPropertyName("modify_msg_operation")] + public Types.Operation? OperationAfterModify { get; set; } + + /// + /// 获取或设置会员卡激活消息赠券信息。 + /// + [Newtonsoft.Json.JsonProperty("activate_msg_operation")] + [System.Text.Json.Serialization.JsonPropertyName("activate_msg_operation")] + public Types.Operation? OperationAfterActivate { get; set; } + } + + public class MeetingTicketCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置会议详情。 + /// + [Newtonsoft.Json.JsonProperty("meeting_detail")] + [System.Text.Json.Serialization.JsonPropertyName("meeting_detail")] + public string? MeetingDetail { get; set; } + + /// + /// 获取或设置会场导览图 URL。 + /// + [Newtonsoft.Json.JsonProperty("map_url")] + [System.Text.Json.Serialization.JsonPropertyName("map_url")] + public string? MapUrl { get; set; } + } + + public class ScenicTicketCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置票类型。 + /// + [Newtonsoft.Json.JsonProperty("ticket_class")] + [System.Text.Json.Serialization.JsonPropertyName("ticket_class")] + public string? TicketClass { get; set; } + + /// + /// 获取或设置景区导览图 URL。 + /// + [Newtonsoft.Json.JsonProperty("guide_url")] + [System.Text.Json.Serialization.JsonPropertyName("guide_url")] + public string? GuideUrl { get; set; } + } + + public class MovieTicketCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置电影详情。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public string? MovieDetail { get; set; } + } + + public class BoardingPassCard + { + public static class Types + { + public class Base : GrouponCard.Types.Base + { + } + } + + /// + /// 获取或设置卡券基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置起点。 + /// + [Newtonsoft.Json.JsonProperty("from")] + [System.Text.Json.Serialization.JsonPropertyName("from")] + public string? From { get; set; } + + /// + /// 获取或设置终点。 + /// + [Newtonsoft.Json.JsonProperty("to")] + [System.Text.Json.Serialization.JsonPropertyName("to")] + public string? To { get; set; } + + /// + /// 获取或设置航班。 + /// + [Newtonsoft.Json.JsonProperty("flight")] + [System.Text.Json.Serialization.JsonPropertyName("flight")] + public string? Flight { get; set; } + + /// + /// 获取或设置登机口。 + /// + [Newtonsoft.Json.JsonProperty("gate")] + [System.Text.Json.Serialization.JsonPropertyName("gate")] + public string? Gate { get; set; } + + /// + /// 获取或设置在线值机外链。 + /// + [Newtonsoft.Json.JsonProperty("check_in_url")] + [System.Text.Json.Serialization.JsonPropertyName("check_in_url")] + public string? CheckinUrl { get; set; } + + /// + /// 获取或设置机型。 + /// + [Newtonsoft.Json.JsonProperty("air_model")] + [System.Text.Json.Serialization.JsonPropertyName("air_model")] + public string? AirModel { get; set; } = string.Empty; + + /// + /// 获取或设置起飞时间戳。 + /// + [Newtonsoft.Json.JsonProperty("departure_time")] + [System.Text.Json.Serialization.JsonPropertyName("departure_time")] + public long? DepartureTimestamp { get; set; } + + /// + /// 获取或设置降落时间戳。 + /// + [Newtonsoft.Json.JsonProperty("landing_time")] + [System.Text.Json.Serialization.JsonPropertyName("landing_time")] + public long? LandingTimestamp { get; set; } + } + } + + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置团购券信息。 + /// + [Newtonsoft.Json.JsonProperty("groupon")] + [System.Text.Json.Serialization.JsonPropertyName("groupon")] + public Types.GrouponCard? Groupon { get; set; } + + /// + /// 获取或设置代金券信息。 + /// + [Newtonsoft.Json.JsonProperty("cash")] + [System.Text.Json.Serialization.JsonPropertyName("cash")] + public Types.CashCard? Cash { get; set; } + + /// + /// 获取或设置折扣券信息。 + /// + [Newtonsoft.Json.JsonProperty("discount")] + [System.Text.Json.Serialization.JsonPropertyName("discount")] + public Types.DiscountCard? Discount { get; set; } + + /// + /// 获取或设置兑换券信息。 + /// + [Newtonsoft.Json.JsonProperty("gift")] + [System.Text.Json.Serialization.JsonPropertyName("gift")] + public Types.GiftCard? Gift { get; set; } + + /// + /// 获取或设置优惠券信息。 + /// + [Newtonsoft.Json.JsonProperty("general_coupon")] + [System.Text.Json.Serialization.JsonPropertyName("general_coupon")] + public Types.GeneralCouponCard? GeneralCoupon { get; set; } + + /// + /// 获取或设置礼品卡信息。 + /// + [Newtonsoft.Json.JsonProperty("general_card")] + [System.Text.Json.Serialization.JsonPropertyName("general_card")] + public Types.GeneralCard? GeneralCard { get; set; } + + /// + /// 获取或设置会员卡信息。 + /// + [Newtonsoft.Json.JsonProperty("member_card")] + [System.Text.Json.Serialization.JsonPropertyName("member_card")] + public Types.MembershipCard? Membership { get; set; } + + /// + /// 获取或设置会议门票信息。 + /// + [Newtonsoft.Json.JsonProperty("meeting_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("meeting_ticket")] + public Types.MeetingTicketCard? MeetingTicket { get; set; } + + /// + /// 获取或设置景区门票信息。 + /// + [Newtonsoft.Json.JsonProperty("scenic_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("scenic_ticket")] + public Types.ScenicTicketCard? ScenicTicket { get; set; } + + /// + /// 获取或设置电影票信息。 + /// + [Newtonsoft.Json.JsonProperty("movie_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("movie_ticket")] + public Types.MovieTicketCard? MovieTicket { get; set; } + + /// + /// 获取或设置飞机票信息。 + /// + [Newtonsoft.Json.JsonProperty("boarding_pass")] + [System.Text.Json.Serialization.JsonPropertyName("boarding_pass")] + public Types.BoardingPassCard? BoardingPass { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardUpdateResponse.cs new file mode 100644 index 00000000..a4cfde6f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/CardUpdateResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/update 接口的响应。 + /// + public class CardUpdateResponse : WechatApiResponse + { + /// + /// 获取或设置是否需要提交审核。 + /// + [Newtonsoft.Json.JsonProperty("send_check")] + [System.Text.Json.Serialization.JsonPropertyName("send_check")] + public bool RequireSendCheck { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeCheckCodeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeCheckCodeRequest.cs new file mode 100644 index 00000000..bcdb72f9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeCheckCodeRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/checkcode 接口的请求。 + /// + public class CardCodeCheckCodeRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置卡券 Code 列表。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public IList CardCodeList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeCheckCodeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeCheckCodeResponse.cs new file mode 100644 index 00000000..da8f547f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeCheckCodeResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/checkcode 接口的响应。 + /// + public class CardCodeCheckCodeResponse : WechatApiResponse + { + /// + /// 获取或设置已经成功存入的卡券 Code 列表。 + /// + [Newtonsoft.Json.JsonProperty("exist_code")] + [System.Text.Json.Serialization.JsonPropertyName("exist_code")] + public string[] ExistingCodeList { get; set; } = default!; + + /// + /// 获取或设置没有存入的卡券 Code 列表。 + /// + [Newtonsoft.Json.JsonProperty("not_exist_code")] + [System.Text.Json.Serialization.JsonPropertyName("not_exist_code")] + public string[] NonExistingCodeList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeConsumeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeConsumeRequest.cs new file mode 100644 index 00000000..1052c25f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeConsumeRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/consume 接口的请求。 + /// + public class CardCodeConsumeRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string? CardId { get; set; } + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeConsumeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeConsumeResponse.cs new file mode 100644 index 00000000..eacb2bcb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeConsumeResponse.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/consume 接口的响应。 + /// + public class CardCodeConsumeResponse : WechatApiResponse + { + public static class Types + { + public class Card + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = default!; + } + } + + /// + /// 获取或设置卡券信息。 + /// + [Newtonsoft.Json.JsonProperty("card")] + [System.Text.Json.Serialization.JsonPropertyName("card")] + public Types.Card Card { get; set; } = default!; + + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDecryptRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDecryptRequest.cs new file mode 100644 index 00000000..cbca2034 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDecryptRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/decrypt 接口的请求。 + /// + public class CardCodeDecryptRequest : WechatApiRequest + { + /// + /// 获取或设置经过加密的卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("encrypt_code")] + [System.Text.Json.Serialization.JsonPropertyName("encrypt_code")] + public string EncryptedCardCode { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDecryptResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDecryptResponse.cs new file mode 100644 index 00000000..48dbcad5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDecryptResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/decrypt 接口的响应。 + /// + public class CardCodeDecryptResponse : WechatApiResponse + { + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDepositRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDepositRequest.cs new file mode 100644 index 00000000..1bc98cab --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDepositRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/deposit 接口的请求。 + /// + public class CardCodeDepositRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置卡券 Code 列表。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public IList CardCodeList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDepositResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDepositResponse.cs new file mode 100644 index 00000000..8675bdf7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeDepositResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/deposit 接口的响应。 + /// + public class CardCodeDepositResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetDepositCountRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetDepositCountRequest.cs new file mode 100644 index 00000000..9ad0a946 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetDepositCountRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/getdepositcount 接口的请求。 + /// + public class CardCodeGetDepositCountRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetDepositCountResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetDepositCountResponse.cs new file mode 100644 index 00000000..be1a6b64 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetDepositCountResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/getdepositcount 接口的响应。 + /// + public class CardCodeGetDepositCountResponse : WechatApiResponse + { + /// + /// 获取或设置已经成功存入的卡券 Code 数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Count { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetRequest.cs new file mode 100644 index 00000000..887cf151 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/get 接口的请求。 + /// + public class CardCodeGetRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string? CardId { get; set; } + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + + /// + /// 获取或设置是否校验核销状态。 + /// + [Newtonsoft.Json.JsonProperty("check_consume")] + [System.Text.Json.Serialization.JsonPropertyName("check_consume")] + public bool? RequireCheckConsume { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetResponse.cs new file mode 100644 index 00000000..389fc532 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeGetResponse.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/get 接口的响应。 + /// + public class CardCodeGetResponse : WechatApiResponse + { + public static class Types + { + public class Card + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string? CardCode { get; set; } = default!; + + /// + /// 获取或设置卡券编号。 + /// + [Newtonsoft.Json.JsonProperty("card_number")] + [System.Text.Json.Serialization.JsonPropertyName("card_number")] + public string? CardNumber { get; set; } = default!; + + /// + /// 获取或设置起用时间戳。 + /// + [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("bonus")] + [System.Text.Json.Serialization.JsonPropertyName("bonus")] + public int? Bonus { get; set; } + + /// + /// 获取或设置余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("balance")] + [System.Text.Json.Serialization.JsonPropertyName("balance")] + public int? Balance { get; set; } + } + + public class MemberUser : CardMemberCardUserInfoGetResponse.Types.MemberUser + { + } + } + + /// + /// 获取或设置卡券信息。 + /// + [Newtonsoft.Json.JsonProperty("card")] + [System.Text.Json.Serialization.JsonPropertyName("card")] + public Types.Card Card { get; set; } = default!; + + /// + /// 获取或设置卡券状态。 + /// + [Newtonsoft.Json.JsonProperty("user_card_status")] + [System.Text.Json.Serialization.JsonPropertyName("user_card_status")] + public string CardStatus { get; set; } = default!; + + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置用户昵称。 + /// + [Newtonsoft.Json.JsonProperty("nickname")] + [System.Text.Json.Serialization.JsonPropertyName("nickname")] + public string Nickname { get; set; } = default!; + + /// + /// 获取或设置会员卡编号。 + /// + [Newtonsoft.Json.JsonProperty("membership_number")] + [System.Text.Json.Serialization.JsonPropertyName("membership_number")] + public string? MembershipNumber { get; set; } + + /// + /// 获取或设置会员信息。 + /// + [Newtonsoft.Json.JsonProperty("user_info")] + [System.Text.Json.Serialization.JsonPropertyName("user_info")] + public Types.MemberUser? MemberUser { get; set; } + + /// + /// 获取或设置会员卡积分。 + /// + [Newtonsoft.Json.JsonProperty("bonus")] + [System.Text.Json.Serialization.JsonPropertyName("bonus")] + public int? MemberBonus { get; set; } + + /// + /// 获取或设置会员卡余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("balance")] + [System.Text.Json.Serialization.JsonPropertyName("balance")] + public int? MemberBalance { get; set; } + + /// + /// 获取或设置订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string? OrderId { get; set; } + + /// + /// 获取或设置背景图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("background_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("background_pic_url")] + public string? BackgroundPictureUrl { get; set; } + + /// + /// 获取或设置是否可以核销。 + /// + [Newtonsoft.Json.JsonProperty("can_consume")] + [System.Text.Json.Serialization.JsonPropertyName("can_consume")] + public bool? CanConsume { get; set; } + + /// + /// 获取或设置商家自定义字符串。 + /// + [Newtonsoft.Json.JsonProperty("outer_str")] + [System.Text.Json.Serialization.JsonPropertyName("outer_str")] + public string? OuterString { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUnavailableRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUnavailableRequest.cs new file mode 100644 index 00000000..60644fc5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUnavailableRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/unavailable 接口的请求。 + /// + public class CardCodeUnavailableRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string? CardId { get; set; } + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + + /// + /// 获取或设置失效原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? Reason { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUnavailableResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUnavailableResponse.cs new file mode 100644 index 00000000..a89d04a0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUnavailableResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/unavailable 接口的响应。 + /// + public class CardCodeUnavailableResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUpdateRequest.cs new file mode 100644 index 00000000..5c93677f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUpdateRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/update 接口的请求。 + /// + public class CardCodeUpdateRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string? CardId { get; set; } + + /// + /// 获取或设置原卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string OldCardCode { get; set; } = string.Empty; + + /// + /// 获取或设置新卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("new_code")] + [System.Text.Json.Serialization.JsonPropertyName("new_code")] + public string NewCardCode { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUpdateResponse.cs new file mode 100644 index 00000000..cc962126 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/Code/CardCodeUpdateResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/code/update 接口的响应。 + /// + public class CardCodeUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGeneralCardUpdateUserRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGeneralCardUpdateUserRequest.cs new file mode 100644 index 00000000..b37de9f7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGeneralCardUpdateUserRequest.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/generalcard/updateuser 接口的请求。 + /// + public class CardGeneralCardUpdateUserRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + + /// + /// 获取或设置礼品卡背景图 URL。 + /// + [Newtonsoft.Json.JsonProperty("background_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("background_pic_url")] + public string? BackgroundPictureUrl { get; set; } + + /// + /// 获取或设置积分。 + /// + [Newtonsoft.Json.JsonProperty("bonus")] + [System.Text.Json.Serialization.JsonPropertyName("bonus")] + public int? Bounus { get; set; } + + /// + /// 获取或设置积分变动说明。 + /// + [Newtonsoft.Json.JsonProperty("record_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("record_bonus")] + public string? BounusRecord { get; set; } + + /// + /// 获取或设置余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("balance")] + [System.Text.Json.Serialization.JsonPropertyName("balance")] + public int? Balance { get; set; } + + /// + /// 获取或设置余额变动说明。 + /// + [Newtonsoft.Json.JsonProperty("record_balance")] + [System.Text.Json.Serialization.JsonPropertyName("record_balance")] + public string? BalanceRecord { get; set; } + + /// + /// 获取或设置创建时字段 `CustomField1` 定义类型的最新值。 + /// + [Newtonsoft.Json.JsonProperty("custom_field_value1")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field_value1")] + public string? CustomFieldValue1 { get; set; } + + /// + /// 获取或设置创建时字段 `CustomField2` 定义类型的最新值。 + /// + [Newtonsoft.Json.JsonProperty("custom_field_value2")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field_value2")] + public string? CustomFieldValue2 { get; set; } + + /// + /// 获取或设置创建时字段 `CustomField3` 定义类型的最新值。 + /// + [Newtonsoft.Json.JsonProperty("custom_field_value3")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field_value3")] + public string? CustomFieldValue3 { get; set; } + + /// + /// 获取或设置是否可转增。 + /// + [Newtonsoft.Json.JsonProperty("can_give_friend")] + [System.Text.Json.Serialization.JsonPropertyName("can_give_friend")] + public bool? CanTransfer { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGeneralCardUpdateUserResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGeneralCardUpdateUserResponse.cs new file mode 100644 index 00000000..422a9783 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGeneralCardUpdateUserResponse.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/generalcard/updateuser 接口的响应。 + /// + public class CardGeneralCardUpdateUserResponse : WechatApiResponse + { + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置当前用户积分。 + /// + [Newtonsoft.Json.JsonProperty("result_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("result_bonus")] + public int ResultBounus { get; set; } + + /// + /// 获取或设置当前用户余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("result_balance")] + [System.Text.Json.Serialization.JsonPropertyName("result_balance")] + public int ResultBalance { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardMaintainSetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardMaintainSetRequest.cs new file mode 100644 index 00000000..add05862 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardMaintainSetRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/maintain/set 接口的请求。 + /// + public class CardGiftCardMaintainSetRequest : WechatApiRequest + { + /// + /// 获取或设置货架 ID。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("page_id")] + [System.Text.Json.Serialization.JsonPropertyName("page_id")] + public string? PageId { get; set; } + + /// + /// 获取或设置是否下架全部货架。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("all")] + [System.Text.Json.Serialization.JsonPropertyName("all")] + public bool? IsAllPage { get; set; } + + /// + /// 获取或设置货架 ID。 + /// + [Newtonsoft.Json.JsonProperty("maintain")] + [System.Text.Json.Serialization.JsonPropertyName("maintain")] + public bool IsMaintained { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardMaintainSetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardMaintainSetResponse.cs new file mode 100644 index 00000000..64e3e5b7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardMaintainSetResponse.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/maintain/set 接口的响应。 + /// + public class CardGiftCardMaintainSetResponse : WechatApiResponse + { + public static class Types + { + public class Control + { + public static class Types + { + public class Page + { + /// + /// 获取或设置货架 ID。 + /// + [Newtonsoft.Json.JsonProperty("page_id")] + [System.Text.Json.Serialization.JsonPropertyName("page_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedStringConverter))] + public string PageId { get; set; } = default!; + + /// + /// 获取或设置商户控制的货架状态。 + /// + [Newtonsoft.Json.JsonProperty("page_control_type")] + [System.Text.Json.Serialization.JsonPropertyName("page_control_type")] + public string PageControlType { get; set; } = default!; + + /// + /// 获取或设置系统控制的货架状态。 + /// + [Newtonsoft.Json.JsonProperty("system_page_control_type")] + [System.Text.Json.Serialization.JsonPropertyName("system_page_control_type")] + public string SystemPageControlType { get; set; } = default!; + } + } + + /// + /// 获取或设置商户控制的所有货架的状态。 + /// + [Newtonsoft.Json.JsonProperty("biz_control_type")] + [System.Text.Json.Serialization.JsonPropertyName("biz_control_type")] + public string BusinessControlType { get; set; } = default!; + + /// + /// 获取或设置系统控制的所有货架的状态。 + /// + [Newtonsoft.Json.JsonProperty("system_biz_control_type")] + [System.Text.Json.Serialization.JsonPropertyName("system_biz_control_type")] + public string SystemBusinessControlType { get; set; } = default!; + + /// + /// 获取或设置货架列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Page[] PageList { get; set; } = default!; + } + } + + /// + /// 获取或设置控制结果信息。 + /// + [Newtonsoft.Json.JsonProperty("control_info")] + [System.Text.Json.Serialization.JsonPropertyName("control_info")] + public Types.Control Control { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageAddRequest.cs new file mode 100644 index 00000000..a9f292a0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageAddRequest.cs @@ -0,0 +1,255 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/page/add 接口的请求。 + /// + public class CardGiftCardPageAddRequest : WechatApiRequest + { + public static class Types + { + public class Page + { + public static class Types + { + public class Theme + { + public static class Types + { + public class Card + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置商品名。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// 获取或设置商品缩略图 URL。 + /// + [Newtonsoft.Json.JsonProperty("pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("pic_url")] + public string? PictureUrl { get; set; } + + /// + /// 获取或设置商品简介。 + /// + [Newtonsoft.Json.JsonProperty("desc")] + [System.Text.Json.Serialization.JsonPropertyName("desc")] + public string? Description { get; set; } + } + + public class Picture + { + /// + /// 获取或设置卡面图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("background_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("background_pic_url")] + public string BackgroundPictureUrl { get; set; } = string.Empty; + + /// + /// 获取或设置自定义卡面标识 URL。 + /// + [Newtonsoft.Json.JsonProperty("outer_img_id")] + [System.Text.Json.Serialization.JsonPropertyName("outer_img_id")] + public string? OuterImageUrl { get; set; } + + /// + /// 获取或设置该卡面对应的默认祝福语。 + /// + [Newtonsoft.Json.JsonProperty("default_gifting_msg")] + [System.Text.Json.Serialization.JsonPropertyName("default_gifting_msg")] + public string? DefaultGiftingMessage { get; set; } + } + } + + /// + /// 获取或设置主题封面图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("theme_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("theme_pic_url")] + public string ThemePictureUrl { get; set; } = string.Empty; + + /// + /// 获取或设置主题名称。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置主题颜色(格式:#RRGGBB)。 + /// + [Newtonsoft.Json.JsonProperty("title_color")] + [System.Text.Json.Serialization.JsonPropertyName("title_color")] + public string TitleColor { get; set; } = string.Empty; + + /// + /// 获取或设置礼品卡列表。 + /// + [Newtonsoft.Json.JsonProperty("item_list")] + [System.Text.Json.Serialization.JsonPropertyName("item_list")] + public IList CardList { get; set; } = new List(); + + /// + /// 获取或设置封面列表。 + /// + [Newtonsoft.Json.JsonProperty("pic_item_list")] + [System.Text.Json.Serialization.JsonPropertyName("pic_item_list")] + public IList PictureList { get; set; } = new List(); + + /// + /// 获取或设置主题分类标号。 + /// + [Newtonsoft.Json.JsonProperty("category_index")] + [System.Text.Json.Serialization.JsonPropertyName("category_index")] + public int CategoryIndex { get; set; } + + /// + /// 获取或设置该主题购买页是否突出商品名显示。 + /// + [Newtonsoft.Json.JsonProperty("show_sku_title_first")] + [System.Text.Json.Serialization.JsonPropertyName("show_sku_title_first")] + public bool? IsShowSKUTitleFirst { get; set; } + + /// + /// 获取或设置是否将当前主题设置为 Banner 主题。 + /// + [Newtonsoft.Json.JsonProperty("is_banner")] + [System.Text.Json.Serialization.JsonPropertyName("is_banner")] + public bool? IsBanner { get; set; } + } + + public class Category + { + /// + /// 获取或设置主题分类名称。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + } + + public class CustomCell + { + /// + /// 获取或设置入口名称。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置入口跳转链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置 Banner 图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("banner_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("banner_pic_url")] + public string BannerUrl { get; set; } = string.Empty; + + /// + /// 获取或设置页面标题。 + /// + [Newtonsoft.Json.JsonProperty("page_title")] + [System.Text.Json.Serialization.JsonPropertyName("page_title")] + public string PageTitle { get; set; } = string.Empty; + + /// + /// 获取或设置是否支持一次购买多张。 + /// + [Newtonsoft.Json.JsonProperty("support_multi")] + [System.Text.Json.Serialization.JsonPropertyName("support_multi")] + public bool? IsSupportMultiple { get; set; } + + /// + /// 获取或设置是否支持买给自己。 + /// + [Newtonsoft.Json.JsonProperty("support_buy_for_self")] + [System.Text.Json.Serialization.JsonPropertyName("support_buy_for_self")] + public bool? IsSupportBuyForSelf { get; set; } + + /// + /// 获取或设置主题列表。 + /// + [Newtonsoft.Json.JsonProperty("theme_list")] + [System.Text.Json.Serialization.JsonPropertyName("theme_list")] + public IList? ThemeList { get; set; } + + /// + /// 获取或设置主题分类列表。 + /// + [Newtonsoft.Json.JsonProperty("category_list")] + [System.Text.Json.Serialization.JsonPropertyName("category_list")] + public IList? CategoryList { get; set; } + + /// + /// 获取或设置商家地址。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string Address { get; set; } = string.Empty; + + /// + /// 获取或设置商家服务电话。 + /// + [Newtonsoft.Json.JsonProperty("service_phone")] + [System.Text.Json.Serialization.JsonPropertyName("service_phone")] + public string ServicePhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置商家使用说明。 + /// + [Newtonsoft.Json.JsonProperty("biz_description")] + [System.Text.Json.Serialization.JsonPropertyName("biz_description")] + public string BusinessDescription { get; set; } = string.Empty; + + /// + /// 获取或设置是否支持开发票。 + /// + [Newtonsoft.Json.JsonProperty("need_receipt")] + [System.Text.Json.Serialization.JsonPropertyName("need_receipt")] + public bool? IsSupportReceipt { get; set; } + + /// + /// 获取或设置自定义服务入口 1 信息。 + /// + [Newtonsoft.Json.JsonProperty("cell_1")] + [System.Text.Json.Serialization.JsonPropertyName("cell_1")] + public Types.CustomCell? CustomCell1 { get; set; } + + /// + /// 获取或设置自定义服务入口 2 信息。 + /// + [Newtonsoft.Json.JsonProperty("cell_2")] + [System.Text.Json.Serialization.JsonPropertyName("cell_2")] + public Types.CustomCell? CustomCell2 { get; set; } + } + } + + /// + /// 获取或设置货架信息。 + /// + [Newtonsoft.Json.JsonProperty("page")] + [System.Text.Json.Serialization.JsonPropertyName("page")] + public Types.Page Page { get; set; } = new Types.Page(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageAddResponse.cs new file mode 100644 index 00000000..51efbd0a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageAddResponse.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/page/add 接口的响应。 + /// + public class CardGiftCardPageAddResponse : WechatApiResponse + { + /// + /// 获取或设置货架 ID。 + /// + [Newtonsoft.Json.JsonProperty("page_id")] + [System.Text.Json.Serialization.JsonPropertyName("page_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedStringConverter))] + public string PageId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageBatchGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageBatchGetRequest.cs new file mode 100644 index 00000000..6a3fc927 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageBatchGetRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/page/batchget 接口的请求。 + /// + public class CardGiftCardPageBatchGetRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageBatchGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageBatchGetResponse.cs new file mode 100644 index 00000000..48a364ce --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageBatchGetResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/page/batchget 接口的响应。 + /// + public class CardGiftCardPageBatchGetResponse : WechatApiResponse + { + /// + /// 获取或设置礼品卡货架 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("page_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("page_id_list")] + public string[] PageIdList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageGetRequest.cs new file mode 100644 index 00000000..991243dd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageGetRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/page/get 接口的请求。 + /// + public class CardGiftCardPageGetRequest : WechatApiRequest + { + /// + /// 获取或设置货架 ID。 + /// + [Newtonsoft.Json.JsonProperty("page_id")] + [System.Text.Json.Serialization.JsonPropertyName("page_id")] + public string PageId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageGetResponse.cs new file mode 100644 index 00000000..448a9b41 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageGetResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/page/get 接口的响应。 + /// + public class CardGiftCardPageGetResponse : WechatApiResponse + { + public static class Types + { + public class Page : CardGiftCardPageAddRequest.Types.Page + { + } + } + + /// + /// 获取或设置货架信息。 + /// + [Newtonsoft.Json.JsonProperty("page")] + [System.Text.Json.Serialization.JsonPropertyName("page")] + public Types.Page Page { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageUpdateRequest.cs new file mode 100644 index 00000000..294158ee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageUpdateRequest.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/page/update 接口的请求。 + /// + public class CardGiftCardPageUpdateRequest : WechatApiRequest + { + public static class Types + { + public class Page : CardGiftCardPageAddRequest.Types.Page + { + /// + /// 获取或设置货架 ID。 + /// + [Newtonsoft.Json.JsonProperty("page_id")] + [System.Text.Json.Serialization.JsonPropertyName("page_id")] + public string PageId { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置货架信息。 + /// + [Newtonsoft.Json.JsonProperty("page")] + [System.Text.Json.Serialization.JsonPropertyName("page")] + public Types.Page Page { get; set; } = new Types.Page(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageUpdateResponse.cs new file mode 100644 index 00000000..062b76db --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPageUpdateResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/page/update 接口的响应。 + /// + public class CardGiftCardPageUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPaySubMerchantBindRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPaySubMerchantBindRequest.cs new file mode 100644 index 00000000..d6f04ca5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPaySubMerchantBindRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/pay/submch/bind 接口的请求。 + /// + public class CardGiftCardPaySubMerchantBindRequest : WechatApiRequest + { + /// + /// 获取或设置微信支付子商户号。 + /// + [Newtonsoft.Json.JsonProperty("sub_mch_id")] + [System.Text.Json.Serialization.JsonPropertyName("sub_mch_id")] + public string SubMerchantId { get; set; } = string.Empty; + + /// + /// 获取或设置微信小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("wxa_appid")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_appid")] + public string MiniProgramAppId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPaySubMerchantBindResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPaySubMerchantBindResponse.cs new file mode 100644 index 00000000..359bde74 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPaySubMerchantBindResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/pay/submch/bind 接口的响应。 + /// + public class CardGiftCardPaySubMerchantBindResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPayWhiteListAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPayWhiteListAddRequest.cs new file mode 100644 index 00000000..4b6b24da --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPayWhiteListAddRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/pay/whitelist/add 接口的请求。 + /// + public class CardGiftCardPayWhiteListAddRequest : WechatApiRequest + { + /// + /// 获取或设置微信支付子商户号。 + /// + [Newtonsoft.Json.JsonProperty("sub_mch_id")] + [System.Text.Json.Serialization.JsonPropertyName("sub_mch_id")] + public string SubMerchantId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPayWhiteListAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPayWhiteListAddResponse.cs new file mode 100644 index 00000000..bef88781 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardPayWhiteListAddResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/pay/whitelist/add 接口的响应。 + /// + public class CardGiftCardPayWhiteListAddResponse : WechatApiResponse + { + /// + /// 获取或设置 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardWxaSetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardWxaSetRequest.cs new file mode 100644 index 00000000..96b3db8f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardWxaSetRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/wxa/set 接口的请求。 + /// + public class CardGiftCardWxaSetRequest : WechatApiRequest + { + /// + /// 获取或设置微信小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("wxa_appid")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_appid")] + public string MiniProgramAppId { get; set; } = string.Empty; + + /// + /// 获取或设置货架 ID。 + /// + [Newtonsoft.Json.JsonProperty("page_id")] + [System.Text.Json.Serialization.JsonPropertyName("page_id")] + public string PageId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardWxaSetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardWxaSetResponse.cs new file mode 100644 index 00000000..48adf4d5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/CardGiftCardWxaSetResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/wxa/set 接口的响应。 + /// + public class CardGiftCardWxaSetResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderBatchGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderBatchGetRequest.cs new file mode 100644 index 00000000..4b7f891e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderBatchGetRequest.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/order/batchget 接口的请求。 + /// + public class CardGiftCardOrderBatchGetRequest : WechatApiRequest + { + /// + /// 获取或设置查询的时间起点时间戳。 + /// + [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; } + + /// + /// 获取或设置排序方式。 + /// 默认值:ASC + /// + [Newtonsoft.Json.JsonProperty("sort_type")] + [System.Text.Json.Serialization.JsonPropertyName("sort_type")] + public string SortType { get; set; } = "ASC"; + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderBatchGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderBatchGetResponse.cs new file mode 100644 index 00000000..38699bee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderBatchGetResponse.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/order/batchget 接口的响应。 + /// + public class CardGiftCardOrderBatchGetResponse : WechatApiResponse + { + public static class Types + { + public class Order : CardGiftCardOrderGetResponse.Types.Order + { + } + } + + /// + /// 获取或设置订单列表。 + /// + [Newtonsoft.Json.JsonProperty("order_list")] + [System.Text.Json.Serialization.JsonPropertyName("order_list")] + public Types.Order[] OrderList { get; set; } = default!; + + /// + /// 获取或设置订单总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int Total { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderGetRequest.cs new file mode 100644 index 00000000..020f9f4f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderGetRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/order/get 接口的请求。 + /// + public class CardGiftCardOrderGetRequest : WechatApiRequest + { + /// + /// 获取或设置礼品卡订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderGetResponse.cs new file mode 100644 index 00000000..3e8b6e13 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderGetResponse.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/order/get 接口的响应。 + /// + public class CardGiftCardOrderGetResponse : WechatApiResponse + { + public static class Types + { + public class Order + { + public static class Types + { + public class Card + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = default!; + + /// + /// 获取或设置卡券价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public int Price { get; set; } + + /// + /// 获取或设置背景图 URL。 + /// + [Newtonsoft.Json.JsonProperty("background_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("background_pic_url")] + public string BackgroundPictureUrl { get; set; } = default!; + + /// + /// 获取或设置自定义卡面标识 URL。 + /// + [Newtonsoft.Json.JsonProperty("outer_img_id")] + [System.Text.Json.Serialization.JsonPropertyName("outer_img_id")] + public string? OuterImageUrl { get; set; } + + /// + /// 获取或设置默认祝福语。 + /// + [Newtonsoft.Json.JsonProperty("default_gifting_msg")] + [System.Text.Json.Serialization.JsonPropertyName("default_gifting_msg")] + public string? DefaultGiftingMessage { get; set; } + + /// + /// 获取或设置接收者的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("accepter_openid")] + [System.Text.Json.Serialization.JsonPropertyName("accepter_openid")] + public string? AccepterOpenId { get; set; } + } + } + + /// + /// 获取或设置订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置货架 ID。 + /// + [Newtonsoft.Json.JsonProperty("page_id")] + [System.Text.Json.Serialization.JsonPropertyName("page_id")] + public string PageId { get; set; } = default!; + + /// + /// 获取或设置微信支付交易订单号。 + /// + [Newtonsoft.Json.JsonProperty("trans_id")] + [System.Text.Json.Serialization.JsonPropertyName("trans_id")] + public string TransactionId { get; set; } = default!; + + /// + /// 获取或设置购买者的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置接收者的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("accepter_openid")] + [System.Text.Json.Serialization.JsonPropertyName("accepter_openid")] + public string? AccepterOpenId { get; set; } + + /// + /// 获取或设置全部金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("total_price")] + [System.Text.Json.Serialization.JsonPropertyName("total_price")] + public int TotalFee { get; set; } + + /// + /// 获取或设置是否是群转增。 + /// + [Newtonsoft.Json.JsonProperty("IsChatRoom")] + [System.Text.Json.Serialization.JsonPropertyName("IsChatRoom")] + public bool? IsFromChatroom { get; set; } + + /// + /// 获取或设置礼品卡列表。 + /// + [Newtonsoft.Json.JsonProperty("card_list")] + [System.Text.Json.Serialization.JsonPropertyName("card_list")] + public Types.Card[] Card { get; set; } = default!; + + /// + /// 获取或设置支付完成时间戳。 + /// + [Newtonsoft.Json.JsonProperty("pay_finish_time")] + [System.Text.Json.Serialization.JsonPropertyName("pay_finish_time")] + public long? PayTimestamp { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置商户自定义字符串。 + /// + [Newtonsoft.Json.JsonProperty("outer_str")] + [System.Text.Json.Serialization.JsonPropertyName("outer_str")] + public string? OuterString { get; set; } + } + } + + /// + /// 获取或设置订单信息。 + /// + [Newtonsoft.Json.JsonProperty("order")] + [System.Text.Json.Serialization.JsonPropertyName("order")] + public Types.Order Order { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderRefundRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderRefundRequest.cs new file mode 100644 index 00000000..f677abd6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderRefundRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/order/refund 接口的请求。 + /// + public class CardGiftCardOrderRefundRequest : WechatApiRequest + { + /// + /// 获取或设置礼品卡订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderRefundResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderRefundResponse.cs new file mode 100644 index 00000000..2f3d6abd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/GiftCard/Order/CardGiftCardOrderRefundResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/giftcard/order/refund 接口的响应。 + /// + public class CardGiftCardOrderRefundResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateGetUrlRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateGetUrlRequest.cs new file mode 100644 index 00000000..e3b97f69 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateGetUrlRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/activate/geturl 接口的请求。 + /// + public class CardMemberCardActivateGetUrlRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置商户自定义字符串。 + /// + [Newtonsoft.Json.JsonProperty("outer_str")] + [System.Text.Json.Serialization.JsonPropertyName("outer_str")] + public string? OuterString { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateGetUrlResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateGetUrlResponse.cs new file mode 100644 index 00000000..abfb60dc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateGetUrlResponse.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/activate/geturl 接口的响应。 + /// + public class CardMemberCardActivateGetUrlResponse : WechatApiResponse + { + /// + /// 获取或设置开卡插件所需参数 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + public IDictionary GetUrlParameters() + { + if (!Flurl.Url.IsValid(Url)) + throw new InvalidOperationException(); + + Flurl.Url url = Flurl.Url.Parse(Url); + return new ReadOnlyDictionary( + url.QueryParams.ToDictionary(k => k.Name, v => v.Name) + ); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateRequest.cs new file mode 100644 index 00000000..eedbf4b5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateRequest.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/activate 接口的请求。 + /// + public class CardMemberCardActivateRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string? CardId { get; set; } + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + + /// + /// 获取或设置会员卡编号。 + /// + [Newtonsoft.Json.JsonProperty("membership_number")] + [System.Text.Json.Serialization.JsonPropertyName("membership_number")] + public string MembershipNumber { get; set; } = string.Empty; + + /// + /// 获取或设置会员卡背景图 URL。 + /// + [Newtonsoft.Json.JsonProperty("background_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("background_pic_url")] + public string? BackgroundPictureUrl { get; set; } + + /// + /// 获取或设置激活后有效起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("activate_begin_time")] + [System.Text.Json.Serialization.JsonPropertyName("activate_begin_time")] + public long? ActivateBeginTimestamp { get; set; } + + /// + /// 获取或设置激活后有效截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("activate_end_time")] + [System.Text.Json.Serialization.JsonPropertyName("activate_end_time")] + public long? ActivateEndTimestamp { get; set; } + + /// + /// 获取或设置初始积分。 + /// + [Newtonsoft.Json.JsonProperty("init_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("init_bonus")] + public int? InitialBounus { get; set; } + + /// + /// 获取或设置初始积分说明。 + /// + [Newtonsoft.Json.JsonProperty("init_bonus_record")] + [System.Text.Json.Serialization.JsonPropertyName("init_bonus_record")] + public string? InitialBounusRecord { get; set; } + + /// + /// 获取或设置初始余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("init_balance")] + [System.Text.Json.Serialization.JsonPropertyName("init_balance")] + public int? InitialBalance { get; set; } + + /// + /// 获取或设置创建时字段 `CustomField1` 定义类型的初始值。 + /// + [Newtonsoft.Json.JsonProperty("init_custom_field_value1")] + [System.Text.Json.Serialization.JsonPropertyName("init_custom_field_value1")] + public string? InitialCustomFieldValue1 { get; set; } + + /// + /// 获取或设置创建时字段 `CustomField2` 定义类型的初始值。 + /// + [Newtonsoft.Json.JsonProperty("init_custom_field_value2")] + [System.Text.Json.Serialization.JsonPropertyName("init_custom_field_value2")] + public string? InitialCustomFieldValue2 { get; set; } + + /// + /// 获取或设置创建时字段 `CustomField3` 定义类型的初始值。 + /// + [Newtonsoft.Json.JsonProperty("init_custom_field_value3")] + [System.Text.Json.Serialization.JsonPropertyName("init_custom_field_value3")] + public string? InitialCustomFieldValue3 { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateResponse.cs new file mode 100644 index 00000000..1038a6d0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateResponse.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/activate 接口的响应。 + /// + public class CardMemberCardActivateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateTempInfoGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateTempInfoGetRequest.cs new file mode 100644 index 00000000..0397122f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateTempInfoGetRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/activatetempinfo/get 接口的请求。 + /// + public class CardMemberCardActivateTempInfoGetRequest : WechatApiRequest + { + /// + /// 获取或设置跳转型开卡组件开卡后回调中的激活票据。 + /// + [Newtonsoft.Json.JsonProperty("activate_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("activate_ticket")] + public string ActivateTicket { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateTempInfoGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateTempInfoGetResponse.cs new file mode 100644 index 00000000..ae9c75d4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateTempInfoGetResponse.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/activatetempinfo/get 接口的响应。 + /// + public class CardMemberCardActivateTempInfoGetResponse : WechatApiResponse + { + public static class Types + { + public class MemberUser : CardCodeGetResponse.Types.MemberUser + { + } + } + + /// + /// 获取或设置会员信息。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public Types.MemberUser MemberUser { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateUserFormSetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateUserFormSetRequest.cs new file mode 100644 index 00000000..e5d0d6c9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateUserFormSetRequest.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/activateuserform/set 接口的请求。 + /// + public class CardMemberCardActivateUserFormSetRequest : WechatApiRequest + { + public static class Types + { + public class Statement + { + /// + /// 获取或设置字段名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置字段 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = string.Empty; + } + + public class Form + { + public static class Types + { + public class RichField + { + /// + /// 获取或设置字段类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置字段名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置字段值列表。 + /// + [Newtonsoft.Json.JsonProperty("values")] + [System.Text.Json.Serialization.JsonPropertyName("values")] + public IList Values { get; set; } = new List(); + } + } + + /// + /// 获取或设置是否允许用户激活后再次修改。 + /// + [Newtonsoft.Json.JsonProperty("can_modify")] + [System.Text.Json.Serialization.JsonPropertyName("can_modify")] + public bool? CanModify { get; set; } + + /// + /// 获取或设置自定义富文本字段列表。 + /// + [Newtonsoft.Json.JsonProperty("rich_field_list")] + [System.Text.Json.Serialization.JsonPropertyName("rich_field_list")] + public IList? RichFieldList { get; set; } + + /// + /// 获取或设置内置字段列表。 + /// + [Newtonsoft.Json.JsonProperty("common_field_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("common_field_id_list")] + public IList? CommonFieldList { get; set; } + + /// + /// 获取或设置自定义字段列表。 + /// + [Newtonsoft.Json.JsonProperty("custom_field_list")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field_list")] + public IList? CustomFieldList { get; set; } + } + } + + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置服务声明信息。 + /// + [Newtonsoft.Json.JsonProperty("service_statement")] + [System.Text.Json.Serialization.JsonPropertyName("service_statement")] + public Types.Statement? ServiceStatement { get; set; } + + /// + /// 获取或设置绑定老会员信息。 + /// + [Newtonsoft.Json.JsonProperty("bind_old_card")] + [System.Text.Json.Serialization.JsonPropertyName("bind_old_card")] + public Types.Statement? BindOldCard { get; set; } + + /// + /// 获取或设置必填表单信息。 + /// + [Newtonsoft.Json.JsonProperty("required_form")] + [System.Text.Json.Serialization.JsonPropertyName("required_form")] + public Types.Form? RequiredForm { get; set; } + + /// + /// 获取或设置选填表单信息。 + /// + [Newtonsoft.Json.JsonProperty("optional_form")] + [System.Text.Json.Serialization.JsonPropertyName("optional_form")] + public Types.Form? OptionalForm { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateUserFormSetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateUserFormSetResponse.cs new file mode 100644 index 00000000..72e54d96 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardActivateUserFormSetResponse.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/activateuserform/set 接口的响应。 + /// + public class CardMemberCardActivateUserFormSetResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUpdateUserRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUpdateUserRequest.cs new file mode 100644 index 00000000..29b86915 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUpdateUserRequest.cs @@ -0,0 +1,143 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/updateuser 接口的请求。 + /// + public class CardMemberCardUpdateUserRequest : WechatApiRequest + { + public static class Types + { + public class NotifyOption + { + /// + /// 获取或设置积分变动时是否触发系统模板消息。 + /// + [Newtonsoft.Json.JsonProperty("is_notify_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("is_notify_bonus")] + public bool? IsNotifyBonus { get; set; } + + /// + /// 获取或设置余额变动时是否触发系统模板消息。 + /// + [Newtonsoft.Json.JsonProperty("is_notify_balance")] + [System.Text.Json.Serialization.JsonPropertyName("is_notify_balance")] + public bool? IsNotifyBalance { get; set; } + + /// + /// 获取或设置字段 `CustomField1` 变动时是否触发系统模板消息。 + /// + [Newtonsoft.Json.JsonProperty("is_notify_custom_field1")] + [System.Text.Json.Serialization.JsonPropertyName("is_notify_custom_field1")] + public bool? IsNotifyCustomField1 { get; set; } + + /// + /// 获取或设置字段 `CustomField2` 变动时是否触发系统模板消息。 + /// + [Newtonsoft.Json.JsonProperty("is_notify_custom_field2")] + [System.Text.Json.Serialization.JsonPropertyName("is_notify_custom_field2")] + public bool? IsNotifyCustomField2 { get; set; } + + /// + /// 获取或设置字段 `CustomField3` 变动时是否触发系统模板消息。 + /// + [Newtonsoft.Json.JsonProperty("is_notify_custom_field3")] + [System.Text.Json.Serialization.JsonPropertyName("is_notify_custom_field3")] + public bool? IsNotifyCustomField3 { get; set; } + } + } + + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + + /// + /// 获取或设置会员卡背景图 URL。 + /// + [Newtonsoft.Json.JsonProperty("background_pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("background_pic_url")] + public string? BackgroundPictureUrl { get; set; } + + /// + /// 获取或设置积分。 + /// + [Newtonsoft.Json.JsonProperty("bonus")] + [System.Text.Json.Serialization.JsonPropertyName("bonus")] + public int? Bounus { get; set; } + + /// + /// 获取或设置本次积分变动值。 + /// + [Newtonsoft.Json.JsonProperty("add_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("add_bonus")] + public int? ModifiedBounus { get; set; } + + /// + /// 获取或设置本次积分变动说明。 + /// + [Newtonsoft.Json.JsonProperty("record_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("record_bonus")] + public string? ModifiedBounusRecord { get; set; } + + /// + /// 获取或设置余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("balance")] + [System.Text.Json.Serialization.JsonPropertyName("balance")] + public int? Balance { get; set; } + + /// + /// 获取或设置本次余额变动值(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("add_balance")] + [System.Text.Json.Serialization.JsonPropertyName("add_balance")] + public int? ModifiedBalance { get; set; } + + /// + /// 获取或设置本次余额变动说明。 + /// + [Newtonsoft.Json.JsonProperty("record_balance")] + [System.Text.Json.Serialization.JsonPropertyName("record_balance")] + public string? ModifiedBalanceRecord { get; set; } + + /// + /// 获取或设置创建时字段 `CustomField1` 定义类型的最新值。 + /// + [Newtonsoft.Json.JsonProperty("custom_field_value1")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field_value1")] + public string? CustomFieldValue1 { get; set; } + + /// + /// 获取或设置创建时字段 `CustomField2` 定义类型的最新值。 + /// + [Newtonsoft.Json.JsonProperty("custom_field_value2")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field_value2")] + public string? CustomFieldValue2 { get; set; } + + /// + /// 获取或设置创建时字段 `CustomField3` 定义类型的最新值。 + /// + [Newtonsoft.Json.JsonProperty("custom_field_value3")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field_value3")] + public string? CustomFieldValue3 { get; set; } + + /// + /// 获取或设置消息控制信息。 + /// + [Newtonsoft.Json.JsonProperty("notify_optional")] + [System.Text.Json.Serialization.JsonPropertyName("notify_optional")] + public Types.NotifyOption? NotifyOption { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUpdateUserResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUpdateUserResponse.cs new file mode 100644 index 00000000..fb07627c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUpdateUserResponse.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/updateuser 接口的响应。 + /// + public class CardMemberCardUpdateUserResponse : WechatApiResponse + { + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置当前用户积分。 + /// + [Newtonsoft.Json.JsonProperty("result_bonus")] + [System.Text.Json.Serialization.JsonPropertyName("result_bonus")] + public int ResultBounus { get; set; } + + /// + /// 获取或设置当前用户余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("result_balance")] + [System.Text.Json.Serialization.JsonPropertyName("result_balance")] + public int ResultBalance { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUserInfoGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUserInfoGetRequest.cs new file mode 100644 index 00000000..8c7ecec8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUserInfoGetRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/userinfo/get 接口的请求。 + /// + public class CardMemberCardUserInfoGetRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUserInfoGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUserInfoGetResponse.cs new file mode 100644 index 00000000..c133f0d3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/MemberCard/CardMemberCardUserInfoGetResponse.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/membercard/userinfo/get 接口的响应。 + /// + public class CardMemberCardUserInfoGetResponse : WechatApiResponse + { + public static class Types + { + public class MemberUser + { + public static class Types + { + public class CommonField + { + /// + /// 获取或设置会员信息类目名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置会员信息类目值。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [System.Text.Json.Serialization.JsonPropertyName("value")] + public string Value { get; set; } = default!; + } + + public class CustomField : CommonField + { + } + } + + /// + /// 获取或设置内置会员信息类目列表。 + /// + [Newtonsoft.Json.JsonProperty("common_field_list")] + [System.Text.Json.Serialization.JsonPropertyName("common_field_list")] + public Types.CommonField[] CommonFieldList { get; set; } = default!; + + /// + /// 获取或设置自定义会员信息类目列表。 + /// + [Newtonsoft.Json.JsonProperty("custom_field_list")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field_list")] + public Types.CustomField[] CustomFieldList { get; set; } = default!; + } + + } + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置用户昵称。 + /// + [Newtonsoft.Json.JsonProperty("nickname")] + [System.Text.Json.Serialization.JsonPropertyName("nickname")] + public string Nickname { get; set; } = default!; + + /// + /// 获取或设置会员卡编号。 + /// + [Newtonsoft.Json.JsonProperty("membership_number")] + [System.Text.Json.Serialization.JsonPropertyName("membership_number")] + public string MembershipNumber { get; set; } = default!; + + /// + /// 获取或设置会员信息。 + /// + [Newtonsoft.Json.JsonProperty("user_info")] + [System.Text.Json.Serialization.JsonPropertyName("user_info")] + public Types.MemberUser? MemberUser { get; set; } + + /// + /// 获取或设置会员卡积分。 + /// + [Newtonsoft.Json.JsonProperty("bonus")] + [System.Text.Json.Serialization.JsonPropertyName("bonus")] + public int MemberBonus { get; set; } + + /// + /// 获取或设置会员卡余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("balance")] + [System.Text.Json.Serialization.JsonPropertyName("balance")] + public int MemberBalance { get; set; } + + /// + /// 获取或设置卡券状态。 + /// + [Newtonsoft.Json.JsonProperty("user_card_status")] + [System.Text.Json.Serialization.JsonPropertyName("user_card_status")] + public string CardStatus { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardAddRequest.cs new file mode 100644 index 00000000..20a001b6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardAddRequest.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/paygiftcard/add 接口的请求。 + /// + public class CardPayGiftCardAddRequest : WechatApiRequest + { + public static class Types + { + public class Rule + { + public static class Types + { + public class Base + { + /// + /// 获取或设置微信商户号列表。 + /// + [Newtonsoft.Json.JsonProperty("mchid_list")] + [System.Text.Json.Serialization.JsonPropertyName("mchid_list")] + public IList MerchantIdList { get; set; } = new List(); + + /// + /// 获取或设置规则开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("begin_time")] + [System.Text.Json.Serialization.JsonPropertyName("begin_time")] + public long BeginTimetamp { get; set; } + + /// + /// 获取或设置规则结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimetamp { get; set; } + } + + public class MemberRule + { + /// + /// 获取或设置要赠送的会员卡卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置单次消费送会员卡的金额下限(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("least_cost")] + [System.Text.Json.Serialization.JsonPropertyName("least_cost")] + public int LeastCost { get; set; } + + /// + /// 获取或设置单次消费送会员卡的金额上限(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("max_cost")] + [System.Text.Json.Serialization.JsonPropertyName("max_cost")] + public int MaxCost { get; set; } + + /// + /// 获取或设置商户自定义领卡网页 URL。 + /// + [Newtonsoft.Json.JsonProperty("jump_url")] + [System.Text.Json.Serialization.JsonPropertyName("jump_url")] + public string? Url { get; set; } + + /// + /// 获取或设置商户自定义领卡小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_brand_id")] + public string? MiniProgramAppId { get; set; } + + /// + /// 获取或设置商户自定义领卡小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("app_brand_pass")] + public string? MiniProgramPath { get; set; } + } + } + + /// + /// 获取或设置营销规则类型。 + /// 默认值:RULE_TYPE_PAY_MEMBER_CARD + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = "RULE_TYPE_PAY_MEMBER_CARD"; + + /// + /// 获取或设置营销规则基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置支付即会员规则信息。 + /// + [Newtonsoft.Json.JsonProperty("member_rule")] + [System.Text.Json.Serialization.JsonPropertyName("member_rule")] + public Types.MemberRule? MemberRule { get; set; } + } + } + + /// + /// 获取或设置营销规则信息。 + /// + [Newtonsoft.Json.JsonProperty("rule_info")] + [System.Text.Json.Serialization.JsonPropertyName("rule_info")] + public Types.Rule Rule { get; set; } = new Types.Rule(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardAddResponse.cs new file mode 100644 index 00000000..2ec3bfbd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardAddResponse.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/paygiftcard/add 接口的响应。 + /// + public class CardPayGiftCardAddResponse : WechatApiResponse + { + public static class Types + { + public class Merchant + { + /// + /// 获取或设置微信商户号。 + /// + [Newtonsoft.Json.JsonProperty("mchid")] + [System.Text.Json.Serialization.JsonPropertyName("mchid")] + public string MerchantId { get; set; } = default!; + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("errcode")] + [System.Text.Json.Serialization.JsonPropertyName("errcode")] + public int ErrorCode { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("errmsg")] + [System.Text.Json.Serialization.JsonPropertyName("errmsg")] + public string? ErrorMessage { get; set; } + + /// + /// 获取或设置被占用的规则 ID。 + /// + [Newtonsoft.Json.JsonProperty("occupy_rule_id")] + [System.Text.Json.Serialization.JsonPropertyName("occupy_rule_id")] + public int? OccupyRuleId { get; set; } + + /// + /// 获取或设置被占用的微信 AppId。 + /// + [Newtonsoft.Json.JsonProperty("occupy_appid")] + [System.Text.Json.Serialization.JsonPropertyName("occupy_appid")] + public string? OccupyAppId { get; set; } + } + } + + /// + /// 获取或设置规则 ID。 + /// + [Newtonsoft.Json.JsonProperty("rule_id")] + [System.Text.Json.Serialization.JsonPropertyName("rule_id")] + public int RuleId { get; set; } + + /// + /// 获取或设置设置失败的微信商户列表。 + /// + [Newtonsoft.Json.JsonProperty("fail_mchid_list")] + [System.Text.Json.Serialization.JsonPropertyName("fail_mchid_list")] + public Types.Merchant[] FailMerchantList { get; set; } = default!; + + /// + /// 获取或设置设置成功的微信商户号列表。 + /// + [Newtonsoft.Json.JsonProperty("succ_mchid_list")] + [System.Text.Json.Serialization.JsonPropertyName("succ_mchid_list")] + public string[] SuccessMerchantIdList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardBatchGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardBatchGetRequest.cs new file mode 100644 index 00000000..2c4b16cb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardBatchGetRequest.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/paygiftcard/batchget 接口的请求。 + /// + public class CardPayGiftCardBatchGetRequest : WechatApiRequest + { + /// + /// 获取或设置营销规则类型。 + /// 默认值:RULE_TYPE_PAY_MEMBER_CARD + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = "RULE_TYPE_PAY_MEMBER_CARD"; + + /// + /// 获取或设置是否仅查询生效的规则。 + /// + [Newtonsoft.Json.JsonProperty("effective")] + [System.Text.Json.Serialization.JsonPropertyName("effective")] + public bool OnlyEffective { get; set; } + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardBatchGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardBatchGetResponse.cs new file mode 100644 index 00000000..2d4210e3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardBatchGetResponse.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/paygiftcard/batchget 接口的响应。 + /// + public class CardPayGiftCardBatchGetResponse : WechatApiResponse + { + public static class Types + { + public class Rule : CardPayGiftCardGetByIdResponse.Types.Rule + { + } + } + + /// + /// 获取或设置营销规则列表。 + /// + [Newtonsoft.Json.JsonProperty("rule_list")] + [System.Text.Json.Serialization.JsonPropertyName("rule_list")] + public Types.Rule[] RuleList { get; set; } = default!; + + /// + /// 获取或设置营销规则总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int Total { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardDeleteRequest.cs new file mode 100644 index 00000000..9f91c527 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardDeleteRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/paygiftcard/delete 接口的请求。 + /// + public class CardPayGiftCardDeleteRequest : WechatApiRequest + { + /// + /// 获取或设置规则 ID。 + /// + [Newtonsoft.Json.JsonProperty("rule_id")] + [System.Text.Json.Serialization.JsonPropertyName("rule_id")] + public int RuleId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardDeleteResponse.cs new file mode 100644 index 00000000..98b3213b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardDeleteResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/paygiftcard/delete 接口的响应。 + /// + public class CardPayGiftCardDeleteResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardGetByIdRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardGetByIdRequest.cs new file mode 100644 index 00000000..15bde449 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardGetByIdRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/paygiftcard/getbyid 接口的请求。 + /// + public class CardPayGiftCardGetByIdRequest : WechatApiRequest + { + /// + /// 获取或设置规则 ID。 + /// + [Newtonsoft.Json.JsonProperty("rule_id")] + [System.Text.Json.Serialization.JsonPropertyName("rule_id")] + public int RuleId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardGetByIdResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardGetByIdResponse.cs new file mode 100644 index 00000000..7646578f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/PayGiftCard/CardPayGiftCardGetByIdResponse.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/paygiftcard/getbyid 接口的响应。 + /// + public class CardPayGiftCardGetByIdResponse : WechatApiResponse + { + public static class Types + { + public class Rule + { + public static class Types + { + public class Base + { + /// + /// 获取或设置微信商户号列表。 + /// + [Newtonsoft.Json.JsonProperty("mchid_list")] + [System.Text.Json.Serialization.JsonPropertyName("mchid_list")] + public string[] MerchantIdList { get; set; } = default!; + + /// + /// 获取或设置规则开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("begin_time")] + [System.Text.Json.Serialization.JsonPropertyName("begin_time")] + public long BeginTimetamp { get; set; } + + /// + /// 获取或设置规则结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimetamp { get; set; } + + /// + /// 获取或设置规则状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置修改时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimetamp { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + + public class MemberRule + { + /// + /// 获取或设置要赠送的会员卡卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置单次消费送会员卡的金额下限(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("least_cost")] + [System.Text.Json.Serialization.JsonPropertyName("least_cost")] + public int LeastCost { get; set; } + + /// + /// 获取或设置单次消费送会员卡的金额上限(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("max_cost")] + [System.Text.Json.Serialization.JsonPropertyName("max_cost")] + public int MaxCost { get; set; } + + /// + /// 获取或设置商户自定义领卡网页 URL。 + /// + [Newtonsoft.Json.JsonProperty("jump_url")] + [System.Text.Json.Serialization.JsonPropertyName("jump_url")] + public string? Url { get; set; } + + /// + /// 获取或设置商户自定义领卡小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_brand_id")] + public string? MiniProgramAppId { get; set; } + + /// + /// 获取或设置商户自定义领卡小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("app_brand_pass")] + [System.Text.Json.Serialization.JsonPropertyName("app_brand_pass")] + public string? MiniProgramPath { get; set; } + } + } + + /// + /// 获取或设置营销规则类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置营销规则基本信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = default!; + + /// + /// 获取或设置支付即会员规则信息。 + /// + [Newtonsoft.Json.JsonProperty("member_rule")] + [System.Text.Json.Serialization.JsonPropertyName("member_rule")] + public Types.MemberRule? MemberRule { get; set; } + } + } + + /// + /// 获取或设置营销规则信息。 + /// + [Newtonsoft.Json.JsonProperty("rule_info")] + [System.Text.Json.Serialization.JsonPropertyName("rule_info")] + public Types.Rule Rule { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardBoardingPassCheckinRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardBoardingPassCheckinRequest.cs new file mode 100644 index 00000000..0029ca34 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardBoardingPassCheckinRequest.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/boardingpass/checkin 接口的请求。 + /// + public class CardBoardingPassCheckinRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string? CardId { get; set; } + + /// + /// 获取或设置原卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + + /// + /// 获取或设置电子客票号。 + /// + [Newtonsoft.Json.JsonProperty("etkt_bnr")] + [System.Text.Json.Serialization.JsonPropertyName("etkt_bnr")] + public string? TicketNumber { get; set; } + + /// + /// 获取或设置舱等。 + /// + [Newtonsoft.Json.JsonProperty("class")] + [System.Text.Json.Serialization.JsonPropertyName("class")] + public string? TicketClass { get; set; } + + /// + /// 获取或设置乘客姓名。 + /// + [Newtonsoft.Json.JsonProperty("passenger_name")] + [System.Text.Json.Serialization.JsonPropertyName("passenger_name")] + public string? PassengerName { get; set; } + + /// + /// 获取或设置座位号。 + /// + [Newtonsoft.Json.JsonProperty("seat")] + [System.Text.Json.Serialization.JsonPropertyName("seat")] + public string? SeatNumber { get; set; } + + /// + /// 获取或设置二维码数据。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_data")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_data")] + public string? QrcodeData { get; set; } + + /// + /// 获取或设置是否取消值机。 + /// + [Newtonsoft.Json.JsonProperty("is_cancel")] + [System.Text.Json.Serialization.JsonPropertyName("is_cancel")] + public bool? IsCancel { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardBoardingPassCheckinResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardBoardingPassCheckinResponse.cs new file mode 100644 index 00000000..21239345 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardBoardingPassCheckinResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/boardingpass/checkin 接口的响应。 + /// + public class CardBoardingPassCheckinResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMeetingTicketUpdateUserRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMeetingTicketUpdateUserRequest.cs new file mode 100644 index 00000000..71675df8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMeetingTicketUpdateUserRequest.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/meetingticket/updateuser 接口的请求。 + /// + public class CardMeetingTicketUpdateUserRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string? CardId { get; set; } + + /// + /// 获取或设置原卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + + /// + /// 获取或设置会议开场时间戳。 + /// + [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("zone")] + [System.Text.Json.Serialization.JsonPropertyName("zone")] + public string? Zone { get; set; } + + /// + /// 获取或设置会场入口。 + /// + [Newtonsoft.Json.JsonProperty("entrance")] + [System.Text.Json.Serialization.JsonPropertyName("entrance")] + public string? Entrance { get; set; } + + /// + /// 获取或设置座位号。 + /// + [Newtonsoft.Json.JsonProperty("seat_number")] + [System.Text.Json.Serialization.JsonPropertyName("seat_number")] + public string? SeatNumber { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMeetingTicketUpdateUserResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMeetingTicketUpdateUserResponse.cs new file mode 100644 index 00000000..c5f1ca81 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMeetingTicketUpdateUserResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/meetingticket/updateuser 接口的响应。 + /// + public class CardMeetingTicketUpdateUserResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMovieTicketUpdateUserRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMovieTicketUpdateUserRequest.cs new file mode 100644 index 00000000..e825a70e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMovieTicketUpdateUserRequest.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/movieticket/updateuser 接口的请求。 + /// + public class CardMovieTicketUpdateUserRequest : WechatApiRequest + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string? CardId { get; set; } + + /// + /// 获取或设置原卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + + /// + /// 获取或设置电影票类型。 + /// + [Newtonsoft.Json.JsonProperty("ticket_class")] + [System.Text.Json.Serialization.JsonPropertyName("ticket_class")] + public string? TicketClass { get; set; } + + /// + /// 获取或设置影厅信息。 + /// + [Newtonsoft.Json.JsonProperty("screening_room")] + [System.Text.Json.Serialization.JsonPropertyName("screening_room")] + public string? ScreeningRoom { get; set; } + + /// + /// 获取或设置电影放映时间戳。 + /// + [Newtonsoft.Json.JsonProperty("show_time")] + [System.Text.Json.Serialization.JsonPropertyName("show_time")] + public long? ShowTimestamp { get; set; } + + /// + /// 获取或设置电影放映时长(单位:分钟)。 + /// + [Newtonsoft.Json.JsonProperty("duration")] + [System.Text.Json.Serialization.JsonPropertyName("duration")] + public int? Duration { get; set; } + + /// + /// 获取或设置座位号列表。 + /// + [Newtonsoft.Json.JsonProperty("seat_number")] + [System.Text.Json.Serialization.JsonPropertyName("seat_number")] + public IList? SeatNumberList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMovieTicketUpdateUserResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMovieTicketUpdateUserResponse.cs new file mode 100644 index 00000000..57f1e0b4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SpecialTicket/CardMovieTicketUpdateUserResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/movieticket/updateuser 接口的响应。 + /// + public class CardMovieTicketUpdateUserResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardGetApplyProtocolRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardGetApplyProtocolRequest.cs new file mode 100644 index 00000000..29216242 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardGetApplyProtocolRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /card/getapplyprotocol 接口的请求。 + /// + public class CardGetApplyProtocolRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardGetApplyProtocolResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardGetApplyProtocolResponse.cs new file mode 100644 index 00000000..e1810589 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardGetApplyProtocolResponse.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /card/getapplyprotocol 接口的响应。 + /// + public class CardGetApplyProtocolResponse : WechatApiResponse + { + public static class Types + { + public class PrimaryCategory + { + /// + /// 获取或设置一级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("primary_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("primary_category_id")] + public int CategoryId { get; set; } + + /// + /// 获取或设置一级类目名称。 + /// + [Newtonsoft.Json.JsonProperty("category_name")] + [System.Text.Json.Serialization.JsonPropertyName("category_name")] + public string CategoryName { get; set; } = default!; + + /// + /// 获取或设置二级类目列表。 + /// + [Newtonsoft.Json.JsonProperty("secondary_category")] + [System.Text.Json.Serialization.JsonPropertyName("secondary_category")] + public SecondaryCategory[] SubCategoryList { get; set; } = default!; + } + + public class SecondaryCategory + { + /// + /// 获取或设置二级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("secondary_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("secondary_category_id")] + public int CategoryId { get; set; } + + /// + /// 获取或设置二级类目名称。 + /// + [Newtonsoft.Json.JsonProperty("category_name")] + [System.Text.Json.Serialization.JsonPropertyName("category_name")] + public string CategoryName { get; set; } = default!; + + /// + /// 获取或设置所需资质列表。 + /// + [Newtonsoft.Json.JsonProperty("need_qualification_stuffs")] + [System.Text.Json.Serialization.JsonPropertyName("need_qualification_stuffs")] + public string[]? NeedQualificationStuffList { get; set; } + } + } + + /// + /// 获取或设置类目列表。 + /// + [Newtonsoft.Json.JsonProperty("category")] + [System.Text.Json.Serialization.JsonPropertyName("category")] + public Types.PrimaryCategory[] CategoryList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantBatchGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantBatchGetRequest.cs new file mode 100644 index 00000000..90ddc224 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantBatchGetRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/submerchant/batchget 接口的请求。 + /// + public class CardSubMerchantBatchGetRequest : WechatApiRequest + { + /// + /// 获取或设置起始的子商户 ID。 + /// + [Newtonsoft.Json.JsonProperty("begin_id")] + [System.Text.Json.Serialization.JsonPropertyName("begin_id")] + public string? NextMerchantId { get; set; } = "0"; + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("limit")] + [System.Text.Json.Serialization.JsonPropertyName("limit")] + public int Limit { get; set; } = 10; + + /// + /// 获取或设置指定子商户状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string? Status { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantBatchGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantBatchGetResponse.cs new file mode 100644 index 00000000..1b5dc0b0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantBatchGetResponse.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/submerchant/batchget 接口的响应。 + /// + public class CardSubMerchantBatchGetResponse : WechatApiResponse + { + public static class Types + { + public class SubMerchant : CardSubMerchantGetResponse.Types.SubMerchant + { + } + } + + /// + /// 获取或设置子商户列表。 + /// + [Newtonsoft.Json.JsonProperty("info_list")] + [System.Text.Json.Serialization.JsonPropertyName("info_list")] + public Types.SubMerchant[] SubMerchantList { get; set; } = default!; + + /// + /// 获取或设置列表中最后一个子商户 ID。 + /// + [Newtonsoft.Json.JsonProperty("next_begin_id")] + [System.Text.Json.Serialization.JsonPropertyName("next_begin_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedStringConverter))] + public string? NextMerchantId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantGetRequest.cs new file mode 100644 index 00000000..d2bd8986 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantGetRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/submerchant/get 接口的请求。 + /// + public class CardSubMerchantGetRequest : WechatApiRequest + { + /// + /// 获取或设置子商户 ID。 + /// + [Newtonsoft.Json.JsonProperty("merchant_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] + public string MerchantId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantGetResponse.cs new file mode 100644 index 00000000..db1008dc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantGetResponse.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/submerchant/get 接口的响应。 + /// + public class CardSubMerchantGetResponse : WechatApiResponse + { + public static class Types + { + public class SubMerchant + { + /// + /// 获取或设置子商户 ID。 + /// + [Newtonsoft.Json.JsonProperty("merchant_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedStringConverter))] + public string MerchantId { get; set; } = default!; + + /// + /// 获取或设置子商户的公众号 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置子商户名称。 + /// + [Newtonsoft.Json.JsonProperty("brand_name")] + [System.Text.Json.Serialization.JsonPropertyName("brand_name")] + public string BrandName { get; set; } = default!; + + /// + /// 获取或设置子商户 Logo Url。 + /// + [Newtonsoft.Json.JsonProperty("logo_url")] + [System.Text.Json.Serialization.JsonPropertyName("logo_url")] + public string LogoUrl { get; set; } = default!; + + /// + /// 获取或设置子商户状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置授权函有效期开始时间戳。 + /// + [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; } + + /// + /// 获取或设置一级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("primary_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("primary_category_id")] + public int PrimaryCategoryId { get; set; } + + /// + /// 获取或设置二级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("secondary_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("secondary_category_id")] + public int SecondaryCategoryId { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置子商户信息。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public Types.SubMerchant SubMerchant { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantSubmitRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantSubmitRequest.cs new file mode 100644 index 00000000..4545eba7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantSubmitRequest.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/submerchant/submit 接口的请求。 + /// + public class CardSubMerchantSubmitRequest : WechatApiRequest + { + public static class Types + { + public class SubMerchant + { + /// + /// 获取或设置子商户的公众号 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置子商户名称。 + /// + [Newtonsoft.Json.JsonProperty("brand_name")] + [System.Text.Json.Serialization.JsonPropertyName("brand_name")] + public string BrandName { get; set; } = string.Empty; + + /// + /// 获取或设置子商户 Logo Url。 + /// + [Newtonsoft.Json.JsonProperty("logo_url")] + [System.Text.Json.Serialization.JsonPropertyName("logo_url")] + public string LogoUrl { get; set; } = string.Empty; + + /// + /// 获取或设置授权函 MediaId。 + /// + [Newtonsoft.Json.JsonProperty("protocol")] + [System.Text.Json.Serialization.JsonPropertyName("protocol")] + public string AuthorizationLetterMediaId { get; set; } = string.Empty; + + /// + /// 获取或设置授权函有效截止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long AuthorizationLetterEndTimestamp { get; set; } + + /// + /// 获取或设置营业执照 MediaId。 + /// + [Newtonsoft.Json.JsonProperty("agreement_media_id")] + [System.Text.Json.Serialization.JsonPropertyName("agreement_media_id")] + public string? BusinessLicenseMediaId { get; set; } + + /// + /// 获取或设置法人 MediaId。 + /// + [Newtonsoft.Json.JsonProperty("operator_media_id")] + [System.Text.Json.Serialization.JsonPropertyName("operator_media_id")] + public string? LegalPersonMediaId { get; set; } + + /// + /// 获取或设置一级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("primary_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("primary_category_id")] + public int PrimaryCategoryId { get; set; } + + /// + /// 获取或设置二级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("secondary_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("secondary_category_id")] + public int SecondaryCategoryId { get; set; } + } + } + + /// + /// 获取或设置子商户信息。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public Types.SubMerchant SubMerchant { get; set; } = new Types.SubMerchant(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantSubmitResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantSubmitResponse.cs new file mode 100644 index 00000000..c4a93222 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantSubmitResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/submerchant/submit 接口的响应。 + /// + public class CardSubMerchantSubmitResponse : CardSubMerchantGetResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantUpdateRequest.cs new file mode 100644 index 00000000..df78bb85 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantUpdateRequest.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/submerchant/update 接口的请求。 + /// + public class CardSubMerchantUpdateRequest : WechatApiRequest + { + public static class Types + { + public class SubMerchant : CardSubMerchantSubmitRequest.Types.SubMerchant + { + /// + /// 获取或设置子商户 ID。 + /// + [Newtonsoft.Json.JsonProperty("merchant_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] + public string MerchantId { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置子商户信息。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public Types.SubMerchant SubMerchant { get; set; } = new Types.SubMerchant(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantUpdateResponse.cs new file mode 100644 index 00000000..9690c270 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/SubMerchant/CardSubMerchantUpdateResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/submerchant/update 接口的响应。 + /// + public class CardSubMerchantUpdateResponse : CardSubMerchantGetResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/User/CardUserGetCardListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/User/CardUserGetCardListRequest.cs new file mode 100644 index 00000000..41bf8a0b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/User/CardUserGetCardListRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/user/getcardlist 接口的请求。 + /// + public class CardUserGetCardListRequest : WechatApiRequest + { + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string? CardId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/User/CardUserGetCardListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/User/CardUserGetCardListResponse.cs new file mode 100644 index 00000000..c9905143 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Card/User/CardUserGetCardListResponse.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/user/getcardlist 接口的响应。 + /// + public class CardUserGetCardListResponse : WechatApiResponse + { + public static class Types + { + public class Card + { + /// + /// 获取或设置卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = default!; + } + } + + /// + /// 获取或设置卡券列表。 + /// + [Newtonsoft.Json.JsonProperty("card_list")] + [System.Text.Json.Serialization.JsonPropertyName("card_list")] + public Types.Card[] CardList { get; set; } = default!; + + /// + /// 获取或设置是否有可用的朋友的券。 + /// + [Newtonsoft.Json.JsonProperty("has_share_card")] + [System.Text.Json.Serialization.JsonPropertyName("has_share_card")] + public bool HasSharableCard { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceClearOutInvoiceRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceClearOutInvoiceRequest.cs new file mode 100644 index 00000000..c1c7bbda --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceClearOutInvoiceRequest.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/clearoutinvoice 接口的请求。 + /// + public class CardInvoiceClearOutInvoiceRequest : WechatApiRequest + { + public static class Types + { + public class Invoice + { + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("wxopenid")] + [System.Text.Json.Serialization.JsonPropertyName("wxopenid")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置发票请求流水号。 + /// + [Newtonsoft.Json.JsonProperty("fpqqlsh")] + [System.Text.Json.Serialization.JsonPropertyName("fpqqlsh")] + public string InvoiceSerialNumber { get; set; } = string.Empty; + + /// + /// 获取或设置纳税人识别码。 + /// + [Newtonsoft.Json.JsonProperty("nsrsbh")] + [System.Text.Json.Serialization.JsonPropertyName("nsrsbh")] + public string SellerTaxNumber { get; set; } = string.Empty; + + /// + /// 获取或设置纳税人名称。 + /// + [Newtonsoft.Json.JsonProperty("nsrmc")] + [System.Text.Json.Serialization.JsonPropertyName("nsrmc")] + public string SellerName { get; set; } = string.Empty; + + /// + /// 获取或设置原发票代码。 + /// + [Newtonsoft.Json.JsonProperty("yfpdm")] + [System.Text.Json.Serialization.JsonPropertyName("yfpdm")] + public string OriginalInvoiceCode { get; set; } = string.Empty; + + /// + /// 获取或设置原发票号码。 + /// + [Newtonsoft.Json.JsonProperty("yfphm")] + [System.Text.Json.Serialization.JsonPropertyName("yfphm")] + public string OriginalInvoiceNumber { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置发票信息。 + /// + [Newtonsoft.Json.JsonProperty("invoiceinfo")] + [System.Text.Json.Serialization.JsonPropertyName("invoiceinfo")] + public Types.Invoice Invoice { get; set; } = new Types.Invoice(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceClearOutInvoiceResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceClearOutInvoiceResponse.cs new file mode 100644 index 00000000..016f615f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceClearOutInvoiceResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/clearoutinvoice 接口的响应。 + /// + public class CardInvoiceClearOutInvoiceResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthDataRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthDataRequest.cs new file mode 100644 index 00000000..aa25def5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthDataRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/getauthdata 接口的请求。 + /// + public class CardInvoiceGetAuthDataRequest : WechatApiRequest + { + /// + /// 获取或设置订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置开票平台或财政局 AppId。 + /// + [Newtonsoft.Json.JsonProperty("s_pappid")] + [System.Text.Json.Serialization.JsonPropertyName("s_pappid")] + public string SpAppId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthDataResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthDataResponse.cs new file mode 100644 index 00000000..3691b4d7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthDataResponse.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/getauthdata 接口的响应。 + /// + public class CardInvoiceGetAuthDataResponse : WechatApiResponse + { + public static class Types + { + public class AuthData + { + public static class Types + { + public class UserField + { + /// + /// 获取或设置发票抬头。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone")] + [System.Text.Json.Serialization.JsonPropertyName("phone")] + public string PhoneNumber { get; set; } = default!; + + /// + /// 获取或设置邮箱。 + /// + [Newtonsoft.Json.JsonProperty("email")] + [System.Text.Json.Serialization.JsonPropertyName("email")] + public string Email { get; set; } = default!; + + /// + /// 获取或设置自定义字段列表。 + /// + [Newtonsoft.Json.JsonProperty("custom_field")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field")] + public CustomField[]? CustomFieldList { get; set; } + } + + public class BusinessField + { + /// + /// 获取或设置单位抬头。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone")] + [System.Text.Json.Serialization.JsonPropertyName("phone")] + public string PhoneNumber { get; set; } = default!; + + /// + /// 获取或设置税号。 + /// + [Newtonsoft.Json.JsonProperty("tax_no")] + [System.Text.Json.Serialization.JsonPropertyName("tax_no")] + public string TaxNumber { get; set; } = default!; + + /// + /// 获取或设置单位地址。 + /// + [Newtonsoft.Json.JsonProperty("addr")] + [System.Text.Json.Serialization.JsonPropertyName("addr")] + public string Address { get; set; } = default!; + + /// + /// 获取或设置开户银行。 + /// + [Newtonsoft.Json.JsonProperty("bank_type")] + [System.Text.Json.Serialization.JsonPropertyName("bank_type")] + public string BankType { get; set; } = default!; + + /// + /// 获取或设置银行账号。 + /// + [Newtonsoft.Json.JsonProperty("bank_no")] + [System.Text.Json.Serialization.JsonPropertyName("bank_no")] + public string BankNumber { get; set; } = default!; + + /// + /// 获取或设置自定义字段列表。 + /// + [Newtonsoft.Json.JsonProperty("custom_field")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field")] + public CustomField[]? CustomFieldList { get; set; } + } + + public class CustomField + { + /// + /// 获取或设置自定义字段名称。 + /// + [Newtonsoft.Json.JsonProperty("key")] + [System.Text.Json.Serialization.JsonPropertyName("key")] + public string Key { get; set; } = default!; + + /// + /// 获取或设置自定义字段的值。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [System.Text.Json.Serialization.JsonPropertyName("value")] + public string Value { get; set; } = default!; + } + } + + /// + /// 获取或设置个人发票字段信息。 + /// + [Newtonsoft.Json.JsonProperty("user_field")] + [System.Text.Json.Serialization.JsonPropertyName("user_field")] + public Types.UserField? UserField { get; set; } + + /// + /// 获取或设置单位发票字段信息。 + /// + [Newtonsoft.Json.JsonProperty("biz_field")] + [System.Text.Json.Serialization.JsonPropertyName("biz_field")] + public Types.BusinessField? BusinessField { get; set; } + } + } + + /// + /// 获取或设置订单授权状态。 + /// + [Newtonsoft.Json.JsonProperty("invoice_status")] + [System.Text.Json.Serialization.JsonPropertyName("invoice_status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置订单授权时间戳。 + /// + [Newtonsoft.Json.JsonProperty("auth_time")] + [System.Text.Json.Serialization.JsonPropertyName("auth_time")] + public long? AuthTimestamp { get; set; } + + /// + /// 获取或设置用户授权信息。 + /// + [Newtonsoft.Json.JsonProperty("user_auth_info")] + [System.Text.Json.Serialization.JsonPropertyName("user_auth_info")] + public Types.AuthData? AuthData { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthUrlRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthUrlRequest.cs new file mode 100644 index 00000000..630fcb0e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthUrlRequest.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/getauthurl 接口的请求。 + /// + public class CardInvoiceGetAuthUrlRequest : WechatApiRequest + { + /// + /// 获取或设置订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置开票平台 AppId。 + /// + [Newtonsoft.Json.JsonProperty("s_pappid")] + [System.Text.Json.Serialization.JsonPropertyName("s_pappid")] + public string SpAppId { get; set; } = string.Empty; + + /// + /// 获取或设置金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("money")] + [System.Text.Json.Serialization.JsonPropertyName("money")] + public int Fee { get; set; } + + /// + /// 获取或设置时间戳。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonProperty("timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("timestamp")] + public long? Timestamp { get; set; } + + /// + /// 获取或设置开票来源。 + /// + [Newtonsoft.Json.JsonProperty("source")] + [System.Text.Json.Serialization.JsonPropertyName("source")] + public string Source { get; set; } = string.Empty; + + /// + /// 获取或设置授权成功后跳转页面 URL。 + /// + [Newtonsoft.Json.JsonProperty("redirect_url")] + [System.Text.Json.Serialization.JsonPropertyName("redirect_url")] + public string? RedirectUrl { get; set; } + + /// + /// 获取或设置微信票据。 + /// + [Newtonsoft.Json.JsonProperty("ticket")] + [System.Text.Json.Serialization.JsonPropertyName("ticket")] + public string Ticket { get; set; } = string.Empty; + + /// + /// 获取或设置授权类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthUrlResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthUrlResponse.cs new file mode 100644 index 00000000..9173d408 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceGetAuthUrlResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/getauthurl 接口的响应。 + /// + public class CardInvoiceGetAuthUrlResponse : WechatApiResponse + { + /// + /// 获取或设置授权链接。 + /// + [Newtonsoft.Json.JsonProperty("auth_url")] + [System.Text.Json.Serialization.JsonPropertyName("auth_url")] + public string AuthUrl { get; set; } = default!; + + /// + /// 获取或设置授权小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceInsertRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceInsertRequest.cs new file mode 100644 index 00000000..3a190185 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceInsertRequest.cs @@ -0,0 +1,252 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/insert 接口的请求。 + /// + public class CardInvoiceInsertRequest : WechatApiRequest + { + public static class Types + { + public class CardExt + { + public static class Types + { + public class InvoiceCard + { + public static class Types + { + public class Invoice + { + public static class Types + { + public class InvoiceItem + { + /// + /// 获取或设置项目名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置计量单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string Unit { get; set; } = string.Empty; + + /// + /// 获取或设置项目数量。 + /// + [Newtonsoft.Json.JsonProperty("num")] + [System.Text.Json.Serialization.JsonPropertyName("num")] + public int Count { get; set; } + + /// + /// 获取或设置项目单价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public int Price { get; set; } + } + } + + /// + /// 获取或设置发票抬头。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置不含税金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("fee_without_tax")] + [System.Text.Json.Serialization.JsonPropertyName("fee_without_tax")] + public int FeeWithoutTax { get; set; } + + /// + /// 获取或设置发票金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("fee")] + [System.Text.Json.Serialization.JsonPropertyName("fee")] + public int Fee { get; set; } + + /// + /// 获取或设置税额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("tax")] + [System.Text.Json.Serialization.JsonPropertyName("tax")] + public int Tax { get; set; } + + /// + /// 获取或设置发票号码。 + /// + [Newtonsoft.Json.JsonProperty("billing_no")] + [System.Text.Json.Serialization.JsonPropertyName("billing_no")] + public string InvoiceNumber { get; set; } = string.Empty; + + /// + /// 获取或设置发票代码。 + /// + [Newtonsoft.Json.JsonProperty("billing_code")] + [System.Text.Json.Serialization.JsonPropertyName("billing_code")] + public string InvoiceCode { get; set; } = string.Empty; + + /// + /// 获取或设置开票时间戳。 + /// + [Newtonsoft.Json.JsonProperty("billing_time")] + [System.Text.Json.Serialization.JsonPropertyName("billing_time")] + public long DateTimestamp { get; set; } + + /// + /// 获取或设置发票行项目数据列表。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public IList InvoiceItemList { get; set; } = new List(); + + /// + /// 获取或设置校验码。 + /// + [Newtonsoft.Json.JsonProperty("check_code")] + [System.Text.Json.Serialization.JsonPropertyName("check_code")] + public string CheckCode { get; set; } = string.Empty; + + /// + /// 获取或设置发票文件标识。 + /// + [Newtonsoft.Json.JsonProperty("s_pdf_media_id")] + [System.Text.Json.Serialization.JsonPropertyName("s_pdf_media_id")] + public string PdfSpMediaId { get; set; } = string.Empty; + + /// + /// 获取或设置其它消费附件文件标识。 + /// + [Newtonsoft.Json.JsonProperty("s_trip_pdf_media_id")] + [System.Text.Json.Serialization.JsonPropertyName("s_trip_pdf_media_id")] + public string? TripSpMediaId { get; set; } + + /// + /// 获取或设置购买方纳税人识别号。 + /// + [Newtonsoft.Json.JsonProperty("buyer_number")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_number")] + public string BuyerTaxNumber { get; set; } = string.Empty; + + /// + /// 获取或设置购买方地址、电话。 + /// + [Newtonsoft.Json.JsonProperty("buyer_address_and_phone")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_address_and_phone")] + public string? BuyerAddressAndPhoneNumber { get; set; } + + /// + /// 获取或设置购买方开户行、银行账号。 + /// + [Newtonsoft.Json.JsonProperty("buyer_bank_account")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_bank_account")] + public string? BuyerBankAccount { get; set; } + + /// + /// 获取或设置销售方纳税人识别号。 + /// + [Newtonsoft.Json.JsonProperty("seller_number")] + [System.Text.Json.Serialization.JsonPropertyName("seller_number")] + public string? SellerTaxNumber { get; set; } + + /// + /// 获取或设置销售方纳税人地址、电话。 + /// + [Newtonsoft.Json.JsonProperty("seller_address_and_phone")] + [System.Text.Json.Serialization.JsonPropertyName("seller_address_and_phone")] + public string? SellerAddressAndPhoneNumber { get; set; } + + /// + /// 获取或设置销售方开户行、银行账号。 + /// + [Newtonsoft.Json.JsonProperty("seller_bank_account")] + [System.Text.Json.Serialization.JsonPropertyName("seller_bank_account")] + public string? SellerBankAccount { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remarks")] + [System.Text.Json.Serialization.JsonPropertyName("remarks")] + public string? Remark { get; set; } + + /// + /// 获取或设置开票人。 + /// + [Newtonsoft.Json.JsonProperty("maker")] + [System.Text.Json.Serialization.JsonPropertyName("maker")] + public string? Drawer { get; set; } + + /// + /// 获取或设置收款人。 + /// + [Newtonsoft.Json.JsonProperty("cashier")] + [System.Text.Json.Serialization.JsonPropertyName("cashier")] + public string? Cashier { get; set; } + } + } + + /// + /// 获取或设置发票信息。 + /// + [Newtonsoft.Json.JsonProperty("invoice_user_data")] + [System.Text.Json.Serialization.JsonPropertyName("invoice_user_data")] + public Types.Invoice Invoice { get; set; } = new Types.Invoice(); + } + } + + /// + /// 获取或设置随机字符串。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonProperty("nonce_str")] + [System.Text.Json.Serialization.JsonPropertyName("nonce_str")] + public string? Nonce { get; set; } + + /// + /// 获取或设置用户信息。 + /// + [Newtonsoft.Json.JsonProperty("user_card")] + [System.Text.Json.Serialization.JsonPropertyName("user_card")] + public Types.InvoiceCard InvoiceCard { get; set; } = new Types.InvoiceCard(); + } + } + + /// + /// 获取或设置订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置微信 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置发票卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置发票扩展信息。 + /// + [Newtonsoft.Json.JsonProperty("card_ext")] + [System.Text.Json.Serialization.JsonPropertyName("card_ext")] + public Types.CardExt CardExt { get; set; } = new Types.CardExt(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceInsertResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceInsertResponse.cs new file mode 100644 index 00000000..132d4ea1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceInsertResponse.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/insert 接口的响应。 + /// + public class CardInvoiceInsertResponse : WechatApiResponse + { + /// + /// 获取或设置发票卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = default!; + + /// + /// 获取或设置获得发票的用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置获得发票的用户 UnionId。 + /// + [Newtonsoft.Json.JsonProperty("unionid")] + [System.Text.Json.Serialization.JsonPropertyName("unionid")] + public string? UnionId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceMakeOutInvoiceRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceMakeOutInvoiceRequest.cs new file mode 100644 index 00000000..ae60172d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceMakeOutInvoiceRequest.cs @@ -0,0 +1,278 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/makeoutinvoice 接口的请求。 + /// + public class CardInvoiceMakeOutInvoiceRequest : WechatApiRequest + { + public static class Types + { + public class Invoice + { + public static class Types + { + public class InvoiceItem + { + /// + /// 获取或设置发票行性质。 + /// + [Newtonsoft.Json.JsonProperty("fphxz")] + [System.Text.Json.Serialization.JsonPropertyName("fphxz")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public int Type { get; set; } + + /// + /// 获取或设置税收分类编码。 + /// + [Newtonsoft.Json.JsonProperty("spbm")] + [System.Text.Json.Serialization.JsonPropertyName("spbm")] + public string GoodsCode { get; set; } = string.Empty; + + /// + /// 获取或设置项目名称。 + /// + [Newtonsoft.Json.JsonProperty("xmmc")] + [System.Text.Json.Serialization.JsonPropertyName("xmmc")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置计量单位。 + /// + [Newtonsoft.Json.JsonProperty("dw")] + [System.Text.Json.Serialization.JsonPropertyName("dw")] + public string Unit { get; set; } = string.Empty; + + /// + /// 获取或设置规格型号。 + /// + [Newtonsoft.Json.JsonProperty("ggxh")] + [System.Text.Json.Serialization.JsonPropertyName("ggxh")] + public string Specification { get; set; } = string.Empty; + + /// + /// 获取或设置项目数量。 + /// + [Newtonsoft.Json.JsonProperty("xmsl")] + [System.Text.Json.Serialization.JsonPropertyName("xmsl")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public int Count { get; set; } + + /// + /// 获取或设置项目单价(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("xmdj")] + [System.Text.Json.Serialization.JsonPropertyName("xmdj")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Price { get; set; } + + /// + /// 获取或设置项目金额(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("xmje")] + [System.Text.Json.Serialization.JsonPropertyName("xmje")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Amount { get; set; } + + /// + /// 获取或设置税率。 + /// + [Newtonsoft.Json.JsonProperty("sl")] + [System.Text.Json.Serialization.JsonPropertyName("sl")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double TaxRate { get; set; } + + /// + /// 获取或设置税额(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("se")] + [System.Text.Json.Serialization.JsonPropertyName("se")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Tax { get; set; } + } + } + + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("wxopenid")] + [System.Text.Json.Serialization.JsonPropertyName("wxopenid")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置订单号。 + /// + [Newtonsoft.Json.JsonProperty("ddh")] + [System.Text.Json.Serialization.JsonPropertyName("ddh")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置发票请求流水号。 + /// + [Newtonsoft.Json.JsonProperty("fpqqlsh")] + [System.Text.Json.Serialization.JsonPropertyName("fpqqlsh")] + public string InvoiceSerialNumber { get; set; } = string.Empty; + + /// + /// 获取或设置纳税人识别码。 + /// + [Newtonsoft.Json.JsonProperty("nsrsbh")] + [System.Text.Json.Serialization.JsonPropertyName("nsrsbh")] + public string SellerTaxNumber { get; set; } = string.Empty; + + /// + /// 获取或设置纳税人名称。 + /// + [Newtonsoft.Json.JsonProperty("nsrmc")] + [System.Text.Json.Serialization.JsonPropertyName("nsrmc")] + public string SellerName { get; set; } = string.Empty; + + /// + /// 获取或设置纳税人地址。 + /// + [Newtonsoft.Json.JsonProperty("nsrdz")] + [System.Text.Json.Serialization.JsonPropertyName("nsrdz")] + public string SellerAddress { get; set; } = string.Empty; + + /// + /// 获取或设置纳税人电话。 + /// + [Newtonsoft.Json.JsonProperty("nsrdh")] + [System.Text.Json.Serialization.JsonPropertyName("nsrdh")] + public string SellerPhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置纳税人开户行。 + /// + [Newtonsoft.Json.JsonProperty("nsrbank")] + [System.Text.Json.Serialization.JsonPropertyName("nsrbank")] + public string SellerBank { get; set; } = string.Empty; + + /// + /// 获取或设置纳税人银行账号。 + /// + [Newtonsoft.Json.JsonProperty("nsrbankid")] + [System.Text.Json.Serialization.JsonPropertyName("nsrbankid")] + public string SellerBankNumber { get; set; } = string.Empty; + + /// + /// 获取或设置购货方识别号。 + /// + [Newtonsoft.Json.JsonProperty("ghfnsrsbh")] + [System.Text.Json.Serialization.JsonPropertyName("ghfnsrsbh")] + public string? BuyerTaxNumber { get; set; } + + /// + /// 获取或设置购货方名称。 + /// + [Newtonsoft.Json.JsonProperty("ghfmc")] + [System.Text.Json.Serialization.JsonPropertyName("ghfmc")] + public string? BuyerName { get; set; } + + /// + /// 获取或设置购货方地址。 + /// + [Newtonsoft.Json.JsonProperty("ghfdz")] + [System.Text.Json.Serialization.JsonPropertyName("ghfdz")] + public string? BuyerAddress { get; set; } + + /// + /// 获取或设置购货方电话。 + /// + [Newtonsoft.Json.JsonProperty("ghfdh")] + [System.Text.Json.Serialization.JsonPropertyName("ghfdh")] + public string? BuyerPhoneNumber { get; set; } + + /// + /// 获取或设置购货方开户行。 + /// + [Newtonsoft.Json.JsonProperty("ghfbank")] + [System.Text.Json.Serialization.JsonPropertyName("ghfbank")] + public string? BuyerBank { get; set; } + + /// + /// 获取或设置购货方银行账号。 + /// + [Newtonsoft.Json.JsonProperty("ghfbankid")] + [System.Text.Json.Serialization.JsonPropertyName("ghfbankid")] + public string? BuyerBankNumber { get; set; } + + /// + /// 获取或设置开票人。 + /// + [Newtonsoft.Json.JsonProperty("kpr")] + [System.Text.Json.Serialization.JsonPropertyName("kpr")] + public string Drawer { get; set; } = string.Empty; + + /// + /// 获取或设置收款人。 + /// + [Newtonsoft.Json.JsonProperty("skr")] + [System.Text.Json.Serialization.JsonPropertyName("skr")] + public string? Cashier { get; set; } + + /// + /// 获取或设置复核人。 + /// + [Newtonsoft.Json.JsonProperty("fhr")] + [System.Text.Json.Serialization.JsonPropertyName("fhr")] + public string? Reviewer { get; set; } + + /// + /// 获取或设置价税合计(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("jshj")] + [System.Text.Json.Serialization.JsonPropertyName("jshj")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Fee { get; set; } + + /// + /// 获取或设置合计金额(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("hjje")] + [System.Text.Json.Serialization.JsonPropertyName("hjje")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double FeeWithoutTax { get; set; } + + /// + /// 获取或设置合计税额(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("hjse")] + [System.Text.Json.Serialization.JsonPropertyName("hjse")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public double Tax { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("bz")] + [System.Text.Json.Serialization.JsonPropertyName("bz")] + public string? Remark { get; set; } + + /// + /// 获取或设置行业类型。 + /// + [Newtonsoft.Json.JsonProperty("hylx")] + [System.Text.Json.Serialization.JsonPropertyName("hylx")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public int? Type { get; set; } + + /// + /// 获取或设置发票行项目数据列表。 + /// + [Newtonsoft.Json.JsonProperty("invoicedetail_list")] + [System.Text.Json.Serialization.JsonPropertyName("invoicedetail_list")] + public IList InvoiceItemList { get; set; } = new List(); + } + } + + /// + /// 获取或设置发票信息。 + /// + [Newtonsoft.Json.JsonProperty("invoiceinfo")] + [System.Text.Json.Serialization.JsonPropertyName("invoiceinfo")] + public Types.Invoice Invoice { get; set; } = new Types.Invoice(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceMakeOutInvoiceResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceMakeOutInvoiceResponse.cs new file mode 100644 index 00000000..974274a1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceMakeOutInvoiceResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/makeoutinvoice 接口的响应。 + /// + public class CardInvoiceMakeOutInvoiceResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceQueryInvoiceInfoRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceQueryInvoiceInfoRequest.cs new file mode 100644 index 00000000..2ca4e312 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceQueryInvoiceInfoRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/queryinvoceinfo 接口的请求。 + /// + public class CardInvoiceQueryInvoiceInfoRequest : WechatApiRequest + { + /// + /// 获取或设置发票请求流水号。 + /// + [Newtonsoft.Json.JsonProperty("fpqqlsh")] + [System.Text.Json.Serialization.JsonPropertyName("fpqqlsh")] + public string InvoiceSerialNumber { get; set; } = string.Empty; + + /// + /// 获取或设置纳税人识别码。 + /// + [Newtonsoft.Json.JsonProperty("nsrsbh")] + [System.Text.Json.Serialization.JsonPropertyName("nsrsbh")] + public string SellerTaxNumber { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceQueryInvoiceInfoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceQueryInvoiceInfoResponse.cs new file mode 100644 index 00000000..b6fdc1e4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceQueryInvoiceInfoResponse.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/queryinvoceinfo 接口的响应。 + /// + public class CardInvoiceQueryInvoiceInfoResponse : WechatApiResponse + { + public static class Types + { + public class Invoice + { + /// + /// 获取或设置发票请求流水号。 + /// + [Newtonsoft.Json.JsonProperty("fpqqlsh")] + [System.Text.Json.Serialization.JsonPropertyName("fpqqlsh")] + public string InvoiceSerialNumber { get; set; } = default!; + + /// + /// 获取或设置发票代码。 + /// + [Newtonsoft.Json.JsonProperty("fpdm")] + [System.Text.Json.Serialization.JsonPropertyName("fpdm")] + public string InvoiceCode { get; set; } = default!; + + /// + /// 获取或设置发票号码。 + /// + [Newtonsoft.Json.JsonProperty("fphm")] + [System.Text.Json.Serialization.JsonPropertyName("fphm")] + public string InvoiceNumber { get; set; } = default!; + + /// + /// 获取或设置开票日期字符串(格式:yyyyMMddHHmmss)。 + /// + [Newtonsoft.Json.JsonProperty("kprq")] + [System.Text.Json.Serialization.JsonPropertyName("kprq")] + public string InvoiceDateTimeString { get; set; } = default!; + + /// + /// 获取或设置校验码。 + /// + [Newtonsoft.Json.JsonProperty("jym")] + [System.Text.Json.Serialization.JsonPropertyName("jym")] + public string CheckCode { get; set; } = default!; + + /// + /// 获取或设置发票的 PDF 文件 URL。 + /// + [Newtonsoft.Json.JsonProperty("pdfurl")] + [System.Text.Json.Serialization.JsonPropertyName("pdfurl")] + public string PdfUrl { get; set; } = default!; + } + } + + /// + /// 获取或设置发票信息。 + /// + [Newtonsoft.Json.JsonProperty("invoicedetail")] + [System.Text.Json.Serialization.JsonPropertyName("invoicedetail")] + public Types.Invoice Invoice { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceRejectInsertRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceRejectInsertRequest.cs new file mode 100644 index 00000000..b1956aab --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceRejectInsertRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/rejectinsert 接口的请求。 + /// + public class CardInvoiceRejectInsertRequest : WechatApiRequest + { + /// + /// 获取或设置订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置开票平台或财政局 AppId。 + /// + [Newtonsoft.Json.JsonProperty("s_pappid")] + [System.Text.Json.Serialization.JsonPropertyName("s_pappid")] + public string SpAppId { get; set; } = string.Empty; + + /// + /// 获取或设置拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string Reason { get; set; } = string.Empty; + + /// + /// 获取或设置跳转页面 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string? RedirectUrl { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceRejectInsertResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceRejectInsertResponse.cs new file mode 100644 index 00000000..282bb38e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceRejectInsertResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/rejectinsert 接口的响应。 + /// + public class CardInvoiceRejectInsertResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetAuthFieldRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetAuthFieldRequest.cs new file mode 100644 index 00000000..532fd0e3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetAuthFieldRequest.cs @@ -0,0 +1,152 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=set_auth_field 接口的请求。 + /// + public class CardInvoiceSetAuthFieldRequest : WechatApiRequest + { + public static class Types + { + public class AuthField + { + public static class Types + { + public class UserField + { + /// + /// 获取或设置是否填写抬头。 + /// + [Newtonsoft.Json.JsonProperty("show_title")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_title")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsShowTitle { get; set; } + + /// + /// 获取或设置是否填写联系电话。 + /// + [Newtonsoft.Json.JsonProperty("show_phone")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_phone")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsShowPhoneNumber { get; set; } + + /// + /// 获取或设置是否填写邮箱。 + /// + [Newtonsoft.Json.JsonProperty("show_email")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_email")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsShowEmail { get; set; } + + /// + /// 获取或设置自定义字段列表。 + /// + [Newtonsoft.Json.JsonProperty("custom_field")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field")] + public IList? CustomFieldList { get; set; } + } + + public class BusinessField + { + /// + /// 获取或设置是否填写抬头。 + /// + [Newtonsoft.Json.JsonProperty("show_title")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_title")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsShowTitle { get; set; } + + /// + /// 获取或设置是否填写税号。 + /// + [Newtonsoft.Json.JsonProperty("show_tax_no")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_tax_no")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsShowTaxNumber { get; set; } + + /// + /// 获取或设置是否填写单位地址。 + /// + [Newtonsoft.Json.JsonProperty("show_addr")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_addr")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsShowAddress { get; set; } + + /// + /// 获取或设置是否填写联系电话。 + /// + [Newtonsoft.Json.JsonProperty("show_phone")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_phone")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsShowPhoneNumber { get; set; } + + /// + /// 获取或设置是否填写开户银行。 + /// + [Newtonsoft.Json.JsonProperty("show_bank_type")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_bank_type")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsShowBankType { get; set; } + + /// + /// 获取或设置是否填写银行账号。 + /// + [Newtonsoft.Json.JsonProperty("show_bank_no")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_bank_no")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsShowBankNumber { get; set; } + + /// + /// 获取或设置自定义字段列表。 + /// + [Newtonsoft.Json.JsonProperty("custom_field")] + [System.Text.Json.Serialization.JsonPropertyName("custom_field")] + public IList? CustomFieldList { get; set; } + } + + public class CustomField + { + /// + /// 获取或设置自定义字段名称。 + /// + [Newtonsoft.Json.JsonProperty("key")] + [System.Text.Json.Serialization.JsonPropertyName("key")] + public string Key { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置个人发票字段信息。 + /// + [Newtonsoft.Json.JsonProperty("user_field")] + [System.Text.Json.Serialization.JsonPropertyName("user_field")] + public Types.UserField? UserField { get; set; } + + /// + /// 获取或设置单位发票字段信息。 + /// + [Newtonsoft.Json.JsonProperty("biz_field")] + [System.Text.Json.Serialization.JsonPropertyName("biz_field")] + public Types.BusinessField? BusinessField { get; set; } + } + } + + /// + /// 获取或设置授权页信息。 + /// + [Newtonsoft.Json.JsonProperty("auth_field")] + [System.Text.Json.Serialization.JsonPropertyName("auth_field")] + public Types.AuthField AuthField { get; set; } = new Types.AuthField(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetAuthFieldResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetAuthFieldResponse.cs new file mode 100644 index 00000000..1ad19d64 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetAuthFieldResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=set_auth_field 接口的响应。 + /// + public class CardInvoiceSetAuthFieldResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetContactRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetContactRequest.cs new file mode 100644 index 00000000..5bafe20d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetContactRequest.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=set_contact 接口的请求。 + /// + public class CardInvoiceSetContactRequest : WechatApiRequest + { + public static class Types + { + public class Contact + { + /// + /// 获取或设置电话号码。 + /// + [Newtonsoft.Json.JsonProperty("phone")] + [System.Text.Json.Serialization.JsonPropertyName("phone")] + public string PhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置开票超时时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("time_out")] + [System.Text.Json.Serialization.JsonPropertyName("time_out")] + public int Timeout { get; set; } + } + } + + /// + /// 获取或设置联系信息。 + /// + [Newtonsoft.Json.JsonProperty("contact")] + [System.Text.Json.Serialization.JsonPropertyName("contact")] + public Types.Contact Contact { get; set; } = new Types.Contact(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetContactResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetContactResponse.cs new file mode 100644 index 00000000..55573a52 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetContactResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=set_contact 接口的响应。 + /// + public class CardInvoiceSetContactResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetPayMerchantRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetPayMerchantRequest.cs new file mode 100644 index 00000000..ef0874eb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetPayMerchantRequest.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=set_pay_mch 接口的请求。 + /// + public class CardInvoiceSetPayMerchantRequest : WechatApiRequest + { + public static class Types + { + public class Merchant + { + /// + /// 获取或设置微信支付商户号。 + /// + [Newtonsoft.Json.JsonProperty("mchid")] + [System.Text.Json.Serialization.JsonPropertyName("mchid")] + public string MerchantId { get; set; } = string.Empty; + + /// + /// 获取或设置开票平台 AppId。 + /// + [Newtonsoft.Json.JsonProperty("s_pappid")] + [System.Text.Json.Serialization.JsonPropertyName("s_pappid")] + public string SpAppId { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置开票信息。 + /// + [Newtonsoft.Json.JsonProperty("paymch_info")] + [System.Text.Json.Serialization.JsonPropertyName("paymch_info")] + public Types.Merchant Merchant { get; set; } = new Types.Merchant(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetPayMerchantResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetPayMerchantResponse.cs new file mode 100644 index 00000000..ccab1930 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetPayMerchantResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=set_pay_mch 接口的响应。 + /// + public class CardInvoiceSetPayMerchantResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetUrlRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetUrlRequest.cs new file mode 100644 index 00000000..86a78ef0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetUrlRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/seturl 接口的请求。 + /// + public class CardInvoiceSetUrlRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetUrlResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetUrlResponse.cs new file mode 100644 index 00000000..763b035c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/CardInvoiceSetUrlResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/seturl 接口的响应。 + /// + public class CardInvoiceSetUrlResponse : WechatApiResponse + { + /// + /// 获取或设置授权链接。 + /// + [Newtonsoft.Json.JsonProperty("invoice_url")] + [System.Text.Json.Serialization.JsonPropertyName("invoice_url")] + public string InvoiceUrl { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformCreateCardRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformCreateCardRequest.cs new file mode 100644 index 00000000..73590f7e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformCreateCardRequest.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/platform/createcard 接口的请求。 + /// + public class CardInvoicePlatformCreateCardRequest : WechatApiRequest + { + public static class Types + { + public class InvoiceTemplate + { + public static class Types + { + public class Base + { + /// + /// 获取或设置商家 Logo URL。 + /// + [Newtonsoft.Json.JsonProperty("logo_url")] + [System.Text.Json.Serialization.JsonPropertyName("logo_url")] + public string LogoUrl { get; set; } = string.Empty; + + /// + /// 获取或设置商家简称。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置开票平台自定义入口名称。 + /// + [Newtonsoft.Json.JsonProperty("custom_url_name")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url_name")] + public string? CustomUrlTitle { get; set; } + + /// + /// 获取或设置开票平台自定义入口右侧提示信息。 + /// + [Newtonsoft.Json.JsonProperty("custom_url_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url_sub_title")] + public string? CustomUrlSubTitle { get; set; } + + /// + /// 获取或设置开票平台自定义入口 URL。 + /// + [Newtonsoft.Json.JsonProperty("custom_url")] + [System.Text.Json.Serialization.JsonPropertyName("custom_url")] + public string? CustomUrl { get; set; } + + /// + /// 获取或设置营销场景的自定义入口名称。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url_name")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url_name")] + public string? PromotionUrlTitle { get; set; } + + /// + /// 获取或设置营销场景的自定义入口右侧提示信息。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url_sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url_sub_title")] + public string? PromotionUrlSubTitle { get; set; } + + /// + /// 获取或设置营销场景的自定义入口 URL。 + /// + [Newtonsoft.Json.JsonProperty("promotion_url")] + [System.Text.Json.Serialization.JsonPropertyName("promotion_url")] + public string? PromotionUrl { get; set; } + } + } + + /// + /// 获取或设置发票基础信息。 + /// + [Newtonsoft.Json.JsonProperty("base_info")] + [System.Text.Json.Serialization.JsonPropertyName("base_info")] + public Types.Base Base { get; set; } = new Types.Base(); + + /// + /// 获取或设置开票类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置开票方全称。 + /// + [Newtonsoft.Json.JsonProperty("payee")] + [System.Text.Json.Serialization.JsonPropertyName("payee")] + public string Payee { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置发票模板信息。 + /// + [Newtonsoft.Json.JsonProperty("invoice_info")] + [System.Text.Json.Serialization.JsonPropertyName("invoice_info")] + public Types.InvoiceTemplate InvoiceTemplate { get; set; } = new Types.InvoiceTemplate(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformCreateCardResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformCreateCardResponse.cs new file mode 100644 index 00000000..3f1deafb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformCreateCardResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/platform/createcard 接口的响应。 + /// + public class CardInvoicePlatformCreateCardResponse : WechatApiResponse + { + /// + /// 获取或设置发票卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformGetPdfRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformGetPdfRequest.cs new file mode 100644 index 00000000..ab46e15a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformGetPdfRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/platform/getpdf 接口的请求。 + /// + public class CardInvoicePlatformGetPdfRequest : WechatApiRequest + { + /// + /// (使用默认值即可,无需修改) + /// + [Newtonsoft.Json.JsonProperty("action")] + [System.Text.Json.Serialization.JsonPropertyName("action")] + public string Action { get; set; } = "get_url"; + + /// + /// 获取或设置发票文件标识。 + /// + [Newtonsoft.Json.JsonProperty("s_media_id")] + [System.Text.Json.Serialization.JsonPropertyName("s_media_id")] + public string SpMediaId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformGetPdfResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformGetPdfResponse.cs new file mode 100644 index 00000000..8a25b29b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformGetPdfResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/platform/getpdf 接口的响应。 + /// + public class CardInvoicePlatformGetPdfResponse : WechatApiResponse + { + /// + /// 获取或设置发票文件 URL。 + /// + [Newtonsoft.Json.JsonProperty("pdf_url")] + [System.Text.Json.Serialization.JsonPropertyName("pdf_url")] + public string PdfUrl { get; set; } = default!; + + /// + /// 获取或设置发票文件 URL 有效时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("pdf_url_expire_time")] + [System.Text.Json.Serialization.JsonPropertyName("pdf_url_expire_time")] + public int ExpiresIn { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformSetPdfRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformSetPdfRequest.cs new file mode 100644 index 00000000..83cb9da2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformSetPdfRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/platform/setpdf 接口的请求。 + /// + public class CardInvoicePlatformSetPdfRequest : WechatApiRequest + { + /// + /// 获取或设置发票文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] FileBytes { get; set; } = new byte[0]; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformSetPdfResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformSetPdfResponse.cs new file mode 100644 index 00000000..a8e3a54a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformSetPdfResponse.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/platform/setpdf 接口的响应。 + /// + public class CardInvoicePlatformSetPdfResponse : WechatApiResponse + { + /// + /// 获取或设置发票文件标识。 + /// + [Newtonsoft.Json.JsonProperty("s_media_id")] + [System.Text.Json.Serialization.JsonPropertyName("s_media_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedStringConverter))] + public string SpMediaId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformUpdateStatusRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformUpdateStatusRequest.cs new file mode 100644 index 00000000..c73eb161 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformUpdateStatusRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/platform/updatestatus 接口的请求。 + /// + public class CardInvoicePlatformUpdateStatusRequest : WechatApiRequest + { + /// + /// 获取或设置发票或非税票据卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置发票或非税票据卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string CardCode { get; set; } = string.Empty; + + /// + /// 获取或设置发票或非税票据报销状态。 + /// + [Newtonsoft.Json.JsonProperty("reimburse_status")] + [System.Text.Json.Serialization.JsonPropertyName("reimburse_status")] + public string SeimburseStatus { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformUpdateStatusResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformUpdateStatusResponse.cs new file mode 100644 index 00000000..800b01c7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Platform/CardInvoicePlatformUpdateStatusResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/platform/updatestatus 接口的响应。 + /// + public class CardInvoicePlatformUpdateStatusResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetSelectTitleUrlRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetSelectTitleUrlRequest.cs new file mode 100644 index 00000000..71d709d7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetSelectTitleUrlRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/biz/getselecttitleurl 接口的请求。 + /// + public class CardInvoiceBusinessGetSelectTitleUrlRequest : WechatApiRequest + { + /// + /// 获取或设置附加信息。 + /// + [Newtonsoft.Json.JsonProperty("attach")] + [System.Text.Json.Serialization.JsonPropertyName("attach")] + public string? Attachment { get; set; } + + /// + /// 获取或设置商户名称。 + /// + [Newtonsoft.Json.JsonProperty("biz_name")] + [System.Text.Json.Serialization.JsonPropertyName("biz_name")] + public string? BusinessName { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetSelectTitleUrlResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetSelectTitleUrlResponse.cs new file mode 100644 index 00000000..6fcbfae0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetSelectTitleUrlResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/biz/getselecttitleurl 接口的响应。 + /// + public class CardInvoiceBusinessGetSelectTitleUrlResponse : WechatApiResponse + { + /// + /// 获取或设置授权 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetUserTitleUrlRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetUserTitleUrlRequest.cs new file mode 100644 index 00000000..6d3e975a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetUserTitleUrlRequest.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/biz/getusertitleurl 接口的请求。 + /// + public class CardInvoiceBusinessGetUserTitleUrlRequest : WechatApiRequest + { + /// + /// 获取或设置发票抬头。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// 获取或设置税号。 + /// + [Newtonsoft.Json.JsonProperty("tax_no")] + [System.Text.Json.Serialization.JsonPropertyName("tax_no")] + public string? TaxNumber { get; set; } + + /// + /// 获取或设置联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone")] + [System.Text.Json.Serialization.JsonPropertyName("phone")] + public string? PhoneNumber { get; set; } + + /// + /// 获取或设置联系地址。 + /// + [Newtonsoft.Json.JsonProperty("addr")] + [System.Text.Json.Serialization.JsonPropertyName("addr")] + public string? Address { get; set; } + + /// + /// 获取或设置开户行。 + /// + [Newtonsoft.Json.JsonProperty("bank_type")] + [System.Text.Json.Serialization.JsonPropertyName("bank_type")] + public string? Bank { get; set; } + + /// + /// 获取或设置银行账号。 + /// + [Newtonsoft.Json.JsonProperty("bank_no")] + [System.Text.Json.Serialization.JsonPropertyName("bank_no")] + public string? BankNumber { get; set; } + + /// + /// 获取或设置是否用户自己填写。 + /// + [Newtonsoft.Json.JsonProperty("user_fill")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("user_fill")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsUserFill { get; set; } + + /// + /// 获取或设置开票码。 + /// + [Newtonsoft.Json.JsonProperty("out_title_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_title_id")] + public string? OutTitleId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetUserTitleUrlResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetUserTitleUrlResponse.cs new file mode 100644 index 00000000..e83445f3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessGetUserTitleUrlResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/biz/getusertitleurl 接口的响应。 + /// + public class CardInvoiceBusinessGetUserTitleUrlResponse : WechatApiResponse + { + /// + /// 获取或设置授权 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessScanTitleRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessScanTitleRequest.cs new file mode 100644 index 00000000..a4f61ced --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessScanTitleRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/scantitle 接口的请求。 + /// + public class CardInvoiceBusinessScanTitleRequest : WechatApiRequest + { + /// + /// 获取或设置扫码后获得的文本。 + /// + [Newtonsoft.Json.JsonProperty("scan_text")] + [System.Text.Json.Serialization.JsonPropertyName("scan_text")] + public string ScanText { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessScanTitleResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessScanTitleResponse.cs new file mode 100644 index 00000000..13a86232 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Quick/CardInvoiceBusinessScanTitleResponse.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/scantitle 接口的响应。 + /// + public class CardInvoiceBusinessScanTitleResponse : WechatApiResponse + { + /// + /// 获取或设置发票抬头类型。 + /// + [Newtonsoft.Json.JsonProperty("title_type")] + [System.Text.Json.Serialization.JsonPropertyName("title_type")] + public int TitleType { get; set; } + + /// + /// 获取或设置发票抬头。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置税号。 + /// + [Newtonsoft.Json.JsonProperty("tax_no")] + [System.Text.Json.Serialization.JsonPropertyName("tax_no")] + public string? TaxNumber { get; set; } + + /// + /// 获取或设置联系电话。 + /// + [Newtonsoft.Json.JsonProperty("phone")] + [System.Text.Json.Serialization.JsonPropertyName("phone")] + public string? PhoneNumber { get; set; } + + /// + /// 获取或设置联系地址。 + /// + [Newtonsoft.Json.JsonProperty("addr")] + [System.Text.Json.Serialization.JsonPropertyName("addr")] + public string? Address { get; set; } + + /// + /// 获取或设置开户行。 + /// + [Newtonsoft.Json.JsonProperty("bank_type")] + [System.Text.Json.Serialization.JsonPropertyName("bank_type")] + public string? Bank { get; set; } + + /// + /// 获取或设置银行账号。 + /// + [Newtonsoft.Json.JsonProperty("bank_no")] + [System.Text.Json.Serialization.JsonPropertyName("bank_no")] + public string? BankNumber { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceBatchRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceBatchRequest.cs new file mode 100644 index 00000000..2f5f5777 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceBatchRequest.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/reimburse/getinvoicebatch 接口的请求。 + /// + public class CardInvoiceReimburseGetInvoiceBatchRequest : WechatApiRequest + { + public static class Types + { + public class InvoiceCard + { + /// + /// 获取或设置发票卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置经过加密的发票卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("encrypt_code")] + [System.Text.Json.Serialization.JsonPropertyName("encrypt_code")] + public string EncryptedCardCode { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置发票卡券列表。 + /// + [Newtonsoft.Json.JsonProperty("item_list")] + [System.Text.Json.Serialization.JsonPropertyName("item_list")] + public IList InvoiceCardList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceBatchResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceBatchResponse.cs new file mode 100644 index 00000000..73fa62b9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceBatchResponse.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/reimburse/getinvoicebatch 接口的响应。 + /// + public class CardInvoiceReimburseGetInvoiceBatchResponse : WechatApiResponse + { + public static class Types + { + public class InvoiceCard + { + public static class Types + { + public class Invoice : CardInvoiceReimburseGetInvoiceInfoResponse.Types.Invoice + { + } + } + + /// + /// 获取或设置发票卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置发票的有效期起始时间戳。 + /// + [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("user_card_status")] + [System.Text.Json.Serialization.JsonPropertyName("user_card_status")] + public string CardStatus { get; set; } = default!; + + /// + /// 获取或设置获得发票的用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置开票类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置开票方全称。 + /// + [Newtonsoft.Json.JsonProperty("payee")] + [System.Text.Json.Serialization.JsonPropertyName("payee")] + public string Payee { get; set; } = default!; + + /// + /// 获取或设置开票详情。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public string Detail { get; set; } = default!; + + /// + /// 获取或设置发票信息。 + /// + [Newtonsoft.Json.JsonProperty("user_info")] + [System.Text.Json.Serialization.JsonPropertyName("user_info")] + public Types.Invoice Invoice { get; set; } = default!; + } + } + + /// + /// 获取或设置发票卡券列表。 + /// + [Newtonsoft.Json.JsonProperty("item_list")] + [System.Text.Json.Serialization.JsonPropertyName("item_list")] + public Types.InvoiceCard[] InvoiceCardList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceInfoRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceInfoRequest.cs new file mode 100644 index 00000000..37fe6f9d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceInfoRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/reimburse/getinvoiceinfo 接口的请求。 + /// + public class CardInvoiceReimburseGetInvoiceInfoRequest : WechatApiRequest + { + /// + /// 获取或设置发票卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置经过加密的发票卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("encrypt_code")] + [System.Text.Json.Serialization.JsonPropertyName("encrypt_code")] + public string EncryptedCardCode { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceInfoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceInfoResponse.cs new file mode 100644 index 00000000..709161c7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseGetInvoiceInfoResponse.cs @@ -0,0 +1,241 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/reimburse/getinvoiceinfo 接口的响应。 + /// + public class CardInvoiceReimburseGetInvoiceInfoResponse : WechatApiResponse + { + public static class Types + { + public class Invoice + { + public static class Types + { + public class InvoiceItem : CardInvoiceInsertRequest.Types.CardExt.Types.InvoiceCard.Types.Invoice.Types.InvoiceItem + { + } + } + + /// + /// 获取或设置发票抬头。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置不含税金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("fee_without_tax")] + [System.Text.Json.Serialization.JsonPropertyName("fee_without_tax")] + public int FeeWithoutTax { get; set; } + + /// + /// 获取或设置发票金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("fee")] + [System.Text.Json.Serialization.JsonPropertyName("fee")] + public int Fee { get; set; } + + /// + /// 获取或设置税额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("tax")] + [System.Text.Json.Serialization.JsonPropertyName("tax")] + public int Tax { get; set; } + + /// + /// 获取或设置发票代码。 + /// + [Newtonsoft.Json.JsonProperty("billing_no")] + [System.Text.Json.Serialization.JsonPropertyName("billing_no")] + public string InvoiceCode { get; set; } = default!; + + /// + /// 获取或设置发票号码。 + /// + [Newtonsoft.Json.JsonProperty("billing_code")] + [System.Text.Json.Serialization.JsonPropertyName("billing_code")] + public string InvoiceNumber { get; set; } = default!; + + /// + /// 获取或设置开票时间戳。 + /// + [Newtonsoft.Json.JsonProperty("billing_time")] + [System.Text.Json.Serialization.JsonPropertyName("billing_time")] + public long InvoiceTimestamp { get; set; } + + /// + /// 获取或设置发票行项目数据列表。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public Types.InvoiceItem[]? InvoiceItemList { get; set; } + + /// + /// 获取或设置校验码。 + /// + [Newtonsoft.Json.JsonProperty("check_code")] + [System.Text.Json.Serialization.JsonPropertyName("check_code")] + public string CheckCode { get; set; } = default!; + + /// + /// 获取或设置发票报销状态。 + /// + [Newtonsoft.Json.JsonProperty("reimburse_status")] + [System.Text.Json.Serialization.JsonPropertyName("reimburse_status")] + public string ReimburseStatus { get; set; } = default!; + + /// + /// 获取或设置发票文件 URL。 + /// + [Newtonsoft.Json.JsonProperty("pdf_url")] + [System.Text.Json.Serialization.JsonPropertyName("pdf_url")] + public string PdfUrl { get; set; } = default!; + + /// + /// 获取或设置其它消费附件 URL。 + /// + [Newtonsoft.Json.JsonProperty("trip_pdf_url")] + [System.Text.Json.Serialization.JsonPropertyName("trip_pdf_url")] + public string? TripUrl { get; set; } + + /// + /// 获取或设置订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string? OrderId { get; set; } + + /// + /// 获取或设置购买方纳税人识别号。 + /// + [Newtonsoft.Json.JsonProperty("buyer_number")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_number")] + public string BuyerTaxNumber { get; set; } = default!; + + /// + /// 获取或设置购买方地址、电话。 + /// + [Newtonsoft.Json.JsonProperty("buyer_address_and_phone")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_address_and_phone")] + public string? BuyerAddressAndPhoneNumber { get; set; } + + /// + /// 获取或设置购买方开户行、银行账号。 + /// + [Newtonsoft.Json.JsonProperty("buyer_bank_account")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_bank_account")] + public string? BuyerBankAccount { get; set; } + + /// + /// 获取或设置销售方纳税人识别号。 + /// + [Newtonsoft.Json.JsonProperty("seller_number")] + [System.Text.Json.Serialization.JsonPropertyName("seller_number")] + public string? SellerTaxNumber { get; set; } + + /// + /// 获取或设置销售方纳税人地址、电话。 + /// + [Newtonsoft.Json.JsonProperty("seller_address_and_phone")] + [System.Text.Json.Serialization.JsonPropertyName("seller_address_and_phone")] + public string? SellerAddressAndPhoneNumber { get; set; } + + /// + /// 获取或设置销售方开户行、银行账号。 + /// + [Newtonsoft.Json.JsonProperty("seller_bank_account")] + [System.Text.Json.Serialization.JsonPropertyName("seller_bank_account")] + public string? SellerBankAccount { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remarks")] + [System.Text.Json.Serialization.JsonPropertyName("remarks")] + public string? Remark { get; set; } + + /// + /// 获取或设置开票人。 + /// + [Newtonsoft.Json.JsonProperty("maker")] + [System.Text.Json.Serialization.JsonPropertyName("maker")] + public string? Drawer { get; set; } + + /// + /// 获取或设置收款人。 + /// + [Newtonsoft.Json.JsonProperty("cashier")] + [System.Text.Json.Serialization.JsonPropertyName("cashier")] + public string? Cashier { get; set; } + } + } + + /// + /// 获取或设置发票卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = default!; + + /// + /// 获取或设置发票的有效期起始时间戳。 + /// + [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("user_card_status")] + [System.Text.Json.Serialization.JsonPropertyName("user_card_status")] + public string CardStatus { get; set; } = default!; + + /// + /// 获取或设置获得发票的用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置开票类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置开票方全称。 + /// + [Newtonsoft.Json.JsonProperty("payee")] + [System.Text.Json.Serialization.JsonPropertyName("payee")] + public string Payee { get; set; } = default!; + + /// + /// 获取或设置开票详情。 + /// + [Newtonsoft.Json.JsonProperty("detail")] + [System.Text.Json.Serialization.JsonPropertyName("detail")] + public string Detail { get; set; } = default!; + + /// + /// 获取或设置发票信息。 + /// + [Newtonsoft.Json.JsonProperty("user_info")] + [System.Text.Json.Serialization.JsonPropertyName("user_info")] + public Types.Invoice Invoice { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateInvoiceStatusRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateInvoiceStatusRequest.cs new file mode 100644 index 00000000..e8b60be5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateInvoiceStatusRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/reimburse/updateinvoicestatus 接口的请求。 + /// + public class CardInvoiceReimburseUpdateInvoiceStatusRequest : WechatApiRequest + { + /// + /// 获取或设置发票卡券模板编号。 + /// + [Newtonsoft.Json.JsonProperty("card_id")] + [System.Text.Json.Serialization.JsonPropertyName("card_id")] + public string CardId { get; set; } = string.Empty; + + /// + /// 获取或设置经过加密的发票卡券 Code。 + /// + [Newtonsoft.Json.JsonProperty("encrypt_code")] + [System.Text.Json.Serialization.JsonPropertyName("encrypt_code")] + public string EncryptedCardCode { get; set; } = string.Empty; + + /// + /// 获取或设置发票报销状态。 + /// + [Newtonsoft.Json.JsonProperty("reimburse_status")] + [System.Text.Json.Serialization.JsonPropertyName("reimburse_status")] + public string ReimburseStatus { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateInvoiceStatusResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateInvoiceStatusResponse.cs new file mode 100644 index 00000000..5be82301 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateInvoiceStatusResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/reimburse/updateinvoicestatus 接口的响应。 + /// + public class CardInvoiceReimburseUpdateInvoiceStatusResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateStatusBatchRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateStatusBatchRequest.cs new file mode 100644 index 00000000..b04be274 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateStatusBatchRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/reimburse/updatestatusbatch 接口的请求。 + /// + public class CardInvoiceReimburseUpdateStatusBatchRequest : WechatApiRequest + { + public static class Types + { + public class InvoiceCard : CardInvoiceReimburseGetInvoiceBatchRequest.Types.InvoiceCard + { + } + } + + /// + /// 获取或设置获得发票的用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置发票报销状态。 + /// + [Newtonsoft.Json.JsonProperty("reimburse_status")] + [System.Text.Json.Serialization.JsonPropertyName("reimburse_status")] + public string ReimburseStatus { get; set; } = string.Empty; + + /// + /// 获取或设置发票卡券列表。 + /// + [Newtonsoft.Json.JsonProperty("invoice_list")] + [System.Text.Json.Serialization.JsonPropertyName("invoice_list")] + public IList InvoiceCardList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateStatusBatchResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateStatusBatchResponse.cs new file mode 100644 index 00000000..6527c78e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/Reimburse/CardInvoiceReimburseUpdateStatusBatchResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/reimburse/updatestatusbatch 接口的响应。 + /// + public class CardInvoiceReimburseUpdateStatusBatchResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetAuthFieldRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetAuthFieldRequest.cs new file mode 100644 index 00000000..191c6dd1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetAuthFieldRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=get_auth_field 接口的请求。 + /// + public class CardInvoiceGetAuthFieldRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetAuthFieldResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetAuthFieldResponse.cs new file mode 100644 index 00000000..93588e1e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetAuthFieldResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=get_auth_field 接口的响应。 + /// + public class CardInvoiceGetAuthFieldResponse : WechatApiResponse + { + public static class Types + { + public class AuthField : CardInvoiceSetAuthFieldRequest.Types.AuthField + { + } + } + + /// + /// 获取或设置授权页信息。 + /// + [Newtonsoft.Json.JsonProperty("auth_field")] + [System.Text.Json.Serialization.JsonPropertyName("auth_field")] + public Types.AuthField? AuthField { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetContactRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetContactRequest.cs new file mode 100644 index 00000000..99f5b662 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetContactRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=get_contact 接口的请求。 + /// + public class CardInvoiceGetContactRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetContactResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetContactResponse.cs new file mode 100644 index 00000000..12e35ce5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetContactResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=get_contact 接口的响应。 + /// + public class CardInvoiceGetContactResponse : WechatApiResponse + { + public static class Types + { + public class Contact : CardInvoiceSetContactRequest.Types.Contact + { + } + } + + /// + /// 获取或设置联系信息。 + /// + [Newtonsoft.Json.JsonProperty("contact")] + [System.Text.Json.Serialization.JsonPropertyName("contact")] + public Types.Contact? Contact { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetPayMerchantRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetPayMerchantRequest.cs new file mode 100644 index 00000000..8a2f18a2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetPayMerchantRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=get_pay_mch 接口的请求。 + /// + public class CardInvoiceGetPayMerchantRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetPayMerchantResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetPayMerchantResponse.cs new file mode 100644 index 00000000..4b101fde --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CardInvoice/SetBusinessAttribute/CardInvoiceGetPayMerchantResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /card/invoice/setbizattr?action=get_pay_mch 接口的响应。 + /// + public class CardInvoiceGetPayMerchantResponse : WechatApiResponse + { + public static class Types + { + public class Merchant : CardInvoiceSetPayMerchantRequest.Types.Merchant + { + } + } + + /// + /// 获取或设置开票信息。 + /// + [Newtonsoft.Json.JsonProperty("paymch_info")] + [System.Text.Json.Serialization.JsonPropertyName("paymch_info")] + public Types.Merchant? Merchant { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinClearQuotaRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinClearQuotaRequest.cs new file mode 100644 index 00000000..e7f1b3fc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinClearQuotaRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/clear_quota 接口的请求。 + /// + public class CgibinClearQuotaRequest : WechatApiRequest + { + /// + /// 获取或设置微信 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinClearQuotaResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinClearQuotaResponse.cs new file mode 100644 index 00000000..4d5cadee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinClearQuotaResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/clear_quota 接口的响应。 + /// + public class CgibinClearQuotaResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinTicketGetTicketRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinTicketGetTicketRequest.cs index 2a6838e6..1b213202 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinTicketGetTicketRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinTicketGetTicketRequest.cs @@ -9,8 +9,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models public class CgibinTicketGetTicketRequest : WechatApiRequest { /// - /// (使用默认值即可,无需修改) + /// 获取或设置票据类型。 + /// 默认值:jsapi /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] public string Type { get; set; } = "jsapi"; } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinTokenRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinTokenRequest.cs index a26ded69..ce285605 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinTokenRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Cgibin/CgibinTokenRequest.cs @@ -11,6 +11,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// /// (使用默认值即可,无需修改) /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] public string GrantType { get; set; } = "client_credential"; } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentCloseRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentCloseRequest.cs new file mode 100644 index 00000000..24313644 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentCloseRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/close 接口的请求。 + /// + public class CgibinCommentCloseRequest : CgibinCommentOpenRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentCloseResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentCloseResponse.cs new file mode 100644 index 00000000..cd12c140 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentCloseResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/close 接口的响应。 + /// + public class CgibinCommentCloseResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentDeleteRequest.cs new file mode 100644 index 00000000..8e0df5ba --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentDeleteRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/delete 接口的请求。 + /// + public class CgibinCommentDeleteRequest : CgibinCommentMarkElectRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentDeleteResponse.cs new file mode 100644 index 00000000..7a9f2ffe --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentDeleteResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/delete 接口的响应。 + /// + public class CgibinCommentDeleteResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentListRequest.cs new file mode 100644 index 00000000..e264df9f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentListRequest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/list 接口的请求。 + /// + public class CgibinCommentListRequest : WechatApiRequest + { + /// + /// 获取或设置群发消息数据 ID。 + /// + [Newtonsoft.Json.JsonProperty("msg_data_id")] + [System.Text.Json.Serialization.JsonPropertyName("msg_data_id")] + public long MessageDataId { get; set; } + + /// + /// 获取或设置文章在图文消息中的位置(从 0 开始;不指定则默认第一篇)。 + /// + [Newtonsoft.Json.JsonProperty("index")] + [System.Text.Json.Serialization.JsonPropertyName("index")] + public int? ArticleIndex { get; set; } + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("begin")] + [System.Text.Json.Serialization.JsonPropertyName("begin")] + public int Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Limit { get; set; } = 10; + + /// + /// 获取或设置评论类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentListResponse.cs new file mode 100644 index 00000000..77d99913 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentListResponse.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/list 接口的响应。 + /// + public class CgibinCommentListResponse : WechatApiResponse + { + public static class Types + { + public class Comment + { + public static class Types + { + public class Reply + { + /// + /// 获取或设置回复内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = default!; + + /// + /// 获取或设置回复时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置评论 ID。 + /// + [Newtonsoft.Json.JsonProperty("user_comment_id")] + [System.Text.Json.Serialization.JsonPropertyName("user_comment_id")] + public long CommentId { get; set; } + + /// + /// 获取或设置用户唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置评论内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = default!; + + /// + /// 获取或设置是否精选评论。 + /// + [Newtonsoft.Json.JsonProperty("comment_type")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("comment_type")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool IsElected { get; set; } + + /// + /// 获取或设置作者回复列表。 + /// + [Newtonsoft.Json.JsonProperty("reply")] + [System.Text.Json.Serialization.JsonPropertyName("reply")] + public Types.Reply[]? ReplyList { get; set; } = default!; + + /// + /// 获取或设置评论时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置评论总数。 + /// + [Newtonsoft.Json.JsonProperty("total")] + [System.Text.Json.Serialization.JsonPropertyName("total")] + public int Total { get; set; } + + /// + /// 获取或设置评论列表。 + /// + [Newtonsoft.Json.JsonProperty("comment")] + [System.Text.Json.Serialization.JsonPropertyName("comment")] + public Types.Comment[] CommentList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentMarkElectRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentMarkElectRequest.cs new file mode 100644 index 00000000..c6833e80 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentMarkElectRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/markelect 接口的请求。 + /// + public class CgibinCommentMarkElectRequest : WechatApiRequest + { + /// + /// 获取或设置群发消息数据 ID。 + /// + [Newtonsoft.Json.JsonProperty("msg_data_id")] + [System.Text.Json.Serialization.JsonPropertyName("msg_data_id")] + public long MessageDataId { get; set; } + + /// + /// 获取或设置文章在图文消息中的位置(从 0 开始;不指定则默认第一篇)。 + /// + [Newtonsoft.Json.JsonProperty("index")] + [System.Text.Json.Serialization.JsonPropertyName("index")] + public int? ArticleIndex { get; set; } + + /// + /// 获取或设置评论 ID。 + /// + [Newtonsoft.Json.JsonProperty("user_comment_id")] + [System.Text.Json.Serialization.JsonPropertyName("user_comment_id")] + public long CommentId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentMarkElectResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentMarkElectResponse.cs new file mode 100644 index 00000000..8a28b0ec --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentMarkElectResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/markelect 接口的响应。 + /// + public class CgibinCommentMarkElectResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentOpenRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentOpenRequest.cs new file mode 100644 index 00000000..c625810a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentOpenRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/open 接口的请求。 + /// + public class CgibinCommentOpenRequest : WechatApiRequest + { + /// + /// 获取或设置群发消息数据 ID。 + /// + [Newtonsoft.Json.JsonProperty("msg_data_id")] + [System.Text.Json.Serialization.JsonPropertyName("msg_data_id")] + public long MessageDataId { get; set; } + + /// + /// 获取或设置文章在图文消息中的位置(从 0 开始;不指定则默认第一篇)。 + /// + [Newtonsoft.Json.JsonProperty("index")] + [System.Text.Json.Serialization.JsonPropertyName("index")] + public int? ArticleIndex { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentOpenResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentOpenResponse.cs new file mode 100644 index 00000000..27d41c53 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentOpenResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/open 接口的响应。 + /// + public class CgibinCommentOpenResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentUnmarkElectRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentUnmarkElectRequest.cs new file mode 100644 index 00000000..8e8b4571 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentUnmarkElectRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/unmarkelect 接口的请求。 + /// + public class CgibinCommentUnmarkElectRequest : CgibinCommentMarkElectRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentUnmarkElectResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentUnmarkElectResponse.cs new file mode 100644 index 00000000..e3109c7d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/CgibinCommentUnmarkElectResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/unmarkelect 接口的响应。 + /// + public class CgibinCommentUnmarkElectResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyAddRequest.cs new file mode 100644 index 00000000..f8b8a659 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyAddRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/reply/add 接口的请求。 + /// + public class CgibinCommentReplyAddRequest : CgibinCommentMarkElectRequest + { + /// + /// 获取或设置回复内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyAddResponse.cs new file mode 100644 index 00000000..dd43ff17 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyAddResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/reply/add 接口的响应。 + /// + public class CgibinCommentReplyAddResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyDeleteRequest.cs new file mode 100644 index 00000000..b8195a91 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyDeleteRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/reply/delete 接口的请求。 + /// + public class CgibinCommentReplyDeleteRequest : CgibinCommentDeleteRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyDeleteResponse.cs new file mode 100644 index 00000000..33655d1a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComment/Reply/CgibinCommentReplyDeleteResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/comment/reply/delete 接口的响应。 + /// + public class CgibinCommentReplyDeleteResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiAuthorizerTokenRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiAuthorizerTokenRequest.cs new file mode 100644 index 00000000..f14a52c9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiAuthorizerTokenRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_authorizer_token 接口的请求。 + /// + public class CgibinComponentApiAuthorizerTokenRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_appid")] + [System.Text.Json.Serialization.JsonPropertyName("component_appid")] + public string? ComponentAppId { get; set; } + + /// + /// 获取或设置授权方 AppId。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")] + public string AuthorizerAppId { get; set; } = string.Empty; + + /// + /// 获取或设置授权方 RefreshToken。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_refresh_token")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_refresh_token")] + public string AuthorizerRefreshToken { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiAuthorizerTokenResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiAuthorizerTokenResponse.cs new file mode 100644 index 00000000..cbc9603b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiAuthorizerTokenResponse.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_authorizer_token 接口的响应。 + /// + public class CgibinComponentApiAuthorizerTokenResponse : WechatApiResponse + { + /// + /// 获取或设置授权方 AccessToken。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_access_token")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_access_token")] + public string AuthorizerAccessToken { get; set; } = default!; + + /// + /// 获取或设置授权方 RefreshToken。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_refresh_token")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_refresh_token")] + public string? AuthorizerRefreshToken { get; set; } + + /// + /// 获取或设置授权方 AccessToken 有效时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expires_in")] + [System.Text.Json.Serialization.JsonPropertyName("expires_in")] + public int ExpiresIn { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiComponentTokenRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiComponentTokenRequest.cs new file mode 100644 index 00000000..0b9650df --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiComponentTokenRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_component_token 接口的请求。 + /// + public class CgibinComponentApiComponentTokenRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_appid")] + [System.Text.Json.Serialization.JsonPropertyName("component_appid")] + public string? ComponentAppId { get; set; } + + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_appsecret")] + [System.Text.Json.Serialization.JsonPropertyName("component_appsecret")] + public string? ComponentSecret { get; set; } + + /// + /// 获取或设置微信验证票据。 + /// + [Newtonsoft.Json.JsonProperty("component_verify_ticket")] + [System.Text.Json.Serialization.JsonPropertyName("component_verify_ticket")] + public string ComponentVerifyTicket { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiComponentTokenResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiComponentTokenResponse.cs new file mode 100644 index 00000000..0d4e99a3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiComponentTokenResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_component_token 接口的响应。 + /// + public class CgibinComponentApiComponentTokenResponse : WechatApiResponse + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonProperty("component_access_token")] + [System.Text.Json.Serialization.JsonPropertyName("component_access_token")] + public string ComponentAccessToken { get; set; } = default!; + + /// + /// 获取或设置第三方平台 AccessToken 有效时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expires_in")] + [System.Text.Json.Serialization.JsonPropertyName("expires_in")] + public int ExpiresIn { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiCreatePreAuthCodeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiCreatePreAuthCodeRequest.cs new file mode 100644 index 00000000..8736aeec --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiCreatePreAuthCodeRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_create_preauthcode 接口的请求。 + /// + public class CgibinComponentApiCreatePreAuthCodeRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_appid")] + [System.Text.Json.Serialization.JsonPropertyName("component_appid")] + public string? ComponentAppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiCreatePreAuthCodeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiCreatePreAuthCodeResponse.cs new file mode 100644 index 00000000..a9ebc07e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiCreatePreAuthCodeResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_create_preauthcode 接口的响应。 + /// + public class CgibinComponentApiCreatePreAuthCodeResponse : WechatApiResponse + { + /// + /// 获取或设置预授权码。 + /// + [Newtonsoft.Json.JsonProperty("pre_auth_code")] + [System.Text.Json.Serialization.JsonPropertyName("pre_auth_code")] + public string PreAuthCode { get; set; } = default!; + + /// + /// 获取或设置预授权码有效时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expires_in")] + [System.Text.Json.Serialization.JsonPropertyName("expires_in")] + public int ExpiresIn { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoRequest.cs new file mode 100644 index 00000000..8f1f24b0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_get_authorizer_info 接口的请求。 + /// + public class CgibinComponentApiGetAuthorizerInfoRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_appid")] + [System.Text.Json.Serialization.JsonPropertyName("component_appid")] + public string? ComponentAppId { get; set; } + + /// + /// 获取或设置授权方 AppId。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")] + public string AuthorizerAppId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoResponse.cs new file mode 100644 index 00000000..2dce5da2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoResponse.cs @@ -0,0 +1,286 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_get_authorizer_info 接口的响应。 + /// + public class CgibinComponentApiGetAuthorizerInfoResponse : WechatApiResponse + { + public static class Types + { + public class Authorizer + { + public static class Types + { + public class ServiceType + { + /// + /// 获取或设置类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public int Id { get; set; } + } + + public class VerifyType : ServiceType + { + } + + public class Business + { + /// + /// 获取或设置是否开通微信门店功能。 + /// + [Newtonsoft.Json.JsonProperty("open_store")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("open_store")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool IsOpenStore { get; set; } + + /// + /// 获取或设置是否开通微信扫商品功能。 + /// + [Newtonsoft.Json.JsonProperty("open_scan")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("open_scan")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool IsOpenScan { get; set; } + + /// + /// 获取或设置是否开通微信支付功能。 + /// + [Newtonsoft.Json.JsonProperty("open_pay")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("open_pay")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool IsOpenPay { get; set; } + + /// + /// 获取或设置是否开通微信卡券功能。 + /// + [Newtonsoft.Json.JsonProperty("open_card")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("open_card")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool IsOpenCard { get; set; } + + /// + /// 获取或设置是否开通微信摇一摇功能。 + /// + [Newtonsoft.Json.JsonProperty("open_shake")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("open_shake")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool IsOpenShake { get; set; } + } + + public class MiniProgram + { + public static class Types + { + public class Network + { + /// + /// 获取或设置 Request 合法域名列表。 + /// + [Newtonsoft.Json.JsonProperty("RequestDomain")] + [System.Text.Json.Serialization.JsonPropertyName("RequestDomain")] + public string[] RequestDomainList { get; set; } = default!; + + /// + /// 获取或设置 Socket 合法域名列表。 + /// + [Newtonsoft.Json.JsonProperty("WsRequestDomain")] + [System.Text.Json.Serialization.JsonPropertyName("WsRequestDomain")] + public string[] WebSocketDomainList { get; set; } = default!; + + /// + /// 获取或设置 UploadFile 合法域名列表。 + /// + [Newtonsoft.Json.JsonProperty("UploadDomain")] + [System.Text.Json.Serialization.JsonPropertyName("UploadDomain")] + public string[] UploadDomainList { get; set; } = default!; + + /// + /// 获取或设置 DownloadFile 合法域名列表。 + /// + [Newtonsoft.Json.JsonProperty("DownloadDomain")] + [System.Text.Json.Serialization.JsonPropertyName("DownloadDomain")] + public string[] DownloadDomainList { get; set; } = default!; + + /// + /// 获取或设置 UDP 合法域名列表。 + /// + [Newtonsoft.Json.JsonProperty("UDPDomain")] + [System.Text.Json.Serialization.JsonPropertyName("UDPDomain")] + public string[] UdpDomainList { get; set; } = default!; + + /// + /// 获取或设置业务域名列表。 + /// + [Newtonsoft.Json.JsonProperty("BizDomain")] + [System.Text.Json.Serialization.JsonPropertyName("BizDomain")] + public string[] BusinessDomainList { get; set; } = default!; + } + + public class Category + { + /// + /// 获取或设置一级分类。 + /// + [Newtonsoft.Json.JsonProperty("first")] + [System.Text.Json.Serialization.JsonPropertyName("first")] + public string FirstCategory { get; set; } = default!; + + /// + /// 获取或设置二级分类。 + /// + [Newtonsoft.Json.JsonProperty("second")] + [System.Text.Json.Serialization.JsonPropertyName("second")] + public string SecondCategory { get; set; } = default!; + } + } + + /// + /// 获取或设置网络配置信息。 + /// + [Newtonsoft.Json.JsonProperty("network")] + [System.Text.Json.Serialization.JsonPropertyName("network")] + public Types.Network Network { get; set; } = default!; + + /// + /// 获取或设置分类列表。 + /// + [Newtonsoft.Json.JsonProperty("categories")] + [System.Text.Json.Serialization.JsonPropertyName("categories")] + public Types.Category[] CategoryList { get; set; } = default!; + + /// + /// 获取或设置访问状态。 + /// + [Newtonsoft.Json.JsonProperty("visit_status")] + [System.Text.Json.Serialization.JsonPropertyName("visit_status")] + public int VisitStatus { get; set; } + } + } + + /// + /// 获取或设置原始 ID。 + /// + [Newtonsoft.Json.JsonProperty("user_name")] + [System.Text.Json.Serialization.JsonPropertyName("user_name")] + public string Username { get; set; } = default!; + + /// + /// 获取或设置名称。 + /// + [Newtonsoft.Json.JsonProperty("nick_name")] + [System.Text.Json.Serialization.JsonPropertyName("nick_name")] + public string Nickname { get; set; } = default!; + + /// + /// 获取或设置头像 URL。 + /// + [Newtonsoft.Json.JsonProperty("head_img")] + [System.Text.Json.Serialization.JsonPropertyName("head_img")] + public string HeadImageUrl { get; set; } = default!; + + /// + /// 获取或设置公众号或小程序服务类型信息。 + /// + [Newtonsoft.Json.JsonProperty("service_type_info")] + [System.Text.Json.Serialization.JsonPropertyName("service_type_info")] + public Types.ServiceType ServiceType { get; set; } = default!; + + /// + /// 获取或设置公众号或小程序认证类型信息。 + /// + [Newtonsoft.Json.JsonProperty("verify_type_info")] + [System.Text.Json.Serialization.JsonPropertyName("verify_type_info")] + public Types.VerifyType VerifyType { get; set; } = default!; + + /// + /// 获取或设置主体名称。 + /// + [Newtonsoft.Json.JsonProperty("principal_name")] + [System.Text.Json.Serialization.JsonPropertyName("principal_name")] + public string? PrincipalName { get; set; } + + /// + /// 获取或设置微信号。 + /// + [Newtonsoft.Json.JsonProperty("alias")] + [System.Text.Json.Serialization.JsonPropertyName("alias")] + public string? Alias { get; set; } + + /// + /// 获取或设置账号介绍。 + /// + [Newtonsoft.Json.JsonProperty("signature")] + [System.Text.Json.Serialization.JsonPropertyName("signature")] + public string? Signature { get; set; } + + /// + /// 获取或设置功能信息。 + /// + [Newtonsoft.Json.JsonProperty("business_info")] + [System.Text.Json.Serialization.JsonPropertyName("business_info")] + public Types.Business Business { get; set; } = default!; + + /// + /// 获取或设置二维码图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_url")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_url")] + public string QrcodeUrl { get; set; } = default!; + + /// + /// 获取或设置小程序配置信息。 + /// + [Newtonsoft.Json.JsonProperty("MiniProgramInfo")] + [System.Text.Json.Serialization.JsonPropertyName("MiniProgramInfo")] + public Types.MiniProgram? MiniProgram { get; set; } + } + + public class Authorization + { + public static class Types + { + public class Function : CgibinComponentApiQueryAuthResponse.Types.Authorization.Types.Function + { + } + } + + /// + /// 获取或设置授权方 AppId。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")] + public string AuthorizerAppId { get; set; } = default!; + + /// + /// 获取或设置授权给开发者的权限集列表。 + /// + [Newtonsoft.Json.JsonProperty("func_info")] + [System.Text.Json.Serialization.JsonPropertyName("func_info")] + public Types.Function[] FunctionList { get; set; } = default!; + } + } + + /// + /// 获取或设置授权方信息。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_info")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_info")] + public Types.Authorizer Authorizer { get; set; } = default!; + + /// + /// 获取或设置授权信息。 + /// + [Newtonsoft.Json.JsonProperty("authorization_info")] + [System.Text.Json.Serialization.JsonPropertyName("authorization_info")] + public Types.Authorization Authorization { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerListRequest.cs new file mode 100644 index 00000000..2d900ca8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerListRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_get_authorizer_list 接口的请求。 + /// + public class CgibinComponentApiGetAuthorizerListRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_appid")] + [System.Text.Json.Serialization.JsonPropertyName("component_appid")] + public string? ComponentAppId { get; set; } + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerListResponse.cs new file mode 100644 index 00000000..7194bf19 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerListResponse.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_get_authorizer_list 接口的响应。 + /// + public class CgibinComponentApiGetAuthorizerListResponse : WechatApiResponse + { + public static class Types + { + public class Authorizer + { + /// + /// 获取或设置授权方 AppId。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")] + public string AuthorizerAppId { get; set; } = default!; + + /// + /// 获取或设置授权方 RefreshToken。 + /// + [Newtonsoft.Json.JsonProperty("refresh_token")] + [System.Text.Json.Serialization.JsonPropertyName("refresh_token")] + public string? AuthorizerRefreshToken { get; set; } + + /// + /// 获取或设置授权时间戳。 + /// + [Newtonsoft.Json.JsonProperty("auth_time")] + [System.Text.Json.Serialization.JsonPropertyName("auth_time")] + public long AuthTimestamp { get; set; } + } + } + + /// + /// 获取或设置授权方总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int Total { get; set; } + + /// + /// 获取或设置授权方列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Authorizer[] AuthorizerList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerOptionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerOptionRequest.cs new file mode 100644 index 00000000..a286d6e6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerOptionRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_get_authorizer_option 接口的请求。 + /// + public class CgibinComponentApiGetAuthorizerOptionRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_appid")] + [System.Text.Json.Serialization.JsonPropertyName("component_appid")] + public string? ComponentAppId { get; set; } + + /// + /// 获取或设置授权方 AppId。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")] + public string AuthorizerAppId { get; set; } = string.Empty; + + /// + /// 获取或设置选项名称。 + /// + [Newtonsoft.Json.JsonProperty("option_name")] + [System.Text.Json.Serialization.JsonPropertyName("option_name")] + public string OptionName { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerOptionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerOptionResponse.cs new file mode 100644 index 00000000..12e02988 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerOptionResponse.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_get_authorizer_option 接口的响应。 + /// + public class CgibinComponentApiGetAuthorizerOptionResponse : WechatApiResponse + { + /// + /// 获取或设置授权方 AppId。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")] + public string AuthorizerAppId { get; set; } = default!; + + /// + /// 获取或设置选项名称。 + /// + [Newtonsoft.Json.JsonProperty("option_name")] + [System.Text.Json.Serialization.JsonPropertyName("option_name")] + public string OptionName { get; set; } = default!; + + /// + /// 获取或设置选项值。 + /// + [Newtonsoft.Json.JsonProperty("option_value")] + [System.Text.Json.Serialization.JsonPropertyName("option_value")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedStringConverter))] + public string OptionValue { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthRequest.cs new file mode 100644 index 00000000..2ce2d0a2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_query_auth 接口的请求。 + /// + public class CgibinComponentApiQueryAuthRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_appid")] + [System.Text.Json.Serialization.JsonPropertyName("component_appid")] + public string? ComponentAppId { get; set; } + + /// + /// 获取或设置授权码。 + /// + [Newtonsoft.Json.JsonProperty("authorization_code")] + [System.Text.Json.Serialization.JsonPropertyName("authorization_code")] + public string AuthCode { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthResponse.cs new file mode 100644 index 00000000..a87c7972 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthResponse.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_query_auth 接口的响应。 + /// + public class CgibinComponentApiQueryAuthResponse : WechatApiResponse + { + public static class Types + { + public class Authorization + { + public static class Types + { + public class Function + { + public static class Types + { + public class ScopeCategory + { + /// + /// 获取或设置权限分类 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public int Id { get; set; } + } + } + + /// + /// 获取或设置权限分类分类信息。 + /// + [Newtonsoft.Json.JsonProperty("funcscope_category")] + [System.Text.Json.Serialization.JsonPropertyName("funcscope_category")] + public Types.ScopeCategory ScopeCategory { get; set; } = default!; + } + } + + /// + /// 获取或设置授权方 AppId。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")] + public string AuthorizerAppId { get; set; } = default!; + + /// + /// 获取或设置授权方 AccessToken。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_access_token")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_access_token")] + public string AuthorizerAccessToken { get; set; } = default!; + + /// + /// 获取或设置授权方 RefreshToken。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_refresh_token")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_refresh_token")] + public string? AuthorizerRefreshToken { get; set; } + + /// + /// 获取或设置授权方 AccessToken 有效时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expires_in")] + [System.Text.Json.Serialization.JsonPropertyName("expires_in")] + public int ExpiresIn { get; set; } + + /// + /// 获取或设置授权给开发者的权限集列表。 + /// + [Newtonsoft.Json.JsonProperty("func_info")] + [System.Text.Json.Serialization.JsonPropertyName("func_info")] + public Types.Function[]? FunctionList { get; set; } + } + } + + /// + /// 获取或设置授权信息。 + /// + [Newtonsoft.Json.JsonProperty("authorization_info")] + [System.Text.Json.Serialization.JsonPropertyName("authorization_info")] + public Types.Authorization Authorization { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiSetAuthorizerOptionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiSetAuthorizerOptionRequest.cs new file mode 100644 index 00000000..aafbb039 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiSetAuthorizerOptionRequest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_set_authorizer_option 接口的请求。 + /// + public class CgibinComponentApiSetAuthorizerOptionRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_appid")] + [System.Text.Json.Serialization.JsonPropertyName("component_appid")] + public string? ComponentAppId { get; set; } + + /// + /// 获取或设置授权方 AppId。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")] + public string AuthorizerAppId { get; set; } = string.Empty; + + /// + /// 获取或设置选项名称。 + /// + [Newtonsoft.Json.JsonProperty("option_name")] + [System.Text.Json.Serialization.JsonPropertyName("option_name")] + public string OptionName { get; set; } = string.Empty; + + /// + /// 获取或设置选项值。 + /// + [Newtonsoft.Json.JsonProperty("option_value")] + [System.Text.Json.Serialization.JsonPropertyName("option_value")] + public string OptionValue { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiSetAuthorizerOptionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiSetAuthorizerOptionResponse.cs new file mode 100644 index 00000000..6ce21010 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiSetAuthorizerOptionResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_set_authorizer_option 接口的响应。 + /// + public class CgibinComponentApiSetAuthorizerOptionResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiStartPushTicketRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiStartPushTicketRequest.cs new file mode 100644 index 00000000..35da7fa2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiStartPushTicketRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_start_push_ticket 接口的请求。 + /// + public class CgibinComponentApiStartPushTicketRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_appid")] + [System.Text.Json.Serialization.JsonPropertyName("component_appid")] + public string? ComponentAppId { get; set; } + + /// + /// 获取或设置第三方平台 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("component_secret")] + [System.Text.Json.Serialization.JsonPropertyName("component_secret")] + public string? ComponentSecret { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiStartPushTicketResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiStartPushTicketResponse.cs new file mode 100644 index 00000000..051b6827 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiStartPushTicketResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/component/api_start_push_ticket 接口的响应。 + /// + public class CgibinComponentApiStartPushTicketResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetKfListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetKfListRequest.cs new file mode 100644 index 00000000..1a45ba81 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetKfListRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/customservice/getkflist 接口的请求。 + /// + public class CgibinCustomServiceGetKfListRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetKfListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetKfListResponse.cs new file mode 100644 index 00000000..31ce94e3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetKfListResponse.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/customservice/getkflist 接口的响应。 + /// + public class CgibinCustomServiceGetKfListResponse : WechatApiResponse + { + public static class Types + { + public class Kf + { + /// + /// 获取或设置客服 ID。 + /// + [Newtonsoft.Json.JsonProperty("kf_id")] + [System.Text.Json.Serialization.JsonPropertyName("kf_id")] + public string KfId { get; set; } = default!; + + /// + /// 获取或设置客服账号。 + /// + [Newtonsoft.Json.JsonProperty("kf_account")] + [System.Text.Json.Serialization.JsonPropertyName("kf_account")] + public string KfAccount { get; set; } = default!; + + /// + /// 获取或设置客服昵称。 + /// + [Newtonsoft.Json.JsonProperty("kf_nick")] + [System.Text.Json.Serialization.JsonPropertyName("kf_nick")] + public string Nickname { get; set; } = default!; + + /// + /// 获取或设置客服头像 URL。 + /// + [Newtonsoft.Json.JsonProperty("kf_headimgurl")] + [System.Text.Json.Serialization.JsonPropertyName("kf_headimgurl")] + public string HeadImageUrl { get; set; } = default!; + + /// + /// 获取或设置客服微信号。 + /// + [Newtonsoft.Json.JsonProperty("kf_wx")] + [System.Text.Json.Serialization.JsonPropertyName("kf_wx")] + public string? Wxname { get; set; } + + /// + /// 获取或设置绑定邀请的微信号。 + /// + [Newtonsoft.Json.JsonProperty("invite_wx")] + [System.Text.Json.Serialization.JsonPropertyName("invite_wx")] + public string? InviteWxname { get; set; } + + /// + /// 获取或设置绑定邀请的过期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("invite_expire_time")] + [System.Text.Json.Serialization.JsonPropertyName("invite_expire_time")] + public long? InviteExpireTimestamp { get; set; } + + /// + /// 获取或设置绑定邀请的状态。 + /// + [Newtonsoft.Json.JsonProperty("invite_status")] + [System.Text.Json.Serialization.JsonPropertyName("invite_status")] + public string? InviteStatus { get; set; } + } + } + + /// + /// 获取或设置客服列表。 + /// + [Newtonsoft.Json.JsonProperty("kf_list")] + [System.Text.Json.Serialization.JsonPropertyName("kf_list")] + public Types.Kf[] KfList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetOnlineKfListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetOnlineKfListRequest.cs new file mode 100644 index 00000000..219f62dc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetOnlineKfListRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/customservice/getonlinekflist 接口的请求。 + /// + public class CgibinCustomServiceGetOnlineKfListRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetOnlineKfListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetOnlineKfListResponse.cs new file mode 100644 index 00000000..45b900f7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinCustomService/CgibinCustomServiceGetOnlineKfListResponse.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/customservice/getonlinekflist 接口的响应。 + /// + public class CgibinCustomServiceGetOnlineKfListResponse : WechatApiResponse + { + public static class Types + { + public class Kf + { + /// + /// 获取或设置客服 ID。 + /// + [Newtonsoft.Json.JsonProperty("kf_id")] + [System.Text.Json.Serialization.JsonPropertyName("kf_id")] + public string KfId { get; set; } = default!; + + /// + /// 获取或设置客服账号。 + /// + [Newtonsoft.Json.JsonProperty("kf_account")] + [System.Text.Json.Serialization.JsonPropertyName("kf_account")] + public string KfAccount { get; set; } = default!; + + /// + /// 获取或设置客服在线状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置客服当前正在接待的会话数。 + /// + [Newtonsoft.Json.JsonProperty("accepted_case")] + [System.Text.Json.Serialization.JsonPropertyName("accepted_case")] + public int AcceptedCaseCount { get; set; } + } + } + + /// + /// 获取或设置客服列表。 + /// + [Newtonsoft.Json.JsonProperty("kf_online_list")] + [System.Text.Json.Serialization.JsonPropertyName("kf_online_list")] + public Types.Kf[] KfList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountBindRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountBindRequest.cs new file mode 100644 index 00000000..efbbe7cf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountBindRequest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/account/bind 接口的请求。 + /// + public class CgibinExpressBusinessAccountBindRequest : WechatApiRequest + { + /// + /// 获取或设置执行操作。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Action { get; set; } = string.Empty; + + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("biz_id")] + [System.Text.Json.Serialization.JsonPropertyName("biz_id")] + public string BusinessId { get; set; } = string.Empty; + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + + /// + /// 获取或设置快递公司客户密码。 + /// + [Newtonsoft.Json.JsonProperty("password")] + [System.Text.Json.Serialization.JsonPropertyName("password")] + public string? Password { get; set; } + + /// + /// 获取或设置备注内容。 + /// + [Newtonsoft.Json.JsonProperty("remark_content")] + [System.Text.Json.Serialization.JsonPropertyName("remark_content")] + public string? RemarkContent { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountBindResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountBindResponse.cs new file mode 100644 index 00000000..7ec79bb3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountBindResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/account/bind 接口的响应。 + /// + public class CgibinExpressBusinessAccountBindResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountGetAllRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountGetAllRequest.cs new file mode 100644 index 00000000..dfa31e17 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountGetAllRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/express/business/account/getall 接口的请求。 + /// + public class CgibinExpressBusinessAccountGetAllRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountGetAllResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountGetAllResponse.cs new file mode 100644 index 00000000..eaffab46 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessAccountGetAllResponse.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/express/business/account/getall 接口的响应。 + /// + public class CgibinExpressBusinessAccountGetAllResponse : WechatApiResponse + { + public static class Types + { + public class Account + { + public static class Types + { + public class Service : CgibinExpressBusinessDeliveryGetAllResponse.Types.DeliveryCompany.Types.Service + { + } + } + + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("biz_id")] + [System.Text.Json.Serialization.JsonPropertyName("biz_id")] + public string BusinessId { get; set; } = default!; + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置绑定状态。 + /// + [Newtonsoft.Json.JsonProperty("status_code")] + [System.Text.Json.Serialization.JsonPropertyName("status_code")] + public int StatusCode { get; set; } + + /// + /// 获取或设置账号别名。 + /// + [Newtonsoft.Json.JsonProperty("alias")] + [System.Text.Json.Serialization.JsonPropertyName("alias")] + public string Alias { get; set; } = default!; + + /// + /// 获取或设置账号绑定失败的错误信息。 + /// + [Newtonsoft.Json.JsonProperty("remark_wrong_msg")] + [System.Text.Json.Serialization.JsonPropertyName("remark_wrong_msg")] + public string? RemarkWrongMessage { get; set; } + + /// + /// 获取或设置账号绑定时的备注内容。 + /// + [Newtonsoft.Json.JsonProperty("remark_content")] + [System.Text.Json.Serialization.JsonPropertyName("remark_content")] + public string? RemarkContent { get; set; } + + /// + /// 获取或设置电子面单余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("quota_num")] + [System.Text.Json.Serialization.JsonPropertyName("quota_num")] + public int? QuotaNumber { get; set; } + + /// + /// 获取或设置电子面单余额更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("quota_update_time")] + [System.Text.Json.Serialization.JsonPropertyName("quota_update_time")] + public long? QuotaUpdateTimestamp { get; set; } + + /// + /// 获取或设置该账号支持的服务列表。 + /// + [Newtonsoft.Json.JsonProperty("service_type")] + [System.Text.Json.Serialization.JsonPropertyName("service_type")] + public Types.Service[]? ServiceList { get; set; } + + /// + /// 获取或设置账号更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置账号绑定时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置账号列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Account[] AccountList { get; set; } = default!; + + /// + /// 获取或设置账号数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Count { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessDeliveryGetAllRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessDeliveryGetAllRequest.cs new file mode 100644 index 00000000..6ee392ee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessDeliveryGetAllRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/express/business/delivery/getall 接口的请求。 + /// + public class CgibinExpressBusinessDeliveryGetAllRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessDeliveryGetAllResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessDeliveryGetAllResponse.cs new file mode 100644 index 00000000..f71825b8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessDeliveryGetAllResponse.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/express/business/delivery/getall 接口的响应。 + /// + public class CgibinExpressBusinessDeliveryGetAllResponse : WechatApiResponse + { + public static class Types + { + public class DeliveryCompany + { + public static class Types + { + public class Service + { + /// + /// 获取或设置服务类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_type")] + [System.Text.Json.Serialization.JsonPropertyName("service_type")] + public int ServiceType { get; set; } + + /// + /// 获取或设置服务类型名称。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = default!; + } + } + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置快递公司名称。 + /// + [Newtonsoft.Json.JsonProperty("delivery_name")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_name")] + public string DeliveryName { get; set; } = default!; + + /// + /// 获取或设置是否支持散单。 + /// + [Newtonsoft.Json.JsonProperty("can_use_cash")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("can_use_cash")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? CanUseCash { get; set; } + + /// + /// 获取或设置是否支持查询面单余额。 + /// + [Newtonsoft.Json.JsonProperty("can_get_quota")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("can_get_quota")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? CanUseQuota { get; set; } + + /// + /// 获取或设置散单对应的快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("cash_biz_id")] + [System.Text.Json.Serialization.JsonPropertyName("cash_biz_id")] + public string? CashBusinessId { get; set; } + + /// + /// 获取或设置支持的服务列表。 + /// + [Newtonsoft.Json.JsonProperty("service_type")] + [System.Text.Json.Serialization.JsonPropertyName("service_type")] + public Types.Service[]? ServiceList { get; set; } + } + } + + /// + /// 获取或设置快递公司列表。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.DeliveryCompany[] DeliveryCompanyList { get; set; } = default!; + + /// + /// 获取或设置快递公司数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Count { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderAddRequest.cs new file mode 100644 index 00000000..428f13c8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderAddRequest.cs @@ -0,0 +1,328 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/order/add 接口的请求。 + /// + public class CgibinExpressBusinessOrderAddRequest : WechatApiRequest + { + public static class Types + { + public class Sender + { + /// + /// 获取或设置姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置座机号码。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("tel")] + [System.Text.Json.Serialization.JsonPropertyName("tel")] + public string? TeleNumber { get; set; } + + /// + /// 获取或设置手机号码。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("mobile")] + [System.Text.Json.Serialization.JsonPropertyName("mobile")] + public string? MobileNumber { get; set; } + + /// + /// 获取或设置公司名称。 + /// + [Newtonsoft.Json.JsonProperty("company")] + [System.Text.Json.Serialization.JsonPropertyName("company")] + public string? Company { get; set; } + + /// + /// 获取或设置邮编。 + /// + [Newtonsoft.Json.JsonProperty("post_code")] + [System.Text.Json.Serialization.JsonPropertyName("post_code")] + public string? PostCode { get; set; } + + /// + /// 获取或设置国家。 + /// + [Newtonsoft.Json.JsonProperty("country")] + [System.Text.Json.Serialization.JsonPropertyName("country")] + public string? Country { get; set; } + + /// + /// 获取或设置省份。 + /// + [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("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string Address { get; set; } = string.Empty; + } + + public class Receiver : Sender + { + } + + public class Cargo + { + public static class Types + { + public class GoodsDetail + { + /// + /// 获取或设置商品名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置商品数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Count { get; set; } + } + } + + /// + /// 获取或设置包裹数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Count { get; set; } + + /// + /// 获取或设置包裹长度(单位:厘米)。 + /// + [Newtonsoft.Json.JsonProperty("space_x")] + [System.Text.Json.Serialization.JsonPropertyName("space_x")] + public double? Length { get; set; } + + /// + /// 获取或设置包裹宽度(单位:厘米)。 + /// + [Newtonsoft.Json.JsonProperty("space_y")] + [System.Text.Json.Serialization.JsonPropertyName("space_y")] + public double? Width { get; set; } + + /// + /// 获取或设置包裹高度(单位:厘米)。 + /// + [Newtonsoft.Json.JsonProperty("space_z")] + [System.Text.Json.Serialization.JsonPropertyName("space_z")] + public double? Height { get; set; } + + /// + /// 获取或设置包裹重量(单位:千克)。 + /// + [Newtonsoft.Json.JsonProperty("weight")] + [System.Text.Json.Serialization.JsonPropertyName("weight")] + public double? Weight { get; set; } + + /// + /// 获取或设置商品详情列表。 + /// + [Newtonsoft.Json.JsonProperty("detail_list")] + [System.Text.Json.Serialization.JsonPropertyName("detail_list")] + public Types.GoodsDetail[]? GoodsDetailList { get; set; } + } + + public class Shop + { + /// + /// 获取或设置商家小程序的路径。 + /// + [Newtonsoft.Json.JsonProperty("wxa_path")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_path")] + public string MiniProgramPath { get; set; } = string.Empty; + + /// + /// 获取或设置商品缩略图 URL。 + /// + [Newtonsoft.Json.JsonProperty("img_url")] + [System.Text.Json.Serialization.JsonPropertyName("img_url")] + public string ImageUrl { get; set; } = string.Empty; + + /// + /// 获取或设置商品名称。 + /// + [Newtonsoft.Json.JsonProperty("goods_name")] + [System.Text.Json.Serialization.JsonPropertyName("goods_name")] + public string GoodsName { get; set; } = string.Empty; + + /// + /// 获取或设置商品数量。 + /// + [Newtonsoft.Json.JsonProperty("goods_count")] + [System.Text.Json.Serialization.JsonPropertyName("goods_count")] + public int GoodsCount { get; set; } + } + + public class Insurance + { + /// + /// 获取或设置是否保价。 + /// + [Newtonsoft.Json.JsonProperty("use_insured")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("use_insured")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool UseInsured { get; set; } + + /// + /// 获取或设置保价金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("insured_value")] + [System.Text.Json.Serialization.JsonPropertyName("insured_value")] + public int InsuredValue { get; set; } + } + + public class Service + { + /// + /// 获取或设置服务类型 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_type")] + [System.Text.Json.Serialization.JsonPropertyName("service_type")] + public int ServiceType { get; set; } + + /// + /// 获取或设置服务类型名称。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置订单来源。 + /// + [Newtonsoft.Json.JsonProperty("add_source")] + [System.Text.Json.Serialization.JsonPropertyName("add_source")] + public int Source { get; set; } + + /// + /// 获取或设置 App 或 H5 的微信 AppId。 + /// + [Newtonsoft.Json.JsonProperty("wx_appid")] + [System.Text.Json.Serialization.JsonPropertyName("wx_appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenID { get; set; } + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("biz_id")] + [System.Text.Json.Serialization.JsonPropertyName("biz_id")] + public string BusinessId { get; set; } = string.Empty; + + /// + /// 获取或设置快递备注。 + /// + [Newtonsoft.Json.JsonProperty("custom_remark")] + [System.Text.Json.Serialization.JsonPropertyName("custom_remark")] + public string? Remark { get; set; } + + /// + /// 获取或设置订单标签 ID。 + /// + [Newtonsoft.Json.JsonProperty("tagid")] + [System.Text.Json.Serialization.JsonPropertyName("tagid")] + public int? TagId { get; set; } + + /// + /// 获取或设置发件人信息。 + /// + [Newtonsoft.Json.JsonProperty("sender")] + [System.Text.Json.Serialization.JsonPropertyName("sender")] + public Types.Sender Sender { get; set; } = new Types.Sender(); + + /// + /// 获取或设置收件人信息。 + /// + [Newtonsoft.Json.JsonProperty("receiver")] + [System.Text.Json.Serialization.JsonPropertyName("receiver")] + public Types.Receiver Receiver { get; set; } = new Types.Receiver(); + + /// + /// 获取或设置包裹信息。 + /// + [Newtonsoft.Json.JsonProperty("cargo")] + [System.Text.Json.Serialization.JsonPropertyName("cargo")] + public Types.Cargo Cargo { get; set; } = new Types.Cargo(); + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("shop")] + [System.Text.Json.Serialization.JsonPropertyName("shop")] + public Types.Shop? Shop { get; set; } + + /// + /// 获取或设置保价信息。 + /// + [Newtonsoft.Json.JsonProperty("insured")] + [System.Text.Json.Serialization.JsonPropertyName("insured")] + public Types.Insurance Insurance { get; set; } = new Types.Insurance(); + + /// + /// 获取或设置服务类型信息。 + /// + [Newtonsoft.Json.JsonProperty("service")] + [System.Text.Json.Serialization.JsonPropertyName("service")] + public Types.Service Service { get; set; } = new Types.Service(); + + /// + /// 获取或设置预期上门揽件时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expect_time")] + [System.Text.Json.Serialization.JsonPropertyName("expect_time")] + public long? ExpectedTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderAddResponse.cs new file mode 100644 index 00000000..64e30912 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderAddResponse.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/order/add 接口的响应。 + /// + public class CgibinExpressBusinessOrderAddResponse : WechatApiResponse + { + public static class Types + { + public class WaybillData : CgibinExpressBusinessOrderGetResponse.Types.WaybillData + { + } + } + + /// + /// 获取或设置快递侧错误码。 + /// + [Newtonsoft.Json.JsonProperty("delivery_resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_resultcode")] + public int? ResultCode { get; set; } + + /// + /// 获取或设置快递侧错误信息。 + /// + [Newtonsoft.Json.JsonProperty("delivery_resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_resultmsg")] + public string? ResultMessage { get; set; } + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置运单数据列表。 + /// + [Newtonsoft.Json.JsonProperty("waybill_data")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_data")] + public Types.WaybillData[] WaybillDataList { get; set; } = default!; + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode.GetValueOrDefault() == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderBatchGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderBatchGetRequest.cs new file mode 100644 index 00000000..a46bbeb4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderBatchGetRequest.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/order/batchget 接口的请求。 + /// + public class CgibinExpressBusinessOrderBatchGetRequest : WechatApiRequest + { + public static class Types + { + public class Order + { + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string? WaybillId { get; set; } + } + } + + /// + /// 获取或设置订单列表。 + /// + [Newtonsoft.Json.JsonProperty("order_list")] + [System.Text.Json.Serialization.JsonPropertyName("order_list")] + public IList OrderList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderBatchGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderBatchGetResponse.cs new file mode 100644 index 00000000..9e30d23c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderBatchGetResponse.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/order/batchget 接口的响应。 + /// + public class CgibinExpressBusinessOrderBatchGetResponse : WechatApiResponse + { + public static class Types + { + public class Order + { + public static class Types + { + public class WaybillData : CgibinExpressBusinessOrderGetResponse.Types.WaybillData + { + } + } + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("errcode")] + [System.Text.Json.Serialization.JsonPropertyName("errcode")] + public int ErrorCode { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("errmsg")] + [System.Text.Json.Serialization.JsonPropertyName("errmsg")] + public string ErrorMessage { get; set; } = default!; + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置运单数据列表。 + /// + [Newtonsoft.Json.JsonProperty("waybill_data")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_data")] + public Types.WaybillData[] WaybillDataList { get; set; } = default!; + + /// + /// 获取或设置运单 HTML 内容(已经 Base64 编码)。 + /// + [Newtonsoft.Json.JsonProperty("print_html")] + [System.Text.Json.Serialization.JsonPropertyName("print_html")] + public string? WaybillHtml { get; set; } + + /// + /// 获取或设置运单状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + } + } + + /// + /// 获取或设置订单列表。 + /// + [Newtonsoft.Json.JsonProperty("order_list")] + [System.Text.Json.Serialization.JsonPropertyName("order_list")] + public Types.Order[] OrderList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderCancelRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderCancelRequest.cs new file mode 100644 index 00000000..9f540da9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderCancelRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/order/cancel 接口的请求。 + /// + public class CgibinExpressBusinessOrderCancelRequest : WechatApiRequest + { + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenID { get; set; } + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string? WaybillId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderCancelResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderCancelResponse.cs new file mode 100644 index 00000000..b50ebfd3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderCancelResponse.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/order/cancel 接口的响应。 + /// + public class CgibinExpressBusinessOrderCancelResponse : WechatApiResponse + { + /// + /// 获取或设置快递侧错误码。 + /// + [Newtonsoft.Json.JsonProperty("delivery_resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_resultcode")] + public int? ResultCode { get; set; } + + /// + /// 获取或设置快递侧错误信息。 + /// + [Newtonsoft.Json.JsonProperty("delivery_resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_resultmsg")] + public string? ResultMessage { get; set; } + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode.GetValueOrDefault() == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderGetRequest.cs new file mode 100644 index 00000000..4c6639da --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderGetRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/order/get 接口的请求。 + /// + public class CgibinExpressBusinessOrderGetRequest : WechatApiRequest + { + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenID { get; set; } + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string? WaybillId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderGetResponse.cs new file mode 100644 index 00000000..e0da9e16 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessOrderGetResponse.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/order/get 接口的响应。 + /// + public class CgibinExpressBusinessOrderGetResponse : WechatApiResponse + { + public static class Types + { + public class WaybillData + { + /// + /// 获取或设置运单信息 Key。 + /// + [Newtonsoft.Json.JsonProperty("key")] + [System.Text.Json.Serialization.JsonPropertyName("key")] + public string Key { get; set; } = default!; + + /// + /// 获取或设置运单信息 Value。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [System.Text.Json.Serialization.JsonPropertyName("value")] + public string Value { get; set; } = default!; + } + } + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置运单数据列表。 + /// + [Newtonsoft.Json.JsonProperty("waybill_data")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_data")] + public Types.WaybillData[] WaybillDataList { get; set; } = default!; + + /// + /// 获取或设置运单 HTML 内容(已经 Base64 编码)。 + /// + [Newtonsoft.Json.JsonProperty("print_html")] + [System.Text.Json.Serialization.JsonPropertyName("print_html")] + public string? WaybillHtml { 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/Business/CgibinExpressBusinessPathGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPathGetRequest.cs new file mode 100644 index 00000000..7892246b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPathGetRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/path/get 接口的请求。 + /// + public class CgibinExpressBusinessPathGetRequest : CgibinExpressBusinessOrderGetRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPathGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPathGetResponse.cs new file mode 100644 index 00000000..3508e4d1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPathGetResponse.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/path/get 接口的响应。 + /// + public class CgibinExpressBusinessPathGetResponse : WechatApiResponse + { + public static class Types + { + public class PathItem + { + /// + /// 获取或设置轨迹节点时间戳。 + /// + [Newtonsoft.Json.JsonProperty("action_time")] + [System.Text.Json.Serialization.JsonPropertyName("action_time")] + public long ActionTimestamp { get; set; } + + /// + /// 获取或设置轨迹节点类型。 + /// + [Newtonsoft.Json.JsonProperty("action_type")] + [System.Text.Json.Serialization.JsonPropertyName("action_type")] + public int ActionType { get; set; } + + /// + /// 获取或设置轨迹节点详情。 + /// + [Newtonsoft.Json.JsonProperty("action_msg")] + [System.Text.Json.Serialization.JsonPropertyName("action_msg")] + public string ActionMessage { get; set; } = default!; + } + } + + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenId { get; set; } + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置轨迹节点列表。 + /// + [Newtonsoft.Json.JsonProperty("path_item_list")] + [System.Text.Json.Serialization.JsonPropertyName("path_item_list")] + public Types.PathItem[] PathItemList { get; set; } = default!; + + /// + /// 获取或设置轨迹节点数量。 + /// + [Newtonsoft.Json.JsonProperty("path_item_num")] + [System.Text.Json.Serialization.JsonPropertyName("path_item_num")] + public int PathItemCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterGetAllRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterGetAllRequest.cs new file mode 100644 index 00000000..e67b0410 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterGetAllRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/express/business/printer/getall 接口的请求。 + /// + public class CgibinExpressBusinessPrinterGetAllRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterGetAllResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterGetAllResponse.cs new file mode 100644 index 00000000..355d700c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterGetAllResponse.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/express/business/printer/getall 接口的响应。 + /// + public class CgibinExpressBusinessPrinterGetAllResponse : WechatApiResponse + { + /// + /// 获取或设置打印员用户 OpenId 列表。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string[] PrinterOpenIdList { get; set; } = default!; + + /// + /// 获取或设置打印员面单打印权限列表。 + /// + [Newtonsoft.Json.JsonProperty("tagid_list")] + [System.Text.Json.Serialization.JsonPropertyName("tagid_list")] + public int[] TagIdList { get; set; } = default!; + + /// + /// 获取或设置打印员数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Count { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterUpdateRequest.cs new file mode 100644 index 00000000..e7943c90 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterUpdateRequest.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/printer/update 接口的请求。 + /// + public class CgibinExpressBusinessPrinterUpdateRequest : WechatApiRequest + { + /// + /// 获取或设置执行操作。 + /// + [Newtonsoft.Json.JsonProperty("update_type")] + [System.Text.Json.Serialization.JsonPropertyName("update_type")] + public string Action { get; set; } = string.Empty; + + /// + /// 获取或设置打印员用户 OpenId 列表。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string PrinterOpenId { get; set; } = string.Empty; + + /// + /// 获取或设置打印员面单打印权限列表。 + /// + [Newtonsoft.Json.JsonProperty("tagid_list")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringTypedInt32IListConverter))] + [System.Text.Json.Serialization.JsonPropertyName("tagid_list")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.StringTypedInt32IListConverter))] + public IList? TagIdList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterUpdateResponse.cs new file mode 100644 index 00000000..cb22d85c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessPrinterUpdateResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/printer/update 接口的响应。 + /// + public class CgibinExpressBusinessPrinterUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessQuotaGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessQuotaGetRequest.cs new file mode 100644 index 00000000..cc4270cd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessQuotaGetRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/quota/get 接口的请求。 + /// + public class CgibinExpressBusinessQuotaGetRequest : WechatApiRequest + { + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("biz_id")] + [System.Text.Json.Serialization.JsonPropertyName("biz_id")] + public string BusinessId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessQuotaGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessQuotaGetResponse.cs new file mode 100644 index 00000000..1b13949b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessQuotaGetResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/quota/get 接口的响应。 + /// + public class CgibinExpressBusinessQuotaGetResponse : WechatApiResponse + { + /// + /// 获取或设置电子面单余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("quota_num")] + [System.Text.Json.Serialization.JsonPropertyName("quota_num")] + public int QuotaNumber { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessTestUpdateOrderRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessTestUpdateOrderRequest.cs new file mode 100644 index 00000000..5654f078 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessTestUpdateOrderRequest.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/test_update_order 接口的请求。 + /// + public class CgibinExpressBusinessTestUpdateOrderRequest : WechatApiRequest + { + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("biz_id")] + [System.Text.Json.Serialization.JsonPropertyName("biz_id")] + public string BusinessId { get; set; } = string.Empty; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = string.Empty; + + /// + /// 获取或设置轨迹节点时间戳。 + /// + [Newtonsoft.Json.JsonProperty("action_time")] + [System.Text.Json.Serialization.JsonPropertyName("action_time")] + public long ActionTimestamp { get; set; } + + /// + /// 获取或设置轨迹节点类型。 + /// + [Newtonsoft.Json.JsonProperty("action_type")] + [System.Text.Json.Serialization.JsonPropertyName("action_type")] + public int ActionType { get; set; } + + /// + /// 获取或设置轨迹节点详情。 + /// + [Newtonsoft.Json.JsonProperty("action_msg")] + [System.Text.Json.Serialization.JsonPropertyName("action_msg")] + public string ActionMessage { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessTestUpdateOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessTestUpdateOrderResponse.cs new file mode 100644 index 00000000..ff4da06f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Business/CgibinExpressBusinessTestUpdateOrderResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/business/test_update_order 接口的响应。 + /// + public class CgibinExpressBusinessTestUpdateOrderResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryContactGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryContactGetRequest.cs new file mode 100644 index 00000000..5e065df9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryContactGetRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/delivery/contact/get 接口的请求。 + /// + public class CgibinExpressDeliveryContactGetRequest : WechatApiRequest + { + /// + /// 获取或设置微信订单 Token。 + /// + [Newtonsoft.Json.JsonProperty("token")] + [System.Text.Json.Serialization.JsonPropertyName("token")] + public string Token { get; set; } = string.Empty; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryContactGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryContactGetResponse.cs new file mode 100644 index 00000000..7e8db92f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryContactGetResponse.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/delivery/contact/get 接口的响应。 + /// + public class CgibinExpressDeliveryContactGetResponse : WechatApiResponse + { + public static class Types + { + public class Sender + { + /// + /// 获取或设置姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置座机号码。 + /// + [Newtonsoft.Json.JsonProperty("tel")] + [System.Text.Json.Serialization.JsonPropertyName("tel")] + public string? TeleNumber { get; set; } + + /// + /// 获取或设置手机号码。 + /// + [Newtonsoft.Json.JsonProperty("mobile")] + [System.Text.Json.Serialization.JsonPropertyName("mobile")] + public string? MobileNumber { get; set; } + + /// + /// 获取或设置详细地址。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string Address { get; set; } = default!; + } + + public class Receiver : Sender + { + } + } + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置发件人信息。 + /// + [Newtonsoft.Json.JsonProperty("sender")] + [System.Text.Json.Serialization.JsonPropertyName("sender")] + public Types.Sender Sender { get; set; } = default!; + + /// + /// 获取或设置收件人信息。 + /// + [Newtonsoft.Json.JsonProperty("receiver")] + [System.Text.Json.Serialization.JsonPropertyName("receiver")] + public Types.Receiver Receiver { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryPathUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryPathUpdateRequest.cs new file mode 100644 index 00000000..47f9a761 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryPathUpdateRequest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/delivery/path/update 接口的请求。 + /// + public class CgibinExpressDeliveryPathUpdateRequest : WechatApiRequest + { + /// + /// 获取或设置微信订单 Token。 + /// + [Newtonsoft.Json.JsonProperty("token")] + [System.Text.Json.Serialization.JsonPropertyName("token")] + public string Token { get; set; } = string.Empty; + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = string.Empty; + + /// + /// 获取或设置轨迹节点时间戳。 + /// + [Newtonsoft.Json.JsonProperty("action_time")] + [System.Text.Json.Serialization.JsonPropertyName("action_time")] + public long ActionTimestamp { get; set; } + + /// + /// 获取或设置轨迹节点类型。 + /// + [Newtonsoft.Json.JsonProperty("action_type")] + [System.Text.Json.Serialization.JsonPropertyName("action_type")] + public int ActionType { get; set; } + + /// + /// 获取或设置轨迹节点详情。 + /// + [Newtonsoft.Json.JsonProperty("action_msg")] + [System.Text.Json.Serialization.JsonPropertyName("action_msg")] + public string ActionMessage { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryPathUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryPathUpdateResponse.cs new file mode 100644 index 00000000..6421b4f8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryPathUpdateResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/delivery/path/update 接口的响应。 + /// + public class CgibinExpressDeliveryPathUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryServiceBusinessUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryServiceBusinessUpdateRequest.cs new file mode 100644 index 00000000..34e19401 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryServiceBusinessUpdateRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/delivery/service/business/update 接口的请求。 + /// + public class CgibinExpressDeliveryServiceBusinessUpdateRequest : WechatApiRequest + { + /// + /// 获取或设置商户的小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("shop_app_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_app_id")] + public string ShopAppId { get; set; } = string.Empty; + + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("biz_id")] + [System.Text.Json.Serialization.JsonPropertyName("biz_id")] + public string BusinessId { get; set; } = string.Empty; + + /// + /// 获取或设置审核结果。 + /// + [Newtonsoft.Json.JsonProperty("result_code")] + [System.Text.Json.Serialization.JsonPropertyName("result_code")] + public int ResultCode { get; set; } + + /// + /// 获取或设置审核错误原因。 + /// + [Newtonsoft.Json.JsonProperty("result_msg")] + [System.Text.Json.Serialization.JsonPropertyName("result_msg")] + public string? ResultMessage { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryServiceBusinessUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryServiceBusinessUpdateResponse.cs new file mode 100644 index 00000000..69f83596 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryServiceBusinessUpdateResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/delivery/service/business/update 接口的响应。 + /// + public class CgibinExpressDeliveryServiceBusinessUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryTemplatePreviewRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryTemplatePreviewRequest.cs new file mode 100644 index 00000000..b949132c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryTemplatePreviewRequest.cs @@ -0,0 +1,267 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/delivery/template/preview 接口的请求。 + /// + public class CgibinExpressDeliveryTemplatePreviewRequest : WechatApiRequest + { + public static class Types + { + public class WaybillData + { + /// + /// 获取或设置运单信息 Key。 + /// + [Newtonsoft.Json.JsonProperty("key")] + [System.Text.Json.Serialization.JsonPropertyName("key")] + public string Key { get; set; } = default!; + + /// + /// 获取或设置运单信息 Value。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [System.Text.Json.Serialization.JsonPropertyName("value")] + public string Value { get; set; } = default!; + } + + public class CustomData + { + public static class Types + { + public class Sender : CgibinExpressBusinessOrderAddRequest.Types.Sender + { + } + + public class Receiver : CgibinExpressBusinessOrderAddRequest.Types.Receiver + { + } + + public class Cargo : CgibinExpressBusinessOrderAddRequest.Types.Cargo + { + } + + public class Shop : CgibinExpressBusinessOrderAddRequest.Types.Shop + { + } + + public class Insurance : CgibinExpressBusinessOrderAddRequest.Types.Insurance + { + } + + public class Service : CgibinExpressBusinessOrderAddRequest.Types.Service + { + } + } + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenID { get; set; } + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + + /// + /// 获取或设置快递公司客户编码。 + /// + [Newtonsoft.Json.JsonProperty("biz_id")] + [System.Text.Json.Serialization.JsonPropertyName("biz_id")] + public string BusinessId { get; set; } = string.Empty; + + /// + /// 获取或设置快递备注。 + /// + [Newtonsoft.Json.JsonProperty("custom_remark")] + [System.Text.Json.Serialization.JsonPropertyName("custom_remark")] + public string? Remark { get; set; } + + /// + /// 获取或设置订单标签 ID。 + /// + [Newtonsoft.Json.JsonProperty("tagid")] + [System.Text.Json.Serialization.JsonPropertyName("tagid")] + public int? TagId { get; set; } + + /// + /// 获取或设置发件人信息。 + /// + [Newtonsoft.Json.JsonProperty("sender")] + [System.Text.Json.Serialization.JsonPropertyName("sender")] + public Types.Sender Sender { get; set; } = new Types.Sender(); + + /// + /// 获取或设置收件人信息。 + /// + [Newtonsoft.Json.JsonProperty("receiver")] + [System.Text.Json.Serialization.JsonPropertyName("receiver")] + public Types.Receiver Receiver { get; set; } = new Types.Receiver(); + + /// + /// 获取或设置包裹信息。 + /// + [Newtonsoft.Json.JsonProperty("cargo")] + [System.Text.Json.Serialization.JsonPropertyName("cargo")] + public Types.Cargo Cargo { get; set; } = new Types.Cargo(); + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("shop")] + [System.Text.Json.Serialization.JsonPropertyName("shop")] + public Types.Shop? Shop { get; set; } + + /// + /// 获取或设置保价信息。 + /// + [Newtonsoft.Json.JsonProperty("insured")] + [System.Text.Json.Serialization.JsonPropertyName("insured")] + public Types.Insurance Insurance { get; set; } = new Types.Insurance(); + + /// + /// 获取或设置服务类型信息。 + /// + [Newtonsoft.Json.JsonProperty("service")] + [System.Text.Json.Serialization.JsonPropertyName("service")] + public Types.Service Service { get; set; } = new Types.Service(); + } + } + + public static class Converters + { + internal class NewtonsoftJsonWaybillDataListConverter : Newtonsoft.Json.JsonConverter?> + { + public override bool CanRead + { + get { return true; } + } + + public override bool CanWrite + { + get { return true; } + } + + public override IList? ReadJson(Newtonsoft.Json.JsonReader reader, Type objectType, IList? existingValue, bool hasExistingValue, Newtonsoft.Json.JsonSerializer serializer) + { + if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) + { + return existingValue; + } + else if (reader.TokenType == Newtonsoft.Json.JsonToken.String) + { + string? value = serializer.Deserialize(reader); + if (value == null) + return existingValue; + + IList list = new List(); + string[] sources = value.TrimStart('#').TrimEnd('#').Split(new string[] { "##" }, StringSplitOptions.None); + for (int i = 0; i < sources.Length; i += 2) + { + list.Add(new Types.WaybillData() + { + Key = sources[i], + Value = sources.Length > i ? sources[i + 1] : string.Empty + }); + } + return list; + } + + throw new Newtonsoft.Json.JsonReaderException(); + } + + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, IList? value, Newtonsoft.Json.JsonSerializer serializer) + { + if (value != null) + writer.WriteValue("##" + string.Join("##", value.SelectMany(e => new string[] { e.Key, e.Value }).Select(e => e.Replace("#", string.Empty))) + "##"); + else + writer.WriteNull(); + } + } + + internal class SystemTextJsonWaybillDataListConverter : System.Text.Json.Serialization.JsonConverter?> + { + public override IList? Read(ref System.Text.Json.Utf8JsonReader reader, Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.TokenType == System.Text.Json.JsonTokenType.Null) + { + return null; + } + else if (reader.TokenType == System.Text.Json.JsonTokenType.String) + { + string? value = reader.GetString(); + if (value == null) + return null; + + IList list = new List(); + string[] sources = value.TrimStart('#').TrimEnd('#').Split(new string[] { "##" }, StringSplitOptions.None); + for (int i = 0; i < sources.Length; i += 2) + { + list.Add(new Types.WaybillData() + { + Key = sources[i], + Value = sources.Length > i ? sources[i + 1] : string.Empty + }); + } + return list; + } + + throw new System.Text.Json.JsonException(); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, IList? value, System.Text.Json.JsonSerializerOptions options) + { + if (value != null) + writer.WriteStringValue("##" + string.Join("##", value.SelectMany(e => new string[] { e.Key, e.Value }).Select(e => e.Replace("#", string.Empty))) + "##"); + else + writer.WriteNullValue(); + } + } + } + + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = string.Empty; + + /// + /// 获取或设置面单模板 HTML 内容(需经 Base64 编码)。 + /// + [Newtonsoft.Json.JsonProperty("waybill_template")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_template")] + public string WaybillTemplateHtml { get; set; } = string.Empty; + + /// + /// 获取或设置面单数据列表。 + /// + [Newtonsoft.Json.JsonProperty("waybill_data")] + [Newtonsoft.Json.JsonConverter(typeof(Converters.NewtonsoftJsonWaybillDataListConverter))] + [System.Text.Json.Serialization.JsonPropertyName("waybill_data")] + [System.Text.Json.Serialization.JsonConverter(typeof(Converters.SystemTextJsonWaybillDataListConverter))] + public IList WaybillDataList { get; set; } = new List(); + + /// + /// 获取或设置商户下单数据。 + /// + [Newtonsoft.Json.JsonProperty("custom")] + [System.Text.Json.Serialization.JsonPropertyName("custom")] + public Types.CustomData CustomData { get; set; } = new Types.CustomData(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryTemplatePreviewResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryTemplatePreviewResponse.cs new file mode 100644 index 00000000..bdd0ff79 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/Delivery/CgibinExpressDeliveryTemplatePreviewResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/delivery/template/preview 接口的响应。 + /// + public class CgibinExpressDeliveryTemplatePreviewResponse : WechatApiResponse + { + /// + /// 获取或设置运单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置渲染后的面单 HTML 内容(已经 Base64 编码)。 + /// + [Newtonsoft.Json.JsonProperty("rendered_waybill_template")] + [System.Text.Json.Serialization.JsonPropertyName("rendered_waybill_template")] + public string RenderedWaybillTemplateHtml { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/Abstractions/CgibinExpressLocalBusinessRequestBase.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/Abstractions/CgibinExpressLocalBusinessRequestBase.cs new file mode 100644 index 00000000..1ce43a40 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/Abstractions/CgibinExpressLocalBusinessRequestBase.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + public abstract class CgibinExpressLocalBusinessRequestBase : WechatApiRequest + { + /// + /// 获取或设置商家 ID。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string? ShopId { get; set; } + + /// + /// 获取或设置商户订单号。 + /// + [Newtonsoft.Json.JsonProperty("shop_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("shop_order_id")] + public string ShopOrderId { get; set; } = string.Empty; + + /// + /// 获取或设置校验串。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonProperty("delivery_sign")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_sign")] + public string? DeliverySignature { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessDeliveryGetAllRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessDeliveryGetAllRequest.cs new file mode 100644 index 00000000..631a920c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessDeliveryGetAllRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/delivery/getall 接口的请求。 + /// + public class CgibinExpressLocalBusinessDeliveryGetAllRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessDeliveryGetAllResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessDeliveryGetAllResponse.cs new file mode 100644 index 00000000..cd00703d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessDeliveryGetAllResponse.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/delivery/getall 接口的响应。 + /// + public class CgibinExpressLocalBusinessDeliveryGetAllResponse : WechatApiResponse + { + public static class Types + { + public class DeliveryCompany + { + /// + /// 获取或设置配送公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置配送公司名称。 + /// + [Newtonsoft.Json.JsonProperty("delivery_name")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_name")] + public string DeliveryName { get; set; } = default!; + } + } + + /// + /// 获取或设置运力返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("resultcode")] + public int ResultCode { get; set; } + + /// + /// 获取或设置运力返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("resultmsg")] + public string ResultMessage { get; set; } = default!; + + /// + /// 获取或设置配送公司列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.DeliveryCompany[] DeliveryCompanyList { get; set; } = default!; + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOpenRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOpenRequest.cs new file mode 100644 index 00000000..f62aa39a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOpenRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/open 接口的请求。 + /// + public class CgibinExpressLocalBusinessOpenRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOpenResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOpenResponse.cs new file mode 100644 index 00000000..856aef3a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOpenResponse.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/open 接口的响应。 + /// + public class CgibinExpressLocalBusinessOpenResponse : WechatApiResponse + { + /// + /// 获取或设置运力返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("resultcode")] + public int ResultCode { get; set; } + + /// + /// 获取或设置运力返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("resultmsg")] + public string ResultMessage { get; set; } = default!; + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddRequest.cs new file mode 100644 index 00000000..233dd649 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/add 接口的请求。 + /// + public class CgibinExpressLocalBusinessOrderAddRequest : CgibinExpressLocalBusinessOrderPreAddRequest + { + /// + /// 获取或设置预下单接口返回的参数。 + /// + [Newtonsoft.Json.JsonProperty("delivery_token")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_token")] + public string? DeliveryToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddResponse.cs new file mode 100644 index 00000000..04dcd213 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddResponse.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/add 接口的响应。 + /// + public class CgibinExpressLocalBusinessOrderAddResponse : CgibinExpressLocalBusinessOrderPreAddResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddTipsRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddTipsRequest.cs new file mode 100644 index 00000000..e458c898 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddTipsRequest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/addtips 接口的请求。 + /// + public class CgibinExpressLocalBusinessOrderAddTipsRequest : CgibinExpressLocalBusinessRequestBase + { + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = string.Empty; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = string.Empty; + + /// + /// 获取或设置下单用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置小费金额(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("tips")] + [System.Text.Json.Serialization.JsonPropertyName("tips")] + public double TipValue { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string Remark { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddTipsResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddTipsResponse.cs new file mode 100644 index 00000000..2f1425f1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderAddTipsResponse.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/addtips 接口的响应。 + /// + public class CgibinExpressLocalBusinessOrderAddTipsResponse : WechatApiResponse + { + /// + /// 获取或设置运力返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("resultcode")] + public int ResultCode { get; set; } + + /// + /// 获取或设置运力返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("resultmsg")] + public string ResultMessage { get; set; } = default!; + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderCancelRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderCancelRequest.cs new file mode 100644 index 00000000..18b27316 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderCancelRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/cancel 接口的请求。 + /// + public class CgibinExpressLocalBusinessOrderCancelRequest : CgibinExpressLocalBusinessOrderPreCancelRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderCancelResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderCancelResponse.cs new file mode 100644 index 00000000..58628a5d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderCancelResponse.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/cancel 接口的响应。 + /// + public class CgibinExpressLocalBusinessOrderCancelResponse : CgibinExpressLocalBusinessOrderPreCancelResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderConfirmReturnRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderConfirmReturnRequest.cs new file mode 100644 index 00000000..f0b9a885 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderConfirmReturnRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/confirm_return 接口的请求。 + /// + public class CgibinExpressLocalBusinessOrderConfirmReturnRequest : CgibinExpressLocalBusinessRequestBase + { + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = string.Empty; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = string.Empty; + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string? Remark { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderConfirmReturnResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderConfirmReturnResponse.cs new file mode 100644 index 00000000..2f22bf03 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderConfirmReturnResponse.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/confirm_return 接口的响应。 + /// + public class CgibinExpressLocalBusinessOrderConfirmReturnResponse : WechatApiResponse + { + /// + /// 获取或设置运力返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("resultcode")] + public int ResultCode { get; set; } + + /// + /// 获取或设置运力返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("resultmsg")] + public string ResultMessage { get; set; } = default!; + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderGetRequest.cs new file mode 100644 index 00000000..6b2c4238 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderGetRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/get 接口的请求。 + /// + public class CgibinExpressLocalBusinessOrderGetRequest : CgibinExpressLocalBusinessRequestBase + { + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderGetResponse.cs new file mode 100644 index 00000000..f15c67ca --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderGetResponse.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/get 接口的响应。 + /// + public class CgibinExpressLocalBusinessOrderGetResponse : WechatApiResponse + { + public static class Types + { + public class Shop + { + /// + /// 获取或设置配送公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置审核结果。 + /// + [Newtonsoft.Json.JsonProperty("audit_result")] + [System.Text.Json.Serialization.JsonPropertyName("audit_result")] + public int AuditResult { get; set; } + } + } + + /// + /// 获取或设置运力返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("resultcode")] + public int ResultCode { get; set; } + + /// + /// 获取或设置运力返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("resultmsg")] + public string ResultMessage { get; set; } = default!; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置配送状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + + /// + /// 获取或设置骑手姓名。 + /// + [Newtonsoft.Json.JsonProperty("rider_name")] + [System.Text.Json.Serialization.JsonPropertyName("rider_name")] + public string? RiderName { get; set; } + + /// + /// 获取或设置骑手电话。 + /// + [Newtonsoft.Json.JsonProperty("rider_phone")] + [System.Text.Json.Serialization.JsonPropertyName("rider_phone")] + public string? RiderPhoneNumber { get; set; } + + /// + /// 获取或设置骑手位置经度。 + /// + [Newtonsoft.Json.JsonProperty("rider_lng")] + [System.Text.Json.Serialization.JsonPropertyName("rider_lng")] + public double? RiderLongitude { get; set; } + + /// + /// 获取或设置骑手位置纬度。 + /// + [Newtonsoft.Json.JsonProperty("rider_lat")] + [System.Text.Json.Serialization.JsonPropertyName("rider_lat")] + public double? RiderLatitude { get; set; } + + /// + /// 获取或设置预计剩余送达时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("reach_time")] + [System.Text.Json.Serialization.JsonPropertyName("reach_time")] + public int? ExpectedReachTime { get; set; } + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreAddRequest.cs new file mode 100644 index 00000000..b1d0d76e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreAddRequest.cs @@ -0,0 +1,428 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/pre_add 接口的请求。 + /// + public class CgibinExpressLocalBusinessOrderPreAddRequest : CgibinExpressLocalBusinessRequestBase + { + public static class Types + { + public class Sender + { + /// + /// 获取或设置姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置城市。 + /// + [Newtonsoft.Json.JsonProperty("city")] + [System.Text.Json.Serialization.JsonPropertyName("city")] + public string City { get; set; } = string.Empty; + + /// + /// 获取或设置地址(街道、小区、大厦等)。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string Address { get; set; } = string.Empty; + + /// + /// 获取或设置地址详情(楼号、单元号、层号等)。 + /// + [Newtonsoft.Json.JsonProperty("address_detail")] + [System.Text.Json.Serialization.JsonPropertyName("address_detail")] + public string AddressDetail { get; set; } = string.Empty; + + /// + /// 获取或设置电话或手机号。 + /// + [Newtonsoft.Json.JsonProperty("phone")] + [System.Text.Json.Serialization.JsonPropertyName("phone")] + public string PhoneNumber { 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("coordinate_type")] + [System.Text.Json.Serialization.JsonPropertyName("coordinate_type")] + public int? CoordinateType { get; set; } + } + + public class Receiver : Sender + { + } + + public class Cargo + { + public static class Types + { + public class GoodsDetail + { + public class Types + { + public class Goods + { + /// + /// 获取或设置货物数量。 + /// + [Newtonsoft.Json.JsonProperty("good_count")] + [System.Text.Json.Serialization.JsonPropertyName("good_count")] + public int Count { get; set; } + + /// + /// 获取或设置货物名称。 + /// + [Newtonsoft.Json.JsonProperty("good_name")] + [System.Text.Json.Serialization.JsonPropertyName("good_name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置货物单价(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("good_price")] + [System.Text.Json.Serialization.JsonPropertyName("good_price")] + public double? Price { get; set; } + + /// + /// 获取或设置货物单位。 + /// + [Newtonsoft.Json.JsonProperty("good_unit")] + [System.Text.Json.Serialization.JsonPropertyName("good_unit")] + public string? Unit { get; set; } + } + } + + /// + /// 获取或设置货物列表。 + /// + [Newtonsoft.Json.JsonProperty("goods")] + [System.Text.Json.Serialization.JsonPropertyName("goods")] + public IList GoodsList { get; set; } = new List(); + } + } + + /// + /// 获取或设置货物价格(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("goods_value")] + [System.Text.Json.Serialization.JsonPropertyName("goods_value")] + public double GoodsVaue { get; set; } + + /// + /// 获取或设置货物高度(单位:厘米)。 + /// + [Newtonsoft.Json.JsonProperty("goods_height")] + [System.Text.Json.Serialization.JsonPropertyName("goods_height")] + public double? GoodsHeight { get; set; } + + /// + /// 获取或设置货物长度(单位:厘米)。 + /// + [Newtonsoft.Json.JsonProperty("goods_length")] + [System.Text.Json.Serialization.JsonPropertyName("goods_length")] + public double? GoodsLength { get; set; } + + /// + /// 获取或设置货物宽度(单位:厘米)。 + /// + [Newtonsoft.Json.JsonProperty("goods_width")] + [System.Text.Json.Serialization.JsonPropertyName("goods_width")] + public double? GoodsWidth { get; set; } + + /// + /// 获取或设置货物重量(单位:千克)。 + /// + [Newtonsoft.Json.JsonProperty("goods_weight")] + [System.Text.Json.Serialization.JsonPropertyName("goods_weight")] + public double? GoodsWeight { get; set; } + + /// + /// 获取或设置货物详情信息。 + /// + [Newtonsoft.Json.JsonProperty("goods_detail")] + [System.Text.Json.Serialization.JsonPropertyName("goods_detail")] + public Types.GoodsDetail? GoodsDetail { get; set; } + + /// + /// 获取或设置货物取货信息。 + /// + [Newtonsoft.Json.JsonProperty("goods_pickup_info")] + [System.Text.Json.Serialization.JsonPropertyName("goods_pickup_info")] + public string? GoodsPickupInformation { get; set; } + + /// + /// 获取或设置货物交付信息。 + /// + [Newtonsoft.Json.JsonProperty("goods_delivery_info")] + [System.Text.Json.Serialization.JsonPropertyName("goods_delivery_info")] + public string? GoodsDeliveryInformation { get; set; } + + /// + /// 获取或设置品类一级类目。 + /// + [Newtonsoft.Json.JsonProperty("cargo_first_class")] + [System.Text.Json.Serialization.JsonPropertyName("cargo_first_class")] + public string CargoFirstClass { get; set; } = string.Empty; + + /// + /// 获取或设置品类二级类目。 + /// + [Newtonsoft.Json.JsonProperty("cargo_second_class")] + [System.Text.Json.Serialization.JsonPropertyName("cargo_second_class")] + public string CargoSecondClass { get; set; } = string.Empty; + } + + public class Order + { + /// + /// 获取或设置配送服务代码。 + /// + [Newtonsoft.Json.JsonProperty("delivery_service_code")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_service_code")] + public string? DeliveryServiceCode { get; set; } + + /// + /// 获取或设置订单类型。 + /// + [Newtonsoft.Json.JsonProperty("order_type")] + [System.Text.Json.Serialization.JsonPropertyName("order_type")] + public int OrderType { get; set; } + + /// + /// 获取或设置期望派单时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expected_delivery_time")] + [System.Text.Json.Serialization.JsonPropertyName("expected_delivery_time")] + public long? ExpectedDeliveryTimestamp { get; set; } + + /// + /// 获取或设置期望送达时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expected_finish_time")] + [System.Text.Json.Serialization.JsonPropertyName("expected_finish_time")] + public long? ExpectedFinishTimestamp { get; set; } + + /// + /// 获取或设置期望取件时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expected_pick_time")] + [System.Text.Json.Serialization.JsonPropertyName("expected_pick_time")] + public long? ExpectedPickTimestamp { get; set; } + + /// + /// 获取或设置门店订单流水号。 + /// + [Newtonsoft.Json.JsonProperty("poi_seq")] + [System.Text.Json.Serialization.JsonPropertyName("poi_seq")] + public string? POISequenceNumber { get; set; } + + /// + /// 获取或设置用户下单付款时间戳。 + /// + [Newtonsoft.Json.JsonProperty("order_time")] + [System.Text.Json.Serialization.JsonPropertyName("order_time")] + public long? OrderTimestamp { get; set; } + + /// + /// 获取或设置用户下单付款时间戳。 + /// + [Newtonsoft.Json.JsonProperty("is_insured")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_insured")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsInsured { get; set; } + + /// + /// 获取或设置保价金额(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("declared_value")] + [System.Text.Json.Serialization.JsonPropertyName("declared_value")] + public double? DeclaredValue { get; set; } + + /// + /// 获取或设置小费金额(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("tips")] + [System.Text.Json.Serialization.JsonPropertyName("tips")] + public double? TipValue { get; set; } + + /// + /// 获取或设置是否选择直拿直送。 + /// + [Newtonsoft.Json.JsonProperty("is_direct_delivery")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_direct_delivery")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsDirectDelivery { get; set; } + + /// + /// 获取或设置骑手应付金额(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("cash_on_delivery")] + [System.Text.Json.Serialization.JsonPropertyName("cash_on_delivery")] + public double? CashOnDelivery { get; set; } + + /// + /// 获取或设置骑手应收金额(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("cash_on_pickup")] + [System.Text.Json.Serialization.JsonPropertyName("cash_on_pickup")] + public double? CashOnPickup { get; set; } + + /// + /// 获取或设置物流流向类型。 + /// + [Newtonsoft.Json.JsonProperty("rider_pick_method")] + [System.Text.Json.Serialization.JsonPropertyName("rider_pick_method")] + public int? RiderPickMethod { get; set; } + + /// + /// 获取或设置是否骑手必须输入收货码才能完成订单妥投。 + /// + [Newtonsoft.Json.JsonProperty("is_finish_code_needed")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_finish_code_needed")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsFinishCodeRequired { get; set; } + + /// + /// 获取或设置是否骑手必须输入取货码才能从商家取货。 + /// + [Newtonsoft.Json.JsonProperty("is_pickup_code_needed")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_pickup_code_needed")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsPickupCodeRequired { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("note")] + [System.Text.Json.Serialization.JsonPropertyName("note")] + public string? Remark { get; set; } + } + + public class Shop + { + /// + /// 获取或设置商家小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("wxa_appid")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_appid")] + public string? MiniProgramAppId { get; set; } + + /// + /// 获取或设置商家小程序的路径。 + /// + [Newtonsoft.Json.JsonProperty("wxa_path")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_path")] + public string MiniProgramPath { get; set; } = string.Empty; + + /// + /// 获取或设置商品缩略图 URL。 + /// + [Newtonsoft.Json.JsonProperty("img_url")] + [System.Text.Json.Serialization.JsonPropertyName("img_url")] + public string ImageUrl { get; set; } = string.Empty; + + /// + /// 获取或设置商品名称。 + /// + [Newtonsoft.Json.JsonProperty("goods_name")] + [System.Text.Json.Serialization.JsonPropertyName("goods_name")] + public string GoodsName { get; set; } = string.Empty; + + /// + /// 获取或设置商品数量。 + /// + [Newtonsoft.Json.JsonProperty("goods_count")] + [System.Text.Json.Serialization.JsonPropertyName("goods_count")] + public int GoodsCount { get; set; } + } + } + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = string.Empty; + + /// + /// 获取或设置配送公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + + /// + /// 获取或设置下单用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenID { get; set; } = string.Empty; + + /// + /// 获取或设置发件人信息。 + /// + [Newtonsoft.Json.JsonProperty("sender")] + [System.Text.Json.Serialization.JsonPropertyName("sender")] + public Types.Sender? Sender { get; set; } + + /// + /// 获取或设置收件人信息。 + /// + [Newtonsoft.Json.JsonProperty("receiver")] + [System.Text.Json.Serialization.JsonPropertyName("receiver")] + public Types.Receiver Receiver { get; set; } = new Types.Receiver(); + + /// + /// 获取或设置货物信息。 + /// + [Newtonsoft.Json.JsonProperty("cargo")] + [System.Text.Json.Serialization.JsonPropertyName("cargo")] + public Types.Cargo Cargo { get; set; } = new Types.Cargo(); + + /// + /// 获取或设置订单信息。 + /// + [Newtonsoft.Json.JsonProperty("order_info")] + [System.Text.Json.Serialization.JsonPropertyName("order_info")] + public Types.Order Order { get; set; } = new Types.Order(); + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("shop")] + [System.Text.Json.Serialization.JsonPropertyName("shop")] + public Types.Shop? Shop { get; set; } + + /// + /// 获取或设置子商户 ID。 + /// + [Newtonsoft.Json.JsonProperty("sub_biz_id")] + [System.Text.Json.Serialization.JsonPropertyName("sub_biz_id")] + public string? SubBusinessId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreAddResponse.cs new file mode 100644 index 00000000..b7dc720a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreAddResponse.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/pre_add 接口的响应。 + /// + public class CgibinExpressLocalBusinessOrderPreAddResponse : WechatApiResponse + { + /// + /// 获取或设置运力返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("resultcode")] + public int ResultCode { get; set; } + + /// + /// 获取或设置运力返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("resultmsg")] + public string ResultMessage { get; set; } = default!; + + /// + /// 获取或设置实际运费(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("fee")] + [System.Text.Json.Serialization.JsonPropertyName("fee")] + public double Fee { get; set; } + + /// + /// 获取或设置运费(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("deliverfee")] + [System.Text.Json.Serialization.JsonPropertyName("deliverfee")] + public double DeliverFee { get; set; } + + /// + /// 获取或设置优惠券费用(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("couponfee")] + [System.Text.Json.Serialization.JsonPropertyName("couponfee")] + public double CouponFee { get; set; } + + /// + /// 获取或设置小费(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("tips")] + [System.Text.Json.Serialization.JsonPropertyName("tips")] + public double TipFee { get; set; } + + /// + /// 获取或设置保价费(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("insurancefee")] + [System.Text.Json.Serialization.JsonPropertyName("insurancefee")] + public double InsuranceFee { get; set; } + + /// + /// 获取或设置配送距离(单位:米)。 + /// + [Newtonsoft.Json.JsonProperty("distance")] + [System.Text.Json.Serialization.JsonPropertyName("distance")] + public int Distance { get; set; } + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置配送状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + + /// + /// 获取或设置收货码。 + /// + [Newtonsoft.Json.JsonProperty("finish_code")] + [System.Text.Json.Serialization.JsonPropertyName("finish_code")] + public int FinishCode { get; set; } + + /// + /// 获取或设置取货码。 + /// + [Newtonsoft.Json.JsonProperty("pickup_code")] + [System.Text.Json.Serialization.JsonPropertyName("pickup_code")] + public int PickupCode { get; set; } + + /// + /// 获取或设置预计骑手接单时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("dispatch_duration")] + [System.Text.Json.Serialization.JsonPropertyName("dispatch_duration")] + public int ExpectedDispatchTime { get; set; } + + /// + /// 获取或设置配送公司返回的参数。 + /// + [Newtonsoft.Json.JsonProperty("delivery_token")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_token")] + public string? DeliveryToken { get; set; } + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreCancelRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreCancelRequest.cs new file mode 100644 index 00000000..7ff1119f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreCancelRequest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/precancel 接口的请求。 + /// + public class CgibinExpressLocalBusinessOrderPreCancelRequest : CgibinExpressLocalBusinessRequestBase + { + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string ShopNumber { get; set; } = string.Empty; + + /// + /// 获取或设置配送公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string? WaybillId { 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/LocalBusiness/CgibinExpressLocalBusinessOrderPreCancelResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreCancelResponse.cs new file mode 100644 index 00000000..a594618e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderPreCancelResponse.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/precancel 接口的响应。 + /// + public class CgibinExpressLocalBusinessOrderPreCancelResponse : WechatApiResponse + { + /// + /// 获取或设置运力返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("resultcode")] + public int ResultCode { get; set; } + + /// + /// 获取或设置运力返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("resultmsg")] + public string ResultMessage { get; set; } = default!; + + /// + /// 获取或设置扣除的违约金(单位:元)。 + /// + [Newtonsoft.Json.JsonProperty("deduct_fee")] + [System.Text.Json.Serialization.JsonPropertyName("deduct_fee")] + public double DeductFee { get; set; } + + /// + /// 获取或设置说明。 + /// + [Newtonsoft.Json.JsonProperty("desc")] + [System.Text.Json.Serialization.JsonPropertyName("desc")] + public string Description { get; set; } = default!; + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderReAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderReAddRequest.cs new file mode 100644 index 00000000..613873e4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderReAddRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/readd 接口的请求。 + /// + public class CgibinExpressLocalBusinessOrderReAddRequest : CgibinExpressLocalBusinessOrderPreAddRequest + { + /// + /// 获取或设置预下单接口返回的参数。 + /// + [Newtonsoft.Json.JsonProperty("delivery_token")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_token")] + public string? DeliveryToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderReAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderReAddResponse.cs new file mode 100644 index 00000000..1db33ea2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessOrderReAddResponse.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/order/readd 接口的响应。 + /// + public class CgibinExpressLocalBusinessOrderReAddResponse : CgibinExpressLocalBusinessOrderPreAddResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessRealMockUpdateOrderRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessRealMockUpdateOrderRequest.cs new file mode 100644 index 00000000..1b84b052 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessRealMockUpdateOrderRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/realmock_update_order 接口的请求。 + /// + public class CgibinExpressLocalBusinessRealMockUpdateOrderRequest : CgibinExpressLocalBusinessTestUpdateOrderRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessRealMockUpdateOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessRealMockUpdateOrderResponse.cs new file mode 100644 index 00000000..86efd793 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessRealMockUpdateOrderResponse.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/realmock_update_order 接口的响应。 + /// + public class CgibinExpressLocalBusinessRealMockUpdateOrderResponse : CgibinExpressLocalBusinessTestUpdateOrderResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopAddRequest.cs new file mode 100644 index 00000000..84d54950 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopAddRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/shop/add 接口的请求。 + /// + public class CgibinExpressLocalBusinessShopAddRequest : WechatApiRequest + { + /// + /// 获取或设置配送公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopAddResponse.cs new file mode 100644 index 00000000..f80997f8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopAddResponse.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/shop/add 接口的响应。 + /// + public class CgibinExpressLocalBusinessShopAddResponse : WechatApiResponse + { + /// + /// 获取或设置运力返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("resultcode")] + public int ResultCode { get; set; } + + /// + /// 获取或设置运力返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("resultmsg")] + public string ResultMessage { get; set; } = default!; + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopGetRequest.cs new file mode 100644 index 00000000..0431374f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopGetRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/shop/get 接口的请求。 + /// + public class CgibinExpressLocalBusinessShopGetRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopGetResponse.cs new file mode 100644 index 00000000..92669231 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessShopGetResponse.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/shop/get 接口的响应。 + /// + public class CgibinExpressLocalBusinessShopGetResponse : WechatApiResponse + { + public static class Types + { + public class Shop + { + /// + /// 获取或设置配送公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置商家 ID。 + /// + [Newtonsoft.Json.JsonProperty("shopid")] + [System.Text.Json.Serialization.JsonPropertyName("shopid")] + public string ShopId { get; set; } = default!; + + /// + /// 获取或设置审核结果。 + /// + [Newtonsoft.Json.JsonProperty("audit_result")] + [System.Text.Json.Serialization.JsonPropertyName("audit_result")] + public int AuditResult { get; set; } + } + } + + /// + /// 获取或设置运力返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("resultcode")] + public int ResultCode { get; set; } + + /// + /// 获取或设置运力返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("resultmsg")] + public string ResultMessage { get; set; } = default!; + + /// + /// 获取或设置绑定的商家签约账号列表。 + /// + [Newtonsoft.Json.JsonProperty("shop_list")] + [System.Text.Json.Serialization.JsonPropertyName("shop_list")] + public Types.Shop[] ShopList { get; set; } = default!; + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessTestUpdateOrderRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessTestUpdateOrderRequest.cs new file mode 100644 index 00000000..5862a774 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessTestUpdateOrderRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/test_update_order 接口的请求。 + /// + public class CgibinExpressLocalBusinessTestUpdateOrderRequest : CgibinExpressLocalBusinessRequestBase + { + /// + /// 获取或设置配送状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + + /// + /// 获取或设置状态变更时间戳。 + /// + [Newtonsoft.Json.JsonProperty("action_time")] + [System.Text.Json.Serialization.JsonPropertyName("action_time")] + public long ActionTimestamp { get; set; } + + /// + /// 获取或设置附加信息。 + /// + [Newtonsoft.Json.JsonProperty("action_msg")] + [System.Text.Json.Serialization.JsonPropertyName("action_msg")] + public string? ActionMessage { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessTestUpdateOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessTestUpdateOrderResponse.cs new file mode 100644 index 00000000..883c4c35 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessTestUpdateOrderResponse.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/test_update_order 接口的响应。 + /// + public class CgibinExpressLocalBusinessTestUpdateOrderResponse : WechatApiResponse + { + /// + /// 获取或设置运力返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("resultcode")] + [System.Text.Json.Serialization.JsonPropertyName("resultcode")] + public int ResultCode { get; set; } + + /// + /// 获取或设置运力返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("resultmsg")] + [System.Text.Json.Serialization.JsonPropertyName("resultmsg")] + public string ResultMessage { get; set; } = default!; + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessUpdateOrderRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessUpdateOrderRequest.cs new file mode 100644 index 00000000..14b9693b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessUpdateOrderRequest.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/update_order 接口的请求。 + /// + public class CgibinExpressLocalBusinessUpdateOrderRequest : CgibinExpressLocalBusinessRealMockUpdateOrderRequest + { + public static class Types + { + public class Agent + { + /// + /// 获取或设置骑手姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置骑手电话。 + /// + [Newtonsoft.Json.JsonProperty("phone")] + [System.Text.Json.Serialization.JsonPropertyName("phone")] + public string PhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置电话是否加密。 + /// + [Newtonsoft.Json.JsonProperty("is_phone_encrypted")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_phone_encrypted")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsPhoneEncrypted { get; set; } + } + } + + /// + /// 获取或设置微信订单 Token。 + /// + [Newtonsoft.Json.JsonProperty("wx_token")] + [System.Text.Json.Serialization.JsonPropertyName("wx_token")] + public string Token { get; set; } = string.Empty; + + /// + /// 获取或设置商家门店编号。 + /// + [Newtonsoft.Json.JsonProperty("shop_no")] + [System.Text.Json.Serialization.JsonPropertyName("shop_no")] + public string? ShopNumber { get; set; } + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = string.Empty; + + /// + /// 获取或设置配送公司小程序跳转路径。 + /// + [Newtonsoft.Json.JsonProperty("wxa_path")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_path")] + public string MiniProgramPagePath { get; set; } = string.Empty; + + /// + /// 获取或设置骑手信息。 + /// + [Newtonsoft.Json.JsonProperty("agent")] + [System.Text.Json.Serialization.JsonPropertyName("agent")] + public Types.Agent? Agent { get; set; } + + /// + /// 获取或设置预计送达时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expected_delivery_time")] + [System.Text.Json.Serialization.JsonPropertyName("expected_delivery_time")] + public long? ExpectedDeliveryTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessUpdateOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessUpdateOrderResponse.cs new file mode 100644 index 00000000..2223d0c5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinExpress/LocalBusiness/CgibinExpressLocalBusinessUpdateOrderResponse.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/express/local/business/update_order 接口的响应。 + /// + public class CgibinExpressLocalBusinessUpdateOrderResponse : CgibinExpressLocalBusinessRealMockUpdateOrderResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && ResultCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideAddGuideAccountRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideAddGuideAccountRequest.cs new file mode 100644 index 00000000..536da28f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideAddGuideAccountRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguideacct 接口的请求。 + /// + public class CgibinGuideAddGuideAccountRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置顾问昵称。 + /// + [Newtonsoft.Json.JsonProperty("guide_nickname")] + [System.Text.Json.Serialization.JsonPropertyName("guide_nickname")] + public string? GuideNickname { get; set; } + + /// + /// 获取或设置顾问头像 URL。 + /// + [Newtonsoft.Json.JsonProperty("guide_headimgurl")] + [System.Text.Json.Serialization.JsonPropertyName("guide_headimgurl")] + public string? GuideHeadImageUrl { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideAddGuideAccountResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideAddGuideAccountResponse.cs new file mode 100644 index 00000000..9851d877 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideAddGuideAccountResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguideacct 接口的响应。 + /// + public class CgibinGuideAddGuideAccountResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideDeleteGuideAccountRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideDeleteGuideAccountRequest.cs new file mode 100644 index 00000000..1b2f9810 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideDeleteGuideAccountRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguideacct 接口的请求。 + /// + public class CgibinGuideDeleteGuideAccountRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideDeleteGuideAccountResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideDeleteGuideAccountResponse.cs new file mode 100644 index 00000000..ac0dac5b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideDeleteGuideAccountResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguideacct 接口的响应。 + /// + public class CgibinGuideDeleteGuideAccountResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideGetGuideAccountRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideGetGuideAccountRequest.cs new file mode 100644 index 00000000..d5201ad3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideGetGuideAccountRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/guide/getguideacct 接口的请求。 + /// + public class CgibinGuideGetGuideAccountRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? GuideOpenId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideGetGuideAccountResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideGetGuideAccountResponse.cs new file mode 100644 index 00000000..5154ed3a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideGetGuideAccountResponse.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/guide/getguideacct 接口的响应。 + /// + public class CgibinGuideGetGuideAccountResponse : WechatApiResponse + { + /// + /// 获取或设置顾问微信号。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置顾问昵称。 + /// + [Newtonsoft.Json.JsonProperty("guide_nickname")] + [System.Text.Json.Serialization.JsonPropertyName("guide_nickname")] + public string GuideNickname { get; set; } = default!; + + /// + /// 获取或设置顾问头像 URL。 + /// + [Newtonsoft.Json.JsonProperty("guide_headimgurl")] + [System.Text.Json.Serialization.JsonPropertyName("guide_headimgurl")] + public string GuideHeadImageUrl { get; set; } = default!; + + /// + /// 获取或设置顾问状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int? Status { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideUpdateGuideAccountRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideUpdateGuideAccountRequest.cs new file mode 100644 index 00000000..d56126fa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideUpdateGuideAccountRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/updateguideacct 接口的请求。 + /// + public class CgibinGuideUpdateGuideAccountRequest : CgibinGuideAddGuideAccountRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideUpdateGuideAccountResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideUpdateGuideAccountResponse.cs new file mode 100644 index 00000000..e72f7e3e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Account/CgibinGuideUpdateGuideAccountResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/updateguideacct 接口的响应。 + /// + public class CgibinGuideUpdateGuideAccountResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerChatRecord/CgibinGuideGetGuideBuyerChatRecordRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerChatRecord/CgibinGuideGetGuideBuyerChatRecordRequest.cs new file mode 100644 index 00000000..023a3691 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerChatRecord/CgibinGuideGetGuideBuyerChatRecordRequest.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerchatrecord 接口的请求。 + /// + public class CgibinGuideGetGuideBuyerChatRecordRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? BuyerOpenId { 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; } + + /// + /// 获取或设置分页页数(从 0 开始)。 + /// + [Newtonsoft.Json.JsonProperty("page")] + [System.Text.Json.Serialization.JsonPropertyName("page")] + public int Page { get; set; } = 0; + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("num")] + [System.Text.Json.Serialization.JsonPropertyName("num")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerChatRecord/CgibinGuideGetGuideBuyerChatRecordResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerChatRecord/CgibinGuideGetGuideBuyerChatRecordResponse.cs new file mode 100644 index 00000000..61ae9643 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerChatRecord/CgibinGuideGetGuideBuyerChatRecordResponse.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerchatrecord 接口的响应。 + /// + public class CgibinGuideGetGuideBuyerChatRecordResponse : WechatApiResponse + { + public static class Types + { + public class ChatRecord + { + /// + /// 获取或设置顾问微信号。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string GuideAccount { get; set; } = default!; + + /// + /// 获取或设置用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置聊天内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = default!; + + /// + /// 获取或设置聊天记录类型。 + /// + [Newtonsoft.Json.JsonProperty("content_type")] + [System.Text.Json.Serialization.JsonPropertyName("content_type")] + public int ContentType { get; set; } + + /// + /// 获取或设置消息指向。 + /// + [Newtonsoft.Json.JsonProperty("direction")] + [System.Text.Json.Serialization.JsonPropertyName("direction")] + public int Direction { get; set; } + + /// + /// 获取或设置聊天记录生成时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置消息记录总数。 + /// + [Newtonsoft.Json.JsonProperty("total_num")] + [System.Text.Json.Serialization.JsonPropertyName("total_num")] + public int Total { get; set; } + + /// + /// 获取或设置消息记录列表。 + /// + [Newtonsoft.Json.JsonProperty("msg_list")] + [System.Text.Json.Serialization.JsonPropertyName("msg_list")] + public Types.ChatRecord[] ChatRecordList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideAddGuideBuyerRelationRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideAddGuideBuyerRelationRequest.cs new file mode 100644 index 00000000..74e65664 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideAddGuideBuyerRelationRequest.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidebuyerrelation 接口的请求。 + /// + public class CgibinGuideAddGuideBuyerRelationRequest : WechatApiRequest + { + public static class Types + { + public class Buyer + { + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置客户微信昵称。 + /// + [Newtonsoft.Json.JsonProperty("buyer_nickname")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_nickname")] + public string? Nickname { get; set; } + } + } + + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? BuyerOpenId { get; set; } + + /// + /// 获取或设置客户微信昵称。 + /// + [Newtonsoft.Json.JsonProperty("buyer_nickname")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_nickname")] + public string? BuyerNickname { get; set; } + + /// + /// 获取或设置客户列表。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("buyer_list")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_list")] + public IList? BuyerList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideAddGuideBuyerRelationResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideAddGuideBuyerRelationResponse.cs new file mode 100644 index 00000000..26d5d4c6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideAddGuideBuyerRelationResponse.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerchatrecord 接口的响应。 + /// + public class CgibinGuideAddGuideBuyerRelationResponse : WechatApiResponse + { + public static class Types + { + public class BuyerResponse + { + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("errcode")] + [System.Text.Json.Serialization.JsonPropertyName("errcode")] + public int ErrorCode { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("errmsg")] + [System.Text.Json.Serialization.JsonPropertyName("errmsg")] + public string ErrorMessage { get; set; } = default!; + + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + } + } + + /// + /// 获取或设置客户绑定结果列表。 + /// + [Newtonsoft.Json.JsonProperty("buyer_resp")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_resp")] + public Types.BuyerResponse[]? BuyerResponseList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideDeleteGuideBuyerRelationRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideDeleteGuideBuyerRelationRequest.cs new file mode 100644 index 00000000..5a04ef69 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideDeleteGuideBuyerRelationRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidebuyerrelation 接口的请求。 + /// + public class CgibinGuideDeleteGuideBuyerRelationRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? BuyerOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId 列表。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("openid_list")] + [System.Text.Json.Serialization.JsonPropertyName("openid_list")] + public IList? BuyerOpenIdList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideDeleteGuideBuyerRelationResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideDeleteGuideBuyerRelationResponse.cs new file mode 100644 index 00000000..80949951 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideDeleteGuideBuyerRelationResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidebuyerrelation 接口的响应。 + /// + public class CgibinGuideDeleteGuideBuyerRelationResponse : WechatApiResponse + { + public static class Types + { + public class BuyerResponse : CgibinGuideAddGuideBuyerRelationResponse.Types.BuyerResponse + { + } + } + + /// + /// 获取或设置客户移除结果列表。 + /// + [Newtonsoft.Json.JsonProperty("buyer_resp")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_resp")] + public Types.BuyerResponse[]? BuyerResponseList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationByBuyerRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationByBuyerRequest.cs new file mode 100644 index 00000000..86913093 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationByBuyerRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerrelationbybuyer 接口的请求。 + /// + public class CgibinGuideGetGuideBuyerRelationByBuyerRequest : WechatApiRequest + { + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string BuyerOpenId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationByBuyerResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationByBuyerResponse.cs new file mode 100644 index 00000000..0690ada6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationByBuyerResponse.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerrelationbybuyer 接口的响应。 + /// + public class CgibinGuideGetGuideBuyerRelationByBuyerResponse : WechatApiResponse + { + /// + /// 获取或设置顾问微信号。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string BuyerOpenId { get; set; } = default!; + + /// + /// 获取或设置客户微信昵称。 + /// + [Newtonsoft.Json.JsonProperty("buyer_nickname")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_nickname")] + public string BuyerNickname { get; set; } = default!; + + /// + /// 获取或设置绑定时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationListRequest.cs new file mode 100644 index 00000000..f339885d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationListRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidebuyerrelation 接口的请求。 + /// + public class CgibinGuideGetGuideBuyerRelationListRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置分页页数(从 0 开始)。 + /// + [Newtonsoft.Json.JsonProperty("page")] + [System.Text.Json.Serialization.JsonPropertyName("page")] + public int Page { get; set; } = 0; + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("num")] + [System.Text.Json.Serialization.JsonPropertyName("num")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationListResponse.cs new file mode 100644 index 00000000..fa9e0e19 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationListResponse.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerrelationlist 接口的响应。 + /// + public class CgibinGuideGetGuideBuyerRelationListResponse : WechatApiResponse + { + public static class Types + { + public class Buyer + { + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置客户微信昵称。 + /// + [Newtonsoft.Json.JsonProperty("buyer_nickname")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_nickname")] + public string Nickname { get; set; } = default!; + + /// + /// 获取或设置绑定时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置客户总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_num")] + [System.Text.Json.Serialization.JsonPropertyName("total_num")] + public int Total { get; set; } + + /// + /// 获取或设置客户账号列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Buyer[]? BuyerList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationRequest.cs new file mode 100644 index 00000000..911bc224 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerrelation 接口的请求。 + /// + public class CgibinGuideGetGuideBuyerRelationRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string BuyerOpenId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationResponse.cs new file mode 100644 index 00000000..dca986e7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideGetGuideBuyerRelationResponse.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerrelation 接口的响应。 + /// + public class CgibinGuideGetGuideBuyerRelationResponse : WechatApiResponse + { + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string BuyerOpenId { get; set; } = default!; + + /// + /// 获取或设置客户微信昵称。 + /// + [Newtonsoft.Json.JsonProperty("buyer_nickname")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_nickname")] + public string BuyerNickname { get; set; } = default!; + + /// + /// 获取或设置绑定时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideRebindGuideAccountForBuyerRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideRebindGuideAccountForBuyerRequest.cs new file mode 100644 index 00000000..198bf0e1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideRebindGuideAccountForBuyerRequest.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/rebindguideacctforbuyer 接口的请求。 + /// + public class CgibinGuideRebindGuideAccountForBuyerRequest : WechatApiRequest + { + /// + /// 获取或设置原顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("old_guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("old_guide_account")] + public string? OldGuideAccount { get; set; } + + /// + /// 获取或设置原顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("old_guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("old_guide_openid")] + public string? OldGuideOpenId { get; set; } + + /// + /// 获取或设置新顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("new_guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("new_guide_account")] + public string? NewGuideAccount { get; set; } + + /// + /// 获取或设置新顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("new_guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("new_guide_openid")] + public string? NewGuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? BuyerOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId 列表。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("openid_list")] + [System.Text.Json.Serialization.JsonPropertyName("openid_list")] + public IList? BuyerOpenIdList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideRebindGuideAccountForBuyerResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideRebindGuideAccountForBuyerResponse.cs new file mode 100644 index 00000000..42ef7717 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideRebindGuideAccountForBuyerResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerchatrecord 接口的响应。 + /// + public class CgibinGuideRebindGuideAccountForBuyerResponse : WechatApiResponse + { + public static class Types + { + public class BuyerResponse : CgibinGuideAddGuideBuyerRelationResponse.Types.BuyerResponse + { + } + } + + /// + /// 获取或设置客户换绑结果列表。 + /// + [Newtonsoft.Json.JsonProperty("buyer_resp")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_resp")] + public Types.BuyerResponse[]? BuyerResponseList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideUpdateGuideBuyerRelationRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideUpdateGuideBuyerRelationRequest.cs new file mode 100644 index 00000000..b6b28db9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideUpdateGuideBuyerRelationRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/updateguidebuyerrelation 接口的请求。 + /// + public class CgibinGuideUpdateGuideBuyerRelationRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string BuyerOpenId { get; set; } = string.Empty; + + /// + /// 获取或设置客户微信昵称。 + /// + [Newtonsoft.Json.JsonProperty("buyer_nickname")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_nickname")] + public string BuyerNickname { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideUpdateGuideBuyerRelationResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideUpdateGuideBuyerRelationResponse.cs new file mode 100644 index 00000000..f3140835 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/BuyerRelation/CgibinGuideUpdateGuideBuyerRelationResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/updateguidebuyerrelation 接口的响应。 + /// + public class CgibinGuideUpdateGuideBuyerRelationResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideAccountConfigRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideAccountConfigRequest.cs new file mode 100644 index 00000000..49be3444 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideAccountConfigRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguideacctconfig 接口的请求。 + /// + public class CgibinGuideGetGuideAccountConfigRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideAccountConfigResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideAccountConfigResponse.cs new file mode 100644 index 00000000..96cceb05 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideAccountConfigResponse.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguideacctconfig 接口的响应。 + /// + public class CgibinGuideGetGuideAccountConfigResponse : WechatApiResponse + { + public static class Types + { + public class BlackKeyword + { + /// + /// 获取或设置敏感词列表。 + /// + [Newtonsoft.Json.JsonProperty("values")] + [System.Text.Json.Serialization.JsonPropertyName("values")] + public IList Values { get; set; } = new List(); + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("updatetime")] + [System.Text.Json.Serialization.JsonPropertyName("updatetime")] + public long UpdateTimestamp { get; set; } + } + + public class AutoReply + { + /// + /// 获取或设置自动回复内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = string.Empty; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("updatetime")] + [System.Text.Json.Serialization.JsonPropertyName("updatetime")] + public long UpdateTimestamp { get; set; } + } + } + + /// + /// 获取或设置敏感词信息。 + /// + [Newtonsoft.Json.JsonProperty("black_keyword")] + [System.Text.Json.Serialization.JsonPropertyName("black_keyword")] + public Types.BlackKeyword? BlackKeyword { get; set; } + + /// + /// 获取或设置离线自动回复信息。 + /// + [Newtonsoft.Json.JsonProperty("guide_auto_reply")] + [System.Text.Json.Serialization.JsonPropertyName("guide_auto_reply")] + public Types.AutoReply? GuideAutoReply { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideConfigRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideConfigRequest.cs new file mode 100644 index 00000000..8141a7ca --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideConfigRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguideconfig 接口的请求。 + /// + public class CgibinGuideGetGuideConfigRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideConfigResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideConfigResponse.cs new file mode 100644 index 00000000..1f0e3c89 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideGetGuideConfigResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguideconfig 接口的响应。 + /// + public class CgibinGuideGetGuideConfigResponse : WechatApiResponse + { + public static class Types + { + public class FastReply + { + /// + /// 获取或设置快捷回复内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("updatetime")] + [System.Text.Json.Serialization.JsonPropertyName("updatetime")] + public long UpdateTimestamp { get; set; } + } + + public class AutoReply + { + /// + /// 获取或设置自动回复类型。 + /// + [Newtonsoft.Json.JsonProperty("msgtype")] + [System.Text.Json.Serialization.JsonPropertyName("msgtype")] + public int MessageType { get; set; } + + /// + /// 获取或设置自动回复内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("updatetime")] + [System.Text.Json.Serialization.JsonPropertyName("updatetime")] + public long UpdateTimestamp { get; set; } + } + } + + /// + /// 获取或设置快捷回复列表。 + /// + [Newtonsoft.Json.JsonProperty("guide_fast_reply_list")] + [System.Text.Json.Serialization.JsonPropertyName("guide_fast_reply_list")] + public Types.FastReply[] GuideFastReplyList { get; set; } = default!; + + /// + /// 获取或设置第一条新客户关注自动回复信息。 + /// + [Newtonsoft.Json.JsonProperty("guide_auto_reply")] + [System.Text.Json.Serialization.JsonPropertyName("guide_auto_reply")] + public Types.AutoReply? GuideAutoReply { get; set; } + + /// + /// 获取或设置第二条新客户关注自动回复信息。 + /// + [Newtonsoft.Json.JsonProperty("guide_auto_reply_plus")] + [System.Text.Json.Serialization.JsonPropertyName("guide_auto_reply_plus")] + public Types.AutoReply? GuideAutoReplyPlus { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideAccountConfigRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideAccountConfigRequest.cs new file mode 100644 index 00000000..80fdcb0d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideAccountConfigRequest.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/setguideacctconfig 接口的请求。 + /// + public class CgibinGuideSetGuideAccountConfigRequest : WechatApiRequest + { + public static class Types + { + public class BlackKeyword + { + /// + /// 获取或设置敏感词列表。 + /// + [Newtonsoft.Json.JsonProperty("values")] + [System.Text.Json.Serialization.JsonPropertyName("values")] + public IList Values { get; set; } = new List(); + } + + public class AutoReply + { + /// + /// 获取或设置自动回复内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("is_delete")] + [System.Text.Json.Serialization.JsonPropertyName("is_delete")] + public bool IsDelete { get; set; } + + /// + /// 获取或设置敏感词信息。 + /// + [Newtonsoft.Json.JsonProperty("black_keyword")] + [System.Text.Json.Serialization.JsonPropertyName("black_keyword")] + public Types.BlackKeyword? BlackKeyword { get; set; } + + /// + /// 获取或设置离线自动回复信息。 + /// + [Newtonsoft.Json.JsonProperty("guide_auto_reply")] + [System.Text.Json.Serialization.JsonPropertyName("guide_auto_reply")] + public Types.AutoReply? GuideAutoReply { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideAccountConfigResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideAccountConfigResponse.cs new file mode 100644 index 00000000..8eb3c3a0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideAccountConfigResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/setguideacctconfig 接口的响应。 + /// + public class CgibinGuideSetGuideAccountConfigResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideConfigRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideConfigRequest.cs new file mode 100644 index 00000000..bc90c687 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideConfigRequest.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/setguideconfig 接口的请求。 + /// + public class CgibinGuideSetGuideConfigRequest : WechatApiRequest + { + public static class Types + { + public class FastReply + { + /// + /// 获取或设置快捷回复内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = string.Empty; + } + + public class AutoReply + { + /// + /// 获取或设置自动回复类型。 + /// + [Newtonsoft.Json.JsonProperty("msgtype")] + [System.Text.Json.Serialization.JsonPropertyName("msgtype")] + public int MessageType { get; set; } + + /// + /// 获取或设置自动回复内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("is_delete")] + [System.Text.Json.Serialization.JsonPropertyName("is_delete")] + public bool IsDelete { get; set; } + + /// + /// 获取或设置快捷回复列表。 + /// + [Newtonsoft.Json.JsonProperty("guide_fast_reply_list")] + [System.Text.Json.Serialization.JsonPropertyName("guide_fast_reply_list")] + public IList? GuideFastReplyList { get; set; } + + /// + /// 获取或设置第一条新客户关注自动回复信息。 + /// + [Newtonsoft.Json.JsonProperty("guide_auto_reply")] + [System.Text.Json.Serialization.JsonPropertyName("guide_auto_reply")] + public Types.AutoReply? GuideAutoReply { get; set; } + + /// + /// 获取或设置第二条新客户关注自动回复信息。 + /// + [Newtonsoft.Json.JsonProperty("guide_auto_reply_plus")] + [System.Text.Json.Serialization.JsonPropertyName("guide_auto_reply_plus")] + public Types.AutoReply? GuideAutoReplyPlus { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideConfigResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideConfigResponse.cs new file mode 100644 index 00000000..1127ad03 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Config/CgibinGuideSetGuideConfigResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/setguideconfig 接口的响应。 + /// + public class CgibinGuideSetGuideConfigResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideAddGuide2GuideGroupRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideAddGuide2GuideGroupRequest.cs new file mode 100644 index 00000000..c7de5daf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideAddGuide2GuideGroupRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguide2guidegroup 接口的请求。 + /// + public class CgibinGuideAddGuide2GuideGroupRequest : WechatApiRequest + { + /// + /// 获取或设置顾问分组 ID。 + /// + [Newtonsoft.Json.JsonProperty("group_id")] + [System.Text.Json.Serialization.JsonPropertyName("group_id")] + public long GroupId { get; set; } + + /// + /// 获取或设置顾问微信号。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string GuideAccount { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideAddGuide2GuideGroupResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideAddGuide2GuideGroupResponse.cs new file mode 100644 index 00000000..428196ba --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideAddGuide2GuideGroupResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguide2guidegroup 接口的响应。 + /// + public class CgibinGuideAddGuide2GuideGroupResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuide2GuideGroupRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuide2GuideGroupRequest.cs new file mode 100644 index 00000000..14ba0db7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuide2GuideGroupRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguide2guidegroup 接口的请求。 + /// + public class CgibinGuideDeleteGuide2GuideGroupRequest : WechatApiRequest + { + /// + /// 获取或设置顾问分组 ID。 + /// + [Newtonsoft.Json.JsonProperty("group_id")] + [System.Text.Json.Serialization.JsonPropertyName("group_id")] + public long GroupId { get; set; } + + /// + /// 获取或设置顾问微信号。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string GuideAccount { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuide2GuideGroupResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuide2GuideGroupResponse.cs new file mode 100644 index 00000000..bc827800 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuide2GuideGroupResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguide2guidegroup 接口的响应。 + /// + public class CgibinGuideDeleteGuide2GuideGroupResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuideGroupRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuideGroupRequest.cs new file mode 100644 index 00000000..74c1b823 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuideGroupRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidegroup 接口的请求。 + /// + public class CgibinGuideDeleteGuideGroupRequest : WechatApiRequest + { + /// + /// 获取或设置顾问分组 ID。 + /// + [Newtonsoft.Json.JsonProperty("group_id")] + [System.Text.Json.Serialization.JsonPropertyName("group_id")] + public long GroupId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuideGroupResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuideGroupResponse.cs new file mode 100644 index 00000000..0a857b38 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideDeleteGuideGroupResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidegroup 接口的响应。 + /// + public class CgibinGuideDeleteGuideGroupResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupByGuideRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupByGuideRequest.cs new file mode 100644 index 00000000..dbe68c1a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupByGuideRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getgroupbyguide 接口的请求。 + /// + public class CgibinGuideGetGroupByGuideRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string GuideAccount { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupByGuideResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupByGuideResponse.cs new file mode 100644 index 00000000..c830c973 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupByGuideResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getgroupbyguide 接口的响应。 + /// + public class CgibinGuideGetGroupByGuideResponse : WechatApiResponse + { + /// + /// 获取或设置顾问分组 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("group_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("group_id_list")] + public long[] GroupIdList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupInfoRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupInfoRequest.cs new file mode 100644 index 00000000..c2ee3ec8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupInfoRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getgroupinfo 接口的请求。 + /// + public class CgibinGuideGetGroupInfoRequest : WechatApiRequest + { + /// + /// 获取或设置顾问分组 ID。 + /// + [Newtonsoft.Json.JsonProperty("group_id")] + [System.Text.Json.Serialization.JsonPropertyName("group_id")] + public long GroupId { get; set; } + + /// + /// 获取或设置分页页数(从 0 开始)。 + /// + [Newtonsoft.Json.JsonProperty("page")] + [System.Text.Json.Serialization.JsonPropertyName("page")] + public int Page { get; set; } = 0; + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("num")] + [System.Text.Json.Serialization.JsonPropertyName("num")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupInfoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupInfoResponse.cs new file mode 100644 index 00000000..e63f4d21 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGroupInfoResponse.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getgroupinfo 接口的响应。 + /// + public class CgibinGuideGetGroupInfoResponse : WechatApiResponse + { + public static class Types + { + public class Guide + { + /// + /// 获取或设置顾问微信号。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置顾问昵称。 + /// + [Newtonsoft.Json.JsonProperty("guide_nickname")] + [System.Text.Json.Serialization.JsonPropertyName("guide_nickname")] + public string GuideNickname { get; set; } = default!; + + /// + /// 获取或设置顾问头像 URL。 + /// + [Newtonsoft.Json.JsonProperty("guide_headimgurl")] + [System.Text.Json.Serialization.JsonPropertyName("guide_headimgurl")] + public string GuideHeadImageUrl { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置组内顾问人员总数。 + /// + [Newtonsoft.Json.JsonProperty("total_num")] + [System.Text.Json.Serialization.JsonPropertyName("total_num")] + public int Total { get; set; } + + /// + /// 获取或设置顾问列表。 + /// + [Newtonsoft.Json.JsonProperty("guide_list")] + [System.Text.Json.Serialization.JsonPropertyName("guide_list")] + public Types.Guide[] GuideList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGuideGroupListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGuideGroupListRequest.cs new file mode 100644 index 00000000..78128ae7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGuideGroupListRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidegrouplist 接口的请求。 + /// + public class CgibinGuideGetGuideGroupListRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGuideGroupListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGuideGroupListResponse.cs new file mode 100644 index 00000000..1b6639a1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideGetGuideGroupListResponse.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidegrouplist 接口的响应。 + /// + public class CgibinGuideGetGuideGroupListResponse : WechatApiResponse + { + public static class Types + { + public class Group + { + /// + /// 获取或设置顾问分组 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public long GroupId { get; set; } + + /// + /// 获取或设置顾问分组名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string GroupName { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + + /// + /// 获取或设置顾问分组列表。 + /// + [Newtonsoft.Json.JsonProperty("group_list")] + [System.Text.Json.Serialization.JsonPropertyName("group_list")] + public Types.Group[] GroupList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideNewGuideGroupRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideNewGuideGroupRequest.cs new file mode 100644 index 00000000..332f49ef --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideNewGuideGroupRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/newguidegroup 接口的请求。 + /// + public class CgibinGuideNewGuideGroupRequest : WechatApiRequest + { + /// + /// 获取或设置顾问分组名称。 + /// + [Newtonsoft.Json.JsonProperty("group_name")] + [System.Text.Json.Serialization.JsonPropertyName("group_name")] + public string GroupName { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideNewGuideGroupResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideNewGuideGroupResponse.cs new file mode 100644 index 00000000..4d1265dd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Group/CgibinGuideNewGuideGroupResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/newguidegroup 接口的响应。 + /// + public class CgibinGuideNewGuideGroupResponse : WechatApiResponse + { + /// + /// 获取或设置顾问分组 ID。 + /// + [Newtonsoft.Json.JsonProperty("group_id")] + [System.Text.Json.Serialization.JsonPropertyName("group_id")] + public long GroupId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideAddGuideMassSendJobRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideAddGuideMassSendJobRequest.cs new file mode 100644 index 00000000..f2697c02 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideAddGuideMassSendJobRequest.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidemassendjob 接口的请求。 + /// + public class CgibinGuideAddGuideMassSendJobRequest : WechatApiRequest + { + public static class Types + { + public class Material + { + /// + /// 获取或设置素材类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置图片素材或小程序卡片素材封面媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string? MediaId { get; set; } + + /// + /// 获取或设置文字素材内容。 + /// + [Newtonsoft.Json.JsonProperty("word")] + [System.Text.Json.Serialization.JsonPropertyName("word")] + public string? Word { get; set; } + + /// + /// 获取或设置小程序卡片素材 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置小程序卡片素材名字。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// 获取或设置小程序卡片素材路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + } + } + + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置群发任务名称。 + /// + [Newtonsoft.Json.JsonProperty("task_name")] + [System.Text.Json.Serialization.JsonPropertyName("task_name")] + public string TaskName { get; set; } = string.Empty; + + /// + /// 获取或设置群发任务备注。 + /// + [Newtonsoft.Json.JsonProperty("task_remark")] + [System.Text.Json.Serialization.JsonPropertyName("task_remark")] + public string? TaskRemark { get; set; } + + /// + /// 获取或设置任务下发时间戳。 + /// + [Newtonsoft.Json.JsonProperty("push_time")] + [System.Text.Json.Serialization.JsonPropertyName("push_time")] + public long PushTimestamp { get; set; } + + /// + /// 获取或设置客户 OpenId 列表。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public IList BuyerOpenIdList { get; set; } = new List(); + + /// + /// 获取或设置素材列表。 + /// + [Newtonsoft.Json.JsonProperty("material")] + [System.Text.Json.Serialization.JsonPropertyName("material")] + public IList MaterialList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideAddGuideMassSendJobResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideAddGuideMassSendJobResponse.cs new file mode 100644 index 00000000..073988cb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideAddGuideMassSendJobResponse.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidemassendjob 接口的响应。 + /// + public class CgibinGuideAddGuideMassSendJobResponse : WechatApiResponse + { + public static class Types + { + public class TaskResult + { + /// + /// 获取或设置群发任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public long TaskId { get; set; } + + /// + /// 获取或设置此任务包括的用户 OpenId 列表。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string[] OpenIdList { get; set; } = default!; + } + } + + /// + /// 获取或设置群发任务结果列表。 + /// + [Newtonsoft.Json.JsonProperty("task_result")] + [System.Text.Json.Serialization.JsonPropertyName("task_result")] + public Types.TaskResult[] TaskResultList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideCancelGuideMassSendJobRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideCancelGuideMassSendJobRequest.cs new file mode 100644 index 00000000..0ef6a605 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideCancelGuideMassSendJobRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/cancelguidemassendjob 接口的请求。 + /// + public class CgibinGuideCancelGuideMassSendJobRequest : WechatApiRequest + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public long TaskId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideCancelGuideMassSendJobResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideCancelGuideMassSendJobResponse.cs new file mode 100644 index 00000000..051632c2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideCancelGuideMassSendJobResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/cancelguidemassendjob 接口的响应。 + /// + public class CgibinGuideCancelGuideMassSendJobResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobListRequest.cs new file mode 100644 index 00000000..da2a67af --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobListRequest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidemassendjoblist 接口的请求。 + /// + public class CgibinGuideGetGuideMassSendJobListRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置任务状态列表。不填默认拉取全部状态的任务。 + /// + [Newtonsoft.Json.JsonProperty("task_status")] + [System.Text.Json.Serialization.JsonPropertyName("task_status")] + public IList? TaskStatusList { get; set; } + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int? Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("limit")] + [System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobListResponse.cs new file mode 100644 index 00000000..b8154743 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobListResponse.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidemassendjoblist 接口的响应。 + /// + public class CgibinGuideGetGuideMassSendJobListResponse : WechatApiResponse + { + public static class Types + { + public class Job : CgibinGuideGetGuideMassSendJobResponse.Types.Job + { + } + } + + /// + /// 获取或设置任务总数。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int Total { get; set; } + + /// + /// 获取或设置群发任务列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Job[] JobList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobRequest.cs new file mode 100644 index 00000000..cea50363 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidemassendjob 接口的请求。 + /// + public class CgibinGuideGetGuideMassSendJobRequest : WechatApiRequest + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public long TaskId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobResponse.cs new file mode 100644 index 00000000..f8125a98 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideGetGuideMassSendJobResponse.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidemassendjob 接口的响应。 + /// + public class CgibinGuideGetGuideMassSendJobResponse : WechatApiResponse + { + public static class Types + { + public class Job + { + public static class Types + { + public class Material + { + /// + /// 获取或设置素材类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置图片素材或小程序卡片素材封面 URL。 + /// + [Newtonsoft.Json.JsonProperty("pic_url")] + [System.Text.Json.Serialization.JsonPropertyName("pic_url")] + public string? PictureUrl { get; set; } + + /// + /// 获取或设置文字素材内容。 + /// + [Newtonsoft.Json.JsonProperty("word")] + [System.Text.Json.Serialization.JsonPropertyName("word")] + public string? Word { get; set; } + + /// + /// 获取或设置小程序卡片素材 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置小程序卡片素材名字。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// 获取或设置小程序卡片素材路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + } + + public class Buyer + { + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置消息发送状态。 + /// + [Newtonsoft.Json.JsonProperty("send_status")] + [System.Text.Json.Serialization.JsonPropertyName("send_status")] + public int SendStatus { get; set; } + } + } + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public long TaskId { get; set; } + + /// + /// 获取或设置任务名称。 + /// + [Newtonsoft.Json.JsonProperty("task_name")] + [System.Text.Json.Serialization.JsonPropertyName("task_name")] + public string TaskName { get; set; } = default!; + + /// + /// 获取或设置任务备注。 + /// + [Newtonsoft.Json.JsonProperty("task_remark")] + [System.Text.Json.Serialization.JsonPropertyName("task_remark")] + public string? TaskRemark { get; set; } + + /// + /// 获取或设置任务状态。 + /// + [Newtonsoft.Json.JsonProperty("task_status")] + [System.Text.Json.Serialization.JsonPropertyName("task_status")] + public int TaskStatus { get; set; } + + /// + /// 获取或设置素材列表。 + /// + [Newtonsoft.Json.JsonProperty("material")] + [System.Text.Json.Serialization.JsonPropertyName("material")] + public Types.Material[] MaterialList { get; set; } = default!; + + /// + /// 获取或设置客户列表。 + /// + [Newtonsoft.Json.JsonProperty("buyer_info")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_info")] + public Types.Buyer[] BuyerList { get; set; } = default!; + + /// + /// 获取或设置任务下发时间戳。 + /// + [Newtonsoft.Json.JsonProperty("push_time")] + [System.Text.Json.Serialization.JsonPropertyName("push_time")] + public long PushTimestamp { get; set; } + + /// + /// 获取或设置任务完成时间戳。 + /// + [Newtonsoft.Json.JsonProperty("finish_time")] + [System.Text.Json.Serialization.JsonPropertyName("finish_time")] + public long FinishTimestamp { get; set; } + + /// + /// 获取或设置任务创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置任务最后修改时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + + /// + /// 获取或设置群发任务信息。 + /// + [Newtonsoft.Json.JsonProperty("job")] + [System.Text.Json.Serialization.JsonPropertyName("job")] + public Types.Job Job { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideUpdateGuideMassSendJobRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideUpdateGuideMassSendJobRequest.cs new file mode 100644 index 00000000..9a93921f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideUpdateGuideMassSendJobRequest.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/updateguidemassendjob 接口的请求。 + /// + public class CgibinGuideUpdateGuideMassSendJobRequest : WechatApiRequest + { + public static class Types + { + public class Material : CgibinGuideAddGuideMassSendJobRequest.Types.Material + { + } + } + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public long TaskId { get; set; } + + /// + /// 获取或设置群发任务名称。 + /// + [Newtonsoft.Json.JsonProperty("task_name")] + [System.Text.Json.Serialization.JsonPropertyName("task_name")] + public string? TaskName { get; set; } + + /// + /// 获取或设置群发任务备注。 + /// + [Newtonsoft.Json.JsonProperty("task_remark")] + [System.Text.Json.Serialization.JsonPropertyName("task_remark")] + public string? TaskRemark { get; set; } + + /// + /// 获取或设置任务下发时间戳。 + /// + [Newtonsoft.Json.JsonProperty("push_time")] + [System.Text.Json.Serialization.JsonPropertyName("push_time")] + public long? PushTimestamp { get; set; } + + /// + /// 获取或设置客户 OpenId 列表。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public IList? BuyerOpenIdList { get; set; } + + /// + /// 获取或设置素材列表。 + /// + [Newtonsoft.Json.JsonProperty("material")] + [System.Text.Json.Serialization.JsonPropertyName("material")] + public IList? MaterialList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideUpdateGuideMassSendJobResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideUpdateGuideMassSendJobResponse.cs new file mode 100644 index 00000000..2c69928c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/MassSendJob/CgibinGuideUpdateGuideMassSendJobResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/updateguidemassendjob 接口的响应。 + /// + public class CgibinGuideUpdateGuideMassSendJobResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideCardMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideCardMaterialRequest.cs new file mode 100644 index 00000000..c4212793 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideCardMaterialRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidecardmaterial 接口的请求。 + /// + public class CgibinGuideDeleteGuideCardMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = string.Empty; + + /// + /// 获取或设置小程序卡片名字。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置小程序路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string Path { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideCardMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideCardMaterialResponse.cs new file mode 100644 index 00000000..d98f69c5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideCardMaterialResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidecardmaterial 接口的响应。 + /// + public class CgibinGuideDeleteGuideCardMaterialResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideImageMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideImageMaterialRequest.cs new file mode 100644 index 00000000..4fd804cb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideImageMaterialRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguideimagematerial 接口的请求。 + /// + public class CgibinGuideDeleteGuideImageMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置图片素材 URL。 + /// + [Newtonsoft.Json.JsonProperty("picurl")] + [System.Text.Json.Serialization.JsonPropertyName("picurl")] + public string PictureUrl { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideImageMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideImageMaterialResponse.cs new file mode 100644 index 00000000..adf93f47 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideImageMaterialResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguideimagematerial 接口的响应。 + /// + public class CgibinGuideDeleteGuideImageMaterialResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideWordMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideWordMaterialRequest.cs new file mode 100644 index 00000000..69c67730 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideWordMaterialRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidewordmaterial 接口的请求。 + /// + public class CgibinGuideDeleteGuideWordMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置文字素材内容。 + /// + [Newtonsoft.Json.JsonProperty("word")] + [System.Text.Json.Serialization.JsonPropertyName("word")] + public string Word { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideWordMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideWordMaterialResponse.cs new file mode 100644 index 00000000..fd0251bf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideDeleteGuideWordMaterialResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidewordmaterial 接口的响应。 + /// + public class CgibinGuideDeleteGuideWordMaterialResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideCardMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideCardMaterialRequest.cs new file mode 100644 index 00000000..cbe6743b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideCardMaterialRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidecardmaterial 接口的请求。 + /// + public class CgibinGuideGetGuideCardMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideCardMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideCardMaterialResponse.cs new file mode 100644 index 00000000..bb82b98d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideCardMaterialResponse.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidecardmaterial 接口的响应。 + /// + public class CgibinGuideGetGuideCardMaterialResponse : WechatApiResponse + { + public static class Types + { + public class CardMaterial + { + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置小程序卡片名字。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置小程序路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string Path { get; set; } = default!; + + /// + /// 获取或设置小程序封面 URL。 + /// + [Newtonsoft.Json.JsonProperty("picurl")] + [System.Text.Json.Serialization.JsonPropertyName("picurl")] + public string PictureUrl { get; set; } = default!; + + /// + /// 获取或设置图片 ID。 + /// + [Newtonsoft.Json.JsonProperty("master_id")] + [System.Text.Json.Serialization.JsonPropertyName("master_id")] + public long? MasterId { get; set; } + + /// + /// 获取或设置图片 ID。 + /// + [Newtonsoft.Json.JsonProperty("slave_id")] + [System.Text.Json.Serialization.JsonPropertyName("slave_id")] + public long? SlaveId { get; set; } + } + } + + /// + /// 获取或设置小程序卡片素材列表。 + /// + [Newtonsoft.Json.JsonProperty("card_list")] + [System.Text.Json.Serialization.JsonPropertyName("card_list")] + public Types.CardMaterial[] CardList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideImageMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideImageMaterialRequest.cs new file mode 100644 index 00000000..b283412a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideImageMaterialRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguideimagematerial 接口的请求。 + /// + public class CgibinGuideGetGuideImageMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("start")] + [System.Text.Json.Serialization.JsonPropertyName("start")] + public int Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("num")] + [System.Text.Json.Serialization.JsonPropertyName("num")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideImageMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideImageMaterialResponse.cs new file mode 100644 index 00000000..3507f3f0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideImageMaterialResponse.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguideimagematerial 接口的响应。 + /// + public class CgibinGuideGetGuideImageMaterialResponse : WechatApiResponse + { + public static class Types + { + public class ImageMaterial + { + /// + /// 获取或设置图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("picurl")] + [System.Text.Json.Serialization.JsonPropertyName("picurl")] + public string PictureUrl { get; set; } = default!; + } + } + + /// + /// 获取或设置图片素材总数。 + /// + [Newtonsoft.Json.JsonProperty("total_num")] + [System.Text.Json.Serialization.JsonPropertyName("total_num")] + public int Total { get; set; } + + /// + /// 获取或设置图片素材列表。 + /// + [Newtonsoft.Json.JsonProperty("model_list")] + [System.Text.Json.Serialization.JsonPropertyName("model_list")] + public Types.ImageMaterial[] ImageList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideWordMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideWordMaterialRequest.cs new file mode 100644 index 00000000..c45aa6dd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideWordMaterialRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidewordmaterial 接口的请求。 + /// + public class CgibinGuideGetGuideWordMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("start")] + [System.Text.Json.Serialization.JsonPropertyName("start")] + public int Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("num")] + [System.Text.Json.Serialization.JsonPropertyName("num")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideWordMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideWordMaterialResponse.cs new file mode 100644 index 00000000..98577299 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideGetGuideWordMaterialResponse.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidewordmaterial 接口的响应。 + /// + public class CgibinGuideGetGuideWordMaterialResponse : WechatApiResponse + { + public static class Types + { + public class WordMaterial + { + /// + /// 获取或设置文字素材内容。 + /// + [Newtonsoft.Json.JsonProperty("word")] + [System.Text.Json.Serialization.JsonPropertyName("word")] + public string Word { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置图片素材总数。 + /// + [Newtonsoft.Json.JsonProperty("total_num")] + [System.Text.Json.Serialization.JsonPropertyName("total_num")] + public int Total { get; set; } + + /// + /// 获取或设置文字素材列表。 + /// + [Newtonsoft.Json.JsonProperty("word_list")] + [System.Text.Json.Serialization.JsonPropertyName("word_list")] + public Types.WordMaterial[] WordList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideCardMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideCardMaterialRequest.cs new file mode 100644 index 00000000..22798648 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideCardMaterialRequest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/setguidecardmaterial 接口的请求。 + /// + public class CgibinGuideSetGuideCardMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = string.Empty; + + /// + /// 获取或设置小程序卡片名字。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置小程序路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string Path { get; set; } = string.Empty; + + /// + /// 获取或设置小程序封面媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideCardMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideCardMaterialResponse.cs new file mode 100644 index 00000000..abb49d5b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideCardMaterialResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/setguidecardmaterial 接口的响应。 + /// + public class CgibinGuideSetGuideCardMaterialResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideImageMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideImageMaterialRequest.cs new file mode 100644 index 00000000..b0e9cd0c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideImageMaterialRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/setguideimagematerial 接口的请求。 + /// + public class CgibinGuideSetGuideImageMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置图片素材媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideImageMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideImageMaterialResponse.cs new file mode 100644 index 00000000..168d6a47 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideImageMaterialResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/setguideimagematerial 接口的响应。 + /// + public class CgibinGuideSetGuideImageMaterialResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideWordMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideWordMaterialRequest.cs new file mode 100644 index 00000000..0b06ade2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideWordMaterialRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/setguidewordmaterial 接口的请求。 + /// + public class CgibinGuideSetGuideWordMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置文字素材内容。 + /// + [Newtonsoft.Json.JsonProperty("word")] + [System.Text.Json.Serialization.JsonPropertyName("word")] + public string Word { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideWordMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideWordMaterialResponse.cs new file mode 100644 index 00000000..40867030 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Material/CgibinGuideSetGuideWordMaterialResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/setguidewordmaterial 接口的响应。 + /// + public class CgibinGuideSetGuideWordMaterialResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Qrcode/CgibinGuideCreateQrcodeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Qrcode/CgibinGuideCreateQrcodeRequest.cs new file mode 100644 index 00000000..fce80bde --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Qrcode/CgibinGuideCreateQrcodeRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/guidecreateqrcode 接口的请求。 + /// + public class CgibinGuideCreateQrcodeRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置二维码额外参数。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_info")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_info")] + public string? QrcodeExt { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Qrcode/CgibinGuideCreateQrcodeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Qrcode/CgibinGuideCreateQrcodeResponse.cs new file mode 100644 index 00000000..b0c7b792 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Qrcode/CgibinGuideCreateQrcodeResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/guidecreateqrcode 接口的响应。 + /// + public class CgibinGuideCreateQrcodeResponse : WechatApiResponse + { + /// + /// 获取或设置二维码 URL。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_url")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_url")] + public string QrcodeUrl { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerDisplayTagRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerDisplayTagRequest.cs new file mode 100644 index 00000000..5ddf15af --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerDisplayTagRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidebuyerdisplaytag 接口的请求。 + /// + public class CgibinGuideAddGuideBuyerDisplayTagRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string BuyerOpenId { get; set; } = string.Empty; + + /// + /// 获取或设置自定义客户标签列表。 + /// + [Newtonsoft.Json.JsonProperty("display_tag_list")] + [System.Text.Json.Serialization.JsonPropertyName("display_tag_list")] + public IList DisplayTagList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerDisplayTagResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerDisplayTagResponse.cs new file mode 100644 index 00000000..fd99f745 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerDisplayTagResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidebuyerdisplaytag 接口的响应。 + /// + public class CgibinGuideAddGuideBuyerDisplayTagResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerTagRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerTagRequest.cs new file mode 100644 index 00000000..06757097 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerTagRequest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidebuyertag 接口的请求。 + /// + public class CgibinGuideAddGuideBuyerTagRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? BuyerOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId 列表。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("openid_list")] + [System.Text.Json.Serialization.JsonPropertyName("openid_list")] + public IList? BuyerOpenIdList { get; set; } + + /// + /// 获取或设置标签的可选值。 + /// + [Newtonsoft.Json.JsonProperty("tag_value")] + [System.Text.Json.Serialization.JsonPropertyName("tag_value")] + public string TagValue { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerTagResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerTagResponse.cs new file mode 100644 index 00000000..b0c72b97 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideBuyerTagResponse.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidebuyertag 接口的响应。 + /// + public class CgibinGuideAddGuideBuyerTagResponse : WechatApiResponse + { + public static class Types + { + public class BuyerResponse + { + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("errcode")] + [System.Text.Json.Serialization.JsonPropertyName("errcode")] + public int ErrorCode { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("errmsg")] + [System.Text.Json.Serialization.JsonPropertyName("errmsg")] + public string ErrorMessage { get; set; } = default!; + + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + } + } + + /// + /// 获取或设置客户添加结果列表。 + /// + [Newtonsoft.Json.JsonProperty("buyer_resp")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_resp")] + public Types.BuyerResponse[]? BuyerResponseList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideTagOptionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideTagOptionRequest.cs new file mode 100644 index 00000000..4e9d36fb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideTagOptionRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidetagoption 接口的请求。 + /// + public class CgibinGuideAddGuideTagOptionRequest : CgibinGuideNewGuideTagOptionRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideTagOptionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideTagOptionResponse.cs new file mode 100644 index 00000000..173e2cc1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideAddGuideTagOptionResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidetagoption 接口的响应。 + /// + public class CgibinGuideAddGuideTagOptionResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideBuyerTagRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideBuyerTagRequest.cs new file mode 100644 index 00000000..c63f04af --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideBuyerTagRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidebuyertag 接口的请求。 + /// + public class CgibinGuideDeleteGuideBuyerTagRequest : CgibinGuideAddGuideBuyerTagRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideBuyerTagResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideBuyerTagResponse.cs new file mode 100644 index 00000000..1580ce10 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideBuyerTagResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/addguidebuyertag 接口的响应。 + /// + public class CgibinGuideDeleteGuideBuyerTagResponse : WechatApiResponse + { + public static class Types + { + public class BuyerResponse : CgibinGuideAddGuideBuyerTagResponse.Types.BuyerResponse + { + } + } + + /// + /// 获取或设置客户处理结果列表。 + /// + [Newtonsoft.Json.JsonProperty("buyer_resp")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_resp")] + public Types.BuyerResponse[]? BuyerResponseList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideTagOptionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideTagOptionRequest.cs new file mode 100644 index 00000000..28894b81 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideTagOptionRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidetagoption 接口的请求。 + /// + public class CgibinGuideDeleteGuideTagOptionRequest : WechatApiRequest + { + /// + /// 获取或设置标签类型名称。 + /// + [Newtonsoft.Json.JsonProperty("tag_name")] + [System.Text.Json.Serialization.JsonPropertyName("tag_name")] + public string TagName { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideTagOptionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideTagOptionResponse.cs new file mode 100644 index 00000000..6336d70a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideDeleteGuideTagOptionResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/delguidetagoption 接口的响应。 + /// + public class CgibinGuideDeleteGuideTagOptionResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerDisplayTagRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerDisplayTagRequest.cs new file mode 100644 index 00000000..0884a14c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerDisplayTagRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerdisplaytag 接口的请求。 + /// + public class CgibinGuideGetGuideBuyerDisplayTagRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string BuyerOpenId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerDisplayTagResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerDisplayTagResponse.cs new file mode 100644 index 00000000..193f6877 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerDisplayTagResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyerdisplaytag 接口的响应。 + /// + public class CgibinGuideGetGuideBuyerDisplayTagResponse : WechatApiResponse + { + /// + /// 获取或设置自定义客户标签列表。 + /// + [Newtonsoft.Json.JsonProperty("display_tag_list")] + [System.Text.Json.Serialization.JsonPropertyName("display_tag_list")] + public string[] DisplayTagList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerTagRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerTagRequest.cs new file mode 100644 index 00000000..67aa8ce4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerTagRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyertag 接口的请求。 + /// + public class CgibinGuideGetGuideBuyerTagRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置客户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string BuyerOpenId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerTagResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerTagResponse.cs new file mode 100644 index 00000000..fd0749bd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideBuyerTagResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidebuyertag 接口的响应。 + /// + public class CgibinGuideGetGuideBuyerTagResponse : WechatApiResponse + { + /// + /// 获取或设置标签可选值列表。 + /// + [Newtonsoft.Json.JsonProperty("tag_values")] + [System.Text.Json.Serialization.JsonPropertyName("tag_values")] + public string[] TagValues { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideTagOptionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideTagOptionRequest.cs new file mode 100644 index 00000000..47ee546a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideTagOptionRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidetagoption 接口的请求。 + /// + public class CgibinGuideGetGuideTagOptionRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideTagOptionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideTagOptionResponse.cs new file mode 100644 index 00000000..cc7cb9fa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideGetGuideTagOptionResponse.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/getguidetagoption 接口的响应。 + /// + public class CgibinGuideGetGuideTagOptionResponse : WechatApiResponse + { + public static class Types + { + public class TagOption + { + /// + /// 获取或设置标签类型名称。 + /// + [Newtonsoft.Json.JsonProperty("tag_name")] + [System.Text.Json.Serialization.JsonPropertyName("tag_name")] + public string TagName { get; set; } = default!; + + /// + /// 获取或设置标签可选值列表。 + /// + [Newtonsoft.Json.JsonProperty("tag_values")] + [System.Text.Json.Serialization.JsonPropertyName("tag_values")] + public string[] TagValues { get; set; } = default!; + } + } + + /// + /// 获取或设置标签类型列表。 + /// + [Newtonsoft.Json.JsonProperty("options")] + [System.Text.Json.Serialization.JsonPropertyName("options")] + public Types.TagOption[] TagOptionList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideNewGuideTagOptionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideNewGuideTagOptionRequest.cs new file mode 100644 index 00000000..c318743b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideNewGuideTagOptionRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/newguidetagoption 接口的请求。 + /// + public class CgibinGuideNewGuideTagOptionRequest : WechatApiRequest + { + /// + /// 获取或设置标签类型名称。 + /// + [Newtonsoft.Json.JsonProperty("tag_name")] + [System.Text.Json.Serialization.JsonPropertyName("tag_name")] + public string TagName { get; set; } = string.Empty; + + /// + /// 获取或设置标签可选值列表。 + /// + [Newtonsoft.Json.JsonProperty("tag_values")] + [System.Text.Json.Serialization.JsonPropertyName("tag_values")] + public IList TagValues { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideNewGuideTagOptionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideNewGuideTagOptionResponse.cs new file mode 100644 index 00000000..90db01ab --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideNewGuideTagOptionResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/newguidetagoption 接口的响应。 + /// + public class CgibinGuideNewGuideTagOptionResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideQueryGuideBuyerByTagRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideQueryGuideBuyerByTagRequest.cs new file mode 100644 index 00000000..e321fed8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideQueryGuideBuyerByTagRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/queryguidebuyerbytag 接口的请求。 + /// + public class CgibinGuideQueryGuideBuyerByTagRequest : WechatApiRequest + { + /// + /// 获取或设置顾问微信号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_account")] + [System.Text.Json.Serialization.JsonPropertyName("guide_account")] + public string? GuideAccount { get; set; } + + /// + /// 获取或设置顾问 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("guide_openid")] + [System.Text.Json.Serialization.JsonPropertyName("guide_openid")] + public string? GuideOpenId { get; set; } + + /// + /// 获取或设置标签可选值列表。 + /// + [Newtonsoft.Json.JsonProperty("tag_values")] + [System.Text.Json.Serialization.JsonPropertyName("tag_values")] + public IList TagValues { get; set; } = new List(); + + /// + /// 获取或设置本月还可主动发消息次数。 + /// + [Newtonsoft.Json.JsonProperty("push_count")] + [System.Text.Json.Serialization.JsonPropertyName("push_count")] + public int? PushCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideQueryGuideBuyerByTagResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideQueryGuideBuyerByTagResponse.cs new file mode 100644 index 00000000..db917103 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinGuide/Tag/CgibinGuideQueryGuideBuyerByTagResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/guide/queryguidebuyerbytag 接口的响应。 + /// + public class CgibinGuideQueryGuideBuyerByTagResponse : WechatApiResponse + { + /// + /// 获取或设置客户 OpenId 列表。 + /// + [Newtonsoft.Json.JsonProperty("openid_list")] + [System.Text.Json.Serialization.JsonPropertyName("openid_list")] + public string[] BuyerOpenIdList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddMaterialRequest.cs new file mode 100644 index 00000000..c556deec --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddMaterialRequest.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/add_material 接口的请求。 + /// + public class CgibinMaterialAddMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置媒体文件类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] FileBytes { get; set; } = new byte[0]; + + /// + /// 获取或设置文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? FileName { get; set; } + + /// + /// 获取或设置文件 Conent-Type。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? FileContentType { get; set; } + + /// + /// 获取或设置视频标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? VideoTitle { get; set; } + + /// + /// 获取或设置视频描述。 + /// + [Newtonsoft.Json.JsonProperty("introduction")] + [System.Text.Json.Serialization.JsonPropertyName("introduction")] + public string? VideoDescription { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddMaterialResponse.cs new file mode 100644 index 00000000..48c7d135 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddMaterialResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/add_material 接口的响应。 + /// + public class CgibinMaterialAddMaterialResponse : WechatApiResponse + { + /// + /// 获取或设置媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = default!; + + /// + /// 获取或设置图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddNewsRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddNewsRequest.cs new file mode 100644 index 00000000..3a158100 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddNewsRequest.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/add_news 接口的请求。 + /// + public class CgibinMaterialAddNewsRequest : WechatApiRequest + { + public static class Types + { + public class Article + { + /// + /// 获取或设置图文消息缩略图媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("thumb_media_id")] + [System.Text.Json.Serialization.JsonPropertyName("thumb_media_id")] + public string ThumbnailMediaId { get; set; } = string.Empty; + + /// + /// 获取或设置图文消息标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置图文消息作者。 + /// + [Newtonsoft.Json.JsonProperty("author")] + [System.Text.Json.Serialization.JsonPropertyName("author")] + public string? Author { get; set; } + + /// + /// 获取或设置图文消息摘要。 + /// + [Newtonsoft.Json.JsonProperty("digest")] + [System.Text.Json.Serialization.JsonPropertyName("digest")] + public string? Digest { get; set; } + + /// + /// 获取或设置图文消息阅读原文 URL。 + /// + [Newtonsoft.Json.JsonProperty("content_source_url")] + [System.Text.Json.Serialization.JsonPropertyName("content_source_url")] + public string? ContentSourceUrl { get; set; } + + /// + /// 获取或设置图文消息页面的内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = string.Empty; + + /// + /// 获取或设置是否显示封面。 + /// + [Newtonsoft.Json.JsonProperty("show_cover_pic")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_cover_pic")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsShowCover { get; set; } + + /// + /// 获取或设置是否打开评论。 + /// + [Newtonsoft.Json.JsonProperty("need_open_comment")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("need_open_comment")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsOpenComment { get; set; } + + /// + /// 获取或设置是否粉丝才可评论。 + /// + [Newtonsoft.Json.JsonProperty("only_fans_can_comment")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("only_fans_can_comment")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsOnlyFansCanComment { get; set; } + } + } + + /// + /// 获取或设置图文消息列表。 + /// + [Newtonsoft.Json.JsonProperty("articles")] + [System.Text.Json.Serialization.JsonPropertyName("articles")] + public IList ArticleList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddNewsResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddNewsResponse.cs new file mode 100644 index 00000000..4be60af0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialAddNewsResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/add_news 接口的响应。 + /// + public class CgibinMaterialAddNewsResponse : WechatApiResponse + { + /// + /// 获取或设置媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialBatchGetMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialBatchGetMaterialRequest.cs new file mode 100644 index 00000000..91c5a9a3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialBatchGetMaterialRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/batchget_material 接口的请求。 + /// + public class CgibinMaterialBatchGetMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置素材类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialBatchGetMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialBatchGetMaterialResponse.cs new file mode 100644 index 00000000..03f293d6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialBatchGetMaterialResponse.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/batchget_material 接口的响应。 + /// + public class CgibinMaterialBatchGetMaterialResponse : WechatApiResponse + { + public static class Types + { + public class Material + { + public static class Types + { + public class Content + { + public static class Types + { + public class Article : CgibinMaterialGetMaterialAsNewsResponse.Types.Article + { + } + } + + /// + /// 获取或设置图文消息列表。 + /// + [Newtonsoft.Json.JsonProperty("news_item")] + [System.Text.Json.Serialization.JsonPropertyName("news_item")] + public Types.Article[]? ArticleList { get; set; } + + /// + /// 获取或设置修改时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = default!; + + /// + /// 获取或设置素材名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// 获取或设置素材 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// 获取或设置图文消息信息。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public Types.Content? Content { get; set; } + + /// + /// 获取或设置修改时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + } + } + + /// + /// 获取或设置素材数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int Total { get; set; } + + /// + /// 获取或设置本次调用获取的素材数量。 + /// + [Newtonsoft.Json.JsonProperty("item_count")] + [System.Text.Json.Serialization.JsonPropertyName("item_count")] + public int Count { get; set; } + + /// + /// 获取或设置图文消息素材列表。 + /// + [Newtonsoft.Json.JsonProperty("item")] + [System.Text.Json.Serialization.JsonPropertyName("item")] + public Types.Material[] MaterialList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialDeleteMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialDeleteMaterialRequest.cs new file mode 100644 index 00000000..691e1ce1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialDeleteMaterialRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/del_material 接口的请求。 + /// + public class CgibinMaterialDeleteMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialDeleteMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialDeleteMaterialResponse.cs new file mode 100644 index 00000000..5376116c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialDeleteMaterialResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/del_material 接口的响应。 + /// + public class CgibinMaterialDeleteMaterialResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsNewsRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsNewsRequest.cs new file mode 100644 index 00000000..a6e4f2d5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsNewsRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/get_material 接口的请求。 + /// + public class CgibinMaterialGetMaterialAsNewsRequest : CgibinMaterialGetMaterialRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsNewsResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsNewsResponse.cs new file mode 100644 index 00000000..83d8326a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsNewsResponse.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/get_material 接口的响应。 + /// + public class CgibinMaterialGetMaterialAsNewsResponse : CgibinMaterialGetMaterialResponse + { + public static class Types + { + public class Article + { + /// + /// 获取或设置图文消息缩略图媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("thumb_media_id")] + [System.Text.Json.Serialization.JsonPropertyName("thumb_media_id")] + public string ThumbnailMediaId { get; set; } = default!; + + /// + /// 获取或设置图文消息标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置图文消息作者。 + /// + [Newtonsoft.Json.JsonProperty("author")] + [System.Text.Json.Serialization.JsonPropertyName("author")] + public string Author { get; set; } = default!; + + /// + /// 获取或设置图文消息摘要。 + /// + [Newtonsoft.Json.JsonProperty("digest")] + [System.Text.Json.Serialization.JsonPropertyName("digest")] + public string Digest { get; set; } = default!; + + /// + /// 获取或设置图文消息阅读原文 URL。 + /// + [Newtonsoft.Json.JsonProperty("content_source_url")] + [System.Text.Json.Serialization.JsonPropertyName("content_source_url")] + public string ContentSourceUrl { get; set; } = default!; + + /// + /// 获取或设置图文消息页面的内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = default!; + + /// + /// 获取或设置图文消息页面的 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置是否显示封面。 + /// + [Newtonsoft.Json.JsonProperty("show_cover_pic")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_cover_pic")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool IsShowCover { get; set; } + + /// + /// 获取或设置是否打开评论。 + /// + [Newtonsoft.Json.JsonProperty("need_open_comment")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("need_open_comment")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsOpenComment { get; set; } + + /// + /// 获取或设置是否粉丝才可评论。 + /// + [Newtonsoft.Json.JsonProperty("only_fans_can_comment")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("only_fans_can_comment")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))] + public bool? IsOnlyFansCanComment { get; set; } + } + } + + /// + /// 获取或设置图文消息素材列表。 + /// + [Newtonsoft.Json.JsonProperty("news_item")] + [System.Text.Json.Serialization.JsonPropertyName("news_item")] + public Types.Article[] ArticleList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsVideoRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsVideoRequest.cs new file mode 100644 index 00000000..c58558d1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsVideoRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/get_material 接口的请求。 + /// + public class CgibinMaterialGetMaterialAsVideoRequest : CgibinMaterialGetMaterialRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsVideoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsVideoResponse.cs new file mode 100644 index 00000000..160da871 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialAsVideoResponse.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/get_material 接口的响应。 + /// + public class CgibinMaterialGetMaterialAsVideoResponse : CgibinMaterialGetMaterialResponse + { + /// + /// 获取或设置视频标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置视频描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置视频下载 URL。 + /// + [Newtonsoft.Json.JsonProperty("down_url")] + [System.Text.Json.Serialization.JsonPropertyName("down_url")] + public string DownloadUrl { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialCountRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialCountRequest.cs new file mode 100644 index 00000000..f87409bc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialCountRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/get_materialcount 接口的请求。 + /// + public class CgibinMaterialGetMaterialCountRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialCountResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialCountResponse.cs new file mode 100644 index 00000000..a3d781e4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialCountResponse.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/get_materialcount 接口的响应。 + /// + public class CgibinMaterialGetMaterialCountResponse : WechatApiResponse + { + /// + /// 获取或设置语音总数量。 + /// + [Newtonsoft.Json.JsonProperty("voice_count")] + [System.Text.Json.Serialization.JsonPropertyName("voice_count")] + public int VoiceCount { get; set; } + + /// + /// 获取或设置视频总数量。 + /// + [Newtonsoft.Json.JsonProperty("video_count")] + [System.Text.Json.Serialization.JsonPropertyName("video_count")] + public int VideoCount { get; set; } + + /// + /// 获取或设置图片总数量。 + /// + [Newtonsoft.Json.JsonProperty("image_count")] + [System.Text.Json.Serialization.JsonPropertyName("image_count")] + public int ImageCount { get; set; } + + /// + /// 获取或设置图文总数量。 + /// + [Newtonsoft.Json.JsonProperty("news_count")] + [System.Text.Json.Serialization.JsonPropertyName("news_count")] + public int NewsCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialRequest.cs new file mode 100644 index 00000000..2ecda9af --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/get_material 接口的请求。 + /// + public class CgibinMaterialGetMaterialRequest : WechatApiRequest + { + /// + /// 获取或设置媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialResponse.cs new file mode 100644 index 00000000..73339905 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialGetMaterialResponse.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/get_material 接口的响应。 + /// + public class CgibinMaterialGetMaterialResponse : WechatApiResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && RawBytes?.Length > 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialUpdateNewsRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialUpdateNewsRequest.cs new file mode 100644 index 00000000..031ec782 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialUpdateNewsRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/update_news 接口的请求。 + /// + public class CgibinMaterialUpdateNewsRequest : WechatApiRequest + { + public static class Types + { + public class Article : CgibinMaterialAddNewsRequest.Types.Article + { + } + } + + /// + /// 获取或设置媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = string.Empty; + + /// + /// 获取或设置要更新的文章在图文消息中的位置(从 0 开始)。 + /// + [Newtonsoft.Json.JsonProperty("index")] + [System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// 获取或设置要更新的图文消息。 + /// + [Newtonsoft.Json.JsonProperty("articles")] + [System.Text.Json.Serialization.JsonPropertyName("articles")] + public Types.Article Article { get; set; } = new Types.Article(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialUpdateNewsResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialUpdateNewsResponse.cs new file mode 100644 index 00000000..57b75ea6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMaterial/CgibinMaterialUpdateNewsResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/material/update_news 接口的响应。 + /// + public class CgibinMaterialUpdateNewsResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaGetRequest.cs new file mode 100644 index 00000000..d3b10a24 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaGetRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/media/get 接口的请求。 + /// + public class CgibinMediaGetRequest : WechatApiRequest + { + /// + /// 获取或设置媒体文件标识。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string MediaId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaGetResponse.cs new file mode 100644 index 00000000..874e8db0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaGetResponse.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/media/get 接口的响应。 + /// + public class CgibinMediaGetResponse : WechatApiResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && RawBytes?.Length > 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadImageRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadImageRequest.cs new file mode 100644 index 00000000..f1d6cb16 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadImageRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/uploadimg 接口的请求。 + /// + public class CgibinMediaUploadImageRequest : WechatApiRequest + { + /// + /// 获取或设置图片文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] FileBytes { get; set; } = new byte[0]; + + /// + /// 获取或设置图片文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? FileName { get; set; } + + /// + /// 获取或设置图片文件 Conent-Type。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? FileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadImageResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadImageResponse.cs new file mode 100644 index 00000000..78b8362d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadImageResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/uploadimg 接口的响应。 + /// + public class CgibinMediaUploadImageResponse : WechatApiResponse + { + /// + /// 获取或设置图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadNewsRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadNewsRequest.cs new file mode 100644 index 00000000..1f5de50c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadNewsRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/uploadnews 接口的请求。 + /// + public class CgibinMediaUploadNewsRequest : WechatApiRequest + { + public static class Types + { + public class Article : CgibinMaterialAddNewsRequest.Types.Article + { + } + } + + /// + /// 获取或设置图文消息列表。 + /// + [Newtonsoft.Json.JsonProperty("articles")] + [System.Text.Json.Serialization.JsonPropertyName("articles")] + public IList ArticleList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadNewsResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadNewsResponse.cs new file mode 100644 index 00000000..d97f99b4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadNewsResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/uploadimg 接口的响应。 + /// + public class CgibinMediaUploadNewsResponse : CgibinMediaUploadResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadRequest.cs new file mode 100644 index 00000000..978514e0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/upload 接口的请求。 + /// + public class CgibinMediaUploadRequest : WechatApiRequest + { + /// + /// 获取或设置媒体文件类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] FileBytes { get; set; } = new byte[0]; + + /// + /// 获取或设置文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? FileName { get; set; } + + /// + /// 获取或设置文件 Conent-Type。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? FileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadResponse.cs new file mode 100644 index 00000000..5727e041 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadResponse.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/upload 接口的响应。 + /// + public class CgibinMediaUploadResponse : WechatApiResponse + { + /// + /// 获取或设置媒体文件类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = default!; + + /// + /// 获取或设置媒体文件上传时间戳。 + /// + [Newtonsoft.Json.JsonProperty("created_at")] + [System.Text.Json.Serialization.JsonPropertyName("created_at")] + public long CreateTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadVideoRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadVideoRequest.cs new file mode 100644 index 00000000..91062b50 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadVideoRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/uploadvideo 接口的请求。 + /// + public class CgibinMediaUploadVideoRequest : WechatApiRequest + { + /// + /// 获取或设置媒体文件标识。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string MediaId { get; set; } = string.Empty; + + /// + /// 获取或设置视频标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// 获取或设置视频描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadVideoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadVideoResponse.cs new file mode 100644 index 00000000..20b5b6b0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/CgibinMediaUploadVideoResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/uploadvideo 接口的响应。 + /// + public class CgibinMediaUploadVideoResponse : CgibinMediaUploadResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Operation/CgibinMediaGetFeedbackMediaRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Operation/CgibinMediaGetFeedbackMediaRequest.cs new file mode 100644 index 00000000..028358e0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Operation/CgibinMediaGetFeedbackMediaRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/media/getfeedbackmedia 接口的请求。 + /// + public class CgibinMediaGetFeedbackMediaRequest : CgibinMediaGetRequest + { + /// + /// 获取或设置反馈 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int RecordId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Operation/CgibinMediaGetFeedbackMediaResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Operation/CgibinMediaGetFeedbackMediaResponse.cs new file mode 100644 index 00000000..5c0c2581 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Operation/CgibinMediaGetFeedbackMediaResponse.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/media/getfeedbackmedia 接口的响应。 + /// + public class CgibinMediaGetFeedbackMediaResponse : WechatApiResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && RawBytes?.Length > 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceAddVoiceToRecognitionForTextRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceAddVoiceToRecognitionForTextRequest.cs new file mode 100644 index 00000000..9aa50a33 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceAddVoiceToRecognitionForTextRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/voice/addvoicetorecofortext 接口的请求。 + /// + public class CgibinMediaVoiceAddVoiceToRecognitionForTextRequest : WechatApiRequest + { + /// + /// 获取或设置文件格式。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string Format { get; set; } = "mp3"; + + /// + /// 获取或设置语音唯一标识。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string VoiceId { get; set; } = string.Empty; + + /// + /// 获取或设置语音文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] VoiceBytes { get; set; } = new byte[0]; + + /// + /// 获取或设置语言。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? Language { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceAddVoiceToRecognitionForTextResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceAddVoiceToRecognitionForTextResponse.cs new file mode 100644 index 00000000..1280d4d9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceAddVoiceToRecognitionForTextResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/voice/addvoicetorecofortext 接口的响应。 + /// + public class CgibinMediaVoiceAddVoiceToRecognitionForTextResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceQueryRecognitionResultForTextRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceQueryRecognitionResultForTextRequest.cs new file mode 100644 index 00000000..5f36a959 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceQueryRecognitionResultForTextRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/voice/queryrecoresultfortext 接口的请求。 + /// + public class CgibinMediaVoiceQueryRecognitionResultForTextRequest : WechatApiRequest + { + /// + /// 获取或设置语音唯一标识。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string VoiceId { get; set; } = string.Empty; + + /// + /// 获取或设置语言。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? Language { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceQueryRecognitionResultForTextResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceQueryRecognitionResultForTextResponse.cs new file mode 100644 index 00000000..4eed7ee5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceQueryRecognitionResultForTextResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/voice/queryrecoresultfortext 接口的响应。 + /// + public class CgibinMediaVoiceQueryRecognitionResultForTextResponse : WechatApiResponse + { + /// + /// 获取或设置识别结果。 + /// + [Newtonsoft.Json.JsonProperty("result")] + [System.Text.Json.Serialization.JsonPropertyName("result")] + public string Result { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceTranslateContentRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceTranslateContentRequest.cs new file mode 100644 index 00000000..6f468645 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceTranslateContentRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/voice/translatecontent 接口的请求。 + /// + public class CgibinMediaVoiceTranslateContentRequest : WechatApiRequest + { + /// + /// 获取或设置语音文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] VoiceBytes { get; set; } = new byte[0]; + + /// + /// 获取或设置源语言。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string FromLanguage { get; set; } = string.Empty; + + /// + /// 获取或设置目标语言。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ToLanguage { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceTranslateContentResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceTranslateContentResponse.cs new file mode 100644 index 00000000..9ce71be8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMedia/Voice/CgibinMediaVoiceTranslateContentResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/media/voice/translatecontent 接口的响应。 + /// + public class CgibinMediaVoiceTranslateContentResponse : WechatApiResponse + { + /// + /// 获取或设置源内容。 + /// + [Newtonsoft.Json.JsonProperty("from_content")] + [System.Text.Json.Serialization.JsonPropertyName("from_content")] + public string FromContent { get; set; } = default!; + + /// + /// 获取或设置目标内容。 + /// + [Newtonsoft.Json.JsonProperty("to_content")] + [System.Text.Json.Serialization.JsonPropertyName("to_content")] + public string ToContent { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinGetCurrentSelfMenuInfoRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinGetCurrentSelfMenuInfoRequest.cs new file mode 100644 index 00000000..7ae71662 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinGetCurrentSelfMenuInfoRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/get_current_selfmenu_info 接口的请求。 + /// + public class CgibinGetCurrentSelfMenuInfoRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinGetCurrentSelfMenuInfoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinGetCurrentSelfMenuInfoResponse.cs new file mode 100644 index 00000000..53c561c5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinGetCurrentSelfMenuInfoResponse.cs @@ -0,0 +1,172 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /cgi-bin/get_current_selfmenu_info 接口的响应。 + /// + public class CgibinGetCurrentSelfMenuInfoResponse : WechatApiResponse + { + public static class Types + { + public class Menu + { + public static class Types + { + public class Button + { + public static class Types + { + public class News + { + /// + /// 获取或设置图文消息列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public NewsItem[] List { get; set; } = default!; + } + + public class NewsItem + { + /// + /// 获取或设置图文消息标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置图文消息摘要。 + /// + [Newtonsoft.Json.JsonProperty("author")] + [System.Text.Json.Serialization.JsonPropertyName("author")] + public string? Author { get; set; } + + /// + /// 获取或设置图文消息摘要。 + /// + [Newtonsoft.Json.JsonProperty("digest")] + [System.Text.Json.Serialization.JsonPropertyName("digest")] + public string? Digest { get; set; } + + /// + /// 获取或设置是否显示封面。 + /// + [Newtonsoft.Json.JsonProperty("show_cover")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("show_cover")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool IsShowCover { get; set; } + + /// + /// 获取或设置封面图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("cover_url")] + [System.Text.Json.Serialization.JsonPropertyName("cover_url")] + public string CoverUrl { get; set; } = default!; + + /// + /// 获取或设置正文 URL。 + /// + [Newtonsoft.Json.JsonProperty("content_url")] + [System.Text.Json.Serialization.JsonPropertyName("content_url")] + public string ContentUrl { get; set; } = default!; + + /// + /// 获取或设置原文 URL。 + /// + [Newtonsoft.Json.JsonProperty("source_url")] + [System.Text.Json.Serialization.JsonPropertyName("source_url")] + public string? SourceUrl { get; set; } + } + + public class SubButton + { + /// + /// 获取或设置子菜单列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Button[]? List { get; set; } + } + } + + /// + /// 获取或设置菜单的响应动作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = default!; + + /// + /// 获取或设置菜单标题。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置菜单 KEY 值。 + /// + [Newtonsoft.Json.JsonProperty("key")] + [System.Text.Json.Serialization.JsonPropertyName("key")] + public string? Key { get; set; } + + /// + /// 获取或设置菜单 VALUE 值。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [System.Text.Json.Serialization.JsonPropertyName("value")] + public string? Value { get; set; } + + /// + /// 获取或设置网页链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// 获取或设置图文消息信息。 + /// + [Newtonsoft.Json.JsonProperty("news_info")] + [System.Text.Json.Serialization.JsonPropertyName("news_info")] + public Types.News? News { get; set; } + + /// + /// 获取或设置子菜单信息。 + /// + [Newtonsoft.Json.JsonProperty("sub_button")] + [System.Text.Json.Serialization.JsonPropertyName("sub_button")] + public Types.SubButton? SubButton { get; set; } + } + } + + /// + /// 获取或设置菜单列表。 + /// + [Newtonsoft.Json.JsonProperty("button")] + [System.Text.Json.Serialization.JsonPropertyName("button")] + public Types.Button[] ButtonList { get; set; } = default!; + } + } + + /// + /// 获取或设置菜单信息。 + /// + [Newtonsoft.Json.JsonProperty("is_menu_open")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_menu_open")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))] + public bool IsMenuOpen { get; set; } + + /// + /// 获取或设置菜单信息。 + /// + [Newtonsoft.Json.JsonProperty("selfmenu_info")] + [System.Text.Json.Serialization.JsonPropertyName("selfmenu_info")] + public Types.Menu SelfMenu { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinMenuCreateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinMenuCreateRequest.cs new file mode 100644 index 00000000..cb252267 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinMenu/CgibinMenuCreateRequest.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cgi-bin/menu/create 接口的请求。 + /// + public class CgibinMenuCreateRequest : WechatApiRequest + { + public static class Types + { + public class Button + { + /// + /// 获取或设置菜单的响应动作类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置菜单标题。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置菜单 KEY 值。 + /// + [Newtonsoft.Json.JsonProperty("key")] + [System.Text.Json.Serialization.JsonPropertyName("key")] + public string? Key { get; set; } + + /// + /// 获取或设置网页链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// 获取或设置媒体文件标识 ID。 + /// + [Newtonsoft.Json.JsonProperty("media_id")] + [System.Text.Json.Serialization.JsonPropertyName("media_id")] + public string? MediaId { get; set; } + + /// + /// 获取或设置小程序的 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? MiniProgramAppId { get; set; } + + /// + /// 获取或设置小程序的页面路径。 + /// + [Newtonsoft.Json.JsonProperty("pagepath")] + [System.Text.Json.Serialization.JsonPropertyName("pagepath")] + public string? MiniProgramPagePath { get; set; } + + /// + /// 获取或设置子菜单列表。 + /// + [Newtonsoft.Json.JsonProperty("sub_button")] + [System.Text.Json.Serialization.JsonPropertyName("sub_button")] + public IList