Skip to content

Commit 1aec29d

Browse files
committed
Regenerate Library
1 parent da6ad3f commit 1aec29d

File tree

320 files changed

+6186
-5794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

320 files changed

+6186
-5794
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
twilio-csharp Changelog
22
=======================
33

4+
[2017-03-09] Version 5.1.0
5+
--------------------------
6+
- Fix bug with reading `AvailablePhoneNumbers`
7+
- Add `accounts.twilio.com` subdomain
8+
- Add `PublicKeyResource`
9+
- Remove `SandboxResource`
10+
411

512
[2017-02-24] Version 5.0.2
613
--------------------------
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using Twilio.Base;
4+
5+
namespace Twilio.Rest.Accounts.V1.Credential
6+
{
7+
8+
/// <summary>
9+
/// Retrieves a collection of Public Key Credentials belonging to the account used to make the request
10+
/// </summary>
11+
public class ReadPublicKeyOptions : ReadOptions<PublicKeyResource>
12+
{
13+
/// <summary>
14+
/// Generate the necessary parameters
15+
/// </summary>
16+
public override List<KeyValuePair<string, string>> GetParams()
17+
{
18+
var p = new List<KeyValuePair<string, string>>();
19+
if (PageSize != null)
20+
{
21+
p.Add(new KeyValuePair<string, string>("PageSize", PageSize.ToString()));
22+
}
23+
24+
return p;
25+
}
26+
}
27+
28+
/// <summary>
29+
/// Create a new Public Key Credential
30+
/// </summary>
31+
public class CreatePublicKeyOptions : IOptions<PublicKeyResource>
32+
{
33+
/// <summary>
34+
/// URL encoded representation of the public key
35+
/// </summary>
36+
public string PublicKey { get; }
37+
/// <summary>
38+
/// A human readable description of this resource
39+
/// </summary>
40+
public string FriendlyName { get; set; }
41+
/// <summary>
42+
/// The Subaccount this Credential should be associated with.
43+
/// </summary>
44+
public string AccountSid { get; set; }
45+
46+
/// <summary>
47+
/// Construct a new CreatePublicKeyOptions
48+
/// </summary>
49+
///
50+
/// <param name="publicKey"> URL encoded representation of the public key </param>
51+
public CreatePublicKeyOptions(string publicKey)
52+
{
53+
PublicKey = publicKey;
54+
}
55+
56+
/// <summary>
57+
/// Generate the necessary parameters
58+
/// </summary>
59+
public List<KeyValuePair<string, string>> GetParams()
60+
{
61+
var p = new List<KeyValuePair<string, string>>();
62+
if (PublicKey != null)
63+
{
64+
p.Add(new KeyValuePair<string, string>("PublicKey", PublicKey.ToString()));
65+
}
66+
67+
if (FriendlyName != null)
68+
{
69+
p.Add(new KeyValuePair<string, string>("FriendlyName", FriendlyName));
70+
}
71+
72+
if (AccountSid != null)
73+
{
74+
p.Add(new KeyValuePair<string, string>("AccountSid", AccountSid.ToString()));
75+
}
76+
77+
return p;
78+
}
79+
}
80+
81+
/// <summary>
82+
/// Fetch the public key specified by the provided Credential Sid
83+
/// </summary>
84+
public class FetchPublicKeyOptions : IOptions<PublicKeyResource>
85+
{
86+
/// <summary>
87+
/// Fetch by unique Credential Sid
88+
/// </summary>
89+
public string PathSid { get; }
90+
91+
/// <summary>
92+
/// Construct a new FetchPublicKeyOptions
93+
/// </summary>
94+
///
95+
/// <param name="pathSid"> Fetch by unique Credential Sid </param>
96+
public FetchPublicKeyOptions(string pathSid)
97+
{
98+
PathSid = pathSid;
99+
}
100+
101+
/// <summary>
102+
/// Generate the necessary parameters
103+
/// </summary>
104+
public List<KeyValuePair<string, string>> GetParams()
105+
{
106+
var p = new List<KeyValuePair<string, string>>();
107+
return p;
108+
}
109+
}
110+
111+
/// <summary>
112+
/// Modify the properties of a given Account
113+
/// </summary>
114+
public class UpdatePublicKeyOptions : IOptions<PublicKeyResource>
115+
{
116+
/// <summary>
117+
/// Fetch by unique Credential Sid
118+
/// </summary>
119+
public string PathSid { get; }
120+
/// <summary>
121+
/// A human readable description of this resource
122+
/// </summary>
123+
public string FriendlyName { get; set; }
124+
125+
/// <summary>
126+
/// Construct a new UpdatePublicKeyOptions
127+
/// </summary>
128+
///
129+
/// <param name="pathSid"> Fetch by unique Credential Sid </param>
130+
public UpdatePublicKeyOptions(string pathSid)
131+
{
132+
PathSid = pathSid;
133+
}
134+
135+
/// <summary>
136+
/// Generate the necessary parameters
137+
/// </summary>
138+
public List<KeyValuePair<string, string>> GetParams()
139+
{
140+
var p = new List<KeyValuePair<string, string>>();
141+
if (FriendlyName != null)
142+
{
143+
p.Add(new KeyValuePair<string, string>("FriendlyName", FriendlyName));
144+
}
145+
146+
return p;
147+
}
148+
}
149+
150+
/// <summary>
151+
/// Delete a Credential from your account
152+
/// </summary>
153+
public class DeletePublicKeyOptions : IOptions<PublicKeyResource>
154+
{
155+
/// <summary>
156+
/// A 34 character string that uniquely identifies this resource.
157+
/// </summary>
158+
public string PathSid { get; }
159+
160+
/// <summary>
161+
/// Construct a new DeletePublicKeyOptions
162+
/// </summary>
163+
///
164+
/// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param>
165+
public DeletePublicKeyOptions(string pathSid)
166+
{
167+
PathSid = pathSid;
168+
}
169+
170+
/// <summary>
171+
/// Generate the necessary parameters
172+
/// </summary>
173+
public List<KeyValuePair<string, string>> GetParams()
174+
{
175+
var p = new List<KeyValuePair<string, string>>();
176+
return p;
177+
}
178+
}
179+
180+
}

0 commit comments

Comments
 (0)