Class: Twilio::REST::FlexApi::V1::PluginVersionArchiveContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::PluginVersionArchiveContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb
Instance Method Summary collapse
-
#initialize(version, plugin_sid, sid) ⇒ PluginVersionArchiveContext
constructor
Initialize the PluginVersionArchiveContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(flex_metadata: :unset) ⇒ PluginVersionArchiveInstance
Update the PluginVersionArchiveInstance.
Constructor Details
#initialize(version, plugin_sid, sid) ⇒ PluginVersionArchiveContext
Initialize the PluginVersionArchiveContext
50 51 52 53 54 55 56 57 58 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb', line 50 def initialize(version, plugin_sid, sid) super(version) # Path Solution @solution = { plugin_sid: plugin_sid, sid: sid, } @uri = "/PluginService/Plugins/#{@solution[:plugin_sid]}/Versions/#{@solution[:sid]}/Archive" end |
Instance Method Details
#inspect ⇒ Object
Provide a detailed, user friendly representation
92 93 94 95 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb', line 92 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.PluginVersionArchiveContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
85 86 87 88 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb', line 85 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.PluginVersionArchiveContext #{context}>" end |
#update(flex_metadata: :unset) ⇒ PluginVersionArchiveInstance
Update the PluginVersionArchiveInstance
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb', line 63 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) PluginVersionArchiveInstance.new( @version, payload, plugin_sid: @solution[:plugin_sid], sid: @solution[:sid], ) end |