UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

105 lines (104 loc) 5.97 kB
/* tslint:disable */ /* eslint-disable */ /** * API v4 * Swagger documentation for API v4 * * The version of the OpenAPI document: 4.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Check if a given object implements the SoSOfferEntityBase interface. */ export function instanceOfSoSOfferEntityBase(value) { if (!('oid' in value) || value['oid'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('leadId' in value) || value['leadId'] === undefined) return false; return true; } export function SoSOfferEntityBaseFromJSON(json) { return SoSOfferEntityBaseFromJSONTyped(json, false); } export function SoSOfferEntityBaseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'oid': json['oid'], 'name': json['name'] == null ? undefined : json['name'], 'status': json['status'], 'createdAt': json['createdAt'] == null ? undefined : json['createdAt'], 'leadId': json['leadId'], 'type': json['type'] == null ? undefined : json['type'], 'terms': json['terms'] == null ? undefined : json['terms'], 'titleInsuranceBuyerApportionment': json['titleInsuranceBuyerApportionment'] == null ? undefined : json['titleInsuranceBuyerApportionment'], 'transferTaxBuyerApportionment': json['transferTaxBuyerApportionment'] == null ? undefined : json['transferTaxBuyerApportionment'], 'price': json['price'] == null ? undefined : json['price'], 'expireDate': json['expireDate'] == null ? undefined : json['expireDate'], 'emdStartDate': json['emdStartDate'] == null ? undefined : json['emdStartDate'], 'emdEndDate': json['emdEndDate'] == null ? undefined : json['emdEndDate'], 'emdStatus': json['emdStatus'] == null ? undefined : json['emdStatus'], 'inspectionStartDate': json['inspectionStartDate'] == null ? undefined : json['inspectionStartDate'], 'inspectionEndDate': json['inspectionEndDate'] == null ? undefined : json['inspectionEndDate'], 'financingStartDate': json['financingStartDate'] == null ? undefined : json['financingStartDate'], 'financingEndDate': json['financingEndDate'] == null ? undefined : json['financingEndDate'], 'closingStartDate': json['closingStartDate'] == null ? undefined : json['closingStartDate'], 'closingEndDate': json['closingEndDate'] == null ? undefined : json['closingEndDate'], 'titleStartDate': json['titleStartDate'] == null ? undefined : json['titleStartDate'], 'titleEndDate': json['titleEndDate'] == null ? undefined : json['titleEndDate'], 'inspectionStatus': json['inspectionStatus'] == null ? undefined : json['inspectionStatus'], 'titleStatus': json['titleStatus'] == null ? undefined : json['titleStatus'], 'financingStatus': json['financingStatus'] == null ? undefined : json['financingStatus'], 'closingStatus': json['closingStatus'] == null ? undefined : json['closingStatus'], 'disclosureDocuments': json['disclosureDocuments'] == null ? undefined : json['disclosureDocuments'], 'leaseDocuments': json['leaseDocuments'] == null ? undefined : json['leaseDocuments'], 'otherDocuments': json['otherDocuments'] == null ? undefined : json['otherDocuments'], }; } export function SoSOfferEntityBaseToJSON(json) { return SoSOfferEntityBaseToJSONTyped(json, false); } export function SoSOfferEntityBaseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'oid': value['oid'], 'name': value['name'], 'status': value['status'], 'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'], 'leadId': value['leadId'], 'type': value['type'], 'terms': value['terms'], 'titleInsuranceBuyerApportionment': value['titleInsuranceBuyerApportionment'], 'transferTaxBuyerApportionment': value['transferTaxBuyerApportionment'], 'price': value['price'], 'expireDate': value['expireDate'] == null ? value['expireDate'] : value['expireDate'], 'emdStartDate': value['emdStartDate'] == null ? value['emdStartDate'] : value['emdStartDate'], 'emdEndDate': value['emdEndDate'] == null ? value['emdEndDate'] : value['emdEndDate'], 'emdStatus': value['emdStatus'], 'inspectionStartDate': value['inspectionStartDate'] == null ? value['inspectionStartDate'] : value['inspectionStartDate'], 'inspectionEndDate': value['inspectionEndDate'] == null ? value['inspectionEndDate'] : value['inspectionEndDate'], 'financingStartDate': value['financingStartDate'] == null ? value['financingStartDate'] : value['financingStartDate'], 'financingEndDate': value['financingEndDate'] == null ? value['financingEndDate'] : value['financingEndDate'], 'closingStartDate': value['closingStartDate'] == null ? value['closingStartDate'] : value['closingStartDate'], 'closingEndDate': value['closingEndDate'] == null ? value['closingEndDate'] : value['closingEndDate'], 'titleStartDate': value['titleStartDate'] == null ? value['titleStartDate'] : value['titleStartDate'], 'titleEndDate': value['titleEndDate'] == null ? value['titleEndDate'] : value['titleEndDate'], 'inspectionStatus': value['inspectionStatus'], 'titleStatus': value['titleStatus'], 'financingStatus': value['financingStatus'], 'closingStatus': value['closingStatus'], 'disclosureDocuments': value['disclosureDocuments'], 'leaseDocuments': value['leaseDocuments'], 'otherDocuments': value['otherDocuments'], }; }