import type { GetSupplierByIdResponseDTO } from "../../../common"; import type { Supplier } from "../entities"; export const GetSupplierByIdAdapter = { fromDTO(dto: GetSupplierByIdResponseDTO): Supplier { return { id: dto.id, companyId: dto.company_id, status: dto.status, reference: dto.reference, isCompany: dto.is_company === "1", name: dto.name, tradeName: dto.trade_name, tin: dto.tin, street: dto.street, street2: dto.street2, city: dto.city, province: dto.province, postalCode: dto.postal_code, country: dto.country, primaryEmail: dto.email_primary, secondaryEmail: dto.email_secondary, primaryPhone: dto.phone_primary, secondaryPhone: dto.phone_secondary, primaryMobile: dto.mobile_primary, secondaryMobile: dto.mobile_secondary, fax: dto.fax, website: dto.website, languageCode: dto.language_code, currencyCode: dto.currency_code, }; }, };