orb-billing 1.20.0 → 1.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/sdk/availability.js +17 -36
- package/dist/sdk/coupon.js +85 -180
- package/dist/sdk/credit.js +102 -216
- package/dist/sdk/creditnote.js +34 -72
- package/dist/sdk/customer.js +221 -468
- package/dist/sdk/event.js +153 -324
- package/dist/sdk/invoice.js +136 -288
- package/dist/sdk/item.js +34 -72
- package/dist/sdk/metric.js +51 -108
- package/dist/sdk/models/errors/fivehundrederror.d.ts +11 -0
- package/dist/sdk/models/{shared → errors}/fivehundrederror.js +21 -11
- package/dist/sdk/models/errors/fourhundredandoneerror.d.ts +11 -0
- package/dist/sdk/models/{shared → errors}/fourhundredandoneerror.js +21 -15
- package/dist/sdk/models/errors/fourhundredandtwentynineerror.d.ts +11 -0
- package/dist/sdk/models/{shared → errors}/fourhundredandtwentynineerror.js +21 -15
- package/dist/sdk/models/errors/index.d.ts +3 -0
- package/dist/sdk/models/errors/index.js +3 -0
- package/dist/sdk/models/operations/addeditpriceintervals.d.ts +0 -28
- package/dist/sdk/models/operations/addeditpriceintervals.js +0 -28
- package/dist/sdk/models/operations/amendevent.d.ts +0 -28
- package/dist/sdk/models/operations/amendevent.js +0 -28
- package/dist/sdk/models/operations/amendusage.d.ts +0 -28
- package/dist/sdk/models/operations/amendusage.js +0 -28
- package/dist/sdk/models/operations/amendusageexternalcustomerid.d.ts +0 -28
- package/dist/sdk/models/operations/amendusageexternalcustomerid.js +0 -28
- package/dist/sdk/models/operations/archivecoupon.d.ts +0 -28
- package/dist/sdk/models/operations/archivecoupon.js +0 -28
- package/dist/sdk/models/operations/cancelsubscription.d.ts +0 -28
- package/dist/sdk/models/operations/cancelsubscription.js +0 -28
- package/dist/sdk/models/operations/closebackfill.d.ts +0 -28
- package/dist/sdk/models/operations/closebackfill.js +0 -28
- package/dist/sdk/models/operations/createbackfill.d.ts +0 -28
- package/dist/sdk/models/operations/createbackfill.js +0 -28
- package/dist/sdk/models/operations/createcoupon.d.ts +0 -28
- package/dist/sdk/models/operations/createcoupon.js +0 -28
- package/dist/sdk/models/operations/createcustomer.d.ts +0 -28
- package/dist/sdk/models/operations/createcustomer.js +0 -28
- package/dist/sdk/models/operations/createcustomerbalancetransaction.d.ts +0 -28
- package/dist/sdk/models/operations/createcustomerbalancetransaction.js +0 -28
- package/dist/sdk/models/operations/createinvoice.d.ts +0 -28
- package/dist/sdk/models/operations/createinvoice.js +0 -28
- package/dist/sdk/models/operations/createinvoicelineitem.d.ts +0 -28
- package/dist/sdk/models/operations/createinvoicelineitem.js +0 -28
- package/dist/sdk/models/operations/createledgerentry.d.ts +0 -29
- package/dist/sdk/models/operations/createledgerentry.js +0 -52
- package/dist/sdk/models/operations/createledgerentryexternalid.d.ts +0 -29
- package/dist/sdk/models/operations/createledgerentryexternalid.js +0 -52
- package/dist/sdk/models/operations/createmetric.d.ts +0 -28
- package/dist/sdk/models/operations/createmetric.js +0 -28
- package/dist/sdk/models/operations/createplan.d.ts +0 -28
- package/dist/sdk/models/operations/createplan.js +0 -28
- package/dist/sdk/models/operations/createprice.d.ts +0 -29
- package/dist/sdk/models/operations/createprice.js +0 -52
- package/dist/sdk/models/operations/createsubscription.d.ts +0 -28
- package/dist/sdk/models/operations/createsubscription.js +0 -28
- package/dist/sdk/models/operations/deletecustomer.d.ts +0 -28
- package/dist/sdk/models/operations/deletecustomer.js +0 -28
- package/dist/sdk/models/operations/deprecateevent.d.ts +0 -28
- package/dist/sdk/models/operations/deprecateevent.js +0 -28
- package/dist/sdk/models/operations/fetchbackfill.d.ts +0 -28
- package/dist/sdk/models/operations/fetchbackfill.js +0 -28
- package/dist/sdk/models/operations/fetchcoupon.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcoupon.js +0 -28
- package/dist/sdk/models/operations/fetchcreditnote.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcreditnote.js +0 -28
- package/dist/sdk/models/operations/fetchcustomer.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomer.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercosts.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercosts.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercredits.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercredits.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsledger.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsledger.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.js +0 -28
- package/dist/sdk/models/operations/fetchcustomerexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomerexternalid.js +0 -28
- package/dist/sdk/models/operations/fetchinvoice.d.ts +0 -28
- package/dist/sdk/models/operations/fetchinvoice.js +0 -28
- package/dist/sdk/models/operations/fetchitem.d.ts +0 -28
- package/dist/sdk/models/operations/fetchitem.js +0 -28
- package/dist/sdk/models/operations/fetchmetric.d.ts +0 -28
- package/dist/sdk/models/operations/fetchmetric.js +0 -28
- package/dist/sdk/models/operations/fetchplan.d.ts +0 -28
- package/dist/sdk/models/operations/fetchplan.js +0 -28
- package/dist/sdk/models/operations/fetchplanexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/fetchplanexternalid.js +0 -28
- package/dist/sdk/models/operations/fetchprice.d.ts +0 -29
- package/dist/sdk/models/operations/fetchprice.js +0 -52
- package/dist/sdk/models/operations/fetchpriceexternalid.d.ts +0 -29
- package/dist/sdk/models/operations/fetchpriceexternalid.js +0 -52
- package/dist/sdk/models/operations/fetchsubscription.d.ts +0 -28
- package/dist/sdk/models/operations/fetchsubscription.js +0 -28
- package/dist/sdk/models/operations/fetchsubscriptioncosts.d.ts +0 -28
- package/dist/sdk/models/operations/fetchsubscriptioncosts.js +0 -28
- package/dist/sdk/models/operations/fetchsubscriptionschedule.d.ts +0 -28
- package/dist/sdk/models/operations/fetchsubscriptionschedule.js +0 -28
- package/dist/sdk/models/operations/fetchsubscriptionusage.d.ts +0 -29
- package/dist/sdk/models/operations/fetchsubscriptionusage.js +0 -52
- package/dist/sdk/models/operations/fetchupcominginvoice.d.ts +0 -28
- package/dist/sdk/models/operations/fetchupcominginvoice.js +0 -28
- package/dist/sdk/models/operations/ingest.d.ts +0 -28
- package/dist/sdk/models/operations/ingest.js +0 -28
- package/dist/sdk/models/operations/issueinvoice.d.ts +0 -28
- package/dist/sdk/models/operations/issueinvoice.js +0 -28
- package/dist/sdk/models/operations/listbackfills.d.ts +0 -28
- package/dist/sdk/models/operations/listbackfills.js +0 -28
- package/dist/sdk/models/operations/listbalancetransactions.d.ts +0 -28
- package/dist/sdk/models/operations/listbalancetransactions.js +0 -28
- package/dist/sdk/models/operations/listcoupons.d.ts +0 -28
- package/dist/sdk/models/operations/listcoupons.js +0 -28
- package/dist/sdk/models/operations/listcouponsubscriptions.d.ts +0 -28
- package/dist/sdk/models/operations/listcouponsubscriptions.js +0 -28
- package/dist/sdk/models/operations/listcreditnotes.d.ts +0 -28
- package/dist/sdk/models/operations/listcreditnotes.js +0 -28
- package/dist/sdk/models/operations/listcustomers.d.ts +0 -28
- package/dist/sdk/models/operations/listcustomers.js +0 -28
- package/dist/sdk/models/operations/listinvoices.d.ts +0 -28
- package/dist/sdk/models/operations/listinvoices.js +0 -28
- package/dist/sdk/models/operations/listitems.d.ts +0 -28
- package/dist/sdk/models/operations/listitems.js +0 -28
- package/dist/sdk/models/operations/listmetrics.d.ts +0 -28
- package/dist/sdk/models/operations/listmetrics.js +0 -28
- package/dist/sdk/models/operations/listplans.d.ts +0 -28
- package/dist/sdk/models/operations/listplans.js +0 -28
- package/dist/sdk/models/operations/listprices.d.ts +0 -28
- package/dist/sdk/models/operations/listprices.js +0 -28
- package/dist/sdk/models/operations/listsubscriptions.d.ts +0 -28
- package/dist/sdk/models/operations/listsubscriptions.js +0 -28
- package/dist/sdk/models/operations/markinvoiceaspaid.d.ts +0 -28
- package/dist/sdk/models/operations/markinvoiceaspaid.js +0 -28
- package/dist/sdk/models/operations/ping.d.ts +0 -28
- package/dist/sdk/models/operations/ping.js +0 -28
- package/dist/sdk/models/operations/revertbackfill.d.ts +0 -28
- package/dist/sdk/models/operations/revertbackfill.js +0 -28
- package/dist/sdk/models/operations/scheduleplanchange.d.ts +0 -28
- package/dist/sdk/models/operations/scheduleplanchange.js +0 -28
- package/dist/sdk/models/operations/searchevents.d.ts +0 -28
- package/dist/sdk/models/operations/searchevents.js +0 -28
- package/dist/sdk/models/operations/triggerphase.d.ts +0 -28
- package/dist/sdk/models/operations/triggerphase.js +0 -28
- package/dist/sdk/models/operations/unschedulecancellation.d.ts +0 -28
- package/dist/sdk/models/operations/unschedulecancellation.js +0 -28
- package/dist/sdk/models/operations/unschedulefixedfeequantity.d.ts +0 -28
- package/dist/sdk/models/operations/unschedulefixedfeequantity.js +0 -28
- package/dist/sdk/models/operations/unscheduleplanchange.d.ts +0 -28
- package/dist/sdk/models/operations/unscheduleplanchange.js +0 -28
- package/dist/sdk/models/operations/updatecustomer.d.ts +0 -28
- package/dist/sdk/models/operations/updatecustomer.js +0 -28
- package/dist/sdk/models/operations/updatecustomerexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/updatecustomerexternalid.js +0 -28
- package/dist/sdk/models/operations/updatefixedfeequantity.d.ts +0 -28
- package/dist/sdk/models/operations/updatefixedfeequantity.js +0 -28
- package/dist/sdk/models/operations/updateplan.d.ts +0 -28
- package/dist/sdk/models/operations/updateplan.js +0 -28
- package/dist/sdk/models/operations/updateplanexternal.d.ts +0 -28
- package/dist/sdk/models/operations/updateplanexternal.js +0 -28
- package/dist/sdk/models/operations/voidinvoice.d.ts +0 -28
- package/dist/sdk/models/operations/voidinvoice.js +0 -28
- package/dist/sdk/models/shared/index.d.ts +0 -3
- package/dist/sdk/models/shared/index.js +0 -3
- package/dist/sdk/models/shared/security.d.ts +1 -1
- package/dist/sdk/models/shared/security.js +1 -1
- package/dist/sdk/plan.js +102 -216
- package/dist/sdk/price.js +68 -144
- package/dist/sdk/priceinterval.js +17 -36
- package/dist/sdk/sdk.js +2 -2
- package/dist/sdk/subscription.js +221 -468
- package/docs/models/errors/fivehundrederror.md +12 -0
- package/docs/models/errors/fourhundredandoneerror.md +12 -0
- package/docs/models/errors/fourhundredandtwentynineerror.md +12 -0
- package/docs/models/operations/addeditpriceintervalsresponse.md +6 -13
- package/docs/models/operations/amendeventresponse.md +6 -13
- package/docs/models/operations/amendusageexternalcustomeridresponse.md +6 -13
- package/docs/models/operations/amendusageresponse.md +6 -13
- package/docs/models/operations/archivecouponresponse.md +6 -13
- package/docs/models/operations/cancelsubscriptionresponse.md +6 -13
- package/docs/models/operations/closebackfillresponse.md +6 -13
- package/docs/models/operations/createbackfillresponse.md +6 -13
- package/docs/models/operations/createcouponresponse.md +6 -13
- package/docs/models/operations/createcustomerbalancetransactionresponse.md +6 -13
- package/docs/models/operations/createcustomerresponse.md +6 -13
- package/docs/models/operations/createinvoicelineitemresponse.md +6 -13
- package/docs/models/operations/createinvoiceresponse.md +6 -13
- package/docs/models/operations/createledgerentryexternalidresponse.md +6 -13
- package/docs/models/operations/createledgerentryresponse.md +6 -13
- package/docs/models/operations/createmetricresponse.md +6 -13
- package/docs/models/operations/createplanresponse.md +6 -13
- package/docs/models/operations/createpriceresponse.md +6 -13
- package/docs/models/operations/createsubscriptionresponse.md +6 -13
- package/docs/models/operations/deletecustomerresponse.md +6 -13
- package/docs/models/operations/deprecateeventresponse.md +6 -13
- package/docs/models/operations/fetchbackfillresponse.md +6 -13
- package/docs/models/operations/fetchcouponresponse.md +6 -13
- package/docs/models/operations/fetchcreditnoteresponse.md +6 -13
- package/docs/models/operations/fetchcustomercostsexternalidresponse.md +6 -13
- package/docs/models/operations/fetchcustomercostsresponse.md +6 -13
- package/docs/models/operations/fetchcustomercreditsexternalidresponse.md +6 -13
- package/docs/models/operations/fetchcustomercreditsledgerexternalidresponse.md +6 -13
- package/docs/models/operations/fetchcustomercreditsledgerresponse.md +6 -13
- package/docs/models/operations/fetchcustomercreditsresponse.md +6 -13
- package/docs/models/operations/fetchcustomerexternalidresponse.md +6 -13
- package/docs/models/operations/fetchcustomerresponse.md +6 -13
- package/docs/models/operations/fetchinvoiceresponse.md +6 -13
- package/docs/models/operations/fetchitemresponse.md +6 -13
- package/docs/models/operations/fetchmetricresponse.md +6 -13
- package/docs/models/operations/fetchplanexternalidresponse.md +6 -13
- package/docs/models/operations/fetchplanresponse.md +6 -13
- package/docs/models/operations/fetchpriceexternalidresponse.md +6 -13
- package/docs/models/operations/fetchpriceresponse.md +6 -13
- package/docs/models/operations/fetchsubscriptioncostsresponse.md +6 -13
- package/docs/models/operations/fetchsubscriptionresponse.md +6 -13
- package/docs/models/operations/fetchsubscriptionscheduleresponse.md +6 -13
- package/docs/models/operations/fetchsubscriptionusageresponse.md +6 -13
- package/docs/models/operations/fetchupcominginvoiceresponse.md +6 -13
- package/docs/models/operations/ingestresponse.md +6 -13
- package/docs/models/operations/issueinvoiceresponse.md +6 -13
- package/docs/models/operations/listbackfillsresponse.md +6 -13
- package/docs/models/operations/listbalancetransactionsresponse.md +6 -13
- package/docs/models/operations/listcouponsresponse.md +6 -13
- package/docs/models/operations/listcouponsubscriptionsresponse.md +6 -13
- package/docs/models/operations/listcreditnotesresponse.md +6 -13
- package/docs/models/operations/listcustomersresponse.md +6 -13
- package/docs/models/operations/listinvoicesresponse.md +6 -13
- package/docs/models/operations/listitemsresponse.md +6 -13
- package/docs/models/operations/listmetricsresponse.md +6 -13
- package/docs/models/operations/listplansresponse.md +6 -13
- package/docs/models/operations/listpricesresponse.md +6 -13
- package/docs/models/operations/listsubscriptionsresponse.md +6 -13
- package/docs/models/operations/markinvoiceaspaidresponse.md +6 -13
- package/docs/models/operations/pingresponse.md +6 -13
- package/docs/models/operations/revertbackfillresponse.md +6 -13
- package/docs/models/operations/scheduleplanchangeresponse.md +6 -13
- package/docs/models/operations/searcheventsresponse.md +6 -13
- package/docs/models/operations/triggerphaseresponse.md +6 -13
- package/docs/models/operations/unschedulecancellationresponse.md +6 -13
- package/docs/models/operations/unschedulefixedfeequantityresponse.md +6 -13
- package/docs/models/operations/unscheduleplanchangeresponse.md +6 -13
- package/docs/models/operations/updatecustomerexternalidresponse.md +6 -13
- package/docs/models/operations/updatecustomerresponse.md +6 -13
- package/docs/models/operations/updatefixedfeequantityresponse.md +6 -13
- package/docs/models/operations/updateplanexternalresponse.md +6 -13
- package/docs/models/operations/updateplanresponse.md +6 -13
- package/docs/models/operations/voidinvoiceresponse.md +6 -13
- package/docs/models/shared/security.md +1 -1
- package/docs/sdks/availability/README.md +1 -1
- package/docs/sdks/coupon/README.md +5 -5
- package/docs/sdks/credit/README.md +6 -6
- package/docs/sdks/creditnote/README.md +2 -2
- package/docs/sdks/customer/README.md +13 -13
- package/docs/sdks/event/README.md +9 -9
- package/docs/sdks/invoice/README.md +8 -8
- package/docs/sdks/item/README.md +2 -2
- package/docs/sdks/metric/README.md +3 -3
- package/docs/sdks/plan/README.md +6 -6
- package/docs/sdks/price/README.md +4 -4
- package/docs/sdks/priceinterval/README.md +1 -1
- package/docs/sdks/subscription/README.md +13 -13
- package/package.json +1 -1
- package/dist/sdk/models/shared/fivehundrederror.d.ts +0 -13
- package/dist/sdk/models/shared/fourhundredandoneerror.d.ts +0 -16
- package/dist/sdk/models/shared/fourhundredandtwentynineerror.d.ts +0 -16
- package/docs/models/shared/fivehundrederror.md +0 -12
- package/docs/models/shared/fivehundrederrortype.md +0 -8
- package/docs/models/shared/fourhundredandoneerror.md +0 -12
- package/docs/models/shared/fourhundredandoneerrorstatus.md +0 -8
- package/docs/models/shared/fourhundredandoneerrortype.md +0 -8
- package/docs/models/shared/fourhundredandtwentynineerror.md +0 -12
- package/docs/models/shared/fourhundredandtwentynineerrorstatus.md +0 -8
- package/docs/models/shared/fourhundredandtwentynineerrortype.md +0 -8
- /package/docs/models/{shared → errors}/fivehundrederrorheaders.md +0 -0
- /package/docs/models/{shared → errors}/fourhundredandoneerrorheaders.md +0 -0
- /package/docs/models/{shared → errors}/fourhundredandtwentynineerrorheaders.md +0 -0
package/dist/sdk/price.js
CHANGED
|
@@ -317,7 +317,7 @@ var Price = /** @class */ (function () {
|
|
|
317
317
|
Price.prototype.create = function (req, config) {
|
|
318
318
|
var _a, _b;
|
|
319
319
|
return __awaiter(this, void 0, void 0, function () {
|
|
320
|
-
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
320
|
+
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
|
|
321
321
|
var _d;
|
|
322
322
|
return __generator(this, function (_e) {
|
|
323
323
|
switch (_e.label) {
|
|
@@ -370,41 +370,18 @@ var Price = /** @class */ (function () {
|
|
|
370
370
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
371
371
|
}
|
|
372
372
|
break;
|
|
373
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
break;
|
|
373
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
374
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
375
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
376
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
377
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
378
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
379
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
381
380
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
382
381
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
387
|
-
}
|
|
388
|
-
break;
|
|
389
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
390
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
391
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
392
|
-
}
|
|
393
|
-
else {
|
|
394
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
395
|
-
}
|
|
396
|
-
break;
|
|
397
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
398
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
399
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
400
|
-
}
|
|
401
|
-
else {
|
|
402
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
403
|
-
}
|
|
404
|
-
break;
|
|
405
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
406
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
407
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
382
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
383
|
+
err.rawResponse = httpRes;
|
|
384
|
+
throw new errors.FourHundredAndOneError(err);
|
|
408
385
|
}
|
|
409
386
|
else {
|
|
410
387
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -412,7 +389,9 @@ var Price = /** @class */ (function () {
|
|
|
412
389
|
break;
|
|
413
390
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
414
391
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
415
|
-
|
|
392
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
393
|
+
err.rawResponse = httpRes;
|
|
394
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
416
395
|
}
|
|
417
396
|
else {
|
|
418
397
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -420,7 +399,9 @@ var Price = /** @class */ (function () {
|
|
|
420
399
|
break;
|
|
421
400
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
422
401
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
423
|
-
|
|
402
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
403
|
+
err.rawResponse = httpRes;
|
|
404
|
+
throw new errors.FiveHundredError(err);
|
|
424
405
|
}
|
|
425
406
|
else {
|
|
426
407
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -441,7 +422,7 @@ var Price = /** @class */ (function () {
|
|
|
441
422
|
Price.prototype.fetch = function (priceId, config) {
|
|
442
423
|
var _a, _b;
|
|
443
424
|
return __awaiter(this, void 0, void 0, function () {
|
|
444
|
-
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
425
|
+
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
|
|
445
426
|
return __generator(this, function (_c) {
|
|
446
427
|
switch (_c.label) {
|
|
447
428
|
case 0:
|
|
@@ -487,41 +468,18 @@ var Price = /** @class */ (function () {
|
|
|
487
468
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
488
469
|
}
|
|
489
470
|
break;
|
|
490
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
break;
|
|
471
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
472
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
473
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
474
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
475
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
476
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
477
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
498
478
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
499
479
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
504
|
-
}
|
|
505
|
-
break;
|
|
506
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
507
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
508
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
509
|
-
}
|
|
510
|
-
else {
|
|
511
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
512
|
-
}
|
|
513
|
-
break;
|
|
514
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
515
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
516
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
517
|
-
}
|
|
518
|
-
else {
|
|
519
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
520
|
-
}
|
|
521
|
-
break;
|
|
522
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
523
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
524
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
480
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
481
|
+
err.rawResponse = httpRes;
|
|
482
|
+
throw new errors.FourHundredAndOneError(err);
|
|
525
483
|
}
|
|
526
484
|
else {
|
|
527
485
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -529,7 +487,9 @@ var Price = /** @class */ (function () {
|
|
|
529
487
|
break;
|
|
530
488
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
531
489
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
532
|
-
|
|
490
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
491
|
+
err.rawResponse = httpRes;
|
|
492
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
533
493
|
}
|
|
534
494
|
else {
|
|
535
495
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -537,7 +497,9 @@ var Price = /** @class */ (function () {
|
|
|
537
497
|
break;
|
|
538
498
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
539
499
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
540
|
-
|
|
500
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
501
|
+
err.rawResponse = httpRes;
|
|
502
|
+
throw new errors.FiveHundredError(err);
|
|
541
503
|
}
|
|
542
504
|
else {
|
|
543
505
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -559,7 +521,7 @@ var Price = /** @class */ (function () {
|
|
|
559
521
|
Price.prototype.fetchByExternalId = function (externalPriceId, config) {
|
|
560
522
|
var _a, _b;
|
|
561
523
|
return __awaiter(this, void 0, void 0, function () {
|
|
562
|
-
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
524
|
+
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
|
|
563
525
|
return __generator(this, function (_c) {
|
|
564
526
|
switch (_c.label) {
|
|
565
527
|
case 0:
|
|
@@ -605,41 +567,18 @@ var Price = /** @class */ (function () {
|
|
|
605
567
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
606
568
|
}
|
|
607
569
|
break;
|
|
608
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
break;
|
|
570
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
571
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
572
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
573
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
574
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
575
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
576
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
616
577
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
617
578
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
622
|
-
}
|
|
623
|
-
break;
|
|
624
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
625
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
626
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
627
|
-
}
|
|
628
|
-
else {
|
|
629
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
630
|
-
}
|
|
631
|
-
break;
|
|
632
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
633
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
634
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
635
|
-
}
|
|
636
|
-
else {
|
|
637
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
638
|
-
}
|
|
639
|
-
break;
|
|
640
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
641
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
642
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
579
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
580
|
+
err.rawResponse = httpRes;
|
|
581
|
+
throw new errors.FourHundredAndOneError(err);
|
|
643
582
|
}
|
|
644
583
|
else {
|
|
645
584
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -647,7 +586,9 @@ var Price = /** @class */ (function () {
|
|
|
647
586
|
break;
|
|
648
587
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
649
588
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
650
|
-
|
|
589
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
590
|
+
err.rawResponse = httpRes;
|
|
591
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
651
592
|
}
|
|
652
593
|
else {
|
|
653
594
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -655,7 +596,9 @@ var Price = /** @class */ (function () {
|
|
|
655
596
|
break;
|
|
656
597
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
657
598
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
658
|
-
|
|
599
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
600
|
+
err.rawResponse = httpRes;
|
|
601
|
+
throw new errors.FiveHundredError(err);
|
|
659
602
|
}
|
|
660
603
|
else {
|
|
661
604
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -676,7 +619,7 @@ var Price = /** @class */ (function () {
|
|
|
676
619
|
Price.prototype.list = function (cursor, limit, config) {
|
|
677
620
|
var _a, _b;
|
|
678
621
|
return __awaiter(this, void 0, void 0, function () {
|
|
679
|
-
var req, baseURL, url, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
622
|
+
var req, baseURL, url, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes, err, err, err;
|
|
680
623
|
return __generator(this, function (_c) {
|
|
681
624
|
switch (_c.label) {
|
|
682
625
|
case 0:
|
|
@@ -724,41 +667,18 @@ var Price = /** @class */ (function () {
|
|
|
724
667
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
725
668
|
}
|
|
726
669
|
break;
|
|
727
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
break;
|
|
670
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
671
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
672
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
673
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
674
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
675
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
676
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
735
677
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
736
678
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
741
|
-
}
|
|
742
|
-
break;
|
|
743
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
744
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
745
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
746
|
-
}
|
|
747
|
-
else {
|
|
748
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
749
|
-
}
|
|
750
|
-
break;
|
|
751
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
752
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
753
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
754
|
-
}
|
|
755
|
-
else {
|
|
756
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
757
|
-
}
|
|
758
|
-
break;
|
|
759
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
760
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
761
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
679
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
680
|
+
err.rawResponse = httpRes;
|
|
681
|
+
throw new errors.FourHundredAndOneError(err);
|
|
762
682
|
}
|
|
763
683
|
else {
|
|
764
684
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -766,7 +686,9 @@ var Price = /** @class */ (function () {
|
|
|
766
686
|
break;
|
|
767
687
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
768
688
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
769
|
-
|
|
689
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
690
|
+
err.rawResponse = httpRes;
|
|
691
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
770
692
|
}
|
|
771
693
|
else {
|
|
772
694
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -774,7 +696,9 @@ var Price = /** @class */ (function () {
|
|
|
774
696
|
break;
|
|
775
697
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
776
698
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
777
|
-
|
|
699
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
700
|
+
err.rawResponse = httpRes;
|
|
701
|
+
throw new errors.FiveHundredError(err);
|
|
778
702
|
}
|
|
779
703
|
else {
|
|
780
704
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -158,7 +158,7 @@ var PriceInterval = /** @class */ (function () {
|
|
|
158
158
|
PriceInterval.prototype.addEditPriceIntervals = function (subscriptionId, addEditPriceIntervalParams, config) {
|
|
159
159
|
var _a, _b;
|
|
160
160
|
return __awaiter(this, void 0, void 0, function () {
|
|
161
|
-
var req, baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
161
|
+
var req, baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
|
|
162
162
|
var _d;
|
|
163
163
|
return __generator(this, function (_e) {
|
|
164
164
|
switch (_e.label) {
|
|
@@ -215,41 +215,18 @@ var PriceInterval = /** @class */ (function () {
|
|
|
215
215
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
216
216
|
}
|
|
217
217
|
break;
|
|
218
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
break;
|
|
218
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
219
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
220
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
221
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
222
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
223
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
224
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
226
225
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
227
226
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
232
|
-
}
|
|
233
|
-
break;
|
|
234
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
235
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
236
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
240
|
-
}
|
|
241
|
-
break;
|
|
242
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
243
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
244
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
248
|
-
}
|
|
249
|
-
break;
|
|
250
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
251
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
252
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
227
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
228
|
+
err.rawResponse = httpRes;
|
|
229
|
+
throw new errors.FourHundredAndOneError(err);
|
|
253
230
|
}
|
|
254
231
|
else {
|
|
255
232
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -257,7 +234,9 @@ var PriceInterval = /** @class */ (function () {
|
|
|
257
234
|
break;
|
|
258
235
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
259
236
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
260
|
-
|
|
237
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
238
|
+
err.rawResponse = httpRes;
|
|
239
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
261
240
|
}
|
|
262
241
|
else {
|
|
263
242
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -265,7 +244,9 @@ var PriceInterval = /** @class */ (function () {
|
|
|
265
244
|
break;
|
|
266
245
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
267
246
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
268
|
-
|
|
247
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
248
|
+
err.rawResponse = httpRes;
|
|
249
|
+
throw new errors.FiveHundredError(err);
|
|
269
250
|
}
|
|
270
251
|
else {
|
|
271
252
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
package/dist/sdk/sdk.js
CHANGED
|
@@ -34,9 +34,9 @@ var SDKConfiguration = /** @class */ (function () {
|
|
|
34
34
|
function SDKConfiguration(init) {
|
|
35
35
|
this.language = "typescript";
|
|
36
36
|
this.openapiDocVersion = "1.0";
|
|
37
|
-
this.sdkVersion = "1.20.
|
|
37
|
+
this.sdkVersion = "1.20.2";
|
|
38
38
|
this.genVersion = "2.150.1";
|
|
39
|
-
this.userAgent = "speakeasy-sdk/typescript 1.20.
|
|
39
|
+
this.userAgent = "speakeasy-sdk/typescript 1.20.2 2.150.1 1.0 orb-billing";
|
|
40
40
|
Object.assign(this, init);
|
|
41
41
|
}
|
|
42
42
|
return SDKConfiguration;
|