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