com.hoiio.sdk.objects.voice
Class Call

java.lang.Object
  extended by com.hoiio.sdk.objects.HoiioResponse
      extended by com.hoiio.sdk.objects.voice.Call

public class Call
extends HoiioResponse


Constructor Summary
Call(net.sf.json.JSONObject output)
          Constructs a new Call object by decoding the JSONObject as a response from the HTTP Request
 
Method Summary
 CallStatus getCallStatusDest1()
          Gets the status of the call to dest1
 CallStatus getCallStatusDest2()
          Gets the status of the call to dest2
 Currency getCurrency()
          Gets the currency used for this transaction
 Date getDate()
          Gets the Date/time of this transaction
 double getDebit()
          Gets the total amount billed for this transaction
 String getDest1()
          Gets the first number dialed in this transaction
 String getDest2()
          Gets the second number dialed in this transaction
 int getDuration()
          Gets the duration of the call in minutes
 double getRate()
          Gets the per-minute charges for this transaction
 String getTag()
          Gets your own reference ID submitted in the initial Call request
 String getTxnRef()
          Gets the unique reference ID for this transaction
 
Methods inherited from class com.hoiio.sdk.objects.HoiioResponse
getContent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Call

public Call(net.sf.json.JSONObject output)
     throws HoiioException
Constructs a new Call object by decoding the JSONObject as a response from the HTTP Request

Parameters:
output - The response of the HTTP Request
Throws:
HoiioException
Method Detail

getCallStatusDest1

public CallStatus getCallStatusDest1()
Gets the status of the call to dest1

Returns:
Dial status of the call to dest1.

getCallStatusDest2

public CallStatus getCallStatusDest2()
Gets the status of the call to dest2

Returns:
Dial status of the call to dest2.

getCurrency

public Currency getCurrency()
Gets the currency used for this transaction

Returns:
Currency used for this transaction.

getDate

public Date getDate()
Gets the Date/time of this transaction

Returns:
Date/time (GMT+8) of the call in "YYYY-MM-DD HH:MM:SS" format.

getDebit

public double getDebit()
Gets the total amount billed for this transaction

Returns:
Total amount billed for this transaction. If the call is still ongoing, this parameter will not be provided.

getDest1

public String getDest1()
Gets the first number dialed in this transaction

Returns:
The first number dialed in this call. Phone numbers start with a "+" and country code (E.164 format), e.g. +6511111111.

getDest2

public String getDest2()
Gets the second number dialed in this transaction

Returns:
The second number dialed in this call. Phone numbers start with a "+" and country code (E.164 format), e.g. +6511111111.

getDuration

public int getDuration()
Gets the duration of the call in minutes

Returns:
Duration of the call in minutes. If the call is still ongoing, this parameter will not be provided.

getRate

public double getRate()
Gets the per-minute charges for this transaction

Returns:
Per-minute charges for this call transaction.

getTag

public String getTag()
Gets your own reference ID submitted in the initial Call request

Returns:
Your own reference ID submitted in the initial MakeCalls request. This parameter will not be present if it wasn't included in the initial request.

getTxnRef

public String getTxnRef()
Gets the unique reference ID for this transaction

Returns:
The unique reference ID for this transaction.