@finverse/sdk-typescript 0.0.17 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/api.d.ts +278 -83
  2. package/dist/api.js +241 -63
  3. package/package.json +5 -5
package/dist/api.d.ts CHANGED
@@ -431,6 +431,89 @@ export interface CurrencyAmount {
431
431
  */
432
432
  raw?: string;
433
433
  }
434
+ /**
435
+ *
436
+ * @export
437
+ * @interface CustomerPaymentInstruction
438
+ */
439
+ export interface CustomerPaymentInstruction {
440
+ /**
441
+ * A id of the user of this payment, need to equal to userId when creating link
442
+ * @type {string}
443
+ * @memberof CustomerPaymentInstruction
444
+ */
445
+ user_id: string;
446
+ /**
447
+ * Type of payment is being created, please check Documentation on which payment type is supported in each institution
448
+ * @type {string}
449
+ * @memberof CustomerPaymentInstruction
450
+ */
451
+ type: CustomerPaymentInstructionTypeEnum;
452
+ /**
453
+ * The recipient name
454
+ * @type {string}
455
+ * @memberof CustomerPaymentInstruction
456
+ */
457
+ recipient_name?: string;
458
+ /**
459
+ * The recipient account Id
460
+ * @type {string}
461
+ * @memberof CustomerPaymentInstruction
462
+ */
463
+ recipient_account_id?: string;
464
+ /**
465
+ * The sender name
466
+ * @type {string}
467
+ * @memberof CustomerPaymentInstruction
468
+ */
469
+ sender_name?: string;
470
+ /**
471
+ * The sender account Id
472
+ * @type {string}
473
+ * @memberof CustomerPaymentInstruction
474
+ */
475
+ sender_account_id?: string;
476
+ /**
477
+ * When the payment should start
478
+ * @type {string}
479
+ * @memberof CustomerPaymentInstruction
480
+ */
481
+ start_date?: string | null;
482
+ /**
483
+ * When the payment should stop
484
+ * @type {string}
485
+ * @memberof CustomerPaymentInstruction
486
+ */
487
+ end_date?: string | null;
488
+ /**
489
+ * The currency for the payment
490
+ * @type {string}
491
+ * @memberof CustomerPaymentInstruction
492
+ */
493
+ currency?: string;
494
+ /**
495
+ * The payment amount
496
+ * @type {number}
497
+ * @memberof CustomerPaymentInstruction
498
+ */
499
+ amount?: number;
500
+ /**
501
+ * How often the payment should be executed
502
+ * @type {string}
503
+ * @memberof CustomerPaymentInstruction
504
+ */
505
+ frequency?: string;
506
+ /**
507
+ * Related remarks about this instruction
508
+ * @type {string}
509
+ * @memberof CustomerPaymentInstruction
510
+ */
511
+ remarks?: string;
512
+ }
513
+ export declare const CustomerPaymentInstructionTypeEnum: {
514
+ readonly DebitAuthorization: "DEBIT_AUTHORIZATION";
515
+ };
516
+ export declare type CustomerPaymentInstructionTypeEnum = typeof CustomerPaymentInstructionTypeEnum[keyof typeof CustomerPaymentInstructionTypeEnum];
434
517
  /**
435
518
  *
436
519
  * @export
@@ -687,6 +770,31 @@ export interface GetLoginIdentityHistoryResponse {
687
770
  */
688
771
  status_history?: Array<LoginIdentityStatusDetails>;
689
772
  }
773
+ /**
774
+ *
775
+ * @export
776
+ * @interface GetPaymentInstructionsResponse
777
+ */
778
+ export interface GetPaymentInstructionsResponse {
779
+ /**
780
+ *
781
+ * @type {PaymentInstruction}
782
+ * @memberof GetPaymentInstructionsResponse
783
+ */
784
+ payment_instruction?: PaymentInstruction;
785
+ /**
786
+ *
787
+ * @type {LoginIdentityShort}
788
+ * @memberof GetPaymentInstructionsResponse
789
+ */
790
+ login_identity?: LoginIdentityShort;
791
+ /**
792
+ *
793
+ * @type {InstitutionShort}
794
+ * @memberof GetPaymentInstructionsResponse
795
+ */
796
+ institution?: InstitutionShort;
797
+ }
690
798
  /**
691
799
  *
692
800
  * @export
@@ -1141,7 +1249,7 @@ export interface IncomeTotal {
1141
1249
  * @type {IncomeEstimate}
1142
1250
  * @memberof IncomeTotal
1143
1251
  */
1144
- estmated_monthly_income?: IncomeEstimate;
1252
+ estimated_monthly_income?: IncomeEstimate;
1145
1253
  /**
1146
1254
  * Number of transactions counted towards income
1147
1255
  * @type {number}
@@ -1528,31 +1636,6 @@ export interface ListAccountsResponse {
1528
1636
  */
1529
1637
  institution?: InstitutionShort;
1530
1638
  }
1531
- /**
1532
- *
1533
- * @export
1534
- * @interface ListPaymentInstructionsResponse
1535
- */
1536
- export interface ListPaymentInstructionsResponse {
1537
- /**
1538
- *
1539
- * @type {Array<PaymentInstruction>}
1540
- * @memberof ListPaymentInstructionsResponse
1541
- */
1542
- payment_instructions?: Array<PaymentInstruction>;
1543
- /**
1544
- *
1545
- * @type {LoginIdentityShort}
1546
- * @memberof ListPaymentInstructionsResponse
1547
- */
1548
- login_identity?: LoginIdentityShort;
1549
- /**
1550
- *
1551
- * @type {InstitutionShort}
1552
- * @memberof ListPaymentInstructionsResponse
1553
- */
1554
- institution?: InstitutionShort;
1555
- }
1556
1639
  /**
1557
1640
  *
1558
1641
  * @export
@@ -1980,17 +2063,17 @@ export interface PaymentDetails {
1980
2063
  */
1981
2064
  export interface PaymentInstruction {
1982
2065
  /**
1983
- * The user id to which the payment instruction will refer
2066
+ * A id of the user of this payment, need to equal to userId when creating link
1984
2067
  * @type {string}
1985
2068
  * @memberof PaymentInstruction
1986
2069
  */
1987
- user_id: string;
2070
+ user_id?: string;
1988
2071
  /**
1989
- * What type of payment is being created
2072
+ * Type of payment is being created, please check Documentation on which payment type is supported in each institution
1990
2073
  * @type {string}
1991
2074
  * @memberof PaymentInstruction
1992
2075
  */
1993
- payment_type: PaymentInstructionPaymentTypeEnum;
2076
+ type?: PaymentInstructionTypeEnum;
1994
2077
  /**
1995
2078
  * The recipient name
1996
2079
  * @type {string}
@@ -2040,40 +2123,40 @@ export interface PaymentInstruction {
2040
2123
  */
2041
2124
  amount?: number;
2042
2125
  /**
2043
- * How often the payment is executed
2126
+ * How often the payment should be executed
2044
2127
  * @type {string}
2045
2128
  * @memberof PaymentInstruction
2046
2129
  */
2047
2130
  frequency?: string;
2048
2131
  /**
2049
- * Related remarks
2132
+ * Related remarks about this instruction
2050
2133
  * @type {string}
2051
2134
  * @memberof PaymentInstruction
2052
2135
  */
2053
2136
  remarks?: string;
2054
- /**
2055
- * A customer provided key to ensure ideompotency
2056
- * @type {string}
2057
- * @memberof PaymentInstruction
2058
- */
2059
- idempotence_key?: string;
2060
2137
  /**
2061
2138
  * Status of the payment
2062
2139
  * @type {string}
2063
2140
  * @memberof PaymentInstruction
2064
2141
  */
2065
- payment_status?: string;
2142
+ status?: string;
2066
2143
  /**
2067
2144
  * Reference identification returned by institution
2068
2145
  * @type {string}
2069
2146
  * @memberof PaymentInstruction
2070
2147
  */
2071
2148
  reference_id?: string;
2149
+ /**
2150
+ * Extra information collected for this payment instruction
2151
+ * @type {object}
2152
+ * @memberof PaymentInstruction
2153
+ */
2154
+ info?: object;
2072
2155
  }
2073
- export declare const PaymentInstructionPaymentTypeEnum: {
2156
+ export declare const PaymentInstructionTypeEnum: {
2074
2157
  readonly DebitAuthorization: "DEBIT_AUTHORIZATION";
2075
2158
  };
2076
- export declare type PaymentInstructionPaymentTypeEnum = typeof PaymentInstructionPaymentTypeEnum[keyof typeof PaymentInstructionPaymentTypeEnum];
2159
+ export declare type PaymentInstructionTypeEnum = typeof PaymentInstructionTypeEnum[keyof typeof PaymentInstructionTypeEnum];
2077
2160
  /**
2078
2161
  *
2079
2162
  * @export
@@ -2458,11 +2541,11 @@ export interface Transaction {
2458
2541
  export declare const CustomerApiAxiosParamCreator: (configuration?: Configuration) => {
2459
2542
  /**
2460
2543
  * Create a new payment instruction to be used when linking to perform debit authorization
2461
- * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
2544
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
2462
2545
  * @param {*} [options] Override http request option.
2463
2546
  * @throws {RequiredError}
2464
2547
  */
2465
- createPaymentInstruction: (paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2548
+ createPaymentInstruction: (paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2466
2549
  /**
2467
2550
  * generate a link token that can be used to create link
2468
2551
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -2491,6 +2574,13 @@ export declare const CustomerApiAxiosParamCreator: (configuration?: Configuratio
2491
2574
  * @throws {RequiredError}
2492
2575
  */
2493
2576
  getLoginIdentityHistory: (loginIdentityId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2577
+ /**
2578
+ * Get payment instructions to be used when linking to perform debit authorization by id
2579
+ * @param {string} paymentInstructionId The id of a payment instruction
2580
+ * @param {*} [options] Override http request option.
2581
+ * @throws {RequiredError}
2582
+ */
2583
+ getPaymentInstruction: (paymentInstructionId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2494
2584
  /**
2495
2585
  * Get a list of institutions
2496
2586
  * @param {string} [country] The country the institution belongs to
@@ -2516,11 +2606,11 @@ export declare const CustomerApiAxiosParamCreator: (configuration?: Configuratio
2516
2606
  export declare const CustomerApiFp: (configuration?: Configuration) => {
2517
2607
  /**
2518
2608
  * Create a new payment instruction to be used when linking to perform debit authorization
2519
- * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
2609
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
2520
2610
  * @param {*} [options] Override http request option.
2521
2611
  * @throws {RequiredError}
2522
2612
  */
2523
- createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentInstructionResponse>>;
2613
+ createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentInstructionResponse>>;
2524
2614
  /**
2525
2615
  * generate a link token that can be used to create link
2526
2616
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -2549,6 +2639,13 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
2549
2639
  * @throws {RequiredError}
2550
2640
  */
2551
2641
  getLoginIdentityHistory(loginIdentityId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLoginIdentityHistoryResponse>>;
2642
+ /**
2643
+ * Get payment instructions to be used when linking to perform debit authorization by id
2644
+ * @param {string} paymentInstructionId The id of a payment instruction
2645
+ * @param {*} [options] Override http request option.
2646
+ * @throws {RequiredError}
2647
+ */
2648
+ getPaymentInstruction(paymentInstructionId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPaymentInstructionsResponse>>;
2552
2649
  /**
2553
2650
  * Get a list of institutions
2554
2651
  * @param {string} [country] The country the institution belongs to
@@ -2574,11 +2671,11 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
2574
2671
  export declare const CustomerApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
2575
2672
  /**
2576
2673
  * Create a new payment instruction to be used when linking to perform debit authorization
2577
- * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
2674
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
2578
2675
  * @param {*} [options] Override http request option.
2579
2676
  * @throws {RequiredError}
2580
2677
  */
2581
- createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: any): AxiosPromise<CreatePaymentInstructionResponse>;
2678
+ createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: any): AxiosPromise<CreatePaymentInstructionResponse>;
2582
2679
  /**
2583
2680
  * generate a link token that can be used to create link
2584
2681
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -2607,6 +2704,13 @@ export declare const CustomerApiFactory: (configuration?: Configuration, basePat
2607
2704
  * @throws {RequiredError}
2608
2705
  */
2609
2706
  getLoginIdentityHistory(loginIdentityId: string, options?: any): AxiosPromise<GetLoginIdentityHistoryResponse>;
2707
+ /**
2708
+ * Get payment instructions to be used when linking to perform debit authorization by id
2709
+ * @param {string} paymentInstructionId The id of a payment instruction
2710
+ * @param {*} [options] Override http request option.
2711
+ * @throws {RequiredError}
2712
+ */
2713
+ getPaymentInstruction(paymentInstructionId: string, options?: any): AxiosPromise<GetPaymentInstructionsResponse>;
2610
2714
  /**
2611
2715
  * Get a list of institutions
2612
2716
  * @param {string} [country] The country the institution belongs to
@@ -2633,12 +2737,12 @@ export declare const CustomerApiFactory: (configuration?: Configuration, basePat
2633
2737
  export interface CustomerApiInterface {
2634
2738
  /**
2635
2739
  * Create a new payment instruction to be used when linking to perform debit authorization
2636
- * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
2740
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
2637
2741
  * @param {*} [options] Override http request option.
2638
2742
  * @throws {RequiredError}
2639
2743
  * @memberof CustomerApiInterface
2640
2744
  */
2641
- createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig): AxiosPromise<CreatePaymentInstructionResponse>;
2745
+ createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig): AxiosPromise<CreatePaymentInstructionResponse>;
2642
2746
  /**
2643
2747
  * generate a link token that can be used to create link
2644
2748
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -2671,6 +2775,14 @@ export interface CustomerApiInterface {
2671
2775
  * @memberof CustomerApiInterface
2672
2776
  */
2673
2777
  getLoginIdentityHistory(loginIdentityId: string, options?: AxiosRequestConfig): AxiosPromise<GetLoginIdentityHistoryResponse>;
2778
+ /**
2779
+ * Get payment instructions to be used when linking to perform debit authorization by id
2780
+ * @param {string} paymentInstructionId The id of a payment instruction
2781
+ * @param {*} [options] Override http request option.
2782
+ * @throws {RequiredError}
2783
+ * @memberof CustomerApiInterface
2784
+ */
2785
+ getPaymentInstruction(paymentInstructionId: string, options?: AxiosRequestConfig): AxiosPromise<GetPaymentInstructionsResponse>;
2674
2786
  /**
2675
2787
  * Get a list of institutions
2676
2788
  * @param {string} [country] The country the institution belongs to
@@ -2700,12 +2812,12 @@ export interface CustomerApiInterface {
2700
2812
  export declare class CustomerApi extends BaseAPI implements CustomerApiInterface {
2701
2813
  /**
2702
2814
  * Create a new payment instruction to be used when linking to perform debit authorization
2703
- * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
2815
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
2704
2816
  * @param {*} [options] Override http request option.
2705
2817
  * @throws {RequiredError}
2706
2818
  * @memberof CustomerApi
2707
2819
  */
2708
- createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentInstructionResponse>>;
2820
+ createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentInstructionResponse>>;
2709
2821
  /**
2710
2822
  * generate a link token that can be used to create link
2711
2823
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -2738,6 +2850,14 @@ export declare class CustomerApi extends BaseAPI implements CustomerApiInterface
2738
2850
  * @memberof CustomerApi
2739
2851
  */
2740
2852
  getLoginIdentityHistory(loginIdentityId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetLoginIdentityHistoryResponse>>;
2853
+ /**
2854
+ * Get payment instructions to be used when linking to perform debit authorization by id
2855
+ * @param {string} paymentInstructionId The id of a payment instruction
2856
+ * @param {*} [options] Override http request option.
2857
+ * @throws {RequiredError}
2858
+ * @memberof CustomerApi
2859
+ */
2860
+ getPaymentInstruction(paymentInstructionId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPaymentInstructionsResponse>>;
2741
2861
  /**
2742
2862
  * Get a list of institutions
2743
2863
  * @param {string} [country] The country the institution belongs to
@@ -3084,12 +3204,6 @@ export declare const LoginIdentityApiAxiosParamCreator: (configuration?: Configu
3084
3204
  * @throws {RequiredError}
3085
3205
  */
3086
3206
  listAccounts: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
3087
- /**
3088
- * Get list of payment instructions to be used when linking to perfom debit authorization
3089
- * @param {*} [options] Override http request option.
3090
- * @throws {RequiredError}
3091
- */
3092
- listPaymentInstructions: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
3093
3207
  /**
3094
3208
  * Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
3095
3209
  * @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
@@ -3197,12 +3311,6 @@ export declare const LoginIdentityApiFp: (configuration?: Configuration) => {
3197
3311
  * @throws {RequiredError}
3198
3312
  */
3199
3313
  listAccounts(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAccountsResponse>>;
3200
- /**
3201
- * Get list of payment instructions to be used when linking to perfom debit authorization
3202
- * @param {*} [options] Override http request option.
3203
- * @throws {RequiredError}
3204
- */
3205
- listPaymentInstructions(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPaymentInstructionsResponse>>;
3206
3314
  /**
3207
3315
  * Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
3208
3316
  * @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
@@ -3310,12 +3418,6 @@ export declare const LoginIdentityApiFactory: (configuration?: Configuration, ba
3310
3418
  * @throws {RequiredError}
3311
3419
  */
3312
3420
  listAccounts(options?: any): AxiosPromise<ListAccountsResponse>;
3313
- /**
3314
- * Get list of payment instructions to be used when linking to perfom debit authorization
3315
- * @param {*} [options] Override http request option.
3316
- * @throws {RequiredError}
3317
- */
3318
- listPaymentInstructions(options?: any): AxiosPromise<ListPaymentInstructionsResponse>;
3319
3421
  /**
3320
3422
  * Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
3321
3423
  * @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
@@ -3436,13 +3538,6 @@ export interface LoginIdentityApiInterface {
3436
3538
  * @memberof LoginIdentityApiInterface
3437
3539
  */
3438
3540
  listAccounts(options?: AxiosRequestConfig): AxiosPromise<ListAccountsResponse>;
3439
- /**
3440
- * Get list of payment instructions to be used when linking to perfom debit authorization
3441
- * @param {*} [options] Override http request option.
3442
- * @throws {RequiredError}
3443
- * @memberof LoginIdentityApiInterface
3444
- */
3445
- listPaymentInstructions(options?: AxiosRequestConfig): AxiosPromise<ListPaymentInstructionsResponse>;
3446
3541
  /**
3447
3542
  * Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
3448
3543
  * @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
@@ -3567,13 +3662,6 @@ export declare class LoginIdentityApi extends BaseAPI implements LoginIdentityAp
3567
3662
  * @memberof LoginIdentityApi
3568
3663
  */
3569
3664
  listAccounts(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAccountsResponse>>;
3570
- /**
3571
- * Get list of payment instructions to be used when linking to perfom debit authorization
3572
- * @param {*} [options] Override http request option.
3573
- * @throws {RequiredError}
3574
- * @memberof LoginIdentityApi
3575
- */
3576
- listPaymentInstructions(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPaymentInstructionsResponse>>;
3577
3665
  /**
3578
3666
  * Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
3579
3667
  * @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
@@ -3601,6 +3689,113 @@ export declare class LoginIdentityApi extends BaseAPI implements LoginIdentityAp
3601
3689
  */
3602
3690
  refreshLoginIdentity(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void>>;
3603
3691
  }
3692
+ /**
3693
+ * PaymentApi - axios parameter creator
3694
+ * @export
3695
+ */
3696
+ export declare const PaymentApiAxiosParamCreator: (configuration?: Configuration) => {
3697
+ /**
3698
+ * Create a new payment instruction to be used when linking to perform debit authorization
3699
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
3700
+ * @param {*} [options] Override http request option.
3701
+ * @throws {RequiredError}
3702
+ */
3703
+ createPaymentInstruction: (paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3704
+ /**
3705
+ * Get payment instructions to be used when linking to perform debit authorization by id
3706
+ * @param {string} paymentInstructionId The id of a payment instruction
3707
+ * @param {*} [options] Override http request option.
3708
+ * @throws {RequiredError}
3709
+ */
3710
+ getPaymentInstruction: (paymentInstructionId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3711
+ };
3712
+ /**
3713
+ * PaymentApi - functional programming interface
3714
+ * @export
3715
+ */
3716
+ export declare const PaymentApiFp: (configuration?: Configuration) => {
3717
+ /**
3718
+ * Create a new payment instruction to be used when linking to perform debit authorization
3719
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
3720
+ * @param {*} [options] Override http request option.
3721
+ * @throws {RequiredError}
3722
+ */
3723
+ createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentInstructionResponse>>;
3724
+ /**
3725
+ * Get payment instructions to be used when linking to perform debit authorization by id
3726
+ * @param {string} paymentInstructionId The id of a payment instruction
3727
+ * @param {*} [options] Override http request option.
3728
+ * @throws {RequiredError}
3729
+ */
3730
+ getPaymentInstruction(paymentInstructionId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPaymentInstructionsResponse>>;
3731
+ };
3732
+ /**
3733
+ * PaymentApi - factory interface
3734
+ * @export
3735
+ */
3736
+ export declare const PaymentApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
3737
+ /**
3738
+ * Create a new payment instruction to be used when linking to perform debit authorization
3739
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
3740
+ * @param {*} [options] Override http request option.
3741
+ * @throws {RequiredError}
3742
+ */
3743
+ createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: any): AxiosPromise<CreatePaymentInstructionResponse>;
3744
+ /**
3745
+ * Get payment instructions to be used when linking to perform debit authorization by id
3746
+ * @param {string} paymentInstructionId The id of a payment instruction
3747
+ * @param {*} [options] Override http request option.
3748
+ * @throws {RequiredError}
3749
+ */
3750
+ getPaymentInstruction(paymentInstructionId: string, options?: any): AxiosPromise<GetPaymentInstructionsResponse>;
3751
+ };
3752
+ /**
3753
+ * PaymentApi - interface
3754
+ * @export
3755
+ * @interface PaymentApi
3756
+ */
3757
+ export interface PaymentApiInterface {
3758
+ /**
3759
+ * Create a new payment instruction to be used when linking to perform debit authorization
3760
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
3761
+ * @param {*} [options] Override http request option.
3762
+ * @throws {RequiredError}
3763
+ * @memberof PaymentApiInterface
3764
+ */
3765
+ createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig): AxiosPromise<CreatePaymentInstructionResponse>;
3766
+ /**
3767
+ * Get payment instructions to be used when linking to perform debit authorization by id
3768
+ * @param {string} paymentInstructionId The id of a payment instruction
3769
+ * @param {*} [options] Override http request option.
3770
+ * @throws {RequiredError}
3771
+ * @memberof PaymentApiInterface
3772
+ */
3773
+ getPaymentInstruction(paymentInstructionId: string, options?: AxiosRequestConfig): AxiosPromise<GetPaymentInstructionsResponse>;
3774
+ }
3775
+ /**
3776
+ * PaymentApi - object-oriented interface
3777
+ * @export
3778
+ * @class PaymentApi
3779
+ * @extends {BaseAPI}
3780
+ */
3781
+ export declare class PaymentApi extends BaseAPI implements PaymentApiInterface {
3782
+ /**
3783
+ * Create a new payment instruction to be used when linking to perform debit authorization
3784
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
3785
+ * @param {*} [options] Override http request option.
3786
+ * @throws {RequiredError}
3787
+ * @memberof PaymentApi
3788
+ */
3789
+ createPaymentInstruction(paymentInstruction: CustomerPaymentInstruction, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentInstructionResponse>>;
3790
+ /**
3791
+ * Get payment instructions to be used when linking to perform debit authorization by id
3792
+ * @param {string} paymentInstructionId The id of a payment instruction
3793
+ * @param {*} [options] Override http request option.
3794
+ * @throws {RequiredError}
3795
+ * @memberof PaymentApi
3796
+ */
3797
+ getPaymentInstruction(paymentInstructionId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPaymentInstructionsResponse>>;
3798
+ }
3604
3799
  /**
3605
3800
  * PublicApi - axios parameter creator
3606
3801
  * @export
package/dist/api.js CHANGED
@@ -22,19 +22,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.PublicApi = exports.PublicApiFactory = exports.PublicApiFp = exports.PublicApiAxiosParamCreator = exports.LoginIdentityApi = exports.LoginIdentityApiFactory = exports.LoginIdentityApiFp = exports.LoginIdentityApiAxiosParamCreator = exports.LinkApi = exports.LinkApiFactory = exports.LinkApiFp = exports.LinkApiAxiosParamCreator = exports.CustomerApi = exports.CustomerApiFactory = exports.CustomerApiFp = exports.CustomerApiAxiosParamCreator = exports.PaymentInstructionPaymentTypeEnum = exports.LinkTokenRequestUiModeEnum = void 0;
25
+ exports.PublicApi = exports.PublicApiFactory = exports.PublicApiFp = exports.PublicApiAxiosParamCreator = exports.PaymentApi = exports.PaymentApiFactory = exports.PaymentApiFp = exports.PaymentApiAxiosParamCreator = exports.LoginIdentityApi = exports.LoginIdentityApiFactory = exports.LoginIdentityApiFp = exports.LoginIdentityApiAxiosParamCreator = exports.LinkApi = exports.LinkApiFactory = exports.LinkApiFp = exports.LinkApiAxiosParamCreator = exports.CustomerApi = exports.CustomerApiFactory = exports.CustomerApiFp = exports.CustomerApiAxiosParamCreator = exports.PaymentInstructionTypeEnum = exports.LinkTokenRequestUiModeEnum = exports.CustomerPaymentInstructionTypeEnum = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
29
29
  const common_1 = require("./common");
30
30
  // @ts-ignore
31
31
  const base_1 = require("./base");
32
+ exports.CustomerPaymentInstructionTypeEnum = {
33
+ DebitAuthorization: 'DEBIT_AUTHORIZATION',
34
+ };
32
35
  exports.LinkTokenRequestUiModeEnum = {
33
36
  Iframe: 'iframe',
34
37
  Redirect: 'redirect',
35
38
  AutoRedirect: 'auto_redirect',
36
39
  };
37
- exports.PaymentInstructionPaymentTypeEnum = {
40
+ exports.PaymentInstructionTypeEnum = {
38
41
  DebitAuthorization: 'DEBIT_AUTHORIZATION',
39
42
  };
40
43
  /**
@@ -45,7 +48,7 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
45
48
  return {
46
49
  /**
47
50
  * Create a new payment instruction to be used when linking to perform debit authorization
48
- * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
51
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
49
52
  * @param {*} [options] Override http request option.
50
53
  * @throws {RequiredError}
51
54
  */
@@ -197,6 +200,36 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
197
200
  options: localVarRequestOptions,
198
201
  };
199
202
  }),
203
+ /**
204
+ * Get payment instructions to be used when linking to perform debit authorization by id
205
+ * @param {string} paymentInstructionId The id of a payment instruction
206
+ * @param {*} [options] Override http request option.
207
+ * @throws {RequiredError}
208
+ */
209
+ getPaymentInstruction: (paymentInstructionId, options = {}) => __awaiter(this, void 0, void 0, function* () {
210
+ // verify required parameter 'paymentInstructionId' is not null or undefined
211
+ common_1.assertParamExists('getPaymentInstruction', 'paymentInstructionId', paymentInstructionId);
212
+ const localVarPath = `/payments/instruction/{paymentInstructionId}`.replace(`{${'paymentInstructionId'}}`, encodeURIComponent(String(paymentInstructionId)));
213
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
214
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
215
+ let baseOptions;
216
+ if (configuration) {
217
+ baseOptions = configuration.baseOptions;
218
+ }
219
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
220
+ const localVarHeaderParameter = {};
221
+ const localVarQueryParameter = {};
222
+ // authentication Oauth2 required
223
+ // oauth required
224
+ yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
225
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
226
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
227
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
228
+ return {
229
+ url: common_1.toPathString(localVarUrlObj),
230
+ options: localVarRequestOptions,
231
+ };
232
+ }),
200
233
  /**
201
234
  * Get a list of institutions
202
235
  * @param {string} [country] The country the institution belongs to
@@ -283,7 +316,7 @@ exports.CustomerApiFp = function (configuration) {
283
316
  return {
284
317
  /**
285
318
  * Create a new payment instruction to be used when linking to perform debit authorization
286
- * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
319
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
287
320
  * @param {*} [options] Override http request option.
288
321
  * @throws {RequiredError}
289
322
  */
@@ -341,6 +374,18 @@ exports.CustomerApiFp = function (configuration) {
341
374
  return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
342
375
  });
343
376
  },
377
+ /**
378
+ * Get payment instructions to be used when linking to perform debit authorization by id
379
+ * @param {string} paymentInstructionId The id of a payment instruction
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ */
383
+ getPaymentInstruction(paymentInstructionId, options) {
384
+ return __awaiter(this, void 0, void 0, function* () {
385
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPaymentInstruction(paymentInstructionId, options);
386
+ return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
387
+ });
388
+ },
344
389
  /**
345
390
  * Get a list of institutions
346
391
  * @param {string} [country] The country the institution belongs to
@@ -379,7 +424,7 @@ exports.CustomerApiFactory = function (configuration, basePath, axios) {
379
424
  return {
380
425
  /**
381
426
  * Create a new payment instruction to be used when linking to perform debit authorization
382
- * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
427
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
383
428
  * @param {*} [options] Override http request option.
384
429
  * @throws {RequiredError}
385
430
  */
@@ -424,6 +469,17 @@ exports.CustomerApiFactory = function (configuration, basePath, axios) {
424
469
  getLoginIdentityHistory(loginIdentityId, options) {
425
470
  return localVarFp.getLoginIdentityHistory(loginIdentityId, options).then((request) => request(axios, basePath));
426
471
  },
472
+ /**
473
+ * Get payment instructions to be used when linking to perform debit authorization by id
474
+ * @param {string} paymentInstructionId The id of a payment instruction
475
+ * @param {*} [options] Override http request option.
476
+ * @throws {RequiredError}
477
+ */
478
+ getPaymentInstruction(paymentInstructionId, options) {
479
+ return localVarFp
480
+ .getPaymentInstruction(paymentInstructionId, options)
481
+ .then((request) => request(axios, basePath));
482
+ },
427
483
  /**
428
484
  * Get a list of institutions
429
485
  * @param {string} [country] The country the institution belongs to
@@ -458,7 +514,7 @@ exports.CustomerApiFactory = function (configuration, basePath, axios) {
458
514
  class CustomerApi extends base_1.BaseAPI {
459
515
  /**
460
516
  * Create a new payment instruction to be used when linking to perform debit authorization
461
- * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
517
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
462
518
  * @param {*} [options] Override http request option.
463
519
  * @throws {RequiredError}
464
520
  * @memberof CustomerApi
@@ -516,6 +572,18 @@ class CustomerApi extends base_1.BaseAPI {
516
572
  .getLoginIdentityHistory(loginIdentityId, options)
517
573
  .then((request) => request(this.axios, this.basePath));
518
574
  }
575
+ /**
576
+ * Get payment instructions to be used when linking to perform debit authorization by id
577
+ * @param {string} paymentInstructionId The id of a payment instruction
578
+ * @param {*} [options] Override http request option.
579
+ * @throws {RequiredError}
580
+ * @memberof CustomerApi
581
+ */
582
+ getPaymentInstruction(paymentInstructionId, options) {
583
+ return exports.CustomerApiFp(this.configuration)
584
+ .getPaymentInstruction(paymentInstructionId, options)
585
+ .then((request) => request(this.axios, this.basePath));
586
+ }
519
587
  /**
520
588
  * Get a list of institutions
521
589
  * @param {string} [country] The country the institution belongs to
@@ -1302,33 +1370,6 @@ exports.LoginIdentityApiAxiosParamCreator = function (configuration) {
1302
1370
  options: localVarRequestOptions,
1303
1371
  };
1304
1372
  }),
1305
- /**
1306
- * Get list of payment instructions to be used when linking to perfom debit authorization
1307
- * @param {*} [options] Override http request option.
1308
- * @throws {RequiredError}
1309
- */
1310
- listPaymentInstructions: (options = {}) => __awaiter(this, void 0, void 0, function* () {
1311
- const localVarPath = `/payments/instruction`;
1312
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1313
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1314
- let baseOptions;
1315
- if (configuration) {
1316
- baseOptions = configuration.baseOptions;
1317
- }
1318
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1319
- const localVarHeaderParameter = {};
1320
- const localVarQueryParameter = {};
1321
- // authentication Oauth2 required
1322
- // oauth required
1323
- yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
1324
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
1325
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1326
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1327
- return {
1328
- url: common_1.toPathString(localVarUrlObj),
1329
- options: localVarRequestOptions,
1330
- };
1331
- }),
1332
1373
  /**
1333
1374
  * Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
1334
1375
  * @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
@@ -1576,17 +1617,6 @@ exports.LoginIdentityApiFp = function (configuration) {
1576
1617
  return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1577
1618
  });
1578
1619
  },
1579
- /**
1580
- * Get list of payment instructions to be used when linking to perfom debit authorization
1581
- * @param {*} [options] Override http request option.
1582
- * @throws {RequiredError}
1583
- */
1584
- listPaymentInstructions(options) {
1585
- return __awaiter(this, void 0, void 0, function* () {
1586
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listPaymentInstructions(options);
1587
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1588
- });
1589
- },
1590
1620
  /**
1591
1621
  * Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
1592
1622
  * @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
@@ -1736,14 +1766,6 @@ exports.LoginIdentityApiFactory = function (configuration, basePath, axios) {
1736
1766
  listAccounts(options) {
1737
1767
  return localVarFp.listAccounts(options).then((request) => request(axios, basePath));
1738
1768
  },
1739
- /**
1740
- * Get list of payment instructions to be used when linking to perfom debit authorization
1741
- * @param {*} [options] Override http request option.
1742
- * @throws {RequiredError}
1743
- */
1744
- listPaymentInstructions(options) {
1745
- return localVarFp.listPaymentInstructions(options).then((request) => request(axios, basePath));
1746
- },
1747
1769
  /**
1748
1770
  * Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
1749
1771
  * @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
@@ -1924,17 +1946,6 @@ class LoginIdentityApi extends base_1.BaseAPI {
1924
1946
  .listAccounts(options)
1925
1947
  .then((request) => request(this.axios, this.basePath));
1926
1948
  }
1927
- /**
1928
- * Get list of payment instructions to be used when linking to perfom debit authorization
1929
- * @param {*} [options] Override http request option.
1930
- * @throws {RequiredError}
1931
- * @memberof LoginIdentityApi
1932
- */
1933
- listPaymentInstructions(options) {
1934
- return exports.LoginIdentityApiFp(this.configuration)
1935
- .listPaymentInstructions(options)
1936
- .then((request) => request(this.axios, this.basePath));
1937
- }
1938
1949
  /**
1939
1950
  * Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
1940
1951
  * @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
@@ -1975,6 +1986,173 @@ class LoginIdentityApi extends base_1.BaseAPI {
1975
1986
  }
1976
1987
  }
1977
1988
  exports.LoginIdentityApi = LoginIdentityApi;
1989
+ /**
1990
+ * PaymentApi - axios parameter creator
1991
+ * @export
1992
+ */
1993
+ exports.PaymentApiAxiosParamCreator = function (configuration) {
1994
+ return {
1995
+ /**
1996
+ * Create a new payment instruction to be used when linking to perform debit authorization
1997
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
1998
+ * @param {*} [options] Override http request option.
1999
+ * @throws {RequiredError}
2000
+ */
2001
+ createPaymentInstruction: (paymentInstruction, options = {}) => __awaiter(this, void 0, void 0, function* () {
2002
+ // verify required parameter 'paymentInstruction' is not null or undefined
2003
+ common_1.assertParamExists('createPaymentInstruction', 'paymentInstruction', paymentInstruction);
2004
+ const localVarPath = `/payments/instruction`;
2005
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2006
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2007
+ let baseOptions;
2008
+ if (configuration) {
2009
+ baseOptions = configuration.baseOptions;
2010
+ }
2011
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2012
+ const localVarHeaderParameter = {};
2013
+ const localVarQueryParameter = {};
2014
+ // authentication Oauth2 required
2015
+ // oauth required
2016
+ yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
2017
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2018
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
2019
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2020
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2021
+ localVarRequestOptions.data = common_1.serializeDataIfNeeded(paymentInstruction, localVarRequestOptions, configuration);
2022
+ return {
2023
+ url: common_1.toPathString(localVarUrlObj),
2024
+ options: localVarRequestOptions,
2025
+ };
2026
+ }),
2027
+ /**
2028
+ * Get payment instructions to be used when linking to perform debit authorization by id
2029
+ * @param {string} paymentInstructionId The id of a payment instruction
2030
+ * @param {*} [options] Override http request option.
2031
+ * @throws {RequiredError}
2032
+ */
2033
+ getPaymentInstruction: (paymentInstructionId, options = {}) => __awaiter(this, void 0, void 0, function* () {
2034
+ // verify required parameter 'paymentInstructionId' is not null or undefined
2035
+ common_1.assertParamExists('getPaymentInstruction', 'paymentInstructionId', paymentInstructionId);
2036
+ const localVarPath = `/payments/instruction/{paymentInstructionId}`.replace(`{${'paymentInstructionId'}}`, encodeURIComponent(String(paymentInstructionId)));
2037
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2038
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2039
+ let baseOptions;
2040
+ if (configuration) {
2041
+ baseOptions = configuration.baseOptions;
2042
+ }
2043
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2044
+ const localVarHeaderParameter = {};
2045
+ const localVarQueryParameter = {};
2046
+ // authentication Oauth2 required
2047
+ // oauth required
2048
+ yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
2049
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
2050
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2051
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2052
+ return {
2053
+ url: common_1.toPathString(localVarUrlObj),
2054
+ options: localVarRequestOptions,
2055
+ };
2056
+ }),
2057
+ };
2058
+ };
2059
+ /**
2060
+ * PaymentApi - functional programming interface
2061
+ * @export
2062
+ */
2063
+ exports.PaymentApiFp = function (configuration) {
2064
+ const localVarAxiosParamCreator = exports.PaymentApiAxiosParamCreator(configuration);
2065
+ return {
2066
+ /**
2067
+ * Create a new payment instruction to be used when linking to perform debit authorization
2068
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
2069
+ * @param {*} [options] Override http request option.
2070
+ * @throws {RequiredError}
2071
+ */
2072
+ createPaymentInstruction(paymentInstruction, options) {
2073
+ return __awaiter(this, void 0, void 0, function* () {
2074
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createPaymentInstruction(paymentInstruction, options);
2075
+ return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
2076
+ });
2077
+ },
2078
+ /**
2079
+ * Get payment instructions to be used when linking to perform debit authorization by id
2080
+ * @param {string} paymentInstructionId The id of a payment instruction
2081
+ * @param {*} [options] Override http request option.
2082
+ * @throws {RequiredError}
2083
+ */
2084
+ getPaymentInstruction(paymentInstructionId, options) {
2085
+ return __awaiter(this, void 0, void 0, function* () {
2086
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPaymentInstruction(paymentInstructionId, options);
2087
+ return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
2088
+ });
2089
+ },
2090
+ };
2091
+ };
2092
+ /**
2093
+ * PaymentApi - factory interface
2094
+ * @export
2095
+ */
2096
+ exports.PaymentApiFactory = function (configuration, basePath, axios) {
2097
+ const localVarFp = exports.PaymentApiFp(configuration);
2098
+ return {
2099
+ /**
2100
+ * Create a new payment instruction to be used when linking to perform debit authorization
2101
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
2102
+ * @param {*} [options] Override http request option.
2103
+ * @throws {RequiredError}
2104
+ */
2105
+ createPaymentInstruction(paymentInstruction, options) {
2106
+ return localVarFp
2107
+ .createPaymentInstruction(paymentInstruction, options)
2108
+ .then((request) => request(axios, basePath));
2109
+ },
2110
+ /**
2111
+ * Get payment instructions to be used when linking to perform debit authorization by id
2112
+ * @param {string} paymentInstructionId The id of a payment instruction
2113
+ * @param {*} [options] Override http request option.
2114
+ * @throws {RequiredError}
2115
+ */
2116
+ getPaymentInstruction(paymentInstructionId, options) {
2117
+ return localVarFp
2118
+ .getPaymentInstruction(paymentInstructionId, options)
2119
+ .then((request) => request(axios, basePath));
2120
+ },
2121
+ };
2122
+ };
2123
+ /**
2124
+ * PaymentApi - object-oriented interface
2125
+ * @export
2126
+ * @class PaymentApi
2127
+ * @extends {BaseAPI}
2128
+ */
2129
+ class PaymentApi extends base_1.BaseAPI {
2130
+ /**
2131
+ * Create a new payment instruction to be used when linking to perform debit authorization
2132
+ * @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
2133
+ * @param {*} [options] Override http request option.
2134
+ * @throws {RequiredError}
2135
+ * @memberof PaymentApi
2136
+ */
2137
+ createPaymentInstruction(paymentInstruction, options) {
2138
+ return exports.PaymentApiFp(this.configuration)
2139
+ .createPaymentInstruction(paymentInstruction, options)
2140
+ .then((request) => request(this.axios, this.basePath));
2141
+ }
2142
+ /**
2143
+ * Get payment instructions to be used when linking to perform debit authorization by id
2144
+ * @param {string} paymentInstructionId The id of a payment instruction
2145
+ * @param {*} [options] Override http request option.
2146
+ * @throws {RequiredError}
2147
+ * @memberof PaymentApi
2148
+ */
2149
+ getPaymentInstruction(paymentInstructionId, options) {
2150
+ return exports.PaymentApiFp(this.configuration)
2151
+ .getPaymentInstruction(paymentInstructionId, options)
2152
+ .then((request) => request(this.axios, this.basePath));
2153
+ }
2154
+ }
2155
+ exports.PaymentApi = PaymentApi;
1978
2156
  /**
1979
2157
  * PublicApi - axios parameter creator
1980
2158
  * @export
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finverse/sdk-typescript",
3
- "version": "0.0.17",
3
+ "version": "0.0.20",
4
4
  "description": "OpenAPI client for @finverse/sdk-typescript",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -11,11 +11,11 @@
11
11
  "@finverse/sdk-typescript"
12
12
  ],
13
13
  "license": "MIT",
14
- "main": "index",
15
- "typings": "index",
14
+ "main": "dist/index.js",
15
+ "typings": "dist/index.js",
16
16
  "scripts": {
17
- "build": "tsc --outDir dist/",
18
- "prepare": "npm run build"
17
+ "build": "tsc --outDir dist",
18
+ "test": "mocha --require ts-node/register test/**/*.spec.ts"
19
19
  },
20
20
  "dependencies": {
21
21
  "axios": "^0.21.4"