@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
71 lines (70 loc) • 3.47 kB
JavaScript
/* 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.
*/
import { SoSTransactionEntityClosingConfidenceFromJSON, SoSTransactionEntityClosingConfidenceToJSON, } from './SoSTransactionEntityClosingConfidence';
import { SoSTransactionEntityStatusFromJSON, SoSTransactionEntityStatusToJSON, } from './SoSTransactionEntityStatus';
/**
* Check if a given object implements the SoSTransactionEntityBase interface.
*/
export function instanceOfSoSTransactionEntityBase(value) {
if (!('tid' in value) || value['tid'] === undefined)
return false;
if (!('propertyId' in value) || value['propertyId'] === undefined)
return false;
return true;
}
export function SoSTransactionEntityBaseFromJSON(json) {
return SoSTransactionEntityBaseFromJSONTyped(json, false);
}
export function SoSTransactionEntityBaseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'tid': json['tid'],
'propertyId': json['propertyId'],
'offerId': json['offerId'] == null ? undefined : json['offerId'],
'status': json['status'] == null ? undefined : SoSTransactionEntityStatusFromJSON(json['status']),
'expectedClosingDate': json['expectedClosingDate'] == null ? undefined : json['expectedClosingDate'],
'actualClosingDate': json['actualClosingDate'] == null ? undefined : json['actualClosingDate'],
'emdAmount': json['emdAmount'] == null ? undefined : json['emdAmount'],
'emdDate': json['emdDate'] == null ? undefined : json['emdDate'],
'contractPrice': json['contractPrice'] == null ? undefined : json['contractPrice'],
'contractDate': json['contractDate'] == null ? undefined : json['contractDate'],
'closingConfidence': json['closingConfidence'] == null ? undefined : SoSTransactionEntityClosingConfidenceFromJSON(json['closingConfidence']),
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
};
}
export function SoSTransactionEntityBaseToJSON(json) {
return SoSTransactionEntityBaseToJSONTyped(json, false);
}
export function SoSTransactionEntityBaseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'tid': value['tid'],
'propertyId': value['propertyId'],
'offerId': value['offerId'],
'status': SoSTransactionEntityStatusToJSON(value['status']),
'expectedClosingDate': value['expectedClosingDate'] == null ? value['expectedClosingDate'] : value['expectedClosingDate'],
'actualClosingDate': value['actualClosingDate'] == null ? value['actualClosingDate'] : value['actualClosingDate'],
'emdAmount': value['emdAmount'],
'emdDate': value['emdDate'] == null ? value['emdDate'] : value['emdDate'],
'contractPrice': value['contractPrice'],
'contractDate': value['contractDate'] == null ? value['contractDate'] : value['contractDate'],
'closingConfidence': SoSTransactionEntityClosingConfidenceToJSON(value['closingConfidence']),
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'],
};
}