class Twilio::REST::Wireless::V1::SimContext::DataSessionInstance

Public Class Methods

new(version, payload, sim_sid: nil) click to toggle source

Initialize the DataSessionInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sim_sid The SID of the {Sim

resource}[https://www.twilio.com/docs/wireless/api/sim-resource] that the Data
Session is for.

@return [DataSessionInstance] DataSessionInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
155 def initialize(version, payload, sim_sid: nil)
156   super(version)
157 
158   # Marshaled Properties
159   @properties = {
160       'sid' => payload['sid'],
161       'sim_sid' => payload['sim_sid'],
162       'account_sid' => payload['account_sid'],
163       'radio_link' => payload['radio_link'],
164       'operator_mcc' => payload['operator_mcc'],
165       'operator_mnc' => payload['operator_mnc'],
166       'operator_country' => payload['operator_country'],
167       'operator_name' => payload['operator_name'],
168       'cell_id' => payload['cell_id'],
169       'cell_location_estimate' => payload['cell_location_estimate'],
170       'packets_uploaded' => payload['packets_uploaded'].to_i,
171       'packets_downloaded' => payload['packets_downloaded'].to_i,
172       'last_updated' => Twilio.deserialize_iso8601_datetime(payload['last_updated']),
173       'start' => Twilio.deserialize_iso8601_datetime(payload['start']),
174       'end_' => Twilio.deserialize_iso8601_datetime(payload['end']),
175       'imei' => payload['imei'],
176   }
177 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
193 def account_sid
194   @properties['account_sid']
195 end
cell_id() click to toggle source

@return [String] The unique ID of the cellular tower that the device was attached to at the moment when the Data Session was last updated

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
229 def cell_id
230   @properties['cell_id']
231 end
cell_location_estimate() click to toggle source

@return [Hash] An object with the estimated location where the device's Data Session took place

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
235 def cell_location_estimate
236   @properties['cell_location_estimate']
237 end
end_() click to toggle source

@return [Time] The date that the record ended, given as GMT in ISO 8601 format

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
265 def end_
266   @properties['end_']
267 end
imei() click to toggle source

@return [String] The unique ID of the device using the SIM to connect

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
271 def imei
272   @properties['imei']
273 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
283 def inspect
284   "<Twilio.Wireless.V1.DataSessionInstance>"
285 end
last_updated() click to toggle source

@return [Time] The date that the resource was last updated, given as GMT in ISO 8601 format

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
253 def last_updated
254   @properties['last_updated']
255 end
operator_country() click to toggle source

@return [String] The three letter country code representing where the device's Data Session took place

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
217 def operator_country
218   @properties['operator_country']
219 end
operator_mcc() click to toggle source

@return [String] The 'mobile country code' is the unique ID of the home country where the Data Session took place

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
205 def operator_mcc
206   @properties['operator_mcc']
207 end
operator_mnc() click to toggle source

@return [String] The 'mobile network code' is the unique ID specific to the mobile operator network where the Data Session took place

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
211 def operator_mnc
212   @properties['operator_mnc']
213 end
operator_name() click to toggle source

@return [String] The friendly name of the mobile operator network that the SIM-connected device is attached to

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
223 def operator_name
224   @properties['operator_name']
225 end
packets_downloaded() click to toggle source

@return [String] The number of packets downloaded by the device between the start time and when the Data Session was last updated

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
247 def packets_downloaded
248   @properties['packets_downloaded']
249 end
packets_uploaded() click to toggle source

@return [String] The number of packets uploaded by the device between the start time and when the Data Session was last updated

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
241 def packets_uploaded
242   @properties['packets_uploaded']
243 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
181 def sid
182   @properties['sid']
183 end
sim_sid() click to toggle source

@return [String] The SID of the Sim resource that the Data Session is for

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
187 def sim_sid
188   @properties['sim_sid']
189 end
start() click to toggle source

@return [Time] The date that the Data Session started, given as GMT in ISO 8601 format

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
259 def start
260   @properties['start']
261 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb
277 def to_s
278   "<Twilio.Wireless.V1.DataSessionInstance>"
279 end