Class: Twilio::REST::Supersim::V1::NetworkAccessProfileContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Supersim::V1::NetworkAccessProfileContext
- Defined in:
- lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb,
lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Defined Under Namespace
Classes: NetworkAccessProfileNetworkContext, NetworkAccessProfileNetworkInstance, NetworkAccessProfileNetworkList, NetworkAccessProfileNetworkPage
Instance Method Summary collapse
-
#fetch ⇒ NetworkAccessProfileInstance
Fetch the NetworkAccessProfileInstance.
-
#initialize(version, sid) ⇒ NetworkAccessProfileContext
constructor
Initialize the NetworkAccessProfileContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#networks(sid = :unset) ⇒ NetworkAccessProfileNetworkList, NetworkAccessProfileNetworkContext
Access the networks.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(unique_name: :unset) ⇒ NetworkAccessProfileInstance
Update the NetworkAccessProfileInstance.
Constructor Details
#initialize(version, sid) ⇒ NetworkAccessProfileContext
Initialize the NetworkAccessProfileContext
156 157 158 159 160 161 162 163 164 165 |
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb', line 156 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/NetworkAccessProfiles/#{@solution[:sid]}" # Dependents @networks = nil end |
Instance Method Details
#fetch ⇒ NetworkAccessProfileInstance
Fetch the NetworkAccessProfileInstance
169 170 171 172 173 174 175 176 177 |
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb', line 169 def fetch payload = @version.fetch('GET', @uri) NetworkAccessProfileInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
228 229 230 231 |
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb', line 228 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Supersim.V1.NetworkAccessProfileContext #{context}>" end |
#networks(sid = :unset) ⇒ NetworkAccessProfileNetworkList, NetworkAccessProfileNetworkContext
Access the networks
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb', line 203 def networks(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return NetworkAccessProfileNetworkContext.new(@version, @solution[:sid],sid ) end unless @networks @networks = NetworkAccessProfileNetworkList.new( @version, network_access_profile_sid: @solution[:sid], ) end @networks end |
#to_s ⇒ Object
Provide a user friendly representation
221 222 223 224 |
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb', line 221 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Supersim.V1.NetworkAccessProfileContext #{context}>" end |
#update(unique_name: :unset) ⇒ NetworkAccessProfileInstance
Update the NetworkAccessProfileInstance
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb', line 183 def update( unique_name: :unset ) data = Twilio::Values.of({ 'UniqueName' => unique_name, }) payload = @version.update('POST', @uri, data: data) NetworkAccessProfileInstance.new( @version, payload, sid: @solution[:sid], ) end |