File tree Expand file tree Collapse file tree 19 files changed +430
-1
lines changed
service-multiple-number-add
tools/snippet-testing/model Expand file tree Collapse file tree 19 files changed +430
-1
lines changed Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+ const string friendlyName = "My company" ;
16
+
17
+ TwilioClient . Init ( accountSid , authToken ) ;
18
+
19
+ var alphaSender = AlphaSenderResource . Create ( pathServiceSid , friendlyName ) ;
20
+
21
+ Console . WriteLine ( alphaSender . Sid ) ;
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+ const string alphaSenderSid = "AIc781610ec0b3400c9e0cab8e757da937" ;
16
+
17
+ TwilioClient . Init ( accountSid , authToken ) ;
18
+
19
+ var deleted = AlphaSenderResource . Delete ( pathServiceSid , alphaSenderSid ) ;
20
+
21
+ Console . WriteLine ( deleted ) ;
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+ const string alphaSenderSid = "AIc781610ec0b3400c9e0cab8e757da937" ;
16
+
17
+ TwilioClient . Init ( accountSid , authToken ) ;
18
+
19
+ var alphaSender = AlphaSenderResource . Fetch ( pathServiceSid , alphaSenderSid ) ;
20
+
21
+ Console . WriteLine ( alphaSender . AlphaSender ) ;
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+
16
+ TwilioClient . Init ( accountSid , authToken ) ;
17
+
18
+ var alphaSenders = AlphaSenderResource . Read ( pathServiceSid ) ;
19
+
20
+ foreach ( var alphaSender in alphaSenders )
21
+ {
22
+ Console . WriteLine ( alphaSender . Sid ) ;
23
+ }
24
+ }
25
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string serviceFriendlyName = "My First Service" ;
15
+
16
+ TwilioClient . Init ( accountSid , authToken ) ;
17
+
18
+ var service = ServiceResource . Create ( serviceFriendlyName ) ;
19
+
20
+ Console . WriteLine ( service . Sid ) ;
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+
16
+ TwilioClient . Init ( accountSid , authToken ) ;
17
+
18
+ var deleted = ServiceResource . Delete ( pathServiceSid ) ;
19
+
20
+ Console . WriteLine ( deleted ) ;
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+
16
+ TwilioClient . Init ( accountSid , authToken ) ;
17
+
18
+ var service = ServiceResource . Fetch ( pathServiceSid ) ;
19
+
20
+ Console . WriteLine ( service . FriendlyName ) ;
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+
16
+ TwilioClient . Init ( accountSid , authToken ) ;
17
+
18
+ var services = ServiceResource . Read ( ) ;
19
+
20
+ foreach ( var service in services )
21
+ {
22
+ Console . WriteLine ( service . Sid ) ;
23
+ }
24
+ }
25
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using System . Collections . Generic ;
4
+ using Twilio ;
5
+ using Twilio . Rest . Messaging . V1 . Service ;
6
+
7
+
8
+ class Example
9
+ {
10
+ static void Main ( string [ ] args )
11
+ {
12
+ // Find your Account SID and Auth Token at twilio.com/console
13
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
14
+ const string authToken = "your_auth_token" ;
15
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
16
+
17
+ var phoneNumberSids = new List < string > {
18
+ "PN2a0747eba6abf96b7e3c3ff0b4530f6e" ,
19
+ "PN557ce644e5ab84fa21cc21112e22c485" ,
20
+ "PN2a0747eba6abf96b7e3c3ff0b4530f6e"
21
+ } ;
22
+
23
+ TwilioClient . Init ( accountSid , authToken ) ;
24
+
25
+ foreach ( var phoneNumberSid in phoneNumberSids )
26
+ {
27
+ var phoneNumber = PhoneNumberResource . Create ( pathServiceSid , phoneNumberSid ) ;
28
+ Console . WriteLine ( phoneNumber . Sid ) ;
29
+ }
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+ const string phoneNumberSid = "PN557ce644e5ab84fa21cc21112e22c485" ;
16
+
17
+ TwilioClient . Init ( accountSid , authToken ) ;
18
+
19
+ var phoneNumber = PhoneNumberResource . Create ( pathServiceSid , phoneNumberSid ) ;
20
+
21
+ Console . WriteLine ( phoneNumber . Sid ) ;
22
+
23
+ }
24
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+ const string phoneNumberSid = "PN557ce644e5ab84fa21cc21112e22c485" ;
16
+
17
+ TwilioClient . Init ( accountSid , authToken ) ;
18
+
19
+ var deleted = PhoneNumberResource . Delete ( pathServiceSid , phoneNumberSid ) ;
20
+
21
+ Console . WriteLine ( deleted ) ;
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+ const string phoneNumberSid = "PN557ce644e5ab84fa21cc21112e22c485" ;
16
+
17
+ TwilioClient . Init ( accountSid , authToken ) ;
18
+
19
+ var phoneNumber = PhoneNumberResource . Fetch ( pathServiceSid , phoneNumberSid ) ;
20
+
21
+ Console . WriteLine ( phoneNumber . PhoneNumber ) ;
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+
16
+ TwilioClient . Init ( accountSid , authToken ) ;
17
+
18
+ var phoneNumbers = PhoneNumberResource . Read ( pathServiceSid ) ;
19
+
20
+ foreach ( var phoneNumber in phoneNumbers )
21
+ {
22
+ Console . WriteLine ( phoneNumber . Sid ) ;
23
+ }
24
+ }
25
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+ const string shortCodeSid = "SC3f94c94562ac88dccf16f8859a1a8b25" ;
16
+
17
+ TwilioClient . Init ( accountSid , authToken ) ;
18
+
19
+ var shortCode = ShortCodeResource . Create ( pathServiceSid , shortCodeSid ) ;
20
+
21
+ Console . WriteLine ( shortCode . ShortCode ) ;
22
+
23
+ }
24
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+ const string shortCodeSid = "SC3f94c94562ac88dccf16f8859a1a8b25" ;
16
+
17
+ TwilioClient . Init ( accountSid , authToken ) ;
18
+
19
+ var deleted = ShortCodeResource . Delete ( pathServiceSid , shortCodeSid ) ;
20
+
21
+ Console . WriteLine ( deleted ) ;
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ // Download the twilio-csharp library from twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using Twilio ;
4
+ using Twilio . Rest . Messaging . V1 . Service ;
5
+
6
+
7
+ class Example
8
+ {
9
+ static void Main ( string [ ] args )
10
+ {
11
+ // Find your Account SID and Auth Token at twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ const string pathServiceSid = "MG2172dd2db502e20dd981ef0d67850e1a" ;
15
+ const string shortCodeSid = "SC3f94c94562ac88dccf16f8859a1a8b25" ;
16
+
17
+ TwilioClient . Init ( accountSid , authToken ) ;
18
+
19
+ var shortCode = ShortCodeResource . Fetch ( pathServiceSid , shortCodeSid ) ;
20
+
21
+ Console . WriteLine ( shortCode . ShortCode ) ;
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments