Class: Twilio::REST::Wireless::V1::UsageRecordInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Wireless::V1::UsageRecordInstance
- Defined in:
- lib/twilio-ruby/rest/wireless/v1/usage_record.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the AccountUsageRecord resource.
-
#commands ⇒ Hash
An object that describes the aggregated Commands usage for all SIMs during the specified period.
-
#data ⇒ Hash
An object that describes the aggregated Data usage for all SIMs over the period.
-
#initialize(version, payload) ⇒ UsageRecordInstance
constructor
Initialize the UsageRecordInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#period ⇒ Hash
The time period for which usage is reported.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload) ⇒ UsageRecordInstance
Initialize the UsageRecordInstance
283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 283 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_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the AccountUsageRecord resource.
299 300 301 |
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 299 def account_sid @properties['account_sid'] end |
#commands ⇒ Hash
Returns An object that describes the aggregated Commands usage for all SIMs during the specified period. See [Commands Usage Object](www.twilio.com/docs/iot/wireless/api/account-usagerecord-resource#commands-usage-object).
311 312 313 |
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 311 def commands @properties['commands'] end |
#data ⇒ Hash
Returns An object that describes the aggregated Data usage for all SIMs over the period. See [Data Usage Object](www.twilio.com/docs/iot/wireless/api/account-usagerecord-resource#data-usage-object).
317 318 319 |
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 317 def data @properties['data'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
329 330 331 |
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 329 def inspect "<Twilio.Wireless.V1.UsageRecordInstance>" end |
#period ⇒ Hash
Returns The time period for which usage is reported. Contains ‘start` and `end` properties that describe the period using GMT date-time values specified in [ISO 8601](www.iso.org/iso-8601-date-and-time-format.html) format.
305 306 307 |
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 305 def period @properties['period'] end |
#to_s ⇒ Object
Provide a user friendly representation
323 324 325 |
# File 'lib/twilio-ruby/rest/wireless/v1/usage_record.rb', line 323 def to_s "<Twilio.Wireless.V1.UsageRecordInstance>" end |