@simplyhomes/sos-client
Version:
Client SDK for SimplyHomes SOS API
140 lines (139 loc) • 5.36 kB
TypeScript
import { SDK_Base } from '../../base';
import { SDK_Context } from 'sdk/client/client';
import { SDK_UpdateUnit_Body_Dto, SDK_UpdateUnit_Response_Dto } from './types';
export declare class SDK_Units_Update extends SDK_Base {
private unitId;
private payload;
constructor(ctx: SDK_Context, unitId: number, payload?: SDK_UpdateUnit_Body_Dto);
/**
* Sets the number of bedrooms for the unit
* @param value - The number of bedrooms
* @returns The current instance for method chaining
*/
withBedrooms(value: number): this;
/**
* Sets the number of bathrooms for the unit
* @param value - The number of bathrooms
* @returns The current instance for method chaining
*/
withBathrooms(value: number): this;
/**
* Sets whether refrigerator exists in the unit
* @param value - Boolean indicating refrigerator existence
* @returns The current instance for method chaining
*/
withRefrigeratorDetailsExists(value: boolean): this;
/**
* Sets the refrigerator serial number
* @param value - The serial number of the refrigerator
* @returns The current instance for method chaining
*/
withRefrigeratorDetailsSerial(value: string): this;
/**
* Sets the refrigerator model
* @param value - The model of the refrigerator
* @returns The current instance for method chaining
*/
withRefrigeratorDetailsModel(value: string): this;
/**
* Sets the refrigerator condition
* @param value - The condition of the refrigerator
* @returns The current instance for method chaining
* @note You can use the Options SDK to get the list of available conditions
* @example
* const conditions = await sdk.options.units.conditions.list.execute();
*/
withRefrigeratorDetailsCondition(value: string): this;
/**
* Sets whether stove exists in the unit
* @param value - Boolean indicating stove existence
* @returns The current instance for method chaining
*/
withStoveDetailsExists(value: boolean): this;
/**
* Sets the stove serial number
* @param value - The serial number of the stove
* @returns The current instance for method chaining
*/
withStoveDetailsSerial(value: string): this;
/**
* Sets the stove model
* @param value - The model of the stove
* @returns The current instance for method chaining
*/
withStoveDetailsModel(value: string): this;
/**
* Sets the stove condition
* @param value - The condition of the stove
* @returns The current instance for method chaining
* @note You can use the Options SDK to get the list of available conditions
* @example
* const conditions = await sdk.options.units.conditions.list.execute();
*/
withStoveDetailsCondition(value: string): this;
/**
* Sets whether microwave exists in the unit
* @param value - Boolean indicating microwave existence
* @returns The current instance for method chaining
*/
withMicrowaveDetailsExists(value: boolean): this;
/**
* Sets the microwave serial number
* @param value - The serial number of the microwave
* @returns The current instance for method chaining
*/
withMicrowaveDetailsSerial(value: string): this;
/**
* Sets the microwave model
* @param value - The model of the microwave
* @returns The current instance for method chaining
*/
withMicrowaveDetailsModel(value: string): this;
/**
* Sets the microwave condition
* @param value - The condition of the microwave
* @returns The current instance for method chaining
* @note You can use the Options SDK to get the list of available conditions
* @example
* const conditions = await sdk.options.units.conditions.list.execute();
*/
withMicrowaveDetailsCondition(value: string): this;
/**
* Sets whether HVAC exists in the unit
* @param value - Boolean indicating HVAC existence
* @returns The current instance for method chaining
*/
withHvacDetailsExists(value: boolean): this;
/**
* Sets the HVAC serial number
* @param value - The serial number of the HVAC
* @returns The current instance for method chaining
*/
withHvacDetailsSerial(value: string): this;
/**
* Sets the HVAC model
* @param value - The model of the HVAC
* @returns The current instance for method chaining
*/
withHvacDetailsModel(value: string): this;
/**
* Sets the HVAC condition
* @param value - The condition of the HVAC
* @returns The current instance for method chaining
* @note You can use the Options SDK to get the list of available conditions
* @example
* const conditions = await sdk.options.units.conditions.list.execute();
*/
withHvacDetailsCondition(value: string): this;
/**
* Executes the unit update request
* @returns A promise that resolves with the update response data
* @remarks This method will:
* 1. Save the current payload state
* 2. Reset the payload to default values
* 3. Send the PATCH request to update the unit
*/
execute(): Promise<SDK_UpdateUnit_Response_Dto>;
private clonePayload;
private resetPayload;
}