Class: Twilio::REST::FlexApi::V1::PluginArchiveContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::PluginArchiveContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb
Instance Method Summary collapse
-
#initialize(version, sid) ⇒ PluginArchiveContext
constructor
Initialize the PluginArchiveContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(flex_metadata: :unset) ⇒ PluginArchiveInstance
Update the PluginArchiveInstance.
Constructor Details
#initialize(version, sid) ⇒ PluginArchiveContext
Initialize the PluginArchiveContext
49 50 51 52 53 54 55 56 57 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 49 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/PluginService/Plugins/#{@solution[:sid]}/Archive" end |
Instance Method Details
#inspect ⇒ Object
Provide a detailed, user friendly representation
90 91 92 93 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 90 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.PluginArchiveContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
83 84 85 86 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 83 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.PluginArchiveContext #{context}>" end |
#update(flex_metadata: :unset) ⇒ PluginArchiveInstance
Update the PluginArchiveInstance
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 62 def update( flex_metadata: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Flex-Metadata' => , }) payload = @version.update('POST', @uri, headers: headers) PluginArchiveInstance.new( @version, payload, sid: @solution[:sid], ) end |