Skip to content

Commit 1a8b151

Browse files
axshaniilyamerman
andauthored
achPayment to Payment (#48)
* achPayment to Payment * amount type is number * lint Co-authored-by: Ilya Merman <[email protected]>
1 parent cf1d140 commit 1a8b151

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

resources/payments.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Account } from "../types/account"
22
import { Include, UnitConfig, UnitResponse } from "../types/common"
33
import { Customer } from "../types/customer"
4-
import { AchPayment, CreatePaymentRequest, PatchPaymentRequest, Payment } from "../types/payments"
4+
import { CreatePaymentRequest, PatchPaymentRequest, Payment } from "../types/payments"
55
import { Transaction } from "../types/transactions"
66
import { 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

Comments
 (0)