Class: Twilio::REST::Wireless::V1::SimContext::UsageRecordInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Wireless::V1::SimContext::UsageRecordInstance
- Defined in:
- lib/twilio-ruby/rest/wireless/v1/sim/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 UsageRecord resource.
-
#commands ⇒ Hash
An object that describes the SIM’s usage of Commands during the specified period.
-
#data ⇒ Hash
An object that describes the SIM’s data usage during the specified period.
-
#initialize(version, payload, sim_sid: nil) ⇒ UsageRecordInstance
constructor
Initialize the UsageRecordInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#period ⇒ Hash
The time period for which the usage is reported.
-
#sim_sid ⇒ String
The SID of the [Sim resource](www.twilio.com/docs/iot/wireless/api/sim-resource) that this Usage Record is for.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, sim_sid: nil) ⇒ UsageRecordInstance
Initialize the UsageRecordInstance
187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 187 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_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the UsageRecord resource.
209 210 211 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 209 def account_sid @properties['account_sid'] end |
#commands ⇒ Hash
Returns An object that describes the SIM’s usage of Commands during the specified period. See [Commands Usage Object](www.twilio.com/docs/iot/wireless/api/sim-usagerecord-resource#commands-usage-object).
221 222 223 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 221 def commands @properties['commands'] end |
#data ⇒ Hash
Returns An object that describes the SIM’s data usage during the specified period. See [Data Usage Object](www.twilio.com/docs/iot/wireless/api/sim-usagerecord-resource#data-usage-object).
227 228 229 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 227 def data @properties['data'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
239 240 241 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 239 def inspect "<Twilio.Wireless.V1.UsageRecordInstance>" end |
#period ⇒ Hash
Returns The time period for which the usage is reported. Contains ‘start` and `end` datetime values given as GMT in [ISO 8601](www.iso.org/iso-8601-date-and-time-format.html) format.
215 216 217 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 215 def period @properties['period'] end |
#sim_sid ⇒ String
Returns The SID of the [Sim resource](www.twilio.com/docs/iot/wireless/api/sim-resource) that this Usage Record is for.
203 204 205 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 203 def sim_sid @properties['sim_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
233 234 235 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 233 def to_s "<Twilio.Wireless.V1.UsageRecordInstance>" end |