Class: Twilio::REST::FlexApi::V1::ProvisioningStatusInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ ProvisioningStatusInstance

Initialize the ProvisioningStatusInstance

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

  • sid (String)

    The SID of the Call resource to fetch.



129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb', line 129

def initialize(version, payload )
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'status' => payload['status'],
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = {  }
end

Instance Method Details

#contextProvisioningStatusContext

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

Returns:



147
148
149
150
151
152
# File 'lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb', line 147

def context
    unless @instance_context
        @instance_context = ProvisioningStatusContext.new(@version )
    end
    @instance_context
end

#fetchProvisioningStatusInstance

Fetch the ProvisioningStatusInstance

Returns:



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

def fetch

    context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#statusStatus

Returns:

  • (Status)


156
157
158
# File 'lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb', line 156

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



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

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

#urlString

Returns The absolute URL of the resource.

Returns:

  • (String)

    The absolute URL of the resource.



162
163
164
# File 'lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb', line 162

def url
    @properties['url']
end