Class: Twilio::REST::Accounts::V1::CredentialList::AwsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Accounts::V1::CredentialList::AwsContext
- Defined in:
- lib/twilio-ruby/rest/accounts/v1/credential/aws.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the AwsInstance.
-
#fetch ⇒ AwsInstance
Fetch the AwsInstance.
-
#initialize(version, sid) ⇒ AwsContext
constructor
Initialize the AwsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: :unset) ⇒ AwsInstance
Update the AwsInstance.
Constructor Details
#initialize(version, sid) ⇒ AwsContext
Initialize the AwsContext
159 160 161 162 163 164 165 166 167 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 159 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Credentials/AWS/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the AwsInstance
171 172 173 174 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 171 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ AwsInstance
Fetch the AwsInstance
179 180 181 182 183 184 185 186 187 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 179 def fetch payload = @version.fetch('GET', @uri) AwsInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
219 220 221 222 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 219 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Accounts.V1.AwsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
212 213 214 215 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 212 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Accounts.V1.AwsContext #{context}>" end |
#update(friendly_name: :unset) ⇒ AwsInstance
Update the AwsInstance
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 193 def update( friendly_name: :unset ) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, }) payload = @version.update('POST', @uri, data: data) AwsInstance.new( @version, payload, sid: @solution[:sid], ) end |