Class LocaleApiController
java.lang.Object
com.bluebell.greenhouse.planter.controllers.locale.LocaleApiController
@RestController
@RequestMapping("${bluebell.base.api.controller.endpoint}/locale")
@CrossOrigin(origins="*",
methods={GET,DELETE,POST,PUT})
public class LocaleApiController
extends Object
API controller for locale-related data.
- Version:
- 3.0.5
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<List<CountryDTO>> Returns all supported countries.Returns all supported country phone codes.org.springframework.http.ResponseEntity<CountryDTO> getCountryForCurrency(String currency) Returns the default country for the given currency ISO code.org.springframework.http.ResponseEntity<List<CurrencyDTO>> Returns all supported currencies.org.springframework.http.ResponseEntity<CurrencyDTO> getCurrencyForCountry(String country) Returns the default currency for the given country ISO code.
-
Constructor Details
-
LocaleApiController
public LocaleApiController()
-
-
Method Details
-
getCountryCodes
-
getCountries
@GetMapping("/countries") public org.springframework.http.ResponseEntity<List<CountryDTO>> getCountries()Returns all supported countries.- Returns:
ResponseEntity
-
getCurrencies
@GetMapping("/currencies") public org.springframework.http.ResponseEntity<List<CurrencyDTO>> getCurrencies()Returns all supported currencies.- Returns:
ResponseEntity
-
getCountryForCurrency
@GetMapping("/country-for-currency") public org.springframework.http.ResponseEntity<CountryDTO> getCountryForCurrency(@RequestParam("currency") String currency) Returns the default country for the given currency ISO code.- Parameters:
currency- ISO 4217 currency code- Returns:
ResponseEntity
-
getCurrencyForCountry
@GetMapping("/currency-for-country") public org.springframework.http.ResponseEntity<CurrencyDTO> getCurrencyForCountry(@RequestParam("country") String country) Returns the default currency for the given country ISO code.- Parameters:
country- ISO 3166-1 alpha-3 country code- Returns:
ResponseEntity
-