Class: Twilio::REST::Autopilot::V1::AssistantContext::DefaultsContext
- Inherits:
 - 
      InstanceContext
      
        
- Object
 - InstanceContext
 - Twilio::REST::Autopilot::V1::AssistantContext::DefaultsContext
 
 
- 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
- 
  
    
      #fetch  ⇒ DefaultsInstance 
    
    
  
  
  
  
  
  
  
  
  
    
Fetch a DefaultsInstance.
 - 
  
    
      #initialize(version, assistant_sid)  ⇒ DefaultsContext 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
Initialize the DefaultsContext.
 - 
  
    
      #to_s  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Provide a user friendly representation.
 - 
  
    
      #update(defaults: :unset)  ⇒ DefaultsInstance 
    
    
  
  
  
  
  
  
  
  
  
    
Update the DefaultsInstance.
 
Constructor Details
#initialize(version, assistant_sid) ⇒ DefaultsContext
Initialize the DefaultsContext
      75 76 77 78 79 80 81  | 
    
      # File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 75 def initialize(version, assistant_sid) super(version) # Path Solution @solution = {assistant_sid: assistant_sid, } @uri = "/Assistants/#{@solution[:assistant_sid]}/Defaults" end  | 
  
Instance Method Details
#fetch ⇒ DefaultsInstance
Fetch a DefaultsInstance
      86 87 88 89 90 91 92 93 94 95 96  | 
    
      # File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 86 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) DefaultsInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], ) end  | 
  
#to_s ⇒ Object
Provide a user friendly representation
      116 117 118 119  | 
    
      # File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 116 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Autopilot.V1.DefaultsContext #{context}>" end  | 
  
#update(defaults: :unset) ⇒ DefaultsInstance
Update the DefaultsInstance
      102 103 104 105 106 107 108 109 110 111 112  | 
    
      # File 'lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb', line 102 def update(defaults: :unset) data = Twilio::Values.of({'Defaults' => Twilio.serialize_object(defaults), }) payload = @version.update( 'POST', @uri, data: data, ) DefaultsInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], ) end  |