Package com.twilio.rest.wireless.v1
Class UsageRecordReader
- java.lang.Object
-
- com.twilio.base.Reader<UsageRecord>
-
- com.twilio.rest.wireless.v1.UsageRecordReader
-
public class UsageRecordReader extends Reader<UsageRecord>
-
-
Constructor Summary
Constructors Constructor Description UsageRecordReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Page<UsageRecord>
firstPage(TwilioRestClient client)
Make the request to the Twilio API to perform the read.Page<UsageRecord>
getPage(String targetUrl, TwilioRestClient client)
Retrieve the target page from the Twilio API.Page<UsageRecord>
nextPage(Page<UsageRecord> page, TwilioRestClient client)
Retrieve the next page from the Twilio API.Page<UsageRecord>
previousPage(Page<UsageRecord> page, TwilioRestClient client)
Retrieve the previous page from the Twilio API.ResourceSet<UsageRecord>
read(TwilioRestClient client)
Make the request to the Twilio API to perform the read.UsageRecordReader
setEnd(org.joda.time.DateTime end)
Only include usage that has occurred on or before this date.UsageRecordReader
setGranularity(UsageRecord.Granularity granularity)
How to summarize the usage by time.UsageRecordReader
setStart(org.joda.time.DateTime start)
Only include usage that has occurred on or after this date.
-
-
-
Method Detail
-
setEnd
public UsageRecordReader setEnd(org.joda.time.DateTime end)
Only include usage that has occurred on or before this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)..- Parameters:
end
- Only include usage that has occurred on or before this date- Returns:
- this
-
setStart
public UsageRecordReader setStart(org.joda.time.DateTime start)
Only include usage that has occurred on or after this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)..- Parameters:
start
- Only include usage that has occurred on or after this date- Returns:
- this
-
setGranularity
public UsageRecordReader setGranularity(UsageRecord.Granularity granularity)
How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period..- Parameters:
granularity
- The time-based grouping that results are aggregated by- Returns:
- this
-
read
public ResourceSet<UsageRecord> read(TwilioRestClient client)
Make the request to the Twilio API to perform the read.- Specified by:
read
in classReader<UsageRecord>
- Parameters:
client
- TwilioRestClient with which to make the request- Returns:
- UsageRecord ResourceSet
-
firstPage
public Page<UsageRecord> firstPage(TwilioRestClient client)
Make the request to the Twilio API to perform the read.- Specified by:
firstPage
in classReader<UsageRecord>
- Parameters:
client
- TwilioRestClient with which to make the request- Returns:
- UsageRecord ResourceSet
-
getPage
public Page<UsageRecord> getPage(String targetUrl, TwilioRestClient client)
Retrieve the target page from the Twilio API.- Specified by:
getPage
in classReader<UsageRecord>
- Parameters:
targetUrl
- API-generated URL for the requested results pageclient
- TwilioRestClient with which to make the request- Returns:
- UsageRecord ResourceSet
-
nextPage
public Page<UsageRecord> nextPage(Page<UsageRecord> page, TwilioRestClient client)
Retrieve the next page from the Twilio API.- Specified by:
nextPage
in classReader<UsageRecord>
- Parameters:
page
- current pageclient
- TwilioRestClient with which to make the request- Returns:
- Next Page
-
previousPage
public Page<UsageRecord> previousPage(Page<UsageRecord> page, TwilioRestClient client)
Retrieve the previous page from the Twilio API.- Specified by:
previousPage
in classReader<UsageRecord>
- Parameters:
page
- current pageclient
- TwilioRestClient with which to make the request- Returns:
- Previous Page
-
-