Skip to content

Commit 80f4c66

Browse files
Merge pull request #245 from lob/DXP-1374
Dxp 1374
2 parents efcf3f5 + 0b55a89 commit 80f4c66

28 files changed

+1483
-606
lines changed

__tests__/CardsApi.unit.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,7 @@ describe("CardsApi", () => {
465465
1,
466466
"fake",
467467
"id",
468-
{
469-
id: "asc",
470-
}
468+
["asc"]
471469
);
472470
expect(cardsApi).toBeDefined();
473471
expect(cardsApi.data?.length).toEqual(1);

__tests__/LettersApi.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ describe("CardsApi", () => {
6969
file: FILE_LOCATION_8X11,
7070
});
7171
const letter = await lettersApi.create(registeredLetter);
72+
console.log("benny!!");
73+
console.log({ letter });
7274
expect(letter.id).toBeDefined();
7375
expect(letter.extra_service).toEqual("registered");
7476
if (letter.id) {

__tests__/MiscellaneousModels.unit.ts

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import {
99
SortBy1,
1010
SortBy2,
1111
SortBy3,
12-
SortBy4,
13-
SortBy5,
1412
SortByDateCreatedEnum,
1513
SortBySendDateEnum,
1614
SortBy1DateCreatedEnum,
@@ -19,12 +17,7 @@ import {
1917
SortBy2SendDateEnum,
2018
SortBy3DateCreatedEnum,
2119
SortBy3SendDateEnum,
22-
SortBy4DateCreatedEnum,
23-
SortBy4SendDateEnum,
24-
SortBy5DateCreatedEnum,
25-
SortBy5SendDateEnum,
2620
Thumbnail,
27-
CountryExtended,
2821
TrackingEventCertified,
2922
TrackingEventCertifiedTypeEnum,
3023
TrackingEventCertifiedNameEnum,
@@ -579,20 +572,20 @@ describe("Sort Criteria", () => {
579572

580573
describe("SortBy4", () => {
581574
it("can be created", () => {
582-
const rec = new SortBy4();
575+
const rec = new SortBy3();
583576
expect(rec).toBeDefined();
584577
});
585578

586579
it.each([
587-
["date_created", SortBy4DateCreatedEnum.Asc],
588-
["date_created", SortBy4DateCreatedEnum.Desc],
589-
["send_date", SortBy4SendDateEnum.Asc],
590-
["send_date", SortBy4SendDateEnum.Desc],
580+
["date_created", SortBySendDateEnum.Asc],
581+
["date_created", SortBySendDateEnum.Desc],
582+
["send_date", SortBySendDateEnum.Asc],
583+
["send_date", SortBySendDateEnum.Desc],
591584
])("can be created with a provided %s value", (prop, val) => {
592585
const input = {};
593586
(input as any)[prop] = val;
594587

595-
const rec = new SortBy4(input);
588+
const rec = new SortBy3(input);
596589

597590
expect(rec).toBeDefined();
598591
expect((rec as any)[prop]).toEqual(val);
@@ -601,20 +594,20 @@ describe("Sort Criteria", () => {
601594

602595
describe("SortBy5", () => {
603596
it("can be created", () => {
604-
const rec = new SortBy5();
597+
const rec = new SortBy3();
605598
expect(rec).toBeDefined();
606599
});
607600

608601
it.each([
609-
["date_created", SortBy5DateCreatedEnum.Asc],
610-
["date_created", SortBy5DateCreatedEnum.Desc],
611-
["send_date", SortBy5SendDateEnum.Asc],
612-
["send_date", SortBy5SendDateEnum.Desc],
602+
["date_created", SortBySendDateEnum.Asc],
603+
["date_created", SortBySendDateEnum.Desc],
604+
["send_date", SortBySendDateEnum.Asc],
605+
["send_date", SortBySendDateEnum.Desc],
613606
])("can be created with a provided %s value", (prop, val) => {
614607
const input = {};
615608
(input as any)[prop] = val;
616609

617-
const rec = new SortBy5(input);
610+
const rec = new SortBy3(input);
618611

619612
expect(rec).toBeDefined();
620613
expect((rec as any)[prop]).toEqual(val);

api/billing-groups-api.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export const BillingGroupsApiAxiosParamCreator = function (
239239
* @param {Array<string>} [include] Request that the response include the total count by specifying &#x60;include[]&#x3D;total_count&#x60;.
240240
* @param {{ [key: string]: string; }} [dateCreated] Filter by date created.
241241
* @param {{ [key: string]: string; }} [dateModified] Filter by date modified.
242-
* @param {object} [sortBy] Sorts items by ascending or descending dates. Use either &#x60;date_created&#x60; or &#x60;send_date&#x60;, not both.
242+
* @param {object} [sortByDateModified] Sorts items by ascending or descending dates. Use either &#x60;date_created&#x60; or &#x60;date_modfied&#x60;, not both.
243243
* @param {*} [options] Override http request option.
244244
* @throws {RequiredError}
245245
*/
@@ -249,7 +249,7 @@ export const BillingGroupsApiAxiosParamCreator = function (
249249
include?: Array<string>,
250250
dateCreated?: { [key: string]: string },
251251
dateModified?: { [key: string]: string },
252-
sortBy?: object,
252+
sortByDateModified?: object,
253253
options: AxiosRequestConfig = {}
254254
): Promise<RequestArgs> => {
255255
const localVarPath = `/billing_groups`;
@@ -292,8 +292,8 @@ export const BillingGroupsApiAxiosParamCreator = function (
292292
localVarQueryParameter["date_modified"] = valueToString(dateModified);
293293
}
294294

295-
if (sortBy !== undefined) {
296-
localVarQueryParameter["sort_by"] = valueToString(sortBy);
295+
if (sortByDateModified !== undefined) {
296+
localVarQueryParameter["sort_by"] = valueToString(sortByDateModified);
297297
}
298298

299299
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -404,7 +404,7 @@ export const BillingGroupsApiFp = function (configuration?: Configuration) {
404404
* @param {Array<string>} [include] Request that the response include the total count by specifying &#x60;include[]&#x3D;total_count&#x60;.
405405
* @param {{ [key: string]: string; }} [dateCreated] Filter by date created.
406406
* @param {{ [key: string]: string; }} [dateModified] Filter by date modified.
407-
* @param {object} [sortBy] Sorts items by ascending or descending dates. Use either &#x60;date_created&#x60; or &#x60;send_date&#x60;, not both.
407+
* @param {object} [sortByDateModified] Sorts items by ascending or descending dates. Use either &#x60;date_created&#x60; or &#x60;date_modfied&#x60;, not both.
408408
* @param {*} [options] Override http request option.
409409
* @throws {RequiredError}
410410
*/
@@ -414,7 +414,7 @@ export const BillingGroupsApiFp = function (configuration?: Configuration) {
414414
include?: Array<string>,
415415
dateCreated?: { [key: string]: string },
416416
dateModified?: { [key: string]: string },
417-
sortBy?: object,
417+
sortByDateModified?: object,
418418
options?: AxiosRequestConfig
419419
): Promise<
420420
(
@@ -429,7 +429,7 @@ export const BillingGroupsApiFp = function (configuration?: Configuration) {
429429
include,
430430
dateCreated,
431431
dateModified,
432-
sortBy,
432+
sortByDateModified,
433433
options
434434
);
435435
return createRequestFunction(
@@ -534,7 +534,7 @@ export class BillingGroupsApi extends BaseAPI {
534534
* @param {Array<string>} [include] Request that the response include the total count by specifying &#x60;include[]&#x3D;total_count&#x60;.
535535
* @param {{ [key: string]: string; }} [dateCreated] Filter by date created.
536536
* @param {{ [key: string]: string; }} [dateModified] Filter by date modified.
537-
* @param {object} [sortBy] Sorts items by ascending or descending dates. Use either &#x60;date_created&#x60; or &#x60;send_date&#x60;, not both.
537+
* @param {object} [sortByDateModified] Sorts items by ascending or descending dates. Use either &#x60;date_created&#x60; or &#x60;date_modfied&#x60;, not both.
538538
* @param {*} [options] Override http request option.
539539
* @throws {RequiredError}
540540
* @memberof BillingGroupsApi
@@ -545,7 +545,7 @@ export class BillingGroupsApi extends BaseAPI {
545545
include?: Array<string>,
546546
dateCreated?: { [key: string]: string },
547547
dateModified?: { [key: string]: string },
548-
sortBy?: object,
548+
sortByDateModified?: object,
549549
options?: AxiosRequestConfig
550550
) {
551551
return BillingGroupsApiFp(this.configuration)
@@ -555,7 +555,7 @@ export class BillingGroupsApi extends BaseAPI {
555555
include,
556556
dateCreated,
557557
dateModified,
558-
sortBy,
558+
sortByDateModified,
559559
options
560560
)
561561
.then((request) => request(this.axios, this.basePath))

api/cards-api.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,15 @@ export const CardsApiAxiosParamCreator = function (
283283
* @param {number} [limit] How many results to return.
284284
* @param {string} [before] A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the &#x60;previous_url&#x60; field in the return response.
285285
* @param {string} [after] A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the &#x60;next_url&#x60; field in the return response.
286-
* @param {object} [sortBy] Sorts items by ascending or descending dates. Use either &#x60;date_created&#x60; or &#x60;send_date&#x60;, not both.
286+
* @param {Array<string>} [include] Request that the response include the total count by specifying &#x60;include[]&#x3D;total_count&#x60;.
287287
* @param {*} [options] Override http request option.
288288
* @throws {RequiredError}
289289
*/
290290
cardsList: async (
291291
limit?: number,
292292
before?: string,
293293
after?: string,
294-
sortBy?: object,
294+
include?: Array<string>,
295295
options: AxiosRequestConfig = {}
296296
): Promise<RequestArgs> => {
297297
const localVarPath = `/cards`;
@@ -326,8 +326,8 @@ export const CardsApiAxiosParamCreator = function (
326326
localVarQueryParameter["after"] = after;
327327
}
328328

329-
if (sortBy !== undefined) {
330-
localVarQueryParameter["sort_by"] = valueToString(sortBy);
329+
if (include) {
330+
localVarQueryParameter["include"] = valueToString(include);
331331
}
332332

333333
setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -459,15 +459,15 @@ export const CardsApiFp = function (configuration?: Configuration) {
459459
* @param {number} [limit] How many results to return.
460460
* @param {string} [before] A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the &#x60;previous_url&#x60; field in the return response.
461461
* @param {string} [after] A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the &#x60;next_url&#x60; field in the return response.
462-
* @param {object} [sortBy] Sorts items by ascending or descending dates. Use either &#x60;date_created&#x60; or &#x60;send_date&#x60;, not both.
462+
* @param {Array<string>} [include] Request that the response include the total count by specifying &#x60;include[]&#x3D;total_count&#x60;.
463463
* @param {*} [options] Override http request option.
464464
* @throws {RequiredError}
465465
*/
466466
async cardsList(
467467
limit?: number,
468468
before?: string,
469469
after?: string,
470-
sortBy?: object,
470+
include?: Array<string>,
471471
options?: AxiosRequestConfig
472472
): Promise<
473473
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CardList>
@@ -476,7 +476,7 @@ export const CardsApiFp = function (configuration?: Configuration) {
476476
limit,
477477
before,
478478
after,
479-
sortBy,
479+
include,
480480
options
481481
);
482482
return createRequestFunction(
@@ -599,7 +599,7 @@ export class CardsApi extends BaseAPI {
599599
* @param {number} [limit] How many results to return.
600600
* @param {string} [before] A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the &#x60;previous_url&#x60; field in the return response.
601601
* @param {string} [after] A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the &#x60;next_url&#x60; field in the return response.
602-
* @param {object} [sortBy] Sorts items by ascending or descending dates. Use either &#x60;date_created&#x60; or &#x60;send_date&#x60;, not both.
602+
* @param {Array<string>} [include] Request that the response include the total count by specifying &#x60;include[]&#x3D;total_count&#x60;.
603603
* @param {*} [options] Override http request option.
604604
* @throws {RequiredError}
605605
* @memberof CardsApi
@@ -608,11 +608,11 @@ export class CardsApi extends BaseAPI {
608608
limit?: number,
609609
before?: string,
610610
after?: string,
611-
sortBy?: object,
611+
include?: Array<string>,
612612
options?: AxiosRequestConfig
613613
) {
614614
return CardsApiFp(this.configuration)
615-
.cardsList(limit, before, after, sortBy, options)
615+
.cardsList(limit, before, after, include, options)
616616
.then((request) => request(this.axios, this.basePath))
617617
.then(function (response) {
618618
return new CardList(response.data);

models/cmp-schedule-type.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
* How the campaign should be scheduled. Only value available today is `immediate`.
19+
* @export
20+
* @enum {string}
21+
*/
22+
23+
export enum CmpScheduleType {
24+
Immediate = "immediate",
25+
}
26+
27+
/**
28+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
29+
* https://openapi-generator.tech
30+
* Do not edit the class manually.
31+
*/

models/cmp-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+
* The usage type of this campaign. Can be one of `marketing` or `operational`.
19+
* @export
20+
* @enum {string}
21+
*/
22+
23+
export enum CmpUseType {
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/country-extended-expanded.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 CountryExtendedExpanded {
24+
Empty = "",
2425
Afghanistan = "AFGHANISTAN",
2526
Albania = "ALBANIA",
2627
Algeria = "ALGERIA",

models/letter-editable-custom-envelope.ts renamed to models/custom-envelope-returned.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
import * as Models from "./index";
1616

1717
/**
18-
* A nested custom envelope object containing more information about the custom envelope used or `null` if a custom envelope was not used. Accepts an envelope ID for any customized envelope with available inventory. If no inventory is available for the specified ID, the letter will not be sent, and an error will be returned. If the letter has more than 6 sheets, it will be sent in a blank flat envelope. Custom envelopes may be created and ordered from the dashboard. This feature is exclusive to certain customers. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access.
18+
* A nested custom envelope object containing more information about the custom envelope used or `null` if a custom envelope was not used.
1919
* @export
20-
* @class LetterEditableCustomEnvelope
20+
* @class CustomEnvelopeReturned
2121
*/
22-
export class LetterEditableCustomEnvelope {
22+
export class CustomEnvelopeReturned {
2323
constructor(input?: any) {
2424
if (typeof input?.id !== "undefined") {
2525
this.id = input.id;
@@ -35,23 +35,23 @@ export class LetterEditableCustomEnvelope {
3535
/**
3636
* The unique identifier of the custom envelope used.
3737
* @type {string}
38-
* @memberof LetterEditableCustomEnvelope
38+
* @memberof CustomEnvelopeReturned
3939
*/
4040
"id": string;
4141

4242
/**
4343
* The url of the envelope asset used.
4444
* @type {string}
45-
* @memberof LetterEditableCustomEnvelope
45+
* @memberof CustomEnvelopeReturned
4646
*/
4747
"url": string;
4848

4949
/**
5050
*
5151
* @type {string}
52-
* @memberof LetterEditableCustomEnvelope
52+
* @memberof CustomEnvelopeReturned
5353
*/
54-
"object": LetterEditableCustomEnvelopeObjectEnum;
54+
"object": CustomEnvelopeReturnedObjectEnum;
5555

5656
public toJSON() {
5757
let out = {};
@@ -68,7 +68,7 @@ export class LetterEditableCustomEnvelope {
6868
* @export
6969
* @enum {string}
7070
*/
71-
export enum LetterEditableCustomEnvelopeObjectEnum {
71+
export enum CustomEnvelopeReturnedObjectEnum {
7272
Envelope = "envelope",
7373
}
7474

0 commit comments

Comments
 (0)