"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.QueryRedeemVipMemberResponseBodyQueryResults = exports.QueryVipMemberInfoResponse = exports.QueryVipMemberInfoResponseBody = exports.QueryVipMemberInfoRequest = exports.QueryVipMemberInfoHeaders = exports.QueryRedeemVipMemberResponse = exports.QueryRedeemVipMemberResponseBody = exports.QueryRedeemVipMemberRequest = exports.QueryRedeemVipMemberHeaders = exports.PreCheckRedeemVipMemberResponse = exports.PreCheckRedeemVipMemberResponseBody = exports.PreCheckRedeemVipMemberRequest = exports.PreCheckRedeemVipMemberHeaders = exports.InvalidRedeemVipMemberByBizRequestIdResponse = exports.InvalidRedeemVipMemberByBizRequestIdResponseBody = exports.InvalidRedeemVipMemberByBizRequestIdRequest = exports.InvalidRedeemVipMemberByBizRequestIdHeaders = exports.DirectRedeemVipMemberByMobileResponse = exports.DirectRedeemVipMemberByMobileResponseBody = exports.DirectRedeemVipMemberByMobileRequest = exports.DirectRedeemVipMemberByMobileHeaders = void 0;
// This file is auto-generated, don't edit it
/**
 */
const tea_util_1 = __importStar(require("@alicloud/tea-util")), $Util = tea_util_1;
const gateway_dingtalk_1 = __importDefault(require("@alicloud/gateway-dingtalk"));
const openapi_client_1 = __importStar(require("@alicloud/openapi-client")), $OpenApi = openapi_client_1;
const openapi_util_1 = __importDefault(require("@alicloud/openapi-util"));
const $tea = __importStar(require("@alicloud/tea-typescript"));
class DirectRedeemVipMemberByMobileHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DirectRedeemVipMemberByMobileHeaders = DirectRedeemVipMemberByMobileHeaders;
class DirectRedeemVipMemberByMobileRequest extends $tea.Model {
    static names() {
        return {
            bizRequestId: 'bizRequestId',
            channel: 'channel',
            dingtalkId: 'dingtalkId',
            duration: 'duration',
            mobile: 'mobile',
            uuid: 'uuid',
        };
    }
    static types() {
        return {
            bizRequestId: 'string',
            channel: 'string',
            dingtalkId: 'string',
            duration: 'number',
            mobile: 'string',
            uuid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DirectRedeemVipMemberByMobileRequest = DirectRedeemVipMemberByMobileRequest;
class DirectRedeemVipMemberByMobileResponseBody extends $tea.Model {
    static names() {
        return {
            bizRequestId: 'bizRequestId',
            errorCode: 'errorCode',
            errorMsg: 'errorMsg',
            result: 'result',
        };
    }
    static types() {
        return {
            bizRequestId: 'string',
            errorCode: 'string',
            errorMsg: 'string',
            result: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DirectRedeemVipMemberByMobileResponseBody = DirectRedeemVipMemberByMobileResponseBody;
class DirectRedeemVipMemberByMobileResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: DirectRedeemVipMemberByMobileResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.DirectRedeemVipMemberByMobileResponse = DirectRedeemVipMemberByMobileResponse;
class InvalidRedeemVipMemberByBizRequestIdHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.InvalidRedeemVipMemberByBizRequestIdHeaders = InvalidRedeemVipMemberByBizRequestIdHeaders;
class InvalidRedeemVipMemberByBizRequestIdRequest extends $tea.Model {
    static names() {
        return {
            bizRequestId: 'bizRequestId',
            channel: 'channel',
            dingtalkId: 'dingtalkId',
            duration: 'duration',
            mobile: 'mobile',
            uuid: 'uuid',
        };
    }
    static types() {
        return {
            bizRequestId: 'string',
            channel: 'string',
            dingtalkId: 'string',
            duration: 'number',
            mobile: 'string',
            uuid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.InvalidRedeemVipMemberByBizRequestIdRequest = InvalidRedeemVipMemberByBizRequestIdRequest;
class InvalidRedeemVipMemberByBizRequestIdResponseBody extends $tea.Model {
    static names() {
        return {
            bizRequestId: 'bizRequestId',
            errorCode: 'errorCode',
            errorMsg: 'errorMsg',
            result: 'result',
        };
    }
    static types() {
        return {
            bizRequestId: 'string',
            errorCode: 'string',
            errorMsg: 'string',
            result: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.InvalidRedeemVipMemberByBizRequestIdResponseBody = InvalidRedeemVipMemberByBizRequestIdResponseBody;
class InvalidRedeemVipMemberByBizRequestIdResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: InvalidRedeemVipMemberByBizRequestIdResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.InvalidRedeemVipMemberByBizRequestIdResponse = InvalidRedeemVipMemberByBizRequestIdResponse;
class PreCheckRedeemVipMemberHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PreCheckRedeemVipMemberHeaders = PreCheckRedeemVipMemberHeaders;
class PreCheckRedeemVipMemberRequest extends $tea.Model {
    static names() {
        return {
            bizRequestId: 'bizRequestId',
            channel: 'channel',
            dingtalkId: 'dingtalkId',
            duration: 'duration',
            mobile: 'mobile',
            uuid: 'uuid',
        };
    }
    static types() {
        return {
            bizRequestId: 'string',
            channel: 'string',
            dingtalkId: 'string',
            duration: 'number',
            mobile: 'string',
            uuid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PreCheckRedeemVipMemberRequest = PreCheckRedeemVipMemberRequest;
class PreCheckRedeemVipMemberResponseBody extends $tea.Model {
    static names() {
        return {
            bizRequestId: 'bizRequestId',
            errorCode: 'errorCode',
            errorMsg: 'errorMsg',
            result: 'result',
        };
    }
    static types() {
        return {
            bizRequestId: 'string',
            errorCode: 'string',
            errorMsg: 'string',
            result: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PreCheckRedeemVipMemberResponseBody = PreCheckRedeemVipMemberResponseBody;
class PreCheckRedeemVipMemberResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: PreCheckRedeemVipMemberResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.PreCheckRedeemVipMemberResponse = PreCheckRedeemVipMemberResponse;
class QueryRedeemVipMemberHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryRedeemVipMemberHeaders = QueryRedeemVipMemberHeaders;
class QueryRedeemVipMemberRequest extends $tea.Model {
    static names() {
        return {
            bizRequestId: 'bizRequestId',
            channel: 'channel',
            dingtalkId: 'dingtalkId',
            duration: 'duration',
            mobile: 'mobile',
            uuid: 'uuid',
        };
    }
    static types() {
        return {
            bizRequestId: 'string',
            channel: 'string',
            dingtalkId: 'string',
            duration: 'number',
            mobile: 'string',
            uuid: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryRedeemVipMemberRequest = QueryRedeemVipMemberRequest;
class QueryRedeemVipMemberResponseBody extends $tea.Model {
    static names() {
        return {
            errorCode: 'errorCode',
            errorMsg: 'errorMsg',
            queryResults: 'queryResults',
            result: 'result',
        };
    }
    static types() {
        return {
            errorCode: 'string',
            errorMsg: 'string',
            queryResults: { 'type': 'array', 'itemType': QueryRedeemVipMemberResponseBodyQueryResults },
            result: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryRedeemVipMemberResponseBody = QueryRedeemVipMemberResponseBody;
class QueryRedeemVipMemberResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: QueryRedeemVipMemberResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryRedeemVipMemberResponse = QueryRedeemVipMemberResponse;
class QueryVipMemberInfoHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryVipMemberInfoHeaders = QueryVipMemberInfoHeaders;
class QueryVipMemberInfoRequest extends $tea.Model {
    static names() {
        return {
            channelCode: 'channelCode',
        };
    }
    static types() {
        return {
            channelCode: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryVipMemberInfoRequest = QueryVipMemberInfoRequest;
class QueryVipMemberInfoResponseBody extends $tea.Model {
    static names() {
        return {
            expireTime: 'expireTime',
            isVip: 'isVip',
        };
    }
    static types() {
        return {
            expireTime: 'string',
            isVip: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryVipMemberInfoResponseBody = QueryVipMemberInfoResponseBody;
class QueryVipMemberInfoResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: QueryVipMemberInfoResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryVipMemberInfoResponse = QueryVipMemberInfoResponse;
class QueryRedeemVipMemberResponseBodyQueryResults extends $tea.Model {
    static names() {
        return {
            action: 'action',
            actionTime: 'actionTime',
            dingtalkId: 'dingtalkId',
            duration: 'duration',
            expireDate: 'expireDate',
            nick: 'nick',
        };
    }
    static types() {
        return {
            action: 'string',
            actionTime: 'string',
            dingtalkId: 'string',
            duration: 'number',
            expireDate: 'string',
            nick: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryRedeemVipMemberResponseBodyQueryResults = QueryRedeemVipMemberResponseBodyQueryResults;
class Client extends openapi_client_1.default {
    constructor(config) {
        super(config);
        let gatewayClient = new gateway_dingtalk_1.default();
        this._spi = gatewayClient;
        this._endpointRule = "";
        if (tea_util_1.default.empty(this._endpoint)) {
            this._endpoint = "api.dingtalk.com";
        }
    }
    /**
     * 通过手机号直充365会员
     *
     * @param request - DirectRedeemVipMemberByMobileRequest
     * @param headers - DirectRedeemVipMemberByMobileHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns DirectRedeemVipMemberByMobileResponse
     */
    async directRedeemVipMemberByMobileWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.bizRequestId)) {
            body["bizRequestId"] = request.bizRequestId;
        }
        if (!tea_util_1.default.isUnset(request.channel)) {
            body["channel"] = request.channel;
        }
        if (!tea_util_1.default.isUnset(request.dingtalkId)) {
            body["dingtalkId"] = request.dingtalkId;
        }
        if (!tea_util_1.default.isUnset(request.duration)) {
            body["duration"] = request.duration;
        }
        if (!tea_util_1.default.isUnset(request.mobile)) {
            body["mobile"] = request.mobile;
        }
        if (!tea_util_1.default.isUnset(request.uuid)) {
            body["uuid"] = request.uuid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "DirectRedeemVipMemberByMobile",
            version: "vipMember_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/vipMember/users/directRedeemVip`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new DirectRedeemVipMemberByMobileResponse({}));
    }
    /**
     * 通过手机号直充365会员
     *
     * @param request - DirectRedeemVipMemberByMobileRequest
     * @returns DirectRedeemVipMemberByMobileResponse
     */
    async directRedeemVipMemberByMobile(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new DirectRedeemVipMemberByMobileHeaders({});
        return await this.directRedeemVipMemberByMobileWithOptions(request, headers, runtime);
    }
    /**
     * 通过虚拟订单号作废365会员权益
     *
     * @param request - InvalidRedeemVipMemberByBizRequestIdRequest
     * @param headers - InvalidRedeemVipMemberByBizRequestIdHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns InvalidRedeemVipMemberByBizRequestIdResponse
     */
    async invalidRedeemVipMemberByBizRequestIdWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.bizRequestId)) {
            body["bizRequestId"] = request.bizRequestId;
        }
        if (!tea_util_1.default.isUnset(request.channel)) {
            body["channel"] = request.channel;
        }
        if (!tea_util_1.default.isUnset(request.dingtalkId)) {
            body["dingtalkId"] = request.dingtalkId;
        }
        if (!tea_util_1.default.isUnset(request.duration)) {
            body["duration"] = request.duration;
        }
        if (!tea_util_1.default.isUnset(request.mobile)) {
            body["mobile"] = request.mobile;
        }
        if (!tea_util_1.default.isUnset(request.uuid)) {
            body["uuid"] = request.uuid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "InvalidRedeemVipMemberByBizRequestId",
            version: "vipMember_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/vipMember/users/invalidRedeemVip`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new InvalidRedeemVipMemberByBizRequestIdResponse({}));
    }
    /**
     * 通过虚拟订单号作废365会员权益
     *
     * @param request - InvalidRedeemVipMemberByBizRequestIdRequest
     * @returns InvalidRedeemVipMemberByBizRequestIdResponse
     */
    async invalidRedeemVipMemberByBizRequestId(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new InvalidRedeemVipMemberByBizRequestIdHeaders({});
        return await this.invalidRedeemVipMemberByBizRequestIdWithOptions(request, headers, runtime);
    }
    /**
     * 直充会员预校验是否满足条件
     *
     * @param request - PreCheckRedeemVipMemberRequest
     * @param headers - PreCheckRedeemVipMemberHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns PreCheckRedeemVipMemberResponse
     */
    async preCheckRedeemVipMemberWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.bizRequestId)) {
            body["bizRequestId"] = request.bizRequestId;
        }
        if (!tea_util_1.default.isUnset(request.channel)) {
            body["channel"] = request.channel;
        }
        if (!tea_util_1.default.isUnset(request.dingtalkId)) {
            body["dingtalkId"] = request.dingtalkId;
        }
        if (!tea_util_1.default.isUnset(request.duration)) {
            body["duration"] = request.duration;
        }
        if (!tea_util_1.default.isUnset(request.mobile)) {
            body["mobile"] = request.mobile;
        }
        if (!tea_util_1.default.isUnset(request.uuid)) {
            body["uuid"] = request.uuid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "PreCheckRedeemVipMember",
            version: "vipMember_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/vipMember/users/preCheckRedeemVip`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new PreCheckRedeemVipMemberResponse({}));
    }
    /**
     * 直充会员预校验是否满足条件
     *
     * @param request - PreCheckRedeemVipMemberRequest
     * @returns PreCheckRedeemVipMemberResponse
     */
    async preCheckRedeemVipMember(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new PreCheckRedeemVipMemberHeaders({});
        return await this.preCheckRedeemVipMemberWithOptions(request, headers, runtime);
    }
    /**
     * 查询365会员直充信息
     *
     * @param request - QueryRedeemVipMemberRequest
     * @param headers - QueryRedeemVipMemberHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns QueryRedeemVipMemberResponse
     */
    async queryRedeemVipMemberWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.bizRequestId)) {
            body["bizRequestId"] = request.bizRequestId;
        }
        if (!tea_util_1.default.isUnset(request.channel)) {
            body["channel"] = request.channel;
        }
        if (!tea_util_1.default.isUnset(request.dingtalkId)) {
            body["dingtalkId"] = request.dingtalkId;
        }
        if (!tea_util_1.default.isUnset(request.duration)) {
            body["duration"] = request.duration;
        }
        if (!tea_util_1.default.isUnset(request.mobile)) {
            body["mobile"] = request.mobile;
        }
        if (!tea_util_1.default.isUnset(request.uuid)) {
            body["uuid"] = request.uuid;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "QueryRedeemVipMember",
            version: "vipMember_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/vipMember/users/queryRedeemVip`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new QueryRedeemVipMemberResponse({}));
    }
    /**
     * 查询365会员直充信息
     *
     * @param request - QueryRedeemVipMemberRequest
     * @returns QueryRedeemVipMemberResponse
     */
    async queryRedeemVipMember(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new QueryRedeemVipMemberHeaders({});
        return await this.queryRedeemVipMemberWithOptions(request, headers, runtime);
    }
    /**
     * 查询365会员信息
     *
     * @param request - QueryVipMemberInfoRequest
     * @param headers - QueryVipMemberInfoHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns QueryVipMemberInfoResponse
     */
    async queryVipMemberInfoWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.channelCode)) {
            body["channelCode"] = request.channelCode;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "QueryVipMemberInfo",
            version: "vipMember_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/vipMember/users/memberInfos/query`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new QueryVipMemberInfoResponse({}));
    }
    /**
     * 查询365会员信息
     *
     * @param request - QueryVipMemberInfoRequest
     * @returns QueryVipMemberInfoResponse
     */
    async queryVipMemberInfo(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new QueryVipMemberInfoHeaders({});
        return await this.queryVipMemberInfoWithOptions(request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map