Package com.restfb.types
Class User.Currency
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.User.Currency
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- User
public static class User.Currency extends AbstractFacebookType
Represents the Currency Graph API type.- Since:
- 1.6.12
- Author:
- Mark Allen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Currency()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigDecimal
getCurrencyExchange()
The number of Facebook Credits that equate in value to one unit ofuser_currency
.BigDecimal
getCurrencyExchangeInverse()
The number of units ofuser_currency
that equate in value to one Credit.BigDecimal
getCurrencyOffset()
The number by which a price should be divided for display inuser_currency
units.String
getUserCurrency()
The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).void
setCurrencyExchange(BigDecimal currencyExchange)
The number of Facebook Credits that equate in value to one unit ofuser_currency
.void
setCurrencyExchangeInverse(BigDecimal currencyExchangeInverse)
The number of units ofuser_currency
that equate in value to one Credit.void
setCurrencyOffset(BigDecimal currencyOffset)
The number by which a price should be divided for display inuser_currency
units.void
setUserCurrency(String userCurrency)
The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
Currency
public Currency()
-
-
Method Detail
-
getUserCurrency
public String getUserCurrency()
The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).- Returns:
- The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).
-
setUserCurrency
public void setUserCurrency(String userCurrency)
The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).
-
getCurrencyExchange
public BigDecimal getCurrencyExchange()
The number of Facebook Credits that equate in value to one unit ofuser_currency
.- Returns:
- The number of Facebook Credits that equate in value to one unit of
user_currency
.
-
setCurrencyExchange
public void setCurrencyExchange(BigDecimal currencyExchange)
The number of Facebook Credits that equate in value to one unit ofuser_currency
.
-
getCurrencyExchangeInverse
public BigDecimal getCurrencyExchangeInverse()
The number of units ofuser_currency
that equate in value to one Credit.To calculate the local currency amount based on the credits price, compute
credits_price * currency_exchange_inverse
.- Returns:
- The number of units of
user_currency
that equate in value to one Credit.
-
setCurrencyExchangeInverse
public void setCurrencyExchangeInverse(BigDecimal currencyExchangeInverse)
The number of units ofuser_currency
that equate in value to one Credit.To calculate the local currency amount based on the credits price, compute
credits_price * currency_exchange_inverse
.
-
getCurrencyOffset
public BigDecimal getCurrencyOffset()
The number by which a price should be divided for display inuser_currency
units.For example, a price of $1.20 will be represented by the Facebook API as "120", which you should divide by the USD
currency_offset
of 100 to arrive back at 1.20.- Returns:
- The number by which a price should be divided for display in
user_currency
units.
-
setCurrencyOffset
public void setCurrencyOffset(BigDecimal currencyOffset)
The number by which a price should be divided for display inuser_currency
units.For example, a price of $1.20 will be represented by the Facebook API as "120", which you should divide by the USD
currency_offset
of 100 to arrive back at 1.20.
-
-