MonetaryCommitment Class

public final class MonetaryCommitment
extends OfferTermInfo

Indicates that a monetary commitment is required for this offer.

Method Summary

Modifier and Type Method and Description
List<String> excludedMeterIds()

Get the excludedMeterIds property: An array of meter ids that are excluded from the given offer terms.

static MonetaryCommitment fromJson(JsonReader jsonReader)

Reads an instance of MonetaryCommitment from the JsonReader.

OfferTermInfoName name()

Get the name property: Name of the offer term.

Map<String,BigDecimal> tieredDiscount()

Get the tieredDiscount property: The list of key/value pairs for the tiered meter rates, in the format 'key':'value' where key = price, and value = the corresponding discount percentage.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from OfferTermInfo

Methods inherited from java.lang.Object

Method Details

excludedMeterIds

public List<String> excludedMeterIds()

Get the excludedMeterIds property: An array of meter ids that are excluded from the given offer terms.

Returns:

the excludedMeterIds value.

fromJson

public static MonetaryCommitment fromJson(JsonReader jsonReader)

Reads an instance of MonetaryCommitment from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MonetaryCommitment if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the MonetaryCommitment.

name

public OfferTermInfoName name()

Get the name property: Name of the offer term.

Overrides:

MonetaryCommitment.name()

Returns:

the name value.

tieredDiscount

public Map<String,BigDecimal> tieredDiscount()

Get the tieredDiscount property: The list of key/value pairs for the tiered meter rates, in the format 'key':'value' where key = price, and value = the corresponding discount percentage. This field is used only by offer terms of type 'Monetary Commitment'.

Returns:

the tieredDiscount value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

MonetaryCommitment.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to