electric-coop-api 0.1.20 → 0.1.23
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 +20 -6
- package/dist/esm/models/Bill.js +20 -6
- package/dist/esm/models/BillReadingByDto.d.ts +2 -2
- package/dist/models/Bill.d.ts +20 -6
- package/dist/models/Bill.js +20 -6
- package/dist/models/BillReadingByDto.d.ts +2 -2
- package/package.json +1 -1
- package/src/models/Bill.ts +46 -12
- package/src/models/BillReadingByDto.ts +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## electric-coop-api@0.1.
|
|
1
|
+
## electric-coop-api@0.1.23
|
|
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.23 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { BillBreakdownDto } from './BillBreakdownDto';
|
|
13
|
+
import type { Tenant } from './Tenant';
|
|
14
|
+
import type { Consumer } from './Consumer';
|
|
13
15
|
import type { BillStatusEnum } from './BillStatusEnum';
|
|
14
16
|
import type { BillReadingByDto } from './BillReadingByDto';
|
|
15
17
|
/**
|
|
@@ -48,12 +50,24 @@ export interface Bill {
|
|
|
48
50
|
* @memberof Bill
|
|
49
51
|
*/
|
|
50
52
|
tenantId: string;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {Tenant}
|
|
56
|
+
* @memberof Bill
|
|
57
|
+
*/
|
|
58
|
+
tenant?: Tenant;
|
|
51
59
|
/**
|
|
52
60
|
*
|
|
53
61
|
* @type {string}
|
|
54
62
|
* @memberof Bill
|
|
55
63
|
*/
|
|
56
64
|
consumerId: string;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {Consumer}
|
|
68
|
+
* @memberof Bill
|
|
69
|
+
*/
|
|
70
|
+
consumer?: Consumer;
|
|
57
71
|
/**
|
|
58
72
|
*
|
|
59
73
|
* @type {string}
|
|
@@ -107,25 +121,25 @@ export interface Bill {
|
|
|
107
121
|
* @type {number}
|
|
108
122
|
* @memberof Bill
|
|
109
123
|
*/
|
|
110
|
-
generationPreviousReading
|
|
124
|
+
generationPreviousReading: number;
|
|
111
125
|
/**
|
|
112
126
|
*
|
|
113
127
|
* @type {number}
|
|
114
128
|
* @memberof Bill
|
|
115
129
|
*/
|
|
116
|
-
generationCurrentReading
|
|
130
|
+
generationCurrentReading: number;
|
|
117
131
|
/**
|
|
118
132
|
*
|
|
119
133
|
* @type {number}
|
|
120
134
|
* @memberof Bill
|
|
121
135
|
*/
|
|
122
|
-
generationProduced
|
|
136
|
+
generationProduced: number;
|
|
123
137
|
/**
|
|
124
138
|
*
|
|
125
139
|
* @type {number}
|
|
126
140
|
* @memberof Bill
|
|
127
141
|
*/
|
|
128
|
-
generationCredit
|
|
142
|
+
generationCredit: number;
|
|
129
143
|
/**
|
|
130
144
|
*
|
|
131
145
|
* @type {number}
|
|
@@ -146,10 +160,10 @@ export interface Bill {
|
|
|
146
160
|
amountPaid: number;
|
|
147
161
|
/**
|
|
148
162
|
*
|
|
149
|
-
* @type {
|
|
163
|
+
* @type {Date}
|
|
150
164
|
* @memberof Bill
|
|
151
165
|
*/
|
|
152
|
-
paymentDate?:
|
|
166
|
+
paymentDate?: Date;
|
|
153
167
|
/**
|
|
154
168
|
*
|
|
155
169
|
* @type {BillStatusEnum}
|
package/dist/esm/models/Bill.js
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { BillBreakdownDtoFromJSON, BillBreakdownDtoToJSON, } from './BillBreakdownDto';
|
|
15
|
+
import { TenantFromJSON, TenantToJSON, } from './Tenant';
|
|
16
|
+
import { ConsumerFromJSON, ConsumerToJSON, } from './Consumer';
|
|
15
17
|
import { BillStatusEnumFromJSON, BillStatusEnumToJSON, } from './BillStatusEnum';
|
|
16
18
|
import { BillReadingByDtoFromJSON, BillReadingByDtoToJSON, } from './BillReadingByDto';
|
|
17
19
|
/**
|
|
@@ -38,6 +40,14 @@ export function instanceOfBill(value) {
|
|
|
38
40
|
return false;
|
|
39
41
|
if (!('consumption' in value) || value['consumption'] === undefined)
|
|
40
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;
|
|
41
51
|
if (!('amountDue' in value) || value['amountDue'] === undefined)
|
|
42
52
|
return false;
|
|
43
53
|
if (!('amountPaid' in value) || value['amountPaid'] === undefined)
|
|
@@ -59,7 +69,9 @@ export function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
69
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
60
70
|
'deletedAt': json['deletedAt'] == null ? undefined : (new Date(json['deletedAt'])),
|
|
61
71
|
'tenantId': json['tenantId'],
|
|
72
|
+
'tenant': json['tenant'] == null ? undefined : TenantFromJSON(json['tenant']),
|
|
62
73
|
'consumerId': json['consumerId'],
|
|
74
|
+
'consumer': json['consumer'] == null ? undefined : ConsumerFromJSON(json['consumer']),
|
|
63
75
|
'billingPeriod': json['billingPeriod'],
|
|
64
76
|
'dueDate': (new Date(json['dueDate'])),
|
|
65
77
|
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
@@ -68,14 +80,14 @@ export function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
68
80
|
'previousReading': json['previousReading'],
|
|
69
81
|
'currentReading': json['currentReading'],
|
|
70
82
|
'consumption': json['consumption'],
|
|
71
|
-
'generationPreviousReading': json['generationPreviousReading']
|
|
72
|
-
'generationCurrentReading': json['generationCurrentReading']
|
|
73
|
-
'generationProduced': json['generationProduced']
|
|
74
|
-
'generationCredit': json['generationCredit']
|
|
83
|
+
'generationPreviousReading': json['generationPreviousReading'],
|
|
84
|
+
'generationCurrentReading': json['generationCurrentReading'],
|
|
85
|
+
'generationProduced': json['generationProduced'],
|
|
86
|
+
'generationCredit': json['generationCredit'],
|
|
75
87
|
'amountDue': json['amountDue'],
|
|
76
88
|
'netAmount': json['netAmount'] == null ? undefined : json['netAmount'],
|
|
77
89
|
'amountPaid': json['amountPaid'],
|
|
78
|
-
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
90
|
+
'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
|
|
79
91
|
'status': BillStatusEnumFromJSON(json['status']),
|
|
80
92
|
'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
|
|
81
93
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
@@ -94,7 +106,9 @@ export function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
94
106
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
95
107
|
'deletedAt': value['deletedAt'] == null ? undefined : ((value['deletedAt']).toISOString()),
|
|
96
108
|
'tenantId': value['tenantId'],
|
|
109
|
+
'tenant': TenantToJSON(value['tenant']),
|
|
97
110
|
'consumerId': value['consumerId'],
|
|
111
|
+
'consumer': ConsumerToJSON(value['consumer']),
|
|
98
112
|
'billingPeriod': value['billingPeriod'],
|
|
99
113
|
'dueDate': ((value['dueDate']).toISOString()),
|
|
100
114
|
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
@@ -110,7 +124,7 @@ export function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
110
124
|
'amountDue': value['amountDue'],
|
|
111
125
|
'netAmount': value['netAmount'],
|
|
112
126
|
'amountPaid': value['amountPaid'],
|
|
113
|
-
'paymentDate': value['paymentDate'],
|
|
127
|
+
'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
|
|
114
128
|
'status': BillStatusEnumToJSON(value['status']),
|
|
115
129
|
'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
|
|
116
130
|
'metadata': value['metadata'],
|
|
@@ -23,10 +23,10 @@ export interface BillReadingByDto {
|
|
|
23
23
|
id: string;
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
|
-
* @type {
|
|
26
|
+
* @type {string}
|
|
27
27
|
* @memberof BillReadingByDto
|
|
28
28
|
*/
|
|
29
|
-
name?:
|
|
29
|
+
name?: string;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Check if a given object implements the BillReadingByDto interface.
|
package/dist/models/Bill.d.ts
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { BillBreakdownDto } from './BillBreakdownDto';
|
|
13
|
+
import type { Tenant } from './Tenant';
|
|
14
|
+
import type { Consumer } from './Consumer';
|
|
13
15
|
import type { BillStatusEnum } from './BillStatusEnum';
|
|
14
16
|
import type { BillReadingByDto } from './BillReadingByDto';
|
|
15
17
|
/**
|
|
@@ -48,12 +50,24 @@ export interface Bill {
|
|
|
48
50
|
* @memberof Bill
|
|
49
51
|
*/
|
|
50
52
|
tenantId: string;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {Tenant}
|
|
56
|
+
* @memberof Bill
|
|
57
|
+
*/
|
|
58
|
+
tenant?: Tenant;
|
|
51
59
|
/**
|
|
52
60
|
*
|
|
53
61
|
* @type {string}
|
|
54
62
|
* @memberof Bill
|
|
55
63
|
*/
|
|
56
64
|
consumerId: string;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {Consumer}
|
|
68
|
+
* @memberof Bill
|
|
69
|
+
*/
|
|
70
|
+
consumer?: Consumer;
|
|
57
71
|
/**
|
|
58
72
|
*
|
|
59
73
|
* @type {string}
|
|
@@ -107,25 +121,25 @@ export interface Bill {
|
|
|
107
121
|
* @type {number}
|
|
108
122
|
* @memberof Bill
|
|
109
123
|
*/
|
|
110
|
-
generationPreviousReading
|
|
124
|
+
generationPreviousReading: number;
|
|
111
125
|
/**
|
|
112
126
|
*
|
|
113
127
|
* @type {number}
|
|
114
128
|
* @memberof Bill
|
|
115
129
|
*/
|
|
116
|
-
generationCurrentReading
|
|
130
|
+
generationCurrentReading: number;
|
|
117
131
|
/**
|
|
118
132
|
*
|
|
119
133
|
* @type {number}
|
|
120
134
|
* @memberof Bill
|
|
121
135
|
*/
|
|
122
|
-
generationProduced
|
|
136
|
+
generationProduced: number;
|
|
123
137
|
/**
|
|
124
138
|
*
|
|
125
139
|
* @type {number}
|
|
126
140
|
* @memberof Bill
|
|
127
141
|
*/
|
|
128
|
-
generationCredit
|
|
142
|
+
generationCredit: number;
|
|
129
143
|
/**
|
|
130
144
|
*
|
|
131
145
|
* @type {number}
|
|
@@ -146,10 +160,10 @@ export interface Bill {
|
|
|
146
160
|
amountPaid: number;
|
|
147
161
|
/**
|
|
148
162
|
*
|
|
149
|
-
* @type {
|
|
163
|
+
* @type {Date}
|
|
150
164
|
* @memberof Bill
|
|
151
165
|
*/
|
|
152
|
-
paymentDate?:
|
|
166
|
+
paymentDate?: Date;
|
|
153
167
|
/**
|
|
154
168
|
*
|
|
155
169
|
* @type {BillStatusEnum}
|
package/dist/models/Bill.js
CHANGED
|
@@ -19,6 +19,8 @@ exports.BillFromJSONTyped = BillFromJSONTyped;
|
|
|
19
19
|
exports.BillToJSON = BillToJSON;
|
|
20
20
|
exports.BillToJSONTyped = BillToJSONTyped;
|
|
21
21
|
const BillBreakdownDto_1 = require("./BillBreakdownDto");
|
|
22
|
+
const Tenant_1 = require("./Tenant");
|
|
23
|
+
const Consumer_1 = require("./Consumer");
|
|
22
24
|
const BillStatusEnum_1 = require("./BillStatusEnum");
|
|
23
25
|
const BillReadingByDto_1 = require("./BillReadingByDto");
|
|
24
26
|
/**
|
|
@@ -45,6 +47,14 @@ function instanceOfBill(value) {
|
|
|
45
47
|
return false;
|
|
46
48
|
if (!('consumption' in value) || value['consumption'] === undefined)
|
|
47
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;
|
|
48
58
|
if (!('amountDue' in value) || value['amountDue'] === undefined)
|
|
49
59
|
return false;
|
|
50
60
|
if (!('amountPaid' in value) || value['amountPaid'] === undefined)
|
|
@@ -66,7 +76,9 @@ function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
66
76
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
67
77
|
'deletedAt': json['deletedAt'] == null ? undefined : (new Date(json['deletedAt'])),
|
|
68
78
|
'tenantId': json['tenantId'],
|
|
79
|
+
'tenant': json['tenant'] == null ? undefined : (0, Tenant_1.TenantFromJSON)(json['tenant']),
|
|
69
80
|
'consumerId': json['consumerId'],
|
|
81
|
+
'consumer': json['consumer'] == null ? undefined : (0, Consumer_1.ConsumerFromJSON)(json['consumer']),
|
|
70
82
|
'billingPeriod': json['billingPeriod'],
|
|
71
83
|
'dueDate': (new Date(json['dueDate'])),
|
|
72
84
|
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
@@ -75,14 +87,14 @@ function BillFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
75
87
|
'previousReading': json['previousReading'],
|
|
76
88
|
'currentReading': json['currentReading'],
|
|
77
89
|
'consumption': json['consumption'],
|
|
78
|
-
'generationPreviousReading': json['generationPreviousReading']
|
|
79
|
-
'generationCurrentReading': json['generationCurrentReading']
|
|
80
|
-
'generationProduced': json['generationProduced']
|
|
81
|
-
'generationCredit': json['generationCredit']
|
|
90
|
+
'generationPreviousReading': json['generationPreviousReading'],
|
|
91
|
+
'generationCurrentReading': json['generationCurrentReading'],
|
|
92
|
+
'generationProduced': json['generationProduced'],
|
|
93
|
+
'generationCredit': json['generationCredit'],
|
|
82
94
|
'amountDue': json['amountDue'],
|
|
83
95
|
'netAmount': json['netAmount'] == null ? undefined : json['netAmount'],
|
|
84
96
|
'amountPaid': json['amountPaid'],
|
|
85
|
-
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
97
|
+
'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
|
|
86
98
|
'status': (0, BillStatusEnum_1.BillStatusEnumFromJSON)(json['status']),
|
|
87
99
|
'breakdown': json['breakdown'] == null ? undefined : (0, BillBreakdownDto_1.BillBreakdownDtoFromJSON)(json['breakdown']),
|
|
88
100
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
@@ -101,7 +113,9 @@ function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
101
113
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
102
114
|
'deletedAt': value['deletedAt'] == null ? undefined : ((value['deletedAt']).toISOString()),
|
|
103
115
|
'tenantId': value['tenantId'],
|
|
116
|
+
'tenant': (0, Tenant_1.TenantToJSON)(value['tenant']),
|
|
104
117
|
'consumerId': value['consumerId'],
|
|
118
|
+
'consumer': (0, Consumer_1.ConsumerToJSON)(value['consumer']),
|
|
105
119
|
'billingPeriod': value['billingPeriod'],
|
|
106
120
|
'dueDate': ((value['dueDate']).toISOString()),
|
|
107
121
|
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
@@ -117,7 +131,7 @@ function BillToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
117
131
|
'amountDue': value['amountDue'],
|
|
118
132
|
'netAmount': value['netAmount'],
|
|
119
133
|
'amountPaid': value['amountPaid'],
|
|
120
|
-
'paymentDate': value['paymentDate'],
|
|
134
|
+
'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
|
|
121
135
|
'status': (0, BillStatusEnum_1.BillStatusEnumToJSON)(value['status']),
|
|
122
136
|
'breakdown': (0, BillBreakdownDto_1.BillBreakdownDtoToJSON)(value['breakdown']),
|
|
123
137
|
'metadata': value['metadata'],
|
|
@@ -23,10 +23,10 @@ export interface BillReadingByDto {
|
|
|
23
23
|
id: string;
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
|
-
* @type {
|
|
26
|
+
* @type {string}
|
|
27
27
|
* @memberof BillReadingByDto
|
|
28
28
|
*/
|
|
29
|
-
name?:
|
|
29
|
+
name?: string;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Check if a given object implements the BillReadingByDto interface.
|
package/package.json
CHANGED
package/src/models/Bill.ts
CHANGED
|
@@ -20,6 +20,20 @@ import {
|
|
|
20
20
|
BillBreakdownDtoToJSON,
|
|
21
21
|
BillBreakdownDtoToJSONTyped,
|
|
22
22
|
} from './BillBreakdownDto';
|
|
23
|
+
import type { Tenant } from './Tenant';
|
|
24
|
+
import {
|
|
25
|
+
TenantFromJSON,
|
|
26
|
+
TenantFromJSONTyped,
|
|
27
|
+
TenantToJSON,
|
|
28
|
+
TenantToJSONTyped,
|
|
29
|
+
} from './Tenant';
|
|
30
|
+
import type { Consumer } from './Consumer';
|
|
31
|
+
import {
|
|
32
|
+
ConsumerFromJSON,
|
|
33
|
+
ConsumerFromJSONTyped,
|
|
34
|
+
ConsumerToJSON,
|
|
35
|
+
ConsumerToJSONTyped,
|
|
36
|
+
} from './Consumer';
|
|
23
37
|
import type { BillStatusEnum } from './BillStatusEnum';
|
|
24
38
|
import {
|
|
25
39
|
BillStatusEnumFromJSON,
|
|
@@ -71,12 +85,24 @@ export interface Bill {
|
|
|
71
85
|
* @memberof Bill
|
|
72
86
|
*/
|
|
73
87
|
tenantId: string;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {Tenant}
|
|
91
|
+
* @memberof Bill
|
|
92
|
+
*/
|
|
93
|
+
tenant?: Tenant;
|
|
74
94
|
/**
|
|
75
95
|
*
|
|
76
96
|
* @type {string}
|
|
77
97
|
* @memberof Bill
|
|
78
98
|
*/
|
|
79
99
|
consumerId: string;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {Consumer}
|
|
103
|
+
* @memberof Bill
|
|
104
|
+
*/
|
|
105
|
+
consumer?: Consumer;
|
|
80
106
|
/**
|
|
81
107
|
*
|
|
82
108
|
* @type {string}
|
|
@@ -130,25 +156,25 @@ export interface Bill {
|
|
|
130
156
|
* @type {number}
|
|
131
157
|
* @memberof Bill
|
|
132
158
|
*/
|
|
133
|
-
generationPreviousReading
|
|
159
|
+
generationPreviousReading: number;
|
|
134
160
|
/**
|
|
135
161
|
*
|
|
136
162
|
* @type {number}
|
|
137
163
|
* @memberof Bill
|
|
138
164
|
*/
|
|
139
|
-
generationCurrentReading
|
|
165
|
+
generationCurrentReading: number;
|
|
140
166
|
/**
|
|
141
167
|
*
|
|
142
168
|
* @type {number}
|
|
143
169
|
* @memberof Bill
|
|
144
170
|
*/
|
|
145
|
-
generationProduced
|
|
171
|
+
generationProduced: number;
|
|
146
172
|
/**
|
|
147
173
|
*
|
|
148
174
|
* @type {number}
|
|
149
175
|
* @memberof Bill
|
|
150
176
|
*/
|
|
151
|
-
generationCredit
|
|
177
|
+
generationCredit: number;
|
|
152
178
|
/**
|
|
153
179
|
*
|
|
154
180
|
* @type {number}
|
|
@@ -169,10 +195,10 @@ export interface Bill {
|
|
|
169
195
|
amountPaid: number;
|
|
170
196
|
/**
|
|
171
197
|
*
|
|
172
|
-
* @type {
|
|
198
|
+
* @type {Date}
|
|
173
199
|
* @memberof Bill
|
|
174
200
|
*/
|
|
175
|
-
paymentDate?:
|
|
201
|
+
paymentDate?: Date;
|
|
176
202
|
/**
|
|
177
203
|
*
|
|
178
204
|
* @type {BillStatusEnum}
|
|
@@ -209,6 +235,10 @@ export function instanceOfBill(value: object): value is Bill {
|
|
|
209
235
|
if (!('previousReading' in value) || value['previousReading'] === undefined) return false;
|
|
210
236
|
if (!('currentReading' in value) || value['currentReading'] === undefined) return false;
|
|
211
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;
|
|
212
242
|
if (!('amountDue' in value) || value['amountDue'] === undefined) return false;
|
|
213
243
|
if (!('amountPaid' in value) || value['amountPaid'] === undefined) return false;
|
|
214
244
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
@@ -230,7 +260,9 @@ export function BillFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bill
|
|
|
230
260
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
231
261
|
'deletedAt': json['deletedAt'] == null ? undefined : (new Date(json['deletedAt'])),
|
|
232
262
|
'tenantId': json['tenantId'],
|
|
263
|
+
'tenant': json['tenant'] == null ? undefined : TenantFromJSON(json['tenant']),
|
|
233
264
|
'consumerId': json['consumerId'],
|
|
265
|
+
'consumer': json['consumer'] == null ? undefined : ConsumerFromJSON(json['consumer']),
|
|
234
266
|
'billingPeriod': json['billingPeriod'],
|
|
235
267
|
'dueDate': (new Date(json['dueDate'])),
|
|
236
268
|
'readingDate': json['readingDate'] == null ? undefined : (new Date(json['readingDate'])),
|
|
@@ -239,14 +271,14 @@ export function BillFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bill
|
|
|
239
271
|
'previousReading': json['previousReading'],
|
|
240
272
|
'currentReading': json['currentReading'],
|
|
241
273
|
'consumption': json['consumption'],
|
|
242
|
-
'generationPreviousReading': json['generationPreviousReading']
|
|
243
|
-
'generationCurrentReading': json['generationCurrentReading']
|
|
244
|
-
'generationProduced': json['generationProduced']
|
|
245
|
-
'generationCredit': json['generationCredit']
|
|
274
|
+
'generationPreviousReading': json['generationPreviousReading'],
|
|
275
|
+
'generationCurrentReading': json['generationCurrentReading'],
|
|
276
|
+
'generationProduced': json['generationProduced'],
|
|
277
|
+
'generationCredit': json['generationCredit'],
|
|
246
278
|
'amountDue': json['amountDue'],
|
|
247
279
|
'netAmount': json['netAmount'] == null ? undefined : json['netAmount'],
|
|
248
280
|
'amountPaid': json['amountPaid'],
|
|
249
|
-
'paymentDate': json['paymentDate'] == null ? undefined : json['paymentDate'],
|
|
281
|
+
'paymentDate': json['paymentDate'] == null ? undefined : (new Date(json['paymentDate'])),
|
|
250
282
|
'status': BillStatusEnumFromJSON(json['status']),
|
|
251
283
|
'breakdown': json['breakdown'] == null ? undefined : BillBreakdownDtoFromJSON(json['breakdown']),
|
|
252
284
|
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
@@ -269,7 +301,9 @@ export function BillToJSONTyped(value?: Bill | null, ignoreDiscriminator: boolea
|
|
|
269
301
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
270
302
|
'deletedAt': value['deletedAt'] == null ? undefined : ((value['deletedAt']).toISOString()),
|
|
271
303
|
'tenantId': value['tenantId'],
|
|
304
|
+
'tenant': TenantToJSON(value['tenant']),
|
|
272
305
|
'consumerId': value['consumerId'],
|
|
306
|
+
'consumer': ConsumerToJSON(value['consumer']),
|
|
273
307
|
'billingPeriod': value['billingPeriod'],
|
|
274
308
|
'dueDate': ((value['dueDate']).toISOString()),
|
|
275
309
|
'readingDate': value['readingDate'] == null ? undefined : ((value['readingDate']).toISOString()),
|
|
@@ -285,7 +319,7 @@ export function BillToJSONTyped(value?: Bill | null, ignoreDiscriminator: boolea
|
|
|
285
319
|
'amountDue': value['amountDue'],
|
|
286
320
|
'netAmount': value['netAmount'],
|
|
287
321
|
'amountPaid': value['amountPaid'],
|
|
288
|
-
'paymentDate': value['paymentDate'],
|
|
322
|
+
'paymentDate': value['paymentDate'] == null ? undefined : ((value['paymentDate']).toISOString()),
|
|
289
323
|
'status': BillStatusEnumToJSON(value['status']),
|
|
290
324
|
'breakdown': BillBreakdownDtoToJSON(value['breakdown']),
|
|
291
325
|
'metadata': value['metadata'],
|