Class: Twilio::REST::FlexApi::V1::PluginVersionArchiveInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, plugin_sid: nil, sid: nil) ⇒ PluginVersionArchiveInstance

Initialize the PluginVersionArchiveInstance

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

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



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

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

    # Context
    @instance_context = nil
    @params = { 'plugin_sid' => plugin_sid  || @properties['plugin_sid']  ,'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 Version resource and owns this resource.

Returns:



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

def 
    @properties['account_sid']
end

#archivedBoolean

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

Returns:

  • (Boolean)

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



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

def archived
    @properties['archived']
end

#changelogString

Returns A changelog that describes the changes this Flex Plugin Version brings.

Returns:

  • (String)

    A changelog that describes the changes this Flex Plugin Version brings.



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

def changelog
    @properties['changelog']
end

#contextPluginVersionArchiveContext

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

Returns:



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

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

#date_createdTime

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

Returns:



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

def date_created
    @properties['date_created']
end

#inspectObject

Provide a detailed, user friendly representation



247
248
249
250
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb', line 247

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

#plugin_sidString

Returns The SID of the Flex Plugin resource this Flex Plugin Version belongs to.

Returns:

  • (String)

    The SID of the Flex Plugin resource this Flex Plugin Version belongs to.



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

def plugin_sid
    @properties['plugin_sid']
end

#plugin_urlString

Returns The URL of where the Flex Plugin Version JavaScript bundle is hosted on.

Returns:

  • (String)

    The URL of where the Flex Plugin Version JavaScript bundle is hosted on.



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

def plugin_url
    @properties['plugin_url']
end

#privateBoolean

Returns Whether to inject credentials while accessing this Plugin Version. The default value is false.

Returns:

  • (Boolean)

    Whether to inject credentials while accessing this Plugin Version. The default value is false.



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

def private
    @properties['private']
end

#sidString

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

Returns:

  • (String)

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



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

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



240
241
242
243
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb', line 240

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

#update(flex_metadata: :unset) ⇒ PluginVersionArchiveInstance

Update the PluginVersionArchiveInstance

Parameters:

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

    The Flex-Metadata HTTP request header

Returns:



229
230
231
232
233
234
235
236
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb', line 229

def update(
    flex_metadata: :unset
)

    context.update(
        flex_metadata: , 
    )
end

#urlString

Returns The absolute URL of the Flex Plugin Version resource.

Returns:

  • (String)

    The absolute URL of the Flex Plugin Version resource.



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

def url
    @properties['url']
end

#versionString

Returns The unique version of this Flex Plugin Version.

Returns:

  • (String)

    The unique version of this Flex Plugin Version.



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

def version
    @properties['version']
end