Skip to content

Commit 43915eb

Browse files
committed
Examples corrected
1 parent 67d0ef2 commit 43915eb

16 files changed

+354
-80
lines changed

doc/AiBcrApi.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ let result = Models.contactList()
5555
.displayName('Alex Thomas')
5656
.emailAddresses([
5757
Models.emailAddress()
58-
.category(Models.enumWithCustom<EmailAddressCategory>()
58+
.category(Models.enumWithCustomOfEmailAddressCategory()
5959
.value('Custom')
6060
.description('Partners')
6161
.build())
@@ -67,7 +67,7 @@ let result = Models.contactList()
6767
.givenName('Alex')
6868
.phoneNumbers([
6969
Models.phoneNumber()
70-
.category(Models.enumWithCustom<PhoneNumberCategory>()
70+
.category(Models.enumWithCustomOfPhoneNumberCategory()
7171
.value('Office')
7272
.build())
7373
.number('+49 211 4247 21')
@@ -77,7 +77,7 @@ let result = Models.contactList()
7777
.surname('Thomas')
7878
.urls([
7979
Models.url()
80-
.category(Models.enumWithCustom<UrlCategory>()
80+
.category(Models.enumWithCustomOfUrlCategory()
8181
.value('Work')
8282
.build())
8383
.preferred(true)
@@ -121,7 +121,7 @@ result = Models.contactList()
121121
.displayName('Alex Thomas')
122122
.emailAddresses([
123123
Models.emailAddress()
124-
.category(Models.enumWithCustom<EmailAddressCategory>()
124+
.category(Models.enumWithCustomOfEmailAddressCategory()
125125
.value('Custom')
126126
.description('Partners')
127127
.build())
@@ -133,7 +133,7 @@ result = Models.contactList()
133133
.givenName('Alex')
134134
.phoneNumbers([
135135
Models.phoneNumber()
136-
.category(Models.enumWithCustom<PhoneNumberCategory>()
136+
.category(Models.enumWithCustomOfPhoneNumberCategory()
137137
.value('Office')
138138
.build())
139139
.number('+49 211 4247 21')
@@ -143,7 +143,7 @@ result = Models.contactList()
143143
.surname('Thomas')
144144
.urls([
145145
Models.url()
146-
.category(Models.enumWithCustom<UrlCategory>()
146+
.category(Models.enumWithCustomOfUrlCategory()
147147
.value('Work')
148148
.build())
149149
.preferred(true)

doc/AiNameApi.md

Lines changed: 220 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,35 @@ See parameter model documentation at [AiNameParsedRequest](AiNameParsedRequest.m
202202
<summary>Parameter initialization example:</summary>
203203

204204
```typescript
205-
let request = ;
205+
let request = Models.aiNameParsedRequest()
206+
.culturalContext(Models.aiNameCulturalContext()
207+
.language('')
208+
.location('')
209+
.script('')
210+
.encoding('')
211+
.build())
212+
.parsedName([
213+
Models.aiNameComponent()
214+
.value('John')
215+
.category('FirstName')
216+
.score(0.95)
217+
.build(),
218+
Models.aiNameComponent()
219+
.value('Cane')
220+
.category('LastName')
221+
.score(0.5)
222+
.position(5)
223+
.build(),
224+
Models.aiNameComponent()
225+
.value('%F%L')
226+
.category('Format')
227+
.build(),
228+
Models.aiNameComponent()
229+
.value('0.5')
230+
.category('Score')
231+
.score(0.5)
232+
.build()])
233+
.build();
206234
```
207235

208236
</details>
@@ -242,7 +270,35 @@ let result = Models.aiNameWeightedVariants()
242270
const api = new EmailCloud(app_key, app_sid);
243271

244272
// Prepare parameters:
245-
let request = ;
273+
let request = Models.aiNameParsedRequest()
274+
.culturalContext(Models.aiNameCulturalContext()
275+
.language('')
276+
.location('')
277+
.script('')
278+
.encoding('')
279+
.build())
280+
.parsedName([
281+
Models.aiNameComponent()
282+
.value('John')
283+
.category('FirstName')
284+
.score(0.95)
285+
.build(),
286+
Models.aiNameComponent()
287+
.value('Cane')
288+
.category('LastName')
289+
.score(0.5)
290+
.position(5)
291+
.build(),
292+
Models.aiNameComponent()
293+
.value('%F%L')
294+
.category('Format')
295+
.build(),
296+
Models.aiNameComponent()
297+
.value('0.5')
298+
.category('Score')
299+
.score(0.5)
300+
.build()])
301+
.build();
246302

247303
// Call method:
248304
let result = api.ai.name.expandParsed(request);
@@ -364,7 +420,35 @@ See parameter model documentation at [AiNameParsedRequest](AiNameParsedRequest.m
364420
<summary>Parameter initialization example:</summary>
365421

366422
```typescript
367-
let request = ;
423+
let request = Models.aiNameParsedRequest()
424+
.culturalContext(Models.aiNameCulturalContext()
425+
.language('')
426+
.location('')
427+
.script('')
428+
.encoding('')
429+
.build())
430+
.parsedName([
431+
Models.aiNameComponent()
432+
.value('John')
433+
.category('FirstName')
434+
.score(0.95)
435+
.build(),
436+
Models.aiNameComponent()
437+
.value('Cane')
438+
.category('LastName')
439+
.score(0.5)
440+
.position(5)
441+
.build(),
442+
Models.aiNameComponent()
443+
.value('%F%L')
444+
.category('Format')
445+
.build(),
446+
Models.aiNameComponent()
447+
.value('0.5')
448+
.category('Score')
449+
.score(0.5)
450+
.build()])
451+
.build();
368452
```
369453

370454
</details>
@@ -397,7 +481,35 @@ let result = Models.aiNameFormatted()
397481
const api = new EmailCloud(app_key, app_sid);
398482

399483
// Prepare parameters:
400-
let request = ;
484+
let request = Models.aiNameParsedRequest()
485+
.culturalContext(Models.aiNameCulturalContext()
486+
.language('')
487+
.location('')
488+
.script('')
489+
.encoding('')
490+
.build())
491+
.parsedName([
492+
Models.aiNameComponent()
493+
.value('John')
494+
.category('FirstName')
495+
.score(0.95)
496+
.build(),
497+
Models.aiNameComponent()
498+
.value('Cane')
499+
.category('LastName')
500+
.score(0.5)
501+
.position(5)
502+
.build(),
503+
Models.aiNameComponent()
504+
.value('%F%L')
505+
.category('Format')
506+
.build(),
507+
Models.aiNameComponent()
508+
.value('0.5')
509+
.category('Score')
510+
.score(0.5)
511+
.build()])
512+
.build();
401513

402514
// Call method:
403515
let result = api.ai.name.formatParsed(request);
@@ -504,7 +616,35 @@ See parameter model documentation at [AiNameParsedRequest](AiNameParsedRequest.m
504616
<summary>Parameter initialization example:</summary>
505617

506618
```typescript
507-
let request = ;
619+
let request = Models.aiNameParsedRequest()
620+
.culturalContext(Models.aiNameCulturalContext()
621+
.language('')
622+
.location('')
623+
.script('')
624+
.encoding('')
625+
.build())
626+
.parsedName([
627+
Models.aiNameComponent()
628+
.value('John')
629+
.category('FirstName')
630+
.score(0.95)
631+
.build(),
632+
Models.aiNameComponent()
633+
.value('Cane')
634+
.category('LastName')
635+
.score(0.5)
636+
.position(5)
637+
.build(),
638+
Models.aiNameComponent()
639+
.value('%F%L')
640+
.category('Format')
641+
.build(),
642+
Models.aiNameComponent()
643+
.value('0.5')
644+
.category('Score')
645+
.score(0.5)
646+
.build()])
647+
.build();
508648
```
509649

510650
</details>
@@ -534,7 +674,35 @@ let result = ;
534674
const api = new EmailCloud(app_key, app_sid);
535675

536676
// Prepare parameters:
537-
let request = ;
677+
let request = Models.aiNameParsedRequest()
678+
.culturalContext(Models.aiNameCulturalContext()
679+
.language('')
680+
.location('')
681+
.script('')
682+
.encoding('')
683+
.build())
684+
.parsedName([
685+
Models.aiNameComponent()
686+
.value('John')
687+
.category('FirstName')
688+
.score(0.95)
689+
.build(),
690+
Models.aiNameComponent()
691+
.value('Cane')
692+
.category('LastName')
693+
.score(0.5)
694+
.position(5)
695+
.build(),
696+
Models.aiNameComponent()
697+
.value('%F%L')
698+
.category('Format')
699+
.build(),
700+
Models.aiNameComponent()
701+
.value('0.5')
702+
.category('Score')
703+
.score(0.5)
704+
.build()])
705+
.build();
538706

539707
// Call method:
540708
let result = api.ai.name.genderizeParsed(request);
@@ -752,7 +920,29 @@ Return type: Promise< [AiNameComponentList](AiNameComponentList.md) >
752920
<summary>Result example</summary>
753921

754922
```typescript
755-
let result = ;
923+
let result = Models.aiNameComponentList()
924+
.value([
925+
Models.aiNameComponent()
926+
.value('John')
927+
.category('FirstName')
928+
.score(0.95)
929+
.build(),
930+
Models.aiNameComponent()
931+
.value('Cane')
932+
.category('LastName')
933+
.score(0.5)
934+
.position(5)
935+
.build(),
936+
Models.aiNameComponent()
937+
.value('%F%L')
938+
.category('Format')
939+
.build(),
940+
Models.aiNameComponent()
941+
.value('0.5')
942+
.category('Score')
943+
.score(0.5)
944+
.build()])
945+
.build();
756946
```
757947

758948
</details>
@@ -777,7 +967,29 @@ let request = Models.AiNameParseRequest()
777967
let result = api.ai.name.parse(request);
778968

779969
// Result example:
780-
result = ;
970+
result = Models.aiNameComponentList()
971+
.value([
972+
Models.aiNameComponent()
973+
.value('John')
974+
.category('FirstName')
975+
.score(0.95)
976+
.build(),
977+
Models.aiNameComponent()
978+
.value('Cane')
979+
.category('LastName')
980+
.score(0.5)
981+
.position(5)
982+
.build(),
983+
Models.aiNameComponent()
984+
.value('%F%L')
985+
.category('Format')
986+
.build(),
987+
Models.aiNameComponent()
988+
.value('0.5')
989+
.category('Score')
990+
.score(0.5)
991+
.build()])
992+
.build();
781993
```
782994

783995
</details>

doc/AiNameComponentList.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,32 @@ Name | Type | Description | Notes
99
Parent class: [ListResponseOfAiNameComponent](ListResponseOfAiNameComponent.md)
1010

1111

12+
## Example
13+
```typescript
14+
let aiNameComponentList = Models.aiNameComponentList()
15+
.value([
16+
Models.aiNameComponent()
17+
.value('John')
18+
.category('FirstName')
19+
.score(0.95)
20+
.build(),
21+
Models.aiNameComponent()
22+
.value('Cane')
23+
.category('LastName')
24+
.score(0.5)
25+
.position(5)
26+
.build(),
27+
Models.aiNameComponent()
28+
.value('%F%L')
29+
.category('Format')
30+
.build(),
31+
Models.aiNameComponent()
32+
.value('0.5')
33+
.category('Score')
34+
.score(0.5)
35+
.build()])
36+
.build();
37+
```
38+
39+
1240
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

0 commit comments

Comments
 (0)