@@ -33,7 +33,7 @@ beforeEach((): void => {
3333 nock . activate ( ) ;
3434 }
3535 client = createClient ( ) ;
36- scope = nock ( "https://kyc-test.adyen.com/lem/v3 " ) ;
36+ scope = nock ( "https://kyc-test.adyen.com/lem/v4 " ) ;
3737 legalEntityManagement = new LegalEntityManagementAPI ( client ) ;
3838} ) ;
3939
@@ -115,21 +115,11 @@ describe("Legal Entity Management", (): void => {
115115
116116 const response : models . BusinessLines = await legalEntityManagement . LegalEntitiesApi . getAllBusinessLinesUnderLegalEntity ( id ) ;
117117
118- expect ( response . businessLines ) . toEqual ( [ {
119- "capability" : "receivePayments" ,
120- "id" : "123456789" ,
121- "industryCode" : "123456789" ,
122- "legalEntityId" : "123456789" ,
123- "salesChannels" : [ "string" ] ,
124- "sourceOfFunds" : {
125- "acquiringBusinessLineId" : "string" ,
126- "adyenProcessedFunds" : false ,
127- "description" : "string" ,
128- "type" : "business"
129- } ,
130- "webData" : [ { "webAddress" : "string" } ] ,
131- "webDataExemption" : { "reason" : "noOnlinePresence" }
132- } ] ) ;
118+ expect ( response . businessLines . length ) . toBe ( 2 ) ;
119+ expect ( response . businessLines [ 0 ] ) . toBeTruthy ;
120+ expect ( response . businessLines [ 0 ] . id ) . toBe ( "SE322KH223222F5GV2SQ924F6" ) ;
121+ expect ( response . businessLines [ 0 ] . industryCode ) . toBe ( "4531" ) ;
122+ expect ( response . businessLines [ 0 ] . sourceOfFunds ?. adyenProcessedFunds ) . toBe ( false ) ;
133123 } ) ;
134124
135125 } ) ;
@@ -207,18 +197,16 @@ describe("Legal Entity Management", (): void => {
207197 . reply ( 200 , businessLine ) ;
208198
209199 const request : models . BusinessLineInfo = {
210- capability : models . BusinessLineInfo . CapabilityEnum . ReceivePayments ,
211200 industryCode : id ,
212201 legalEntityId : id ,
213202 service : models . BusinessLine . ServiceEnum . Banking
214203 } ;
215204
216205 const response : models . BusinessLine = await legalEntityManagement . BusinessLinesApi . createBusinessLine ( request ) ;
217206
218- expect ( response . id ) . toBe ( id ) ;
219- expect ( response . capability ) . toBe ( models . BusinessLineInfo . CapabilityEnum . ReceivePayments ) ;
220- expect ( response . industryCode ) . toBe ( id ) ;
221- expect ( response . legalEntityId ) . toBe ( id ) ;
207+ expect ( response . id ) . toBe ( "SE322KH223222F5GV2SQ924F6" ) ;
208+ expect ( response . industryCode ) . toBe ( "4531" ) ;
209+ expect ( response . legalEntityId ) . toBe ( "LE00000000000000000000001" ) ;
222210 } ) ;
223211
224212 it ( "should support GET /businessLines/{id}" , async ( ) : Promise < void > => {
@@ -227,27 +215,25 @@ describe("Legal Entity Management", (): void => {
227215
228216 const response : models . BusinessLine = await legalEntityManagement . BusinessLinesApi . getBusinessLine ( id ) ;
229217
230- expect ( response . id ) . toBe ( id ) ;
231- expect ( response . capability ) . toBe ( "receivePayments " ) ;
218+ expect ( response . id ) . toBe ( "SE322KH223222F5GV2SQ924F6" ) ;
219+ expect ( response . service ) . toBe ( "banking " ) ;
232220 } ) ;
233221
234222 it ( "should support PATCH /businessLines/{id}" , async ( ) : Promise < void > => {
235223 scope . patch ( `/businessLines/${ id } ` )
236224 . reply ( 200 , businessLine ) ;
237225
238226 const request : models . BusinessLineInfo = {
239- capability : models . BusinessLineInfo . CapabilityEnum . ReceivePayments ,
240227 industryCode : id ,
241228 service : models . BusinessLine . ServiceEnum . Banking ,
242229 legalEntityId : id
243230 } ;
244231
245232 const response : models . BusinessLine = await legalEntityManagement . BusinessLinesApi . updateBusinessLine ( id , request ) ;
246233
247- expect ( response . id ) . toBe ( id ) ;
248- expect ( response . capability ) . toBe ( models . BusinessLineInfo . CapabilityEnum . ReceivePayments ) ;
249- expect ( response . industryCode ) . toBe ( id ) ;
250- expect ( response . legalEntityId ) . toBe ( id ) ;
234+ expect ( response . id ) . toBe ( "SE322KH223222F5GV2SQ924F6" ) ;
235+ expect ( response . industryCode ) . toBe ( "4531" ) ;
236+ expect ( response . legalEntityId ) . toBe ( "LE00000000000000000000001" ) ;
251237 } ) ;
252238 } ) ;
253239
0 commit comments