electric-coop-api 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/esm/models/Bill.d.ts +6 -6
- package/dist/esm/models/Bill.js +14 -6
- package/dist/esm/models/UpdateBillDto.d.ts +42 -0
- package/dist/esm/models/UpdateBillDto.js +14 -0
- package/dist/models/Bill.d.ts +6 -6
- package/dist/models/Bill.js +14 -6
- package/dist/models/UpdateBillDto.d.ts +42 -0
- package/dist/models/UpdateBillDto.js +14 -0
- package/package.json +1 -1
- package/src/models/Bill.ts +16 -12
- package/src/models/UpdateBillDto.ts +56 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.24
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install electric-coop-api@0.1.
|
|
39
|
+
npm install electric-coop-api@0.1.24 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -121,25 +121,25 @@ export interface Bill {
|
|
|
121
121
|
* @type {number}
|
|
122
122
|
* @memberof Bill
|
|
123
123
|
*/
|
|
124
|
-
generationPreviousReading
|
|
124
|
+
generationPreviousReading: number;
|
|
125
125
|
/**
|
|
126
126
|
*
|
|
127
127
|
* @type {number}
|
|
128
128
|
* @memberof Bill
|
|
129
129
|
*/
|
|
130
|
-
generationCurrentReading
|
|
130
|
+
generationCurrentReading: number;
|
|
131
131
|
/**
|
|
132
132
|
*
|
|
133
133
|
* @type {number}
|
|
134
134
|
* @memberof Bill
|
|
135
135
|
*/
|
|
136
|
-
generationProduced
|
|
136
|
+
generationProduced: number;
|
|
137
137
|
/**
|
|
138
138
|
*
|
|
139
139
|
* @type {number}
|
|
140
140
|
* @memberof Bill
|
|
141
141
|
*/
|
|
142
|
-
generationCredit
|
|
142
|
+
generationCredit: number;
|
|
143
143
|
/**
|
|
144
144
|
*
|
|
145
145
|
* @type {number}
|
|
@@ -160,10 +160,10 @@ export interface Bill {
|
|
|
160
160
|
amountPaid: number;
|
|
161
161
|
/**
|
|
162
162
|
*
|
|
163
|
-
* @type {
|
|
163
|
+
* @type {Date}
|
|
164
164
|
* @memberof Bill
|
|
165
165
|
*/
|
|
166
|
-
paymentDate?:
|
|
166
|
+
paymentDate?: Date;
|
|
167
167
|
/**
|
|
168
168
|
*
|
|
169
169
|
* @type {BillStatusEnum}
|
package/dist/esm/models/Bill.js
CHANGED
|
@@ -40,6 +40,14 @@ export function instanceOfBill(value) {
|
|
|
40
40
|
return false;
|
|
41
41
|
if (!('consumption' in value) || value['consumption'] === undefined)
|
|
42
42
|
return false;
|
|
43
|
+
if (!('generationPreviousReading' in value) || value['generationPreviousReading'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('generationCurrentReading' in value) || value['generationCurrentReading'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('generationProduced' in value) || value['generationProduced'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('generationCredit' in value) || value['generationCredit'] === undefined)
|
|
50
|
+
return false;
|
|
43
51
|
if (!('amountDue' in value) || value['amountDue'] === undefined)
|
|
44
52
|
return false;
|
|
45
53
|
if (!('amountPaid' in value) || value['amountPaid'] === undefined)
|
|
@@ -72,14 +80,14 @@ export function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
72
80
|
'previousReading': json['previousReading'],
|
|
73
81
|
'currentReading': json['currentReading'],
|
|
74
82
|
'consumption': json['consumption'],
|
|
75
|
-
'generationPreviousReading': json['generationPreviousReading']
|
|
76
|
-
'generationCurrentReading': json['generationCurrentReading']
|
|
77
|
-
'generationProduced': json['generationProduced']
|
|
78
|
-
'generationCredit': json['generationCredit']
|
|
83
|
+
'generationPreviousReading': json['generationPreviousReading'],
|
|
84
|
+
'generationCurrentReading': json['generationCurrentReading'],
|
|
85
|
+
'generationProduced': json['generationProduced'],
|
|
86
|
+
'generationCredit': json['generationCredit'],
|
|
79
87
|
'amountDue': json['amountDue'],
|
|
80
88
|
'netAmount': json['netAmount'] == null ? undefined : json['netAmount'],
|
|
81
89
|
'amountPaid': json['amountPaid'],
|
|
82
|
-
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
90
|
+
'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
|
|
83
91
|
'status': BillStatusEnumFromJSON(json['status']),
|
|
84
92
|
'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
|
|
85
93
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
@@ -116,7 +124,7 @@ export function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
116
124
|
'amountDue': value['amountDue'],
|
|
117
125
|
'netAmount': value['netAmount'],
|
|
118
126
|
'amountPaid': value['amountPaid'],
|
|
119
|
-
'paymentDate': value['paymentDate'],
|
|
127
|
+
'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
|
|
120
128
|
'status': BillStatusEnumToJSON(value['status']),
|
|
121
129
|
'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
|
|
122
130
|
'metadata': value['metadata'],
|
|
@@ -16,6 +16,48 @@ import type { BillStatusEnum } from './BillStatusEnum';
|
|
|
16
16
|
* @interface UpdateBillDto
|
|
17
17
|
*/
|
|
18
18
|
export interface UpdateBillDto {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UpdateBillDto
|
|
23
|
+
*/
|
|
24
|
+
consumerId?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UpdateBillDto
|
|
29
|
+
*/
|
|
30
|
+
billingPeriod?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Date}
|
|
34
|
+
* @memberof UpdateBillDto
|
|
35
|
+
*/
|
|
36
|
+
dueDate?: Date;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Date}
|
|
40
|
+
* @memberof UpdateBillDto
|
|
41
|
+
*/
|
|
42
|
+
readingDate?: Date;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof UpdateBillDto
|
|
47
|
+
*/
|
|
48
|
+
previousReading?: number;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof UpdateBillDto
|
|
53
|
+
*/
|
|
54
|
+
currentReading?: number;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof UpdateBillDto
|
|
59
|
+
*/
|
|
60
|
+
consumption?: number;
|
|
19
61
|
/**
|
|
20
62
|
*
|
|
21
63
|
* @type {BillStatusEnum}
|
|
@@ -26,6 +26,13 @@ export function UpdateBillDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
return json;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
+
'consumerId': json['consumerId'] == null ? undefined : json['consumerId'],
|
|
30
|
+
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
31
|
+
'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
|
|
32
|
+
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
33
|
+
'previousReading': json['previousReading'] == null ? undefined : json['previousReading'],
|
|
34
|
+
'currentReading': json['currentReading'] == null ? undefined : json['currentReading'],
|
|
35
|
+
'consumption': json['consumption'] == null ? undefined : json['consumption'],
|
|
29
36
|
'status': json['status'] == null ? undefined : BillStatusEnumFromJSON(json['status']),
|
|
30
37
|
};
|
|
31
38
|
}
|
|
@@ -37,6 +44,13 @@ export function UpdateBillDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
37
44
|
return value;
|
|
38
45
|
}
|
|
39
46
|
return {
|
|
47
|
+
'consumerId': value['consumerId'],
|
|
48
|
+
'billingPeriod': value['billingPeriod'],
|
|
49
|
+
'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString().substring(0, 10)),
|
|
50
|
+
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString().substring(0, 10)),
|
|
51
|
+
'previousReading': value['previousReading'],
|
|
52
|
+
'currentReading': value['currentReading'],
|
|
53
|
+
'consumption': value['consumption'],
|
|
40
54
|
'status': BillStatusEnumToJSON(value['status']),
|
|
41
55
|
};
|
|
42
56
|
}
|
package/dist/models/Bill.d.ts
CHANGED
|
@@ -121,25 +121,25 @@ export interface Bill {
|
|
|
121
121
|
* @type {number}
|
|
122
122
|
* @memberof Bill
|
|
123
123
|
*/
|
|
124
|
-
generationPreviousReading
|
|
124
|
+
generationPreviousReading: number;
|
|
125
125
|
/**
|
|
126
126
|
*
|
|
127
127
|
* @type {number}
|
|
128
128
|
* @memberof Bill
|
|
129
129
|
*/
|
|
130
|
-
generationCurrentReading
|
|
130
|
+
generationCurrentReading: number;
|
|
131
131
|
/**
|
|
132
132
|
*
|
|
133
133
|
* @type {number}
|
|
134
134
|
* @memberof Bill
|
|
135
135
|
*/
|
|
136
|
-
generationProduced
|
|
136
|
+
generationProduced: number;
|
|
137
137
|
/**
|
|
138
138
|
*
|
|
139
139
|
* @type {number}
|
|
140
140
|
* @memberof Bill
|
|
141
141
|
*/
|
|
142
|
-
generationCredit
|
|
142
|
+
generationCredit: number;
|
|
143
143
|
/**
|
|
144
144
|
*
|
|
145
145
|
* @type {number}
|
|
@@ -160,10 +160,10 @@ export interface Bill {
|
|
|
160
160
|
amountPaid: number;
|
|
161
161
|
/**
|
|
162
162
|
*
|
|
163
|
-
* @type {
|
|
163
|
+
* @type {Date}
|
|
164
164
|
* @memberof Bill
|
|
165
165
|
*/
|
|
166
|
-
paymentDate?:
|
|
166
|
+
paymentDate?: Date;
|
|
167
167
|
/**
|
|
168
168
|
*
|
|
169
169
|
* @type {BillStatusEnum}
|
package/dist/models/Bill.js
CHANGED
|
@@ -47,6 +47,14 @@ function instanceOfBill(value) {
|
|
|
47
47
|
return false;
|
|
48
48
|
if (!('consumption' in value) || value['consumption'] === undefined)
|
|
49
49
|
return false;
|
|
50
|
+
if (!('generationPreviousReading' in value) || value['generationPreviousReading'] === undefined)
|
|
51
|
+
return false;
|
|
52
|
+
if (!('generationCurrentReading' in value) || value['generationCurrentReading'] === undefined)
|
|
53
|
+
return false;
|
|
54
|
+
if (!('generationProduced' in value) || value['generationProduced'] === undefined)
|
|
55
|
+
return false;
|
|
56
|
+
if (!('generationCredit' in value) || value['generationCredit'] === undefined)
|
|
57
|
+
return false;
|
|
50
58
|
if (!('amountDue' in value) || value['amountDue'] === undefined)
|
|
51
59
|
return false;
|
|
52
60
|
if (!('amountPaid' in value) || value['amountPaid'] === undefined)
|
|
@@ -79,14 +87,14 @@ function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
79
87
|
'previousReading': json['previousReading'],
|
|
80
88
|
'currentReading': json['currentReading'],
|
|
81
89
|
'consumption': json['consumption'],
|
|
82
|
-
'generationPreviousReading': json['generationPreviousReading']
|
|
83
|
-
'generationCurrentReading': json['generationCurrentReading']
|
|
84
|
-
'generationProduced': json['generationProduced']
|
|
85
|
-
'generationCredit': json['generationCredit']
|
|
90
|
+
'generationPreviousReading': json['generationPreviousReading'],
|
|
91
|
+
'generationCurrentReading': json['generationCurrentReading'],
|
|
92
|
+
'generationProduced': json['generationProduced'],
|
|
93
|
+
'generationCredit': json['generationCredit'],
|
|
86
94
|
'amountDue': json['amountDue'],
|
|
87
95
|
'netAmount': json['netAmount'] == null ? undefined : json['netAmount'],
|
|
88
96
|
'amountPaid': json['amountPaid'],
|
|
89
|
-
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
97
|
+
'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
|
|
90
98
|
'status': (0, BillStatusEnum_1.BillStatusEnumFromJSON)(json['status']),
|
|
91
99
|
'breakdown': json['breakdown'] == null ? undefined : (0, BillBreakdownDto_1.BillBreakdownDtoFromJSON)(json['breakdown']),
|
|
92
100
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
@@ -123,7 +131,7 @@ function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
123
131
|
'amountDue': value['amountDue'],
|
|
124
132
|
'netAmount': value['netAmount'],
|
|
125
133
|
'amountPaid': value['amountPaid'],
|
|
126
|
-
'paymentDate': value['paymentDate'],
|
|
134
|
+
'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
|
|
127
135
|
'status': (0, BillStatusEnum_1.BillStatusEnumToJSON)(value['status']),
|
|
128
136
|
'breakdown': (0, BillBreakdownDto_1.BillBreakdownDtoToJSON)(value['breakdown']),
|
|
129
137
|
'metadata': value['metadata'],
|
|
@@ -16,6 +16,48 @@ import type { BillStatusEnum } from './BillStatusEnum';
|
|
|
16
16
|
* @interface UpdateBillDto
|
|
17
17
|
*/
|
|
18
18
|
export interface UpdateBillDto {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UpdateBillDto
|
|
23
|
+
*/
|
|
24
|
+
consumerId?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UpdateBillDto
|
|
29
|
+
*/
|
|
30
|
+
billingPeriod?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Date}
|
|
34
|
+
* @memberof UpdateBillDto
|
|
35
|
+
*/
|
|
36
|
+
dueDate?: Date;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Date}
|
|
40
|
+
* @memberof UpdateBillDto
|
|
41
|
+
*/
|
|
42
|
+
readingDate?: Date;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof UpdateBillDto
|
|
47
|
+
*/
|
|
48
|
+
previousReading?: number;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof UpdateBillDto
|
|
53
|
+
*/
|
|
54
|
+
currentReading?: number;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof UpdateBillDto
|
|
59
|
+
*/
|
|
60
|
+
consumption?: number;
|
|
19
61
|
/**
|
|
20
62
|
*
|
|
21
63
|
* @type {BillStatusEnum}
|
|
@@ -33,6 +33,13 @@ function UpdateBillDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
33
|
return json;
|
|
34
34
|
}
|
|
35
35
|
return {
|
|
36
|
+
'consumerId': json['consumerId'] == null ? undefined : json['consumerId'],
|
|
37
|
+
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
38
|
+
'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
|
|
39
|
+
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
40
|
+
'previousReading': json['previousReading'] == null ? undefined : json['previousReading'],
|
|
41
|
+
'currentReading': json['currentReading'] == null ? undefined : json['currentReading'],
|
|
42
|
+
'consumption': json['consumption'] == null ? undefined : json['consumption'],
|
|
36
43
|
'status': json['status'] == null ? undefined : (0, BillStatusEnum_1.BillStatusEnumFromJSON)(json['status']),
|
|
37
44
|
};
|
|
38
45
|
}
|
|
@@ -44,6 +51,13 @@ function UpdateBillDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
44
51
|
return value;
|
|
45
52
|
}
|
|
46
53
|
return {
|
|
54
|
+
'consumerId': value['consumerId'],
|
|
55
|
+
'billingPeriod': value['billingPeriod'],
|
|
56
|
+
'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString().substring(0, 10)),
|
|
57
|
+
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString().substring(0, 10)),
|
|
58
|
+
'previousReading': value['previousReading'],
|
|
59
|
+
'currentReading': value['currentReading'],
|
|
60
|
+
'consumption': value['consumption'],
|
|
47
61
|
'status': (0, BillStatusEnum_1.BillStatusEnumToJSON)(value['status']),
|
|
48
62
|
};
|
|
49
63
|
}
|
package/package.json
CHANGED
package/src/models/Bill.ts
CHANGED
|
@@ -156,25 +156,25 @@ export interface Bill {
|
|
|
156
156
|
* @type {number}
|
|
157
157
|
* @memberof Bill
|
|
158
158
|
*/
|
|
159
|
-
generationPreviousReading
|
|
159
|
+
generationPreviousReading: number;
|
|
160
160
|
/**
|
|
161
161
|
*
|
|
162
162
|
* @type {number}
|
|
163
163
|
* @memberof Bill
|
|
164
164
|
*/
|
|
165
|
-
generationCurrentReading
|
|
165
|
+
generationCurrentReading: number;
|
|
166
166
|
/**
|
|
167
167
|
*
|
|
168
168
|
* @type {number}
|
|
169
169
|
* @memberof Bill
|
|
170
170
|
*/
|
|
171
|
-
generationProduced
|
|
171
|
+
generationProduced: number;
|
|
172
172
|
/**
|
|
173
173
|
*
|
|
174
174
|
* @type {number}
|
|
175
175
|
* @memberof Bill
|
|
176
176
|
*/
|
|
177
|
-
generationCredit
|
|
177
|
+
generationCredit: number;
|
|
178
178
|
/**
|
|
179
179
|
*
|
|
180
180
|
* @type {number}
|
|
@@ -195,10 +195,10 @@ export interface Bill {
|
|
|
195
195
|
amountPaid: number;
|
|
196
196
|
/**
|
|
197
197
|
*
|
|
198
|
-
* @type {
|
|
198
|
+
* @type {Date}
|
|
199
199
|
* @memberof Bill
|
|
200
200
|
*/
|
|
201
|
-
paymentDate?:
|
|
201
|
+
paymentDate?: Date;
|
|
202
202
|
/**
|
|
203
203
|
*
|
|
204
204
|
* @type {BillStatusEnum}
|
|
@@ -235,6 +235,10 @@ export function instanceOfBill(value: object): value is Bill {
|
|
|
235
235
|
if (!('previousReading' in value) || value['previousReading'] === undefined) return false;
|
|
236
236
|
if (!('currentReading' in value) || value['currentReading'] === undefined) return false;
|
|
237
237
|
if (!('consumption' in value) || value['consumption'] === undefined) return false;
|
|
238
|
+
if (!('generationPreviousReading' in value) || value['generationPreviousReading'] === undefined) return false;
|
|
239
|
+
if (!('generationCurrentReading' in value) || value['generationCurrentReading'] === undefined) return false;
|
|
240
|
+
if (!('generationProduced' in value) || value['generationProduced'] === undefined) return false;
|
|
241
|
+
if (!('generationCredit' in value) || value['generationCredit'] === undefined) return false;
|
|
238
242
|
if (!('amountDue' in value) || value['amountDue'] === undefined) return false;
|
|
239
243
|
if (!('amountPaid' in value) || value['amountPaid'] === undefined) return false;
|
|
240
244
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
@@ -267,14 +271,14 @@ export function BillFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bill
|
|
|
267
271
|
'previousReading': json['previousReading'],
|
|
268
272
|
'currentReading': json['currentReading'],
|
|
269
273
|
'consumption': json['consumption'],
|
|
270
|
-
'generationPreviousReading': json['generationPreviousReading']
|
|
271
|
-
'generationCurrentReading': json['generationCurrentReading']
|
|
272
|
-
'generationProduced': json['generationProduced']
|
|
273
|
-
'generationCredit': json['generationCredit']
|
|
274
|
+
'generationPreviousReading': json['generationPreviousReading'],
|
|
275
|
+
'generationCurrentReading': json['generationCurrentReading'],
|
|
276
|
+
'generationProduced': json['generationProduced'],
|
|
277
|
+
'generationCredit': json['generationCredit'],
|
|
274
278
|
'amountDue': json['amountDue'],
|
|
275
279
|
'netAmount': json['netAmount'] == null ? undefined : json['netAmount'],
|
|
276
280
|
'amountPaid': json['amountPaid'],
|
|
277
|
-
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
281
|
+
'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
|
|
278
282
|
'status': BillStatusEnumFromJSON(json['status']),
|
|
279
283
|
'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
|
|
280
284
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
@@ -315,7 +319,7 @@ export function BillToJSONTyped(value?: Bill | null, ignoreDiscriminator: boolea
|
|
|
315
319
|
'amountDue': value['amountDue'],
|
|
316
320
|
'netAmount': value['netAmount'],
|
|
317
321
|
'amountPaid': value['amountPaid'],
|
|
318
|
-
'paymentDate': value['paymentDate'],
|
|
322
|
+
'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
|
|
319
323
|
'status': BillStatusEnumToJSON(value['status']),
|
|
320
324
|
'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
|
|
321
325
|
'metadata': value['metadata'],
|
|
@@ -27,6 +27,48 @@ import {
|
|
|
27
27
|
* @interface UpdateBillDto
|
|
28
28
|
*/
|
|
29
29
|
export interface UpdateBillDto {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UpdateBillDto
|
|
34
|
+
*/
|
|
35
|
+
consumerId?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UpdateBillDto
|
|
40
|
+
*/
|
|
41
|
+
billingPeriod?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof UpdateBillDto
|
|
46
|
+
*/
|
|
47
|
+
dueDate?: Date;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Date}
|
|
51
|
+
* @memberof UpdateBillDto
|
|
52
|
+
*/
|
|
53
|
+
readingDate?: Date;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof UpdateBillDto
|
|
58
|
+
*/
|
|
59
|
+
previousReading?: number;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof UpdateBillDto
|
|
64
|
+
*/
|
|
65
|
+
currentReading?: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof UpdateBillDto
|
|
70
|
+
*/
|
|
71
|
+
consumption?: number;
|
|
30
72
|
/**
|
|
31
73
|
*
|
|
32
74
|
* @type {BillStatusEnum}
|
|
@@ -54,6 +96,13 @@ export function UpdateBillDtoFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
54
96
|
}
|
|
55
97
|
return {
|
|
56
98
|
|
|
99
|
+
'consumerId': json['consumerId'] == null ? undefined : json['consumerId'],
|
|
100
|
+
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
101
|
+
'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
|
|
102
|
+
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
103
|
+
'previousReading': json['previousReading'] == null ? undefined : json['previousReading'],
|
|
104
|
+
'currentReading': json['currentReading'] == null ? undefined : json['currentReading'],
|
|
105
|
+
'consumption': json['consumption'] == null ? undefined : json['consumption'],
|
|
57
106
|
'status': json['status'] == null ? undefined : BillStatusEnumFromJSON(json['status']),
|
|
58
107
|
};
|
|
59
108
|
}
|
|
@@ -69,6 +118,13 @@ export function UpdateBillDtoToJSONTyped(value?: UpdateBillDto | null, ignoreDis
|
|
|
69
118
|
|
|
70
119
|
return {
|
|
71
120
|
|
|
121
|
+
'consumerId': value['consumerId'],
|
|
122
|
+
'billingPeriod': value['billingPeriod'],
|
|
123
|
+
'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString().substring(0,10)),
|
|
124
|
+
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString().substring(0,10)),
|
|
125
|
+
'previousReading': value['previousReading'],
|
|
126
|
+
'currentReading': value['currentReading'],
|
|
127
|
+
'consumption': value['consumption'],
|
|
72
128
|
'status': BillStatusEnumToJSON(value['status']),
|
|
73
129
|
};
|
|
74
130
|
}
|