|
| 1 | +/** |
| 2 | + * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT. |
| 3 | + * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it. |
| 4 | + * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/. |
| 5 | + */ |
| 6 | +import { |
| 7 | + BusinessUnitImportRequest, |
| 8 | + ImportResponse, |
| 9 | +} from '../../models/importrequests' |
| 10 | +import { executeRequest } from '../../shared/utils/common-types' |
| 11 | +import { ApiRequest } from '../../shared/utils/requests-utils' |
| 12 | +/** |
| 13 | + **/ |
| 14 | +export class ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyRequestBuilder { |
| 15 | + constructor( |
| 16 | + protected readonly args: { |
| 17 | + pathArgs: { |
| 18 | + projectKey: string |
| 19 | + importContainerKey: string |
| 20 | + } |
| 21 | + executeRequest: executeRequest |
| 22 | + baseUri?: string |
| 23 | + } |
| 24 | + ) {} |
| 25 | + /** |
| 26 | + * Creates an Import Request for Business Units. |
| 27 | + */ |
| 28 | + public post(methodArgs: { |
| 29 | + body: BusinessUnitImportRequest |
| 30 | + headers?: { |
| 31 | + [key: string]: string | string[] |
| 32 | + } |
| 33 | + }): ApiRequest<ImportResponse> { |
| 34 | + return new ApiRequest<ImportResponse>( |
| 35 | + { |
| 36 | + baseUri: this.args.baseUri, |
| 37 | + method: 'POST', |
| 38 | + uriTemplate: |
| 39 | + '/{projectKey}/business-units/import-containers/{importContainerKey}', |
| 40 | + pathVariables: this.args.pathArgs, |
| 41 | + headers: { |
| 42 | + 'Content-Type': 'application/json', |
| 43 | + ...methodArgs?.headers, |
| 44 | + }, |
| 45 | + body: methodArgs?.body, |
| 46 | + }, |
| 47 | + this.args.executeRequest |
| 48 | + ) |
| 49 | + } |
| 50 | +} |
0 commit comments