Class: Twilio::REST::FlexApi::V1::PluginArchiveInstance

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

Instance Method Summary collapse

Constructor Details

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

Initialize the PluginArchiveInstance

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 PluginArchive resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 130

def initialize(version, payload , sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'unique_name' => payload['unique_name'],
        'friendly_name' => payload['friendly_name'],
        'description' => payload['description'],
        'archived' => payload['archived'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        '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 resource and owns this resource.

Returns:



170
171
172
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 170

def 
    @properties['account_sid']
end

#archivedBoolean

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

Returns:

  • (Boolean)

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



194
195
196
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 194

def archived
    @properties['archived']
end

#contextPluginArchiveContext

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

Returns:



155
156
157
158
159
160
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 155

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

#date_createdTime

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

Returns:



200
201
202
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 200

def date_created
    @properties['date_created']
end

#date_updatedTime

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

Returns:



206
207
208
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 206

def date_updated
    @properties['date_updated']
end

#descriptionString

Returns A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long.

Returns:

  • (String)

    A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long



188
189
190
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 188

def description
    @properties['description']
end

#friendly_nameString

Returns The friendly name this Flex Plugin resource.

Returns:

  • (String)

    The friendly name this Flex Plugin resource.



182
183
184
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 182

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



238
239
240
241
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 238

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

#sidString

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

Returns:

  • (String)

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



164
165
166
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 164

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



231
232
233
234
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 231

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

#unique_nameString

Returns The name that uniquely identifies this Flex Plugin resource.

Returns:

  • (String)

    The name that uniquely identifies this Flex Plugin resource.



176
177
178
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 176

def unique_name
    @properties['unique_name']
end

#update(flex_metadata: :unset) ⇒ PluginArchiveInstance

Update the PluginArchiveInstance

Parameters:

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

    The Flex-Metadata HTTP request header

Returns:



220
221
222
223
224
225
226
227
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 220

def update(
    flex_metadata: :unset
)

    context.update(
        flex_metadata: , 
    )
end

#urlString

Returns The absolute URL of the Flex Plugin resource.

Returns:

  • (String)

    The absolute URL of the Flex Plugin resource.



212
213
214
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 212

def url
    @properties['url']
end