nmkr-studio-api
Version:
Typesafe API Client to work with the NMKR Studio V2 API
73 lines • 2.7 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SplitAddressesService = void 0;
class SplitAddressesService {
constructor(httpRequest) {
this.httpRequest = httpRequest;
}
/**
* Creates a split address
* @returns GetSplitAddressClass
* @throws ApiError
*/
postV2CreateSplitAddress({ customerid, requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/v2/CreateSplitAddress/{customerid}',
path: {
customerid: customerid,
},
body: requestBody,
mediaType: 'application/json',
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
406: `See the errormessage in the resultset for further information`,
500: `Internal server error - see the errormessage in the resultset`,
},
});
}
/**
* Returns all split addresses from a customer account
* Returns all split addresses from a customer account
* @returns GetSplitAddressClass Returns the split addresses
* @throws ApiError
*/
getV2GetSplitAddresses({ customerid, }) {
return this.httpRequest.request({
method: 'GET',
url: '/v2/GetSplitAddresses/{customerid}',
path: {
customerid: customerid,
},
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
406: `See the errormessage in the resultset for further information`,
500: `Internal server error - see the errormessage in the resultset`,
},
});
}
/**
* Updates a split address
* @returns GetSplitAddressClass
* @throws ApiError
*/
putV2UpdateSplitAddress({ customerid, address, requestBody, }) {
return this.httpRequest.request({
method: 'PUT',
url: '/v2/UpdateSplitAddress/{customerid}/{address}',
path: {
customerid: customerid,
address: address,
},
body: requestBody,
mediaType: 'application/json',
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
406: `See the errormessage in the resultset for further information`,
500: `Internal server error - see the errormessage in the resultset`,
},
});
}
}
exports.SplitAddressesService = SplitAddressesService;
//# sourceMappingURL=SplitAddressesService.js.map