Skip to content

Commit c917354

Browse files
committed
feat: add use type to necessary resources
1 parent 069464b commit c917354

27 files changed

+606
-73
lines changed

__tests__/PostcardsApi.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from "./testFixtures";
88

99
describe("postcardsApi", () => {
10-
jest.setTimeout(60000); // 60 seconds
10+
jest.setTimeout(90000); // 90 seconds
1111

1212
let postcardsApi: PostcardsApi;
1313

__tests__/SelfMailersApi.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from "./testFixtures";
88

99
describe("smApi", () => {
10-
jest.setTimeout(60000); // 60 seconds
10+
jest.setTimeout(90000); // 90 seconds
1111

1212
const dummySelfMailer = new SelfMailerEditable({
1313
to: ADDRESSES_EDITABLE[0],
@@ -82,6 +82,7 @@ describe("smApi", () => {
8282
from: ADDRESSES_EDITABLE[5],
8383
inside: FILE_LOCATION_6X18,
8484
outside: FILE_LOCATION_6X18,
85+
use_type: "marketing",
8586
});
8687
const c1 = await smApi.create(sfm1);
8788
const c2 = await smApi.create(sfm2);

models/campaign-writable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class CampaignWritable {
127127
* @type {CmpUseType}
128128
* @memberof CampaignWritable
129129
*/
130-
"use_type"?: CmpUseType | null;
130+
"use_type": CmpUseType | null;
131131

132132
/**
133133
* Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA.

models/campaign.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export class Campaign {
152152
* @type {CmpUseType}
153153
* @memberof Campaign
154154
*/
155-
"use_type"?: CmpUseType | null;
155+
"use_type": CmpUseType | null;
156156

157157
/**
158158
* Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA.

models/check-editable.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
import * as Models from "./index";
1616

17+
import { ChkUseType } from "./chk-use-type";
18+
1719
/**
1820
*
1921
* @export
@@ -69,23 +71,26 @@ export class CheckEditable {
6971
if (typeof input?.billing_group_id !== "undefined") {
7072
this.billing_group_id = input.billing_group_id;
7173
}
74+
if (typeof input?.use_type !== "undefined") {
75+
this.use_type = input.use_type;
76+
}
7277
}
7378

7479
/**
7580
* Must either be an address ID or an inline object with correct address parameters.
76-
* @type {string}
81+
* @type {any}
7782
* @memberof CheckEditable
7883
*/
7984

80-
"from": string | Models.AddressDomestic;
85+
"from": string | Models.AddressDomestic | null;
8186

8287
/**
8388
* Must either be an address ID or an inline object with correct address parameters.
84-
* @type {string}
89+
* @type {any}
8590
* @memberof CheckEditable
8691
*/
8792

88-
"to": string | Models.AddressDomestic;
93+
"to": string | Models.AddressDomestic | null;
8994

9095
/**
9196
*
@@ -185,6 +190,13 @@ export class CheckEditable {
185190
*/
186191
"billing_group_id"?: string;
187192

193+
/**
194+
*
195+
* @type {ChkUseType}
196+
* @memberof CheckEditable
197+
*/
198+
"use_type": ChkUseType | null;
199+
188200
public toJSON() {
189201
let out = {};
190202
for (const [key, value] of Object.entries(this)) {

models/check.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import * as Models from "./index";
1616

1717
import { Address } from "./address";
1818
import { BankAccount } from "./bank-account";
19+
import { ChkUseType } from "./chk-use-type";
1920
import { Thumbnail } from "./thumbnail";
2021
import { TrackingEventNormal } from "./tracking-event-normal";
2122

@@ -106,6 +107,9 @@ export class Check {
106107
if (typeof input?.deleted !== "undefined") {
107108
this.deleted = input.deleted;
108109
}
110+
if (typeof input?.use_type !== "undefined") {
111+
this.use_type = input.use_type;
112+
}
109113
}
110114

111115
/**
@@ -349,6 +353,13 @@ export class Check {
349353
*/
350354
"deleted"?: boolean;
351355

356+
/**
357+
*
358+
* @type {ChkUseType}
359+
* @memberof Check
360+
*/
361+
"use_type": ChkUseType | null;
362+
352363
public toJSON() {
353364
let out = {};
354365
for (const [key, value] of Object.entries(this)) {

models/chk-use-type.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Lob
5+
* The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
6+
*
7+
* The version of the OpenAPI document: 1.3.0
8+
* Contact: [email protected]
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
import * as Models from "./index";
16+
17+
/**
18+
* TThe use type for each mailpiece. Can be one of marketing, operational, or null. Null use_type is only allowed if an account default use_type is selected in Account Settings. For more information on use_type, see our [Help Center article](https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings/declaring-mail-use-type).
19+
* @export
20+
* @enum {string}
21+
*/
22+
23+
export enum ChkUseType {
24+
Marketing = "marketing",
25+
Operational = "operational",
26+
Null = "null",
27+
}
28+
29+
/**
30+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
31+
* https://openapi-generator.tech
32+
* Do not edit the class manually.
33+
*/

models/cmp-use-type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import * as Models from "./index";
1616

1717
/**
18-
* The usage type of this campaign. Can be one of `marketing` or `operational`.
18+
* The use type for each mailpiece. Can be one of marketing, operational, or null. Null use_type is only allowed if an account default use_type is selected in Account Settings. For more information on use_type, see our [Help Center article](https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings/declaring-mail-use-type).
1919
* @export
2020
* @enum {string}
2121
*/

models/country-extended.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import * as Models from "./index";
2121
*/
2222

2323
export enum CountryExtended {
24+
Empty = "",
2425
Ad = "AD",
2526
Ae = "AE",
2627
Af = "AF",

models/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export * from "./check";
4141
export * from "./check-deletion";
4242
export * from "./check-editable";
4343
export * from "./check-list";
44+
export * from "./chk-use-type";
4445
export * from "./cmp-schedule-type";
4546
export * from "./cmp-use-type";
4647
export * from "./country-extended";
@@ -81,11 +82,13 @@ export * from "./lob-confidence-score";
8182
export * from "./lob-error";
8283
export * from "./location";
8384
export * from "./location-analysis";
85+
export * from "./ltr-use-type";
8486
export * from "./mail-type";
8587
export * from "./multi-line-address";
8688
export * from "./multiple-components";
8789
export * from "./multiple-components-intl";
8890
export * from "./multiple-components-list";
91+
export * from "./optional-address-column-mapping";
8992
export * from "./placeholder-model";
9093
export * from "./postcard";
9194
export * from "./postcard-deletion";
@@ -94,14 +97,17 @@ export * from "./postcard-details-writable";
9497
export * from "./postcard-editable";
9598
export * from "./postcard-list";
9699
export * from "./postcard-size";
100+
export * from "./psc-use-type";
97101
export * from "./qr-code";
102+
export * from "./required-address-column-mapping";
98103
export * from "./return-envelope";
99104
export * from "./reverse-geocode";
100105
export * from "./self-mailer";
101106
export * from "./self-mailer-deletion";
102107
export * from "./self-mailer-editable";
103108
export * from "./self-mailer-list";
104109
export * from "./self-mailer-size";
110+
export * from "./sfm-use-type";
105111
export * from "./sort-by";
106112
export * from "./sort-by1";
107113
export * from "./sort-by2";
@@ -128,6 +134,7 @@ export * from "./upload-file";
128134
export * from "./upload-state";
129135
export * from "./upload-updatable";
130136
export * from "./upload-writable";
137+
export * from "./uploads-metadata";
131138
export * from "./us-autocompletions";
132139
export * from "./us-autocompletions-writable";
133140
export * from "./us-components";

0 commit comments

Comments
 (0)