AmountWithExchangeRate Class

public final class AmountWithExchangeRate
extends Amount

The amount with exchange rate.

Constructor Summary

Constructor Description
AmountWithExchangeRate()

Creates an instance of AmountWithExchangeRate class.

Method Summary

Modifier and Type Method and Description
String currency()

Get the currency property: Amount currency.

BigDecimal exchangeRate()

Get the exchangeRate property: The exchange rate.

Integer exchangeRateMonth()

Get the exchangeRateMonth property: The exchange rate month.

static AmountWithExchangeRate fromJson(JsonReader jsonReader)

Reads an instance of AmountWithExchangeRate from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

BigDecimal value()

Get the value property: Amount.

Methods inherited from Amount

Methods inherited from java.lang.Object

Constructor Details

AmountWithExchangeRate

public AmountWithExchangeRate()

Creates an instance of AmountWithExchangeRate class.

Method Details

currency

public String currency()

Get the currency property: Amount currency.

Overrides:

AmountWithExchangeRate.currency()

Returns:

the currency value.

exchangeRate

public BigDecimal exchangeRate()

Get the exchangeRate property: The exchange rate.

Returns:

the exchangeRate value.

exchangeRateMonth

public Integer exchangeRateMonth()

Get the exchangeRateMonth property: The exchange rate month.

Returns:

the exchangeRateMonth value.

fromJson

public static AmountWithExchangeRate fromJson(JsonReader jsonReader)

Reads an instance of AmountWithExchangeRate from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AmountWithExchangeRate 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 AmountWithExchangeRate.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

AmountWithExchangeRate.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

AmountWithExchangeRate.validate()

value

public BigDecimal value()

Get the value property: Amount.

Overrides:

AmountWithExchangeRate.value()

Returns:

the value value.

Applies to