"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
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;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExpenseLineItemInput$outboundSchema = void 0;
exports.expenseLineItemInputToJSON = expenseLineItemInputToJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const lineitemtype_js_1 = require("./lineitemtype.js");
const linkedinvoiceitem_js_1 = require("./linkedinvoiceitem.js");
const linkedledgeraccount_js_1 = require("./linkedledgeraccount.js");
const linkedtaxrateinput_js_1 = require("./linkedtaxrateinput.js");
const linkedtrackingcategory_js_1 = require("./linkedtrackingcategory.js");
const rebilling_js_1 = require("./rebilling.js");
/** @internal */
exports.ExpenseLineItemInput$outboundSchema = z.object({
    trackingCategories: z.nullable(z.array(z.nullable(linkedtrackingcategory_js_1.LinkedTrackingCategory$outboundSchema))).optional(),
    accountId: z.string().optional(),
    account: z.nullable(linkedledgeraccount_js_1.LinkedLedgerAccount$outboundSchema).optional(),
    customerId: z.string().optional(),
    departmentId: z.nullable(z.string()).optional(),
    locationId: z.nullable(z.string()).optional(),
    subsidiaryId: z.nullable(z.string()).optional(),
    taxRate: linkedtaxrateinput_js_1.LinkedTaxRateInput$outboundSchema.optional(),
    description: z.nullable(z.string()).optional(),
    type: z.nullable(lineitemtype_js_1.LineItemType$outboundSchema).optional(),
    totalAmount: z.nullable(z.number()),
    taxAmount: z.nullable(z.number()).optional(),
    quantity: z.nullable(z.number()).optional(),
    unitPrice: z.nullable(z.number()).optional(),
    item: linkedinvoiceitem_js_1.LinkedInvoiceItem$outboundSchema.optional(),
    billable: z.boolean().optional(),
    lineNumber: z.nullable(z.number().int()).optional(),
    rebilling: z.nullable(rebilling_js_1.Rebilling$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        trackingCategories: "tracking_categories",
        accountId: "account_id",
        customerId: "customer_id",
        departmentId: "department_id",
        locationId: "location_id",
        subsidiaryId: "subsidiary_id",
        taxRate: "tax_rate",
        totalAmount: "total_amount",
        taxAmount: "tax_amount",
        unitPrice: "unit_price",
        lineNumber: "line_number",
    });
});
function expenseLineItemInputToJSON(expenseLineItemInput) {
    return JSON.stringify(exports.ExpenseLineItemInput$outboundSchema.parse(expenseLineItemInput));
}
//# sourceMappingURL=expenselineiteminput.js.map