@scaleway/sdk-billing 2.21.0 → 2.22.0

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.
@@ -4,44 +4,44 @@ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unma
4
4
  const unmarshalBudgetAlertNotification = (data) => {
5
5
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BudgetAlertNotification' failed as data isn't a dictionary.`);
6
6
  return {
7
- createdAt: unmarshalDate(data.created_at),
7
+ createdAt: unmarshalDate(data.created_at) ?? null,
8
8
  id: data.id,
9
9
  recipients: data.recipients,
10
10
  type: data.type,
11
- updatedAt: unmarshalDate(data.updated_at)
11
+ updatedAt: unmarshalDate(data.updated_at) ?? null
12
12
  };
13
13
  };
14
14
  const unmarshalBudgetAlert = (data) => {
15
15
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BudgetAlert' failed as data isn't a dictionary.`);
16
16
  return {
17
- createdAt: unmarshalDate(data.created_at),
17
+ createdAt: unmarshalDate(data.created_at) ?? null,
18
18
  id: data.id,
19
19
  notifications: unmarshalArrayOfObject(data.notifications, unmarshalBudgetAlertNotification),
20
20
  threshold: data.threshold,
21
- updatedAt: unmarshalDate(data.updated_at)
21
+ updatedAt: unmarshalDate(data.updated_at) ?? null
22
22
  };
23
23
  };
24
24
  const unmarshalBudget = (data) => {
25
25
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Budget' failed as data isn't a dictionary.`);
26
26
  return {
27
27
  alerts: unmarshalArrayOfObject(data.alerts, unmarshalBudgetAlert),
28
- consumptionLimit: data.consumption_limit ? unmarshalMoney(data.consumption_limit) : void 0,
29
- createdAt: unmarshalDate(data.created_at),
28
+ consumptionLimit: data.consumption_limit ? unmarshalMoney(data.consumption_limit) : null,
29
+ createdAt: unmarshalDate(data.created_at) ?? null,
30
30
  enabled: data.enabled,
31
31
  id: data.id,
32
32
  organizationId: data.organization_id,
33
- updatedAt: unmarshalDate(data.updated_at)
33
+ updatedAt: unmarshalDate(data.updated_at) ?? null
34
34
  };
35
35
  };
36
36
  const unmarshalElectronicAddress = (data) => {
37
37
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ElectronicAddress' failed as data isn't a dictionary.`);
38
38
  return {
39
- createdAt: unmarshalDate(data.created_at),
39
+ createdAt: unmarshalDate(data.created_at) ?? null,
40
40
  id: data.id,
41
41
  organizationId: data.organization_id,
42
- startsAt: unmarshalDate(data.starts_at),
43
- stopsAt: unmarshalDate(data.stops_at),
44
- updatedAt: unmarshalDate(data.updated_at),
42
+ startsAt: unmarshalDate(data.starts_at) ?? null,
43
+ stopsAt: unmarshalDate(data.stops_at) ?? null,
44
+ updatedAt: unmarshalDate(data.updated_at) ?? null,
45
45
  value: data.value
46
46
  };
47
47
  };
@@ -10,11 +10,11 @@ export interface BudgetAlertNotification {
10
10
  /**
11
11
  * The creation date of the alert notification.
12
12
  */
13
- createdAt?: Date;
13
+ createdAt?: Date | null;
14
14
  /**
15
15
  * The last modification date of the alert notification.
16
16
  */
17
- updatedAt?: Date;
17
+ updatedAt?: Date | null;
18
18
  /**
19
19
  * Kind of notification.
20
20
  */
@@ -32,11 +32,11 @@ export interface BudgetAlert {
32
32
  /**
33
33
  * The creation date of the alert.
34
34
  */
35
- createdAt?: Date;
35
+ createdAt?: Date | null;
36
36
  /**
37
37
  * The last modification date of the alert.
38
38
  */
39
- updatedAt?: Date;
39
+ updatedAt?: Date | null;
40
40
  /**
41
41
  * Percentage threshold of the budget's limit for which the alert is triggered.
42
42
  */
@@ -54,11 +54,11 @@ export interface Budget {
54
54
  /**
55
55
  * The creation date of the budget.
56
56
  */
57
- createdAt?: Date;
57
+ createdAt?: Date | null;
58
58
  /**
59
59
  * The last modification date of the budget.
60
60
  */
61
- updatedAt?: Date;
61
+ updatedAt?: Date | null;
62
62
  /**
63
63
  * The organization ID of the budget.
64
64
  */
@@ -70,7 +70,7 @@ export interface Budget {
70
70
  /**
71
71
  * Cost limit for this budget expressed in the embedded currency code.
72
72
  */
73
- consumptionLimit?: Money;
73
+ consumptionLimit?: Money | null;
74
74
  /**
75
75
  * Alerts defined for this budget.
76
76
  */
@@ -84,19 +84,19 @@ export interface ElectronicAddress {
84
84
  /**
85
85
  * The start date of the electronic address.
86
86
  */
87
- startsAt?: Date;
87
+ startsAt?: Date | null;
88
88
  /**
89
89
  * The stop date of the electronic address.
90
90
  */
91
- stopsAt?: Date;
91
+ stopsAt?: Date | null;
92
92
  /**
93
93
  * The creation date of the electronic address.
94
94
  */
95
- createdAt?: Date;
95
+ createdAt?: Date | null;
96
96
  /**
97
97
  * The last modification date of the electronic address.
98
98
  */
99
- updatedAt?: Date;
99
+ updatedAt?: Date | null;
100
100
  /**
101
101
  * The organization ID of the electronic address.
102
102
  */
@@ -116,19 +116,19 @@ export type CreateBudgetAlertNotificationRequest = {
116
116
  *
117
117
  * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
118
118
  */
119
- smsPhoneNumbers?: string[];
119
+ smsPhoneNumbers?: string[] | null;
120
120
  /**
121
121
  * List of email addresses to receive email notifications.
122
122
  *
123
123
  * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
124
124
  */
125
- emailAddresses?: string[];
125
+ emailAddresses?: string[] | null;
126
126
  /**
127
127
  * List of webhook url to receive webhook notifications.
128
128
  *
129
129
  * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
130
130
  */
131
- webhookUrls?: string[];
131
+ webhookUrls?: string[] | null;
132
132
  };
133
133
  export type CreateBudgetAlertRequest = {
134
134
  /**
@@ -144,7 +144,7 @@ export type CreateBudgetRequest = {
144
144
  /**
145
145
  * The Organization ID of the budget.
146
146
  */
147
- organizationId?: string;
147
+ organizationId?: string | null;
148
148
  /**
149
149
  * Cost limit for the budget expressed in the invoiced currency (no cents allowed).
150
150
  */
@@ -176,7 +176,7 @@ export type ElectronicBillingApiCreateElectronicAddressRequest = {
176
176
  /**
177
177
  * The Organization ID to set electronic address.
178
178
  */
179
- organizationId?: string;
179
+ organizationId?: string | null;
180
180
  /**
181
181
  * Electronic address to set.
182
182
  */
@@ -184,11 +184,11 @@ export type ElectronicBillingApiCreateElectronicAddressRequest = {
184
184
  /**
185
185
  * When electronic address should be active.
186
186
  */
187
- startsAt?: Date;
187
+ startsAt?: Date | null;
188
188
  /**
189
189
  * When electronic address should stop being active.
190
190
  */
191
- stopsAt?: Date;
191
+ stopsAt?: Date | null;
192
192
  };
193
193
  export type ElectronicBillingApiDeleteElectronicAddressRequest = {
194
194
  /**
@@ -206,27 +206,27 @@ export type ElectronicBillingApiListElectronicAddressesRequest = {
206
206
  /**
207
207
  * Page number to return, from the paginated results.
208
208
  */
209
- page?: number;
209
+ page?: number | null;
210
210
  /**
211
211
  * Number of Electronic Address to return per page.
212
212
  */
213
- pageSize?: number;
213
+ pageSize?: number | null;
214
214
  /**
215
215
  * Sort order of Electronic address in the response.
216
216
  */
217
- orderBy?: ListElectronicAddressesRequestOrderBy;
217
+ orderBy?: ListElectronicAddressesRequestOrderBy | null;
218
218
  /**
219
219
  * The Organization ID to set electronic address.
220
220
  */
221
- organizationId?: string;
221
+ organizationId?: string | null;
222
222
  /**
223
223
  * Filter services where electronic address start_date is greater or equal to starts_after.
224
224
  */
225
- startsAfter?: Date;
225
+ startsAfter?: Date | null;
226
226
  /**
227
227
  * Filter services where electronic address stop_date is before stops_before.
228
228
  */
229
- stopsBefore?: Date;
229
+ stopsBefore?: Date | null;
230
230
  };
231
231
  export type ElectronicBillingApiUpdateElectronicAddressRequest = {
232
232
  /**
@@ -236,11 +236,11 @@ export type ElectronicBillingApiUpdateElectronicAddressRequest = {
236
236
  /**
237
237
  * Electronic address to set.
238
238
  */
239
- value?: string;
239
+ value?: string | null;
240
240
  /**
241
241
  * When electronic address should stop being active.
242
242
  */
243
- stopsAt?: Date;
243
+ stopsAt?: Date | null;
244
244
  };
245
245
  export type GetBudgetRequest = {
246
246
  /**
@@ -252,15 +252,15 @@ export type ListBudgetsRequest = {
252
252
  /**
253
253
  * Filter by organization ID.
254
254
  */
255
- organizationId?: string;
255
+ organizationId?: string | null;
256
256
  /**
257
257
  * Page number.
258
258
  */
259
- page?: number;
259
+ page?: number | null;
260
260
  /**
261
261
  * Positive integer to select the number of items to return.
262
262
  */
263
- pageSize?: number;
263
+ pageSize?: number | null;
264
264
  };
265
265
  export interface ListBudgetsResponse {
266
266
  /**
@@ -292,19 +292,19 @@ export type UpdateBudgetAlertNotificationRequest = {
292
292
  *
293
293
  * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
294
294
  */
295
- smsPhoneNumbers?: string[];
295
+ smsPhoneNumbers?: string[] | null;
296
296
  /**
297
297
  * List of email addresses to receive email notifications.
298
298
  *
299
299
  * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
300
300
  */
301
- emailAddresses?: string[];
301
+ emailAddresses?: string[] | null;
302
302
  /**
303
303
  * List of webhook url to receive webhook notifications.
304
304
  *
305
305
  * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
306
306
  */
307
- webhookUrls?: string[];
307
+ webhookUrls?: string[] | null;
308
308
  };
309
309
  export type UpdateBudgetAlertRequest = {
310
310
  /**
@@ -324,10 +324,10 @@ export type UpdateBudgetRequest = {
324
324
  /**
325
325
  * Cost limit for the budget expressed in the invoiced currency (no cents allowed).
326
326
  */
327
- consumptionLimit?: number;
327
+ consumptionLimit?: number | null;
328
328
  /**
329
329
  * Whether the budget will be enabled or not.
330
330
  */
331
- enabled?: boolean;
331
+ enabled?: boolean | null;
332
332
  };
333
333
  //#endregion
@@ -3,7 +3,7 @@ import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } f
3
3
  //#region src/v2beta1/marshalling.gen.ts
4
4
  const unmarshalDiscountCoupon = (data) => {
5
5
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DiscountCoupon' failed as data isn't a dictionary.`);
6
- return { description: data.description };
6
+ return { description: data.description ?? null };
7
7
  };
8
8
  const unmarshalDiscountFilter = (data) => {
9
9
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DiscountFilter' failed as data isn't a dictionary.`);
@@ -16,15 +16,15 @@ const unmarshalDiscountFilter = (data) => {
16
16
  const unmarshalDiscount = (data) => {
17
17
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Discount' failed as data isn't a dictionary.`);
18
18
  return {
19
- coupon: data.coupon ? unmarshalDiscountCoupon(data.coupon) : void 0,
20
- creationDate: unmarshalDate(data.creation_date),
19
+ coupon: data.coupon ? unmarshalDiscountCoupon(data.coupon) : null,
20
+ creationDate: unmarshalDate(data.creation_date) ?? null,
21
21
  description: data.description,
22
22
  filters: unmarshalArrayOfObject(data.filters, unmarshalDiscountFilter),
23
23
  id: data.id,
24
24
  mode: data.mode,
25
25
  organizationId: data.organization_id,
26
- startDate: unmarshalDate(data.start_date),
27
- stopDate: unmarshalDate(data.stop_date),
26
+ startDate: unmarshalDate(data.start_date) ?? null,
27
+ stopDate: unmarshalDate(data.stop_date) ?? null,
28
28
  value: data.value,
29
29
  valueRemaining: data.value_remaining,
30
30
  valueUsed: data.value_used
@@ -33,47 +33,47 @@ const unmarshalDiscount = (data) => {
33
33
  const unmarshalInvoice = (data) => {
34
34
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Invoice' failed as data isn't a dictionary.`);
35
35
  return {
36
- billingPeriod: unmarshalDate(data.billing_period),
37
- dueDate: unmarshalDate(data.due_date),
36
+ billingPeriod: unmarshalDate(data.billing_period) ?? null,
37
+ dueDate: unmarshalDate(data.due_date) ?? null,
38
38
  id: data.id,
39
- issuedDate: unmarshalDate(data.issued_date),
39
+ issuedDate: unmarshalDate(data.issued_date) ?? null,
40
40
  number: data.number,
41
41
  organizationId: data.organization_id,
42
42
  organizationName: data.organization_name,
43
43
  sellerName: data.seller_name,
44
- startDate: unmarshalDate(data.start_date),
44
+ startDate: unmarshalDate(data.start_date) ?? null,
45
45
  state: data.state,
46
- stopDate: unmarshalDate(data.stop_date),
47
- totalDiscount: data.total_discount ? unmarshalMoney(data.total_discount) : void 0,
48
- totalTax: data.total_tax ? unmarshalMoney(data.total_tax) : void 0,
49
- totalTaxed: data.total_taxed ? unmarshalMoney(data.total_taxed) : void 0,
50
- totalUndiscount: data.total_undiscount ? unmarshalMoney(data.total_undiscount) : void 0,
51
- totalUntaxed: data.total_untaxed ? unmarshalMoney(data.total_untaxed) : void 0,
46
+ stopDate: unmarshalDate(data.stop_date) ?? null,
47
+ totalDiscount: data.total_discount ? unmarshalMoney(data.total_discount) : null,
48
+ totalTax: data.total_tax ? unmarshalMoney(data.total_tax) : null,
49
+ totalTaxed: data.total_taxed ? unmarshalMoney(data.total_taxed) : null,
50
+ totalUndiscount: data.total_undiscount ? unmarshalMoney(data.total_undiscount) : null,
51
+ totalUntaxed: data.total_untaxed ? unmarshalMoney(data.total_untaxed) : null,
52
52
  type: data.type
53
53
  };
54
54
  };
55
55
  const unmarshalCharge = (data) => {
56
56
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Charge' failed as data isn't a dictionary.`);
57
57
  return {
58
- endDate: unmarshalDate(data.end_date),
58
+ endDate: unmarshalDate(data.end_date) ?? null,
59
59
  invoiceId: data.invoice_id,
60
60
  organizationId: data.organization_id,
61
61
  organizationName: data.organization_name,
62
- price: data.price ? unmarshalMoney(data.price) : void 0,
62
+ price: data.price ? unmarshalMoney(data.price) : null,
63
63
  projectId: data.project_id,
64
64
  projectName: data.project_name,
65
65
  resourceId: data.resource_id,
66
- resourceName: data.resource_name,
66
+ resourceName: data.resource_name ?? null,
67
67
  sku: data.sku,
68
- startDate: unmarshalDate(data.start_date),
69
- updatedAt: unmarshalDate(data.updated_at)
68
+ startDate: unmarshalDate(data.start_date) ?? null,
69
+ updatedAt: unmarshalDate(data.updated_at) ?? null
70
70
  };
71
71
  };
72
72
  const unmarshalListChargesResponse = (data) => {
73
73
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListChargesResponse' failed as data isn't a dictionary.`);
74
74
  return {
75
75
  charges: unmarshalArrayOfObject(data.charges, unmarshalCharge),
76
- nextPageToken: data.next_page_token
76
+ nextPageToken: data.next_page_token ?? null
77
77
  };
78
78
  };
79
79
  const unmarshalListConsumptionsResponseConsumption = (data) => {
@@ -89,7 +89,7 @@ const unmarshalListConsumptionsResponseConsumption = (data) => {
89
89
  resourceName: data.resource_name,
90
90
  sku: data.sku,
91
91
  unit: data.unit,
92
- value: data.value ? unmarshalMoney(data.value) : void 0
92
+ value: data.value ? unmarshalMoney(data.value) : null
93
93
  };
94
94
  };
95
95
  const unmarshalListConsumptionsResponse = (data) => {
@@ -98,7 +98,7 @@ const unmarshalListConsumptionsResponse = (data) => {
98
98
  consumptions: unmarshalArrayOfObject(data.consumptions, unmarshalListConsumptionsResponseConsumption),
99
99
  totalCount: data.total_count,
100
100
  totalDiscountUntaxedValue: data.total_discount_untaxed_value,
101
- updatedAt: unmarshalDate(data.updated_at)
101
+ updatedAt: unmarshalDate(data.updated_at) ?? null
102
102
  };
103
103
  };
104
104
  const unmarshalListDiscountsResponse = (data) => {
@@ -120,8 +120,8 @@ const unmarshalListTaxesResponseTax = (data) => {
120
120
  return {
121
121
  currency: data.currency,
122
122
  description: data.description,
123
- rate: data.rate,
124
- totalTaxValue: data.total_tax_value
123
+ rate: data.rate ?? null,
124
+ totalTaxValue: data.total_tax_value ?? null
125
125
  };
126
126
  };
127
127
  const unmarshalListTaxesResponse = (data) => {
@@ -129,7 +129,7 @@ const unmarshalListTaxesResponse = (data) => {
129
129
  return {
130
130
  taxes: unmarshalArrayOfObject(data.taxes, unmarshalListTaxesResponseTax),
131
131
  totalCount: data.total_count,
132
- updatedAt: unmarshalDate(data.updated_at)
132
+ updatedAt: unmarshalDate(data.updated_at) ?? null
133
133
  };
134
134
  };
135
135
 
@@ -15,7 +15,7 @@ export interface DiscountCoupon {
15
15
  /**
16
16
  * The description of the coupon.
17
17
  */
18
- description?: string;
18
+ description?: string | null;
19
19
  }
20
20
  export interface DiscountFilter {
21
21
  /**
@@ -63,29 +63,29 @@ export interface Charge {
63
63
  /**
64
64
  * Optional display name assigned to the resource that incurs the charge.
65
65
  */
66
- resourceName?: string;
66
+ resourceName?: string | null;
67
67
  /**
68
68
  * Price of the charge.
69
69
  */
70
- price?: Money;
70
+ price?: Money | null;
71
71
  /**
72
72
  * Start date of the charge.
73
73
  */
74
- startDate?: Date;
74
+ startDate?: Date | null;
75
75
  /**
76
76
  * End date of the charge, included.
77
77
  */
78
- endDate?: Date;
78
+ endDate?: Date | null;
79
79
  /**
80
80
  * Date the charge was last updated.
81
81
  */
82
- updatedAt?: Date;
82
+ updatedAt?: Date | null;
83
83
  }
84
84
  export interface ListConsumptionsResponseConsumption {
85
85
  /**
86
86
  * Monetary value of the consumption.
87
87
  */
88
- value?: Money;
88
+ value?: Money | null;
89
89
  /**
90
90
  * The product name. For example, "VPC Public Gateway S", "VPC Public Gateway M" for the VPC product.
91
91
  */
@@ -135,7 +135,7 @@ export interface Discount {
135
135
  /**
136
136
  * The creation date of the discount.
137
137
  */
138
- creationDate?: Date;
138
+ creationDate?: Date | null;
139
139
  /**
140
140
  * The Organization ID of the discount.
141
141
  */
@@ -163,15 +163,15 @@ export interface Discount {
163
163
  /**
164
164
  * The start date of the discount.
165
165
  */
166
- startDate?: Date;
166
+ startDate?: Date | null;
167
167
  /**
168
168
  * The stop date of the discount.
169
169
  */
170
- stopDate?: Date;
170
+ stopDate?: Date | null;
171
171
  /**
172
172
  * The description of the coupon.
173
173
  */
174
- coupon?: DiscountCoupon;
174
+ coupon?: DiscountCoupon | null;
175
175
  /**
176
176
  * List of the discount scopes.
177
177
  */
@@ -187,40 +187,40 @@ export interface Invoice {
187
187
  /**
188
188
  * Start date of the billing period.
189
189
  */
190
- startDate?: Date;
191
- stopDate?: Date;
190
+ startDate?: Date | null;
191
+ stopDate?: Date | null;
192
192
  /**
193
193
  * The billing period of the invoice in the YYYY-MM format.
194
194
  */
195
- billingPeriod?: Date;
195
+ billingPeriod?: Date | null;
196
196
  /**
197
197
  * Date when the invoice was sent to the customer.
198
198
  */
199
- issuedDate?: Date;
199
+ issuedDate?: Date | null;
200
200
  /**
201
201
  * Payment time limit, set according to the Organization's payment conditions.
202
202
  */
203
- dueDate?: Date;
203
+ dueDate?: Date | null;
204
204
  /**
205
205
  * Total amount, untaxed.
206
206
  */
207
- totalUntaxed?: Money;
207
+ totalUntaxed?: Money | null;
208
208
  /**
209
209
  * Total amount, taxed.
210
210
  */
211
- totalTaxed?: Money;
211
+ totalTaxed?: Money | null;
212
212
  /**
213
213
  * The total tax amount of the invoice.
214
214
  */
215
- totalTax?: Money;
215
+ totalTax?: Money | null;
216
216
  /**
217
217
  * The total discount amount of the invoice.
218
218
  */
219
- totalDiscount?: Money;
219
+ totalDiscount?: Money | null;
220
220
  /**
221
221
  * The total amount of the invoice before applying the discount.
222
222
  */
223
- totalUndiscount?: Money;
223
+ totalUndiscount?: Money | null;
224
224
  /**
225
225
  * Type of invoice, either periodic or purchase.
226
226
  */
@@ -250,11 +250,11 @@ export interface ListTaxesResponseTax {
250
250
  /**
251
251
  * Applied tax rate (0.2 means a VAT of 20%).
252
252
  */
253
- rate?: number;
253
+ rate?: number | null;
254
254
  /**
255
255
  * The total tax value of the consumption.
256
256
  */
257
- totalTaxValue?: number;
257
+ totalTaxValue?: number | null;
258
258
  }
259
259
  export type DownloadInvoiceRequest = {
260
260
  /**
@@ -264,91 +264,91 @@ export type DownloadInvoiceRequest = {
264
264
  /**
265
265
  * File type. PDF by default.
266
266
  */
267
- fileType?: DownloadInvoiceRequestFileType;
267
+ fileType?: DownloadInvoiceRequestFileType | null;
268
268
  };
269
269
  export type ExportInvoicesRequest = {
270
270
  /**
271
271
  * Organization ID. If specified, only invoices from this Organization will be returned.
272
272
  */
273
- organizationId?: string;
273
+ organizationId?: string | null;
274
274
  /**
275
275
  * Return only invoice with start date greater than billing_period_start.
276
276
  */
277
- billingPeriodStartAfter?: Date;
277
+ billingPeriodStartAfter?: Date | null;
278
278
  /**
279
279
  * Return only invoice with start date less than billing_period_start.
280
280
  */
281
- billingPeriodStartBefore?: Date;
281
+ billingPeriodStartBefore?: Date | null;
282
282
  /**
283
283
  * Invoice type. It can either be `periodic`, `purchase` or `credit_note`.
284
284
  */
285
- invoiceType?: InvoiceType;
285
+ invoiceType?: InvoiceType | null;
286
286
  /**
287
287
  * Page number.
288
288
  */
289
- page?: number;
289
+ page?: number | null;
290
290
  /**
291
291
  * Positive integer lower or equal to 100 to select the number of items to return.
292
292
  */
293
- pageSize?: number;
293
+ pageSize?: number | null;
294
294
  /**
295
295
  * How invoices are ordered in the response.
296
296
  */
297
- orderBy?: ExportInvoicesRequestOrderBy;
297
+ orderBy?: ExportInvoicesRequestOrderBy | null;
298
298
  /**
299
299
  * File format for exporting the invoice list.
300
300
  */
301
- fileType?: ExportInvoicesRequestFileType;
301
+ fileType?: ExportInvoicesRequestFileType | null;
302
302
  };
303
303
  export type FinOpsApiListChargesRequest = {
304
304
  /**
305
305
  * Sort order of charges in the response.
306
306
  */
307
- orderBy?: ListChargesRequestOrderBy;
307
+ orderBy?: ListChargesRequestOrderBy | null;
308
308
  /**
309
309
  * Token returned by previous call to list next paginated charges, omitted for first page.
310
310
  */
311
- pageToken?: string;
311
+ pageToken?: string | null;
312
312
  /**
313
313
  * Number of charges to return per page.
314
314
  */
315
- pageSize?: number;
315
+ pageSize?: number | null;
316
316
  /**
317
317
  * Minimum start date of charges to filter for, defaults to the start of the billing period.
318
318
  */
319
- startDateAfter?: Date;
319
+ startDateAfter?: Date | null;
320
320
  /**
321
321
  * Maximum end date of charges to filter for, defaults to the end of the billing period.
322
322
  */
323
- endDateBefore?: Date;
323
+ endDateBefore?: Date | null;
324
324
  /**
325
325
  * Invoice IDs to filter for, only charges from these invoices will be returned.
326
326
  */
327
- invoiceIds?: string[];
327
+ invoiceIds?: string[] | null;
328
328
  /**
329
329
  * Organization ID to filter for, only charges for this organization will be returned.
330
330
  */
331
- organizationId?: string;
331
+ organizationId?: string | null;
332
332
  /**
333
333
  * Project IDs to filter for, only charges for these projects will be returned.
334
334
  */
335
- projectIds?: string[];
335
+ projectIds?: string[] | null;
336
336
  /**
337
337
  * Resource IDs to filter for, only charges for these resources will be returned.
338
338
  */
339
- resourceIds?: string[];
339
+ resourceIds?: string[] | null;
340
340
  /**
341
341
  * Resource display names to filter for, only charges for these resources will be returned.
342
342
  */
343
- resourceNames?: string[];
343
+ resourceNames?: string[] | null;
344
344
  /**
345
345
  * SKU IDs to filter for, only charges for these SKUs will be returned.
346
346
  */
347
- skus?: string[];
347
+ skus?: string[] | null;
348
348
  /**
349
349
  * Clamp charges to the requested time range.
350
350
  */
351
- clampToTimeRange?: boolean;
351
+ clampToTimeRange?: boolean | null;
352
352
  };
353
353
  export type GetInvoiceRequest = {
354
354
  /**
@@ -364,41 +364,41 @@ export interface ListChargesResponse {
364
364
  /**
365
365
  * Page token to use with following call to keep listing charges if there are more.
366
366
  */
367
- nextPageToken?: string;
367
+ nextPageToken?: string | null;
368
368
  }
369
369
  export type ListConsumptionsRequest = {
370
370
  /**
371
371
  * Order consumptions list in the response by their update date.
372
372
  */
373
- orderBy?: ListConsumptionsRequestOrderBy;
373
+ orderBy?: ListConsumptionsRequestOrderBy | null;
374
374
  /**
375
375
  * Positive integer to choose the page to return.
376
376
  */
377
- page?: number;
377
+ page?: number | null;
378
378
  /**
379
379
  * Positive integer lower or equal to 100 to select the number of items to return.
380
380
  */
381
- pageSize?: number;
381
+ pageSize?: number | null;
382
382
  /**
383
383
  * Filter by Organization ID.
384
384
  *
385
385
  * One-of ('projectIdentifier'): at most one of 'organizationId', 'projectId' could be set.
386
386
  */
387
- organizationId?: string;
387
+ organizationId?: string | null;
388
388
  /**
389
389
  * Filter by Project ID.
390
390
  *
391
391
  * One-of ('projectIdentifier'): at most one of 'organizationId', 'projectId' could be set.
392
392
  */
393
- projectId?: string;
393
+ projectId?: string | null;
394
394
  /**
395
395
  * Filter by name of a Category as they are shown in the invoice (Compute, Network, Observability).
396
396
  */
397
- categoryName?: string;
397
+ categoryName?: string | null;
398
398
  /**
399
399
  * Filter by the billing period in the YYYY-MM format. If it is empty the current billing period will be used as default.
400
400
  */
401
- billingPeriod?: string;
401
+ billingPeriod?: string | null;
402
402
  };
403
403
  export interface ListConsumptionsResponse {
404
404
  /**
@@ -416,25 +416,25 @@ export interface ListConsumptionsResponse {
416
416
  /**
417
417
  * Last consumption update date.
418
418
  */
419
- updatedAt?: Date;
419
+ updatedAt?: Date | null;
420
420
  }
421
421
  export type ListDiscountsRequest = {
422
422
  /**
423
423
  * Order discounts in the response by their description.
424
424
  */
425
- orderBy?: ListDiscountsRequestOrderBy;
425
+ orderBy?: ListDiscountsRequestOrderBy | null;
426
426
  /**
427
427
  * Positive integer to choose the page to return.
428
428
  */
429
- page?: number;
429
+ page?: number | null;
430
430
  /**
431
431
  * Positive integer lower or equal to 100 to select the number of items to return.
432
432
  */
433
- pageSize?: number;
433
+ pageSize?: number | null;
434
434
  /**
435
435
  * ID of the organization.
436
436
  */
437
- organizationId?: string;
437
+ organizationId?: string | null;
438
438
  };
439
439
  export interface ListDiscountsResponse {
440
440
  /**
@@ -450,31 +450,31 @@ export type ListInvoicesRequest = {
450
450
  /**
451
451
  * Organization ID. If specified, only invoices from this Organization will be returned.
452
452
  */
453
- organizationId?: string;
453
+ organizationId?: string | null;
454
454
  /**
455
455
  * Return only invoice with start date greater than billing_period_start.
456
456
  */
457
- billingPeriodStartAfter?: Date;
457
+ billingPeriodStartAfter?: Date | null;
458
458
  /**
459
459
  * Return only invoice with start date less than billing_period_start.
460
460
  */
461
- billingPeriodStartBefore?: Date;
461
+ billingPeriodStartBefore?: Date | null;
462
462
  /**
463
463
  * Invoice type. It can either be `periodic`, `purchase` or `credit_note`.
464
464
  */
465
- invoiceType?: InvoiceType;
465
+ invoiceType?: InvoiceType | null;
466
466
  /**
467
467
  * Page number.
468
468
  */
469
- page?: number;
469
+ page?: number | null;
470
470
  /**
471
471
  * Positive integer lower or equal to 100 to select the number of items to return.
472
472
  */
473
- pageSize?: number;
473
+ pageSize?: number | null;
474
474
  /**
475
475
  * How invoices are ordered in the response.
476
476
  */
477
- orderBy?: ListInvoicesRequestOrderBy;
477
+ orderBy?: ListInvoicesRequestOrderBy | null;
478
478
  };
479
479
  export interface ListInvoicesResponse {
480
480
  /**
@@ -490,23 +490,23 @@ export type ListTaxesRequest = {
490
490
  /**
491
491
  * Order consumed taxes list in the response by their update date.
492
492
  */
493
- orderBy?: ListTaxesRequestOrderBy;
493
+ orderBy?: ListTaxesRequestOrderBy | null;
494
494
  /**
495
495
  * Page number.
496
496
  */
497
- page?: number;
497
+ page?: number | null;
498
498
  /**
499
499
  * Positive integer lower or equal to 100 to select the number of items to return.
500
500
  */
501
- pageSize?: number;
501
+ pageSize?: number | null;
502
502
  /**
503
503
  * Filter by Organization ID.
504
504
  */
505
- organizationId?: string;
505
+ organizationId?: string | null;
506
506
  /**
507
507
  * Filter by the billing period in the YYYY-MM format. If it is empty the current billing period will be used as default.
508
508
  */
509
- billingPeriod?: string;
509
+ billingPeriod?: string | null;
510
510
  };
511
511
  export interface ListTaxesResponse {
512
512
  /**
@@ -520,13 +520,13 @@ export interface ListTaxesResponse {
520
520
  /**
521
521
  * Last consumption update date.
522
522
  */
523
- updatedAt?: Date;
523
+ updatedAt?: Date | null;
524
524
  }
525
525
  export type RedeemCouponRequest = {
526
526
  /**
527
527
  * The Organization ID of the discount.
528
528
  */
529
- organizationId?: string;
529
+ organizationId?: string | null;
530
530
  /**
531
531
  * The code of the coupon to redeem.
532
532
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-billing",
3
- "version": "2.21.0",
3
+ "version": "2.22.0",
4
4
  "description": "Scaleway SDK billing",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -33,14 +33,14 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@scaleway/random-name": "6.0.2",
36
- "@scaleway/sdk-std": "2.9.5"
36
+ "@scaleway/sdk-std": "2.9.6"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@repo/configs": "^0.1.1",
40
- "@scaleway/sdk-client": "^2.16.0"
40
+ "@scaleway/sdk-client": "^2.17.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "@scaleway/sdk-client": "^2.16.0"
43
+ "@scaleway/sdk-client": "^2.17.0"
44
44
  },
45
45
  "scripts": {
46
46
  "package:check": "pnpm publint",