Skip to content

Commit

Permalink
feat: Add method to withdraw from card
Browse files Browse the repository at this point in the history
  • Loading branch information
peoray committed Jan 30, 2024
1 parent 4f5bcd1 commit e49b6b0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/services/cards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
IBlockCardRequest,
ILinkCardwithFixedAccountRequest,
IFundCardRequest,
IWithdrawFromCardRequest,
} from '../types'

/**
Expand Down Expand Up @@ -85,4 +86,11 @@ export class Cards extends HTTPCore {
): Promise<ICardResponse> {
return this.post<ICardResponse>(`/cards/fund/${cardID}`, data)
}

public async withdrawFromCard(
cardID: string,
data: IWithdrawFromCardRequest
): Promise<ICardResponse> {
return this.post<ICardResponse>(`/cards/withdraw/${cardID}`, data)
}
}
6 changes: 6 additions & 0 deletions src/types/cards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@ export interface IFundCardRequest {
from_account_id: string
currency: string
}

export interface IWithdrawFromCardRequest {
amount: number
to_account_id: string
currency: string
}

0 comments on commit e49b6b0

Please sign in to comment.