BLACKBAUD.api.CountryService Provides methods for getting state and country information from the CRM using calls to the BBIS REST services.
| Name | Type | Description |
|---|---|---|
options
|
Object | An object literal containing one or more of the following optional properties:
|
Methods
getAddressCaptions(countryId, successCallback, failureCallback)
Returns the internationalized address captions associated with a specified country.
| Name | Type | Description |
|---|---|---|
countryId
|
String | The Id of a country whose address captions should be returned. |
successCallback
|
function | The function to call if the request succeeds. The
function will be passed an object with the following properties:
|
failureCallback
|
function | The function to call if the request fails. |
getCountries(successCallback, failureCallback)
Returns a list of all active countries alphabetized by their description.
| Name | Type | Description |
|---|---|---|
successCallback
|
function | The function to call if the request succeeds. The
function will be passed an array of objects with the following properties:
|
failureCallback
|
function | The function to call if the request fails. |
getStates(countryId, successCallback, failureCallback)
Returns a list of states associated with a specified country, alphabetized by their description.
| Name | Type | Description |
|---|---|---|
countryId
|
String | The Id of a country whose states should be returned. |
successCallback
|
function | The function to call if the request succeeds. The
function will be passed an array of objects with the following properties:
|
failureCallback
|
function | The function to call if the request fails. |