UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

73 lines (72 loc) 2.9 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 SoSLeadEntityBase interface. */ export function instanceOfSoSLeadEntityBase(value) { if (!('lid' in value) || value['lid'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; return true; } export function SoSLeadEntityBaseFromJSON(json) { return SoSLeadEntityBaseFromJSONTyped(json, false); } export function SoSLeadEntityBaseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'lid': json['lid'], 'status': json['status'], 'terms': json['terms'] == null ? undefined : json['terms'], 'createdAt': json['createdAt'] == null ? undefined : json['createdAt'], 'name': json['name'] == null ? undefined : json['name'], 'sid': json['sid'] == null ? undefined : json['sid'], 'nextActions': json['nextActions'] == null ? undefined : json['nextActions'], 'totalNoi': json['totalNoi'] == null ? undefined : json['totalNoi'], 'totalAllIn': json['totalAllIn'] == null ? undefined : json['totalAllIn'], 'totalArv': json['totalArv'] == null ? undefined : json['totalArv'], 'totalMaxPrice': json['totalMaxPrice'] == null ? undefined : json['totalMaxPrice'], 'capRateCumulative': json['capRateCumulative'] == null ? undefined : json['capRateCumulative'], 'arvUpliftCumulative': json['arvUpliftCumulative'] == null ? undefined : json['arvUpliftCumulative'], 'totalOfferAmount': json['totalOfferAmount'] == null ? undefined : json['totalOfferAmount'], }; } export function SoSLeadEntityBaseToJSON(json) { return SoSLeadEntityBaseToJSONTyped(json, false); } export function SoSLeadEntityBaseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'lid': value['lid'], 'status': value['status'], 'terms': value['terms'], 'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'], 'name': value['name'], 'sid': value['sid'], 'nextActions': value['nextActions'], 'totalNoi': value['totalNoi'], 'totalAllIn': value['totalAllIn'], 'totalArv': value['totalArv'], 'totalMaxPrice': value['totalMaxPrice'], 'capRateCumulative': value['capRateCumulative'], 'arvUpliftCumulative': value['arvUpliftCumulative'], 'totalOfferAmount': value['totalOfferAmount'], }; }