Class: Twilio::REST::Wireless::V1::SimContext::DataSessionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Wireless::V1::SimContext::DataSessionInstance
- Defined in:
- lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique id of the Account that the SIM belongs to.
-
#cell_id ⇒ String
The unique id of the cellular tower that the device was attached to at the moment when the Data Session was last updated.
-
#cell_location_estimate ⇒ Hash
An object representing the estimated location where the device’s Data Session took place.
-
#end_ ⇒ Time
The date that this record ended, given as GMT in ISO 8601 format.
-
#imei ⇒ String
The unique id of the device using the SIM to connect.
-
#initialize(version, payload, sim_sid: nil) ⇒ DataSessionInstance
constructor
Initialize the DataSessionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#last_updated ⇒ Time
The date that this resource was last updated, given as GMT in ISO 8601 format.
-
#operator_country ⇒ String
The three letter country code representing where the device’s Data Session took place.
-
#operator_mcc ⇒ String
The ‘mobile country code’ is the unique id of the home country where the Data Session took place.
-
#operator_mnc ⇒ String
The ‘mobile network code’ is the unique id specific to the mobile operator network where the Data Session took place.
-
#operator_name ⇒ String
The friendly name of the mobile operator network that the SIM-connected device is attached to.
-
#packets_downloaded ⇒ String
The number of packets downloaded by the device between the start time and when the Data Session was last updated.
-
#packets_uploaded ⇒ String
The number of packets uploaded by the device between the start time and when the Data Session was last updated.
-
#radio_link ⇒ String
The generation of wireless technology that the device was attached to the cellular tower using.
-
#sid ⇒ String
The unique id of the Data Session resource that this Data Record is for.
-
#sim_sid ⇒ String
The unique id of the SIM resource that this Data Session is for.
-
#start ⇒ Time
The date that this Data Session started, given as GMT in ISO 8601 format.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, sim_sid: nil) ⇒ DataSessionInstance
Initialize the DataSessionInstance
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 165 def initialize(version, payload, sim_sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'sim_sid' => payload['sim_sid'], 'account_sid' => payload['account_sid'], 'radio_link' => payload['radio_link'], 'operator_mcc' => payload['operator_mcc'], 'operator_mnc' => payload['operator_mnc'], 'operator_country' => payload['operator_country'], 'operator_name' => payload['operator_name'], 'cell_id' => payload['cell_id'], 'cell_location_estimate' => payload['cell_location_estimate'], 'packets_uploaded' => payload['packets_uploaded'].to_i, 'packets_downloaded' => payload['packets_downloaded'].to_i, 'last_updated' => Twilio.deserialize_iso8601_datetime(payload['last_updated']), 'start' => Twilio.deserialize_iso8601_datetime(payload['start']), 'end_' => Twilio.deserialize_iso8601_datetime(payload['end']), 'imei' => payload['imei'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique id of the Account that the SIM belongs to.
203 204 205 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 203 def account_sid @properties['account_sid'] end |
#cell_id ⇒ String
Returns The unique id of the cellular tower that the device was attached to at the moment when the Data Session was last updated.
239 240 241 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 239 def cell_id @properties['cell_id'] end |
#cell_location_estimate ⇒ Hash
Returns An object representing the estimated location where the device’s Data Session took place.
245 246 247 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 245 def cell_location_estimate @properties['cell_location_estimate'] end |
#end_ ⇒ Time
Returns The date that this record ended, given as GMT in ISO 8601 format.
275 276 277 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 275 def end_ @properties['end_'] end |
#imei ⇒ String
Returns The unique id of the device using the SIM to connect.
281 282 283 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 281 def imei @properties['imei'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
293 294 295 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 293 def inspect "<Twilio.Wireless.V1.DataSessionInstance>" end |
#last_updated ⇒ Time
Returns The date that this resource was last updated, given as GMT in ISO 8601 format.
263 264 265 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 263 def last_updated @properties['last_updated'] end |
#operator_country ⇒ String
Returns The three letter country code representing where the device’s Data Session took place.
227 228 229 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 227 def operator_country @properties['operator_country'] end |
#operator_mcc ⇒ String
Returns The ‘mobile country code’ is the unique id of the home country where the Data Session took place.
215 216 217 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 215 def operator_mcc @properties['operator_mcc'] end |
#operator_mnc ⇒ String
Returns The ‘mobile network code’ is the unique id specific to the mobile operator network where the Data Session took place.
221 222 223 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 221 def operator_mnc @properties['operator_mnc'] end |
#operator_name ⇒ String
Returns The friendly name of the mobile operator network that the SIM-connected device is attached to.
233 234 235 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 233 def operator_name @properties['operator_name'] end |
#packets_downloaded ⇒ String
Returns The number of packets downloaded by the device between the start time and when the Data Session was last updated.
257 258 259 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 257 def packets_downloaded @properties['packets_downloaded'] end |
#packets_uploaded ⇒ String
Returns The number of packets uploaded by the device between the start time and when the Data Session was last updated.
251 252 253 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 251 def packets_uploaded @properties['packets_uploaded'] end |
#radio_link ⇒ String
Returns The generation of wireless technology that the device was attached to the cellular tower using.
209 210 211 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 209 def radio_link @properties['radio_link'] end |
#sid ⇒ String
Returns The unique id of the Data Session resource that this Data Record is for.
191 192 193 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 191 def sid @properties['sid'] end |
#sim_sid ⇒ String
Returns The unique id of the SIM resource that this Data Session is for.
197 198 199 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 197 def sim_sid @properties['sim_sid'] end |
#start ⇒ Time
Returns The date that this Data Session started, given as GMT in ISO 8601 format.
269 270 271 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 269 def start @properties['start'] end |
#to_s ⇒ Object
Provide a user friendly representation
287 288 289 |
# File 'lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb', line 287 def to_s "<Twilio.Wireless.V1.DataSessionInstance>" end |