Skip to content

Commit 8a6fb00

Browse files
committed
Generate Recurring API
1 parent 62073ff commit 8a6fb00

29 files changed

+874
-423
lines changed

src/__tests__/recurring.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ describe("Recurring", (): void => {
143143
recurringDetailReference: "recurringRef",
144144
};
145145

146-
const serializedRequest: CreatePermitRequest = ObjectSerializer.serialize(request, "CreatePermitRequest");
146+
const serializedRequest: CreatePermitRequest = ObjectSerializer.serialize(request, "CreatePermitRequest", "");
147147
expect(serializedRequest.permits[0].validTillDate?.toString()).toBe("2022-03-25T00:00:00.000Z");
148148

149149
try {

src/services/recurringApi.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ export class RecurringAPI extends Service {
4545
public async createPermit(createPermitRequest: CreatePermitRequest, requestOptions?: IRequest.Options): Promise<CreatePermitResult> {
4646
const endpoint = `${this.baseUrl}/createPermit`;
4747
const resource = new Resource(this, endpoint);
48-
const request: CreatePermitRequest = ObjectSerializer.serialize(createPermitRequest, "CreatePermitRequest");
48+
const request: CreatePermitRequest = ObjectSerializer.serialize(createPermitRequest, "CreatePermitRequest", "");
4949
const response = await getJsonResponse<CreatePermitRequest, CreatePermitResult>(
5050
resource,
5151
request,
5252
{ ...requestOptions, method: "POST" }
5353
);
54-
return ObjectSerializer.deserialize(response, "CreatePermitResult");
54+
return ObjectSerializer.deserialize(response, "CreatePermitResult", "");
5555
}
5656

5757
/**
@@ -63,13 +63,13 @@ export class RecurringAPI extends Service {
6363
public async disable(disableRequest: DisableRequest, requestOptions?: IRequest.Options): Promise<DisableResult> {
6464
const endpoint = `${this.baseUrl}/disable`;
6565
const resource = new Resource(this, endpoint);
66-
const request: DisableRequest = ObjectSerializer.serialize(disableRequest, "DisableRequest");
66+
const request: DisableRequest = ObjectSerializer.serialize(disableRequest, "DisableRequest", "");
6767
const response = await getJsonResponse<DisableRequest, DisableResult>(
6868
resource,
6969
request,
7070
{ ...requestOptions, method: "POST" }
7171
);
72-
return ObjectSerializer.deserialize(response, "DisableResult");
72+
return ObjectSerializer.deserialize(response, "DisableResult", "");
7373
}
7474

7575
/**
@@ -81,13 +81,13 @@ export class RecurringAPI extends Service {
8181
public async disablePermit(disablePermitRequest: DisablePermitRequest, requestOptions?: IRequest.Options): Promise<DisablePermitResult> {
8282
const endpoint = `${this.baseUrl}/disablePermit`;
8383
const resource = new Resource(this, endpoint);
84-
const request: DisablePermitRequest = ObjectSerializer.serialize(disablePermitRequest, "DisablePermitRequest");
84+
const request: DisablePermitRequest = ObjectSerializer.serialize(disablePermitRequest, "DisablePermitRequest", "");
8585
const response = await getJsonResponse<DisablePermitRequest, DisablePermitResult>(
8686
resource,
8787
request,
8888
{ ...requestOptions, method: "POST" }
8989
);
90-
return ObjectSerializer.deserialize(response, "DisablePermitResult");
90+
return ObjectSerializer.deserialize(response, "DisablePermitResult", "");
9191
}
9292

9393
/**
@@ -99,13 +99,13 @@ export class RecurringAPI extends Service {
9999
public async listRecurringDetails(recurringDetailsRequest: RecurringDetailsRequest, requestOptions?: IRequest.Options): Promise<RecurringDetailsResult> {
100100
const endpoint = `${this.baseUrl}/listRecurringDetails`;
101101
const resource = new Resource(this, endpoint);
102-
const request: RecurringDetailsRequest = ObjectSerializer.serialize(recurringDetailsRequest, "RecurringDetailsRequest");
102+
const request: RecurringDetailsRequest = ObjectSerializer.serialize(recurringDetailsRequest, "RecurringDetailsRequest", "");
103103
const response = await getJsonResponse<RecurringDetailsRequest, RecurringDetailsResult>(
104104
resource,
105105
request,
106106
{ ...requestOptions, method: "POST" }
107107
);
108-
return ObjectSerializer.deserialize(response, "RecurringDetailsResult");
108+
return ObjectSerializer.deserialize(response, "RecurringDetailsResult", "");
109109
}
110110

111111
/**
@@ -117,13 +117,13 @@ export class RecurringAPI extends Service {
117117
public async notifyShopper(notifyShopperRequest: NotifyShopperRequest, requestOptions?: IRequest.Options): Promise<NotifyShopperResult> {
118118
const endpoint = `${this.baseUrl}/notifyShopper`;
119119
const resource = new Resource(this, endpoint);
120-
const request: NotifyShopperRequest = ObjectSerializer.serialize(notifyShopperRequest, "NotifyShopperRequest");
120+
const request: NotifyShopperRequest = ObjectSerializer.serialize(notifyShopperRequest, "NotifyShopperRequest", "");
121121
const response = await getJsonResponse<NotifyShopperRequest, NotifyShopperResult>(
122122
resource,
123123
request,
124124
{ ...requestOptions, method: "POST" }
125125
);
126-
return ObjectSerializer.deserialize(response, "NotifyShopperResult");
126+
return ObjectSerializer.deserialize(response, "NotifyShopperResult", "");
127127
}
128128

129129
/**
@@ -135,13 +135,13 @@ export class RecurringAPI extends Service {
135135
public async scheduleAccountUpdater(scheduleAccountUpdaterRequest: ScheduleAccountUpdaterRequest, requestOptions?: IRequest.Options): Promise<ScheduleAccountUpdaterResult> {
136136
const endpoint = `${this.baseUrl}/scheduleAccountUpdater`;
137137
const resource = new Resource(this, endpoint);
138-
const request: ScheduleAccountUpdaterRequest = ObjectSerializer.serialize(scheduleAccountUpdaterRequest, "ScheduleAccountUpdaterRequest");
138+
const request: ScheduleAccountUpdaterRequest = ObjectSerializer.serialize(scheduleAccountUpdaterRequest, "ScheduleAccountUpdaterRequest", "");
139139
const response = await getJsonResponse<ScheduleAccountUpdaterRequest, ScheduleAccountUpdaterResult>(
140140
resource,
141141
request,
142142
{ ...requestOptions, method: "POST" }
143143
);
144-
return ObjectSerializer.deserialize(response, "ScheduleAccountUpdaterResult");
144+
return ObjectSerializer.deserialize(response, "ScheduleAccountUpdaterResult", "");
145145
}
146146
}
147147

src/typings/recurring/address.ts

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,42 +34,53 @@ export class Address {
3434
*/
3535
'street': string;
3636

37-
static discriminator: string | undefined = undefined;
37+
static readonly discriminator: string | undefined = undefined;
3838

39-
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
39+
static readonly mapping: {[index: string]: string} | undefined = undefined;
40+
41+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
4042
{
4143
"name": "city",
4244
"baseName": "city",
43-
"type": "string"
45+
"type": "string",
46+
"format": ""
4447
},
4548
{
4649
"name": "country",
4750
"baseName": "country",
48-
"type": "string"
51+
"type": "string",
52+
"format": ""
4953
},
5054
{
5155
"name": "houseNumberOrName",
5256
"baseName": "houseNumberOrName",
53-
"type": "string"
57+
"type": "string",
58+
"format": ""
5459
},
5560
{
5661
"name": "postalCode",
5762
"baseName": "postalCode",
58-
"type": "string"
63+
"type": "string",
64+
"format": ""
5965
},
6066
{
6167
"name": "stateOrProvince",
6268
"baseName": "stateOrProvince",
63-
"type": "string"
69+
"type": "string",
70+
"format": ""
6471
},
6572
{
6673
"name": "street",
6774
"baseName": "street",
68-
"type": "string"
75+
"type": "string",
76+
"format": ""
6977
} ];
7078

7179
static getAttributeTypeMap() {
7280
return Address.attributeTypeMap;
7381
}
82+
83+
public constructor() {
84+
}
7485
}
7586

src/typings/recurring/amount.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,29 @@ export class Amount {
1818
*/
1919
'value': number;
2020

21-
static discriminator: string | undefined = undefined;
21+
static readonly discriminator: string | undefined = undefined;
2222

23-
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
23+
static readonly mapping: {[index: string]: string} | undefined = undefined;
24+
25+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
2426
{
2527
"name": "currency",
2628
"baseName": "currency",
27-
"type": "string"
29+
"type": "string",
30+
"format": ""
2831
},
2932
{
3033
"name": "value",
3134
"baseName": "value",
32-
"type": "number"
35+
"type": "number",
36+
"format": "int64"
3337
} ];
3438

3539
static getAttributeTypeMap() {
3640
return Amount.attributeTypeMap;
3741
}
42+
43+
public constructor() {
44+
}
3845
}
3946

src/typings/recurring/bankAccount.ts

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,57 +46,71 @@ export class BankAccount {
4646
*/
4747
'taxId'?: string;
4848

49-
static discriminator: string | undefined = undefined;
49+
static readonly discriminator: string | undefined = undefined;
5050

51-
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
51+
static readonly mapping: {[index: string]: string} | undefined = undefined;
52+
53+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
5254
{
5355
"name": "bankAccountNumber",
5456
"baseName": "bankAccountNumber",
55-
"type": "string"
57+
"type": "string",
58+
"format": ""
5659
},
5760
{
5861
"name": "bankCity",
5962
"baseName": "bankCity",
60-
"type": "string"
63+
"type": "string",
64+
"format": ""
6165
},
6266
{
6367
"name": "bankLocationId",
6468
"baseName": "bankLocationId",
65-
"type": "string"
69+
"type": "string",
70+
"format": ""
6671
},
6772
{
6873
"name": "bankName",
6974
"baseName": "bankName",
70-
"type": "string"
75+
"type": "string",
76+
"format": ""
7177
},
7278
{
7379
"name": "bic",
7480
"baseName": "bic",
75-
"type": "string"
81+
"type": "string",
82+
"format": ""
7683
},
7784
{
7885
"name": "countryCode",
7986
"baseName": "countryCode",
80-
"type": "string"
87+
"type": "string",
88+
"format": ""
8189
},
8290
{
8391
"name": "iban",
8492
"baseName": "iban",
85-
"type": "string"
93+
"type": "string",
94+
"format": ""
8695
},
8796
{
8897
"name": "ownerName",
8998
"baseName": "ownerName",
90-
"type": "string"
99+
"type": "string",
100+
"format": ""
91101
},
92102
{
93103
"name": "taxId",
94104
"baseName": "taxId",
95-
"type": "string"
105+
"type": "string",
106+
"format": ""
96107
} ];
97108

98109
static getAttributeTypeMap() {
99110
return BankAccount.attributeTypeMap;
100111
}
112+
113+
public constructor() {
114+
}
101115
}
102116

src/typings/recurring/card.ts

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,52 +42,65 @@ export class Card {
4242
*/
4343
'startYear'?: string;
4444

45-
static discriminator: string | undefined = undefined;
45+
static readonly discriminator: string | undefined = undefined;
4646

47-
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
47+
static readonly mapping: {[index: string]: string} | undefined = undefined;
48+
49+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
4850
{
4951
"name": "cvc",
5052
"baseName": "cvc",
51-
"type": "string"
53+
"type": "string",
54+
"format": ""
5255
},
5356
{
5457
"name": "expiryMonth",
5558
"baseName": "expiryMonth",
56-
"type": "string"
59+
"type": "string",
60+
"format": ""
5761
},
5862
{
5963
"name": "expiryYear",
6064
"baseName": "expiryYear",
61-
"type": "string"
65+
"type": "string",
66+
"format": ""
6267
},
6368
{
6469
"name": "holderName",
6570
"baseName": "holderName",
66-
"type": "string"
71+
"type": "string",
72+
"format": ""
6773
},
6874
{
6975
"name": "issueNumber",
7076
"baseName": "issueNumber",
71-
"type": "string"
77+
"type": "string",
78+
"format": ""
7279
},
7380
{
7481
"name": "number",
7582
"baseName": "number",
76-
"type": "string"
83+
"type": "string",
84+
"format": ""
7785
},
7886
{
7987
"name": "startMonth",
8088
"baseName": "startMonth",
81-
"type": "string"
89+
"type": "string",
90+
"format": ""
8291
},
8392
{
8493
"name": "startYear",
8594
"baseName": "startYear",
86-
"type": "string"
95+
"type": "string",
96+
"format": ""
8797
} ];
8898

8999
static getAttributeTypeMap() {
90100
return Card.attributeTypeMap;
91101
}
102+
103+
public constructor() {
104+
}
92105
}
93106

0 commit comments

Comments
 (0)