|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hoiio.sdk.services.HttpService
com.hoiio.sdk.services.FaxService
public class FaxService
Fax API provides developers access to faxing capabilities by using our simple API. Developers can use the Fax API to send, and also to receive fax via Hoiio virtual numbers.
For more info please refer to: http://developer.hoiio.com/docs/fax.html
Constructor Summary | |
---|---|
FaxService(String appId,
String accessToken)
Constructs the service to make all Fax requests |
Method Summary | |
---|---|
Fax |
fetchFax(String txnRef)
Querys the current status of a fax made previously |
FaxHistory |
fetchHistory()
Retrieves the history of faxes sent by this application. |
FaxHistory |
fetchHistory(Date from,
Date to,
Integer page,
FaxType type)
Retrieves the history of faxes sent by this application. |
FaxRate |
fetchIncomingRate(String incoming)
Retrieves the billable rate that will be charged for fax received |
FaxRate |
fetchOutgoingRate(String dest)
Retrieves the billable rate that will be charged for fax sent |
FaxTxn |
send(String dest,
File file)
Sends a fax file to a fax number. |
FaxTxn |
send(String dest,
File file,
String filename,
String callerId,
String tag,
String notifyUrl)
Sends a fax file to a fax number. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FaxService(String appId, String accessToken)
appId
- AppID of the developeraccessToken
- AccessToken of the developerMethod Detail |
---|
public Fax fetchFax(String txnRef) throws HoiioException
txnRef
- The unique reference ID for the required transaction.
HoiioException
public FaxHistory fetchHistory() throws HoiioException
HoiioException
public FaxHistory fetchHistory(Date from, Date to, Integer page, FaxType type) throws HoiioException
from
- (optional) Retrieve fax history made by this app starting from this date/time in "YYYY-MM-DD HH:MM:SS" (GMT+8) format. E.g. "2010-01-01 00:00:00". If omitted, fax history will be retrieved from the earliest transaction.to
- (optional) Retrieve fax history made by this app before this date/time in "YYYY-MM-DD HH:MM:SS" (GMT+8) format. E.g. "2010-01-01 00:00:00". If omitted, fax history will be retrieved up to the current point of time.page
- (optional) Each request returns a maximum of 100 entries. This parameter indicates which subset of entries to return.type
- (optional) The type of transaction you want to retrieve: outgoing, incoming, all
HoiioException
public FaxRate fetchIncomingRate(String incoming) throws HoiioException
incoming
- Your Hoiio number to receive incoming fax.
HoiioException
public FaxRate fetchOutgoingRate(String dest) throws HoiioException
dest
- The recipient number of the fax. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.
HoiioException
public FaxTxn send(String dest, File file) throws HoiioException
dest
- The destination to send the fax to. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.file
- The file to be faxed. The file must be in PDF format with a page size of either A4 or Letter and its file size can be at most 2MB.
HoiioException
public FaxTxn send(String dest, File file, String filename, String callerId, String tag, String notifyUrl) throws HoiioException
dest
- The destination to send the fax to. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.file
- The file to be faxed. The file must be in PDF format with a page size of either A4 or Letter and its file size can be at most 2MB.filename
- (optional) The name of the file that is downloaded from the fax_url given in FetchFax and FetchHistory.callerId
- (optional) This is the Caller ID that the receiver will see on their incoming faxtag
- (optional) This is a text string containing your own reference ID for this transaction. This value will be included in the response for Notification, FetchFax and FetchHistory for your reference. Max 256 characters.notifyUrl
- (optional) A fully-qualified HTTP/S callback URL on your web server to be notified when the fax finishes
HoiioException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |