Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahdeyyy committed Apr 18, 2024
1 parent 1b82e0b commit 4a25717
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,55 @@ const product = await paystack.product.fetch(product_id)
const product = await paystack.product.update(product_id, { price: 69420 })
```

### Dedicated Virtual Accounts

#### Create DVA
```typescript
const response = await paystack().dva.create({ customer: import.meta.env.CUSTOMER_CODE ?? '' })
```
#### Assign DVA
```typescript
const response = await paystack().dva.assign({
email: "[email protected]",
first_name: "Jane",
middle_name: "Karen",
last_name: "Doe",
phone: "+2348100000000",
preferred_bank: "test-bank",
country: "NG"

})
```
#### List DVA
```typescript
const response = await paystack().dva.list({ active: true, currency: "NGN" });
```
#### Fetch DVA
```typescript
const response = await paystack().dva.fetch("foo")
```
#### Requery DVA
```typescript
const response = await paystack().dva.requery({ account_number: "98897", provider_slug: "wema-bank" });
```
#### Deactivate DVA
```typescript
const response = await paystack().dva.deactivate("foo")
```
#### Split DVA
```typescript
const response = await paystack().dva.split({ customer: "janey" })
```

#### Remove split DVA
```typescript
const response = await paystack().dva.remove_split("bar")
```
#### Fetch bank providers
```typescript
const response = await paystack().dva.fetch_bank_providers();
```

## ROADMAP

- [x] Requests
Expand Down
2 changes: 1 addition & 1 deletion lib/dedicated virtual accounts/dva.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test("requery DVA", async () => {
}
});

test("delete DVA", async () => {
test("deactivate DVA", async () => {
let response = await paystack().dva.deactivate("foo")
expect(response.status).toBe(false)
})
Expand Down

0 comments on commit 4a25717

Please sign in to comment.