Skip to content

Commit e9e4e67

Browse files
authored
Allow optional cardId filtering when fetching authorizations (#85)
1 parent b7319fe commit e9e4e67

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

resources/authorization.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export class Authorizations extends BaseResource {
1717
"page[limit]": (params?.limit ? params?.limit : 100),
1818
"page[offset]": (params?.offset ? params?.offset : 0),
1919
...(params?.accountId && { "filter[accountId]": params?.accountId }),
20-
...(params?.customerId && { "filter[customerId]": params?.customerId })
20+
...(params?.customerId && { "filter[customerId]": params?.customerId }),
21+
...(params?.cardId && { "filter[cardId]": params?.cardId })
2122
}
2223

2324
return this.httpGet<UnitResponse<Authorization[]>>("", { params: parameters })
@@ -48,4 +49,10 @@ export interface AuthorizationQueryParams {
4849
* default: empty
4950
*/
5051
customerId?: string
52+
53+
/**
54+
* Optional. Filters the results by the specified card id.
55+
* default: empty
56+
*/
57+
cardId?: string
5158
}

0 commit comments

Comments
 (0)