[This is preliminary documentation and is subject to change.]
Returns a list of supported carriers by Phone Sherpa for a given country. Carrier is supported if Phone Sherpa can send messages to thier subscriber's phones.
Namespace:
PhoneSherpa.ServicesAssembly: App_Code.fxrph_yi (in App_Code.fxrph_yi)
Version: 0.0.0.0
Syntax
| C# |
|---|
public WS..::.GetCarrierListResult GetCarrierList( string AccessKey, int CountryID ) |
| Visual Basic (Declaration) |
|---|
Public Function GetCarrierList ( _ AccessKey As String, _ CountryID As Integer _ ) As WS..::.GetCarrierListResult |
| JScript |
|---|
public function GetCarrierList( AccessKey : String, CountryID : int ) : WS..::.GetCarrierListResult |
Parameters
- AccessKey
- Type: System..::.String
Security key allocated to a developer enabling access to the web service API.
- CountryID
- Type: System..::.Int32
Phone Sherpa internal identifier for a country. Returned carriers will all be for the specified CountryID
Return Value
An array list of supported carriers within the Phone Sherpa system for the specified country.
Remarks
This function is most often used in support of an end user interface. The carrier list can be placed in a drop down or similar UI element and the user can select thier carrier. The selected carrier ID value is used in several API calls.
CopyVB.NET
If the user is not presented this list explicitly, it is up to the integrator to map the Phone Sherpa carrier ID values into its own notion of carrier or user account information.
Below is an example of how to use this function:
Public Sub Populate_Carriers(ByVal CountryID As Integer, ByRef ddCarrier As DropDownList) Dim SherpaService As New PhoneSherpa.Services.WS Dim Carrier_Response As PhoneSherpa.Services.GetCarrierListResult = Nothing Dim CarrierItem As PhoneSherpa.Services.Carrier = Nothing Carrier_Response = SherpaService.GetCarrierList("My_WSAccessKey", CountryID) If Carrier_Response.Result.ErrorCode = 0 Then ddCarrier.Items.Clear() For Each CarrierItem In Carrier_Response.Carriers ddCarrier.Items.Add(New ListItem(CarrierItem.Name, CarrierItem.Id.ToString)) Next Else 'error - failed calling the get carrier list call. Handle this here. End If End Sub