@rebilly/instruments 16.70.1 → 16.72.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- ## [16.70.1](https://github.com/Rebilly/rebilly/compare/instruments/core-v16.70.0...instruments/core-v16.70.1) (2026-03-11)
1
+ ## [16.72.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v16.71.0...instruments/core-v16.72.0) (2026-03-12)
2
2
 
3
3
 
4
- ### Bug Fixes
4
+ ### Features
5
5
 
6
- * **instruments:** Prevent repeated payment instrument selection for payout requests ([#19474](https://github.com/Rebilly/rebilly/issues/19474)) ([25b9f99](https://github.com/Rebilly/rebilly/commit/25b9f99ef2bad7347ae0490e59475c10ee26123d))
6
+ * **be, recomm, instruments, storefront:** Add creating a credit memo on change quote invoice with negative value ([#16334](https://github.com/Rebilly/rebilly/issues/16334)) ([ce11e5d](https://github.com/Rebilly/rebilly/commit/ce11e5da19ea75bc0c1628271b20f80f01e572a9)), closes [#18252](https://github.com/Rebilly/rebilly/issues/18252) [#17068](https://github.com/Rebilly/rebilly/issues/17068)
package/dist/index.js CHANGED
@@ -1883,6 +1883,9 @@ const _InvoiceModel = class _InvoiceModel extends BaseModel {
1883
1883
  get isAbandoned() {
1884
1884
  return this.status === _InvoiceModel.Status.abandoned;
1885
1885
  }
1886
+ get isQuotation() {
1887
+ return this.status === _InvoiceModel.Status.quotation;
1888
+ }
1886
1889
  };
1887
1890
  _InvoiceModel.Status = {
1888
1891
  draft: "draft",
@@ -1891,6 +1894,7 @@ _InvoiceModel.Status = {
1891
1894
  partiallyPaid: "partially-paid",
1892
1895
  pastDue: "past-due",
1893
1896
  abandoned: "abandoned",
1897
+ quotation: "quotation",
1894
1898
  voided: "voided",
1895
1899
  partiallyRefunded: "partially-refunded",
1896
1900
  refunded: "refunded",
@@ -5294,7 +5298,7 @@ function C$1({ options: e2 }) {
5294
5298
  }
5295
5299
  function o2() {
5296
5300
  const i = {
5297
- "REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@25b9f99`
5301
+ "REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@ce11e5d`
5298
5302
  };
5299
5303
  return e2.apiKey && (i["REB-APIKEY"] = e2.apiKey), i;
5300
5304
  }
@@ -17767,6 +17771,36 @@ const paymentMethods = [
17767
17771
  }
17768
17772
  ]
17769
17773
  },
17774
+ {
17775
+ apiName: "Viva",
17776
+ name: "Viva",
17777
+ landscapeLogo: null,
17778
+ portraitLogo: null,
17779
+ summary: "The Viva method.",
17780
+ description: "The Viva method.",
17781
+ countries: {
17782
+ mode: "unknown",
17783
+ values: []
17784
+ },
17785
+ storefrontEnabled: true,
17786
+ isSingleUse: false,
17787
+ type: "",
17788
+ relevantBusinessModels: [],
17789
+ supportedCurrencies: {
17790
+ mode: "unknown",
17791
+ values: []
17792
+ },
17793
+ recurringPayments: true,
17794
+ refunds: true,
17795
+ disputes: false,
17796
+ ux: [],
17797
+ _links: [
17798
+ {
17799
+ rel: "self",
17800
+ href: "https://api.rebilly.com/payment-methods/Viva"
17801
+ }
17802
+ ]
17803
+ },
17770
17804
  {
17771
17805
  apiName: "voucher",
17772
17806
  name: "Voucher",
@@ -18823,7 +18857,7 @@ class DataInstance {
18823
18857
  amount,
18824
18858
  currency
18825
18859
  };
18826
- if (amountDue) {
18860
+ if (typeof amountDue === "number" && !isNaN(amountDue)) {
18827
18861
  amountAndCurrency.amountDue = amountDue;
18828
18862
  }
18829
18863
  return amountAndCurrency;
@@ -18851,11 +18885,14 @@ class DataInstance {
18851
18885
  const {
18852
18886
  shippingAmount = null,
18853
18887
  subtotalAmount = null,
18888
+ // @ts-expect-error TODO: fix - creditMemosAmount not yet present in api-definitions.
18889
+ creditMemosAmount = null,
18854
18890
  taxAmount = null
18855
18891
  } = this.previewPurchase || this.invoice || {};
18856
18892
  const discountsAmount = ((_a = this.previewPurchase) == null ? void 0 : _a.discountsAmount) ?? ((_b = this.invoice) == null ? void 0 : _b.discountAmount) ?? null;
18857
18893
  return {
18858
18894
  discountsAmount,
18895
+ creditMemosAmount,
18859
18896
  shippingAmount,
18860
18897
  subtotalAmount,
18861
18898
  taxAmount