Class: Twilio::REST::FlexApi::V1::PluginArchiveContext

Inherits:
InstanceContext show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, sid) ⇒ PluginArchiveContext

Initialize the PluginArchiveContext

Parameters:

  • version (Version)

    Version that contains the resource

  • sid (String)

    The SID of the Flex Plugin resource to archive.



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

#inspectObject

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_sObject

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

Parameters:

  • flex_metadata (String) (defaults to: :unset)

    The Flex-Metadata HTTP request header

Returns:



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