11import { Account } from "../types/account"
22import { Include , UnitConfig , UnitResponse } from "../types/common"
33import { Customer } from "../types/customer"
4- import { AchPayment , CreatePaymentRequest , PatchPaymentRequest , Payment } from "../types/payments"
4+ import { CreatePaymentRequest , PatchPaymentRequest , Payment } from "../types/payments"
55import { Transaction } from "../types/transactions"
66import { BaseResource } from "./baseResource"
77
@@ -10,8 +10,8 @@ export class Payments extends BaseResource {
1010 super ( token , basePath + "/payments" , config )
1111 }
1212
13- public async create ( request : CreatePaymentRequest ) : Promise < UnitResponse < AchPayment > > {
14- return this . httpPost < UnitResponse < AchPayment > > ( "" , { data : request } )
13+ public async create ( request : CreatePaymentRequest ) : Promise < UnitResponse < Payment > > {
14+ return this . httpPost < UnitResponse < Payment > > ( "" , { data : request } )
1515 }
1616
1717 public async update ( id : string , request : PatchPaymentRequest ) : Promise < UnitResponse < Payment > > {
@@ -22,12 +22,12 @@ export class Payments extends BaseResource {
2222 * Optional. A comma-separated list of related resources to include in the response.
2323 * Related resources include: customer, account, transaction. See Getting Related Resources
2424 */
25- public async get ( id : string , include ?: string ) : Promise < UnitResponse < AchPayment & Include < Account [ ] | Customer [ ] | Transaction [ ] > > > {
25+ public async get ( id : string , include ?: string ) : Promise < UnitResponse < Payment & Include < Account [ ] | Customer [ ] | Transaction [ ] > > > {
2626 const params = { include : include ? `include=${ include } ` : "" }
27- return this . httpGet < UnitResponse < AchPayment & Include < Account [ ] | Customer [ ] | Transaction [ ] > > > ( `/${ id } ` , { params} )
27+ return this . httpGet < UnitResponse < Payment & Include < Account [ ] | Customer [ ] | Transaction [ ] > > > ( `/${ id } ` , { params} )
2828 }
2929
30- public async list ( params ?: PaymentListParams ) : Promise < UnitResponse < AchPayment [ ] & Include < Account [ ] | Customer [ ] | Transaction [ ] > > > {
30+ public async list ( params ?: PaymentListParams ) : Promise < UnitResponse < Payment [ ] & Include < Account [ ] | Customer [ ] | Transaction [ ] > > > {
3131 const parameters = {
3232 "page[limit]" : ( params ?. limit ? params . limit : 100 ) ,
3333 "page[offset]" : ( params ?. offset ? params . offset : 0 ) ,
@@ -38,7 +38,7 @@ export class Payments extends BaseResource {
3838 "include" : params ?. include ? params . include : ""
3939 }
4040
41- return this . httpGet < UnitResponse < AchPayment [ ] & Include < Account [ ] | Customer [ ] | Transaction [ ] > > > ( "" , { params : parameters } )
41+ return this . httpGet < UnitResponse < Payment [ ] & Include < Account [ ] | Customer [ ] | Transaction [ ] > > > ( "" , { params : parameters } )
4242 }
4343}
4444
0 commit comments