class Twilio::REST::Api::V2010::AccountContext::UsageList::RecordList::AllTimeInstance

Public Class Methods

new(version, payload, account_sid: nil) click to toggle source

Initialize the AllTimeInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] account_sid A 34 character string that uniquely identifies this

resource.

@return [AllTimeInstance] AllTimeInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
220 def initialize(version, payload, account_sid: nil)
221   super(version)
222 
223   # Marshaled Properties
224   @properties = {
225       'account_sid' => payload['account_sid'],
226       'api_version' => payload['api_version'],
227       'as_of' => payload['as_of'],
228       'category' => payload['category'],
229       'count' => payload['count'],
230       'count_unit' => payload['count_unit'],
231       'description' => payload['description'],
232       'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
233       'price' => payload['price'].to_f,
234       'price_unit' => payload['price_unit'],
235       'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
236       'subresource_uris' => payload['subresource_uris'],
237       'uri' => payload['uri'],
238       'usage' => payload['usage'],
239       'usage_unit' => payload['usage_unit'],
240   }
241 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account accrued the usage

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
245 def account_sid
246   @properties['account_sid']
247 end
api_version() click to toggle source

@return [String] The API version used to create the resource

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
251 def api_version
252   @properties['api_version']
253 end
as_of() click to toggle source

@return [String] Usage records up to date as of this timestamp

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
257 def as_of
258   @properties['as_of']
259 end
category() click to toggle source

@return [all_time.Category] The category of usage

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
263 def category
264   @properties['category']
265 end
count() click to toggle source

@return [String] The number of usage events

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
269 def count
270   @properties['count']
271 end
count_unit() click to toggle source

@return [String] The units in which count is measured

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
275 def count_unit
276   @properties['count_unit']
277 end
description() click to toggle source

@return [String] A plain-language description of the usage category

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
281 def description
282   @properties['description']
283 end
end_date() click to toggle source

@return [Date] The last date for which usage is included in the UsageRecord

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
287 def end_date
288   @properties['end_date']
289 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
341 def inspect
342   "<Twilio.Api.V2010.AllTimeInstance>"
343 end
price() click to toggle source

@return [String] The total price of the usage

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
293 def price
294   @properties['price']
295 end
price_unit() click to toggle source

@return [String] The currency in which `price` is measured

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
299 def price_unit
300   @properties['price_unit']
301 end
start_date() click to toggle source

@return [Date] The first date for which usage is included in this UsageRecord

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
305 def start_date
306   @properties['start_date']
307 end
subresource_uris() click to toggle source

@return [String] A list of related resources identified by their relative URIs

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
311 def subresource_uris
312   @properties['subresource_uris']
313 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
335 def to_s
336   "<Twilio.Api.V2010.AllTimeInstance>"
337 end
uri() click to toggle source

@return [String] The URI of the resource, relative to `api.twilio.com`

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
317 def uri
318   @properties['uri']
319 end
usage() click to toggle source

@return [String] The amount of usage

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
323 def usage
324   @properties['usage']
325 end
usage_unit() click to toggle source

@return [String] The units in which usage is measured

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb
329 def usage_unit
330   @properties['usage_unit']
331 end