@aws-sdk/client-invoicing 3.823.0 → 3.825.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.
Files changed (42) hide show
  1. package/README.md +9 -17
  2. package/dist-cjs/Invoicing.js +2 -0
  3. package/dist-cjs/commands/ListInvoiceSummariesCommand.js +26 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/models/models_0.js +9 -1
  6. package/dist-cjs/pagination/ListInvoiceSummariesPaginator.js +7 -0
  7. package/dist-cjs/pagination/index.js +1 -0
  8. package/dist-cjs/protocols/Aws_json1_0.js +73 -1
  9. package/dist-es/Invoicing.js +2 -0
  10. package/dist-es/commands/ListInvoiceSummariesCommand.js +22 -0
  11. package/dist-es/commands/index.js +1 -0
  12. package/dist-es/models/models_0.js +8 -0
  13. package/dist-es/pagination/ListInvoiceSummariesPaginator.js +4 -0
  14. package/dist-es/pagination/index.js +1 -0
  15. package/dist-es/protocols/Aws_json1_0.js +70 -0
  16. package/dist-types/Invoicing.d.ts +8 -17
  17. package/dist-types/InvoicingClient.d.ts +4 -19
  18. package/dist-types/commands/BatchGetInvoiceProfileCommand.d.ts +3 -7
  19. package/dist-types/commands/CreateInvoiceUnitCommand.d.ts +2 -5
  20. package/dist-types/commands/DeleteInvoiceUnitCommand.d.ts +4 -9
  21. package/dist-types/commands/GetInvoiceUnitCommand.d.ts +3 -7
  22. package/dist-types/commands/ListInvoiceSummariesCommand.d.ts +772 -0
  23. package/dist-types/commands/ListInvoiceUnitsCommand.d.ts +2 -5
  24. package/dist-types/commands/ListTagsForResourceCommand.d.ts +4 -9
  25. package/dist-types/commands/TagResourceCommand.d.ts +5 -11
  26. package/dist-types/commands/UntagResourceCommand.d.ts +4 -10
  27. package/dist-types/commands/UpdateInvoiceUnitCommand.d.ts +3 -7
  28. package/dist-types/commands/index.d.ts +1 -0
  29. package/dist-types/index.d.ts +1 -17
  30. package/dist-types/models/models_0.d.ts +481 -217
  31. package/dist-types/pagination/ListInvoiceSummariesPaginator.d.ts +7 -0
  32. package/dist-types/pagination/index.d.ts +1 -0
  33. package/dist-types/protocols/Aws_json1_0.d.ts +9 -0
  34. package/dist-types/ts3.4/Invoicing.d.ts +17 -0
  35. package/dist-types/ts3.4/InvoicingClient.d.ts +6 -0
  36. package/dist-types/ts3.4/commands/ListInvoiceSummariesCommand.d.ts +51 -0
  37. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  38. package/dist-types/ts3.4/models/models_0.d.ts +100 -0
  39. package/dist-types/ts3.4/pagination/ListInvoiceSummariesPaginator.d.ts +11 -0
  40. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  41. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +12 -0
  42. package/package.json +11 -11
package/README.md CHANGED
@@ -6,23 +6,7 @@
6
6
 
7
7
  AWS SDK for JavaScript Invoicing Client for Node.js, Browser and React Native.
8
8
 
9
- <p>
10
- <b>Amazon Web Services Invoice Configuration</b>
11
- </p>
12
- <p>You can use Amazon Web Services Invoice Configuration APIs to programmatically create,
13
- update, delete, get, and list invoice units. You can also programmatically fetch the
14
- information of the invoice receiver. For example, business legal name, address, and invoicing
15
- contacts. </p>
16
- <p>You can use Amazon Web Services Invoice Configuration to receive separate Amazon Web Services invoices based your organizational needs. By using Amazon Web Services Invoice Configuration, you can configure invoice units that are groups of Amazon Web Services accounts that represent your business entities, and receive separate invoices for each business entity. You can also assign a unique member or payer account as the invoice receiver for each invoice unit. As you create new accounts within your Organizations using Amazon Web Services Invoice Configuration APIs, you can automate the creation of new invoice units and subsequently automate the addition of new accounts to your invoice units.</p>
17
- <p>Service endpoint</p>
18
- <p>You can use the following endpoints for Amazon Web Services Invoice Configuration:</p>
19
- <ul>
20
- <li>
21
- <p>
22
- <code>https://invoicing.us-east-1.api.aws</code>
23
- </p>
24
- </li>
25
- </ul>
9
+ <p> <b>Amazon Web Services Invoice Configuration</b> </p> <p>You can use Amazon Web Services Invoice Configuration APIs to programmatically create, update, delete, get, and list invoice units. You can also programmatically fetch the information of the invoice receiver. For example, business legal name, address, and invoicing contacts. </p> <p>You can use Amazon Web Services Invoice Configuration to receive separate Amazon Web Services invoices based your organizational needs. By using Amazon Web Services Invoice Configuration, you can configure invoice units that are groups of Amazon Web Services accounts that represent your business entities, and receive separate invoices for each business entity. You can also assign a unique member or payer account as the invoice receiver for each invoice unit. As you create new accounts within your Organizations using Amazon Web Services Invoice Configuration APIs, you can automate the creation of new invoice units and subsequently automate the addition of new accounts to your invoice units.</p> <p>Service endpoint</p> <p>You can use the following endpoints for Amazon Web Services Invoice Configuration:</p> <ul> <li> <p> <code>https://invoicing.us-east-1.api.aws</code> </p> </li> </ul>
26
10
 
27
11
  ## Installing
28
12
 
@@ -250,6 +234,14 @@ GetInvoiceUnit
250
234
 
251
235
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/invoicing/command/GetInvoiceUnitCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-invoicing/Interface/GetInvoiceUnitCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-invoicing/Interface/GetInvoiceUnitCommandOutput/)
252
236
 
237
+ </details>
238
+ <details>
239
+ <summary>
240
+ ListInvoiceSummaries
241
+ </summary>
242
+
243
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/invoicing/command/ListInvoiceSummariesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-invoicing/Interface/ListInvoiceSummariesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-invoicing/Interface/ListInvoiceSummariesCommandOutput/)
244
+
253
245
  </details>
254
246
  <details>
255
247
  <summary>
@@ -6,6 +6,7 @@ const BatchGetInvoiceProfileCommand_1 = require("./commands/BatchGetInvoiceProfi
6
6
  const CreateInvoiceUnitCommand_1 = require("./commands/CreateInvoiceUnitCommand");
7
7
  const DeleteInvoiceUnitCommand_1 = require("./commands/DeleteInvoiceUnitCommand");
8
8
  const GetInvoiceUnitCommand_1 = require("./commands/GetInvoiceUnitCommand");
9
+ const ListInvoiceSummariesCommand_1 = require("./commands/ListInvoiceSummariesCommand");
9
10
  const ListInvoiceUnitsCommand_1 = require("./commands/ListInvoiceUnitsCommand");
10
11
  const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
11
12
  const TagResourceCommand_1 = require("./commands/TagResourceCommand");
@@ -17,6 +18,7 @@ const commands = {
17
18
  CreateInvoiceUnitCommand: CreateInvoiceUnitCommand_1.CreateInvoiceUnitCommand,
18
19
  DeleteInvoiceUnitCommand: DeleteInvoiceUnitCommand_1.DeleteInvoiceUnitCommand,
19
20
  GetInvoiceUnitCommand: GetInvoiceUnitCommand_1.GetInvoiceUnitCommand,
21
+ ListInvoiceSummariesCommand: ListInvoiceSummariesCommand_1.ListInvoiceSummariesCommand,
20
22
  ListInvoiceUnitsCommand: ListInvoiceUnitsCommand_1.ListInvoiceUnitsCommand,
21
23
  ListTagsForResourceCommand: ListTagsForResourceCommand_1.ListTagsForResourceCommand,
22
24
  TagResourceCommand: TagResourceCommand_1.TagResourceCommand,
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListInvoiceSummariesCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
+ const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
10
+ class ListInvoiceSummariesCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep(EndpointParameters_1.commonParams)
13
+ .m(function (Command, cs, config, o) {
14
+ return [
15
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
16
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
17
+ ];
18
+ })
19
+ .s("Invoicing", "ListInvoiceSummaries", {})
20
+ .n("InvoicingClient", "ListInvoiceSummariesCommand")
21
+ .f(void 0, void 0)
22
+ .ser(Aws_json1_0_1.se_ListInvoiceSummariesCommand)
23
+ .de(Aws_json1_0_1.de_ListInvoiceSummariesCommand)
24
+ .build() {
25
+ }
26
+ exports.ListInvoiceSummariesCommand = ListInvoiceSummariesCommand;
@@ -5,6 +5,7 @@ tslib_1.__exportStar(require("./BatchGetInvoiceProfileCommand"), exports);
5
5
  tslib_1.__exportStar(require("./CreateInvoiceUnitCommand"), exports);
6
6
  tslib_1.__exportStar(require("./DeleteInvoiceUnitCommand"), exports);
7
7
  tslib_1.__exportStar(require("./GetInvoiceUnitCommand"), exports);
8
+ tslib_1.__exportStar(require("./ListInvoiceSummariesCommand"), exports);
8
9
  tslib_1.__exportStar(require("./ListInvoiceUnitsCommand"), exports);
9
10
  tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
10
11
  tslib_1.__exportStar(require("./TagResourceCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BatchGetInvoiceProfileResponseFilterSensitiveLog = exports.InvoiceProfileFilterSensitiveLog = exports.ReceiverAddressFilterSensitiveLog = exports.ServiceQuotaExceededException = exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.AccessDeniedException = void 0;
3
+ exports.BatchGetInvoiceProfileResponseFilterSensitiveLog = exports.InvoiceProfileFilterSensitiveLog = exports.ReceiverAddressFilterSensitiveLog = exports.ServiceQuotaExceededException = exports.ListInvoiceSummariesResourceType = exports.InvoiceType = exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.AccessDeniedException = void 0;
4
4
  const smithy_client_1 = require("@smithy/smithy-client");
5
5
  const InvoicingServiceException_1 = require("./InvoicingServiceException");
6
6
  class AccessDeniedException extends InvoicingServiceException_1.InvoicingServiceException {
@@ -96,6 +96,14 @@ class ValidationException extends InvoicingServiceException_1.InvoicingServiceEx
96
96
  }
97
97
  }
98
98
  exports.ValidationException = ValidationException;
99
+ exports.InvoiceType = {
100
+ CREDIT_MEMO: "CREDIT_MEMO",
101
+ INVOICE: "INVOICE",
102
+ };
103
+ exports.ListInvoiceSummariesResourceType = {
104
+ ACCOUNT_ID: "ACCOUNT_ID",
105
+ INVOICE_ID: "INVOICE_ID",
106
+ };
99
107
  class ServiceQuotaExceededException extends InvoicingServiceException_1.InvoicingServiceException {
100
108
  name = "ServiceQuotaExceededException";
101
109
  $fault = "client";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListInvoiceSummaries = void 0;
4
+ const core_1 = require("@smithy/core");
5
+ const ListInvoiceSummariesCommand_1 = require("../commands/ListInvoiceSummariesCommand");
6
+ const InvoicingClient_1 = require("../InvoicingClient");
7
+ exports.paginateListInvoiceSummaries = (0, core_1.createPaginator)(InvoicingClient_1.InvoicingClient, ListInvoiceSummariesCommand_1.ListInvoiceSummariesCommand, "NextToken", "NextToken", "MaxResults");
@@ -2,4 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./Interfaces"), exports);
5
+ tslib_1.__exportStar(require("./ListInvoiceSummariesPaginator"), exports);
5
6
  tslib_1.__exportStar(require("./ListInvoiceUnitsPaginator"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateInvoiceUnitCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListInvoiceUnitsCommand = exports.de_GetInvoiceUnitCommand = exports.de_DeleteInvoiceUnitCommand = exports.de_CreateInvoiceUnitCommand = exports.de_BatchGetInvoiceProfileCommand = exports.se_UpdateInvoiceUnitCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListInvoiceUnitsCommand = exports.se_GetInvoiceUnitCommand = exports.se_DeleteInvoiceUnitCommand = exports.se_CreateInvoiceUnitCommand = exports.se_BatchGetInvoiceProfileCommand = void 0;
3
+ exports.de_UpdateInvoiceUnitCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListInvoiceUnitsCommand = exports.de_ListInvoiceSummariesCommand = exports.de_GetInvoiceUnitCommand = exports.de_DeleteInvoiceUnitCommand = exports.de_CreateInvoiceUnitCommand = exports.de_BatchGetInvoiceProfileCommand = exports.se_UpdateInvoiceUnitCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListInvoiceUnitsCommand = exports.se_ListInvoiceSummariesCommand = exports.se_GetInvoiceUnitCommand = exports.se_DeleteInvoiceUnitCommand = exports.se_CreateInvoiceUnitCommand = exports.se_BatchGetInvoiceProfileCommand = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
5
  const protocol_http_1 = require("@smithy/protocol-http");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
@@ -34,6 +34,13 @@ const se_GetInvoiceUnitCommand = async (input, context) => {
34
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
35
  };
36
36
  exports.se_GetInvoiceUnitCommand = se_GetInvoiceUnitCommand;
37
+ const se_ListInvoiceSummariesCommand = async (input, context) => {
38
+ const headers = sharedHeaders("ListInvoiceSummaries");
39
+ let body;
40
+ body = JSON.stringify(se_ListInvoiceSummariesRequest(input, context));
41
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
+ };
43
+ exports.se_ListInvoiceSummariesCommand = se_ListInvoiceSummariesCommand;
37
44
  const se_ListInvoiceUnitsCommand = async (input, context) => {
38
45
  const headers = sharedHeaders("ListInvoiceUnits");
39
46
  let body;
@@ -125,6 +132,20 @@ const de_GetInvoiceUnitCommand = async (output, context) => {
125
132
  return response;
126
133
  };
127
134
  exports.de_GetInvoiceUnitCommand = de_GetInvoiceUnitCommand;
135
+ const de_ListInvoiceSummariesCommand = async (output, context) => {
136
+ if (output.statusCode >= 300) {
137
+ return de_CommandError(output, context);
138
+ }
139
+ const data = await (0, core_1.parseJsonBody)(output.body, context);
140
+ let contents = {};
141
+ contents = de_ListInvoiceSummariesResponse(data, context);
142
+ const response = {
143
+ $metadata: deserializeMetadata(output),
144
+ ...contents,
145
+ };
146
+ return response;
147
+ };
148
+ exports.de_ListInvoiceSummariesCommand = de_ListInvoiceSummariesCommand;
128
149
  const de_ListInvoiceUnitsCommand = async (output, context) => {
129
150
  if (output.statusCode >= 300) {
130
151
  return de_CommandError(output, context);
@@ -283,12 +304,33 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
283
304
  });
284
305
  return (0, smithy_client_1.decorateServiceException)(exception, body);
285
306
  };
307
+ const se_DateInterval = (input, context) => {
308
+ return (0, smithy_client_1.take)(input, {
309
+ EndDate: (_) => _.getTime() / 1_000,
310
+ StartDate: (_) => _.getTime() / 1_000,
311
+ });
312
+ };
286
313
  const se_GetInvoiceUnitRequest = (input, context) => {
287
314
  return (0, smithy_client_1.take)(input, {
288
315
  AsOf: (_) => _.getTime() / 1_000,
289
316
  InvoiceUnitArn: [],
290
317
  });
291
318
  };
319
+ const se_InvoiceSummariesFilter = (input, context) => {
320
+ return (0, smithy_client_1.take)(input, {
321
+ BillingPeriod: smithy_client_1._json,
322
+ InvoicingEntity: [],
323
+ TimeInterval: (_) => se_DateInterval(_, context),
324
+ });
325
+ };
326
+ const se_ListInvoiceSummariesRequest = (input, context) => {
327
+ return (0, smithy_client_1.take)(input, {
328
+ Filter: (_) => se_InvoiceSummariesFilter(_, context),
329
+ MaxResults: [],
330
+ NextToken: [],
331
+ Selector: smithy_client_1._json,
332
+ });
333
+ };
292
334
  const se_ListInvoiceUnitsRequest = (input, context) => {
293
335
  return (0, smithy_client_1.take)(input, {
294
336
  AsOf: (_) => _.getTime() / 1_000,
@@ -308,6 +350,30 @@ const de_GetInvoiceUnitResponse = (output, context) => {
308
350
  TaxInheritanceDisabled: smithy_client_1.expectBoolean,
309
351
  });
310
352
  };
353
+ const de_InvoiceSummaries = (output, context) => {
354
+ const retVal = (output || [])
355
+ .filter((e) => e != null)
356
+ .map((entry) => {
357
+ return de_InvoiceSummary(entry, context);
358
+ });
359
+ return retVal;
360
+ };
361
+ const de_InvoiceSummary = (output, context) => {
362
+ return (0, smithy_client_1.take)(output, {
363
+ AccountId: smithy_client_1.expectString,
364
+ BaseCurrencyAmount: smithy_client_1._json,
365
+ BillingPeriod: smithy_client_1._json,
366
+ DueDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
367
+ Entity: smithy_client_1._json,
368
+ InvoiceId: smithy_client_1.expectString,
369
+ InvoiceType: smithy_client_1.expectString,
370
+ IssuedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
371
+ OriginalInvoiceId: smithy_client_1.expectString,
372
+ PaymentCurrencyAmount: smithy_client_1._json,
373
+ PurchaseOrderNumber: smithy_client_1.expectString,
374
+ TaxCurrencyAmount: smithy_client_1._json,
375
+ });
376
+ };
311
377
  const de_InvoiceUnit = (output, context) => {
312
378
  return (0, smithy_client_1.take)(output, {
313
379
  Description: smithy_client_1.expectString,
@@ -327,6 +393,12 @@ const de_InvoiceUnits = (output, context) => {
327
393
  });
328
394
  return retVal;
329
395
  };
396
+ const de_ListInvoiceSummariesResponse = (output, context) => {
397
+ return (0, smithy_client_1.take)(output, {
398
+ InvoiceSummaries: (_) => de_InvoiceSummaries(_, context),
399
+ NextToken: smithy_client_1.expectString,
400
+ });
401
+ };
330
402
  const de_ListInvoiceUnitsResponse = (output, context) => {
331
403
  return (0, smithy_client_1.take)(output, {
332
404
  InvoiceUnits: (_) => de_InvoiceUnits(_, context),
@@ -3,6 +3,7 @@ import { BatchGetInvoiceProfileCommand, } from "./commands/BatchGetInvoiceProfil
3
3
  import { CreateInvoiceUnitCommand, } from "./commands/CreateInvoiceUnitCommand";
4
4
  import { DeleteInvoiceUnitCommand, } from "./commands/DeleteInvoiceUnitCommand";
5
5
  import { GetInvoiceUnitCommand, } from "./commands/GetInvoiceUnitCommand";
6
+ import { ListInvoiceSummariesCommand, } from "./commands/ListInvoiceSummariesCommand";
6
7
  import { ListInvoiceUnitsCommand, } from "./commands/ListInvoiceUnitsCommand";
7
8
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
8
9
  import { TagResourceCommand } from "./commands/TagResourceCommand";
@@ -14,6 +15,7 @@ const commands = {
14
15
  CreateInvoiceUnitCommand,
15
16
  DeleteInvoiceUnitCommand,
16
17
  GetInvoiceUnitCommand,
18
+ ListInvoiceSummariesCommand,
17
19
  ListInvoiceUnitsCommand,
18
20
  ListTagsForResourceCommand,
19
21
  TagResourceCommand,
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_ListInvoiceSummariesCommand, se_ListInvoiceSummariesCommand } from "../protocols/Aws_json1_0";
6
+ export { $Command };
7
+ export class ListInvoiceSummariesCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("Invoicing", "ListInvoiceSummaries", {})
17
+ .n("InvoicingClient", "ListInvoiceSummariesCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_ListInvoiceSummariesCommand)
20
+ .de(de_ListInvoiceSummariesCommand)
21
+ .build() {
22
+ }
@@ -2,6 +2,7 @@ export * from "./BatchGetInvoiceProfileCommand";
2
2
  export * from "./CreateInvoiceUnitCommand";
3
3
  export * from "./DeleteInvoiceUnitCommand";
4
4
  export * from "./GetInvoiceUnitCommand";
5
+ export * from "./ListInvoiceSummariesCommand";
5
6
  export * from "./ListInvoiceUnitsCommand";
6
7
  export * from "./ListTagsForResourceCommand";
7
8
  export * from "./TagResourceCommand";
@@ -88,6 +88,14 @@ export class ValidationException extends __BaseException {
88
88
  this.fieldList = opts.fieldList;
89
89
  }
90
90
  }
91
+ export const InvoiceType = {
92
+ CREDIT_MEMO: "CREDIT_MEMO",
93
+ INVOICE: "INVOICE",
94
+ };
95
+ export const ListInvoiceSummariesResourceType = {
96
+ ACCOUNT_ID: "ACCOUNT_ID",
97
+ INVOICE_ID: "INVOICE_ID",
98
+ };
91
99
  export class ServiceQuotaExceededException extends __BaseException {
92
100
  name = "ServiceQuotaExceededException";
93
101
  $fault = "client";
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { ListInvoiceSummariesCommand, } from "../commands/ListInvoiceSummariesCommand";
3
+ import { InvoicingClient } from "../InvoicingClient";
4
+ export const paginateListInvoiceSummaries = createPaginator(InvoicingClient, ListInvoiceSummariesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,2 +1,3 @@
1
1
  export * from "./Interfaces";
2
+ export * from "./ListInvoiceSummariesPaginator";
2
3
  export * from "./ListInvoiceUnitsPaginator";
@@ -27,6 +27,12 @@ export const se_GetInvoiceUnitCommand = async (input, context) => {
27
27
  body = JSON.stringify(se_GetInvoiceUnitRequest(input, context));
28
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
29
  };
30
+ export const se_ListInvoiceSummariesCommand = async (input, context) => {
31
+ const headers = sharedHeaders("ListInvoiceSummaries");
32
+ let body;
33
+ body = JSON.stringify(se_ListInvoiceSummariesRequest(input, context));
34
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
+ };
30
36
  export const se_ListInvoiceUnitsCommand = async (input, context) => {
31
37
  const headers = sharedHeaders("ListInvoiceUnits");
32
38
  let body;
@@ -109,6 +115,19 @@ export const de_GetInvoiceUnitCommand = async (output, context) => {
109
115
  };
110
116
  return response;
111
117
  };
118
+ export const de_ListInvoiceSummariesCommand = async (output, context) => {
119
+ if (output.statusCode >= 300) {
120
+ return de_CommandError(output, context);
121
+ }
122
+ const data = await parseBody(output.body, context);
123
+ let contents = {};
124
+ contents = de_ListInvoiceSummariesResponse(data, context);
125
+ const response = {
126
+ $metadata: deserializeMetadata(output),
127
+ ...contents,
128
+ };
129
+ return response;
130
+ };
112
131
  export const de_ListInvoiceUnitsCommand = async (output, context) => {
113
132
  if (output.statusCode >= 300) {
114
133
  return de_CommandError(output, context);
@@ -262,12 +281,33 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
262
281
  });
263
282
  return __decorateServiceException(exception, body);
264
283
  };
284
+ const se_DateInterval = (input, context) => {
285
+ return take(input, {
286
+ EndDate: (_) => _.getTime() / 1_000,
287
+ StartDate: (_) => _.getTime() / 1_000,
288
+ });
289
+ };
265
290
  const se_GetInvoiceUnitRequest = (input, context) => {
266
291
  return take(input, {
267
292
  AsOf: (_) => _.getTime() / 1_000,
268
293
  InvoiceUnitArn: [],
269
294
  });
270
295
  };
296
+ const se_InvoiceSummariesFilter = (input, context) => {
297
+ return take(input, {
298
+ BillingPeriod: _json,
299
+ InvoicingEntity: [],
300
+ TimeInterval: (_) => se_DateInterval(_, context),
301
+ });
302
+ };
303
+ const se_ListInvoiceSummariesRequest = (input, context) => {
304
+ return take(input, {
305
+ Filter: (_) => se_InvoiceSummariesFilter(_, context),
306
+ MaxResults: [],
307
+ NextToken: [],
308
+ Selector: _json,
309
+ });
310
+ };
271
311
  const se_ListInvoiceUnitsRequest = (input, context) => {
272
312
  return take(input, {
273
313
  AsOf: (_) => _.getTime() / 1_000,
@@ -287,6 +327,30 @@ const de_GetInvoiceUnitResponse = (output, context) => {
287
327
  TaxInheritanceDisabled: __expectBoolean,
288
328
  });
289
329
  };
330
+ const de_InvoiceSummaries = (output, context) => {
331
+ const retVal = (output || [])
332
+ .filter((e) => e != null)
333
+ .map((entry) => {
334
+ return de_InvoiceSummary(entry, context);
335
+ });
336
+ return retVal;
337
+ };
338
+ const de_InvoiceSummary = (output, context) => {
339
+ return take(output, {
340
+ AccountId: __expectString,
341
+ BaseCurrencyAmount: _json,
342
+ BillingPeriod: _json,
343
+ DueDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
344
+ Entity: _json,
345
+ InvoiceId: __expectString,
346
+ InvoiceType: __expectString,
347
+ IssuedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
348
+ OriginalInvoiceId: __expectString,
349
+ PaymentCurrencyAmount: _json,
350
+ PurchaseOrderNumber: __expectString,
351
+ TaxCurrencyAmount: _json,
352
+ });
353
+ };
290
354
  const de_InvoiceUnit = (output, context) => {
291
355
  return take(output, {
292
356
  Description: __expectString,
@@ -306,6 +370,12 @@ const de_InvoiceUnits = (output, context) => {
306
370
  });
307
371
  return retVal;
308
372
  };
373
+ const de_ListInvoiceSummariesResponse = (output, context) => {
374
+ return take(output, {
375
+ InvoiceSummaries: (_) => de_InvoiceSummaries(_, context),
376
+ NextToken: __expectString,
377
+ });
378
+ };
309
379
  const de_ListInvoiceUnitsResponse = (output, context) => {
310
380
  return take(output, {
311
381
  InvoiceUnits: (_) => de_InvoiceUnits(_, context),
@@ -3,6 +3,7 @@ import { BatchGetInvoiceProfileCommandInput, BatchGetInvoiceProfileCommandOutput
3
3
  import { CreateInvoiceUnitCommandInput, CreateInvoiceUnitCommandOutput } from "./commands/CreateInvoiceUnitCommand";
4
4
  import { DeleteInvoiceUnitCommandInput, DeleteInvoiceUnitCommandOutput } from "./commands/DeleteInvoiceUnitCommand";
5
5
  import { GetInvoiceUnitCommandInput, GetInvoiceUnitCommandOutput } from "./commands/GetInvoiceUnitCommand";
6
+ import { ListInvoiceSummariesCommandInput, ListInvoiceSummariesCommandOutput } from "./commands/ListInvoiceSummariesCommand";
6
7
  import { ListInvoiceUnitsCommandInput, ListInvoiceUnitsCommandOutput } from "./commands/ListInvoiceUnitsCommand";
7
8
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
8
9
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
@@ -34,6 +35,12 @@ export interface Invoicing {
34
35
  getInvoiceUnit(args: GetInvoiceUnitCommandInput, options?: __HttpHandlerOptions): Promise<GetInvoiceUnitCommandOutput>;
35
36
  getInvoiceUnit(args: GetInvoiceUnitCommandInput, cb: (err: any, data?: GetInvoiceUnitCommandOutput) => void): void;
36
37
  getInvoiceUnit(args: GetInvoiceUnitCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetInvoiceUnitCommandOutput) => void): void;
38
+ /**
39
+ * @see {@link ListInvoiceSummariesCommand}
40
+ */
41
+ listInvoiceSummaries(args: ListInvoiceSummariesCommandInput, options?: __HttpHandlerOptions): Promise<ListInvoiceSummariesCommandOutput>;
42
+ listInvoiceSummaries(args: ListInvoiceSummariesCommandInput, cb: (err: any, data?: ListInvoiceSummariesCommandOutput) => void): void;
43
+ listInvoiceSummaries(args: ListInvoiceSummariesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListInvoiceSummariesCommandOutput) => void): void;
37
44
  /**
38
45
  * @see {@link ListInvoiceUnitsCommand}
39
46
  */
@@ -67,23 +74,7 @@ export interface Invoicing {
67
74
  updateInvoiceUnit(args: UpdateInvoiceUnitCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateInvoiceUnitCommandOutput) => void): void;
68
75
  }
69
76
  /**
70
- * <p>
71
- * <b>Amazon Web Services Invoice Configuration</b>
72
- * </p>
73
- * <p>You can use Amazon Web Services Invoice Configuration APIs to programmatically create,
74
- * update, delete, get, and list invoice units. You can also programmatically fetch the
75
- * information of the invoice receiver. For example, business legal name, address, and invoicing
76
- * contacts. </p>
77
- * <p>You can use Amazon Web Services Invoice Configuration to receive separate Amazon Web Services invoices based your organizational needs. By using Amazon Web Services Invoice Configuration, you can configure invoice units that are groups of Amazon Web Services accounts that represent your business entities, and receive separate invoices for each business entity. You can also assign a unique member or payer account as the invoice receiver for each invoice unit. As you create new accounts within your Organizations using Amazon Web Services Invoice Configuration APIs, you can automate the creation of new invoice units and subsequently automate the addition of new accounts to your invoice units.</p>
78
- * <p>Service endpoint</p>
79
- * <p>You can use the following endpoints for Amazon Web Services Invoice Configuration:</p>
80
- * <ul>
81
- * <li>
82
- * <p>
83
- * <code>https://invoicing.us-east-1.api.aws</code>
84
- * </p>
85
- * </li>
86
- * </ul>
77
+ * <p> <b>Amazon Web Services Invoice Configuration</b> </p> <p>You can use Amazon Web Services Invoice Configuration APIs to programmatically create, update, delete, get, and list invoice units. You can also programmatically fetch the information of the invoice receiver. For example, business legal name, address, and invoicing contacts. </p> <p>You can use Amazon Web Services Invoice Configuration to receive separate Amazon Web Services invoices based your organizational needs. By using Amazon Web Services Invoice Configuration, you can configure invoice units that are groups of Amazon Web Services accounts that represent your business entities, and receive separate invoices for each business entity. You can also assign a unique member or payer account as the invoice receiver for each invoice unit. As you create new accounts within your Organizations using Amazon Web Services Invoice Configuration APIs, you can automate the creation of new invoice units and subsequently automate the addition of new accounts to your invoice units.</p> <p>Service endpoint</p> <p>You can use the following endpoints for Amazon Web Services Invoice Configuration:</p> <ul> <li> <p> <code>https://invoicing.us-east-1.api.aws</code> </p> </li> </ul>
87
78
  * @public
88
79
  */
89
80
  export declare class Invoicing extends InvoicingClient implements Invoicing {
@@ -11,6 +11,7 @@ import { BatchGetInvoiceProfileCommandInput, BatchGetInvoiceProfileCommandOutput
11
11
  import { CreateInvoiceUnitCommandInput, CreateInvoiceUnitCommandOutput } from "./commands/CreateInvoiceUnitCommand";
12
12
  import { DeleteInvoiceUnitCommandInput, DeleteInvoiceUnitCommandOutput } from "./commands/DeleteInvoiceUnitCommand";
13
13
  import { GetInvoiceUnitCommandInput, GetInvoiceUnitCommandOutput } from "./commands/GetInvoiceUnitCommand";
14
+ import { ListInvoiceSummariesCommandInput, ListInvoiceSummariesCommandOutput } from "./commands/ListInvoiceSummariesCommand";
14
15
  import { ListInvoiceUnitsCommandInput, ListInvoiceUnitsCommandOutput } from "./commands/ListInvoiceUnitsCommand";
15
16
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
16
17
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
@@ -22,11 +23,11 @@ export { __Client };
22
23
  /**
23
24
  * @public
24
25
  */
25
- export type ServiceInputTypes = BatchGetInvoiceProfileCommandInput | CreateInvoiceUnitCommandInput | DeleteInvoiceUnitCommandInput | GetInvoiceUnitCommandInput | ListInvoiceUnitsCommandInput | ListTagsForResourceCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateInvoiceUnitCommandInput;
26
+ export type ServiceInputTypes = BatchGetInvoiceProfileCommandInput | CreateInvoiceUnitCommandInput | DeleteInvoiceUnitCommandInput | GetInvoiceUnitCommandInput | ListInvoiceSummariesCommandInput | ListInvoiceUnitsCommandInput | ListTagsForResourceCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateInvoiceUnitCommandInput;
26
27
  /**
27
28
  * @public
28
29
  */
29
- export type ServiceOutputTypes = BatchGetInvoiceProfileCommandOutput | CreateInvoiceUnitCommandOutput | DeleteInvoiceUnitCommandOutput | GetInvoiceUnitCommandOutput | ListInvoiceUnitsCommandOutput | ListTagsForResourceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateInvoiceUnitCommandOutput;
30
+ export type ServiceOutputTypes = BatchGetInvoiceProfileCommandOutput | CreateInvoiceUnitCommandOutput | DeleteInvoiceUnitCommandOutput | GetInvoiceUnitCommandOutput | ListInvoiceSummariesCommandOutput | ListInvoiceUnitsCommandOutput | ListTagsForResourceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateInvoiceUnitCommandOutput;
30
31
  /**
31
32
  * @public
32
33
  */
@@ -178,23 +179,7 @@ export type InvoicingClientResolvedConfigType = __SmithyResolvedConfiguration<__
178
179
  export interface InvoicingClientResolvedConfig extends InvoicingClientResolvedConfigType {
179
180
  }
180
181
  /**
181
- * <p>
182
- * <b>Amazon Web Services Invoice Configuration</b>
183
- * </p>
184
- * <p>You can use Amazon Web Services Invoice Configuration APIs to programmatically create,
185
- * update, delete, get, and list invoice units. You can also programmatically fetch the
186
- * information of the invoice receiver. For example, business legal name, address, and invoicing
187
- * contacts. </p>
188
- * <p>You can use Amazon Web Services Invoice Configuration to receive separate Amazon Web Services invoices based your organizational needs. By using Amazon Web Services Invoice Configuration, you can configure invoice units that are groups of Amazon Web Services accounts that represent your business entities, and receive separate invoices for each business entity. You can also assign a unique member or payer account as the invoice receiver for each invoice unit. As you create new accounts within your Organizations using Amazon Web Services Invoice Configuration APIs, you can automate the creation of new invoice units and subsequently automate the addition of new accounts to your invoice units.</p>
189
- * <p>Service endpoint</p>
190
- * <p>You can use the following endpoints for Amazon Web Services Invoice Configuration:</p>
191
- * <ul>
192
- * <li>
193
- * <p>
194
- * <code>https://invoicing.us-east-1.api.aws</code>
195
- * </p>
196
- * </li>
197
- * </ul>
182
+ * <p> <b>Amazon Web Services Invoice Configuration</b> </p> <p>You can use Amazon Web Services Invoice Configuration APIs to programmatically create, update, delete, get, and list invoice units. You can also programmatically fetch the information of the invoice receiver. For example, business legal name, address, and invoicing contacts. </p> <p>You can use Amazon Web Services Invoice Configuration to receive separate Amazon Web Services invoices based your organizational needs. By using Amazon Web Services Invoice Configuration, you can configure invoice units that are groups of Amazon Web Services accounts that represent your business entities, and receive separate invoices for each business entity. You can also assign a unique member or payer account as the invoice receiver for each invoice unit. As you create new accounts within your Organizations using Amazon Web Services Invoice Configuration APIs, you can automate the creation of new invoice units and subsequently automate the addition of new accounts to your invoice units.</p> <p>Service endpoint</p> <p>You can use the following endpoints for Amazon Web Services Invoice Configuration:</p> <ul> <li> <p> <code>https://invoicing.us-east-1.api.aws</code> </p> </li> </ul>
198
183
  * @public
199
184
  */
200
185
  export declare class InvoicingClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, InvoicingClientResolvedConfig> {
@@ -76,20 +76,16 @@ declare const BatchGetInvoiceProfileCommand_base: {
76
76
  * <p>You don't have sufficient access to perform this action.</p>
77
77
  *
78
78
  * @throws {@link InternalServerException} (server fault)
79
- * <p>The processing request failed because of an unknown error, exception, or failure.
80
- * </p>
79
+ * <p>The processing request failed because of an unknown error, exception, or failure. </p>
81
80
  *
82
81
  * @throws {@link ResourceNotFoundException} (client fault)
83
- * <p>The resource could not be found.
84
- * </p>
82
+ * <p>The resource could not be found. </p>
85
83
  *
86
84
  * @throws {@link ThrottlingException} (client fault)
87
85
  * <p>The request was denied due to request throttling.</p>
88
86
  *
89
87
  * @throws {@link ValidationException} (client fault)
90
- * <p>
91
- * The input fails to satisfy the constraints specified by an Amazon Web Services service.
92
- * </p>
88
+ * <p> The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
93
89
  *
94
90
  * @throws {@link InvoicingServiceException}
95
91
  * <p>Base exception class for all service exceptions from Invoicing service.</p>
@@ -69,16 +69,13 @@ declare const CreateInvoiceUnitCommand_base: {
69
69
  * <p>You don't have sufficient access to perform this action.</p>
70
70
  *
71
71
  * @throws {@link InternalServerException} (server fault)
72
- * <p>The processing request failed because of an unknown error, exception, or failure.
73
- * </p>
72
+ * <p>The processing request failed because of an unknown error, exception, or failure. </p>
74
73
  *
75
74
  * @throws {@link ThrottlingException} (client fault)
76
75
  * <p>The request was denied due to request throttling.</p>
77
76
  *
78
77
  * @throws {@link ValidationException} (client fault)
79
- * <p>
80
- * The input fails to satisfy the constraints specified by an Amazon Web Services service.
81
- * </p>
78
+ * <p> The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
82
79
  *
83
80
  * @throws {@link InvoicingServiceException}
84
81
  * <p>Base exception class for all service exceptions from Invoicing service.</p>
@@ -27,8 +27,7 @@ declare const DeleteInvoiceUnitCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * <p>This deletes an invoice unit with the provided invoice unit ARN.
31
- * </p>
30
+ * <p>This deletes an invoice unit with the provided invoice unit ARN. </p>
32
31
  * @example
33
32
  * Use a bare-bones client and the command you need to make an API call.
34
33
  * ```javascript
@@ -56,20 +55,16 @@ declare const DeleteInvoiceUnitCommand_base: {
56
55
  * <p>You don't have sufficient access to perform this action.</p>
57
56
  *
58
57
  * @throws {@link InternalServerException} (server fault)
59
- * <p>The processing request failed because of an unknown error, exception, or failure.
60
- * </p>
58
+ * <p>The processing request failed because of an unknown error, exception, or failure. </p>
61
59
  *
62
60
  * @throws {@link ResourceNotFoundException} (client fault)
63
- * <p>The resource could not be found.
64
- * </p>
61
+ * <p>The resource could not be found. </p>
65
62
  *
66
63
  * @throws {@link ThrottlingException} (client fault)
67
64
  * <p>The request was denied due to request throttling.</p>
68
65
  *
69
66
  * @throws {@link ValidationException} (client fault)
70
- * <p>
71
- * The input fails to satisfy the constraints specified by an Amazon Web Services service.
72
- * </p>
67
+ * <p> The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
73
68
  *
74
69
  * @throws {@link InvoicingServiceException}
75
70
  * <p>Base exception class for all service exceptions from Invoicing service.</p>