Documentation of the CarRentalAgentService

RegionRequest Class

Use this class to create a Request for an operation to retrieve a single Region.

For a list of all members of this type, see RegionRequest Members.

System.Object
   Request
      RegionRequest

public class RegionRequest : Request

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

This class is the specific implementation of a Request to use for service operations related to single Region queries.

An instance of this class has to be used for a call to SOAP-Implementation of GetRegion - Method.

Example

Example 1: Loading a Region with Id 96 (Bavaria) with all child regions and in dutch language.

[C#]
RegionRequest rq = new RegionRequest();

rq.Ticket = this.serviceTicket;
rq.Operation.Target = OperationTarget.Test;
rq.Id = 96;
rq.LanguageCode = "NL";
rq.WithChilds = true;

RegionResponse rs = this.service.GetRegion(rq);

Region bavaria = rs.Region;

For the code above, the CarRentalAgentService would return an XML on the SOAP-protocol-layer similar to the following:

<?xml version="1.0" encoding="utf-8" ?> 
<RegionResponse 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://xml.sunnycars.com/Interfaces/CarRentalAgent/V1.2"
    >
    <Operation Target="Test" /> 
    <Token="bcfe2ed7113747f38133d15b54a485e1" Timestamp="2004-11-21T20:42:53" Expires="2004-11-21T21:42:53" />
    <Status Code="Success" /> 
    <Region Id="96" RootId="21" ParentId="21" CountryId="8" HasLocations="false" HasChilds="true" Name="Beieren" LanguageCode="NL">
        <Child Id="593" RootId="21" ParentId="96" CountryId="8" HasLocations="true" HasChilds="false" Name="Augsburg" LanguageCode="NL" /> 
        <Child Id="594" RootId="21" ParentId="96" CountryId="8" HasLocations="true" HasChilds="false" Name="Ingolstadt" LanguageCode="NL" /> 
        <Child Id="595" RootId="21" ParentId="96" CountryId="8" HasLocations="true" HasChilds="false" Name="Munchen" LanguageCode="NL" /> 
        <Child Id="596" RootId="21" ParentId="96" CountryId="8" HasLocations="true" HasChilds="false" Name="Neurenberg" LanguageCode="NL" /> 
        <Child Id="597" RootId="21" ParentId="96" CountryId="8" HasLocations="true" HasChilds="false" Name="Schweinfurt" LanguageCode="NL" /> 
    </Region>
</RegionResponse>

Example 2: Loading a Region with Id 21 (Germany) without child regions and in german language.

[C#]
RegionRequest rq = new RegionRequest();

rq.Ticket = this.serviceTicket;
rq.Operation.Target = OperationTarget.Test;
rq.Id = 21;
rq.LanguageCode = "DE";
rq.WithChilds = false;

RegionResponse rs = this.service.GetRegion(rq);

Region germany = rs.Region;

For the code above, the CarRentalAgentService would return an XML on the SOAP-protocol-layer similar to the following:

<?xml version="1.0" encoding="utf-8" ?> 
    <RegionResponse 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://xml.sunnycars.com/Interfaces/CarRentalAgent/V1.2"
    >
    <Operation Target="Test" /> 
    <Token="bcfe2ed7113747f38133d15b54a485e1" Timestamp="2004-11-21T20:42:53" Expires="2004-11-21T21:42:53" />
    <Status Code="Success" /> 
    <Region Id="21" RootId="0" ParentId="0" CountryId="8" HasLocations="false" HasChilds="true" Name="Deutschland" LanguageCode="DE" />
</RegionResponse>

Requirements

Namespace: SunnyCars.Schema.Osi.WsReservation.V4

Assembly: Sunnycars.Schema.Osi.WsReservation.V4 (in Sunnycars.Schema.Osi.WsReservation.V4.dll)

See Also

RegionRequest Members | SunnyCars.Schema.Osi.WsReservation.V4 Namespace | Region | RegionResponse