Class: Twilio::REST::Wireless::V1::UsageRecordInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/wireless/v1/usage_record.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ UsageRecordInstance

Initialize the UsageRecordInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio


178
179
180
181
182
183
184
185
186
187
188
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 178

def initialize(version, payload)
  super(version)

  # Marshaled Properties
  @properties = {
      'account_sid' => payload['account_sid'],
      'period' => payload['period'],
      'commands' => payload['commands'],
      'data' => payload['data'],
  }
end

Instance Method Details

#account_sidString

Returns The SID of the Account that created the resource.

Returns:

  • (String)

    The SID of the Account that created the resource


192
193
194
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 192

def 
  @properties['account_sid']
end

#commandsHash

Returns An object that describes the aggregated Commands usage for all SIMs during the specified period.

Returns:

  • (Hash)

    An object that describes the aggregated Commands usage for all SIMs during the specified period


204
205
206
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 204

def commands
  @properties['commands']
end

#dataHash

Returns An object that describes the aggregated Data usage for all SIMs over the period.

Returns:

  • (Hash)

    An object that describes the aggregated Data usage for all SIMs over the period


210
211
212
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 210

def data
  @properties['data']
end

#inspectObject

Provide a detailed, user friendly representation


222
223
224
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 222

def inspect
  "<Twilio.Wireless.V1.UsageRecordInstance>"
end

#periodHash

Returns The time period for which usage is reported.

Returns:

  • (Hash)

    The time period for which usage is reported


198
199
200
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 198

def period
  @properties['period']
end

#to_sObject

Provide a user friendly representation


216
217
218
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 216

def to_s
  "<Twilio.Wireless.V1.UsageRecordInstance>"
end