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 unique id of the Account that the SIM belongs to.
-
#commands ⇒ Hash
An object representing the Commands usage for the SIM over the period.
-
#data ⇒ Hash
An object representing the Data usage for the SIM over the 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 usage is reported.
-
#sim_sid ⇒ String
The unique id of the 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 unique id of the Account that the SIM belongs to.
208 209 210 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 208 def account_sid @properties['account_sid'] end |
#commands ⇒ Hash
Returns An object representing the Commands usage for the SIM over the period.
220 221 222 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 220 def commands @properties['commands'] end |
#data ⇒ Hash
Returns An object representing the Data usage for the SIM over the period.
226 227 228 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 226 def data @properties['data'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
238 239 240 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 238 def inspect "<Twilio.Wireless.V1.UsageRecordInstance>" end |
#period ⇒ Hash
Returns The time period for which usage is reported.
214 215 216 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 214 def period @properties['period'] end |
#sim_sid ⇒ String
Returns The unique id of the SIM resource that this Usage Record is for.
202 203 204 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 202 def sim_sid @properties['sim_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
232 233 234 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb', line 232 def to_s "<Twilio.Wireless.V1.UsageRecordInstance>" end |