@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
76 lines (75 loc) • 4.02 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 { SoSLeasingEntityTypeFromJSON, SoSLeasingEntityTypeToJSON, } from './SoSLeasingEntityType';
import { SoSLeasingEntityTermFromJSON, SoSLeasingEntityTermToJSON, } from './SoSLeasingEntityTerm';
import { SoSLeasingEntityStatusFromJSON, SoSLeasingEntityStatusToJSON, } from './SoSLeasingEntityStatus';
/**
* Check if a given object implements the V4LeasingsCreateLeasingBodyDto interface.
*/
export function instanceOfV4LeasingsCreateLeasingBodyDto(value) {
if (!('unitId' in value) || value['unitId'] === undefined)
return false;
return true;
}
export function V4LeasingsCreateLeasingBodyDtoFromJSON(json) {
return V4LeasingsCreateLeasingBodyDtoFromJSONTyped(json, false);
}
export function V4LeasingsCreateLeasingBodyDtoFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'unitId': json['unitId'],
'status': json['status'] == null ? undefined : SoSLeasingEntityStatusFromJSON(json['status']),
'type': json['type'] == null ? undefined : SoSLeasingEntityTypeFromJSON(json['type']),
'notes': json['notes'] == null ? undefined : json['notes'],
'term': json['term'] == null ? undefined : SoSLeasingEntityTermFromJSON(json['term']),
'signedByTenantDate': json['signedByTenantDate'] == null ? undefined : json['signedByTenantDate'],
'startDate': json['startDate'] == null ? undefined : json['startDate'],
'moveInDate': json['moveInDate'] == null ? undefined : json['moveInDate'],
'leaseEndDate': json['leaseEndDate'] == null ? undefined : json['leaseEndDate'],
'renewalDate': json['renewalDate'] == null ? undefined : json['renewalDate'],
'securityDeposit': json['securityDeposit'] == null ? undefined : json['securityDeposit'],
'tenantPaymentAmount': json['tenantPaymentAmount'] == null ? undefined : json['tenantPaymentAmount'],
'housingAuthorityAmount': json['housingAuthorityAmount'] == null ? undefined : json['housingAuthorityAmount'],
'additionalPaymentAmount': json['additionalPaymentAmount'] == null ? undefined : json['additionalPaymentAmount'],
'additionalPaymentNotes': json['additionalPaymentNotes'] == null ? undefined : json['additionalPaymentNotes'],
};
}
export function V4LeasingsCreateLeasingBodyDtoToJSON(json) {
return V4LeasingsCreateLeasingBodyDtoToJSONTyped(json, false);
}
export function V4LeasingsCreateLeasingBodyDtoToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'unitId': value['unitId'],
'status': SoSLeasingEntityStatusToJSON(value['status']),
'type': SoSLeasingEntityTypeToJSON(value['type']),
'notes': value['notes'],
'term': SoSLeasingEntityTermToJSON(value['term']),
'signedByTenantDate': value['signedByTenantDate'] == null ? value['signedByTenantDate'] : value['signedByTenantDate'],
'startDate': value['startDate'] == null ? value['startDate'] : value['startDate'],
'moveInDate': value['moveInDate'] == null ? value['moveInDate'] : value['moveInDate'],
'leaseEndDate': value['leaseEndDate'] == null ? value['leaseEndDate'] : value['leaseEndDate'],
'renewalDate': value['renewalDate'] == null ? value['renewalDate'] : value['renewalDate'],
'securityDeposit': value['securityDeposit'],
'tenantPaymentAmount': value['tenantPaymentAmount'],
'housingAuthorityAmount': value['housingAuthorityAmount'],
'additionalPaymentAmount': value['additionalPaymentAmount'],
'additionalPaymentNotes': value['additionalPaymentNotes'],
};
}