1+ import { NetworkAsCodeClient } from "network-as-code" ;
2+
3+
4+ // Initialize the client object with your application key
5+ const client = new NetworkAsCodeClient ( "<your-application-key-here>" ) ;
6+
7+
8+ // Then, create a device object for the phone number. */
9+ const device = client . devices . get ( {
10+ // The phone number accepts the "+" sign, but not spaces or "()" marks
11+ phoneNumber : "+999999991000"
12+ } ) ;
13+
14+
15+ // Add the customer identity data here, which is to be used in matching
16+ // a customer against the account data bound to their phone number.
17+ const parameters =
18+ {
19+ phoneNumber : '+99999991000' ,
20+ idDocument : "66666666q" ,
21+ name : "Federica Sanchez Arjona" ,
22+ givenName : "Federica" ,
23+ familyName : "Sanchez Arjona" ,
24+ nameKanaHankaku : "federica" ,
25+ nameKanaZenkaku : "Federica" ,
26+ middleNames : "Sanchez" ,
27+ familyNameAtBirth : "YYYY" ,
28+ address : "Tokyo-to Chiyoda-ku Iidabashi 3-10-10" ,
29+ streetName : "Nicolas Salmeron" ,
30+ streetNumber : "4" ,
31+ postalCode : "1028460" ,
32+ region : "Tokyo" ,
33+ locality : "ZZZZ" ,
34+ country : "JP" ,
35+ houseNumberExtension : "VVVV" ,
36+ birthdate : "1978-08-22" ,
37+ email : "abc@example.com" ,
38+ gender : "OTHER"
39+ }
40+
41+ const customerMatchResult = await device . matchCustomer ( parameters ) ;
42+
43+ console . log ( customerMatchResult )
0 commit comments