class Twilio::REST::Supersim::V1::UsageRecordInstance
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Public Class Methods
Initialize the UsageRecordInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@return [UsageRecordInstance] UsageRecordInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 252 def initialize(version, payload) 253 super(version) 254 255 # Marshaled Properties 256 @properties = { 257 'account_sid' => payload['account_sid'], 258 'sim_sid' => payload['sim_sid'], 259 'network_sid' => payload['network_sid'], 260 'fleet_sid' => payload['fleet_sid'], 261 'iso_country' => payload['iso_country'], 262 'period' => payload['period'], 263 'data_upload' => payload['data_upload'].to_i, 264 'data_download' => payload['data_download'].to_i, 265 'data_total' => payload['data_total'].to_i, 266 } 267 end
Public Instance Methods
@return [String] The SID of the Account that incurred the usage.
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 271 def account_sid 272 @properties['account_sid'] 273 end
@return [String] Total data downloaded in bytes, aggregated by the query parameters.
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 313 def data_download 314 @properties['data_download'] 315 end
@return [String] Total of data_upload
and data_download.
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 319 def data_total 320 @properties['data_total'] 321 end
@return [String] Total data uploaded in bytes, aggregated by the query parameters.
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 307 def data_upload 308 @properties['data_upload'] 309 end
@return [String] SID of the Fleet resource on which the usage occurred.
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 289 def fleet_sid 290 @properties['fleet_sid'] 291 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 331 def inspect 332 "<Twilio.Supersim.V1.UsageRecordInstance>" 333 end
@return [String] Alpha-2 ISO Country Code of the country the usage occurred in.
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 295 def iso_country 296 @properties['iso_country'] 297 end
@return [String] SID of the Network resource on which the usage occurred.
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 283 def network_sid 284 @properties['network_sid'] 285 end
@return [Hash] The time period for which the usage is reported.
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 301 def period 302 @properties['period'] 303 end
@return [String] SID of a Sim resource to which the UsageRecord belongs.
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 277 def sim_sid 278 @properties['sim_sid'] 279 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/supersim/v1/usage_record.rb 325 def to_s 326 "<Twilio.Supersim.V1.UsageRecordInstance>" 327 end