Esempio n. 1
0
        /// <summary>
        /// Create a Flow.
        /// </summary>
        /// <param name="friendlyName"> The string that you assigned to describe the Flow </param>
        /// <param name="status"> The status of the Flow </param>
        /// <param name="definition"> JSON representation of flow definition </param>
        /// <param name="commitMessage"> Description on change made in the revision </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Flow </returns>
        public static FlowResource Create(string friendlyName,
                                          FlowResource.StatusEnum status,
                                          object definition,
                                          string commitMessage     = null,
                                          ITwilioRestClient client = null)
        {
            var options = new CreateFlowOptions(friendlyName, status, definition)
            {
                CommitMessage = commitMessage
            };

            return(Create(options, client));
        }
Esempio n. 2
0
        /// <summary>
        /// Create a Flow.
        /// </summary>
        /// <param name="friendlyName"> The string that you assigned to describe the Flow </param>
        /// <param name="status"> The status of the Flow </param>
        /// <param name="definition"> JSON representation of flow definition </param>
        /// <param name="commitMessage"> Description on change made in the revision </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Flow </returns>
        public static async System.Threading.Tasks.Task <FlowResource> CreateAsync(string friendlyName,
                                                                                   FlowResource.StatusEnum status,
                                                                                   object definition,
                                                                                   string commitMessage     = null,
                                                                                   ITwilioRestClient client = null)
        {
            var options = new CreateFlowOptions(friendlyName, status, definition)
            {
                CommitMessage = commitMessage
            };

            return(await CreateAsync(options, client));
        }
Esempio n. 3
0
        /// <summary>
        /// Update a Flow.
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to fetch </param>
        /// <param name="status"> The status of the Flow </param>
        /// <param name="friendlyName"> The string that you assigned to describe the Flow </param>
        /// <param name="definition"> JSON representation of flow definition </param>
        /// <param name="commitMessage"> Description on change made in the revision </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Flow </returns>
        public static async System.Threading.Tasks.Task <FlowResource> UpdateAsync(string pathSid,
                                                                                   FlowResource.StatusEnum status,
                                                                                   string friendlyName      = null,
                                                                                   object definition        = null,
                                                                                   string commitMessage     = null,
                                                                                   ITwilioRestClient client = null)
        {
            var options = new UpdateFlowOptions(pathSid, status)
            {
                FriendlyName = friendlyName, Definition = definition, CommitMessage = commitMessage
            };

            return(await UpdateAsync(options, client));
        }
Esempio n. 4
0
        /// <summary>
        /// Update a Flow.
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to fetch </param>
        /// <param name="status"> The status of the Flow </param>
        /// <param name="friendlyName"> The string that you assigned to describe the Flow </param>
        /// <param name="definition"> JSON representation of flow definition </param>
        /// <param name="commitMessage"> Description on change made in the revision </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Flow </returns>
        public static FlowResource Update(string pathSid,
                                          FlowResource.StatusEnum status,
                                          string friendlyName      = null,
                                          object definition        = null,
                                          string commitMessage     = null,
                                          ITwilioRestClient client = null)
        {
            var options = new UpdateFlowOptions(pathSid, status)
            {
                FriendlyName = friendlyName, Definition = definition, CommitMessage = commitMessage
            };

            return(Update(options, client));
        }
Esempio n. 5
0
 /// <summary>
 /// Construct a new CreateFlowOptions
 /// </summary>
 /// <param name="friendlyName"> The string that you assigned to describe the Flow </param>
 /// <param name="status"> The status of the Flow </param>
 /// <param name="definition"> JSON representation of flow definition </param>
 public CreateFlowOptions(string friendlyName, FlowResource.StatusEnum status, object definition)
 {
     FriendlyName = friendlyName;
     Status       = status;
     Definition   = definition;
 }
Esempio n. 6
0
 /// <summary>
 /// Construct a new UpdateFlowOptions
 /// </summary>
 /// <param name="pathSid"> The SID that identifies the resource to fetch </param>
 /// <param name="status"> The status of the Flow </param>
 public UpdateFlowOptions(string pathSid, FlowResource.StatusEnum status)
 {
     PathSid = pathSid;
     Status  = status;
 }