lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb in twilio-ruby-5.22.1 vs lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb in twilio-ruby-5.22.2

- old
+ new

@@ -15,11 +15,13 @@ # 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 help@twilio.com. class TaskList < ListResource ## # Initialize the TaskList # @param [Version] version Version that contains the resource - # @param [String] assistant_sid The unique ID of the Assistant. + # @param [String] assistant_sid The SID of the + # [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the + # parent of the resource. # @return [TaskList] TaskList def initialize(version, assistant_sid: nil) super(version) # Path Solution @@ -110,18 +112,20 @@ end ## # Retrieve a single page of TaskInstance records from the API. # Request is executed immediately. - # @param [String] unique_name A user-provided string that uniquely identifies this - # resource as an alternative to the sid. Unique up to 64 characters long. - # @param [String] friendly_name A user-provided string that identifies this - # resource. It is non-unique and can be up to 255 characters long. - # @param [Hash] actions A user-provided JSON object encoded as a string to specify - # the actions for this task. It is optional and non-unique. - # @param [String] actions_url User-provided HTTP endpoint where the assistant can - # fetch actions. + # @param [String] unique_name An application-defined string that uniquely + # identifies the new resource. It can be used as an alternative to the `sid` in + # the URL path to address the resource. This value must be unique and 64 + # characters or less in length. + # @param [String] friendly_name A descriptive string that you create to describe + # the new resource. It is not unique and can be up to 255 characters long. + # @param [Hash] actions The JSON string that specifies the + # [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the + # Assistant on how to perform the task. It is optional and not unique. + # @param [String] actions_url The URL from which the Assistant can fetch actions. # @return [TaskInstance] Newly created TaskInstance def create(unique_name: nil, friendly_name: :unset, actions: :unset, actions_url: :unset) data = Twilio::Values.of({ 'UniqueName' => unique_name, 'FriendlyName' => friendly_name, @@ -180,13 +184,15 @@ # 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 help@twilio.com. class TaskContext < InstanceContext ## # Initialize the TaskContext # @param [Version] version Version that contains the resource - # @param [String] assistant_sid The unique ID of the Assistant. - # @param [String] sid A 34-character string that uniquely identifies this - # resource. + # @param [String] assistant_sid The SID of the + # [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the + # parent of the resource to fetch. + # @param [String] sid The Twilio-provided string that uniquely identifies the Task + # resource to fetch. # @return [TaskContext] TaskContext def initialize(version, assistant_sid, sid) super(version) # Path Solution @@ -215,19 +221,20 @@ TaskInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], sid: @solution[:sid], ) end ## # Update the TaskInstance - # @param [String] friendly_name A user-provided string that identifies this - # resource. It is non-unique and can be up to 255 characters long. - # @param [String] unique_name A user-provided string that uniquely identifies this - # resource as an alternative to the sid. You can use the unique name in the URL - # path when addressing this resource. Unique up to 64 characters long. - # @param [Hash] actions A user-provided JSON object encoded as a string to specify - # the actions for this task. It is optional and non-unique. - # @param [String] actions_url User-provided HTTP endpoint where the assistant can - # fetch actions. + # @param [String] friendly_name A descriptive string that you create to describe + # the resource. It is not unique and can be up to 255 characters long. + # @param [String] unique_name An application-defined string that uniquely + # identifies the resource. This value must be 64 characters or less in length and + # be unique. It can be used as an alternative to the `sid` in the URL path to + # address the resource. + # @param [Hash] actions The JSON string that specifies the + # [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the + # Assistant on how to perform the task. + # @param [String] actions_url The URL from which the Assistant can fetch actions. # @return [TaskInstance] Updated TaskInstance def update(friendly_name: :unset, unique_name: :unset, actions: :unset, actions_url: :unset) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'UniqueName' => unique_name, @@ -331,13 +338,15 @@ class TaskInstance < InstanceResource ## # Initialize the TaskInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio - # @param [String] assistant_sid The unique ID of the Assistant. - # @param [String] sid A 34-character string that uniquely identifies this - # resource. + # @param [String] assistant_sid The SID of the + # [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the + # parent of the resource. + # @param [String] sid The Twilio-provided string that uniquely identifies the Task + # resource to fetch. # @return [TaskInstance] TaskInstance def initialize(version, payload, assistant_sid: nil, sid: nil) super(version) # Marshaled Properties @@ -369,65 +378,65 @@ end @instance_context end ## - # @return [String] The unique ID of the Account that created this Task. + # @return [String] The SID of the Account that created the resource def account_sid @properties['account_sid'] end ## - # @return [Time] The date that this resource was created + # @return [Time] The RFC 2822 date and time in GMT when the resource was created def date_created @properties['date_created'] end ## - # @return [Time] The date that this resource was last updated + # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated def date_updated @properties['date_updated'] end ## - # @return [String] A user-provided string that identifies this resource. It is non-unique and can be up to 255 characters long. + # @return [String] The string that you assigned to describe the resource def friendly_name @properties['friendly_name'] end ## - # @return [String] The links + # @return [String] A list of the URLs of related resources def links @properties['links'] end ## - # @return [String] The unique ID of the Assistant. + # @return [String] The SID of the Assistant that is the parent of the resource def assistant_sid @properties['assistant_sid'] end ## - # @return [String] A 34-character string that uniquely identifies this resource. + # @return [String] The unique string that identifies the resource def sid @properties['sid'] end ## - # @return [String] A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. + # @return [String] An application-defined string that uniquely identifies the resource def unique_name @properties['unique_name'] end ## - # @return [String] A user-provided HTTP endpoint where the assistant can fetch actions. + # @return [String] The URL from which the Assistant can fetch actions def actions_url @properties['actions_url'] end ## - # @return [String] The url + # @return [String] The absolute URL of the Task resource def url @properties['url'] end ## @@ -437,18 +446,19 @@ context.fetch end ## # Update the TaskInstance - # @param [String] friendly_name A user-provided string that identifies this - # resource. It is non-unique and can be up to 255 characters long. - # @param [String] unique_name A user-provided string that uniquely identifies this - # resource as an alternative to the sid. You can use the unique name in the URL - # path when addressing this resource. Unique up to 64 characters long. - # @param [Hash] actions A user-provided JSON object encoded as a string to specify - # the actions for this task. It is optional and non-unique. - # @param [String] actions_url User-provided HTTP endpoint where the assistant can - # fetch actions. + # @param [String] friendly_name A descriptive string that you create to describe + # the resource. It is not unique and can be up to 255 characters long. + # @param [String] unique_name An application-defined string that uniquely + # identifies the resource. This value must be 64 characters or less in length and + # be unique. It can be used as an alternative to the `sid` in the URL path to + # address the resource. + # @param [Hash] actions The JSON string that specifies the + # [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the + # Assistant on how to perform the task. + # @param [String] actions_url The URL from which the Assistant can fetch actions. # @return [TaskInstance] Updated TaskInstance def update(friendly_name: :unset, unique_name: :unset, actions: :unset, actions_url: :unset) context.update( friendly_name: friendly_name, unique_name: unique_name, \ No newline at end of file