Package com.timeanddate.services
Class DialCodeService
java.lang.Object
com.timeanddate.services.BaseService
com.timeanddate.services.DialCodeService
- Author:
- Cato Auestad <cato@timeanddate.com>
-
Field Summary
Fields inherited from class com.timeanddate.services.BaseService
Language, ServiceName, Version
-
Constructor Summary
ConstructorsConstructorDescriptionDialCodeService(String accessKey, String secretKey)
The dialcode service can be used determine which phone number shall be used to call a specific location. -
Method Summary
Modifier and TypeMethodDescriptiongetDialCode(LocationId toLocation)
Gets the dial code for the location you want to callgetDialCode(LocationId toLocation, LocationId fromLocation)
Gets the dial code for the location you want to call, from wheregetDialCode(LocationId toLocation, LocationId fromLocation, int number)
Gets the dial code for the location you want to call, from where with numberboolean
boolean
boolean
boolean
void
setIncludeCoordinates(boolean bool)
void
setIncludeCurrentTime(boolean bool)
void
setIncludeLocations(boolean bool)
void
setIncludeTimezoneInformation(boolean bool)
-
Constructor Details
-
DialCodeService
The dialcode service can be used determine which phone number shall be used to call a specific location.- Parameters:
accessKey
- Access key.secretKey
- Secret key.- Throws:
AuthenticationException
- Encryption of the authentication failed
-
-
Method Details
-
getDialCode
public DialCodes getDialCode(LocationId toLocation) throws IllegalArgumentException, ServerSideExceptionGets the dial code for the location you want to call- Parameters:
toLocation
- To location.- Returns:
- The dial code.
- Throws:
ServerSideException
- The server produced an error messageIllegalArgumentException
- A required argument was not as expected
-
getDialCode
public DialCodes getDialCode(LocationId toLocation, LocationId fromLocation) throws IllegalArgumentException, ServerSideExceptionGets the dial code for the location you want to call, from where- Parameters:
toLocation
- To location.fromLocation
- From location.- Returns:
- The dial code.
- Throws:
ServerSideException
- The server produced an error messageIllegalArgumentException
- A required argument was not as expected
-
getDialCode
public DialCodes getDialCode(LocationId toLocation, LocationId fromLocation, int number) throws IllegalArgumentException, ServerSideExceptionGets the dial code for the location you want to call, from where with number- Parameters:
toLocation
- To location.fromLocation
- From location.number
- Number.- Returns:
- The dial code.
- Throws:
ServerSideException
- The server produced an error messageIllegalArgumentException
- A required argument was not as expected
-
setIncludeCurrentTime
public void setIncludeCurrentTime(boolean bool) -
getIncludeCurrentTime
public boolean getIncludeCurrentTime() -
setIncludeLocations
public void setIncludeLocations(boolean bool) -
getIncludeLocations
public boolean getIncludeLocations() -
setIncludeCoordinates
public void setIncludeCoordinates(boolean bool) -
getIncludeCoordinates
public boolean getIncludeCoordinates() -
setIncludeTimezoneInformation
public void setIncludeTimezoneInformation(boolean bool) -
getIncludeTimezoneInformation
public boolean getIncludeTimezoneInformation()
-