Skip to content

Commit

Permalink
Update checkout types
Browse files Browse the repository at this point in the history
  • Loading branch information
perrin4869 committed Oct 5, 2021
1 parent 91591ac commit fa7879e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
6 changes: 6 additions & 0 deletions src/resources/ECFormLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ export type ECFormLinkItem = {
storeId: string;
formId: string;

description: string | null;

expiry: string | null;
jwt: string;
secret: string;

amount: number;
amountFormatted: string;
currency: string;
Expand Down
5 changes: 0 additions & 5 deletions src/resources/ECInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@ import { AuthParams, ResponseCallback, SendData } from "../api/RestAPI";
import { CRUDResource } from "./CRUDResource";
import { ECFormLinkItem } from "./ECFormLinks";
import { ECFormItem } from "./ECForms";
import { EmailItem } from "./Emails";

export type ECInfoItem = {
id: string;
jwt: string;

form: ECFormItem;
link: ECFormLinkItem;
email?: EmailItem;
};

export type ECInfoGetParams = { secret: string };
Expand Down
5 changes: 5 additions & 0 deletions test/fixtures/ec-form-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ export const generateFixture = (): ECFormLinkItem => ({
storeId: uuid(),
formId: uuid(),

expiry: null,
description: null,
jwt: "myjwt",
secret: "mysecret",

amount: 100,
amountFormatted: "100",
currency: "JPY",
Expand Down
7 changes: 0 additions & 7 deletions test/fixtures/ec-info.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import { v4 as uuid } from "uuid";

import { ECInfoItem } from "../../src/resources/ECInfo";

import { generateFixture as generateForm } from "./ec-form";
import { generateFixture as generateLink } from "./ec-form-link";
import { generateFixture as generateEmail } from "./emails";

export const generateFixture = (): ECInfoItem => ({
id: uuid(),
jwt: "myjwt",

form: generateForm(),
link: generateLink(),
email: generateEmail(),
});

0 comments on commit fa7879e

Please sign in to comment.