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.



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

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:



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

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.



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

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:



159
160
161
162
163
164
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 159

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:



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

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:



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

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



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

def description
    @properties['description']
end

#friendly_nameString

Returns The friendly name this Flex Plugin resource.

Returns:

  • (String)

    The friendly name this Flex Plugin resource.



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

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



242
243
244
245
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 242

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.



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

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



235
236
237
238
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 235

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.



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

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:



224
225
226
227
228
229
230
231
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 224

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.



216
217
218
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb', line 216

def url
    @properties['url']
end