chargebee
Version:
A library for integrating with Chargebee.
41 lines (40 loc) • 1.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpClientResponse = exports.HttpClient = void 0;
const chargebeeError_js_1 = require("../chargebeeError.js");
class HttpClient {
async makeApiRequest(props) {
throw new Error('makeApiRequest is not implemented');
}
static timeOutError() {
const error = new chargebeeError_js_1.ChargebeeError({
message: 'io_error',
type: 'timeout',
api_error_code: 'request aborted due to timeout.',
http_status_code: 504,
http_code: 504,
error_code: 'request aborted due to timeout.',
}, null);
return error;
}
}
exports.HttpClient = HttpClient;
class HttpClientResponse {
constructor(statusCode, headers) {
this._statusCode = statusCode;
this._headers = headers;
}
getStatusCode() {
return this._statusCode;
}
getHeaders() {
return this._headers;
}
getRawResponse() {
throw new Error('getRawResponse not implemented.');
}
toJson() {
throw new Error('toJSON not implemented.');
}
}
exports.HttpClientResponse = HttpClientResponse;