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

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sim_sid: nil) ⇒ UsageRecordInstance

Initialize the UsageRecordInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • sim_sid (String) (defaults to: nil)

    The SID of the Sim resource that this Usage Record is for.


191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 191

def initialize(version, payload, sim_sid: nil)
  super(version)

  # Marshaled Properties
  @properties = {
      'sim_sid' => payload['sim_sid'],
      '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


212
213
214
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 212

def 
  @properties['account_sid']
end

#commandsHash

Returns An object that describes the SIM's usage of Commands during the specified period.

Returns:

  • (Hash)

    An object that describes the SIM's usage of Commands during the specified period


224
225
226
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 224

def commands
  @properties['commands']
end

#dataHash

Returns An object that describes the SIM's data usage during the specified period.

Returns:

  • (Hash)

    An object that describes the SIM's data usage during the specified period


230
231
232
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 230

def data
  @properties['data']
end

#inspectObject

Provide a detailed, user friendly representation


242
243
244
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 242

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

#periodHash

Returns The time period for which the usage is reported.

Returns:

  • (Hash)

    The time period for which the usage is reported


218
219
220
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 218

def period
  @properties['period']
end

#sim_sidString

Returns The SID of the Sim resource that this Usage Record is for.

Returns:

  • (String)

    The SID of the Sim resource that this Usage Record is for


206
207
208
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 206

def sim_sid
  @properties['sim_sid']
end

#to_sObject

Provide a user friendly representation


236
237
238
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 236

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