@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-VJT7MT7B.mjs+
packages/ari/chunk-VJT7MT7B.mjsNew file+60
Index: package/packages/ari/chunk-VJT7MT7B.mjs
===================================================================
--- package/packages/ari/chunk-VJT7MT7B.mjs
+++ package/packages/ari/chunk-VJT7MT7B.mjs
@@ -0,0 +1,60 @@
+import {
+ CommerceRefundAriResourceOwner,
+ CommerceRefundAriResourceType
+} from "./chunk-TGAJRFB4.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/commerce/refund/manifest.ts
+var commerceRefundAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: CommerceRefundAriResourceOwner,
+ resourceType: CommerceRefundAriResourceType,
+ resourceIdSlug: "{refundId}",
+ resourceIdSegmentFormats: {
+ refundId: /[0-9]+/
+ }
+};
+
+// src/commerce/refund/index.ts
+var CommerceRefundAri = class _CommerceRefundAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._refundId = opts.resourceIdSegmentValues.refundId;
+ }
+ get refundId() {
+ return this._refundId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: commerceRefundAriStaticOpts.qualifier,
+ platformQualifier: commerceRefundAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: commerceRefundAriStaticOpts.resourceOwner,
+ resourceType: commerceRefundAriStaticOpts.resourceType,
+ resourceId: `${opts.refundId}`,
+ resourceIdSegmentValues: {
+ refundId: opts.refundId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, commerceRefundAriStaticOpts);
+ return new _CommerceRefundAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, commerceRefundAriStaticOpts);
+ return new _CommerceRefundAri(opts);
+ }
+ getVariables() {
+ return {
+ refundId: this.refundId
+ };
+ }
+};
+
+export {
+ CommerceRefundAri
+};