Class: Twilio::REST::Autopilot::V1::AssistantContext::DefaultsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Autopilot::V1::AssistantContext::DefaultsInstance
- Defined in:
- lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected]
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#assistant_sid ⇒ String
The SID of the Assistant that is the parent of the resource.
-
#context ⇒ DefaultsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data ⇒ Hash
The JSON string that describes the default task links.
-
#fetch ⇒ DefaultsInstance
Fetch the DefaultsInstance.
-
#initialize(version, payload, assistant_sid: nil) ⇒ DefaultsInstance
constructor
Initialize the DefaultsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(defaults: :unset) ⇒ DefaultsInstance
Update the DefaultsInstance.
-
#url ⇒ String
The absolute URL of the Defaults resource.
Constructor Details
#initialize(version, payload, assistant_sid: nil) ⇒ DefaultsInstance
Initialize the DefaultsInstance
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 135 def initialize(version, payload, assistant_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'assistant_sid' => payload['assistant_sid'], 'url' => payload['url'], 'data' => payload['data'], } # Context @instance_context = nil @params = {'assistant_sid' => assistant_sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
164 165 166 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 164 def account_sid @properties['account_sid'] end |
#assistant_sid ⇒ String
Returns The SID of the Assistant that is the parent of the resource.
170 171 172 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 170 def assistant_sid @properties['assistant_sid'] end |
#context ⇒ DefaultsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
155 156 157 158 159 160 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 155 def context unless @instance_context @instance_context = DefaultsContext.new(@version, @params['assistant_sid'], ) end @instance_context end |
#data ⇒ Hash
Returns The JSON string that describes the default task links.
182 183 184 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 182 def data @properties['data'] end |
#fetch ⇒ DefaultsInstance
Fetch the DefaultsInstance
189 190 191 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 189 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
211 212 213 214 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 211 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Autopilot.V1.DefaultsInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
204 205 206 207 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 204 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Autopilot.V1.DefaultsInstance #{values}>" end |
#update(defaults: :unset) ⇒ DefaultsInstance
Update the DefaultsInstance
198 199 200 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 198 def update(defaults: :unset) context.update(defaults: defaults, ) end |
#url ⇒ String
Returns The absolute URL of the Defaults resource.
176 177 178 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 176 def url @properties['url'] end |