21 lines
464 B
TypeScript
21 lines
464 B
TypeScript
import type { CustomerPrice, FullCustomer, Price } from "@autumn/shared";
|
|
import { generateId } from "../../../../utils/genUtils";
|
|
|
|
export const initCusPrice = ({
|
|
price,
|
|
fullCus,
|
|
cusProductId,
|
|
}: {
|
|
price: Price;
|
|
fullCus: FullCustomer;
|
|
cusProductId: string;
|
|
}): CustomerPrice => {
|
|
return {
|
|
id: generateId("cus_price"),
|
|
internal_customer_id: fullCus.internal_id,
|
|
customer_product_id: cusProductId,
|
|
created_at: Date.now(),
|
|
price_id: price.id,
|
|
};
|
|
};
|