Skip to content

Commit

Permalink
fix: update body type for banks user update
Browse files Browse the repository at this point in the history
  • Loading branch information
DotGav committed Jun 22, 2020
1 parent 41a4a49 commit 47b5276
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/BanksUser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IBanksUser, BanksUserStatus, PlugIn, Score, Analysis } from '../lib';
import { IBanksUser, BanksUserStatus, PlugIn, Score, Analysis, PatchBanksUserDTO } from '../lib';
import { RequestBuilder } from '../RequestBuilder';

/**
Expand Down Expand Up @@ -78,7 +78,7 @@ export class BanksUser {
* Update a banksUser
* @param body Patch banks user request body
*/
public async update(body: Partial<IBanksUser>): Promise<void> {
public async update(body: PatchBanksUserDTO): Promise<void> {
const banksUser: IBanksUser = await this.requestBuilder.request({
url: `/v1/banks-users/${this.id}`,
method: 'PATCH',
Expand Down
14 changes: 13 additions & 1 deletion src/lib/Algoan.dto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EventName } from './Algoan.enum';
import { SubscriptionStatus } from './Algoan.interface';
import { SubscriptionStatus, BanksUserStatus, PlugIn, Score, Analysis } from './Algoan.interface';

/**
* POST /subscriptions DTO interface
Expand All @@ -20,3 +20,15 @@ export interface PatchSubscriptionDTO {
/** Subscription status to update */
status: SubscriptionStatus;
}

/**
* PATCH /banks-user/:id DTO interface
*/
export interface PatchBanksUserDTO {
status?: BanksUserStatus;
redirectUrl?: string;
redirectUrlTTL?: number;
plugIn?: PlugIn;
scores?: Score[];
analysis?: Analysis;
}

0 comments on commit 47b5276

Please sign in to comment.