new ChargingTimeRequest(optionsopt)
BeNomad BeMap JavaScript API - ChargingTimeRequest (v1.5)
Strongly-typed request builder for `POST service/chargingTime/1.0` —
computes the time required to charge an EV from one battery level to
another at a given charger.
Wire shape cross-checked against
`bemap_idea/.../service/v1_0_0/model/chargingTime/ChargingTimeRequest.java`.
Required:
- `vehicle` — UUID from the EV catalogue.
- `chargingPointPower` — kW, positive.
- `chargingCurrentType` — one of `bemap.ChargingCurrentType.*`.
Constraint: `chargingBatteryLevel` must be strictly greater than
`remainingBatteryLevel` (charging the battery down makes no sense).
Example:
var req = new bemap.ChargingTimeRequest({
vehicle: 'a204c816-823c-4db5-a2b0-385033af54e6',
chargingPointPower: 22,
chargingCurrentType: bemap.ChargingCurrentType.AC_THREE_PHASES,
remainingBatteryLevel: 20,
chargingBatteryLevel: 80,
temperature: 18
});
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
- Since:
- 1.5.0
- Source:
Methods
toJson() → {Object}
Serialise to the wire body. Suppresses defaults so the payload stays
minimal. Caller-side validation is performed by
`bemap.ChargingTime.estimate()` BEFORE the network call.
Returns:
- Type
- Object