Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@highbeam/unit-node-sdk",
"version": "0.8.11",
"version": "0.8.12",
"description": "",
"main": "dist/unit.js",
"types": "dist/unit.d.ts",
Expand Down
6 changes: 5 additions & 1 deletion resources/cards.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Card, CreateDebitCardRequest, ReplaceCardRequest } from "../types/cards"
import { Card, CardLimits, CreateDebitCardRequest, ReplaceCardRequest } from "../types/cards"
import { Include, UnitConfig, UnitResponse } from "../types/common"
import { Customer } from "../types/customer"
import { Account } from "../types/account"
Expand Down Expand Up @@ -73,6 +73,10 @@ export class Cards extends BaseResource {

return this.httpGet<UnitResponse<Card[]> & Include<Account[] | Customer[]>>("", { params: parameters })
}

public async limits(id: string) : Promise<UnitResponse<CardLimits>> {
return this.httpGet<UnitResponse<CardLimits>>(`/${id}/limits`)
}
}

export interface CardListParams {
Expand Down
22 changes: 22 additions & 0 deletions types/cards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,4 +519,26 @@ export interface ReplaceCardRequest {
shippingAddress?: Address
}

export interface CardLimits {
type: "limits"
attributes: {
limits: {
dailyWithdrawal: number
dailyPurchase: number
monthlyWithdrawal: number
monthlyPurchase: number
}
dailyTotals: {
withdrawals: number
deposits: number
purchases: number
}
monthlyTotals: {
withdrawals: number
deposits: number
purchases: number
}
}
}