Class: Twilio::REST::Supersim::V1::UsageRecordInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Supersim::V1::UsageRecordInstance
- Defined in:
- lib/twilio-ruby/rest/supersim/v1/usage_record.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that incurred the usage.
-
#billed_unit ⇒ String
The currency in which the billed amounts are measured, specified in the 3 letter ISO 4127 format (e.g.
USD,EUR,JPY). -
#data_download ⇒ String
Total data downloaded in bytes, aggregated by the query parameters.
-
#data_total ⇒ String
Total of data_upload and data_download.
-
#data_total_billed ⇒ Float
Total amount in the
billed_unitthat was charged for the data uploaded or downloaded. -
#data_upload ⇒ String
Total data uploaded in bytes, aggregated by the query parameters.
-
#fleet_sid ⇒ String
SID of the Fleet resource the usage occurred on.
-
#initialize(version, payload) ⇒ UsageRecordInstance
constructor
Initialize the UsageRecordInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#iso_country ⇒ String
Alpha-2 ISO Country Code that the usage occurred in.
-
#network_sid ⇒ String
SID of the Network resource the usage occurred on.
-
#period ⇒ Hash
The time period for which the usage is reported.
-
#sim_sid ⇒ String
SID of a Sim resource to which the UsageRecord belongs.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload) ⇒ UsageRecordInstance
Initialize the UsageRecordInstance
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 323 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'sim_sid' => payload['sim_sid'], 'network_sid' => payload['network_sid'], 'fleet_sid' => payload['fleet_sid'], 'iso_country' => payload['iso_country'], 'period' => payload['period'], 'data_upload' => payload['data_upload'], 'data_download' => payload['data_download'], 'data_total' => payload['data_total'], 'data_total_billed' => payload['data_total_billed'], 'billed_unit' => payload['billed_unit'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that incurred the usage.
346 347 348 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 346 def account_sid @properties['account_sid'] end |
#billed_unit ⇒ String
Returns The currency in which the billed amounts are measured, specified in the 3 letter ISO 4127 format (e.g. USD, EUR, JPY). This can be null when data_toal_billed is 0 and we do not yet have billing information for the corresponding data usage. Refer to Data Usage Processing for more details.
406 407 408 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 406 def billed_unit @properties['billed_unit'] end |
#data_download ⇒ String
Returns Total data downloaded in bytes, aggregated by the query parameters.
388 389 390 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 388 def data_download @properties['data_download'] end |
#data_total ⇒ String
Returns Total of data_upload and data_download.
394 395 396 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 394 def data_total @properties['data_total'] end |
#data_total_billed ⇒ Float
Returns Total amount in the billed_unit that was charged for the data uploaded or downloaded. Will return 0 for usage prior to February 1, 2022. Value may be 0 despite data_total being greater than 0 if the data usage is still being processed by Twilio's billing system. Refer to Data Usage Processing for more details.
400 401 402 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 400 def data_total_billed @properties['data_total_billed'] end |
#data_upload ⇒ String
Returns Total data uploaded in bytes, aggregated by the query parameters.
382 383 384 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 382 def data_upload @properties['data_upload'] end |
#fleet_sid ⇒ String
Returns SID of the Fleet resource the usage occurred on. Value will only be present when either a value for the Fleet query parameter is provided or when UsageRecords are grouped by fleet. Otherwise, the value will be null.
364 365 366 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 364 def fleet_sid @properties['fleet_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
418 419 420 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 418 def inspect "<Twilio.Supersim.V1.UsageRecordInstance>" end |
#iso_country ⇒ String
Returns Alpha-2 ISO Country Code that the usage occurred in. Value will only be present when either a value for the IsoCountry query parameter is provided or when UsageRecords are grouped by isoCountry. Otherwise, the value will be null.
370 371 372 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 370 def iso_country @properties['iso_country'] end |
#network_sid ⇒ String
Returns SID of the Network resource the usage occurred on. Value will only be present when either a value for the Network query parameter is provided or when UsageRecords are grouped by network. Otherwise, the value will be null.
358 359 360 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 358 def network_sid @properties['network_sid'] end |
#period ⇒ Hash
Returns The time period for which the usage is reported. The period is represented as a pair of start_time and end_time timestamps specified in ISO 8601 format.
376 377 378 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 376 def period @properties['period'] end |
#sim_sid ⇒ String
Returns SID of a Sim resource to which the UsageRecord belongs. Value will only be present when either a value for the Sim query parameter is provided or when UsageRecords are grouped by sim. Otherwise, the value will be null.
352 353 354 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 352 def sim_sid @properties['sim_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
412 413 414 |
# File 'lib/twilio-ruby/rest/supersim/v1/usage_record.rb', line 412 def to_s "<Twilio.Supersim.V1.UsageRecordInstance>" end |