@wepublish/api
Version:
API core for we.publish.
46 lines • 1.76 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PaymentNotFound = exports.NoSubscriptionIdInInvoice = exports.ResponseNOK = exports.UnknownIntentState = exports.SendingInvoiceError = exports.WebhookNotImplementedError = exports.InvoiceNotFoundError = void 0;
class InvoiceNotFoundError extends Error {
constructor(invoice) {
super(`Bexio payment adapter didn't find the invoice, subscription or user! ${JSON.stringify(invoice)}`);
}
}
exports.InvoiceNotFoundError = InvoiceNotFoundError;
class SendingInvoiceError extends Error {
constructor(sentInvoice) {
super(`Sending of the invoice failed with message: ${JSON.stringify(sentInvoice)}`);
}
}
exports.SendingInvoiceError = SendingInvoiceError;
class UnknownIntentState extends Error {
constructor(message = 'Unknown intent state') {
super(message);
}
}
exports.UnknownIntentState = UnknownIntentState;
class WebhookNotImplementedError extends Error {
constructor(message = 'Webhook not implemented!') {
super(message);
}
}
exports.WebhookNotImplementedError = WebhookNotImplementedError;
class ResponseNOK extends Error {
constructor(status) {
super(`Bexio response is NOK with status: ${status}`);
}
}
exports.ResponseNOK = ResponseNOK;
class NoSubscriptionIdInInvoice extends Error {
constructor(message = 'No subscriptionID associated with the provided invoice') {
super(message);
}
}
exports.NoSubscriptionIdInInvoice = NoSubscriptionIdInInvoice;
class PaymentNotFound extends Error {
constructor(message = 'While checking intent, payment not found!') {
super(message);
}
}
exports.PaymentNotFound = PaymentNotFound;
//# sourceMappingURL=bexio-errors.js.map