@@ -71,7 +71,7 @@ export class MarginApi {
71
71
throw new Error ( 'Required parameter currency was null or undefined when calling cancelLoan.' ) ;
72
72
}
73
73
74
- localVarQueryParameters . currency = ObjectSerializer . serialize ( currency , 'string' ) ;
74
+ localVarQueryParameters [ ' currency' ] = ObjectSerializer . serialize ( currency , 'string' ) ;
75
75
76
76
const localVarUseFormData = false ;
77
77
@@ -175,7 +175,7 @@ export class MarginApi {
175
175
throw new Error ( 'Required parameter side was null or undefined when calling getLoan.' ) ;
176
176
}
177
177
178
- localVarQueryParameters . side = ObjectSerializer . serialize ( side , "'lend' | 'borrow'" ) ;
178
+ localVarQueryParameters [ ' side' ] = ObjectSerializer . serialize ( side , "'lend' | 'borrow'" ) ;
179
179
180
180
const localVarUseFormData = false ;
181
181
@@ -236,7 +236,7 @@ export class MarginApi {
236
236
throw new Error ( 'Required parameter loanId was null or undefined when calling getLoanRecord.' ) ;
237
237
}
238
238
239
- localVarQueryParameters . loan_id = ObjectSerializer . serialize ( loanId , 'string' ) ;
239
+ localVarQueryParameters [ ' loan_id' ] = ObjectSerializer . serialize ( loanId , 'string' ) ;
240
240
241
241
const localVarUseFormData = false ;
242
242
@@ -268,7 +268,7 @@ export class MarginApi {
268
268
*/
269
269
public async listFundingAccounts ( opts : {
270
270
currency ?: string ;
271
- } ) : Promise < { response : http . IncomingMessage ; body : FundingAccount [ ] } > {
271
+ } ) : Promise < { response : http . IncomingMessage ; body : Array < FundingAccount > } > {
272
272
const localVarPath = this . client . basePath + '/margin/funding_accounts' ;
273
273
const localVarQueryParameters : any = { } ;
274
274
const localVarHeaderParams : any = ( < any > Object ) . assign ( { } , this . client . defaultHeaders ) ;
@@ -283,7 +283,7 @@ export class MarginApi {
283
283
284
284
opts = opts || { } ;
285
285
if ( opts . currency !== undefined ) {
286
- localVarQueryParameters . currency = ObjectSerializer . serialize ( opts . currency , 'string' ) ;
286
+ localVarQueryParameters [ ' currency' ] = ObjectSerializer . serialize ( opts . currency , 'string' ) ;
287
287
}
288
288
289
289
const localVarUseFormData = false ;
@@ -305,7 +305,11 @@ export class MarginApi {
305
305
}
306
306
307
307
const authSettings = [ 'apiv4' ] ;
308
- return this . client . request < FundingAccount [ ] > ( localVarRequestOptions , 'Array<FundingAccount>' , authSettings ) ;
308
+ return this . client . request < Array < FundingAccount > > (
309
+ localVarRequestOptions ,
310
+ 'Array<FundingAccount>' ,
311
+ authSettings ,
312
+ ) ;
309
313
}
310
314
311
315
/**
@@ -315,7 +319,7 @@ export class MarginApi {
315
319
*/
316
320
public async listFundingBook (
317
321
currency : string ,
318
- ) : Promise < { response : http . IncomingMessage ; body : FundingBookItem [ ] } > {
322
+ ) : Promise < { response : http . IncomingMessage ; body : Array < FundingBookItem > } > {
319
323
const localVarPath = this . client . basePath + '/margin/funding_book' ;
320
324
const localVarQueryParameters : any = { } ;
321
325
const localVarHeaderParams : any = ( < any > Object ) . assign ( { } , this . client . defaultHeaders ) ;
@@ -333,7 +337,7 @@ export class MarginApi {
333
337
throw new Error ( 'Required parameter currency was null or undefined when calling listFundingBook.' ) ;
334
338
}
335
339
336
- localVarQueryParameters . currency = ObjectSerializer . serialize ( currency , 'string' ) ;
340
+ localVarQueryParameters [ ' currency' ] = ObjectSerializer . serialize ( currency , 'string' ) ;
337
341
338
342
const localVarUseFormData = false ;
339
343
@@ -354,7 +358,11 @@ export class MarginApi {
354
358
}
355
359
356
360
const authSettings = [ ] ;
357
- return this . client . request < FundingBookItem [ ] > ( localVarRequestOptions , 'Array<FundingBookItem>' , authSettings ) ;
361
+ return this . client . request < Array < FundingBookItem > > (
362
+ localVarRequestOptions ,
363
+ 'Array<FundingBookItem>' ,
364
+ authSettings ,
365
+ ) ;
358
366
}
359
367
360
368
/**
@@ -369,7 +377,7 @@ export class MarginApi {
369
377
public async listLoanRecords (
370
378
loanId : string ,
371
379
opts : { status ?: 'loaned' | 'finished' ; page ?: number ; limit ?: number } ,
372
- ) : Promise < { response : http . IncomingMessage ; body : LoanRecord [ ] } > {
380
+ ) : Promise < { response : http . IncomingMessage ; body : Array < LoanRecord > } > {
373
381
const localVarPath = this . client . basePath + '/margin/loan_records' ;
374
382
const localVarQueryParameters : any = { } ;
375
383
const localVarHeaderParams : any = ( < any > Object ) . assign ( { } , this . client . defaultHeaders ) ;
@@ -388,18 +396,18 @@ export class MarginApi {
388
396
}
389
397
390
398
opts = opts || { } ;
391
- localVarQueryParameters . loan_id = ObjectSerializer . serialize ( loanId , 'string' ) ;
399
+ localVarQueryParameters [ ' loan_id' ] = ObjectSerializer . serialize ( loanId , 'string' ) ;
392
400
393
401
if ( opts . status !== undefined ) {
394
- localVarQueryParameters . status = ObjectSerializer . serialize ( opts . status , "'loaned' | 'finished'" ) ;
402
+ localVarQueryParameters [ ' status' ] = ObjectSerializer . serialize ( opts . status , "'loaned' | 'finished'" ) ;
395
403
}
396
404
397
405
if ( opts . page !== undefined ) {
398
- localVarQueryParameters . page = ObjectSerializer . serialize ( opts . page , 'number' ) ;
406
+ localVarQueryParameters [ ' page' ] = ObjectSerializer . serialize ( opts . page , 'number' ) ;
399
407
}
400
408
401
409
if ( opts . limit !== undefined ) {
402
- localVarQueryParameters . limit = ObjectSerializer . serialize ( opts . limit , 'number' ) ;
410
+ localVarQueryParameters [ ' limit' ] = ObjectSerializer . serialize ( opts . limit , 'number' ) ;
403
411
}
404
412
405
413
const localVarUseFormData = false ;
@@ -421,15 +429,17 @@ export class MarginApi {
421
429
}
422
430
423
431
const authSettings = [ 'apiv4' ] ;
424
- return this . client . request < LoanRecord [ ] > ( localVarRequestOptions , 'Array<LoanRecord>' , authSettings ) ;
432
+ return this . client . request < Array < LoanRecord > > ( localVarRequestOptions , 'Array<LoanRecord>' , authSettings ) ;
425
433
}
426
434
427
435
/**
428
436
*
429
437
* @summary List loan repayment records
430
438
* @param loanId Loan ID
431
439
*/
432
- public async listLoanRepayments ( loanId : string ) : Promise < { response : http . IncomingMessage ; body : Repayment [ ] } > {
440
+ public async listLoanRepayments (
441
+ loanId : string ,
442
+ ) : Promise < { response : http . IncomingMessage ; body : Array < Repayment > } > {
433
443
const localVarPath =
434
444
this . client . basePath +
435
445
'/margin/loans/{loan_id}/repayment' . replace ( '{' + 'loan_id' + '}' , encodeURIComponent ( String ( loanId ) ) ) ;
@@ -468,7 +478,7 @@ export class MarginApi {
468
478
}
469
479
470
480
const authSettings = [ 'apiv4' ] ;
471
- return this . client . request < Repayment [ ] > ( localVarRequestOptions , 'Array<Repayment>' , authSettings ) ;
481
+ return this . client . request < Array < Repayment > > ( localVarRequestOptions , 'Array<Repayment>' , authSettings ) ;
472
482
}
473
483
474
484
/**
@@ -495,7 +505,7 @@ export class MarginApi {
495
505
page ?: number ;
496
506
limit ?: number ;
497
507
} ,
498
- ) : Promise < { response : http . IncomingMessage ; body : Loan [ ] } > {
508
+ ) : Promise < { response : http . IncomingMessage ; body : Array < Loan > } > {
499
509
const localVarPath = this . client . basePath + '/margin/loans' ;
500
510
const localVarQueryParameters : any = { } ;
501
511
const localVarHeaderParams : any = ( < any > Object ) . assign ( { } , this . client . defaultHeaders ) ;
@@ -519,35 +529,35 @@ export class MarginApi {
519
529
}
520
530
521
531
opts = opts || { } ;
522
- localVarQueryParameters . status = ObjectSerializer . serialize (
532
+ localVarQueryParameters [ ' status' ] = ObjectSerializer . serialize (
523
533
status ,
524
534
"'open' | 'loaned' | 'finished' | 'auto_repaid'" ,
525
535
) ;
526
536
527
- localVarQueryParameters . side = ObjectSerializer . serialize ( side , "'lend' | 'borrow'" ) ;
537
+ localVarQueryParameters [ ' side' ] = ObjectSerializer . serialize ( side , "'lend' | 'borrow'" ) ;
528
538
529
539
if ( opts . currency !== undefined ) {
530
- localVarQueryParameters . currency = ObjectSerializer . serialize ( opts . currency , 'string' ) ;
540
+ localVarQueryParameters [ ' currency' ] = ObjectSerializer . serialize ( opts . currency , 'string' ) ;
531
541
}
532
542
533
543
if ( opts . currencyPair !== undefined ) {
534
- localVarQueryParameters . currency_pair = ObjectSerializer . serialize ( opts . currencyPair , 'string' ) ;
544
+ localVarQueryParameters [ ' currency_pair' ] = ObjectSerializer . serialize ( opts . currencyPair , 'string' ) ;
535
545
}
536
546
537
547
if ( opts . sortBy !== undefined ) {
538
- localVarQueryParameters . sort_by = ObjectSerializer . serialize ( opts . sortBy , "'create_time' | 'rate'" ) ;
548
+ localVarQueryParameters [ ' sort_by' ] = ObjectSerializer . serialize ( opts . sortBy , "'create_time' | 'rate'" ) ;
539
549
}
540
550
541
551
if ( opts . reverseSort !== undefined ) {
542
- localVarQueryParameters . reverse_sort = ObjectSerializer . serialize ( opts . reverseSort , 'boolean' ) ;
552
+ localVarQueryParameters [ ' reverse_sort' ] = ObjectSerializer . serialize ( opts . reverseSort , 'boolean' ) ;
543
553
}
544
554
545
555
if ( opts . page !== undefined ) {
546
- localVarQueryParameters . page = ObjectSerializer . serialize ( opts . page , 'number' ) ;
556
+ localVarQueryParameters [ ' page' ] = ObjectSerializer . serialize ( opts . page , 'number' ) ;
547
557
}
548
558
549
559
if ( opts . limit !== undefined ) {
550
- localVarQueryParameters . limit = ObjectSerializer . serialize ( opts . limit , 'number' ) ;
560
+ localVarQueryParameters [ ' limit' ] = ObjectSerializer . serialize ( opts . limit , 'number' ) ;
551
561
}
552
562
553
563
const localVarUseFormData = false ;
@@ -569,7 +579,7 @@ export class MarginApi {
569
579
}
570
580
571
581
const authSettings = [ 'apiv4' ] ;
572
- return this . client . request < Loan [ ] > ( localVarRequestOptions , 'Array<Loan>' , authSettings ) ;
582
+ return this . client . request < Array < Loan > > ( localVarRequestOptions , 'Array<Loan>' , authSettings ) ;
573
583
}
574
584
575
585
/**
@@ -580,7 +590,7 @@ export class MarginApi {
580
590
*/
581
591
public async listMarginAccounts ( opts : {
582
592
currencyPair ?: string ;
583
- } ) : Promise < { response : http . IncomingMessage ; body : MarginAccount [ ] } > {
593
+ } ) : Promise < { response : http . IncomingMessage ; body : Array < MarginAccount > } > {
584
594
const localVarPath = this . client . basePath + '/margin/accounts' ;
585
595
const localVarQueryParameters : any = { } ;
586
596
const localVarHeaderParams : any = ( < any > Object ) . assign ( { } , this . client . defaultHeaders ) ;
@@ -595,7 +605,7 @@ export class MarginApi {
595
605
596
606
opts = opts || { } ;
597
607
if ( opts . currencyPair !== undefined ) {
598
- localVarQueryParameters . currency_pair = ObjectSerializer . serialize ( opts . currencyPair , 'string' ) ;
608
+ localVarQueryParameters [ ' currency_pair' ] = ObjectSerializer . serialize ( opts . currencyPair , 'string' ) ;
599
609
}
600
610
601
611
const localVarUseFormData = false ;
@@ -617,7 +627,7 @@ export class MarginApi {
617
627
}
618
628
619
629
const authSettings = [ 'apiv4' ] ;
620
- return this . client . request < MarginAccount [ ] > ( localVarRequestOptions , 'Array<MarginAccount>' , authSettings ) ;
630
+ return this . client . request < Array < MarginAccount > > ( localVarRequestOptions , 'Array<MarginAccount>' , authSettings ) ;
621
631
}
622
632
623
633
/**
@@ -626,7 +636,7 @@ export class MarginApi {
626
636
*/
627
637
public async listMarginCurrencyPairs ( ) : Promise < {
628
638
response : http . IncomingMessage ;
629
- body : MarginCurrencyPair [ ] ;
639
+ body : Array < MarginCurrencyPair > ;
630
640
} > {
631
641
const localVarPath = this . client . basePath + '/margin/currency_pairs' ;
632
642
const localVarQueryParameters : any = { } ;
@@ -659,7 +669,7 @@ export class MarginApi {
659
669
}
660
670
661
671
const authSettings = [ ] ;
662
- return this . client . request < MarginCurrencyPair [ ] > (
672
+ return this . client . request < Array < MarginCurrencyPair > > (
663
673
localVarRequestOptions ,
664
674
'Array<MarginCurrencyPair>' ,
665
675
authSettings ,
@@ -695,9 +705,9 @@ export class MarginApi {
695
705
throw new Error ( 'Required parameter ids was null or undefined when calling mergeLoans.' ) ;
696
706
}
697
707
698
- localVarQueryParameters . currency = ObjectSerializer . serialize ( currency , 'string' ) ;
708
+ localVarQueryParameters [ ' currency' ] = ObjectSerializer . serialize ( currency , 'string' ) ;
699
709
700
- localVarQueryParameters . ids = ObjectSerializer . serialize ( ids , 'string' ) ;
710
+ localVarQueryParameters [ ' ids' ] = ObjectSerializer . serialize ( ids , 'string' ) ;
701
711
702
712
const localVarUseFormData = false ;
703
713
0 commit comments