public class UsageRecordReader extends Reader<UsageRecord>
Constructor and Description |
---|
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(ZonedDateTime 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(ZonedDateTime start)
Only include usage that has occurred on or after this date.
|
public UsageRecordReader setEnd(ZonedDateTime end)
end
- Only include usage that has occurred on or before this datepublic UsageRecordReader setStart(ZonedDateTime 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.