Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reqs #209

Merged
merged 2 commits into from
Jul 7, 2022
Merged

reqs #209

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions __tests__/SelfMailerModels.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe("SelfMailer Models", () => {

it("rejects invalid values for outside_template_id", () => {
const rec = new SelfMailer();
expect(rec.outside_template_id).toBeNull();
expect(rec.outside_template_id).toBeUndefined();

const invalidValues = ["Nope"];
for (const val of invalidValues) {
Expand All @@ -106,7 +106,7 @@ describe("SelfMailer Models", () => {

it("rejects invalid values for outside_template_id", () => {
const rec = new SelfMailer();
expect(rec.inside_template_id).toBeNull();
expect(rec.inside_template_id).toBeUndefined();

const invalidValues = ["Nope"];
for (const val of invalidValues) {
Expand All @@ -121,7 +121,7 @@ describe("SelfMailer Models", () => {

it("rejects invalid values for outside_template_version_id", () => {
const rec = new SelfMailer();
expect(rec.outside_template_version_id).toBeNull();
expect(rec.outside_template_version_id).toBeUndefined();

const invalidValues = ["Nope"];
for (const val of invalidValues) {
Expand All @@ -138,7 +138,7 @@ describe("SelfMailer Models", () => {

it("rejects invalid values for inside_template_version_id", () => {
const rec = new SelfMailer();
expect(rec.inside_template_version_id).toBeNull();
expect(rec.inside_template_version_id).toBeUndefined();

const invalidValues = ["Nope"];
for (const val of invalidValues) {
Expand Down
16 changes: 8 additions & 8 deletions models/self-mailer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ export class SelfMailer {
* @type {string}
* @memberof SelfMailer
*/
private "_outside_template_id": string | null;
private "_outside_template_id"?: string | null;
public get outside_template_id() {
return this._outside_template_id || null;
return (this._outside_template_id || null || undefined) as string;
}
public set outside_template_id(newValue: string | null) {
if (newValue && !/^tmpl_[a-zA-Z0-9]+$/.test(newValue)) {
Expand All @@ -170,9 +170,9 @@ export class SelfMailer {
* @type {string}
* @memberof SelfMailer
*/
private "_inside_template_id": string | null;
private "_inside_template_id"?: string | null;
public get inside_template_id() {
return this._inside_template_id || null;
return (this._inside_template_id || null || undefined) as string;
}
public set inside_template_id(newValue: string | null) {
if (newValue && !/^tmpl_[a-zA-Z0-9]+$/.test(newValue)) {
Expand All @@ -186,9 +186,9 @@ export class SelfMailer {
* @type {string}
* @memberof SelfMailer
*/
private "_outside_template_version_id": string | null;
private "_outside_template_version_id"?: string | null;
public get outside_template_version_id() {
return this._outside_template_version_id || null;
return (this._outside_template_version_id || null || undefined) as string;
}
public set outside_template_version_id(newValue: string | null) {
if (newValue && !/^vrsn_[a-zA-Z0-9]+$/.test(newValue)) {
Expand All @@ -202,9 +202,9 @@ export class SelfMailer {
* @type {string}
* @memberof SelfMailer
*/
private "_inside_template_version_id": string | null;
private "_inside_template_version_id"?: string | null;
public get inside_template_version_id() {
return this._inside_template_version_id || null;
return (this._inside_template_version_id || null || undefined) as string;
}
public set inside_template_version_id(newValue: string | null) {
if (newValue && !/^vrsn_[a-zA-Z0-9]+$/.test(newValue)) {
Expand Down