Documentation of the CarRentalAgentService

CarRentalAgentService. Method 

Retrieves the set of supported Countries.

public CountriesResponse (
   CountriesRequest request
);

Parameters

CountriesRequest
A CountriesRequest containing the nessessary request data.

Return Value

A CountriesResponse containing the requested Countries.

Remarks

This method returns all Countries where car rental facilities are available. In result, a country returned from this method has Regions and subsequently car rental Locations assigned.

You may utilize this method to check if Sunny Cars supports a specific country for car rentals. Another use case would be to provide the end user with a list of countries for selection.

List Of defined call-variants

parameters GetCountriesP1
token required
languageCode optional


Description : This variant returns all countries available at CarRentalAgentService in the requested language.

List Of Errors Returned

Error Code Description
E_INTERNAL_SERVICE An internal service error occured during the process.
E_TICKET_TOKEN_INVALID The provided token is invalid.

This error occurs if:

  • The token is in invalid format.
  • The token is expired.
  • The token was not found.

E_COUNTRY_NOT_FOUND No countries are currently supported by service.
E_REQUEST_INVALID The performed request is invalid or malformed.

List Of Warnings Returned

Warning Code Description
W_LANGUAGE_NOT_SUPPORTED The requested language code is not supported for localization. Using default language instead.

Example

Example: Loading countries in dutch language.

[C#]
CountriesRequest rq = new CountriesRequest();
rq.Ticket = this.serviceTicket;
rq.LanguageCode = "NL";

CountriesResponse rs = this.service.GetCountries(rq);

foreach (Country country in rs.Country)
{
    this.comboBoxCountries.Items.Add(country.Name);
}

See Also

CarRentalAgentService Class | SunnyCars.Services.Osi.WsReservation Namespace