class Twilio::REST::Api::V2010::AccountContext::UsageList::RecordInstance

Public Class Methods

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

Initialize the RecordInstance @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 [RecordInstance] RecordInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account/usage/record.rb
293 def initialize(version, payload, account_sid: nil)
294   super(version)
295 
296   # Marshaled Properties
297   @properties = {
298       'account_sid' => payload['account_sid'],
299       'api_version' => payload['api_version'],
300       'as_of' => payload['as_of'],
301       'category' => payload['category'],
302       'count' => payload['count'],
303       'count_unit' => payload['count_unit'],
304       'description' => payload['description'],
305       'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
306       'price' => payload['price'].to_f,
307       'price_unit' => payload['price_unit'],
308       'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
309       'subresource_uris' => payload['subresource_uris'],
310       'uri' => payload['uri'],
311       'usage' => payload['usage'],
312       'usage_unit' => payload['usage_unit'],
313   }
314 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.rb
318 def account_sid
319   @properties['account_sid']
320 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.rb
324 def api_version
325   @properties['api_version']
326 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.rb
330 def as_of
331   @properties['as_of']
332 end
category() click to toggle source

@return [record.Category] The category of usage

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

@return [String] The number of usage events

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record.rb
342 def count
343   @properties['count']
344 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.rb
348 def count_unit
349   @properties['count_unit']
350 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.rb
354 def description
355   @properties['description']
356 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.rb
360 def end_date
361   @properties['end_date']
362 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record.rb
414 def inspect
415   "<Twilio.Api.V2010.RecordInstance>"
416 end
price() click to toggle source

@return [String] The total price of the usage

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record.rb
366 def price
367   @properties['price']
368 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.rb
372 def price_unit
373   @properties['price_unit']
374 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.rb
378 def start_date
379   @properties['start_date']
380 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.rb
384 def subresource_uris
385   @properties['subresource_uris']
386 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record.rb
408 def to_s
409   "<Twilio.Api.V2010.RecordInstance>"
410 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.rb
390 def uri
391   @properties['uri']
392 end
usage() click to toggle source

@return [String] The amount of usage

    # File lib/twilio-ruby/rest/api/v2010/account/usage/record.rb
396 def usage
397   @properties['usage']
398 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.rb
402 def usage_unit
403   @properties['usage_unit']
404 end