Class: Twilio::REST::FlexApi::V1::PluginConfigurationArchiveContext

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

Instance Method Summary collapse

Constructor Details

#initialize(version, sid) ⇒ PluginConfigurationArchiveContext

Initialize the PluginConfigurationArchiveContext

Parameters:

  • version (Version)

    Version that contains the resource

  • sid (String)

    The SID of the Flex Plugin Configuration resource to archive.



49
50
51
52
53
54
55
56
57
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 49

def initialize(version, sid)
    super(version)

    # Path Solution
    @solution = { sid: sid,  }
    @uri = "/PluginService/Configurations/#{@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_configuration_archive.rb', line 90

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.FlexApi.V1.PluginConfigurationArchiveContext #{context}>"
end

#to_sObject

Provide a user friendly representation



83
84
85
86
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 83

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.FlexApi.V1.PluginConfigurationArchiveContext #{context}>"
end

#update(flex_metadata: :unset) ⇒ PluginConfigurationArchiveInstance

Update the PluginConfigurationArchiveInstance

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_configuration_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)
    PluginConfigurationArchiveInstance.new(
        @version,
        payload,
        sid: @solution[:sid],
    )
end