Home Manual Reference Source Test Repository
import DevicePlans from 'opengate-js/src/plan/DevicePlans.js'
public class | source

DevicePlans

Extends:

BaseProvision → DevicePlans

This is a base object that contains all you can do about Device plans.

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

Set the flowRate attribute

public

Set the identifier attribute

public

Set the name attribute

Inherited Summary

From class BaseProvision
public

This invoke a request to OpenGate North API and the callback is managed by promises This function create a entity of provision

public

delete(body: *): Promise

This invoke a request to OpenGate North API and the callback is managed by promises This function deletes a entity of provision

public

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision

Public Constructors

public constructor(Reference: InternalOpenGateAPI) source

Constructor

Override:

BaseProvision#constructor

Params:

NameTypeAttributeDescription
Reference InternalOpenGateAPI

to the API object.

Public Methods

public withFlowRate(flowRate: object): OrganizationPlans source

Set the flowRate attribute

Params:

NameTypeAttributeDescription
flowRate object

{value: number, unit: [SECONDS, MINUTES, HOURS, DAYS, MONTHS, YEARS]}

public withIdentifier(identifier: string): DevicePlans source

Set the identifier attribute

Params:

NameTypeAttributeDescription
identifier string

required field

Return:

DevicePlans

public withName(name: string): DevicePlans source

Set the name attribute

Params:

NameTypeAttributeDescription
name string

required field

Return:

DevicePlans