Class: Twilio::REST::Supersim::V1::FleetContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Supersim::V1::FleetContext
- Defined in:
- lib/twilio-ruby/rest/supersim/v1/fleet.rb
Instance Method Summary collapse
-
#fetch ⇒ FleetInstance
Fetch the FleetInstance.
-
#initialize(version, sid) ⇒ FleetContext
constructor
Initialize the FleetContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset, data_limit: :unset) ⇒ FleetInstance
Update the FleetInstance.
Constructor Details
#initialize(version, sid) ⇒ FleetContext
Initialize the FleetContext
191 192 193 194 195 196 197 198 199 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 191 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Fleets/#{@solution[:sid]}" end |
Instance Method Details
#fetch ⇒ FleetInstance
Fetch the FleetInstance
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 203 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) FleetInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
273 274 275 276 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 273 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Supersim.V1.FleetContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
266 267 268 269 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 266 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Supersim.V1.FleetContext #{context}>" end |
#update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset, data_limit: :unset) ⇒ FleetInstance
Update the FleetInstance
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 229 def update( unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset, data_limit: :unset ) data = Twilio::Values.of({ 'UniqueName' => unique_name, 'NetworkAccessProfile' => network_access_profile, 'IpCommandsUrl' => ip_commands_url, 'IpCommandsMethod' => ip_commands_method, 'SmsCommandsUrl' => sms_commands_url, 'SmsCommandsMethod' => sms_commands_method, 'DataLimit' => data_limit, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) FleetInstance.new( @version, payload, sid: @solution[:sid], ) end |