public class UsageRecordReader extends Reader<UsageRecord>
Constructor and Description |
---|
UsageRecordReader(String pathSimSid)
Construct a new UsageRecordReader.
|
Modifier and Type | Method and 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 occurred on or before this date, specified in [ISO
8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
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, specified in [ISO
8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
public UsageRecordReader(String pathSimSid)
pathSimSid
- The SID of the Sim resource to read the usage frompublic UsageRecordReader setEnd(org.joda.time.DateTime end)
end
- Only include usage that occurred on or before this datepublic UsageRecordReader setStart(org.joda.time.DateTime start)
start
- Only include usage that has occurred on or after this datepublic UsageRecordReader setGranularity(UsageRecord.Granularity granularity)
granularity
- The time-based grouping that results are aggregated bypublic ResourceSet<UsageRecord> read(TwilioRestClient client)
read
in class Reader<UsageRecord>
client
- TwilioRestClient with which to make the requestpublic Page<UsageRecord> firstPage(TwilioRestClient client)
firstPage
in class Reader<UsageRecord>
client
- TwilioRestClient with which to make the requestpublic Page<UsageRecord> getPage(String targetUrl, TwilioRestClient client)
getPage
in class Reader<UsageRecord>
targetUrl
- API-generated URL for the requested results pageclient
- TwilioRestClient with which to make the requestpublic Page<UsageRecord> nextPage(Page<UsageRecord> page, TwilioRestClient client)
nextPage
in class Reader<UsageRecord>
page
- current pageclient
- TwilioRestClient with which to make the requestpublic Page<UsageRecord> previousPage(Page<UsageRecord> page, TwilioRestClient client)
previousPage
in class Reader<UsageRecord>
page
- current pageclient
- TwilioRestClient with which to make the requestCopyright © 2019 Twilio, Inc. All Rights Reserved.