diff --git a/clients/client-taxsettings/README.md b/clients/client-taxsettings/README.md index 6e73eed37509c..c1ed84a0aefeb 100644 --- a/clients/client-taxsettings/README.md +++ b/clients/client-taxsettings/README.md @@ -34,16 +34,16 @@ using your favorite package manager: The AWS SDK is modulized by clients and commands. To send a request, you only need to import the `TaxSettingsClient` and -the commands you need, for example `ListTaxRegistrationsCommand`: +the commands you need, for example `ListTaxExemptionsCommand`: ```js // ES5 example -const { TaxSettingsClient, ListTaxRegistrationsCommand } = require("@aws-sdk/client-taxsettings"); +const { TaxSettingsClient, ListTaxExemptionsCommand } = require("@aws-sdk/client-taxsettings"); ``` ```ts // ES6+ example -import { TaxSettingsClient, ListTaxRegistrationsCommand } from "@aws-sdk/client-taxsettings"; +import { TaxSettingsClient, ListTaxExemptionsCommand } from "@aws-sdk/client-taxsettings"; ``` ### Usage @@ -62,7 +62,7 @@ const client = new TaxSettingsClient({ region: "REGION" }); const params = { /** input parameters */ }; -const command = new ListTaxRegistrationsCommand(params); +const command = new ListTaxExemptionsCommand(params); ``` #### Async/await @@ -141,7 +141,7 @@ const client = new AWS.TaxSettings({ region: "REGION" }); // async/await. try { - const data = await client.listTaxRegistrations(params); + const data = await client.listTaxExemptions(params); // process data. } catch (error) { // error handling. @@ -149,7 +149,7 @@ try { // Promises. client - .listTaxRegistrations(params) + .listTaxExemptions(params) .then((data) => { // process data. }) @@ -158,7 +158,7 @@ client }); // callbacks. -client.listTaxRegistrations(params, (err, data) => { +client.listTaxExemptions(params, (err, data) => { // process err and data. }); ``` @@ -221,6 +221,14 @@ BatchDeleteTaxRegistration [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/taxsettings/command/BatchDeleteTaxRegistrationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/BatchDeleteTaxRegistrationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/BatchDeleteTaxRegistrationCommandOutput/) + +
+ +BatchGetTaxExemptions + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/taxsettings/command/BatchGetTaxExemptionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/BatchGetTaxExemptionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/BatchGetTaxExemptionsCommandOutput/) +
@@ -245,6 +253,22 @@ DeleteTaxRegistration [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/taxsettings/command/DeleteTaxRegistrationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/DeleteTaxRegistrationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/DeleteTaxRegistrationCommandOutput/) +
+
+ +GetTaxExemptionTypes + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/taxsettings/command/GetTaxExemptionTypesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/GetTaxExemptionTypesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/GetTaxExemptionTypesCommandOutput/) + +
+
+ +GetTaxInheritance + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/taxsettings/command/GetTaxInheritanceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/GetTaxInheritanceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/GetTaxInheritanceCommandOutput/) +
@@ -269,6 +293,14 @@ ListSupplementalTaxRegistrations [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/taxsettings/command/ListSupplementalTaxRegistrationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/ListSupplementalTaxRegistrationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/ListSupplementalTaxRegistrationsCommandOutput/) +
+
+ +ListTaxExemptions + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/taxsettings/command/ListTaxExemptionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/ListTaxExemptionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/ListTaxExemptionsCommandOutput/) +
@@ -285,6 +317,22 @@ PutSupplementalTaxRegistration [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/taxsettings/command/PutSupplementalTaxRegistrationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/PutSupplementalTaxRegistrationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/PutSupplementalTaxRegistrationCommandOutput/) +
+
+ +PutTaxExemption + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/taxsettings/command/PutTaxExemptionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/PutTaxExemptionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/PutTaxExemptionCommandOutput/) + +
+
+ +PutTaxInheritance + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/taxsettings/command/PutTaxInheritanceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/PutTaxInheritanceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-taxsettings/Interface/PutTaxInheritanceCommandOutput/) +
diff --git a/clients/client-taxsettings/src/TaxSettings.ts b/clients/client-taxsettings/src/TaxSettings.ts index 5f2887a826299..991c9fd7fffc5 100644 --- a/clients/client-taxsettings/src/TaxSettings.ts +++ b/clients/client-taxsettings/src/TaxSettings.ts @@ -7,6 +7,11 @@ import { BatchDeleteTaxRegistrationCommandInput, BatchDeleteTaxRegistrationCommandOutput, } from "./commands/BatchDeleteTaxRegistrationCommand"; +import { + BatchGetTaxExemptionsCommand, + BatchGetTaxExemptionsCommandInput, + BatchGetTaxExemptionsCommandOutput, +} from "./commands/BatchGetTaxExemptionsCommand"; import { BatchPutTaxRegistrationCommand, BatchPutTaxRegistrationCommandInput, @@ -22,6 +27,16 @@ import { DeleteTaxRegistrationCommandInput, DeleteTaxRegistrationCommandOutput, } from "./commands/DeleteTaxRegistrationCommand"; +import { + GetTaxExemptionTypesCommand, + GetTaxExemptionTypesCommandInput, + GetTaxExemptionTypesCommandOutput, +} from "./commands/GetTaxExemptionTypesCommand"; +import { + GetTaxInheritanceCommand, + GetTaxInheritanceCommandInput, + GetTaxInheritanceCommandOutput, +} from "./commands/GetTaxInheritanceCommand"; import { GetTaxRegistrationCommand, GetTaxRegistrationCommandInput, @@ -37,6 +52,11 @@ import { ListSupplementalTaxRegistrationsCommandInput, ListSupplementalTaxRegistrationsCommandOutput, } from "./commands/ListSupplementalTaxRegistrationsCommand"; +import { + ListTaxExemptionsCommand, + ListTaxExemptionsCommandInput, + ListTaxExemptionsCommandOutput, +} from "./commands/ListTaxExemptionsCommand"; import { ListTaxRegistrationsCommand, ListTaxRegistrationsCommandInput, @@ -47,6 +67,16 @@ import { PutSupplementalTaxRegistrationCommandInput, PutSupplementalTaxRegistrationCommandOutput, } from "./commands/PutSupplementalTaxRegistrationCommand"; +import { + PutTaxExemptionCommand, + PutTaxExemptionCommandInput, + PutTaxExemptionCommandOutput, +} from "./commands/PutTaxExemptionCommand"; +import { + PutTaxInheritanceCommand, + PutTaxInheritanceCommandInput, + PutTaxInheritanceCommandOutput, +} from "./commands/PutTaxInheritanceCommand"; import { PutTaxRegistrationCommand, PutTaxRegistrationCommandInput, @@ -56,14 +86,20 @@ import { TaxSettingsClient, TaxSettingsClientConfig } from "./TaxSettingsClient" const commands = { BatchDeleteTaxRegistrationCommand, + BatchGetTaxExemptionsCommand, BatchPutTaxRegistrationCommand, DeleteSupplementalTaxRegistrationCommand, DeleteTaxRegistrationCommand, + GetTaxExemptionTypesCommand, + GetTaxInheritanceCommand, GetTaxRegistrationCommand, GetTaxRegistrationDocumentCommand, ListSupplementalTaxRegistrationsCommand, + ListTaxExemptionsCommand, ListTaxRegistrationsCommand, PutSupplementalTaxRegistrationCommand, + PutTaxExemptionCommand, + PutTaxInheritanceCommand, PutTaxRegistrationCommand, }; @@ -85,6 +121,23 @@ export interface TaxSettings { cb: (err: any, data?: BatchDeleteTaxRegistrationCommandOutput) => void ): void; + /** + * @see {@link BatchGetTaxExemptionsCommand} + */ + batchGetTaxExemptions( + args: BatchGetTaxExemptionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + batchGetTaxExemptions( + args: BatchGetTaxExemptionsCommandInput, + cb: (err: any, data?: BatchGetTaxExemptionsCommandOutput) => void + ): void; + batchGetTaxExemptions( + args: BatchGetTaxExemptionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: BatchGetTaxExemptionsCommandOutput) => void + ): void; + /** * @see {@link BatchPutTaxRegistrationCommand} */ @@ -137,6 +190,42 @@ export interface TaxSettings { cb: (err: any, data?: DeleteTaxRegistrationCommandOutput) => void ): void; + /** + * @see {@link GetTaxExemptionTypesCommand} + */ + getTaxExemptionTypes(): Promise; + getTaxExemptionTypes( + args: GetTaxExemptionTypesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getTaxExemptionTypes( + args: GetTaxExemptionTypesCommandInput, + cb: (err: any, data?: GetTaxExemptionTypesCommandOutput) => void + ): void; + getTaxExemptionTypes( + args: GetTaxExemptionTypesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetTaxExemptionTypesCommandOutput) => void + ): void; + + /** + * @see {@link GetTaxInheritanceCommand} + */ + getTaxInheritance(): Promise; + getTaxInheritance( + args: GetTaxInheritanceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getTaxInheritance( + args: GetTaxInheritanceCommandInput, + cb: (err: any, data?: GetTaxInheritanceCommandOutput) => void + ): void; + getTaxInheritance( + args: GetTaxInheritanceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetTaxInheritanceCommandOutput) => void + ): void; + /** * @see {@link GetTaxRegistrationCommand} */ @@ -190,6 +279,24 @@ export interface TaxSettings { cb: (err: any, data?: ListSupplementalTaxRegistrationsCommandOutput) => void ): void; + /** + * @see {@link ListTaxExemptionsCommand} + */ + listTaxExemptions(): Promise; + listTaxExemptions( + args: ListTaxExemptionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listTaxExemptions( + args: ListTaxExemptionsCommandInput, + cb: (err: any, data?: ListTaxExemptionsCommandOutput) => void + ): void; + listTaxExemptions( + args: ListTaxExemptionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTaxExemptionsCommandOutput) => void + ): void; + /** * @see {@link ListTaxRegistrationsCommand} */ @@ -225,6 +332,38 @@ export interface TaxSettings { cb: (err: any, data?: PutSupplementalTaxRegistrationCommandOutput) => void ): void; + /** + * @see {@link PutTaxExemptionCommand} + */ + putTaxExemption( + args: PutTaxExemptionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + putTaxExemption(args: PutTaxExemptionCommandInput, cb: (err: any, data?: PutTaxExemptionCommandOutput) => void): void; + putTaxExemption( + args: PutTaxExemptionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutTaxExemptionCommandOutput) => void + ): void; + + /** + * @see {@link PutTaxInheritanceCommand} + */ + putTaxInheritance(): Promise; + putTaxInheritance( + args: PutTaxInheritanceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + putTaxInheritance( + args: PutTaxInheritanceCommandInput, + cb: (err: any, data?: PutTaxInheritanceCommandOutput) => void + ): void; + putTaxInheritance( + args: PutTaxInheritanceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutTaxInheritanceCommandOutput) => void + ): void; + /** * @see {@link PutTaxRegistrationCommand} */ diff --git a/clients/client-taxsettings/src/TaxSettingsClient.ts b/clients/client-taxsettings/src/TaxSettingsClient.ts index b28fc186e84fc..8e29f1b12eedb 100644 --- a/clients/client-taxsettings/src/TaxSettingsClient.ts +++ b/clients/client-taxsettings/src/TaxSettingsClient.ts @@ -57,6 +57,10 @@ import { BatchDeleteTaxRegistrationCommandInput, BatchDeleteTaxRegistrationCommandOutput, } from "./commands/BatchDeleteTaxRegistrationCommand"; +import { + BatchGetTaxExemptionsCommandInput, + BatchGetTaxExemptionsCommandOutput, +} from "./commands/BatchGetTaxExemptionsCommand"; import { BatchPutTaxRegistrationCommandInput, BatchPutTaxRegistrationCommandOutput, @@ -69,6 +73,11 @@ import { DeleteTaxRegistrationCommandInput, DeleteTaxRegistrationCommandOutput, } from "./commands/DeleteTaxRegistrationCommand"; +import { + GetTaxExemptionTypesCommandInput, + GetTaxExemptionTypesCommandOutput, +} from "./commands/GetTaxExemptionTypesCommand"; +import { GetTaxInheritanceCommandInput, GetTaxInheritanceCommandOutput } from "./commands/GetTaxInheritanceCommand"; import { GetTaxRegistrationCommandInput, GetTaxRegistrationCommandOutput } from "./commands/GetTaxRegistrationCommand"; import { GetTaxRegistrationDocumentCommandInput, @@ -78,6 +87,7 @@ import { ListSupplementalTaxRegistrationsCommandInput, ListSupplementalTaxRegistrationsCommandOutput, } from "./commands/ListSupplementalTaxRegistrationsCommand"; +import { ListTaxExemptionsCommandInput, ListTaxExemptionsCommandOutput } from "./commands/ListTaxExemptionsCommand"; import { ListTaxRegistrationsCommandInput, ListTaxRegistrationsCommandOutput, @@ -86,6 +96,8 @@ import { PutSupplementalTaxRegistrationCommandInput, PutSupplementalTaxRegistrationCommandOutput, } from "./commands/PutSupplementalTaxRegistrationCommand"; +import { PutTaxExemptionCommandInput, PutTaxExemptionCommandOutput } from "./commands/PutTaxExemptionCommand"; +import { PutTaxInheritanceCommandInput, PutTaxInheritanceCommandOutput } from "./commands/PutTaxInheritanceCommand"; import { PutTaxRegistrationCommandInput, PutTaxRegistrationCommandOutput } from "./commands/PutTaxRegistrationCommand"; import { ClientInputEndpointParameters, @@ -103,14 +115,20 @@ export { __Client }; */ export type ServiceInputTypes = | BatchDeleteTaxRegistrationCommandInput + | BatchGetTaxExemptionsCommandInput | BatchPutTaxRegistrationCommandInput | DeleteSupplementalTaxRegistrationCommandInput | DeleteTaxRegistrationCommandInput + | GetTaxExemptionTypesCommandInput + | GetTaxInheritanceCommandInput | GetTaxRegistrationCommandInput | GetTaxRegistrationDocumentCommandInput | ListSupplementalTaxRegistrationsCommandInput + | ListTaxExemptionsCommandInput | ListTaxRegistrationsCommandInput | PutSupplementalTaxRegistrationCommandInput + | PutTaxExemptionCommandInput + | PutTaxInheritanceCommandInput | PutTaxRegistrationCommandInput; /** @@ -118,14 +136,20 @@ export type ServiceInputTypes = */ export type ServiceOutputTypes = | BatchDeleteTaxRegistrationCommandOutput + | BatchGetTaxExemptionsCommandOutput | BatchPutTaxRegistrationCommandOutput | DeleteSupplementalTaxRegistrationCommandOutput | DeleteTaxRegistrationCommandOutput + | GetTaxExemptionTypesCommandOutput + | GetTaxInheritanceCommandOutput | GetTaxRegistrationCommandOutput | GetTaxRegistrationDocumentCommandOutput | ListSupplementalTaxRegistrationsCommandOutput + | ListTaxExemptionsCommandOutput | ListTaxRegistrationsCommandOutput | PutSupplementalTaxRegistrationCommandOutput + | PutTaxExemptionCommandOutput + | PutTaxInheritanceCommandOutput | PutTaxRegistrationCommandOutput; /** diff --git a/clients/client-taxsettings/src/commands/BatchGetTaxExemptionsCommand.ts b/clients/client-taxsettings/src/commands/BatchGetTaxExemptionsCommand.ts new file mode 100644 index 0000000000000..110d6004cdb9d --- /dev/null +++ b/clients/client-taxsettings/src/commands/BatchGetTaxExemptionsCommand.ts @@ -0,0 +1,136 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { BatchGetTaxExemptionsRequest, BatchGetTaxExemptionsResponse } from "../models/models_0"; +import { de_BatchGetTaxExemptionsCommand, se_BatchGetTaxExemptionsCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, TaxSettingsClientResolvedConfig } from "../TaxSettingsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link BatchGetTaxExemptionsCommand}. + */ +export interface BatchGetTaxExemptionsCommandInput extends BatchGetTaxExemptionsRequest {} +/** + * @public + * + * The output of {@link BatchGetTaxExemptionsCommand}. + */ +export interface BatchGetTaxExemptionsCommandOutput extends BatchGetTaxExemptionsResponse, __MetadataBearer {} + +/** + *

Get the active tax exemptions for a given list of accounts. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { TaxSettingsClient, BatchGetTaxExemptionsCommand } from "@aws-sdk/client-taxsettings"; // ES Modules import + * // const { TaxSettingsClient, BatchGetTaxExemptionsCommand } = require("@aws-sdk/client-taxsettings"); // CommonJS import + * const client = new TaxSettingsClient(config); + * const input = { // BatchGetTaxExemptionsRequest + * accountIds: [ // AccountIds // required + * "STRING_VALUE", + * ], + * }; + * const command = new BatchGetTaxExemptionsCommand(input); + * const response = await client.send(command); + * // { // BatchGetTaxExemptionsResponse + * // taxExemptionDetailsMap: { // TaxExemptionDetailsMap + * // "": { // TaxExemptionDetails + * // taxExemptions: [ // TaxExemptions + * // { // TaxExemption + * // authority: { // Authority + * // country: "STRING_VALUE", // required + * // state: "STRING_VALUE", + * // }, + * // taxExemptionType: { // TaxExemptionType + * // displayName: "STRING_VALUE", + * // description: "STRING_VALUE", + * // applicableJurisdictions: [ // Authorities + * // { + * // country: "STRING_VALUE", // required + * // state: "STRING_VALUE", + * // }, + * // ], + * // }, + * // effectiveDate: new Date("TIMESTAMP"), + * // expirationDate: new Date("TIMESTAMP"), + * // systemEffectiveDate: new Date("TIMESTAMP"), + * // status: "None" || "Valid" || "Expired" || "Pending", + * // }, + * // ], + * // heritageObtainedDetails: true || false, + * // heritageObtainedParentEntity: "STRING_VALUE", + * // heritageObtainedReason: "STRING_VALUE", + * // }, + * // }, + * // failedAccounts: [ // AccountIds + * // "STRING_VALUE", + * // ], + * // }; + * + * ``` + * + * @param BatchGetTaxExemptionsCommandInput - {@link BatchGetTaxExemptionsCommandInput} + * @returns {@link BatchGetTaxExemptionsCommandOutput} + * @see {@link BatchGetTaxExemptionsCommandInput} for command's `input` shape. + * @see {@link BatchGetTaxExemptionsCommandOutput} for command's `response` shape. + * @see {@link TaxSettingsClientResolvedConfig | config} for TaxSettingsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

The exception thrown when an unexpected error occurs when processing a request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The exception thrown when the input doesn't have a resource associated to it.

+ * + * @throws {@link ValidationException} (client fault) + *

The exception when the input doesn't pass validation for at least one of the input + * parameters.

+ * + * @throws {@link TaxSettingsServiceException} + *

Base exception class for all service exceptions from TaxSettings service.

+ * + * @public + */ +export class BatchGetTaxExemptionsCommand extends $Command + .classBuilder< + BatchGetTaxExemptionsCommandInput, + BatchGetTaxExemptionsCommandOutput, + TaxSettingsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: TaxSettingsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("TaxSettings", "BatchGetTaxExemptions", {}) + .n("TaxSettingsClient", "BatchGetTaxExemptionsCommand") + .f(void 0, void 0) + .ser(se_BatchGetTaxExemptionsCommand) + .de(de_BatchGetTaxExemptionsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: BatchGetTaxExemptionsRequest; + output: BatchGetTaxExemptionsResponse; + }; + sdk: { + input: BatchGetTaxExemptionsCommandInput; + output: BatchGetTaxExemptionsCommandOutput; + }; + }; +} diff --git a/clients/client-taxsettings/src/commands/BatchPutTaxRegistrationCommand.ts b/clients/client-taxsettings/src/commands/BatchPutTaxRegistrationCommand.ts index eac46f78919f7..1c4084addd7ec 100644 --- a/clients/client-taxsettings/src/commands/BatchPutTaxRegistrationCommand.ts +++ b/clients/client-taxsettings/src/commands/BatchPutTaxRegistrationCommand.ts @@ -310,6 +310,10 @@ export interface BatchPutTaxRegistrationCommandOutput extends BatchPutTaxRegistr * bucket: "STRING_VALUE", // required * key: "STRING_VALUE", // required * }, + * file: { // TaxRegistrationDocFile + * fileName: "STRING_VALUE", // required + * fileContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required + * }, * }, * ], * }, diff --git a/clients/client-taxsettings/src/commands/GetTaxExemptionTypesCommand.ts b/clients/client-taxsettings/src/commands/GetTaxExemptionTypesCommand.ts new file mode 100644 index 0000000000000..da0c9d884a664 --- /dev/null +++ b/clients/client-taxsettings/src/commands/GetTaxExemptionTypesCommand.ts @@ -0,0 +1,112 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetTaxExemptionTypesRequest, GetTaxExemptionTypesResponse } from "../models/models_0"; +import { de_GetTaxExemptionTypesCommand, se_GetTaxExemptionTypesCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, TaxSettingsClientResolvedConfig } from "../TaxSettingsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetTaxExemptionTypesCommand}. + */ +export interface GetTaxExemptionTypesCommandInput extends GetTaxExemptionTypesRequest {} +/** + * @public + * + * The output of {@link GetTaxExemptionTypesCommand}. + */ +export interface GetTaxExemptionTypesCommandOutput extends GetTaxExemptionTypesResponse, __MetadataBearer {} + +/** + *

Get supported tax exemption types. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { TaxSettingsClient, GetTaxExemptionTypesCommand } from "@aws-sdk/client-taxsettings"; // ES Modules import + * // const { TaxSettingsClient, GetTaxExemptionTypesCommand } = require("@aws-sdk/client-taxsettings"); // CommonJS import + * const client = new TaxSettingsClient(config); + * const input = {}; + * const command = new GetTaxExemptionTypesCommand(input); + * const response = await client.send(command); + * // { // GetTaxExemptionTypesResponse + * // taxExemptionTypes: [ // TaxExemptionTypes + * // { // TaxExemptionType + * // displayName: "STRING_VALUE", + * // description: "STRING_VALUE", + * // applicableJurisdictions: [ // Authorities + * // { // Authority + * // country: "STRING_VALUE", // required + * // state: "STRING_VALUE", + * // }, + * // ], + * // }, + * // ], + * // }; + * + * ``` + * + * @param GetTaxExemptionTypesCommandInput - {@link GetTaxExemptionTypesCommandInput} + * @returns {@link GetTaxExemptionTypesCommandOutput} + * @see {@link GetTaxExemptionTypesCommandInput} for command's `input` shape. + * @see {@link GetTaxExemptionTypesCommandOutput} for command's `response` shape. + * @see {@link TaxSettingsClientResolvedConfig | config} for TaxSettingsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

The exception thrown when an unexpected error occurs when processing a request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The exception thrown when the input doesn't have a resource associated to it.

+ * + * @throws {@link ValidationException} (client fault) + *

The exception when the input doesn't pass validation for at least one of the input + * parameters.

+ * + * @throws {@link TaxSettingsServiceException} + *

Base exception class for all service exceptions from TaxSettings service.

+ * + * @public + */ +export class GetTaxExemptionTypesCommand extends $Command + .classBuilder< + GetTaxExemptionTypesCommandInput, + GetTaxExemptionTypesCommandOutput, + TaxSettingsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: TaxSettingsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("TaxSettings", "GetTaxExemptionTypes", {}) + .n("TaxSettingsClient", "GetTaxExemptionTypesCommand") + .f(void 0, void 0) + .ser(se_GetTaxExemptionTypesCommand) + .de(de_GetTaxExemptionTypesCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: {}; + output: GetTaxExemptionTypesResponse; + }; + sdk: { + input: GetTaxExemptionTypesCommandInput; + output: GetTaxExemptionTypesCommandOutput; + }; + }; +} diff --git a/clients/client-taxsettings/src/commands/GetTaxInheritanceCommand.ts b/clients/client-taxsettings/src/commands/GetTaxInheritanceCommand.ts new file mode 100644 index 0000000000000..479d4433bd27f --- /dev/null +++ b/clients/client-taxsettings/src/commands/GetTaxInheritanceCommand.ts @@ -0,0 +1,101 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetTaxInheritanceRequest, GetTaxInheritanceResponse } from "../models/models_0"; +import { de_GetTaxInheritanceCommand, se_GetTaxInheritanceCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, TaxSettingsClientResolvedConfig } from "../TaxSettingsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetTaxInheritanceCommand}. + */ +export interface GetTaxInheritanceCommandInput extends GetTaxInheritanceRequest {} +/** + * @public + * + * The output of {@link GetTaxInheritanceCommand}. + */ +export interface GetTaxInheritanceCommandOutput extends GetTaxInheritanceResponse, __MetadataBearer {} + +/** + *

The get account tax inheritance status. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { TaxSettingsClient, GetTaxInheritanceCommand } from "@aws-sdk/client-taxsettings"; // ES Modules import + * // const { TaxSettingsClient, GetTaxInheritanceCommand } = require("@aws-sdk/client-taxsettings"); // CommonJS import + * const client = new TaxSettingsClient(config); + * const input = {}; + * const command = new GetTaxInheritanceCommand(input); + * const response = await client.send(command); + * // { // GetTaxInheritanceResponse + * // heritageStatus: "OptIn" || "OptOut", + * // }; + * + * ``` + * + * @param GetTaxInheritanceCommandInput - {@link GetTaxInheritanceCommandInput} + * @returns {@link GetTaxInheritanceCommandOutput} + * @see {@link GetTaxInheritanceCommandInput} for command's `input` shape. + * @see {@link GetTaxInheritanceCommandOutput} for command's `response` shape. + * @see {@link TaxSettingsClientResolvedConfig | config} for TaxSettingsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

The exception thrown when an unexpected error occurs when processing a request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The exception thrown when the input doesn't have a resource associated to it.

+ * + * @throws {@link ValidationException} (client fault) + *

The exception when the input doesn't pass validation for at least one of the input + * parameters.

+ * + * @throws {@link TaxSettingsServiceException} + *

Base exception class for all service exceptions from TaxSettings service.

+ * + * @public + */ +export class GetTaxInheritanceCommand extends $Command + .classBuilder< + GetTaxInheritanceCommandInput, + GetTaxInheritanceCommandOutput, + TaxSettingsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: TaxSettingsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("TaxSettings", "GetTaxInheritance", {}) + .n("TaxSettingsClient", "GetTaxInheritanceCommand") + .f(void 0, void 0) + .ser(se_GetTaxInheritanceCommand) + .de(de_GetTaxInheritanceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: {}; + output: GetTaxInheritanceResponse; + }; + sdk: { + input: GetTaxInheritanceCommandInput; + output: GetTaxInheritanceCommandOutput; + }; + }; +} diff --git a/clients/client-taxsettings/src/commands/GetTaxRegistrationDocumentCommand.ts b/clients/client-taxsettings/src/commands/GetTaxRegistrationDocumentCommand.ts index f523fbf3229d0..9c88ac73e135d 100644 --- a/clients/client-taxsettings/src/commands/GetTaxRegistrationDocumentCommand.ts +++ b/clients/client-taxsettings/src/commands/GetTaxRegistrationDocumentCommand.ts @@ -50,6 +50,7 @@ export interface GetTaxRegistrationDocumentCommandOutput extends GetTaxRegistrat * const response = await client.send(command); * // { // GetTaxRegistrationDocumentResponse * // destinationFilePath: "STRING_VALUE", + * // presignedS3Url: "STRING_VALUE", * // }; * * ``` diff --git a/clients/client-taxsettings/src/commands/ListTaxExemptionsCommand.ts b/clients/client-taxsettings/src/commands/ListTaxExemptionsCommand.ts new file mode 100644 index 0000000000000..ad552066939d8 --- /dev/null +++ b/clients/client-taxsettings/src/commands/ListTaxExemptionsCommand.ts @@ -0,0 +1,133 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListTaxExemptionsRequest, ListTaxExemptionsResponse } from "../models/models_0"; +import { de_ListTaxExemptionsCommand, se_ListTaxExemptionsCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, TaxSettingsClientResolvedConfig } from "../TaxSettingsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListTaxExemptionsCommand}. + */ +export interface ListTaxExemptionsCommandInput extends ListTaxExemptionsRequest {} +/** + * @public + * + * The output of {@link ListTaxExemptionsCommand}. + */ +export interface ListTaxExemptionsCommandOutput extends ListTaxExemptionsResponse, __MetadataBearer {} + +/** + *

Retrieves the tax exemption of accounts listed in a consolidated billing family. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { TaxSettingsClient, ListTaxExemptionsCommand } from "@aws-sdk/client-taxsettings"; // ES Modules import + * // const { TaxSettingsClient, ListTaxExemptionsCommand } = require("@aws-sdk/client-taxsettings"); // CommonJS import + * const client = new TaxSettingsClient(config); + * const input = { // ListTaxExemptionsRequest + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * }; + * const command = new ListTaxExemptionsCommand(input); + * const response = await client.send(command); + * // { // ListTaxExemptionsResponse + * // nextToken: "STRING_VALUE", + * // taxExemptionDetailsMap: { // TaxExemptionDetailsMap + * // "": { // TaxExemptionDetails + * // taxExemptions: [ // TaxExemptions + * // { // TaxExemption + * // authority: { // Authority + * // country: "STRING_VALUE", // required + * // state: "STRING_VALUE", + * // }, + * // taxExemptionType: { // TaxExemptionType + * // displayName: "STRING_VALUE", + * // description: "STRING_VALUE", + * // applicableJurisdictions: [ // Authorities + * // { + * // country: "STRING_VALUE", // required + * // state: "STRING_VALUE", + * // }, + * // ], + * // }, + * // effectiveDate: new Date("TIMESTAMP"), + * // expirationDate: new Date("TIMESTAMP"), + * // systemEffectiveDate: new Date("TIMESTAMP"), + * // status: "None" || "Valid" || "Expired" || "Pending", + * // }, + * // ], + * // heritageObtainedDetails: true || false, + * // heritageObtainedParentEntity: "STRING_VALUE", + * // heritageObtainedReason: "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param ListTaxExemptionsCommandInput - {@link ListTaxExemptionsCommandInput} + * @returns {@link ListTaxExemptionsCommandOutput} + * @see {@link ListTaxExemptionsCommandInput} for command's `input` shape. + * @see {@link ListTaxExemptionsCommandOutput} for command's `response` shape. + * @see {@link TaxSettingsClientResolvedConfig | config} for TaxSettingsClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

The exception thrown when an unexpected error occurs when processing a request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The exception thrown when the input doesn't have a resource associated to it.

+ * + * @throws {@link ValidationException} (client fault) + *

The exception when the input doesn't pass validation for at least one of the input + * parameters.

+ * + * @throws {@link TaxSettingsServiceException} + *

Base exception class for all service exceptions from TaxSettings service.

+ * + * @public + */ +export class ListTaxExemptionsCommand extends $Command + .classBuilder< + ListTaxExemptionsCommandInput, + ListTaxExemptionsCommandOutput, + TaxSettingsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: TaxSettingsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("TaxSettings", "ListTaxExemptions", {}) + .n("TaxSettingsClient", "ListTaxExemptionsCommand") + .f(void 0, void 0) + .ser(se_ListTaxExemptionsCommand) + .de(de_ListTaxExemptionsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListTaxExemptionsRequest; + output: ListTaxExemptionsResponse; + }; + sdk: { + input: ListTaxExemptionsCommandInput; + output: ListTaxExemptionsCommandOutput; + }; + }; +} diff --git a/clients/client-taxsettings/src/commands/PutTaxExemptionCommand.ts b/clients/client-taxsettings/src/commands/PutTaxExemptionCommand.ts new file mode 100644 index 0000000000000..acef5ddb0d531 --- /dev/null +++ b/clients/client-taxsettings/src/commands/PutTaxExemptionCommand.ts @@ -0,0 +1,126 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { PutTaxExemptionRequest, PutTaxExemptionResponse } from "../models/models_0"; +import { de_PutTaxExemptionCommand, se_PutTaxExemptionCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, TaxSettingsClientResolvedConfig } from "../TaxSettingsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link PutTaxExemptionCommand}. + */ +export interface PutTaxExemptionCommandInput extends PutTaxExemptionRequest {} +/** + * @public + * + * The output of {@link PutTaxExemptionCommand}. + */ +export interface PutTaxExemptionCommandOutput extends PutTaxExemptionResponse, __MetadataBearer {} + +/** + *

Adds the tax exemption for a single account or all accounts listed in a consolidated billing family. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { TaxSettingsClient, PutTaxExemptionCommand } from "@aws-sdk/client-taxsettings"; // ES Modules import + * // const { TaxSettingsClient, PutTaxExemptionCommand } = require("@aws-sdk/client-taxsettings"); // CommonJS import + * const client = new TaxSettingsClient(config); + * const input = { // PutTaxExemptionRequest + * accountIds: [ // AccountIds // required + * "STRING_VALUE", + * ], + * authority: { // Authority + * country: "STRING_VALUE", // required + * state: "STRING_VALUE", + * }, + * exemptionType: "STRING_VALUE", // required + * exemptionCertificate: { // ExemptionCertificate + * documentName: "STRING_VALUE", // required + * documentFile: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required + * }, + * }; + * const command = new PutTaxExemptionCommand(input); + * const response = await client.send(command); + * // { // PutTaxExemptionResponse + * // caseId: "STRING_VALUE", + * // }; + * + * ``` + * + * @param PutTaxExemptionCommandInput - {@link PutTaxExemptionCommandInput} + * @returns {@link PutTaxExemptionCommandOutput} + * @see {@link PutTaxExemptionCommandInput} for command's `input` shape. + * @see {@link PutTaxExemptionCommandOutput} for command's `response` shape. + * @see {@link TaxSettingsClientResolvedConfig | config} for TaxSettingsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The access is denied for the Amazon Web Services Support API. + *

+ * + * @throws {@link AttachmentUploadException} (client fault) + *

Failed to upload the tax exemption document to Amazon Web Services Support case. + *

+ * + * @throws {@link CaseCreationLimitExceededException} (client fault) + *

You've exceeded the Amazon Web Services Support case creation limit for your account. + *

+ * + * @throws {@link InternalServerException} (server fault) + *

The exception thrown when an unexpected error occurs when processing a request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The exception thrown when the input doesn't have a resource associated to it.

+ * + * @throws {@link ValidationException} (client fault) + *

The exception when the input doesn't pass validation for at least one of the input + * parameters.

+ * + * @throws {@link TaxSettingsServiceException} + *

Base exception class for all service exceptions from TaxSettings service.

+ * + * @public + */ +export class PutTaxExemptionCommand extends $Command + .classBuilder< + PutTaxExemptionCommandInput, + PutTaxExemptionCommandOutput, + TaxSettingsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: TaxSettingsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("TaxSettings", "PutTaxExemption", {}) + .n("TaxSettingsClient", "PutTaxExemptionCommand") + .f(void 0, void 0) + .ser(se_PutTaxExemptionCommand) + .de(de_PutTaxExemptionCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: PutTaxExemptionRequest; + output: PutTaxExemptionResponse; + }; + sdk: { + input: PutTaxExemptionCommandInput; + output: PutTaxExemptionCommandOutput; + }; + }; +} diff --git a/clients/client-taxsettings/src/commands/PutTaxInheritanceCommand.ts b/clients/client-taxsettings/src/commands/PutTaxInheritanceCommand.ts new file mode 100644 index 0000000000000..ba9807a6b5dfb --- /dev/null +++ b/clients/client-taxsettings/src/commands/PutTaxInheritanceCommand.ts @@ -0,0 +1,104 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { PutTaxInheritanceRequest, PutTaxInheritanceResponse } from "../models/models_0"; +import { de_PutTaxInheritanceCommand, se_PutTaxInheritanceCommand } from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, TaxSettingsClientResolvedConfig } from "../TaxSettingsClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link PutTaxInheritanceCommand}. + */ +export interface PutTaxInheritanceCommandInput extends PutTaxInheritanceRequest {} +/** + * @public + * + * The output of {@link PutTaxInheritanceCommand}. + */ +export interface PutTaxInheritanceCommandOutput extends PutTaxInheritanceResponse, __MetadataBearer {} + +/** + *

The updated tax inheritance status. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { TaxSettingsClient, PutTaxInheritanceCommand } from "@aws-sdk/client-taxsettings"; // ES Modules import + * // const { TaxSettingsClient, PutTaxInheritanceCommand } = require("@aws-sdk/client-taxsettings"); // CommonJS import + * const client = new TaxSettingsClient(config); + * const input = { // PutTaxInheritanceRequest + * heritageStatus: "OptIn" || "OptOut", + * }; + * const command = new PutTaxInheritanceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param PutTaxInheritanceCommandInput - {@link PutTaxInheritanceCommandInput} + * @returns {@link PutTaxInheritanceCommandOutput} + * @see {@link PutTaxInheritanceCommandInput} for command's `input` shape. + * @see {@link PutTaxInheritanceCommandOutput} for command's `response` shape. + * @see {@link TaxSettingsClientResolvedConfig | config} for TaxSettingsClient's `config` shape. + * + * @throws {@link ConflictException} (client fault) + *

The exception when the input is creating conflict with the given state.

+ * + * @throws {@link InternalServerException} (server fault) + *

The exception thrown when an unexpected error occurs when processing a request.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The exception thrown when the input doesn't have a resource associated to it.

+ * + * @throws {@link ValidationException} (client fault) + *

The exception when the input doesn't pass validation for at least one of the input + * parameters.

+ * + * @throws {@link TaxSettingsServiceException} + *

Base exception class for all service exceptions from TaxSettings service.

+ * + * @public + */ +export class PutTaxInheritanceCommand extends $Command + .classBuilder< + PutTaxInheritanceCommandInput, + PutTaxInheritanceCommandOutput, + TaxSettingsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: TaxSettingsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("TaxSettings", "PutTaxInheritance", {}) + .n("TaxSettingsClient", "PutTaxInheritanceCommand") + .f(void 0, void 0) + .ser(se_PutTaxInheritanceCommand) + .de(de_PutTaxInheritanceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: PutTaxInheritanceRequest; + output: {}; + }; + sdk: { + input: PutTaxInheritanceCommandInput; + output: PutTaxInheritanceCommandOutput; + }; + }; +} diff --git a/clients/client-taxsettings/src/commands/PutTaxRegistrationCommand.ts b/clients/client-taxsettings/src/commands/PutTaxRegistrationCommand.ts index 4305cea3e92c2..c967745ff9f33 100644 --- a/clients/client-taxsettings/src/commands/PutTaxRegistrationCommand.ts +++ b/clients/client-taxsettings/src/commands/PutTaxRegistrationCommand.ts @@ -306,6 +306,10 @@ export interface PutTaxRegistrationCommandOutput extends PutTaxRegistrationRespo * bucket: "STRING_VALUE", // required * key: "STRING_VALUE", // required * }, + * file: { // TaxRegistrationDocFile + * fileName: "STRING_VALUE", // required + * fileContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required + * }, * }, * ], * }, diff --git a/clients/client-taxsettings/src/commands/index.ts b/clients/client-taxsettings/src/commands/index.ts index e367309417d0d..b34bf6344b33e 100644 --- a/clients/client-taxsettings/src/commands/index.ts +++ b/clients/client-taxsettings/src/commands/index.ts @@ -1,11 +1,17 @@ // smithy-typescript generated code export * from "./BatchDeleteTaxRegistrationCommand"; +export * from "./BatchGetTaxExemptionsCommand"; export * from "./BatchPutTaxRegistrationCommand"; export * from "./DeleteSupplementalTaxRegistrationCommand"; export * from "./DeleteTaxRegistrationCommand"; +export * from "./GetTaxExemptionTypesCommand"; +export * from "./GetTaxInheritanceCommand"; export * from "./GetTaxRegistrationCommand"; export * from "./GetTaxRegistrationDocumentCommand"; export * from "./ListSupplementalTaxRegistrationsCommand"; +export * from "./ListTaxExemptionsCommand"; export * from "./ListTaxRegistrationsCommand"; export * from "./PutSupplementalTaxRegistrationCommand"; +export * from "./PutTaxExemptionCommand"; +export * from "./PutTaxInheritanceCommand"; export * from "./PutTaxRegistrationCommand"; diff --git a/clients/client-taxsettings/src/models/models_0.ts b/clients/client-taxsettings/src/models/models_0.ts index 0f2fcdaba7497..58c34a097909a 100644 --- a/clients/client-taxsettings/src/models/models_0.ts +++ b/clients/client-taxsettings/src/models/models_0.ts @@ -3,6 +3,27 @@ import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from " import { TaxSettingsServiceException as __BaseException } from "./TaxSettingsServiceException"; +/** + *

The access is denied for the Amazon Web Services Support API. + *

+ * @public + */ +export class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException" = "AccessDeniedException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + } +} + /** *

The details of the address associated with the TRN information.

* @public @@ -1063,6 +1084,50 @@ export interface AdditionalInfoRequest { saudiArabiaAdditionalInfo?: SaudiArabiaAdditionalInfo | undefined; } +/** + *

Failed to upload the tax exemption document to Amazon Web Services Support case. + *

+ * @public + */ +export class AttachmentUploadException extends __BaseException { + readonly name: "AttachmentUploadException" = "AttachmentUploadException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AttachmentUploadException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AttachmentUploadException.prototype); + } +} + +/** + *

The address domain associate with the tax information. + *

+ * @public + */ +export interface Authority { + /** + *

+ * The country code for the country that the address is in. + *

+ * @public + */ + country: string | undefined; + + /** + *

+ * The state that the address is located. + *

+ * @public + */ + state?: string | undefined; +} + /** * @public */ @@ -1231,6 +1296,215 @@ export class ValidationException extends __BaseException { } } +/** + * @public + */ +export interface BatchGetTaxExemptionsRequest { + /** + *

+ * List of unique account identifiers. + *

+ * @public + */ + accountIds: string[] | undefined; +} + +/** + * @public + * @enum + */ +export const EntityExemptionAccountStatus = { + Expired: "Expired", + None: "None", + Pending: "Pending", + Valid: "Valid", +} as const; + +/** + * @public + */ +export type EntityExemptionAccountStatus = + (typeof EntityExemptionAccountStatus)[keyof typeof EntityExemptionAccountStatus]; + +/** + *

The tax exemption type. + *

+ * @public + */ +export interface TaxExemptionType { + /** + *

The tax exemption's type display name. + *

+ * @public + */ + displayName?: string | undefined; + + /** + *

The tax exemption's type description. + *

+ * @public + */ + description?: string | undefined; + + /** + *

The tax exemption's applicable jurisdictions. + *

+ * @public + */ + applicableJurisdictions?: Authority[] | undefined; +} + +/** + *

The tax exemption. + *

+ * @public + */ +export interface TaxExemption { + /** + *

The address domain associate with tax exemption. + *

+ * @public + */ + authority: Authority | undefined; + + /** + *

The tax exemption type. + *

+ * @public + */ + taxExemptionType: TaxExemptionType | undefined; + + /** + *

The tax exemption effective date. + *

+ * @public + */ + effectiveDate?: Date | undefined; + + /** + *

The tax exemption expiration date. + *

+ * @public + */ + expirationDate?: Date | undefined; + + /** + *

The tax exemption recording time in the TaxSettings system. + *

+ * @public + */ + systemEffectiveDate?: Date | undefined; + + /** + *

The tax exemption status. + *

+ * @public + */ + status?: EntityExemptionAccountStatus | undefined; +} + +/** + *

The tax exemption details. + *

+ * @public + */ +export interface TaxExemptionDetails { + /** + *

Tax exemptions. + *

+ * @public + */ + taxExemptions?: TaxExemption[] | undefined; + + /** + *

The indicator if the tax exemption is inherited from the consolidated billing family management account. + *

+ * @public + */ + heritageObtainedDetails?: boolean | undefined; + + /** + *

The consolidated billing family management account the tax exemption inherited from. + *

+ * @public + */ + heritageObtainedParentEntity?: string | undefined; + + /** + *

The reason of the heritage inheritance. + *

+ * @public + */ + heritageObtainedReason?: string | undefined; +} + +/** + * @public + */ +export interface BatchGetTaxExemptionsResponse { + /** + *

The tax exemption details map of accountId and tax exemption details. + *

+ * @public + */ + taxExemptionDetailsMap?: Record | undefined; + + /** + *

The list of accounts that failed to get tax exemptions. + *

+ * @public + */ + failedAccounts?: string[] | undefined; +} + +/** + *

The exception thrown when the input doesn't have a resource associated to it.

+ * @public + */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + /** + *

404

+ * @public + */ + errorCode: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.errorCode = opts.errorCode; + } +} + +/** + *

The tax registration document. + *

+ * @public + */ +export interface TaxRegistrationDocFile { + /** + *

The tax registration document name. + *

+ * @public + */ + fileName: string | undefined; + + /** + *

The tax registration document content. + *

+ * @public + */ + fileContent: Uint8Array | undefined; +} + /** *

The Amazon S3 bucket in your account where your tax document is located.

* @public @@ -1258,7 +1532,14 @@ export interface TaxRegistrationDocument { *

The Amazon S3 location where your tax registration document is stored.

* @public */ - s3Location: SourceS3Location | undefined; + s3Location?: SourceS3Location | undefined; + + /** + *

The tax registration document. + *

+ * @public + */ + file?: TaxRegistrationDocFile | undefined; } /** @@ -1418,6 +1699,27 @@ export interface BatchPutTaxRegistrationResponse { errors: BatchPutTaxRegistrationError[] | undefined; } +/** + *

You've exceeded the Amazon Web Services Support case creation limit for your account. + *

+ * @public + */ +export class CaseCreationLimitExceededException extends __BaseException { + readonly name: "CaseCreationLimitExceededException" = "CaseCreationLimitExceededException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "CaseCreationLimitExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, CaseCreationLimitExceededException.prototype); + } +} + /** * @public */ @@ -1436,33 +1738,6 @@ export interface DeleteSupplementalTaxRegistrationRequest { */ export interface DeleteSupplementalTaxRegistrationResponse {} -/** - *

The exception thrown when the input doesn't have a resource associated to it.

- * @public - */ -export class ResourceNotFoundException extends __BaseException { - readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; - readonly $fault: "client" = "client"; - /** - *

404

- * @public - */ - errorCode: string | undefined; - - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ResourceNotFoundException.prototype); - this.errorCode = opts.errorCode; - } -} - /** * @public */ @@ -1499,6 +1774,75 @@ export interface DestinationS3Location { prefix?: string | undefined; } +/** + *

The exemption certificate. + *

+ * @public + */ +export interface ExemptionCertificate { + /** + *

The exemption certificate file name. + *

+ * @public + */ + documentName: string | undefined; + + /** + *

The exemption certificate file content. + *

+ * @public + */ + documentFile: Uint8Array | undefined; +} + +/** + * @public + */ +export interface GetTaxExemptionTypesRequest {} + +/** + * @public + */ +export interface GetTaxExemptionTypesResponse { + /** + *

The supported types of tax exemptions. + *

+ * @public + */ + taxExemptionTypes?: TaxExemptionType[] | undefined; +} + +/** + * @public + */ +export interface GetTaxInheritanceRequest {} + +/** + * @public + * @enum + */ +export const HeritageStatus = { + OptIn: "OptIn", + OptOut: "OptOut", +} as const; + +/** + * @public + */ +export type HeritageStatus = (typeof HeritageStatus)[keyof typeof HeritageStatus]; + +/** + * @public + */ +export interface GetTaxInheritanceResponse { + /** + *

The tax inheritance status. + *

+ * @public + */ + heritageStatus?: HeritageStatus | undefined; +} + /** * @public */ @@ -1592,7 +1936,7 @@ export interface GetTaxRegistrationDocumentRequest { *

The Amazon S3 bucket that you specify to download your tax documents to.

* @public */ - destinationS3Location: DestinationS3Location | undefined; + destinationS3Location?: DestinationS3Location | undefined; /** *

The metadata for your tax document.

@@ -1610,6 +1954,13 @@ export interface GetTaxRegistrationDocumentResponse { * @public */ destinationFilePath?: string | undefined; + + /** + *

The Amazon S3 presigned URL of the tax registration document. + *

+ * @public + */ + presignedS3Url?: string | undefined; } /** @@ -1722,6 +2073,42 @@ export interface ListSupplementalTaxRegistrationsResponse { nextToken?: string | undefined; } +/** + * @public + */ +export interface ListTaxExemptionsRequest { + /** + *

The number of results you want in one response. + *

+ * @public + */ + maxResults?: number | undefined; + + /** + *

The token to retrieve the next set of results.

+ * @public + */ + nextToken?: string | undefined; +} + +/** + * @public + */ +export interface ListTaxExemptionsResponse { + /** + *

The token to retrieve the next set of results.

+ * @public + */ + nextToken?: string | undefined; + + /** + *

The tax exemption details map of accountId and tax exemption details. + *

+ * @public + */ + taxExemptionDetailsMap?: Record | undefined; +} + /** * @public */ @@ -1829,6 +2216,69 @@ export interface PutSupplementalTaxRegistrationResponse { status: TaxRegistrationStatus | undefined; } +/** + * @public + */ +export interface PutTaxExemptionRequest { + /** + *

+ * The list of unique account identifiers. + *

+ * @public + */ + accountIds: string[] | undefined; + + /** + *

The address domain associate with the tax information. + *

+ * @public + */ + authority: Authority | undefined; + + /** + *

The exemption type. + *

+ * @public + */ + exemptionType: string | undefined; + + /** + *

The exemption certificate. + *

+ * @public + */ + exemptionCertificate: ExemptionCertificate | undefined; +} + +/** + * @public + */ +export interface PutTaxExemptionResponse { + /** + *

The customer support case ID. + *

+ * @public + */ + caseId?: string | undefined; +} + +/** + * @public + */ +export interface PutTaxInheritanceRequest { + /** + *

The tax inheritance status. + *

+ * @public + */ + heritageStatus?: HeritageStatus | undefined; +} + +/** + * @public + */ +export interface PutTaxInheritanceResponse {} + /** * @public */ diff --git a/clients/client-taxsettings/src/pagination/ListTaxExemptionsPaginator.ts b/clients/client-taxsettings/src/pagination/ListTaxExemptionsPaginator.ts new file mode 100644 index 0000000000000..917b52f3584c0 --- /dev/null +++ b/clients/client-taxsettings/src/pagination/ListTaxExemptionsPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + ListTaxExemptionsCommand, + ListTaxExemptionsCommandInput, + ListTaxExemptionsCommandOutput, +} from "../commands/ListTaxExemptionsCommand"; +import { TaxSettingsClient } from "../TaxSettingsClient"; +import { TaxSettingsPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListTaxExemptions: ( + config: TaxSettingsPaginationConfiguration, + input: ListTaxExemptionsCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + TaxSettingsPaginationConfiguration, + ListTaxExemptionsCommandInput, + ListTaxExemptionsCommandOutput +>(TaxSettingsClient, ListTaxExemptionsCommand, "nextToken", "nextToken", "maxResults"); diff --git a/clients/client-taxsettings/src/pagination/index.ts b/clients/client-taxsettings/src/pagination/index.ts index 7c58f64fee759..ab430edd7080f 100644 --- a/clients/client-taxsettings/src/pagination/index.ts +++ b/clients/client-taxsettings/src/pagination/index.ts @@ -1,4 +1,5 @@ // smithy-typescript generated code export * from "./Interfaces"; export * from "./ListSupplementalTaxRegistrationsPaginator"; +export * from "./ListTaxExemptionsPaginator"; export * from "./ListTaxRegistrationsPaginator"; diff --git a/clients/client-taxsettings/src/protocols/Aws_restJson1.ts b/clients/client-taxsettings/src/protocols/Aws_restJson1.ts index 1b399987a86e5..0cafa4f632b11 100644 --- a/clients/client-taxsettings/src/protocols/Aws_restJson1.ts +++ b/clients/client-taxsettings/src/protocols/Aws_restJson1.ts @@ -6,10 +6,13 @@ import { _json, collectBody, decorateServiceException as __decorateServiceException, + expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, + expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, + parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client"; @@ -23,6 +26,10 @@ import { BatchDeleteTaxRegistrationCommandInput, BatchDeleteTaxRegistrationCommandOutput, } from "../commands/BatchDeleteTaxRegistrationCommand"; +import { + BatchGetTaxExemptionsCommandInput, + BatchGetTaxExemptionsCommandOutput, +} from "../commands/BatchGetTaxExemptionsCommand"; import { BatchPutTaxRegistrationCommandInput, BatchPutTaxRegistrationCommandOutput, @@ -35,6 +42,11 @@ import { DeleteTaxRegistrationCommandInput, DeleteTaxRegistrationCommandOutput, } from "../commands/DeleteTaxRegistrationCommand"; +import { + GetTaxExemptionTypesCommandInput, + GetTaxExemptionTypesCommandOutput, +} from "../commands/GetTaxExemptionTypesCommand"; +import { GetTaxInheritanceCommandInput, GetTaxInheritanceCommandOutput } from "../commands/GetTaxInheritanceCommand"; import { GetTaxRegistrationCommandInput, GetTaxRegistrationCommandOutput } from "../commands/GetTaxRegistrationCommand"; import { GetTaxRegistrationDocumentCommandInput, @@ -44,6 +56,7 @@ import { ListSupplementalTaxRegistrationsCommandInput, ListSupplementalTaxRegistrationsCommandOutput, } from "../commands/ListSupplementalTaxRegistrationsCommand"; +import { ListTaxExemptionsCommandInput, ListTaxExemptionsCommandOutput } from "../commands/ListTaxExemptionsCommand"; import { ListTaxRegistrationsCommandInput, ListTaxRegistrationsCommandOutput, @@ -52,14 +65,21 @@ import { PutSupplementalTaxRegistrationCommandInput, PutSupplementalTaxRegistrationCommandOutput, } from "../commands/PutSupplementalTaxRegistrationCommand"; +import { PutTaxExemptionCommandInput, PutTaxExemptionCommandOutput } from "../commands/PutTaxExemptionCommand"; +import { PutTaxInheritanceCommandInput, PutTaxInheritanceCommandOutput } from "../commands/PutTaxInheritanceCommand"; import { PutTaxRegistrationCommandInput, PutTaxRegistrationCommandOutput } from "../commands/PutTaxRegistrationCommand"; import { + AccessDeniedException, AdditionalInfoRequest, Address, + AttachmentUploadException, + Authority, CanadaAdditionalInfo, + CaseCreationLimitExceededException, ConflictException, DestinationS3Location, EstoniaAdditionalInfo, + ExemptionCertificate, GeorgiaAdditionalInfo, InternalServerException, IsraelAdditionalInfo, @@ -76,6 +96,9 @@ import { SpainAdditionalInfo, SupplementalTaxRegistrationEntry, TaxDocumentMetadata, + TaxExemption, + TaxExemptionDetails, + TaxRegistrationDocFile, TaxRegistrationDocument, TaxRegistrationEntry, TurkeyAdditionalInfo, @@ -107,6 +130,28 @@ export const se_BatchDeleteTaxRegistrationCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1BatchGetTaxExemptionsCommand + */ +export const se_BatchGetTaxExemptionsCommand = async ( + input: BatchGetTaxExemptionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/BatchGetTaxExemptions"); + let body: any; + body = JSON.stringify( + take(input, { + accountIds: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1BatchPutTaxRegistrationCommand */ @@ -123,7 +168,7 @@ export const se_BatchPutTaxRegistrationCommand = async ( body = JSON.stringify( take(input, { accountIds: (_) => _json(_), - taxRegistrationEntry: (_) => _json(_), + taxRegistrationEntry: (_) => se_TaxRegistrationEntry(_, context), }) ); b.m("POST").h(headers).b(body); @@ -174,6 +219,36 @@ export const se_DeleteTaxRegistrationCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1GetTaxExemptionTypesCommand + */ +export const se_GetTaxExemptionTypesCommand = async ( + input: GetTaxExemptionTypesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/GetTaxExemptionTypes"); + let body: any; + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1GetTaxInheritanceCommand + */ +export const se_GetTaxInheritanceCommand = async ( + input: GetTaxInheritanceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/GetTaxInheritance"); + let body: any; + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1GetTaxRegistrationCommand */ @@ -242,6 +317,29 @@ export const se_ListSupplementalTaxRegistrationsCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1ListTaxExemptionsCommand + */ +export const se_ListTaxExemptionsCommand = async ( + input: ListTaxExemptionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/ListTaxExemptions"); + let body: any; + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1ListTaxRegistrationsCommand */ @@ -287,6 +385,53 @@ export const se_PutSupplementalTaxRegistrationCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1PutTaxExemptionCommand + */ +export const se_PutTaxExemptionCommand = async ( + input: PutTaxExemptionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/PutTaxExemption"); + let body: any; + body = JSON.stringify( + take(input, { + accountIds: (_) => _json(_), + authority: (_) => _json(_), + exemptionCertificate: (_) => se_ExemptionCertificate(_, context), + exemptionType: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1PutTaxInheritanceCommand + */ +export const se_PutTaxInheritanceCommand = async ( + input: PutTaxInheritanceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/PutTaxInheritance"); + let body: any; + body = JSON.stringify( + take(input, { + heritageStatus: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1PutTaxRegistrationCommand */ @@ -303,7 +448,7 @@ export const se_PutTaxRegistrationCommand = async ( body = JSON.stringify( take(input, { accountId: [], - taxRegistrationEntry: (_) => _json(_), + taxRegistrationEntry: (_) => se_TaxRegistrationEntry(_, context), }) ); b.m("POST").h(headers).b(body); @@ -331,6 +476,28 @@ export const de_BatchDeleteTaxRegistrationCommand = async ( return contents; }; +/** + * deserializeAws_restJson1BatchGetTaxExemptionsCommand + */ +export const de_BatchGetTaxExemptionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + failedAccounts: _json, + taxExemptionDetailsMap: (_) => de_TaxExemptionDetailsMap(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1BatchPutTaxRegistrationCommand */ @@ -387,6 +554,48 @@ export const de_DeleteTaxRegistrationCommand = async ( return contents; }; +/** + * deserializeAws_restJson1GetTaxExemptionTypesCommand + */ +export const de_GetTaxExemptionTypesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + taxExemptionTypes: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetTaxInheritanceCommand + */ +export const de_GetTaxInheritanceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + heritageStatus: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1GetTaxRegistrationCommand */ @@ -424,6 +633,7 @@ export const de_GetTaxRegistrationDocumentCommand = async ( const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { destinationFilePath: __expectString, + presignedS3Url: __expectString, }); Object.assign(contents, doc); return contents; @@ -451,6 +661,28 @@ export const de_ListSupplementalTaxRegistrationsCommand = async ( return contents; }; +/** + * deserializeAws_restJson1ListTaxExemptionsCommand + */ +export const de_ListTaxExemptionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + taxExemptionDetailsMap: (_) => de_TaxExemptionDetailsMap(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1ListTaxRegistrationsCommand */ @@ -495,6 +727,44 @@ export const de_PutSupplementalTaxRegistrationCommand = async ( return contents; }; +/** + * deserializeAws_restJson1PutTaxExemptionCommand + */ +export const de_PutTaxExemptionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + caseId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1PutTaxInheritanceCommand + */ +export const de_PutTaxInheritanceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + /** * deserializeAws_restJson1PutTaxRegistrationCommand */ @@ -538,6 +808,15 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "ResourceNotFoundException": case "com.amazonaws.taxsettings#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "AccessDeniedException": + case "com.amazonaws.taxsettings#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "AttachmentUploadException": + case "com.amazonaws.taxsettings#AttachmentUploadException": + throw await de_AttachmentUploadExceptionRes(parsedOutput, context); + case "CaseCreationLimitExceededException": + case "com.amazonaws.taxsettings#CaseCreationLimitExceededException": + throw await de_CaseCreationLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; return throwDefaultError({ @@ -549,6 +828,66 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): }; const throwDefaultError = withBaseException(__BaseException); +/** + * deserializeAws_restJson1AccessDeniedExceptionRes + */ +const de_AccessDeniedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1AttachmentUploadExceptionRes + */ +const de_AttachmentUploadExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new AttachmentUploadException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1CaseCreationLimitExceededExceptionRes + */ +const de_CaseCreationLimitExceededExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new CaseCreationLimitExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + /** * deserializeAws_restJson1ConflictExceptionRes */ @@ -634,12 +973,24 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_Address omitted. +// se_Authority omitted. + // se_CanadaAdditionalInfo omitted. // se_DestinationS3Location omitted. // se_EstoniaAdditionalInfo omitted. +/** + * serializeAws_restJson1ExemptionCertificate + */ +const se_ExemptionCertificate = (input: ExemptionCertificate, context: __SerdeContext): any => { + return take(input, { + documentFile: context.base64Encoder, + documentName: [], + }); +}; + // se_GeorgiaAdditionalInfo omitted. // se_IsraelAdditionalInfo omitted. @@ -668,22 +1019,73 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_TaxDocumentMetadata omitted. -// se_TaxRegistrationDocument omitted. +/** + * serializeAws_restJson1TaxRegistrationDocFile + */ +const se_TaxRegistrationDocFile = (input: TaxRegistrationDocFile, context: __SerdeContext): any => { + return take(input, { + fileContent: context.base64Encoder, + fileName: [], + }); +}; -// se_TaxRegistrationDocuments omitted. +/** + * serializeAws_restJson1TaxRegistrationDocument + */ +const se_TaxRegistrationDocument = (input: TaxRegistrationDocument, context: __SerdeContext): any => { + return take(input, { + file: (_) => se_TaxRegistrationDocFile(_, context), + s3Location: _json, + }); +}; -// se_TaxRegistrationEntry omitted. +/** + * serializeAws_restJson1TaxRegistrationDocuments + */ +const se_TaxRegistrationDocuments = (input: TaxRegistrationDocument[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_TaxRegistrationDocument(entry, context); + }); +}; + +/** + * serializeAws_restJson1TaxRegistrationEntry + */ +const se_TaxRegistrationEntry = (input: TaxRegistrationEntry, context: __SerdeContext): any => { + return take(input, { + additionalTaxInformation: _json, + certifiedEmailId: [], + legalAddress: _json, + legalName: [], + registrationId: [], + registrationType: [], + sector: [], + verificationDetails: (_) => se_VerificationDetails(_, context), + }); +}; // se_TurkeyAdditionalInfo omitted. // se_UkraineAdditionalInfo omitted. -// se_VerificationDetails omitted. +/** + * serializeAws_restJson1VerificationDetails + */ +const se_VerificationDetails = (input: VerificationDetails, context: __SerdeContext): any => { + return take(input, { + dateOfBirth: [], + taxRegistrationDocuments: (_) => se_TaxRegistrationDocuments(_, context), + }); +}; // de_AccountDetails omitted. // de_AccountDetailsList omitted. +// de_AccountIds omitted. + // de_AccountMetaData omitted. // de_AdditionalInfoResponse omitted. @@ -692,6 +1094,10 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // de_AddressRoleMap omitted. +// de_Authorities omitted. + +// de_Authority omitted. + // de_BatchDeleteTaxRegistrationError omitted. // de_BatchDeleteTaxRegistrationErrors omitted. @@ -740,6 +1146,61 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // de_TaxDocumentMetadatas omitted. +/** + * deserializeAws_restJson1TaxExemption + */ +const de_TaxExemption = (output: any, context: __SerdeContext): TaxExemption => { + return take(output, { + authority: _json, + effectiveDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + expirationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + systemEffectiveDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + taxExemptionType: _json, + }) as any; +}; + +/** + * deserializeAws_restJson1TaxExemptionDetails + */ +const de_TaxExemptionDetails = (output: any, context: __SerdeContext): TaxExemptionDetails => { + return take(output, { + heritageObtainedDetails: __expectBoolean, + heritageObtainedParentEntity: __expectString, + heritageObtainedReason: __expectString, + taxExemptions: (_: any) => de_TaxExemptions(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1TaxExemptionDetailsMap + */ +const de_TaxExemptionDetailsMap = (output: any, context: __SerdeContext): Record => { + return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key as string] = de_TaxExemptionDetails(value, context); + return acc; + }, {} as Record); +}; + +/** + * deserializeAws_restJson1TaxExemptions + */ +const de_TaxExemptions = (output: any, context: __SerdeContext): TaxExemption[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_TaxExemption(entry, context); + }); + return retVal; +}; + +// de_TaxExemptionType omitted. + +// de_TaxExemptionTypes omitted. + // de_TaxInheritanceDetails omitted. // de_TaxRegistration omitted. diff --git a/codegen/sdk-codegen/aws-models/taxsettings.json b/codegen/sdk-codegen/aws-models/taxsettings.json index e2bd4369c2ca0..5d5da2055da09 100644 --- a/codegen/sdk-codegen/aws-models/taxsettings.json +++ b/codegen/sdk-codegen/aws-models/taxsettings.json @@ -1,6 +1,22 @@ { "smithy": "2.0", "shapes": { + "com.amazonaws.taxsettings#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.taxsettings#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The access is denied for the Amazon Web Services Support API.\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 401 + } + }, "com.amazonaws.taxsettings#AccountDetails": { "type": "structure", "members": { @@ -422,6 +438,49 @@ } } }, + "com.amazonaws.taxsettings#AttachmentUploadException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.taxsettings#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Failed to upload the tax exemption document to Amazon Web Services Support case.\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.taxsettings#Authorities": { + "type": "list", + "member": { + "target": "com.amazonaws.taxsettings#Authority" + } + }, + "com.amazonaws.taxsettings#Authority": { + "type": "structure", + "members": { + "country": { + "target": "com.amazonaws.taxsettings#CountryCode", + "traits": { + "smithy.api#documentation": "

\n The country code for the country that the address is in.\n

", + "smithy.api#required": {} + } + }, + "state": { + "target": "com.amazonaws.taxsettings#State", + "traits": { + "smithy.api#documentation": "

\n The state that the address is located. \n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The address domain associate with the tax information.\n

" + } + }, "com.amazonaws.taxsettings#BatchDeleteTaxRegistration": { "type": "operation", "input": { @@ -517,6 +576,74 @@ "smithy.api#output": {} } }, + "com.amazonaws.taxsettings#BatchGetTaxExemptions": { + "type": "operation", + "input": { + "target": "com.amazonaws.taxsettings#BatchGetTaxExemptionsRequest" + }, + "output": { + "target": "com.amazonaws.taxsettings#BatchGetTaxExemptionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.taxsettings#InternalServerException" + }, + { + "target": "com.amazonaws.taxsettings#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.taxsettings#ValidationException" + } + ], + "traits": { + "aws.iam#iamAction": { + "requiredActions": ["tax:GetExemptions"], + "documentation": "Grants batch get active tax exemptions for a given list of accounts permission" + }, + "smithy.api#documentation": "

Get the active tax exemptions for a given list of accounts.\n

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/BatchGetTaxExemptions" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.taxsettings#BatchGetTaxExemptionsRequest": { + "type": "structure", + "members": { + "accountIds": { + "target": "com.amazonaws.taxsettings#AccountIds", + "traits": { + "smithy.api#documentation": "

\n List of unique account identifiers.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.taxsettings#BatchGetTaxExemptionsResponse": { + "type": "structure", + "members": { + "taxExemptionDetailsMap": { + "target": "com.amazonaws.taxsettings#TaxExemptionDetailsMap", + "traits": { + "smithy.api#documentation": "

The tax exemption details map of accountId and tax exemption details.\n

" + } + }, + "failedAccounts": { + "target": "com.amazonaws.taxsettings#AccountIds", + "traits": { + "smithy.api#documentation": "

The list of accounts that failed to get tax exemptions.\n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.taxsettings#BatchPutTaxRegistration": { "type": "operation", "input": { @@ -718,6 +845,22 @@ "smithy.api#pattern": "^([0-9]{6}-[0-9]{1})$" } }, + "com.amazonaws.taxsettings#CaseCreationLimitExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.taxsettings#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You've exceeded the Amazon Web Services Support case creation limit for your account.\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 413 + } + }, "com.amazonaws.taxsettings#CcmCode": { "type": "string", "traits": { @@ -936,6 +1079,16 @@ "smithy.api#documentation": "

The location of the Amazon S3 bucket that you specify to download your tax documents to.

" } }, + "com.amazonaws.taxsettings#DisplayName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + }, + "smithy.api#pattern": "^[\\s\\S]*$" + } + }, "com.amazonaws.taxsettings#District": { "type": "string", "traits": { @@ -946,6 +1099,35 @@ "smithy.api#pattern": "^(?!\\s*$)[\\s\\S]+$" } }, + "com.amazonaws.taxsettings#EntityExemptionAccountStatus": { + "type": "enum", + "members": { + "None": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "None" + } + }, + "Valid": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Valid" + } + }, + "Expired": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Expired" + } + }, + "Pending": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Pending" + } + } + } + }, "com.amazonaws.taxsettings#ErrorCode": { "type": "string", "traits": { @@ -982,12 +1164,62 @@ "smithy.api#documentation": "

Additional tax information associated with your TRN in Estonia.

" } }, + "com.amazonaws.taxsettings#ExemptionCertificate": { + "type": "structure", + "members": { + "documentName": { + "target": "com.amazonaws.taxsettings#ExemptionDocumentName", + "traits": { + "smithy.api#documentation": "

The exemption certificate file name.\n

", + "smithy.api#required": {} + } + }, + "documentFile": { + "target": "com.amazonaws.taxsettings#ExemptionFileBlob", + "traits": { + "smithy.api#documentation": "

The exemption certificate file content.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The exemption certificate.\n

" + } + }, + "com.amazonaws.taxsettings#ExemptionDocumentName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 128 + }, + "smithy.api#pattern": "^([A-Za-z0-9-_.]+).(pdf|jpg|png)$" + } + }, + "com.amazonaws.taxsettings#ExemptionFileBlob": { + "type": "blob", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4194304 + } + } + }, "com.amazonaws.taxsettings#FieldName": { "type": "string", "traits": { "smithy.api#pattern": "^(?!\\s*$)[\\s\\S]+$" } }, + "com.amazonaws.taxsettings#FileBlob": { + "type": "blob", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5242880 + } + } + }, "com.amazonaws.taxsettings#GenericString": { "type": "string", "traits": { @@ -1013,6 +1245,113 @@ "smithy.api#documentation": "

\n Additional tax information associated with your TRN in Georgia.\n

" } }, + "com.amazonaws.taxsettings#GetTaxExemptionTypes": { + "type": "operation", + "input": { + "target": "com.amazonaws.taxsettings#GetTaxExemptionTypesRequest" + }, + "output": { + "target": "com.amazonaws.taxsettings#GetTaxExemptionTypesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.taxsettings#InternalServerException" + }, + { + "target": "com.amazonaws.taxsettings#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.taxsettings#ValidationException" + } + ], + "traits": { + "aws.iam#iamAction": { + "requiredActions": ["tax:GetExemptions"], + "documentation": "Grants get supported tax exemption types permission" + }, + "smithy.api#documentation": "

Get supported tax exemption types.\n

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/GetTaxExemptionTypes" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.taxsettings#GetTaxExemptionTypesRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.taxsettings#GetTaxExemptionTypesResponse": { + "type": "structure", + "members": { + "taxExemptionTypes": { + "target": "com.amazonaws.taxsettings#TaxExemptionTypes", + "traits": { + "smithy.api#documentation": "

The supported types of tax exemptions.\n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.taxsettings#GetTaxInheritance": { + "type": "operation", + "input": { + "target": "com.amazonaws.taxsettings#GetTaxInheritanceRequest" + }, + "output": { + "target": "com.amazonaws.taxsettings#GetTaxInheritanceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.taxsettings#InternalServerException" + }, + { + "target": "com.amazonaws.taxsettings#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.taxsettings#ValidationException" + } + ], + "traits": { + "aws.iam#iamAction": { + "documentation": "Grants get tax inheritance permission" + }, + "smithy.api#documentation": "

The get account tax inheritance status.\n

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/GetTaxInheritance" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.taxsettings#GetTaxInheritanceRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.taxsettings#GetTaxInheritanceResponse": { + "type": "structure", + "members": { + "heritageStatus": { + "target": "com.amazonaws.taxsettings#HeritageStatus", + "traits": { + "smithy.api#documentation": "

The tax inheritance status.\n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.taxsettings#GetTaxRegistration": { "type": "operation", "input": { @@ -1070,7 +1409,8 @@ "code": 200, "method": "POST", "uri": "/GetTaxRegistrationDocument" - } + }, + "smithy.api#readonly": {} } }, "com.amazonaws.taxsettings#GetTaxRegistrationDocumentRequest": { @@ -1079,8 +1419,7 @@ "destinationS3Location": { "target": "com.amazonaws.taxsettings#DestinationS3Location", "traits": { - "smithy.api#documentation": "

The Amazon S3 bucket that you specify to download your tax documents to.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The Amazon S3 bucket that you specify to download your tax documents to.

" } }, "taxDocumentMetadata": { @@ -1103,6 +1442,12 @@ "traits": { "smithy.api#documentation": "

The file path of the Amazon S3 bucket where you want to download your tax document to.

" } + }, + "presignedS3Url": { + "target": "com.amazonaws.taxsettings#Url", + "traits": { + "smithy.api#documentation": "

The Amazon S3 presigned URL of the tax registration document.\n

" + } } }, "traits": { @@ -1137,6 +1482,23 @@ "smithy.api#output": {} } }, + "com.amazonaws.taxsettings#HeritageStatus": { + "type": "enum", + "members": { + "OptIn": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OptIn" + } + }, + "OptOut": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OptOut" + } + } + } + }, "com.amazonaws.taxsettings#IndiaAdditionalInfo": { "type": "structure", "members": { @@ -1396,13 +1758,92 @@ "smithy.api#pattern": "^[0-9\\u3130-\\u318F\\uAC00-\\uD7AF,.( )-\\\\s]*$" } }, - "com.amazonaws.taxsettings#ListSupplementalTaxRegistrations": { + "com.amazonaws.taxsettings#ListSupplementalTaxRegistrations": { + "type": "operation", + "input": { + "target": "com.amazonaws.taxsettings#ListSupplementalTaxRegistrationsRequest" + }, + "output": { + "target": "com.amazonaws.taxsettings#ListSupplementalTaxRegistrationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.taxsettings#InternalServerException" + }, + { + "target": "com.amazonaws.taxsettings#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.taxsettings#ValidationException" + } + ], + "traits": { + "aws.iam#iamAction": { + "documentation": "Grants retrieve permission" + }, + "smithy.api#documentation": "

\n Retrieves supplemental tax registrations for a single account.\n

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/ListSupplementalTaxRegistrations" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "taxRegistrations", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.taxsettings#ListSupplementalTaxRegistrationsRequest": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.taxsettings#MaxResults", + "traits": { + "smithy.api#documentation": "

\n The number of taxRegistrations results you want in one response.\n

" + } + }, + "nextToken": { + "target": "com.amazonaws.taxsettings#PaginationTokenString", + "traits": { + "smithy.api#documentation": "

\n The token to retrieve the next set of results. \n

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.taxsettings#ListSupplementalTaxRegistrationsResponse": { + "type": "structure", + "members": { + "taxRegistrations": { + "target": "com.amazonaws.taxsettings#SupplementalTaxRegistrationList", + "traits": { + "smithy.api#documentation": "

\n The list of supplemental tax registrations. \n

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.taxsettings#PaginationTokenString", + "traits": { + "smithy.api#documentation": "

\n The token to retrieve the next set of results. \n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.taxsettings#ListTaxExemptions": { "type": "operation", "input": { - "target": "com.amazonaws.taxsettings#ListSupplementalTaxRegistrationsRequest" + "target": "com.amazonaws.taxsettings#ListTaxExemptionsRequest" }, "output": { - "target": "com.amazonaws.taxsettings#ListSupplementalTaxRegistrationsResponse" + "target": "com.amazonaws.taxsettings#ListTaxExemptionsResponse" }, "errors": [ { @@ -1417,36 +1858,37 @@ ], "traits": { "aws.iam#iamAction": { - "documentation": "Grants retrieve permission" + "requiredActions": ["tax:GetExemptions"], + "documentation": "Grants list the active tax exemptions for a CB family permission" }, - "smithy.api#documentation": "

\n Retrieves supplemental tax registrations for a single account.\n

", + "smithy.api#documentation": "

Retrieves the tax exemption of accounts listed in a consolidated billing family.\n

", "smithy.api#http": { "code": 200, "method": "POST", - "uri": "/ListSupplementalTaxRegistrations" + "uri": "/ListTaxExemptions" }, "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "taxRegistrations", + "items": "taxExemptionDetailsMap", "pageSize": "maxResults" }, "smithy.api#readonly": {} } }, - "com.amazonaws.taxsettings#ListSupplementalTaxRegistrationsRequest": { + "com.amazonaws.taxsettings#ListTaxExemptionsRequest": { "type": "structure", "members": { "maxResults": { "target": "com.amazonaws.taxsettings#MaxResults", "traits": { - "smithy.api#documentation": "

\n The number of taxRegistrations results you want in one response.\n

" + "smithy.api#documentation": "

The number of results you want in one response.\n

" } }, "nextToken": { "target": "com.amazonaws.taxsettings#PaginationTokenString", "traits": { - "smithy.api#documentation": "

\n The token to retrieve the next set of results. \n

" + "smithy.api#documentation": "

The token to retrieve the next set of results.

" } } }, @@ -1454,20 +1896,19 @@ "smithy.api#input": {} } }, - "com.amazonaws.taxsettings#ListSupplementalTaxRegistrationsResponse": { + "com.amazonaws.taxsettings#ListTaxExemptionsResponse": { "type": "structure", "members": { - "taxRegistrations": { - "target": "com.amazonaws.taxsettings#SupplementalTaxRegistrationList", + "nextToken": { + "target": "com.amazonaws.taxsettings#PaginationTokenString", "traits": { - "smithy.api#documentation": "

\n The list of supplemental tax registrations. \n

", - "smithy.api#required": {} + "smithy.api#documentation": "

The token to retrieve the next set of results.

" } }, - "nextToken": { - "target": "com.amazonaws.taxsettings#PaginationTokenString", + "taxExemptionDetailsMap": { + "target": "com.amazonaws.taxsettings#TaxExemptionDetailsMap", "traits": { - "smithy.api#documentation": "

\n The token to retrieve the next set of results. \n

" + "smithy.api#documentation": "

The tax exemption details map of accountId and tax exemption details.\n

" } } }, @@ -1769,6 +2210,150 @@ "smithy.api#output": {} } }, + "com.amazonaws.taxsettings#PutTaxExemption": { + "type": "operation", + "input": { + "target": "com.amazonaws.taxsettings#PutTaxExemptionRequest" + }, + "output": { + "target": "com.amazonaws.taxsettings#PutTaxExemptionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.taxsettings#AccessDeniedException" + }, + { + "target": "com.amazonaws.taxsettings#AttachmentUploadException" + }, + { + "target": "com.amazonaws.taxsettings#CaseCreationLimitExceededException" + }, + { + "target": "com.amazonaws.taxsettings#InternalServerException" + }, + { + "target": "com.amazonaws.taxsettings#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.taxsettings#ValidationException" + } + ], + "traits": { + "aws.iam#iamAction": { + "requiredActions": ["tax:UpdateExemptions", "support:CreateCase", "support:AddAttachmentsToSet"], + "documentation": "Grants create customer tax exemption case permission" + }, + "smithy.api#documentation": "

Adds the tax exemption for a single account or all accounts listed in a consolidated billing family.\n

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/PutTaxExemption" + } + } + }, + "com.amazonaws.taxsettings#PutTaxExemptionRequest": { + "type": "structure", + "members": { + "accountIds": { + "target": "com.amazonaws.taxsettings#AccountIds", + "traits": { + "smithy.api#documentation": "

\n The list of unique account identifiers.\n

", + "smithy.api#required": {} + } + }, + "authority": { + "target": "com.amazonaws.taxsettings#Authority", + "traits": { + "smithy.api#required": {} + } + }, + "exemptionType": { + "target": "com.amazonaws.taxsettings#GenericString", + "traits": { + "smithy.api#documentation": "

The exemption type.\n

", + "smithy.api#required": {} + } + }, + "exemptionCertificate": { + "target": "com.amazonaws.taxsettings#ExemptionCertificate", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.taxsettings#PutTaxExemptionResponse": { + "type": "structure", + "members": { + "caseId": { + "target": "com.amazonaws.taxsettings#GenericString", + "traits": { + "smithy.api#documentation": "

The customer support case ID.\n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.taxsettings#PutTaxInheritance": { + "type": "operation", + "input": { + "target": "com.amazonaws.taxsettings#PutTaxInheritanceRequest" + }, + "output": { + "target": "com.amazonaws.taxsettings#PutTaxInheritanceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.taxsettings#ConflictException" + }, + { + "target": "com.amazonaws.taxsettings#InternalServerException" + }, + { + "target": "com.amazonaws.taxsettings#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.taxsettings#ValidationException" + } + ], + "traits": { + "aws.iam#iamAction": { + "documentation": "Grants put tax inheritance permission" + }, + "smithy.api#documentation": "

The updated tax inheritance status.\n

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/PutTaxInheritance" + } + } + }, + "com.amazonaws.taxsettings#PutTaxInheritanceRequest": { + "type": "structure", + "members": { + "heritageStatus": { + "target": "com.amazonaws.taxsettings#HeritageStatus", + "traits": { + "smithy.api#documentation": "

The tax inheritance status.\n

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.taxsettings#PutTaxInheritanceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.taxsettings#PutTaxRegistration": { "type": "operation", "input": { @@ -1840,7 +2425,7 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 20 + "max": 200 }, "smithy.api#pattern": "^(?!\\s*$)[\\s\\S]+$" } @@ -2249,6 +2834,131 @@ "smithy.api#pattern": "^[\\s\\S]*$" } }, + "com.amazonaws.taxsettings#TaxExemption": { + "type": "structure", + "members": { + "authority": { + "target": "com.amazonaws.taxsettings#Authority", + "traits": { + "smithy.api#documentation": "

The address domain associate with tax exemption.\n

", + "smithy.api#required": {} + } + }, + "taxExemptionType": { + "target": "com.amazonaws.taxsettings#TaxExemptionType", + "traits": { + "smithy.api#documentation": "

The tax exemption type.\n

", + "smithy.api#required": {} + } + }, + "effectiveDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The tax exemption effective date.\n

" + } + }, + "expirationDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The tax exemption expiration date.\n

" + } + }, + "systemEffectiveDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The tax exemption recording time in the TaxSettings system.\n

" + } + }, + "status": { + "target": "com.amazonaws.taxsettings#EntityExemptionAccountStatus", + "traits": { + "smithy.api#documentation": "

The tax exemption status.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The tax exemption.\n

" + } + }, + "com.amazonaws.taxsettings#TaxExemptionDetails": { + "type": "structure", + "members": { + "taxExemptions": { + "target": "com.amazonaws.taxsettings#TaxExemptions", + "traits": { + "smithy.api#documentation": "

Tax exemptions.\n

" + } + }, + "heritageObtainedDetails": { + "target": "com.amazonaws.taxsettings#Boolean", + "traits": { + "smithy.api#documentation": "

The indicator if the tax exemption is inherited from the consolidated billing family management account.\n

" + } + }, + "heritageObtainedParentEntity": { + "target": "com.amazonaws.taxsettings#GenericString", + "traits": { + "smithy.api#documentation": "

The consolidated billing family management account the tax exemption inherited from.\n

" + } + }, + "heritageObtainedReason": { + "target": "com.amazonaws.taxsettings#GenericString", + "traits": { + "smithy.api#documentation": "

The reason of the heritage inheritance.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The tax exemption details.\n

" + } + }, + "com.amazonaws.taxsettings#TaxExemptionDetailsMap": { + "type": "map", + "key": { + "target": "com.amazonaws.taxsettings#AccountId" + }, + "value": { + "target": "com.amazonaws.taxsettings#TaxExemptionDetails" + } + }, + "com.amazonaws.taxsettings#TaxExemptionType": { + "type": "structure", + "members": { + "displayName": { + "target": "com.amazonaws.taxsettings#DisplayName", + "traits": { + "smithy.api#documentation": "

The tax exemption's type display name.\n

" + } + }, + "description": { + "target": "com.amazonaws.taxsettings#GenericString", + "traits": { + "smithy.api#documentation": "

The tax exemption's type description.\n

" + } + }, + "applicableJurisdictions": { + "target": "com.amazonaws.taxsettings#Authorities", + "traits": { + "smithy.api#documentation": "

The tax exemption's applicable jurisdictions.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The tax exemption type.\n

" + } + }, + "com.amazonaws.taxsettings#TaxExemptionTypes": { + "type": "list", + "member": { + "target": "com.amazonaws.taxsettings#TaxExemptionType" + } + }, + "com.amazonaws.taxsettings#TaxExemptions": { + "type": "list", + "member": { + "target": "com.amazonaws.taxsettings#TaxExemption" + } + }, "com.amazonaws.taxsettings#TaxInformationNumber": { "type": "string", "traits": { @@ -2349,14 +3059,41 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.taxsettings#TaxRegistrationDocFile": { + "type": "structure", + "members": { + "fileName": { + "target": "com.amazonaws.taxsettings#TaxDocumentName", + "traits": { + "smithy.api#documentation": "

The tax registration document name.\n

", + "smithy.api#required": {} + } + }, + "fileContent": { + "target": "com.amazonaws.taxsettings#FileBlob", + "traits": { + "smithy.api#documentation": "

The tax registration document content.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The tax registration document.\n

" + } + }, "com.amazonaws.taxsettings#TaxRegistrationDocument": { "type": "structure", "members": { "s3Location": { "target": "com.amazonaws.taxsettings#SourceS3Location", "traits": { - "smithy.api#documentation": "

The Amazon S3 location where your tax registration document is stored.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The Amazon S3 location where your tax registration document is stored.

" + } + }, + "file": { + "target": "com.amazonaws.taxsettings#TaxRegistrationDocFile", + "traits": { + "smithy.api#documentation": "

The tax registration document.\n

" } } }, @@ -2604,6 +3341,9 @@ { "target": "com.amazonaws.taxsettings#BatchDeleteTaxRegistration" }, + { + "target": "com.amazonaws.taxsettings#BatchGetTaxExemptions" + }, { "target": "com.amazonaws.taxsettings#BatchPutTaxRegistration" }, @@ -2613,6 +3353,12 @@ { "target": "com.amazonaws.taxsettings#DeleteTaxRegistration" }, + { + "target": "com.amazonaws.taxsettings#GetTaxExemptionTypes" + }, + { + "target": "com.amazonaws.taxsettings#GetTaxInheritance" + }, { "target": "com.amazonaws.taxsettings#GetTaxRegistration" }, @@ -2622,12 +3368,21 @@ { "target": "com.amazonaws.taxsettings#ListSupplementalTaxRegistrations" }, + { + "target": "com.amazonaws.taxsettings#ListTaxExemptions" + }, { "target": "com.amazonaws.taxsettings#ListTaxRegistrations" }, { "target": "com.amazonaws.taxsettings#PutSupplementalTaxRegistration" }, + { + "target": "com.amazonaws.taxsettings#PutTaxExemption" + }, + { + "target": "com.amazonaws.taxsettings#PutTaxInheritance" + }, { "target": "com.amazonaws.taxsettings#PutTaxRegistration" } @@ -2645,6 +3400,19 @@ "endpointPatternType": "service_region_dnsSuffix" }, "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "Content-Type,X-Amz-Date", + "Authorization", + "X-Api-Key", + "X-Amz-Security-Token", + "Access-Control-Allow-Origin", + "X-Amz-Content-Sha256", + "Amz-Sdk-Invocation-Id", + "Amz-Sdk-Request", + "X-Amz-User-Agent" + ] + }, "smithy.api#documentation": "

You can use the tax setting API to programmatically set, modify, and delete the tax\n registration number (TRN), associated business legal name, and address (Collectively referred\n to as \"TRN information\"). You can also programmatically view TRN information and tax addresses\n (\"Tax profiles\").

\n

You can use this API to automate your TRN information settings instead of manually using\n the console.

\n

Service Endpoint

\n
    \n
  • \n

    https://tax.us-east-1.amazonaws.com

    \n
  • \n
", "smithy.api#title": "Tax Settings", "smithy.rules#endpointRuleSet": { @@ -3637,6 +4405,16 @@ } } }, + "com.amazonaws.taxsettings#Url": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^https.*\\S.*$" + } + }, "com.amazonaws.taxsettings#ValidationException": { "type": "structure", "members": {