Class: Twilio::REST::FlexApi::V1::PluginConfigurationArchiveInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sid: nil) ⇒ PluginConfigurationArchiveInstance

Initialize the PluginConfigurationArchiveInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this PluginConfigurationArchive resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 134

def initialize(version, payload , sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'name' => payload['name'],
        'description' => payload['description'],
        'archived' => payload['archived'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Flex Plugin Configuration resource and owns this resource.

Returns:



172
173
174
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 172

def 
    @properties['account_sid']
end

#archivedBoolean

Returns Whether the Flex Plugin Configuration is archived. The default value is false.

Returns:

  • (Boolean)

    Whether the Flex Plugin Configuration is archived. The default value is false.



190
191
192
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 190

def archived
    @properties['archived']
end

#contextPluginConfigurationArchiveContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



157
158
159
160
161
162
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 157

def context
    unless @instance_context
        @instance_context = PluginConfigurationArchiveContext.new(@version , @params['sid'])
    end
    @instance_context
end

#date_createdTime

Returns The date and time in GMT when the Flex Plugin Configuration was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



196
197
198
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 196

def date_created
    @properties['date_created']
end

#descriptionString

Returns The description of the Flex Plugin Configuration resource.

Returns:

  • (String)

    The description of the Flex Plugin Configuration resource.



184
185
186
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 184

def description
    @properties['description']
end

#inspectObject

Provide a detailed, user friendly representation



228
229
230
231
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 228

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.FlexApi.V1.PluginConfigurationArchiveInstance #{values}>"
end

#nameString

Returns The name of this Flex Plugin Configuration.

Returns:

  • (String)

    The name of this Flex Plugin Configuration.



178
179
180
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 178

def name
    @properties['name']
end

#sidString

Returns The unique string that we created to identify the Flex Plugin Configuration resource.

Returns:

  • (String)

    The unique string that we created to identify the Flex Plugin Configuration resource.



166
167
168
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 166

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



221
222
223
224
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 221

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.FlexApi.V1.PluginConfigurationArchiveInstance #{values}>"
end

#update(flex_metadata: :unset) ⇒ PluginConfigurationArchiveInstance

Update the PluginConfigurationArchiveInstance

Parameters:

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

    The Flex-Metadata HTTP request header

Returns:



210
211
212
213
214
215
216
217
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 210

def update(
    flex_metadata: :unset
)

    context.update(
        flex_metadata: , 
    )
end

#urlString

Returns The absolute URL of the Flex Plugin Configuration resource.

Returns:

  • (String)

    The absolute URL of the Flex Plugin Configuration resource.



202
203
204
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 202

def url
    @properties['url']
end