Skip to content

Commit

Permalink
[Librarian] Regenerated @ 0d6397ea462cf38ccee74f7de204ee1261bb0d8f
Browse files Browse the repository at this point in the history
  • Loading branch information
codejudas committed Mar 23, 2018
1 parent c6d5aa8 commit f4815b2
Show file tree
Hide file tree
Showing 15 changed files with 571 additions and 18 deletions.
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
twilio-csharp Changelog
=======================

[2018-03-22] Version 5.10.0
----------------------------
**Lookups**
- Disable support for `fraud` lookups *(breaking change)*

**Preview**
- Add `BuildDuration` and `ErrorCode` to Understand ModelBuild

**Studio**
- Add new /Context endpoint for step and engagement resources.


[2018-03-09] Version 5.9.8
---------------------------
**Api**
Expand Down
5 changes: 0 additions & 5 deletions src/Twilio/Rest/Lookups/V1/PhoneNumberResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,6 @@ public static PhoneNumberResource FromJson(string json)
[JsonProperty("carrier")]
public Dictionary<string, string> Carrier { get; private set; }
/// <summary>
/// The fraud
/// </summary>
[JsonProperty("fraud")]
public Dictionary<string, string> Fraud { get; private set; }
/// <summary>
/// The add_ons
/// </summary>
[JsonProperty("add_ons")]
Expand Down
10 changes: 10 additions & 0 deletions src/Twilio/Rest/Preview/Understand/Service/ModelBuildResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,16 @@ public static ModelBuildResource FromJson(string json)
/// </summary>
[JsonProperty("url")]
public Uri Url { get; private set; }
/// <summary>
/// The build_duration
/// </summary>
[JsonProperty("build_duration")]
public int? BuildDuration { get; private set; }
/// <summary>
/// The error_code
/// </summary>
[JsonProperty("error_code")]
public int? ErrorCode { get; private set; }

private ModelBuildResource()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/// This code was generated by
/// \ / _ _ _| _ _
/// | (_)\/(_)(_|\/| |(/_ v1.0.0
/// / /

using System;
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Converters;

namespace Twilio.Rest.Studio.V1.Flow.Engagement
{

/// <summary>
/// PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
///
/// FetchEngagementContextOptions
/// </summary>
public class FetchEngagementContextOptions : IOptions<EngagementContextResource>
{
/// <summary>
/// The flow_sid
/// </summary>
public string PathFlowSid { get; }
/// <summary>
/// The engagement_sid
/// </summary>
public string PathEngagementSid { get; }

/// <summary>
/// Construct a new FetchEngagementContextOptions
/// </summary>
/// <param name="pathFlowSid"> The flow_sid </param>
/// <param name="pathEngagementSid"> The engagement_sid </param>
public FetchEngagementContextOptions(string pathFlowSid, string pathEngagementSid)
{
PathFlowSid = pathFlowSid;
PathEngagementSid = pathEngagementSid;
}

/// <summary>
/// Generate the necessary parameters
/// </summary>
public List<KeyValuePair<string, string>> GetParams()
{
var p = new List<KeyValuePair<string, string>>();
return p;
}
}

}
147 changes: 147 additions & 0 deletions src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextResource.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/// This code was generated by
/// \ / _ _ _| _ _
/// | (_)\/(_)(_|\/| |(/_ v1.0.0
/// / /
/// <summary>
/// PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
///
/// EngagementContextResource
/// </summary>

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;

namespace Twilio.Rest.Studio.V1.Flow.Engagement
{

public class EngagementContextResource : Resource
{
private static Request BuildFetchRequest(FetchEngagementContextOptions options, ITwilioRestClient client)
{
return new Request(
HttpMethod.Get,
Rest.Domain.Studio,
"/v1/Flows/" + options.PathFlowSid + "/Engagements/" + options.PathEngagementSid + "/Context",
client.Region,
queryParams: options.GetParams()
);
}

/// <summary>
/// fetch
/// </summary>
/// <param name="options"> Fetch EngagementContext parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of EngagementContext </returns>
public static EngagementContextResource Fetch(FetchEngagementContextOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = client.Request(BuildFetchRequest(options, client));
return FromJson(response.Content);
}

#if !NET35
/// <summary>
/// fetch
/// </summary>
/// <param name="options"> Fetch EngagementContext parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of EngagementContext </returns>
public static async System.Threading.Tasks.Task<EngagementContextResource> FetchAsync(FetchEngagementContextOptions options,
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildFetchRequest(options, client));
return FromJson(response.Content);
}
#endif

/// <summary>
/// fetch
/// </summary>
/// <param name="pathFlowSid"> The flow_sid </param>
/// <param name="pathEngagementSid"> The engagement_sid </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of EngagementContext </returns>
public static EngagementContextResource Fetch(string pathFlowSid,
string pathEngagementSid,
ITwilioRestClient client = null)
{
var options = new FetchEngagementContextOptions(pathFlowSid, pathEngagementSid);
return Fetch(options, client);
}

#if !NET35
/// <summary>
/// fetch
/// </summary>
/// <param name="pathFlowSid"> The flow_sid </param>
/// <param name="pathEngagementSid"> The engagement_sid </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of EngagementContext </returns>
public static async System.Threading.Tasks.Task<EngagementContextResource> FetchAsync(string pathFlowSid,
string pathEngagementSid,
ITwilioRestClient client = null)
{
var options = new FetchEngagementContextOptions(pathFlowSid, pathEngagementSid);
return await FetchAsync(options, client);
}
#endif

/// <summary>
/// Converts a JSON string into a EngagementContextResource object
/// </summary>
/// <param name="json"> Raw JSON string </param>
/// <returns> EngagementContextResource object represented by the provided JSON </returns>
public static EngagementContextResource FromJson(string json)
{
// Convert all checked exceptions to Runtime
try
{
return JsonConvert.DeserializeObject<EngagementContextResource>(json);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}

/// <summary>
/// The account_sid
/// </summary>
[JsonProperty("account_sid")]
public string AccountSid { get; private set; }
/// <summary>
/// The context
/// </summary>
[JsonProperty("context")]
public object Context { get; private set; }
/// <summary>
/// The engagement_sid
/// </summary>
[JsonProperty("engagement_sid")]
public string EngagementSid { get; private set; }
/// <summary>
/// The flow_sid
/// </summary>
[JsonProperty("flow_sid")]
public string FlowSid { get; private set; }
/// <summary>
/// The url
/// </summary>
[JsonProperty("url")]
public Uri Url { get; private set; }

private EngagementContextResource()
{

}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/// This code was generated by
/// \ / _ _ _| _ _
/// | (_)\/(_)(_|\/| |(/_ v1.0.0
/// / /

using System;
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Converters;

namespace Twilio.Rest.Studio.V1.Flow.Engagement.Step
{

/// <summary>
/// PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
///
/// FetchStepContextOptions
/// </summary>
public class FetchStepContextOptions : IOptions<StepContextResource>
{
/// <summary>
/// The flow_sid
/// </summary>
public string PathFlowSid { get; }
/// <summary>
/// The engagement_sid
/// </summary>
public string PathEngagementSid { get; }
/// <summary>
/// The step_sid
/// </summary>
public string PathStepSid { get; }

/// <summary>
/// Construct a new FetchStepContextOptions
/// </summary>
/// <param name="pathFlowSid"> The flow_sid </param>
/// <param name="pathEngagementSid"> The engagement_sid </param>
/// <param name="pathStepSid"> The step_sid </param>
public FetchStepContextOptions(string pathFlowSid, string pathEngagementSid, string pathStepSid)
{
PathFlowSid = pathFlowSid;
PathEngagementSid = pathEngagementSid;
PathStepSid = pathStepSid;
}

/// <summary>
/// Generate the necessary parameters
/// </summary>
public List<KeyValuePair<string, string>> GetParams()
{
var p = new List<KeyValuePair<string, string>>();
return p;
}
}

}
Loading

0 comments on commit f4815b2

Please sign in to comment.