Class: Twilio::REST::Autopilot::V1::RestoreAssistantList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ RestoreAssistantList

Initialize the RestoreAssistantList

Parameters:

  • version (Version)

    Version that contains the resource



25
26
27
28
29
30
31
# File 'lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb', line 25

def initialize(version)
    super(version)
    # Path Solution
    @solution = {  }
    @uri = "/Assistants/Restore"
    
end

Instance Method Details

#to_sObject

Provide a user friendly representation



55
56
57
# File 'lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb', line 55

def to_s
    '#<Twilio.Autopilot.V1.RestoreAssistantList>'
end

#update(assistant: nil) ⇒ RestoreAssistantInstance

Update the RestoreAssistantInstance

Parameters:

  • assistant (String) (defaults to: nil)

    The Twilio-provided string that uniquely identifies the Assistant resource to restore.

Returns:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb', line 36

def update(
    assistant: nil
)

    data = Twilio::Values.of({
        'Assistant' => assistant,
    })

    payload = @version.update('POST', @uri, data: data)
    RestoreAssistantInstance.new(
        @version,
        payload,
    )
end