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
Deletes the AwsInstance.
-
#fetch ⇒ AwsInstance
Fetch a AwsInstance.
-
#initialize(version, sid) ⇒ AwsContext
constructor
Initialize the AwsContext.
-
#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
172 173 174 175 176 177 178 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 172 def initialize(version, sid) super(version) # Path Solution @solution = {sid: sid} @uri = "/Credentials/AWS/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Deletes the AwsInstance
214 215 216 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 214 def delete @version.delete('delete', @uri) end |
#fetch ⇒ AwsInstance
Fetch a AwsInstance
183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 183 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) AwsInstance.new(@version, payload, sid: @solution[:sid]) end |
#to_s ⇒ Object
Provide a user friendly representation
220 221 222 223 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 220 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
199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/twilio-ruby/rest/accounts/v1/credential/aws.rb', line 199 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 |