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
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#fetch ⇒ FleetInstance
Fetch a 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) ⇒ FleetInstance
Update the FleetInstance.
Constructor Details
#initialize(version, sid) ⇒ FleetContext
Initialize the FleetContext
191 192 193 194 195 196 197 |
# 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 a FleetInstance
202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 202 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) FleetInstance.new(@version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
241 242 243 244 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 241 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Supersim.V1.FleetContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
234 235 236 237 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 234 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Supersim.V1.FleetContext #{context}>" end |
#update(unique_name: :unset) ⇒ FleetInstance
Update the FleetInstance
220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/twilio-ruby/rest/supersim/v1/fleet.rb', line 220 def update(unique_name: :unset) data = Twilio::Values.of({'UniqueName' => unique_name, }) payload = @version.update( 'POST', @uri, data: data, ) FleetInstance.new(@version, payload, sid: @solution[:sid], ) end |