Skip to content

Commit

Permalink
small update to endpoint names
Browse files Browse the repository at this point in the history
  • Loading branch information
ibalosh committed Oct 9, 2023
1 parent de7b3b4 commit 51204b3
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.1.1

* small naming update for data removal endpoints

## 3.1.0

* added data removal endpoints
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"sending",
"transactional"
],
"version": "3.1.0",
"version": "3.1.1",
"author": "Igor Balos",
"contributors": [
"Igor Balos",
Expand Down
6 changes: 3 additions & 3 deletions src/client/AccountClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {

UpdateServerRequest,
UpdateSignatureRequest,
CreateDataRemovalRequest,
DataRemovalRequest,
DataRemovalStatus
} from "./models";

Expand Down Expand Up @@ -311,7 +311,7 @@ export default class AccountClient extends BaseClient {
* @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
* @returns A promise that will complete when the API responds (or an error occurs).
*/
public createDataRemoval(options: CreateDataRemovalRequest, callback?: Callback<DataRemovalStatus>): Promise<DataRemovalStatus> {
public requestDataRemoval(options: DataRemovalRequest, callback?: Callback<DataRemovalStatus>): Promise<DataRemovalStatus> {
return this.processRequestWithBody(ClientOptions.HttpMethod.POST, "/data-removals", options, callback);
}

Expand All @@ -322,7 +322,7 @@ export default class AccountClient extends BaseClient {
* @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation.
* @returns A promise that will complete when the API responds (or an error occurs).
*/
public getDataRemoval(id: number, callback?: Callback<DataRemovalStatus>): Promise<DataRemovalStatus> {
public getDataRemovalStatus(id: number, callback?: Callback<DataRemovalStatus>): Promise<DataRemovalStatus> {
return this.processRequestWithoutBody(ClientOptions.HttpMethod.GET, `/data-removals/${id}`, {}, callback);
}
}
2 changes: 1 addition & 1 deletion src/client/models/data_removal/DataRemovals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface DataRemovalStatus {
}


export class CreateDataRemovalRequest {
export class DataRemovalRequest {
public RequestedBy: string;
public RequestedFor: string;
public NotifyWhenCompleted: boolean;
Expand Down
6 changes: 3 additions & 3 deletions test/integration/DataRemoval.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("DataRemoval", () => {
const fromAddress: any = process.env.SENDER_EMAIL_ADDRESS;

it("createDataRemoval", async () => {
const dataRemovalStatus:DataRemovalStatus = await client.createDataRemoval({
const dataRemovalStatus:DataRemovalStatus = await client.requestDataRemoval({
RequestedBy: fromAddress.toString(),
RequestedFor: '[email protected]',
NotifyWhenCompleted: false})
Expand All @@ -23,13 +23,13 @@ describe("DataRemoval", () => {
});

it("getDataRemoval", async () => {
let dataRemovalStatus: DataRemovalStatus = await client.createDataRemoval({
let dataRemovalStatus: DataRemovalStatus = await client.requestDataRemoval({
RequestedBy: fromAddress.toString(),
RequestedFor: '[email protected]',
NotifyWhenCompleted: false})

const dataRemovalStatusId:number = dataRemovalStatus.ID;
dataRemovalStatus = await client.getDataRemoval(dataRemovalStatusId);
dataRemovalStatus = await client.getDataRemovalStatus(dataRemovalStatusId);
expect(dataRemovalStatus.ID).to.eq(dataRemovalStatusId)
});
});

0 comments on commit 51204b3

Please sign in to comment.