@commercelayer/sdk 7.0.0-beta.7 → 7.0.0-beta.8

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/lib/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var mp=Object.defineProperty;var ep=a=>{throw TypeError(a)};var yp=(a,e,t)=>e in a?mp(a,e,{enumerable:true,configurable:true,writable:true,value:t}):a[e]=t;var dp=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,e,t)=>yp(a,typeof e!="symbol"?e+"":e,t),tp=(a,e,t)=>e.has(a)||ep("Cannot "+t);var o=(a,e,t)=>(tp(a,e,"read from private field"),t?t.call(a):e.get(a)),c=(a,e,t)=>e.has(a)?ep("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),u=(a,e,t,r)=>(tp(a,e,"write to private field"),e.set(a,t),t);var Rp=(a,...e)=>{},rp=a=>Rp;try{let a=dp("debug");a&&typeof a=="function"&&(rp=a);}catch{}var gp="clsdk",_p=a=>rp(`${gp}:${a}`),C=_p;var _a=C("fetch"),qt,Dt,zt,jt,ua=class ua extends Error{constructor(t,r,s,m){super(r);c(this,qt);c(this,Dt);c(this,zt);c(this,jt);u(this,Dt,t),u(this,zt,r),s&&u(this,qt,s.errors),m&&u(this,jt,m);}get errors(){return o(this,qt)}get status(){return o(this,Dt)}get statusText(){return o(this,zt)}get request(){return o(this,jt)}};qt=new WeakMap,Dt=new WeakMap,zt=new WeakMap,jt=new WeakMap,n(ua,"isFetchError",t=>t instanceof ua);var Bt=ua,Pa=async(a,e,t)=>{_a("fetch: %s, %O, native[%s]",a,e||{},t?.fetch?"no":"yes");let r=t?.interceptors;r?.request?.onSuccess&&({url:a,options:e}=await r.request.onSuccess({url:a,options:e}));let m=await(t?.fetch||fetch)(a,e);m.ok?(r?.rawReader?.onSuccess&&await r.rawReader.onSuccess(m),r?.response?.onSuccess&&(m=await r.response.onSuccess(m))):r?.rawReader?.onFailure&&await r.rawReader.onFailure(m);let R=m.body&&m.status!==204?await m.json().then(d=>(_a("response: %O",d),d)).catch(d=>{if(_a("error: %s",d.message),m.ok)throw new P({message:"Error parsing API response body",type:"parse"})}):void 0;if(!m.ok){let d=new Bt(m.status,m.statusText,R,e);if(r?.response?.onFailure&&(d=await r.response.onFailure(d)),d)throw d}return R};var Wt=(d=>(d.CLIENT="client",d.REQUEST="request",d.RESPONSE="response",d.CANCEL="cancel",d.PARSE="parse",d.TIMEOUT="timeout",d.TOKEN_REFRESH="token-refresh",d))(Wt||{}),Kt=class Kt extends Error{constructor(t){super(t.message);n(this,"type");n(this,"code");n(this,"source");this.name=Kt.NAME,this.type=t.type||"client";}static isSdkError(t){return t&&[Kt.NAME,le.NAME].includes(t.name)&&Object.values(Wt).includes(t.type)}};n(Kt,"NAME","SdkError");var P=Kt,Nt=class Nt extends P{constructor(t){super({...t,type:"response"});n(this,"errors",[]);n(this,"status");n(this,"statusText");this.name=Nt.NAME;}static isApiError(t){return P.isSdkError(t)&&t.name===Nt.NAME&&t.type==="response"}first(){return this.errors?.length>0?this.errors[0]:void 0}};n(Nt,"NAME","ApiError");var le=Nt,Pp=a=>a instanceof TypeError&&a.message!=="fetch failed",hp=a=>a instanceof DOMException&&a.name==="AbortError",fp=a=>a instanceof DOMException&&a.name==="TimeoutError",sp=a=>{let e=["INVALID_TOKEN"];return le.isApiError(a)&&a.status===401&&(e.includes(a.code||"")||a.errors&&a.errors.length>0&&e.includes(a.errors[0].code))},ha=a=>{if(console.log(a),P.isSdkError(a)||le.isApiError(a))throw a;let e=new P({message:a.message});if(Bt.isFetchError(a)){let t=new le(e);t.type="response",t.status=a.status,t.statusText=a.statusText,t.code=String(t.status),t.errors=a.errors||[],!t.message&&t.statusText&&(t.message=t.statusText),e=t;}else Pp(a)?e.type="request":hp(a)?e.type="cancel":fp(a)?e.type="timeout":(e.type="client",e.source=a);throw e};var kp={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:15e3,requiredAttributes:["organization","accessToken"]},jsonapi:{maxResourceIncluded:2}},x=kp;var fa=a=>{try{let e=JSON.parse(atob(a.split(".")[1]));return {organization:e.organization.slug,domain:e.iss?String(e.iss).replace("https://auth.",""):void 0,expiration:e.exp}}catch{return}},ca=a=>{try{let e=fa(a);return e?.expiration?e.expiration*1e3-Date.now()<0:!1}catch{return false}};var X=C("client"),ka=(a,e)=>`https://${a.toLowerCase()}.${e||x.default.domain}/api`,It,v,vt,Mt,h,Xt,Ta=class Ta{constructor(e){c(this,It);c(this,v);c(this,vt);c(this,Mt);c(this,h);c(this,Xt);X("new client instance %O",e),u(this,It,ka(e.organization??"",e.domain)),u(this,v,e.accessToken),u(this,vt,e.organization??""),u(this,Mt,e.domain);let t={timeout:e.timeout||x.client.timeout,fetch:e.fetch,refreshToken:e.refreshToken},s={...this.customHeaders(e.headers),Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+o(this,v)};e.userAgent&&(s["User-Agent"]=e.userAgent),t.headers=s,u(this,h,t),X("fetch config: %O",t),u(this,Xt,{});}static create(e){if((!e.organization||!e.domain)&&e.accessToken){let t=fa(e.accessToken);!e.organization&&t?.organization&&(e.organization=t.organization),!e.domain&&t?.domain&&(e.domain=t.domain);}for(let t of x.client.requiredAttributes)if(!e[t])throw new P({message:`Undefined '${t}' parameter`});return new Ta(e)}get interceptors(){return o(this,Xt)}get requestHeaders(){return o(this,h).headers||(o(this,h).headers={}),o(this,h).headers}config(e){X("config %o",e);let t=o(this,h);return t.headers||(t.headers={}),e.timeout&&(t.timeout=e.timeout),e.userAgent&&this.userAgent(e.userAgent),e.fetch&&(o(this,h).fetch=e.fetch),e.refreshToken&&(o(this,h).refreshToken=e.refreshToken),(e.organization||e.domain)&&u(this,It,ka(e.organization||o(this,vt),e.domain||o(this,Mt))),e.organization&&u(this,vt,e.organization),e.domain&&u(this,Mt,e.domain),e.accessToken&&(u(this,v,e.accessToken),t.headers.Authorization="Bearer "+o(this,v)),e.headers&&(t.headers={...t.headers,...this.customHeaders(e.headers)}),this}userAgent(e){return e&&(this.requestHeaders["User-Agent"]=e),this}async request(e,t,r,s){X("request %s %s, %O, %O",e,t,r||{},s||{}),s?.userAgent&&X("User-Agent header ignored in request config");let m=s?.organization?ka(s.organization,s.domain):o(this,It),R=new URL(`${m}/${t}`),d=r?JSON.stringify({data:r}):void 0,Vt={...this.requestHeaders,...this.customHeaders(s?.headers)},ia=s?.accessToken||o(this,v);ia&&(Vt.Authorization="Bearer "+ia);let Ft={method:e,body:d,headers:Vt},Hc=s?.timeout||o(this,h).timeout;Hc&&(AbortSignal?.timeout?Ft.signal=AbortSignal.timeout(Hc):X("Timeout not set. Undefined function: %s","AbortSignal.timeout")),s?.params&&Object.entries(s?.params).forEach(([Ot,$t])=>{R.searchParams.append(Ot,String($t));});let Jc={interceptors:this.interceptors,fetch:s?.fetch||o(this,h).fetch};try{return await Pa(R,Ft,Jc).catch(Ot=>ha(Ot))}catch(Ot){if(sp(Ot)&&o(this,h).refreshToken&&ca(o(this,v))){X("Access token has expired");let $t=await o(this,h).refreshToken(o(this,v)).catch(ga=>{X("Refresh token error: %s",ga.message);let aa=new P({message:"Error refreshing access token",type:"token-refresh"});throw aa.source=ga,aa});if($t)return X("Access token refreshed"),this.config({accessToken:$t}),Ft.headers&&(Ft.headers.Authorization=`Bearer ${$t}`),await Pa(R,Ft,Jc).catch(aa=>ha(aa))}else throw Ot}}customHeaders(e){let t={};if(e)for(let[r,s]of Object.entries(e))["accept","content-type","authorization","user-agent"].includes(r.toLowerCase())||(t[r]=s);return t}get currentAccessToken(){return o(this,v)}get currentOrganization(){return o(this,vt)}};It=new WeakMap,v=new WeakMap,vt=new WeakMap,Mt=new WeakMap,h=new WeakMap,Xt=new WeakMap;var Ca=Ta,op=Ca;var pa=a=>a?.type&&a.id&&Qt.includes(a.type),Sa=a=>a&&typeof a.type<"u"&&a.type&&Qt.includes(a.type);var la=C("jsonapi"),Lt=a=>{if(!a)return a;let e;a.links&&delete a.links;let t=a.data,r=a.included;return t?Array.isArray(t)?e=t.map(s=>ma(s,r)):e=ma(t,r):e=t,e},np=(a,e=[])=>e.find(r=>a.id===r.id&&a.type===r.type)||a,ma=(a,e,t=[])=>{if(la("denormalize resource: %O, %o",a,e||{}),!a)return a;let r={id:a.id,type:a.type,...a.attributes};return a.relationships&&Object.keys(a.relationships).forEach(s=>{let m=a.relationships[s].data;m?t.filter(R=>R.id===m.id&&R.type===m.type).length>=x.jsonapi.maxResourceIncluded?r[s]=m:Array.isArray(m)?r[s]=m.map(R=>ma(np(R,e),e,[...t,R])):r[s]=ma(np(m,e),e,[...t,m]):m===null&&(r[s]=null);}),la("denormalized resource: %O",r),r},xa=a=>{la("normalize resource: %O",a);let e={},t={};for(let s in a){if(["type","id"].includes(s))continue;let m=a[s];Array.isArray(m)&&m.length===1&&Sa(m[0])&&m[0].id===null?t[s]={data:[]}:m&&Sa(m)&&m.id===null?t[s]={data:null}:m&&(pa(m)||Array.isArray(m)&&pa(m[0]))?t[s]={data:m}:e[s]=m;}let r={type:a.type,attributes:e,relationships:t};return pa(a)&&(r.id=a.id),la("normalized resource: %O",r),r};var ip=C("query"),ap=["_any","_all","_in","_not_in_or_null"],Cp=a=>ap.some(e=>a.endsWith(e)),up=["_jcont"],Tp=a=>up.some(e=>a.endsWith(e)),va=a=>a&&(a.filters||a.pageNumber||a.pageSize||a.sort),bt=(a,e)=>{ip("generate query string params: %O, %O",a,e);let t={};return a&&(a.include&&(t.include=a.include.join(",")),a.fields&&(Array.isArray(a.fields)&&(a.fields={[e.type||e]:a.fields}),Object.entries(a.fields).forEach(([r,s])=>{t[`fields[${r}]`]=s.join(",");})),va(a)&&(a.sort&&(Array.isArray(a.sort)?t.sort=a.sort.join(","):t.sort=Object.entries(a.sort).map(([r,s])=>`${s==="desc"?"-":""}${r}`).join(",")),a.pageNumber&&(t["page[number]"]=String(a.pageNumber)),a.pageSize&&(t["page[size]"]=String(a.pageSize)),a.filters&&Object.entries(a.filters).forEach(([r,s])=>{let m;if(Array.isArray(s)){if(!Cp(r))throw new P({message:`Incorrect filter [${r}]: Array value is supported only for the following filters: ${ap.join(", ")}`,type:"request"});m=s.join(",");}else if(typeof s=="object"){if(!Tp(r))throw new P({message:`Incorrect filter [${r}]: Object value is supported only for the following filters: ${up.join(", ")}`,type:"request"});m=JSON.stringify(s);}else m=String(s);t[`filter[q][${r}]`]=m;})),ip("query string params: %O",t)),t};var Z=C("resource"),ya=class extends Array{constructor(t,r){super(...r||[]);n(this,"meta");this.meta=t;}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(t){return this.length&&t>=0?this[t]:void 0}hasNextPage(){return this.meta.currentPage<this.meta.pageCount}hasPrevPage(){return this.meta.currentPage>1}getRecordCount(){return this.meta.recordCount}getPageCount(){return this.meta.pageCount}get recordCount(){return this.meta.recordCount}get pageCount(){return this.meta.pageCount}},me=class me{static init(e){return me.adapter=new da(e)}static get(e){if(e)return me.init(e);if(me.adapter)return me.adapter;throw new P({message:"RersourceAdapter not initialized"})}static config(e){me.get().config(e);}};n(me,"adapter");var Ht=me,k,La,da=class{constructor(e){c(this,k);c(this,La,{});u(this,k,op.create(e)),this.localConfig(e);}localConfig(e){}config(e){return Z("config %o",e),this.localConfig(e),o(this,k).config(e),this}get client(){return o(this,k)}async singleton(e,t,r,s){Z("singleton: %o, %O, %O",e,t||{},r||{});let m=bt(t,e);r?.params&&Object.assign(m,r?.params);let R=await o(this,k).request("GET",`${s||e.type}`,void 0,{...r,params:m});return Lt(R)}async retrieve(e,t,r){Z("retrieve: %o, %O, %O",e,t||{},r||{});let s=bt(t,e);r?.params&&Object.assign(s,r?.params);let m=await o(this,k).request("GET",`${e.type}/${e.id}`,void 0,{...r,params:s});return Lt(m)}async list(e,t,r){Z("list: %o, %O, %O",e,t||{},r||{});let s=bt(t,e);r?.params&&Object.assign(s,r?.params),s["page[number]"]||(s["page[number]"]="1");let m=await o(this,k).request("GET",`${e.type}`,void 0,{...r,params:s}),R=Lt(m),d={pageCount:Number(m.meta?.page_count),recordCount:Number(m.meta?.record_count),currentPage:t?.pageNumber||x.default.pageNumber,recordsPerPage:t?.pageSize||x.default.pageSize};return new ya(d,R)}async create(e,t,r){Z("create: %o, %O, %O",e,t||{},r||{});let s=bt(t,e);r?.params&&Object.assign(s,r?.params);let m=xa(e),R=await o(this,k).request("POST",e.type,m,{...r,params:s});return Lt(R)}async update(e,t,r){Z("update: %o, %O, %O",e,t||{},r||{});let s=bt(t,e);r?.params&&Object.assign(s,r?.params);let m=xa(e),R=await o(this,k).request("PATCH",`${e.type}/${e.id}`,m,{...r,params:s});return Lt(R)}async delete(e,t){Z("delete: %o, %O",e,t||{}),await o(this,k).request("DELETE",`${e.type}/${e.id}`,void 0,t);}async fetch(e,t,r,s){Z("fetch: %o, %O, %O",t,r||{},s||{});let m=bt(r,e);s?.params&&Object.assign(m,s?.params);let R=await o(this,k).request("GET",t,void 0,{...s,params:m}),d=Lt(R);if(Array.isArray(d)){let Vt=r,ia={pageCount:Number(R.meta?.page_count),recordCount:Number(R.meta?.record_count),currentPage:Vt?.pageNumber||x.default.pageNumber,recordsPerPage:Vt?.pageSize||x.default.pageSize};return new ya(ia,d)}else return d}};k=new WeakMap,La=new WeakMap;var Gt,Zt=class{constructor(e){c(this,Gt);Z("new resource instance: %s",this.type()),u(this,Gt,e);}get resources(){return o(this,Gt)||u(this,Gt,Ht.get())}relationshipOneToOne(e){return e===null||typeof e=="string"?{id:e,type:this.type()}:{id:e.id,type:this.type()}}relationshipOneToMany(...e){return e===null||e.length===0||e[0]===null?[{id:null,type:this.type()}]:e.map(t=>({id:t,type:this.type()}))}path(){return this.type()}async update(e,t,r){return this.resources.update({...e,type:this.type()},t,r)}};Gt=new WeakMap,n(Zt,"TYPE");var i=class extends Zt{async retrieve(e,t,r){return this.resources.retrieve(typeof e=="string"?{type:this.type(),id:e}:e,t,r)}async list(e,t){return this.resources.list({type:this.type()},e,t)}async count(e,t){let r={filters:va(e)?e.filters:e,pageNumber:1,pageSize:1},s=await this.list(r,t);return Promise.resolve(s.meta.recordCount)}},Yt=class extends Zt{async retrieve(e,t){return this.resources.singleton({type:this.type()},e,t,this.path())}},cp=da;var ye=class ye extends i{async create(e,t,r){return this.resources.create({...e,type:ye.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ye.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ye.TYPE}:e,t);}async geocoder(e,t,r){let s=e.id||e;return this.resources.fetch({type:"geocoders"},`addresses/${s}/geocoder`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`addresses/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`addresses/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`addresses/${s}/versions`,t,r)}isAddress(e){return e.type&&e.type===ye.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ye.TYPE}};n(ye,"TYPE","addresses");var ba=ye,Jt=ba;var de=class de extends i{async create(e,t,r){return this.resources.create({...e,type:de.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:de.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:de.TYPE}:e,t);}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`adjustments/${s}/versions`,t,r)}isAdjustment(e){return e.type&&e.type===de.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return de.TYPE}};n(de,"TYPE","adjustments");var wa=de,er=wa;var Re=class Re extends i{async create(e,t,r){return this.resources.create({...e,type:Re.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Re.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Re.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`adyen_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`adyen_gateways/${s}/versions`,t,r)}async adyen_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"adyen_payments"},`adyen_gateways/${s}/adyen_payments`,t,r)}isAdyenGateway(e){return e.type&&e.type===Re.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Re.TYPE}};n(Re,"TYPE","adyen_gateways");var Aa=Re,tr=Aa;var I=class I extends i{async create(e,t,r){return this.resources.create({...e,type:I.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:I.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:I.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`adyen_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`adyen_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`adyen_payments/${s}/versions`,t,r)}async _authorize(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_authorize:true},t,r)}async _details(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_details:true},t,r)}isAdyenPayment(e){return e.type&&e.type===I.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return I.TYPE}};n(I,"TYPE","adyen_payments");var Ea=I,rr=Ea;var sr=class sr extends Yt{isApplication(e){return e.type&&e.type===sr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return sr.TYPE}path(){return "application"}};n(sr,"TYPE","applications");var Oa=sr,or=Oa;var ge=class ge extends i{async create(e,t,r){return this.resources.create({...e,type:ge.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ge.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ge.TYPE}:e,t);}isAttachment(e){return e.type&&e.type===ge.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ge.TYPE}};n(ge,"TYPE","attachments");var Ia=ge,nr=Ia;var L=class L extends i{async update(e,t,r){return this.resources.update({...e,type:L.TYPE},t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`authorizations/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`authorizations/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`authorizations/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`authorizations/${s}/versions`,t,r)}async captures(e,t,r){let s=e.id||e;return this.resources.fetch({type:"captures"},`authorizations/${s}/captures`,t,r)}async voids(e,t,r){let s=e.id||e;return this.resources.fetch({type:"voids"},`authorizations/${s}/voids`,t,r)}async _forward(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_forward:true},t,r)}async _capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_capture:true},t,r)}async _capture_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_capture_amount_cents:t},r,s)}async _void(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_void:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_cancel:true},t,r)}isAuthorization(e){return e.type&&e.type===L.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return L.TYPE}};n(L,"TYPE","authorizations");var Ma=L,ir=Ma;var _e=class _e extends i{async create(e,t,r){return this.resources.create({...e,type:_e.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:_e.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:_e.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`avalara_accounts/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`avalara_accounts/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`avalara_accounts/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`avalara_accounts/${s}/versions`,t,r)}async tax_categories(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${s}/tax_categories`,t,r)}isAvalaraAccount(e){return e.type&&e.type===_e.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return _e.TYPE}};n(_e,"TYPE","avalara_accounts");var Qa=_e,ar=Qa;var Pe=class Pe extends i{async create(e,t,r){return this.resources.create({...e,type:Pe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Pe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Pe.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`axerve_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`axerve_gateways/${s}/versions`,t,r)}async axerve_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"axerve_payments"},`axerve_gateways/${s}/axerve_payments`,t,r)}isAxerveGateway(e){return e.type&&e.type===Pe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Pe.TYPE}};n(Pe,"TYPE","axerve_gateways");var Ga=Pe,ur=Ga;var H=class H extends i{async create(e,t,r){return this.resources.create({...e,type:H.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:H.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:H.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`axerve_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`axerve_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`axerve_payments/${s}/versions`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:H.TYPE,_update:true},t,r)}isAxervePayment(e){return e.type&&e.type===H.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return H.TYPE}};n(H,"TYPE","axerve_payments");var Ya=H,cr=Ya;var he=class he extends i{async create(e,t,r){return this.resources.create({...e,type:he.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:he.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:he.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`bing_geocoders/${s}/markets`,t,r)}async addresses(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`bing_geocoders/${s}/addresses`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`bing_geocoders/${s}/attachments`,t,r)}isBingGeocoder(e){return e.type&&e.type===he.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return he.TYPE}};n(he,"TYPE","bing_geocoders");var Ua=he,pr=Ua;var fe=class fe extends i{async create(e,t,r){return this.resources.create({...e,type:fe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:fe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:fe.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`braintree_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`braintree_gateways/${s}/versions`,t,r)}async braintree_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"braintree_payments"},`braintree_gateways/${s}/braintree_payments`,t,r)}isBraintreeGateway(e){return e.type&&e.type===fe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return fe.TYPE}};n(fe,"TYPE","braintree_gateways");var Va=fe,lr=Va;var ke=class ke extends i{async create(e,t,r){return this.resources.create({...e,type:ke.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ke.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ke.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`braintree_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`braintree_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`braintree_payments/${s}/versions`,t,r)}isBraintreePayment(e){return e.type&&e.type===ke.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ke.TYPE}};n(ke,"TYPE","braintree_payments");var Fa=ke,mr=Fa;var M=class M extends i{async create(e,t,r){return this.resources.create({...e,type:M.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:M.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:M.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`bundles/${s}/market`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`bundles/${s}/sku_list`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`bundles/${s}/skus`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`bundles/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`bundles/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`bundles/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`bundles/${s}/versions`,t,r)}async _compute_price_amount(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:M.TYPE,_compute_price_amount:true},t,r)}async _compute_compare_at_amount(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:M.TYPE,_compute_compare_at_amount:true},t,r)}isBundle(e){return e.type&&e.type===M.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return M.TYPE}};n(M,"TYPE","bundles");var $a=M,yr=$a;var Q=class Q extends i{async create(e,t,r){return this.resources.create({...e,type:Q.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Q.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Q.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`buy_x_pay_y_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`buy_x_pay_y_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`buy_x_pay_y_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`buy_x_pay_y_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`buy_x_pay_y_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`buy_x_pay_y_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`buy_x_pay_y_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`buy_x_pay_y_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`buy_x_pay_y_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`buy_x_pay_y_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`buy_x_pay_y_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`buy_x_pay_y_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Q.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Q.TYPE,_enable:true},t,r)}isBuyXPayYPromotion(e){return e.type&&e.type===Q.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Q.TYPE}};n(Q,"TYPE","buy_x_pay_y_promotions");var Ba=Q,dr=Ba;var G=class G extends i{async update(e,t,r){return this.resources.update({...e,type:G.TYPE},t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`captures/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`captures/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`captures/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`captures/${s}/versions`,t,r)}async reference_authorization(e,t,r){let s=e.id||e;return this.resources.fetch({type:"authorizations"},`captures/${s}/reference_authorization`,t,r)}async refunds(e,t,r){let s=e.id||e;return this.resources.fetch({type:"refunds"},`captures/${s}/refunds`,t,r)}async return(e,t,r){let s=e.id||e;return this.resources.fetch({type:"returns"},`captures/${s}/return`,t,r)}async _forward(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:G.TYPE,_forward:true},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:G.TYPE,_refund:true},t,r)}async _refund_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:G.TYPE,_refund_amount_cents:t},r,s)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:G.TYPE,_cancel:true},t,r)}isCapture(e){return e.type&&e.type===G.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return G.TYPE}};n(G,"TYPE","captures");var qa=G,Rr=qa;var Ce=class Ce extends i{async create(e,t,r){return this.resources.create({...e,type:Ce.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ce.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ce.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`carrier_accounts/${s}/market`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`carrier_accounts/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`carrier_accounts/${s}/versions`,t,r)}isCarrierAccount(e){return e.type&&e.type===Ce.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ce.TYPE}};n(Ce,"TYPE","carrier_accounts");var Da=Ce,gr=Da;var Te=class Te extends i{async create(e,t,r){return this.resources.create({...e,type:Te.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Te.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Te.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`checkout_com_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`checkout_com_gateways/${s}/versions`,t,r)}async checkout_com_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"checkout_com_payments"},`checkout_com_gateways/${s}/checkout_com_payments`,t,r)}isCheckoutComGateway(e){return e.type&&e.type===Te.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Te.TYPE}};n(Te,"TYPE","checkout_com_gateways");var za=Te,_r=za;var Y=class Y extends i{async create(e,t,r){return this.resources.create({...e,type:Y.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Y.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Y.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`checkout_com_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`checkout_com_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`checkout_com_payments/${s}/versions`,t,r)}async _details(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Y.TYPE,_details:true},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Y.TYPE,_refresh:true},t,r)}isCheckoutComPayment(e){return e.type&&e.type===Y.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Y.TYPE}};n(Y,"TYPE","checkout_com_payments");var ja=Y,Pr=ja;var J=class J extends i{async create(e,t,r){return this.resources.create({...e,type:J.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:J.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:J.TYPE}:e,t);}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`cleanups/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`cleanups/${s}/versions`,t,r)}async _interrupt(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:J.TYPE,_interrupt:true},t,r)}isCleanup(e){return e.type&&e.type===J.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return J.TYPE}};n(J,"TYPE","cleanups");var Wa=J,hr=Wa;var Se=class Se extends i{async create(e,t,r){return this.resources.create({...e,type:Se.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Se.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Se.TYPE}:e,t);}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`coupon_codes_promotion_rules/${s}/versions`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`coupon_codes_promotion_rules/${s}/coupons`,t,r)}isCouponCodesPromotionRule(e){return e.type&&e.type===Se.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Se.TYPE}};n(Se,"TYPE","coupon_codes_promotion_rules");var Ka=Se,fr=Ka;var xe=class xe extends i{async create(e,t,r){return this.resources.create({...e,type:xe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:xe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:xe.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`coupon_recipients/${s}/customer`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`coupon_recipients/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`coupon_recipients/${s}/versions`,t,r)}isCouponRecipient(e){return e.type&&e.type===xe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return xe.TYPE}};n(xe,"TYPE","coupon_recipients");var Na=xe,kr=Na;var ve=class ve extends i{async create(e,t,r){return this.resources.create({...e,type:ve.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ve.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ve.TYPE}:e,t);}async promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`coupons/${s}/promotion_rule`,t,r)}async coupon_recipient(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_recipients"},`coupons/${s}/coupon_recipient`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`coupons/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`coupons/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`coupons/${s}/versions`,t,r)}isCoupon(e){return e.type&&e.type===ve.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ve.TYPE}};n(ve,"TYPE","coupons");var Xa=ve,Cr=Xa;var Le=class Le extends i{async create(e,t,r){return this.resources.create({...e,type:Le.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Le.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Le.TYPE}:e,t);}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`custom_promotion_rules/${s}/versions`,t,r)}isCustomPromotionRule(e){return e.type&&e.type===Le.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Le.TYPE}};n(Le,"TYPE","custom_promotion_rules");var Za=Le,Tr=Za;var be=class be extends i{async create(e,t,r){return this.resources.create({...e,type:be.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:be.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:be.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customer_addresses/${s}/customer`,t,r)}async address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`customer_addresses/${s}/address`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`customer_addresses/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`customer_addresses/${s}/versions`,t,r)}isCustomerAddress(e){return e.type&&e.type===be.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return be.TYPE}};n(be,"TYPE","customer_addresses");var Ha=be,Sr=Ha;var we=class we extends i{async create(e,t,r){return this.resources.create({...e,type:we.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:we.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:we.TYPE}:e,t);}async customers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customer_groups/${s}/customers`,t,r)}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`customer_groups/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`customer_groups/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`customer_groups/${s}/versions`,t,r)}isCustomerGroup(e){return e.type&&e.type===we.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return we.TYPE}};n(we,"TYPE","customer_groups");var Ja=we,xr=Ja;var ee=class ee extends i{async create(e,t,r){return this.resources.create({...e,type:ee.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ee.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ee.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customer_password_resets/${s}/customer`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`customer_password_resets/${s}/events`,t,r)}async _reset_password_token(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:ee.TYPE,_reset_password_token:t},r,s)}isCustomerPasswordReset(e){return e.type&&e.type===ee.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ee.TYPE}};n(ee,"TYPE","customer_password_resets");var eu=ee,vr=eu;var Ae=class Ae extends i{async create(e,t,r){return this.resources.create({...e,type:Ae.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ae.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ae.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customer_payment_sources/${s}/customer`,t,r)}async payment_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`customer_payment_sources/${s}/payment_method`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`customer_payment_sources/${s}/versions`,t,r)}isCustomerPaymentSource(e){return e.type&&e.type===Ae.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ae.TYPE}};n(Ae,"TYPE","customer_payment_sources");var tu=Ae,Lr=tu;var Ee=class Ee extends i{async create(e,t,r){return this.resources.create({...e,type:Ee.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ee.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ee.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customer_subscriptions/${s}/customer`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`customer_subscriptions/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`customer_subscriptions/${s}/versions`,t,r)}isCustomerSubscription(e){return e.type&&e.type===Ee.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ee.TYPE}};n(Ee,"TYPE","customer_subscriptions");var ru=Ee,br=ru;var Oe=class Oe extends i{async create(e,t,r){return this.resources.create({...e,type:Oe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Oe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Oe.TYPE}:e,t);}async customer_group(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_groups"},`customers/${s}/customer_group`,t,r)}async customer_addresses(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_addresses"},`customers/${s}/customer_addresses`,t,r)}async customer_payment_sources(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`customers/${s}/customer_payment_sources`,t,r)}async customer_subscriptions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_subscriptions"},`customers/${s}/customer_subscriptions`,t,r)}async orders(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`customers/${s}/orders`,t,r)}async order_subscriptions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`customers/${s}/order_subscriptions`,t,r)}async returns(e,t,r){let s=e.id||e;return this.resources.fetch({type:"returns"},`customers/${s}/returns`,t,r)}async sku_lists(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`customers/${s}/sku_lists`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`customers/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`customers/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`customers/${s}/tags`,t,r)}isCustomer(e){return e.type&&e.type===Oe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Oe.TYPE}};n(Oe,"TYPE","customers");var su=Oe,wr=su;var Ie=class Ie extends i{async create(e,t,r){return this.resources.create({...e,type:Ie.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ie.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ie.TYPE}:e,t);}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`delivery_lead_times/${s}/stock_location`,t,r)}async shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`delivery_lead_times/${s}/shipping_method`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`delivery_lead_times/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`delivery_lead_times/${s}/versions`,t,r)}isDeliveryLeadTime(e){return e.type&&e.type===Ie.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ie.TYPE}};n(Ie,"TYPE","delivery_lead_times");var ou=Ie,Ar=ou;var Er=class Er extends i{async discount_engine(e,t,r){let s=e.id||e;return this.resources.fetch({type:"discount_engines"},`discount_engine_items/${s}/discount_engine`,t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`discount_engine_items/${s}/order`,t,r)}isDiscountEngineItem(e){return e.type&&e.type===Er.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Er.TYPE}};n(Er,"TYPE","discount_engine_items");var nu=Er,Or=nu;var Ir=class Ir extends i{async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`discount_engines/${s}/markets`,t,r)}async discount_engine_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"discount_engine_items"},`discount_engines/${s}/discount_engine_items`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`discount_engines/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`discount_engines/${s}/versions`,t,r)}isDiscountEngine(e){return e.type&&e.type===Ir.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ir.TYPE}};n(Ir,"TYPE","discount_engines");var iu=Ir,Mr=iu;var Qr=class Qr extends i{async webhook(e,t,r){let s=e.id||e;return this.resources.fetch({type:"webhooks"},`event_callbacks/${s}/webhook`,t,r)}isEventCallback(e){return e.type&&e.type===Qr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Qr.TYPE}};n(Qr,"TYPE","event_callbacks");var au=Qr,Gr=au;var wt=class wt extends i{async update(e,t,r){return this.resources.update({...e,type:wt.TYPE},t,r)}async webhooks(e,t,r){let s=e.id||e;return this.resources.fetch({type:"webhooks"},`events/${s}/webhooks`,t,r)}async last_event_callbacks(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_callbacks"},`events/${s}/last_event_callbacks`,t,r)}async _trigger(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:wt.TYPE,_trigger:true},t,r)}isEvent(e){return e.type&&e.type===wt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return wt.TYPE}};n(wt,"TYPE","events");var uu=wt,Yr=uu;var te=class te extends i{async create(e,t,r){return this.resources.create({...e,type:te.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:te.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:te.TYPE}:e,t);}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`exports/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`exports/${s}/versions`,t,r)}async _interrupt(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:te.TYPE,_interrupt:true},t,r)}isExport(e){return e.type&&e.type===te.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return te.TYPE}};n(te,"TYPE","exports");var cu=te,Ur=cu;var re=class re extends i{async create(e,t,r){return this.resources.create({...e,type:re.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:re.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:re.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`external_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`external_gateways/${s}/versions`,t,r)}async external_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"external_payments"},`external_gateways/${s}/external_payments`,t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:re.TYPE,_reset_circuit:true},t,r)}isExternalGateway(e){return e.type&&e.type===re.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return re.TYPE}};n(re,"TYPE","external_gateways");var pu=re,Vr=pu;var Me=class Me extends i{async create(e,t,r){return this.resources.create({...e,type:Me.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Me.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Me.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`external_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`external_payments/${s}/payment_gateway`,t,r)}async wallet(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`external_payments/${s}/wallet`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`external_payments/${s}/versions`,t,r)}isExternalPayment(e){return e.type&&e.type===Me.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Me.TYPE}};n(Me,"TYPE","external_payments");var lu=Me,Fr=lu;var b=class b extends i{async create(e,t,r){return this.resources.create({...e,type:b.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:b.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:b.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`external_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`external_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`external_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`external_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`external_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`external_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`external_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`external_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`external_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`external_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`external_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`external_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:b.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:b.TYPE,_enable:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:b.TYPE,_reset_circuit:true},t,r)}isExternalPromotion(e){return e.type&&e.type===b.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return b.TYPE}};n(b,"TYPE","external_promotions");var mu=b,$r=mu;var se=class se extends i{async create(e,t,r){return this.resources.create({...e,type:se.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:se.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:se.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`external_tax_calculators/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`external_tax_calculators/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`external_tax_calculators/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`external_tax_calculators/${s}/versions`,t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:se.TYPE,_reset_circuit:true},t,r)}isExternalTaxCalculator(e){return e.type&&e.type===se.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return se.TYPE}};n(se,"TYPE","external_tax_calculators");var yu=se,Br=yu;var U=class U extends i{async create(e,t,r){return this.resources.create({...e,type:U.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:U.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:U.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`fixed_amount_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`fixed_amount_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`fixed_amount_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`fixed_amount_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`fixed_amount_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`fixed_amount_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`fixed_amount_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`fixed_amount_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`fixed_amount_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`fixed_amount_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`fixed_amount_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`fixed_amount_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:U.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:U.TYPE,_enable:true},t,r)}isFixedAmountPromotion(e){return e.type&&e.type===U.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return U.TYPE}};n(U,"TYPE","fixed_amount_promotions");var du=U,qr=du;var V=class V extends i{async create(e,t,r){return this.resources.create({...e,type:V.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:V.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:V.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`fixed_price_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`fixed_price_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`fixed_price_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`fixed_price_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`fixed_price_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`fixed_price_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`fixed_price_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`fixed_price_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`fixed_price_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`fixed_price_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`fixed_price_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`fixed_price_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:V.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:V.TYPE,_enable:true},t,r)}isFixedPricePromotion(e){return e.type&&e.type===V.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return V.TYPE}};n(V,"TYPE","fixed_price_promotions");var Ru=V,Dr=Ru;var F=class F extends i{async create(e,t,r){return this.resources.create({...e,type:F.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:F.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:F.TYPE}:e,t);}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`flex_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`flex_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`flex_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`flex_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`flex_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`flex_promotions/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:F.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:F.TYPE,_enable:true},t,r)}isFlexPromotion(e){return e.type&&e.type===F.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return F.TYPE}};n(F,"TYPE","flex_promotions");var gu=F,zr=gu;var $=class $ extends i{async create(e,t,r){return this.resources.create({...e,type:$.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:$.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:$.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`free_gift_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`free_gift_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`free_gift_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`free_gift_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`free_gift_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`free_gift_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`free_gift_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`free_gift_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`free_gift_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`free_gift_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`free_gift_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`free_gift_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:$.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:$.TYPE,_enable:true},t,r)}isFreeGiftPromotion(e){return e.type&&e.type===$.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return $.TYPE}};n($,"TYPE","free_gift_promotions");var _u=$,jr=_u;var B=class B extends i{async create(e,t,r){return this.resources.create({...e,type:B.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:B.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:B.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`free_shipping_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`free_shipping_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`free_shipping_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`free_shipping_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`free_shipping_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`free_shipping_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`free_shipping_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`free_shipping_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`free_shipping_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`free_shipping_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`free_shipping_promotions/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:B.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:B.TYPE,_enable:true},t,r)}isFreeShippingPromotion(e){return e.type&&e.type===B.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return B.TYPE}};n(B,"TYPE","free_shipping_promotions");var Pu=B,Wr=Pu;var Kr=class Kr extends i{async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`geocoders/${s}/markets`,t,r)}async addresses(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`geocoders/${s}/addresses`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`geocoders/${s}/attachments`,t,r)}isGeocoder(e){return e.type&&e.type===Kr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Kr.TYPE}};n(Kr,"TYPE","geocoders");var hu=Kr,Nr=hu;var Qe=class Qe extends i{async create(e,t,r){return this.resources.create({...e,type:Qe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Qe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Qe.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`gift_card_recipients/${s}/customer`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`gift_card_recipients/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`gift_card_recipients/${s}/versions`,t,r)}isGiftCardRecipient(e){return e.type&&e.type===Qe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Qe.TYPE}};n(Qe,"TYPE","gift_card_recipients");var fu=Qe,Xr=fu;var T=class T extends i{async create(e,t,r){return this.resources.create({...e,type:T.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:T.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:T.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`gift_cards/${s}/market`,t,r)}async gift_card_recipient(e,t,r){let s=e.id||e;return this.resources.fetch({type:"gift_card_recipients"},`gift_cards/${s}/gift_card_recipient`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`gift_cards/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`gift_cards/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`gift_cards/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`gift_cards/${s}/versions`,t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:T.TYPE,_purchase:true},t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:T.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:T.TYPE,_deactivate:true},t,r)}async _balance_change_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:T.TYPE,_balance_change_cents:t},r,s)}isGiftCard(e){return e.type&&e.type===T.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return T.TYPE}};n(T,"TYPE","gift_cards");var ku=T,Zr=ku;var Ge=class Ge extends i{async create(e,t,r){return this.resources.create({...e,type:Ge.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ge.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ge.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`google_geocoders/${s}/markets`,t,r)}async addresses(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`google_geocoders/${s}/addresses`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`google_geocoders/${s}/attachments`,t,r)}isGoogleGeocoder(e){return e.type&&e.type===Ge.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ge.TYPE}};n(Ge,"TYPE","google_geocoders");var Cu=Ge,Hr=Cu;var oe=class oe extends i{async create(e,t,r){return this.resources.create({...e,type:oe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:oe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:oe.TYPE}:e,t);}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`imports/${s}/events`,t,r)}async _interrupt(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:oe.TYPE,_interrupt:true},t,r)}isImport(e){return e.type&&e.type===oe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return oe.TYPE}};n(oe,"TYPE","imports");var Tu=oe,Jr=Tu;var q=class q extends i{async create(e,t,r){return this.resources.create({...e,type:q.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:q.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:q.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`in_stock_subscriptions/${s}/market`,t,r)}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`in_stock_subscriptions/${s}/customer`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`in_stock_subscriptions/${s}/sku`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`in_stock_subscriptions/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`in_stock_subscriptions/${s}/versions`,t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:q.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:q.TYPE,_deactivate:true},t,r)}isInStockSubscription(e){return e.type&&e.type===q.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return q.TYPE}};n(q,"TYPE","in_stock_subscriptions");var Su=q,es=Su;var Ye=class Ye extends i{async create(e,t,r){return this.resources.create({...e,type:Ye.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ye.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ye.TYPE}:e,t);}async inventory_stock_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_stock_locations"},`inventory_models/${s}/inventory_stock_locations`,t,r)}async inventory_return_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_return_locations"},`inventory_models/${s}/inventory_return_locations`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`inventory_models/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`inventory_models/${s}/versions`,t,r)}isInventoryModel(e){return e.type&&e.type===Ye.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ye.TYPE}};n(Ye,"TYPE","inventory_models");var xu=Ye,ts=xu;var Ue=class Ue extends i{async create(e,t,r){return this.resources.create({...e,type:Ue.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ue.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ue.TYPE}:e,t);}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`inventory_return_locations/${s}/stock_location`,t,r)}async inventory_model(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_models"},`inventory_return_locations/${s}/inventory_model`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`inventory_return_locations/${s}/versions`,t,r)}isInventoryReturnLocation(e){return e.type&&e.type===Ue.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ue.TYPE}};n(Ue,"TYPE","inventory_return_locations");var vu=Ue,rs=vu;var Ve=class Ve extends i{async create(e,t,r){return this.resources.create({...e,type:Ve.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ve.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ve.TYPE}:e,t);}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`inventory_stock_locations/${s}/stock_location`,t,r)}async inventory_model(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_models"},`inventory_stock_locations/${s}/inventory_model`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`inventory_stock_locations/${s}/versions`,t,r)}isInventoryStockLocation(e){return e.type&&e.type===Ve.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ve.TYPE}};n(Ve,"TYPE","inventory_stock_locations");var Lu=Ve,ss=Lu;var Fe=class Fe extends i{async create(e,t,r){return this.resources.create({...e,type:Fe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Fe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Fe.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`klarna_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`klarna_gateways/${s}/versions`,t,r)}async klarna_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"klarna_payments"},`klarna_gateways/${s}/klarna_payments`,t,r)}isKlarnaGateway(e){return e.type&&e.type===Fe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Fe.TYPE}};n(Fe,"TYPE","klarna_gateways");var bu=Fe,os=bu;var ne=class ne extends i{async create(e,t,r){return this.resources.create({...e,type:ne.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ne.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ne.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`klarna_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`klarna_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`klarna_payments/${s}/versions`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ne.TYPE,_update:true},t,r)}isKlarnaPayment(e){return e.type&&e.type===ne.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ne.TYPE}};n(ne,"TYPE","klarna_payments");var wu=ne,ns=wu;var $e=class $e extends i{async create(e,t,r){return this.resources.create({...e,type:$e.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:$e.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:$e.TYPE}:e,t);}async line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`line_item_options/${s}/line_item`,t,r)}async sku_option(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_options"},`line_item_options/${s}/sku_option`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`line_item_options/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`line_item_options/${s}/tags`,t,r)}isLineItemOption(e){return e.type&&e.type===$e.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return $e.TYPE}};n($e,"TYPE","line_item_options");var Au=$e,is=Au;var w=class w extends i{async create(e,t,r){return this.resources.create({...e,type:w.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:w.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:w.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`line_items/${s}/order`,t,r)}async line_item_options(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_item_options"},`line_items/${s}/line_item_options`,t,r)}async return_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"return_line_items"},`line_items/${s}/return_line_items`,t,r)}async stock_reservations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`line_items/${s}/stock_reservations`,t,r)}async stock_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`line_items/${s}/stock_line_items`,t,r)}async stock_transfers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_transfers"},`line_items/${s}/stock_transfers`,t,r)}async notifications(e,t,r){let s=e.id||e;return this.resources.fetch({type:"notifications"},`line_items/${s}/notifications`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`line_items/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`line_items/${s}/tags`,t,r)}async _external_price(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:w.TYPE,_external_price:true},t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:w.TYPE,_reserve_stock:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:w.TYPE,_reset_circuit:true},t,r)}isLineItem(e){return e.type&&e.type===w.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return w.TYPE}};n(w,"TYPE","line_items");var Eu=w,as=Eu;var D=class D extends i{async create(e,t,r){return this.resources.create({...e,type:D.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:D.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:D.TYPE}:e,t);}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`links/${s}/events`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:D.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:D.TYPE,_enable:true},t,r)}isLink(e){return e.type&&e.type===D.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return D.TYPE}};n(D,"TYPE","links");var Ou=D,us=Ou;var Be=class Be extends i{async create(e,t,r){return this.resources.create({...e,type:Be.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Be.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Be.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`manual_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`manual_gateways/${s}/versions`,t,r)}isManualGateway(e){return e.type&&e.type===Be.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Be.TYPE}};n(Be,"TYPE","manual_gateways");var Iu=Be,cs=Iu;var qe=class qe extends i{async create(e,t,r){return this.resources.create({...e,type:qe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:qe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:qe.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`manual_tax_calculators/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`manual_tax_calculators/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`manual_tax_calculators/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`manual_tax_calculators/${s}/versions`,t,r)}async tax_rules(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tax_rules"},`manual_tax_calculators/${s}/tax_rules`,t,r)}isManualTaxCalculator(e){return e.type&&e.type===qe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return qe.TYPE}};n(qe,"TYPE","manual_tax_calculators");var Mu=qe,ps=Mu;var z=class z extends i{async create(e,t,r){return this.resources.create({...e,type:z.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:z.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:z.TYPE}:e,t);}async merchant(e,t,r){let s=e.id||e;return this.resources.fetch({type:"merchants"},`markets/${s}/merchant`,t,r)}async price_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_lists"},`markets/${s}/price_list`,t,r)}async base_price_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_lists"},`markets/${s}/base_price_list`,t,r)}async inventory_model(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_models"},`markets/${s}/inventory_model`,t,r)}async subscription_model(e,t,r){let s=e.id||e;return this.resources.fetch({type:"subscription_models"},`markets/${s}/subscription_model`,t,r)}async tax_calculator(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tax_calculators"},`markets/${s}/tax_calculator`,t,r)}async customer_group(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_groups"},`markets/${s}/customer_group`,t,r)}async geocoder(e,t,r){let s=e.id||e;return this.resources.fetch({type:"geocoders"},`markets/${s}/geocoder`,t,r)}async stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stores"},`markets/${s}/stores`,t,r)}async price_list_schedulers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_list_schedulers"},`markets/${s}/price_list_schedulers`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`markets/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`markets/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:z.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:z.TYPE,_enable:true},t,r)}isMarket(e){return e.type&&e.type===z.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return z.TYPE}};n(z,"TYPE","markets");var Qu=z,ls=Qu;var De=class De extends i{async create(e,t,r){return this.resources.create({...e,type:De.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:De.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:De.TYPE}:e,t);}async address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`merchants/${s}/address`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`merchants/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`merchants/${s}/versions`,t,r)}isMerchant(e){return e.type&&e.type===De.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return De.TYPE}};n(De,"TYPE","merchants");var Gu=De,ms=Gu;var ze=class ze extends i{async create(e,t,r){return this.resources.create({...e,type:ze.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ze.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ze.TYPE}:e,t);}isNotification(e){return e.type&&e.type===ze.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ze.TYPE}};n(ze,"TYPE","notifications");var Yu=ze,ys=Yu;var je=class je extends i{async create(e,t,r){return this.resources.create({...e,type:je.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:je.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:je.TYPE}:e,t);}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`order_amount_promotion_rules/${s}/versions`,t,r)}isOrderAmountPromotionRule(e){return e.type&&e.type===je.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return je.TYPE}};n(je,"TYPE","order_amount_promotion_rules");var Uu=je,ds=Uu;var We=class We extends i{async create(e,t,r){return this.resources.create({...e,type:We.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:We.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:We.TYPE}:e,t);}async source_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_copies/${s}/source_order`,t,r)}async target_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_copies/${s}/target_order`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`order_copies/${s}/events`,t,r)}async order_subscription(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`order_copies/${s}/order_subscription`,t,r)}isOrderCopy(e){return e.type&&e.type===We.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return We.TYPE}};n(We,"TYPE","order_copies");var Vu=We,Rs=Vu;var gs=class gs extends i{async source_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_factories/${s}/source_order`,t,r)}async target_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_factories/${s}/target_order`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`order_factories/${s}/events`,t,r)}isOrderFactory(e){return e.type&&e.type===gs.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return gs.TYPE}};n(gs,"TYPE","order_factories");var Fu=gs,_s=Fu;var Ke=class Ke extends i{async create(e,t,r){return this.resources.create({...e,type:Ke.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ke.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ke.TYPE}:e,t);}async order_subscription(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`order_subscription_items/${s}/order_subscription`,t,r)}async source_line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`order_subscription_items/${s}/source_line_item`,t,r)}isOrderSubscriptionItem(e){return e.type&&e.type===Ke.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ke.TYPE}};n(Ke,"TYPE","order_subscription_items");var $u=Ke,Ps=$u;var S=class S extends i{async create(e,t,r){return this.resources.create({...e,type:S.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:S.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:S.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`order_subscriptions/${s}/market`,t,r)}async subscription_model(e,t,r){let s=e.id||e;return this.resources.fetch({type:"subscription_models"},`order_subscriptions/${s}/subscription_model`,t,r)}async source_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_subscriptions/${s}/source_order`,t,r)}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`order_subscriptions/${s}/customer`,t,r)}async customer_payment_source(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`order_subscriptions/${s}/customer_payment_source`,t,r)}async order_subscription_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscription_items"},`order_subscriptions/${s}/order_subscription_items`,t,r)}async order_factories(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_factories"},`order_subscriptions/${s}/order_factories`,t,r)}async recurring_order_copies(e,t,r){let s=e.id||e;return this.resources.fetch({type:"recurring_order_copies"},`order_subscriptions/${s}/recurring_order_copies`,t,r)}async orders(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_subscriptions/${s}/orders`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`order_subscriptions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`order_subscriptions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`order_subscriptions/${s}/versions`,t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_deactivate:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_cancel:true},t,r)}async _convert(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_convert:true},t,r)}isOrderSubscription(e){return e.type&&e.type===S.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return S.TYPE}};n(S,"TYPE","order_subscriptions");var Bu=S,hs=Bu;var y=class y extends i{async create(e,t,r){return this.resources.create({...e,type:y.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:y.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:y.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`orders/${s}/market`,t,r)}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`orders/${s}/customer`,t,r)}async shipping_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`orders/${s}/shipping_address`,t,r)}async billing_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`orders/${s}/billing_address`,t,r)}async store(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stores"},`orders/${s}/store`,t,r)}async available_payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`orders/${s}/available_payment_methods`,t,r)}async available_customer_payment_sources(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`orders/${s}/available_customer_payment_sources`,t,r)}async available_free_skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`orders/${s}/available_free_skus`,t,r)}async available_free_bundles(e,t,r){let s=e.id||e;return this.resources.fetch({type:"bundles"},`orders/${s}/available_free_bundles`,t,r)}async payment_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`orders/${s}/payment_method`,t,r)}async line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`orders/${s}/line_items`,t,r)}async line_item_options(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_item_options"},`orders/${s}/line_item_options`,t,r)}async stock_reservations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`orders/${s}/stock_reservations`,t,r)}async stock_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`orders/${s}/stock_line_items`,t,r)}async stock_transfers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_transfers"},`orders/${s}/stock_transfers`,t,r)}async shipments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipments"},`orders/${s}/shipments`,t,r)}async payment_options(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_options"},`orders/${s}/payment_options`,t,r)}async authorizations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"authorizations"},`orders/${s}/authorizations`,t,r)}async captures(e,t,r){let s=e.id||e;return this.resources.fetch({type:"captures"},`orders/${s}/captures`,t,r)}async voids(e,t,r){let s=e.id||e;return this.resources.fetch({type:"voids"},`orders/${s}/voids`,t,r)}async refunds(e,t,r){let s=e.id||e;return this.resources.fetch({type:"refunds"},`orders/${s}/refunds`,t,r)}async returns(e,t,r){let s=e.id||e;return this.resources.fetch({type:"returns"},`orders/${s}/returns`,t,r)}async order_subscription(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`orders/${s}/order_subscription`,t,r)}async order_subscriptions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`orders/${s}/order_subscriptions`,t,r)}async order_factories(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_factories"},`orders/${s}/order_factories`,t,r)}async order_copies(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_copies"},`orders/${s}/order_copies`,t,r)}async recurring_order_copies(e,t,r){let s=e.id||e;return this.resources.fetch({type:"recurring_order_copies"},`orders/${s}/recurring_order_copies`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`orders/${s}/attachments`,t,r)}async notifications(e,t,r){let s=e.id||e;return this.resources.fetch({type:"notifications"},`orders/${s}/notifications`,t,r)}async links(e,t,r){let s=e.id||e;return this.resources.fetch({type:"links"},`orders/${s}/links`,t,r)}async resource_errors(e,t,r){let s=e.id||e;return this.resources.fetch({type:"resource_errors"},`orders/${s}/resource_errors`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`orders/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`orders/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`orders/${s}/versions`,t,r)}async _archive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_archive:true},t,r)}async _unarchive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_unarchive:true},t,r)}async _pending(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_pending:true},t,r)}async _place(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_place:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_cancel:true},t,r)}async _approve(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_approve:true},t,r)}async _approve_and_capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_approve_and_capture:true},t,r)}async _authorize(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_authorize:true},t,r)}async _authorization_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_authorization_amount_cents:t},r,s)}async _capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_capture:true},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_refund:true},t,r)}async _fulfill(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_fulfill:true},t,r)}async _update_taxes(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_update_taxes:true},t,r)}async _nullify_payment_source(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_nullify_payment_source:true},t,r)}async _fix_payment_source(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_fix_payment_source:true},t,r)}async _billing_address_clone_id(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_billing_address_clone_id:t},r,s)}async _shipping_address_clone_id(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_shipping_address_clone_id:t},r,s)}async _customer_payment_source_id(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_customer_payment_source_id:t},r,s)}async _shipping_address_same_as_billing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_shipping_address_same_as_billing:true},t,r)}async _billing_address_same_as_shipping(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_billing_address_same_as_shipping:true},t,r)}async _commit_invoice(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_commit_invoice:true},t,r)}async _refund_invoice(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_refund_invoice:true},t,r)}async _save_payment_source_to_customer_wallet(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_save_payment_source_to_customer_wallet:true},t,r)}async _save_shipping_address_to_customer_address_book(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_save_shipping_address_to_customer_address_book:true},t,r)}async _save_billing_address_to_customer_address_book(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_save_billing_address_to_customer_address_book:true},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_refresh:true},t,r)}async _validate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_validate:true},t,r)}async _create_subscriptions(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_create_subscriptions:true},t,r)}async _start_editing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_start_editing:true},t,r)}async _stop_editing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_stop_editing:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_reset_circuit:true},t,r)}isOrder(e){return e.type&&e.type===y.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return y.TYPE}};n(y,"TYPE","orders");var qu=y,fs=qu;var ks=class ks extends Yt{isOrganization(e){return e.type&&e.type===ks.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ks.TYPE}path(){return "organization"}};n(ks,"TYPE","organizations");var Du=ks,Cs=Du;var Ne=class Ne extends i{async create(e,t,r){return this.resources.create({...e,type:Ne.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ne.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ne.TYPE}:e,t);}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`packages/${s}/stock_location`,t,r)}async parcels(e,t,r){let s=e.id||e;return this.resources.fetch({type:"parcels"},`packages/${s}/parcels`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`packages/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`packages/${s}/versions`,t,r)}isPackage(e){return e.type&&e.type===Ne.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ne.TYPE}};n(Ne,"TYPE","packages");var zu=Ne,Ts=zu;var Xe=class Xe extends i{async create(e,t,r){return this.resources.create({...e,type:Xe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Xe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Xe.TYPE}:e,t);}async parcel(e,t,r){let s=e.id||e;return this.resources.fetch({type:"parcels"},`parcel_line_items/${s}/parcel`,t,r)}async stock_line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`parcel_line_items/${s}/stock_line_item`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`parcel_line_items/${s}/versions`,t,r)}isParcelLineItem(e){return e.type&&e.type===Xe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Xe.TYPE}};n(Xe,"TYPE","parcel_line_items");var ju=Xe,Ss=ju;var Ze=class Ze extends i{async create(e,t,r){return this.resources.create({...e,type:Ze.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ze.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ze.TYPE}:e,t);}async shipment(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipments"},`parcels/${s}/shipment`,t,r)}async package(e,t,r){let s=e.id||e;return this.resources.fetch({type:"packages"},`parcels/${s}/package`,t,r)}async parcel_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"parcel_line_items"},`parcels/${s}/parcel_line_items`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`parcels/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`parcels/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`parcels/${s}/versions`,t,r)}isParcel(e){return e.type&&e.type===Ze.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ze.TYPE}};n(Ze,"TYPE","parcels");var Wu=Ze,xs=Wu;var vs=class vs extends i{async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`payment_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`payment_gateways/${s}/versions`,t,r)}isPaymentGateway(e){return e.type&&e.type===vs.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return vs.TYPE}};n(vs,"TYPE","payment_gateways");var Ku=vs,Ls=Ku;var j=class j extends i{async create(e,t,r){return this.resources.create({...e,type:j.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:j.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:j.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`payment_methods/${s}/market`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`payment_methods/${s}/payment_gateway`,t,r)}async store(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stores"},`payment_methods/${s}/store`,t,r)}async orders(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`payment_methods/${s}/orders`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`payment_methods/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`payment_methods/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:j.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:j.TYPE,_enable:true},t,r)}isPaymentMethod(e){return e.type&&e.type===j.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return j.TYPE}};n(j,"TYPE","payment_methods");var Nu=j,bs=Nu;var He=class He extends i{async create(e,t,r){return this.resources.create({...e,type:He.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:He.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:He.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`payment_options/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`payment_options/${s}/attachments`,t,r)}isPaymentOption(e){return e.type&&e.type===He.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return He.TYPE}};n(He,"TYPE","payment_options");var Xu=He,ws=Xu;var Je=class Je extends i{async create(e,t,r){return this.resources.create({...e,type:Je.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Je.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Je.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`paypal_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`paypal_gateways/${s}/versions`,t,r)}async paypal_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"paypal_payments"},`paypal_gateways/${s}/paypal_payments`,t,r)}isPaypalGateway(e){return e.type&&e.type===Je.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Je.TYPE}};n(Je,"TYPE","paypal_gateways");var Zu=Je,As=Zu;var et=class et extends i{async create(e,t,r){return this.resources.create({...e,type:et.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:et.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:et.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`paypal_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`paypal_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`paypal_payments/${s}/versions`,t,r)}isPaypalPayment(e){return e.type&&e.type===et.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return et.TYPE}};n(et,"TYPE","paypal_payments");var Hu=et,Es=Hu;var W=class W extends i{async create(e,t,r){return this.resources.create({...e,type:W.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:W.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:W.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`percentage_discount_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`percentage_discount_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`percentage_discount_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`percentage_discount_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`percentage_discount_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`percentage_discount_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`percentage_discount_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`percentage_discount_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`percentage_discount_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`percentage_discount_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`percentage_discount_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`percentage_discount_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:W.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:W.TYPE,_enable:true},t,r)}isPercentageDiscountPromotion(e){return e.type&&e.type===W.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return W.TYPE}};n(W,"TYPE","percentage_discount_promotions");var Ju=W,Os=Ju;var tt=class tt extends i{async create(e,t,r){return this.resources.create({...e,type:tt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:tt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:tt.TYPE}:e,t);}async price(e,t,r){let s=e.id||e;return this.resources.fetch({type:"prices"},`price_frequency_tiers/${s}/price`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`price_frequency_tiers/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`price_frequency_tiers/${s}/versions`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`price_frequency_tiers/${s}/events`,t,r)}isPriceFrequencyTier(e){return e.type&&e.type===tt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return tt.TYPE}};n(tt,"TYPE","price_frequency_tiers");var ec=tt,Is=ec;var K=class K extends i{async create(e,t,r){return this.resources.create({...e,type:K.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:K.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:K.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`price_list_schedulers/${s}/market`,t,r)}async price_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_lists"},`price_list_schedulers/${s}/price_list`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`price_list_schedulers/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`price_list_schedulers/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:K.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:K.TYPE,_enable:true},t,r)}isPriceListScheduler(e){return e.type&&e.type===K.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return K.TYPE}};n(K,"TYPE","price_list_schedulers");var tc=K,Ms=tc;var rt=class rt extends i{async create(e,t,r){return this.resources.create({...e,type:rt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:rt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:rt.TYPE}:e,t);}async prices(e,t,r){let s=e.id||e;return this.resources.fetch({type:"prices"},`price_lists/${s}/prices`,t,r)}async price_list_schedulers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_list_schedulers"},`price_lists/${s}/price_list_schedulers`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`price_lists/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`price_lists/${s}/versions`,t,r)}isPriceList(e){return e.type&&e.type===rt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return rt.TYPE}};n(rt,"TYPE","price_lists");var rc=rt,Qs=rc;var Gs=class Gs extends i{async price(e,t,r){let s=e.id||e;return this.resources.fetch({type:"prices"},`price_tiers/${s}/price`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`price_tiers/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`price_tiers/${s}/versions`,t,r)}isPriceTier(e){return e.type&&e.type===Gs.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Gs.TYPE}};n(Gs,"TYPE","price_tiers");var sc=Gs,Ys=sc;var st=class st extends i{async create(e,t,r){return this.resources.create({...e,type:st.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:st.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:st.TYPE}:e,t);}async price(e,t,r){let s=e.id||e;return this.resources.fetch({type:"prices"},`price_volume_tiers/${s}/price`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`price_volume_tiers/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`price_volume_tiers/${s}/versions`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`price_volume_tiers/${s}/events`,t,r)}isPriceVolumeTier(e){return e.type&&e.type===st.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return st.TYPE}};n(st,"TYPE","price_volume_tiers");var oc=st,Us=oc;var ot=class ot extends i{async create(e,t,r){return this.resources.create({...e,type:ot.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ot.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ot.TYPE}:e,t);}async price_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_lists"},`prices/${s}/price_list`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`prices/${s}/sku`,t,r)}async price_tiers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_tiers"},`prices/${s}/price_tiers`,t,r)}async price_volume_tiers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_volume_tiers"},`prices/${s}/price_volume_tiers`,t,r)}async price_frequency_tiers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_frequency_tiers"},`prices/${s}/price_frequency_tiers`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`prices/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`prices/${s}/versions`,t,r)}async jwt_customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`prices/${s}/jwt_customer`,t,r)}async jwt_markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`prices/${s}/jwt_markets`,t,r)}async jwt_stock_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`prices/${s}/jwt_stock_locations`,t,r)}isPrice(e){return e.type&&e.type===ot.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ot.TYPE}};n(ot,"TYPE","prices");var nc=ot,Vs=nc;var Fs=class Fs extends i{async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`promotion_rules/${s}/versions`,t,r)}isPromotionRule(e){return e.type&&e.type===Fs.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Fs.TYPE}};n(Fs,"TYPE","promotion_rules");var ic=Fs,$s=ic;var Bs=class Bs extends i{async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`promotions/${s}/versions`,t,r)}isPromotion(e){return e.type&&e.type===Bs.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Bs.TYPE}};n(Bs,"TYPE","promotions");var ac=Bs,qs=ac;var nt=class nt extends i{async create(e,t,r){return this.resources.create({...e,type:nt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:nt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:nt.TYPE}:e,t);}async source_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`recurring_order_copies/${s}/source_order`,t,r)}async target_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`recurring_order_copies/${s}/target_order`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`recurring_order_copies/${s}/events`,t,r)}async order_subscription(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`recurring_order_copies/${s}/order_subscription`,t,r)}isRecurringOrderCopy(e){return e.type&&e.type===nt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return nt.TYPE}};n(nt,"TYPE","recurring_order_copies");var uc=nt,Ds=uc;var At=class At extends i{async update(e,t,r){return this.resources.update({...e,type:At.TYPE},t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`refunds/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`refunds/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`refunds/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`refunds/${s}/versions`,t,r)}async reference_capture(e,t,r){let s=e.id||e;return this.resources.fetch({type:"captures"},`refunds/${s}/reference_capture`,t,r)}async return(e,t,r){let s=e.id||e;return this.resources.fetch({type:"returns"},`refunds/${s}/return`,t,r)}async _forward(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:At.TYPE,_forward:true},t,r)}isRefund(e){return e.type&&e.type===At.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return At.TYPE}};n(At,"TYPE","refunds");var cc=At,zs=cc;var js=class js extends i{async stock_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_items"},`reserved_stocks/${s}/stock_item`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`reserved_stocks/${s}/sku`,t,r)}async stock_reservations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`reserved_stocks/${s}/stock_reservations`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`reserved_stocks/${s}/versions`,t,r)}isReservedStock(e){return e.type&&e.type===js.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return js.TYPE}};n(js,"TYPE","reserved_stocks");var pc=js,Ws=pc;var Ks=class Ks extends i{isResourceError(e){return e.type&&e.type===Ks.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ks.TYPE}};n(Ks,"TYPE","resource_errors");var lc=Ks,Ns=lc;var ie=class ie extends i{async create(e,t,r){return this.resources.create({...e,type:ie.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ie.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ie.TYPE}:e,t);}async return(e,t,r){let s=e.id||e;return this.resources.fetch({type:"returns"},`return_line_items/${s}/return`,t,r)}async line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`return_line_items/${s}/line_item`,t,r)}async _restock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ie.TYPE,_restock:true},t,r)}isReturnLineItem(e){return e.type&&e.type===ie.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ie.TYPE}};n(ie,"TYPE","return_line_items");var mc=ie,Xs=mc;var _=class _ extends i{async create(e,t,r){return this.resources.create({...e,type:_.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:_.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:_.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`returns/${s}/order`,t,r)}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`returns/${s}/customer`,t,r)}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`returns/${s}/stock_location`,t,r)}async origin_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`returns/${s}/origin_address`,t,r)}async destination_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`returns/${s}/destination_address`,t,r)}async reference_capture(e,t,r){let s=e.id||e;return this.resources.fetch({type:"captures"},`returns/${s}/reference_capture`,t,r)}async reference_refund(e,t,r){let s=e.id||e;return this.resources.fetch({type:"refunds"},`returns/${s}/reference_refund`,t,r)}async return_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"return_line_items"},`returns/${s}/return_line_items`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`returns/${s}/attachments`,t,r)}async resource_errors(e,t,r){let s=e.id||e;return this.resources.fetch({type:"resource_errors"},`returns/${s}/resource_errors`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`returns/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`returns/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`returns/${s}/versions`,t,r)}async _request(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_request:true},t,r)}async _approve(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_approve:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_cancel:true},t,r)}async _ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_ship:true},t,r)}async _reject(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_reject:true},t,r)}async _receive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_receive:true},t,r)}async _restock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_restock:true},t,r)}async _archive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_archive:true},t,r)}async _unarchive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_unarchive:true},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_refund:true},t,r)}async _refund_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_refund_amount_cents:t},r,s)}isReturn(e){return e.type&&e.type===_.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return _.TYPE}};n(_,"TYPE","returns");var yc=_,Zs=yc;var it=class it extends i{async create(e,t,r){return this.resources.create({...e,type:it.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:it.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:it.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`satispay_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`satispay_gateways/${s}/versions`,t,r)}async satispay_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"satispay_payments"},`satispay_gateways/${s}/satispay_payments`,t,r)}isSatispayGateway(e){return e.type&&e.type===it.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return it.TYPE}};n(it,"TYPE","satispay_gateways");var dc=it,Hs=dc;var ae=class ae extends i{async create(e,t,r){return this.resources.create({...e,type:ae.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ae.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ae.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`satispay_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`satispay_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`satispay_payments/${s}/versions`,t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ae.TYPE,_refresh:true},t,r)}isSatispayPayment(e){return e.type&&e.type===ae.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ae.TYPE}};n(ae,"TYPE","satispay_payments");var Rc=ae,Js=Rc;var g=class g extends i{async create(e,t,r){return this.resources.create({...e,type:g.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:g.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:g.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`shipments/${s}/order`,t,r)}async shipping_category(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_categories"},`shipments/${s}/shipping_category`,t,r)}async inventory_stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_stock_locations"},`shipments/${s}/inventory_stock_location`,t,r)}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`shipments/${s}/stock_location`,t,r)}async origin_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`shipments/${s}/origin_address`,t,r)}async shipping_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`shipments/${s}/shipping_address`,t,r)}async shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`shipments/${s}/shipping_method`,t,r)}async delivery_lead_time(e,t,r){let s=e.id||e;return this.resources.fetch({type:"delivery_lead_times"},`shipments/${s}/delivery_lead_time`,t,r)}async stock_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`shipments/${s}/stock_line_items`,t,r)}async stock_transfers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_transfers"},`shipments/${s}/stock_transfers`,t,r)}async line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`shipments/${s}/line_items`,t,r)}async available_shipping_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`shipments/${s}/available_shipping_methods`,t,r)}async carrier_accounts(e,t,r){let s=e.id||e;return this.resources.fetch({type:"carrier_accounts"},`shipments/${s}/carrier_accounts`,t,r)}async parcels(e,t,r){let s=e.id||e;return this.resources.fetch({type:"parcels"},`shipments/${s}/parcels`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipments/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`shipments/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`shipments/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipments/${s}/versions`,t,r)}async _upcoming(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_upcoming:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_cancel:true},t,r)}async _on_hold(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_on_hold:true},t,r)}async _picking(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_picking:true},t,r)}async _packing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_packing:true},t,r)}async _ready_to_ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_ready_to_ship:true},t,r)}async _ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_ship:true},t,r)}async _deliver(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_deliver:true},t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_reserve_stock:true},t,r)}async _release_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_release_stock:true},t,r)}async _decrement_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_decrement_stock:true},t,r)}async _get_rates(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_get_rates:true},t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_purchase:true},t,r)}isShipment(e){return e.type&&e.type===g.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return g.TYPE}};n(g,"TYPE","shipments");var gc=g,eo=gc;var at=class at extends i{async create(e,t,r){return this.resources.create({...e,type:at.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:at.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:at.TYPE}:e,t);}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`shipping_categories/${s}/skus`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_categories/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipping_categories/${s}/versions`,t,r)}isShippingCategory(e){return e.type&&e.type===at.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return at.TYPE}};n(at,"TYPE","shipping_categories");var _c=at,to=_c;var ro=class ro extends i{async shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`shipping_method_tiers/${s}/shipping_method`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_method_tiers/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipping_method_tiers/${s}/versions`,t,r)}isShippingMethodTier(e){return e.type&&e.type===ro.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ro.TYPE}};n(ro,"TYPE","shipping_method_tiers");var Pc=ro,so=Pc;var A=class A extends i{async create(e,t,r){return this.resources.create({...e,type:A.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:A.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:A.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`shipping_methods/${s}/market`,t,r)}async shipping_zone(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_zones"},`shipping_methods/${s}/shipping_zone`,t,r)}async shipping_category(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_categories"},`shipping_methods/${s}/shipping_category`,t,r)}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`shipping_methods/${s}/stock_location`,t,r)}async delivery_lead_time_for_shipment(e,t,r){let s=e.id||e;return this.resources.fetch({type:"delivery_lead_times"},`shipping_methods/${s}/delivery_lead_time_for_shipment`,t,r)}async shipping_method_tiers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_method_tiers"},`shipping_methods/${s}/shipping_method_tiers`,t,r)}async shipping_weight_tiers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_weight_tiers"},`shipping_methods/${s}/shipping_weight_tiers`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_methods/${s}/attachments`,t,r)}async notifications(e,t,r){let s=e.id||e;return this.resources.fetch({type:"notifications"},`shipping_methods/${s}/notifications`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipping_methods/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:A.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:A.TYPE,_enable:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:A.TYPE,_reset_circuit:true},t,r)}isShippingMethod(e){return e.type&&e.type===A.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return A.TYPE}};n(A,"TYPE","shipping_methods");var hc=A,oo=hc;var ut=class ut extends i{async create(e,t,r){return this.resources.create({...e,type:ut.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ut.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ut.TYPE}:e,t);}async shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`shipping_weight_tiers/${s}/shipping_method`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_weight_tiers/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipping_weight_tiers/${s}/versions`,t,r)}isShippingWeightTier(e){return e.type&&e.type===ut.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ut.TYPE}};n(ut,"TYPE","shipping_weight_tiers");var fc=ut,no=fc;var ct=class ct extends i{async create(e,t,r){return this.resources.create({...e,type:ct.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ct.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ct.TYPE}:e,t);}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_zones/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipping_zones/${s}/versions`,t,r)}isShippingZone(e){return e.type&&e.type===ct.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ct.TYPE}};n(ct,"TYPE","shipping_zones");var kc=ct,io=kc;var pt=class pt extends i{async create(e,t,r){return this.resources.create({...e,type:pt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:pt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:pt.TYPE}:e,t);}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`sku_list_items/${s}/sku_list`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`sku_list_items/${s}/sku`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`sku_list_items/${s}/versions`,t,r)}isSkuListItem(e){return e.type&&e.type===pt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return pt.TYPE}};n(pt,"TYPE","sku_list_items");var Cc=pt,ao=Cc;var lt=class lt extends i{async create(e,t,r){return this.resources.create({...e,type:lt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:lt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:lt.TYPE}:e,t);}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`sku_list_promotion_rules/${s}/versions`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`sku_list_promotion_rules/${s}/sku_list`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`sku_list_promotion_rules/${s}/skus`,t,r)}isSkuListPromotionRule(e){return e.type&&e.type===lt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return lt.TYPE}};n(lt,"TYPE","sku_list_promotion_rules");var Tc=lt,uo=Tc;var mt=class mt extends i{async create(e,t,r){return this.resources.create({...e,type:mt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:mt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:mt.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`sku_lists/${s}/customer`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`sku_lists/${s}/skus`,t,r)}async sku_list_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_items"},`sku_lists/${s}/sku_list_items`,t,r)}async bundles(e,t,r){let s=e.id||e;return this.resources.fetch({type:"bundles"},`sku_lists/${s}/bundles`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`sku_lists/${s}/attachments`,t,r)}async links(e,t,r){let s=e.id||e;return this.resources.fetch({type:"links"},`sku_lists/${s}/links`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`sku_lists/${s}/versions`,t,r)}isSkuList(e){return e.type&&e.type===mt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return mt.TYPE}};n(mt,"TYPE","sku_lists");var Sc=mt,co=Sc;var yt=class yt extends i{async create(e,t,r){return this.resources.create({...e,type:yt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:yt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:yt.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`sku_options/${s}/market`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`sku_options/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`sku_options/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`sku_options/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`sku_options/${s}/versions`,t,r)}isSkuOption(e){return e.type&&e.type===yt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return yt.TYPE}};n(yt,"TYPE","sku_options");var xc=yt,po=xc;var dt=class dt extends i{async create(e,t,r){return this.resources.create({...e,type:dt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:dt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:dt.TYPE}:e,t);}async shipping_category(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_categories"},`skus/${s}/shipping_category`,t,r)}async prices(e,t,r){let s=e.id||e;return this.resources.fetch({type:"prices"},`skus/${s}/prices`,t,r)}async stock_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_items"},`skus/${s}/stock_items`,t,r)}async stock_reservations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`skus/${s}/stock_reservations`,t,r)}async delivery_lead_times(e,t,r){let s=e.id||e;return this.resources.fetch({type:"delivery_lead_times"},`skus/${s}/delivery_lead_times`,t,r)}async sku_options(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_options"},`skus/${s}/sku_options`,t,r)}async sku_list_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_items"},`skus/${s}/sku_list_items`,t,r)}async sku_lists(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`skus/${s}/sku_lists`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`skus/${s}/attachments`,t,r)}async links(e,t,r){let s=e.id||e;return this.resources.fetch({type:"links"},`skus/${s}/links`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`skus/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`skus/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`skus/${s}/versions`,t,r)}async jwt_customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`skus/${s}/jwt_customer`,t,r)}async jwt_markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`skus/${s}/jwt_markets`,t,r)}async jwt_stock_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`skus/${s}/jwt_stock_locations`,t,r)}isSku(e){return e.type&&e.type===dt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return dt.TYPE}};n(dt,"TYPE","skus");var vc=dt,lo=vc;var ue=class ue extends i{async create(e,t,r){return this.resources.create({...e,type:ue.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ue.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ue.TYPE}:e,t);}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`stock_items/${s}/stock_location`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`stock_items/${s}/sku`,t,r)}async reserved_stock(e,t,r){let s=e.id||e;return this.resources.fetch({type:"reserved_stocks"},`stock_items/${s}/reserved_stock`,t,r)}async stock_reservations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`stock_items/${s}/stock_reservations`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`stock_items/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stock_items/${s}/versions`,t,r)}async _validate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ue.TYPE,_validate:true},t,r)}isStockItem(e){return e.type&&e.type===ue.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ue.TYPE}};n(ue,"TYPE","stock_items");var Lc=ue,mo=Lc;var E=class E extends i{async create(e,t,r){return this.resources.create({...e,type:E.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:E.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:E.TYPE}:e,t);}async shipment(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipments"},`stock_line_items/${s}/shipment`,t,r)}async line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`stock_line_items/${s}/line_item`,t,r)}async stock_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_items"},`stock_line_items/${s}/stock_item`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`stock_line_items/${s}/sku`,t,r)}async stock_reservation(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`stock_line_items/${s}/stock_reservation`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stock_line_items/${s}/versions`,t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_reserve_stock:true},t,r)}async _release_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_release_stock:true},t,r)}async _decrement_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_decrement_stock:true},t,r)}isStockLineItem(e){return e.type&&e.type===E.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return E.TYPE}};n(E,"TYPE","stock_line_items");var bc=E,yo=bc;var Rt=class Rt extends i{async create(e,t,r){return this.resources.create({...e,type:Rt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Rt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Rt.TYPE}:e,t);}async address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`stock_locations/${s}/address`,t,r)}async inventory_stock_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_stock_locations"},`stock_locations/${s}/inventory_stock_locations`,t,r)}async inventory_return_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_return_locations"},`stock_locations/${s}/inventory_return_locations`,t,r)}async stock_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_items"},`stock_locations/${s}/stock_items`,t,r)}async stock_transfers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_transfers"},`stock_locations/${s}/stock_transfers`,t,r)}async stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stores"},`stock_locations/${s}/stores`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`stock_locations/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stock_locations/${s}/versions`,t,r)}isStockLocation(e){return e.type&&e.type===Rt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Rt.TYPE}};n(Rt,"TYPE","stock_locations");var wc=Rt,Ro=wc;var ce=class ce extends i{async create(e,t,r){return this.resources.create({...e,type:ce.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ce.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ce.TYPE}:e,t);}async line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`stock_reservations/${s}/line_item`,t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`stock_reservations/${s}/order`,t,r)}async stock_line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`stock_reservations/${s}/stock_line_item`,t,r)}async stock_transfer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_transfers"},`stock_reservations/${s}/stock_transfer`,t,r)}async stock_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_items"},`stock_reservations/${s}/stock_item`,t,r)}async reserved_stock(e,t,r){let s=e.id||e;return this.resources.fetch({type:"reserved_stocks"},`stock_reservations/${s}/reserved_stock`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`stock_reservations/${s}/sku`,t,r)}async _pending(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ce.TYPE,_pending:true},t,r)}isStockReservation(e){return e.type&&e.type===ce.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ce.TYPE}};n(ce,"TYPE","stock_reservations");var Ac=ce,go=Ac;var f=class f extends i{async create(e,t,r){return this.resources.create({...e,type:f.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:f.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:f.TYPE}:e,t);}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`stock_transfers/${s}/sku`,t,r)}async origin_stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`stock_transfers/${s}/origin_stock_location`,t,r)}async destination_stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`stock_transfers/${s}/destination_stock_location`,t,r)}async shipment(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipments"},`stock_transfers/${s}/shipment`,t,r)}async line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`stock_transfers/${s}/line_item`,t,r)}async stock_reservation(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`stock_transfers/${s}/stock_reservation`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`stock_transfers/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`stock_transfers/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stock_transfers/${s}/versions`,t,r)}async _upcoming(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_upcoming:true},t,r)}async _on_hold(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_on_hold:true},t,r)}async _picking(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_picking:true},t,r)}async _in_transit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_in_transit:true},t,r)}async _complete(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_complete:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_cancel:true},t,r)}isStockTransfer(e){return e.type&&e.type===f.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return f.TYPE}};n(f,"TYPE","stock_transfers");var Ec=f,_o=Ec;var gt=class gt extends i{async create(e,t,r){return this.resources.create({...e,type:gt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:gt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:gt.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`stores/${s}/market`,t,r)}async merchant(e,t,r){let s=e.id||e;return this.resources.fetch({type:"merchants"},`stores/${s}/merchant`,t,r)}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`stores/${s}/stock_location`,t,r)}async orders(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`stores/${s}/orders`,t,r)}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`stores/${s}/payment_methods`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`stores/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stores/${s}/versions`,t,r)}isStore(e){return e.type&&e.type===gt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return gt.TYPE}};n(gt,"TYPE","stores");var Oc=gt,Po=Oc;var _t=class _t extends i{async create(e,t,r){return this.resources.create({...e,type:_t.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:_t.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:_t.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`stripe_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stripe_gateways/${s}/versions`,t,r)}async stripe_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stripe_payments"},`stripe_gateways/${s}/stripe_payments`,t,r)}isStripeGateway(e){return e.type&&e.type===_t.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return _t.TYPE}};n(_t,"TYPE","stripe_gateways");var Ic=_t,ho=Ic;var N=class N extends i{async create(e,t,r){return this.resources.create({...e,type:N.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:N.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:N.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`stripe_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`stripe_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stripe_payments/${s}/versions`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:N.TYPE,_update:true},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:N.TYPE,_refresh:true},t,r)}isStripePayment(e){return e.type&&e.type===N.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return N.TYPE}};n(N,"TYPE","stripe_payments");var Mc=N,fo=Mc;var Pt=class Pt extends i{async create(e,t,r){return this.resources.create({...e,type:Pt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Pt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Pt.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`stripe_tax_accounts/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`stripe_tax_accounts/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`stripe_tax_accounts/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stripe_tax_accounts/${s}/versions`,t,r)}async tax_categories(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tax_categories"},`stripe_tax_accounts/${s}/tax_categories`,t,r)}isStripeTaxAccount(e){return e.type&&e.type===Pt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Pt.TYPE}};n(Pt,"TYPE","stripe_tax_accounts");var Qc=Pt,ko=Qc;var ht=class ht extends i{async create(e,t,r){return this.resources.create({...e,type:ht.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ht.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ht.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`subscription_models/${s}/markets`,t,r)}async order_subscriptions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`subscription_models/${s}/order_subscriptions`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`subscription_models/${s}/attachments`,t,r)}isSubscriptionModel(e){return e.type&&e.type===ht.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ht.TYPE}};n(ht,"TYPE","subscription_models");var Gc=ht,Co=Gc;var ft=class ft extends i{async create(e,t,r){return this.resources.create({...e,type:ft.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ft.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ft.TYPE}:e,t);}isTag(e){return e.type&&e.type===ft.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ft.TYPE}};n(ft,"TYPE","tags");var Yc=ft,To=Yc;var kt=class kt extends i{async create(e,t,r){return this.resources.create({...e,type:kt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:kt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:kt.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`talon_one_accounts/${s}/markets`,t,r)}async discount_engine_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"discount_engine_items"},`talon_one_accounts/${s}/discount_engine_items`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`talon_one_accounts/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`talon_one_accounts/${s}/versions`,t,r)}isTalonOneAccount(e){return e.type&&e.type===kt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return kt.TYPE}};n(kt,"TYPE","talon_one_accounts");var Uc=kt,So=Uc;var xo=class xo extends i{async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`tax_calculators/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`tax_calculators/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`tax_calculators/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`tax_calculators/${s}/versions`,t,r)}isTaxCalculator(e){return e.type&&e.type===xo.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return xo.TYPE}};n(xo,"TYPE","tax_calculators");var Vc=xo,vo=Vc;var Ct=class Ct extends i{async create(e,t,r){return this.resources.create({...e,type:Ct.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ct.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ct.TYPE}:e,t);}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`tax_categories/${s}/sku`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`tax_categories/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`tax_categories/${s}/versions`,t,r)}isTaxCategory(e){return e.type&&e.type===Ct.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ct.TYPE}};n(Ct,"TYPE","tax_categories");var Fc=Ct,Lo=Fc;var Tt=class Tt extends i{async create(e,t,r){return this.resources.create({...e,type:Tt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Tt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Tt.TYPE}:e,t);}async manual_tax_calculator(e,t,r){let s=e.id||e;return this.resources.fetch({type:"manual_tax_calculators"},`tax_rules/${s}/manual_tax_calculator`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`tax_rules/${s}/versions`,t,r)}isTaxRule(e){return e.type&&e.type===Tt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Tt.TYPE}};n(Tt,"TYPE","tax_rules");var $c=Tt,bo=$c;var St=class St extends i{async create(e,t,r){return this.resources.create({...e,type:St.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:St.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:St.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`taxjar_accounts/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`taxjar_accounts/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`taxjar_accounts/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`taxjar_accounts/${s}/versions`,t,r)}async tax_categories(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tax_categories"},`taxjar_accounts/${s}/tax_categories`,t,r)}isTaxjarAccount(e){return e.type&&e.type===St.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return St.TYPE}};n(St,"TYPE","taxjar_accounts");var Bc=St,wo=Bc;var Ao=class Ao extends i{async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`transactions/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`transactions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`transactions/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`transactions/${s}/versions`,t,r)}isTransaction(e){return e.type&&e.type===Ao.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ao.TYPE}};n(Ao,"TYPE","transactions");var qc=Ao,Eo=qc;var Oo=class Oo extends i{isVersion(e){return e.type&&e.type===Oo.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Oo.TYPE}};n(Oo,"TYPE","versions");var Dc=Oo,Io=Dc;var pe=class pe extends i{async create(e,t,r){return this.resources.create({...e,type:pe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:pe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:pe.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`vertex_accounts/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`vertex_accounts/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`vertex_accounts/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`vertex_accounts/${s}/versions`,t,r)}async _refresh_token(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:pe.TYPE,_refresh_token:true},t,r)}isVertexAccount(e){return e.type&&e.type===pe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return pe.TYPE}};n(pe,"TYPE","vertex_accounts");var zc=pe,Mo=zc;var Et=class Et extends i{async update(e,t,r){return this.resources.update({...e,type:Et.TYPE},t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`voids/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`voids/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`voids/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`voids/${s}/versions`,t,r)}async reference_authorization(e,t,r){let s=e.id||e;return this.resources.fetch({type:"authorizations"},`voids/${s}/reference_authorization`,t,r)}async _forward(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Et.TYPE,_forward:true},t,r)}isVoid(e){return e.type&&e.type===Et.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Et.TYPE}};n(Et,"TYPE","voids");var jc=Et,Qo=jc;var O=class O extends i{async create(e,t,r){return this.resources.create({...e,type:O.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:O.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:O.TYPE}:e,t);}async last_event_callbacks(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_callbacks"},`webhooks/${s}/last_event_callbacks`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`webhooks/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:O.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:O.TYPE,_enable:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:O.TYPE,_reset_circuit:true},t,r)}isWebhook(e){return e.type&&e.type===O.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return O.TYPE}};n(O,"TYPE","webhooks");var Wc=O,Go=Wc;var xt=class xt extends i{async create(e,t,r){return this.resources.create({...e,type:xt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:xt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:xt.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`wire_transfers/${s}/order`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`wire_transfers/${s}/versions`,t,r)}isWireTransfer(e){return e.type&&e.type===xt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return xt.TYPE}};n(xt,"TYPE","wire_transfers");var Kc=xt,Yo=Kc;var Qt=["addresses","adjustments","adyen_gateways","adyen_payments","applications","attachments","authorizations","avalara_accounts","axerve_gateways","axerve_payments","bing_geocoders","braintree_gateways","braintree_payments","bundles","buy_x_pay_y_promotions","captures","carrier_accounts","checkout_com_gateways","checkout_com_payments","cleanups","coupon_codes_promotion_rules","coupon_recipients","coupons","custom_promotion_rules","customer_addresses","customer_groups","customer_password_resets","customer_payment_sources","customer_subscriptions","customers","delivery_lead_times","discount_engine_items","discount_engines","event_callbacks","events","exports","external_gateways","external_payments","external_promotions","external_tax_calculators","fixed_amount_promotions","fixed_price_promotions","flex_promotions","free_gift_promotions","free_shipping_promotions","geocoders","gift_card_recipients","gift_cards","google_geocoders","imports","in_stock_subscriptions","inventory_models","inventory_return_locations","inventory_stock_locations","klarna_gateways","klarna_payments","line_item_options","line_items","links","manual_gateways","manual_tax_calculators","markets","merchants","notifications","order_amount_promotion_rules","order_copies","order_factories","order_subscription_items","order_subscriptions","orders","organizations","packages","parcel_line_items","parcels","payment_gateways","payment_methods","payment_options","paypal_gateways","paypal_payments","percentage_discount_promotions","price_frequency_tiers","price_list_schedulers","price_lists","price_tiers","price_volume_tiers","prices","promotion_rules","promotions","recurring_order_copies","refunds","reserved_stocks","resource_errors","return_line_items","returns","satispay_gateways","satispay_payments","shipments","shipping_categories","shipping_method_tiers","shipping_methods","shipping_weight_tiers","shipping_zones","sku_list_items","sku_list_promotion_rules","sku_lists","sku_options","skus","stock_items","stock_line_items","stock_locations","stock_reservations","stock_transfers","stores","stripe_gateways","stripe_payments","stripe_tax_accounts","subscription_models","tags","talon_one_accounts","tax_calculators","tax_categories","tax_rules","taxjar_accounts","transactions","versions","vertex_accounts","voids","webhooks","wire_transfers"],Ra=["applications","organizations"];var Ut={resources:a=>a?[...Qt].sort():Qt,singletons:a=>a?[...Ra].sort():Ra,isSingleton:a=>Ra.includes(a),isSdkError:a=>P.isSdkError(a),isApiError:a=>le.isApiError(a),init:a=>Xc(a),isTokenExpired:a=>ca(a),get schemaVersion(){return Nc}};var pp=C("commercelayer"),Nc="7.7.3";var l,Uo,Vo,Fo,$o,Bo,qo,Do,zo,jo,Wo,Ko,No,Xo,Zo,Ho,Jo,en,tn,rn,sn,on,nn,an,un,cn,pn,ln,mn,yn,dn,Rn,gn,_n,Pn,hn,fn,kn,Cn,Tn,Sn,xn,vn,Ln,bn,wn,An,En,On,In,Mn,Qn,Gn,Yn,Un,Vn,Fn,$n,Bn,qn,Dn,zn,jn,Wn,Kn,Nn,Xn,Zn,Hn,Jn,ei,ti,ri,si,oi,ni,ii,ai,ui,ci,pi,li,mi,yi,di,Ri,gi,_i,Pi,hi,fi,ki,Ci,Ti,Si,xi,vi,Li,bi,wi,Ai,Ei,Oi,Ii,Mi,Qi,Gi,Yi,Ui,Vi,Fi,$i,Bi,qi,Di,zi,ji,Wi,Ki,Ni,Xi,Zi,Hi,Ji,ea,ta,ra,sa,oa,na,Zc=class{constructor(e){n(this,"openApiSchemaVersion",Nc);c(this,l);c(this,Uo);c(this,Vo);c(this,Fo);c(this,$o);c(this,Bo);c(this,qo);c(this,Do);c(this,zo);c(this,jo);c(this,Wo);c(this,Ko);c(this,No);c(this,Xo);c(this,Zo);c(this,Ho);c(this,Jo);c(this,en);c(this,tn);c(this,rn);c(this,sn);c(this,on);c(this,nn);c(this,an);c(this,un);c(this,cn);c(this,pn);c(this,ln);c(this,mn);c(this,yn);c(this,dn);c(this,Rn);c(this,gn);c(this,_n);c(this,Pn);c(this,hn);c(this,fn);c(this,kn);c(this,Cn);c(this,Tn);c(this,Sn);c(this,xn);c(this,vn);c(this,Ln);c(this,bn);c(this,wn);c(this,An);c(this,En);c(this,On);c(this,In);c(this,Mn);c(this,Qn);c(this,Gn);c(this,Yn);c(this,Un);c(this,Vn);c(this,Fn);c(this,$n);c(this,Bn);c(this,qn);c(this,Dn);c(this,zn);c(this,jn);c(this,Wn);c(this,Kn);c(this,Nn);c(this,Xn);c(this,Zn);c(this,Hn);c(this,Jn);c(this,ei);c(this,ti);c(this,ri);c(this,si);c(this,oi);c(this,ni);c(this,ii);c(this,ai);c(this,ui);c(this,ci);c(this,pi);c(this,li);c(this,mi);c(this,yi);c(this,di);c(this,Ri);c(this,gi);c(this,_i);c(this,Pi);c(this,hi);c(this,fi);c(this,ki);c(this,Ci);c(this,Ti);c(this,Si);c(this,xi);c(this,vi);c(this,Li);c(this,bi);c(this,wi);c(this,Ai);c(this,Ei);c(this,Oi);c(this,Ii);c(this,Mi);c(this,Qi);c(this,Gi);c(this,Yi);c(this,Ui);c(this,Vi);c(this,Fi);c(this,$i);c(this,Bi);c(this,qi);c(this,Di);c(this,zi);c(this,ji);c(this,Wi);c(this,Ki);c(this,Ni);c(this,Xi);c(this,Zi);c(this,Hi);c(this,Ji);c(this,ea);c(this,ta);c(this,ra);c(this,sa);c(this,oa);c(this,na);pp("new commercelayer instance %O",e),u(this,l,new cp(e));}get addresses(){return o(this,Uo)||u(this,Uo,new Jt(o(this,l)))}get adjustments(){return o(this,Vo)||u(this,Vo,new er(o(this,l)))}get adyen_gateways(){return o(this,Fo)||u(this,Fo,new tr(o(this,l)))}get adyen_payments(){return o(this,$o)||u(this,$o,new rr(o(this,l)))}get application(){return o(this,Bo)||u(this,Bo,new or(o(this,l)))}get attachments(){return o(this,qo)||u(this,qo,new nr(o(this,l)))}get authorizations(){return o(this,Do)||u(this,Do,new ir(o(this,l)))}get avalara_accounts(){return o(this,zo)||u(this,zo,new ar(o(this,l)))}get axerve_gateways(){return o(this,jo)||u(this,jo,new ur(o(this,l)))}get axerve_payments(){return o(this,Wo)||u(this,Wo,new cr(o(this,l)))}get bing_geocoders(){return o(this,Ko)||u(this,Ko,new pr(o(this,l)))}get braintree_gateways(){return o(this,No)||u(this,No,new lr(o(this,l)))}get braintree_payments(){return o(this,Xo)||u(this,Xo,new mr(o(this,l)))}get bundles(){return o(this,Zo)||u(this,Zo,new yr(o(this,l)))}get buy_x_pay_y_promotions(){return o(this,Ho)||u(this,Ho,new dr(o(this,l)))}get captures(){return o(this,Jo)||u(this,Jo,new Rr(o(this,l)))}get carrier_accounts(){return o(this,en)||u(this,en,new gr(o(this,l)))}get checkout_com_gateways(){return o(this,tn)||u(this,tn,new _r(o(this,l)))}get checkout_com_payments(){return o(this,rn)||u(this,rn,new Pr(o(this,l)))}get cleanups(){return o(this,sn)||u(this,sn,new hr(o(this,l)))}get coupon_codes_promotion_rules(){return o(this,on)||u(this,on,new fr(o(this,l)))}get coupon_recipients(){return o(this,nn)||u(this,nn,new kr(o(this,l)))}get coupons(){return o(this,an)||u(this,an,new Cr(o(this,l)))}get custom_promotion_rules(){return o(this,un)||u(this,un,new Tr(o(this,l)))}get customer_addresses(){return o(this,cn)||u(this,cn,new Sr(o(this,l)))}get customer_groups(){return o(this,pn)||u(this,pn,new xr(o(this,l)))}get customer_password_resets(){return o(this,ln)||u(this,ln,new vr(o(this,l)))}get customer_payment_sources(){return o(this,mn)||u(this,mn,new Lr(o(this,l)))}get customer_subscriptions(){return o(this,yn)||u(this,yn,new br(o(this,l)))}get customers(){return o(this,dn)||u(this,dn,new wr(o(this,l)))}get delivery_lead_times(){return o(this,Rn)||u(this,Rn,new Ar(o(this,l)))}get discount_engine_items(){return o(this,gn)||u(this,gn,new Or(o(this,l)))}get discount_engines(){return o(this,_n)||u(this,_n,new Mr(o(this,l)))}get event_callbacks(){return o(this,Pn)||u(this,Pn,new Gr(o(this,l)))}get events(){return o(this,hn)||u(this,hn,new Yr(o(this,l)))}get exports(){return o(this,fn)||u(this,fn,new Ur(o(this,l)))}get external_gateways(){return o(this,kn)||u(this,kn,new Vr(o(this,l)))}get external_payments(){return o(this,Cn)||u(this,Cn,new Fr(o(this,l)))}get external_promotions(){return o(this,Tn)||u(this,Tn,new $r(o(this,l)))}get external_tax_calculators(){return o(this,Sn)||u(this,Sn,new Br(o(this,l)))}get fixed_amount_promotions(){return o(this,xn)||u(this,xn,new qr(o(this,l)))}get fixed_price_promotions(){return o(this,vn)||u(this,vn,new Dr(o(this,l)))}get flex_promotions(){return o(this,Ln)||u(this,Ln,new zr(o(this,l)))}get free_gift_promotions(){return o(this,bn)||u(this,bn,new jr(o(this,l)))}get free_shipping_promotions(){return o(this,wn)||u(this,wn,new Wr(o(this,l)))}get geocoders(){return o(this,An)||u(this,An,new Nr(o(this,l)))}get gift_card_recipients(){return o(this,En)||u(this,En,new Xr(o(this,l)))}get gift_cards(){return o(this,On)||u(this,On,new Zr(o(this,l)))}get google_geocoders(){return o(this,In)||u(this,In,new Hr(o(this,l)))}get imports(){return o(this,Mn)||u(this,Mn,new Jr(o(this,l)))}get in_stock_subscriptions(){return o(this,Qn)||u(this,Qn,new es(o(this,l)))}get inventory_models(){return o(this,Gn)||u(this,Gn,new ts(o(this,l)))}get inventory_return_locations(){return o(this,Yn)||u(this,Yn,new rs(o(this,l)))}get inventory_stock_locations(){return o(this,Un)||u(this,Un,new ss(o(this,l)))}get klarna_gateways(){return o(this,Vn)||u(this,Vn,new os(o(this,l)))}get klarna_payments(){return o(this,Fn)||u(this,Fn,new ns(o(this,l)))}get line_item_options(){return o(this,$n)||u(this,$n,new is(o(this,l)))}get line_items(){return o(this,Bn)||u(this,Bn,new as(o(this,l)))}get links(){return o(this,qn)||u(this,qn,new us(o(this,l)))}get manual_gateways(){return o(this,Dn)||u(this,Dn,new cs(o(this,l)))}get manual_tax_calculators(){return o(this,zn)||u(this,zn,new ps(o(this,l)))}get markets(){return o(this,jn)||u(this,jn,new ls(o(this,l)))}get merchants(){return o(this,Wn)||u(this,Wn,new ms(o(this,l)))}get notifications(){return o(this,Kn)||u(this,Kn,new ys(o(this,l)))}get order_amount_promotion_rules(){return o(this,Nn)||u(this,Nn,new ds(o(this,l)))}get order_copies(){return o(this,Xn)||u(this,Xn,new Rs(o(this,l)))}get order_factories(){return o(this,Zn)||u(this,Zn,new _s(o(this,l)))}get order_subscription_items(){return o(this,Hn)||u(this,Hn,new Ps(o(this,l)))}get order_subscriptions(){return o(this,Jn)||u(this,Jn,new hs(o(this,l)))}get orders(){return o(this,ei)||u(this,ei,new fs(o(this,l)))}get organization(){return o(this,ti)||u(this,ti,new Cs(o(this,l)))}get packages(){return o(this,ri)||u(this,ri,new Ts(o(this,l)))}get parcel_line_items(){return o(this,si)||u(this,si,new Ss(o(this,l)))}get parcels(){return o(this,oi)||u(this,oi,new xs(o(this,l)))}get payment_gateways(){return o(this,ni)||u(this,ni,new Ls(o(this,l)))}get payment_methods(){return o(this,ii)||u(this,ii,new bs(o(this,l)))}get payment_options(){return o(this,ai)||u(this,ai,new ws(o(this,l)))}get paypal_gateways(){return o(this,ui)||u(this,ui,new As(o(this,l)))}get paypal_payments(){return o(this,ci)||u(this,ci,new Es(o(this,l)))}get percentage_discount_promotions(){return o(this,pi)||u(this,pi,new Os(o(this,l)))}get price_frequency_tiers(){return o(this,li)||u(this,li,new Is(o(this,l)))}get price_list_schedulers(){return o(this,mi)||u(this,mi,new Ms(o(this,l)))}get price_lists(){return o(this,yi)||u(this,yi,new Qs(o(this,l)))}get price_tiers(){return o(this,di)||u(this,di,new Ys(o(this,l)))}get price_volume_tiers(){return o(this,Ri)||u(this,Ri,new Us(o(this,l)))}get prices(){return o(this,gi)||u(this,gi,new Vs(o(this,l)))}get promotion_rules(){return o(this,_i)||u(this,_i,new $s(o(this,l)))}get promotions(){return o(this,Pi)||u(this,Pi,new qs(o(this,l)))}get recurring_order_copies(){return o(this,hi)||u(this,hi,new Ds(o(this,l)))}get refunds(){return o(this,fi)||u(this,fi,new zs(o(this,l)))}get reserved_stocks(){return o(this,ki)||u(this,ki,new Ws(o(this,l)))}get resource_errors(){return o(this,Ci)||u(this,Ci,new Ns(o(this,l)))}get return_line_items(){return o(this,Ti)||u(this,Ti,new Xs(o(this,l)))}get returns(){return o(this,Si)||u(this,Si,new Zs(o(this,l)))}get satispay_gateways(){return o(this,xi)||u(this,xi,new Hs(o(this,l)))}get satispay_payments(){return o(this,vi)||u(this,vi,new Js(o(this,l)))}get shipments(){return o(this,Li)||u(this,Li,new eo(o(this,l)))}get shipping_categories(){return o(this,bi)||u(this,bi,new to(o(this,l)))}get shipping_method_tiers(){return o(this,wi)||u(this,wi,new so(o(this,l)))}get shipping_methods(){return o(this,Ai)||u(this,Ai,new oo(o(this,l)))}get shipping_weight_tiers(){return o(this,Ei)||u(this,Ei,new no(o(this,l)))}get shipping_zones(){return o(this,Oi)||u(this,Oi,new io(o(this,l)))}get sku_list_items(){return o(this,Ii)||u(this,Ii,new ao(o(this,l)))}get sku_list_promotion_rules(){return o(this,Mi)||u(this,Mi,new uo(o(this,l)))}get sku_lists(){return o(this,Qi)||u(this,Qi,new co(o(this,l)))}get sku_options(){return o(this,Gi)||u(this,Gi,new po(o(this,l)))}get skus(){return o(this,Yi)||u(this,Yi,new lo(o(this,l)))}get stock_items(){return o(this,Ui)||u(this,Ui,new mo(o(this,l)))}get stock_line_items(){return o(this,Vi)||u(this,Vi,new yo(o(this,l)))}get stock_locations(){return o(this,Fi)||u(this,Fi,new Ro(o(this,l)))}get stock_reservations(){return o(this,$i)||u(this,$i,new go(o(this,l)))}get stock_transfers(){return o(this,Bi)||u(this,Bi,new _o(o(this,l)))}get stores(){return o(this,qi)||u(this,qi,new Po(o(this,l)))}get stripe_gateways(){return o(this,Di)||u(this,Di,new ho(o(this,l)))}get stripe_payments(){return o(this,zi)||u(this,zi,new fo(o(this,l)))}get stripe_tax_accounts(){return o(this,ji)||u(this,ji,new ko(o(this,l)))}get subscription_models(){return o(this,Wi)||u(this,Wi,new Co(o(this,l)))}get tags(){return o(this,Ki)||u(this,Ki,new To(o(this,l)))}get talon_one_accounts(){return o(this,Ni)||u(this,Ni,new So(o(this,l)))}get tax_calculators(){return o(this,Xi)||u(this,Xi,new vo(o(this,l)))}get tax_categories(){return o(this,Zi)||u(this,Zi,new Lo(o(this,l)))}get tax_rules(){return o(this,Hi)||u(this,Hi,new bo(o(this,l)))}get taxjar_accounts(){return o(this,Ji)||u(this,Ji,new wo(o(this,l)))}get transactions(){return o(this,ea)||u(this,ea,new Eo(o(this,l)))}get versions(){return o(this,ta)||u(this,ta,new Io(o(this,l)))}get vertex_accounts(){return o(this,ra)||u(this,ra,new Mo(o(this,l)))}get voids(){return o(this,sa)||u(this,sa,new Qo(o(this,l)))}get webhooks(){return o(this,oa)||u(this,oa,new Go(o(this,l)))}get wire_transfers(){return o(this,na)||u(this,na,new Yo(o(this,l)))}get currentOrganization(){return o(this,l)?.client?.currentOrganization}get currentAccessToken(){return o(this,l)?.client?.currentAccessToken}get interceptors(){return o(this,l).client.interceptors}localConfig(e){}config(e){return pp("config %o",e),this.localConfig(e),o(this,l).config(e),this}resources(){return Ut.resources()}singletons(){return Ut.singletons()}isSingleton(e){return Ut.isSingleton(e)}isApiError(e){return Ut.isApiError(e)}addRequestInterceptor(e,t){return this.interceptors.request={onSuccess:e,onFailure:t},1}addResponseInterceptor(e,t){return this.interceptors.response={onSuccess:e,onFailure:t},1}removeInterceptor(e,t=1){this.interceptors[e]=void 0;}removeInterceptors(){this.removeInterceptor("request"),this.removeInterceptor("response"),this.removeRawResponseReader();}addRawResponseReader(e){let t={id:0,rawResponse:void 0,headers:void 0,ok:true};async function r(s){if(t.rawResponse=await s?.clone().json().catch(()=>{}),t.ok=s.ok,e?.headers){let m={};s.headers.forEach((R,d)=>{m[d]=R;}),t.headers=m;}return s}return this.interceptors.rawReader={onSuccess:r,onFailure:r},t.id=1,t}removeRawResponseReader(){this.interceptors.rawReader=void 0;}};l=new WeakMap,Uo=new WeakMap,Vo=new WeakMap,Fo=new WeakMap,$o=new WeakMap,Bo=new WeakMap,qo=new WeakMap,Do=new WeakMap,zo=new WeakMap,jo=new WeakMap,Wo=new WeakMap,Ko=new WeakMap,No=new WeakMap,Xo=new WeakMap,Zo=new WeakMap,Ho=new WeakMap,Jo=new WeakMap,en=new WeakMap,tn=new WeakMap,rn=new WeakMap,sn=new WeakMap,on=new WeakMap,nn=new WeakMap,an=new WeakMap,un=new WeakMap,cn=new WeakMap,pn=new WeakMap,ln=new WeakMap,mn=new WeakMap,yn=new WeakMap,dn=new WeakMap,Rn=new WeakMap,gn=new WeakMap,_n=new WeakMap,Pn=new WeakMap,hn=new WeakMap,fn=new WeakMap,kn=new WeakMap,Cn=new WeakMap,Tn=new WeakMap,Sn=new WeakMap,xn=new WeakMap,vn=new WeakMap,Ln=new WeakMap,bn=new WeakMap,wn=new WeakMap,An=new WeakMap,En=new WeakMap,On=new WeakMap,In=new WeakMap,Mn=new WeakMap,Qn=new WeakMap,Gn=new WeakMap,Yn=new WeakMap,Un=new WeakMap,Vn=new WeakMap,Fn=new WeakMap,$n=new WeakMap,Bn=new WeakMap,qn=new WeakMap,Dn=new WeakMap,zn=new WeakMap,jn=new WeakMap,Wn=new WeakMap,Kn=new WeakMap,Nn=new WeakMap,Xn=new WeakMap,Zn=new WeakMap,Hn=new WeakMap,Jn=new WeakMap,ei=new WeakMap,ti=new WeakMap,ri=new WeakMap,si=new WeakMap,oi=new WeakMap,ni=new WeakMap,ii=new WeakMap,ai=new WeakMap,ui=new WeakMap,ci=new WeakMap,pi=new WeakMap,li=new WeakMap,mi=new WeakMap,yi=new WeakMap,di=new WeakMap,Ri=new WeakMap,gi=new WeakMap,_i=new WeakMap,Pi=new WeakMap,hi=new WeakMap,fi=new WeakMap,ki=new WeakMap,Ci=new WeakMap,Ti=new WeakMap,Si=new WeakMap,xi=new WeakMap,vi=new WeakMap,Li=new WeakMap,bi=new WeakMap,wi=new WeakMap,Ai=new WeakMap,Ei=new WeakMap,Oi=new WeakMap,Ii=new WeakMap,Mi=new WeakMap,Qi=new WeakMap,Gi=new WeakMap,Yi=new WeakMap,Ui=new WeakMap,Vi=new WeakMap,Fi=new WeakMap,$i=new WeakMap,Bi=new WeakMap,qi=new WeakMap,Di=new WeakMap,zi=new WeakMap,ji=new WeakMap,Wi=new WeakMap,Ki=new WeakMap,Ni=new WeakMap,Xi=new WeakMap,Zi=new WeakMap,Hi=new WeakMap,Ji=new WeakMap,ea=new WeakMap,ta=new WeakMap,ra=new WeakMap,sa=new WeakMap,oa=new WeakMap,na=new WeakMap;var lp=a=>new Zc(a),Xc=lp;var AT=new Jt,ET=new er,OT=new tr,IT=new rr,MT=new or,QT=new nr,GT=new ir,YT=new ar,UT=new ur,VT=new cr,FT=new pr,$T=new lr,BT=new mr,qT=new yr,DT=new dr,zT=new Rr,jT=new gr,WT=new _r,KT=new Pr,NT=new hr,XT=new fr,ZT=new kr,HT=new Cr,JT=new Tr,eS=new Sr,tS=new xr,rS=new vr,sS=new Lr,oS=new br,nS=new wr,iS=new Ar,aS=new Or,uS=new Mr,cS=new Gr,pS=new Yr,lS=new Ur,mS=new Vr,yS=new Fr,dS=new $r,RS=new Br,gS=new qr,_S=new Dr,PS=new zr,hS=new jr,fS=new Wr,kS=new Nr,CS=new Xr,TS=new Zr,SS=new Hr,xS=new Jr,vS=new es,LS=new ts,bS=new rs,wS=new ss,AS=new os,ES=new ns,OS=new is,IS=new as,MS=new us,QS=new cs,GS=new ps,YS=new ls,US=new ms,VS=new ys,FS=new ds,$S=new Rs,BS=new _s,qS=new Ps,DS=new hs,zS=new fs,jS=new Cs,WS=new Ts,KS=new Ss,NS=new xs,XS=new Ls,ZS=new bs,HS=new ws,JS=new As,ex=new Es,tx=new Os,rx=new Is,sx=new Ms,ox=new Qs,nx=new Ys,ix=new Us,ax=new Vs,ux=new $s,cx=new qs,px=new Ds,lx=new zs,mx=new Ws,yx=new Ns,dx=new Xs,Rx=new Zs,gx=new Hs,_x=new Js,Px=new eo,hx=new to,fx=new so,kx=new oo,Cx=new no,Tx=new io,Sx=new ao,xx=new uo,vx=new co,Lx=new po,bx=new lo,wx=new mo,Ax=new yo,Ex=new Ro,Ox=new go,Ix=new _o,Mx=new Po,Qx=new ho,Gx=new fo,Yx=new ko,Ux=new Co,Vx=new To,Fx=new So,$x=new vo,Bx=new Lo,qx=new bo,Dx=new wo,zx=new Eo,jx=new Io,Wx=new Mo,Kx=new Qo,Nx=new Go,Xx=new Yo,Zx=a=>{Ht.init(a);};
2
- exports.CommerceLayer=lp;exports.CommerceLayerStatic=Ut;exports.addresses=AT;exports.adjustments=ET;exports.adyen_gateways=OT;exports.adyen_payments=IT;exports.application=MT;exports.attachments=QT;exports.authorizations=GT;exports.avalara_accounts=YT;exports.axerve_gateways=UT;exports.axerve_payments=VT;exports.bing_geocoders=FT;exports.braintree_gateways=$T;exports.braintree_payments=BT;exports.bundles=qT;exports.buy_x_pay_y_promotions=DT;exports.captures=zT;exports.carrier_accounts=jT;exports.checkout_com_gateways=WT;exports.checkout_com_payments=KT;exports.cleanups=NT;exports.coupon_codes_promotion_rules=XT;exports.coupon_recipients=ZT;exports.coupons=HT;exports.custom_promotion_rules=JT;exports.customer_addresses=eS;exports.customer_groups=tS;exports.customer_password_resets=rS;exports.customer_payment_sources=sS;exports.customer_subscriptions=oS;exports.customers=nS;exports.default=Xc;exports.delivery_lead_times=iS;exports.discount_engine_items=aS;exports.discount_engines=uS;exports.event_callbacks=cS;exports.events=pS;exports.exportz=lS;exports.external_gateways=mS;exports.external_payments=yS;exports.external_promotions=dS;exports.external_tax_calculators=RS;exports.fixed_amount_promotions=gS;exports.fixed_price_promotions=_S;exports.flex_promotions=PS;exports.free_gift_promotions=hS;exports.free_shipping_promotions=fS;exports.geocoders=kS;exports.gift_card_recipients=CS;exports.gift_cards=TS;exports.google_geocoders=SS;exports.imports=xS;exports.in_stock_subscriptions=vS;exports.initCommerceLayer=Zx;exports.inventory_models=LS;exports.inventory_return_locations=bS;exports.inventory_stock_locations=wS;exports.klarna_gateways=AS;exports.klarna_payments=ES;exports.line_item_options=OS;exports.line_items=IS;exports.links=MS;exports.manual_gateways=QS;exports.manual_tax_calculators=GS;exports.markets=YS;exports.merchants=US;exports.notifications=VS;exports.order_amount_promotion_rules=FS;exports.order_copies=$S;exports.order_factories=BS;exports.order_subscription_items=qS;exports.order_subscriptions=DS;exports.orders=zS;exports.organization=jS;exports.packages=WS;exports.parcel_line_items=KS;exports.parcels=NS;exports.payment_gateways=XS;exports.payment_methods=ZS;exports.payment_options=HS;exports.paypal_gateways=JS;exports.paypal_payments=ex;exports.percentage_discount_promotions=tx;exports.price_frequency_tiers=rx;exports.price_list_schedulers=sx;exports.price_lists=ox;exports.price_tiers=nx;exports.price_volume_tiers=ix;exports.prices=ax;exports.promotion_rules=ux;exports.promotions=cx;exports.recurring_order_copies=px;exports.refunds=lx;exports.reserved_stocks=mx;exports.resource_errors=yx;exports.return_line_items=dx;exports.returns=Rx;exports.satispay_gateways=gx;exports.satispay_payments=_x;exports.shipments=Px;exports.shipping_categories=hx;exports.shipping_method_tiers=fx;exports.shipping_methods=kx;exports.shipping_weight_tiers=Cx;exports.shipping_zones=Tx;exports.sku_list_items=Sx;exports.sku_list_promotion_rules=xx;exports.sku_lists=vx;exports.sku_options=Lx;exports.skus=bx;exports.stock_items=wx;exports.stock_line_items=Ax;exports.stock_locations=Ex;exports.stock_reservations=Ox;exports.stock_transfers=Ix;exports.stores=Mx;exports.stripe_gateways=Qx;exports.stripe_payments=Gx;exports.stripe_tax_accounts=Yx;exports.subscription_models=Ux;exports.tags=Vx;exports.talon_one_accounts=Fx;exports.tax_calculators=$x;exports.tax_categories=Bx;exports.tax_rules=qx;exports.taxjar_accounts=Dx;exports.transactions=zx;exports.versions=jx;exports.vertex_accounts=Wx;exports.voids=Kx;exports.webhooks=Nx;exports.wire_transfers=Xx;
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var fp=Object.defineProperty;var up=a=>{throw TypeError(a)};var kp=(a,e,t)=>e in a?fp(a,e,{enumerable:true,configurable:true,writable:true,value:t}):a[e]=t;var Cp=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,e,t)=>kp(a,typeof e!="symbol"?e+"":e,t),cp=(a,e,t)=>e.has(a)||up("Cannot "+t);var o=(a,e,t)=>(cp(a,e,"read from private field"),t?t.call(a):e.get(a)),c=(a,e,t)=>e.has(a)?up("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),u=(a,e,t,r)=>(cp(a,e,"write to private field"),e.set(a,t),t);var Tp=(a,...e)=>{},pp=a=>Tp;try{let a=Cp("debug");a&&typeof a=="function"&&(pp=a);}catch{}var Sp="clsdk",xp=a=>pp(`${Sp}:${a}`),C=xp;var Ta=C("fetch"),Dt,zt,jt,Wt,da=class da extends Error{constructor(t,r,s,m){super(r);c(this,Dt);c(this,zt);c(this,jt);c(this,Wt);u(this,zt,t),u(this,jt,r),s&&u(this,Dt,s.errors),m&&u(this,Wt,m);}get errors(){return o(this,Dt)}get status(){return o(this,zt)}get statusText(){return o(this,jt)}get request(){return o(this,Wt)}};Dt=new WeakMap,zt=new WeakMap,jt=new WeakMap,Wt=new WeakMap,n(da,"isFetchError",t=>t instanceof da);var qt=da,Sa=async(a,e,t)=>{Ta("fetch: %s, %O, native[%s]",a,e||{},t?.fetch?"no":"yes");let r=t?.interceptors;r?.request?.onSuccess&&({url:a,options:e}=await r.request.onSuccess({url:a,options:e}));let m=await(t?.fetch||fetch)(a,e);m.ok?(r?.rawReader?.onSuccess&&await r.rawReader.onSuccess(m),r?.response?.onSuccess&&(m=await r.response.onSuccess(m))):r?.rawReader?.onFailure&&await r.rawReader.onFailure(m);let R=m.body&&m.status!==204?await m.json().then(d=>(Ta("response: %O",d),d)).catch(d=>{if(Ta("error: %s",d.message),m.ok)throw new P({message:"Error parsing API response body",type:"parse"})}):void 0;if(!m.ok){let d=new qt(m.status,m.statusText,R,e);if(r?.response?.onFailure&&(d=await r.response.onFailure(d)),d)throw d}return R};var Kt=(d=>(d.CLIENT="client",d.REQUEST="request",d.RESPONSE="response",d.CANCEL="cancel",d.PARSE="parse",d.TIMEOUT="timeout",d.TOKEN_REFRESH="token-refresh",d))(Kt||{}),Nt=class Nt extends Error{constructor(t){super(t.message);n(this,"type");n(this,"code");n(this,"source");this.name=Nt.NAME,this.type=t.type||"client";}static isSdkError(t){return t&&[Nt.NAME,me.NAME].includes(t.name)&&Object.values(Kt).includes(t.type)}};n(Nt,"NAME","SdkError");var P=Nt,Xt=class Xt extends P{constructor(t){super({...t,type:"response"});n(this,"errors",[]);n(this,"status");n(this,"statusText");this.name=Xt.NAME;}static isApiError(t){return P.isSdkError(t)&&t.name===Xt.NAME&&t.type==="response"}first(){return this.errors?.length>0?this.errors[0]:void 0}};n(Xt,"NAME","ApiError");var me=Xt,vp=a=>a instanceof TypeError&&a.message!=="fetch failed",Lp=a=>a instanceof DOMException&&a.name==="AbortError",bp=a=>a instanceof DOMException&&a.name==="TimeoutError",lp=a=>{let e=["INVALID_TOKEN"];return me.isApiError(a)&&a.status===401&&(e.includes(a.code||"")||a.errors&&a.errors.length>0&&e.includes(a.errors[0].code))},xa=a=>{if(console.log(a),P.isSdkError(a)||me.isApiError(a))throw a;let e=new P({message:a.message});if(qt.isFetchError(a)){let t=new me(e);t.type="response",t.status=a.status,t.statusText=a.statusText,t.code=String(t.status),t.errors=a.errors||[],!t.message&&t.statusText&&(t.message=t.statusText),e=t;}else vp(a)?e.type="request":Lp(a)?e.type="cancel":bp(a)?e.type="timeout":(e.type="client",e.source=a);throw e};var wp={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:15e3,requiredAttributes:["organization","accessToken"]},jsonapi:{maxResourceIncluded:2}},x=wp;var va=a=>{try{let e=JSON.parse(atob(a.split(".")[1]));return {organization:e.organization.slug,domain:e.iss?String(e.iss).replace("https://auth.",""):void 0,expiration:e.exp}}catch{return}},Ra=a=>{try{let e=va(a);return e?.expiration?e.expiration*1e3-Date.now()<0:!1}catch{return false}};var X=C("client"),La=(a,e)=>`https://${a.toLowerCase()}.${e||x.default.domain}/api`,Mt,v,Lt,Qt,h,Zt,wa=class wa{constructor(e){c(this,Mt);c(this,v);c(this,Lt);c(this,Qt);c(this,h);c(this,Zt);X("new client instance %O",e),u(this,Mt,La(e.organization??"",e.domain)),u(this,v,e.accessToken),u(this,Lt,e.organization??""),u(this,Qt,e.domain);let t={timeout:e.timeout||x.client.timeout,fetch:e.fetch,refreshToken:e.refreshToken},s={...this.customHeaders(e.headers),Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+o(this,v)};e.userAgent&&(s["User-Agent"]=e.userAgent),t.headers=s,u(this,h,t),X("fetch config: %O",t),u(this,Zt,{});}static create(e){if((!e.organization||!e.domain)&&e.accessToken){let t=va(e.accessToken);!e.organization&&t?.organization&&(e.organization=t.organization),!e.domain&&t?.domain&&(e.domain=t.domain);}for(let t of x.client.requiredAttributes)if(!e[t])throw new P({message:`Undefined '${t}' parameter`});return new wa(e)}get interceptors(){return o(this,Zt)}get requestHeaders(){return o(this,h).headers||(o(this,h).headers={}),o(this,h).headers}config(e){X("config %o",e);let t=o(this,h);return t.headers||(t.headers={}),e.timeout&&(t.timeout=e.timeout),e.userAgent&&this.userAgent(e.userAgent),e.fetch&&(o(this,h).fetch=e.fetch),e.refreshToken&&(o(this,h).refreshToken=e.refreshToken),(e.organization||e.domain)&&u(this,Mt,La(e.organization||o(this,Lt),e.domain||o(this,Qt))),e.organization&&u(this,Lt,e.organization),e.domain&&u(this,Qt,e.domain),e.accessToken&&(u(this,v,e.accessToken),t.headers.Authorization="Bearer "+o(this,v)),e.headers&&(t.headers={...t.headers,...this.customHeaders(e.headers)}),this}userAgent(e){return e&&(this.requestHeaders["User-Agent"]=e),this}async request(e,t,r,s){X("request %s %s, %O, %O",e,t,r||{},s||{}),s?.userAgent&&X("User-Agent header ignored in request config");let m=s?.organization?La(s.organization,s.domain):o(this,Mt),R=new URL(`${m}/${t}`),d=r?JSON.stringify({data:r}):void 0,Ft={...this.requestHeaders,...this.customHeaders(s?.headers)},ma=s?.accessToken||o(this,v);ma&&(Ft.Authorization="Bearer "+ma);let $t={method:e,body:d,headers:Ft},ip=s?.timeout||o(this,h).timeout;ip&&(AbortSignal?.timeout?$t.signal=AbortSignal.timeout(ip):X("Timeout not set. Undefined function: %s","AbortSignal.timeout")),s?.params&&Object.entries(s?.params).forEach(([It,Bt])=>{R.searchParams.append(It,String(Bt));});let ap={interceptors:this.interceptors,fetch:s?.fetch||o(this,h).fetch};try{return await Sa(R,$t,ap).catch(It=>xa(It))}catch(It){if(lp(It)&&o(this,h).refreshToken&&Ra(o(this,v))){X("Access token has expired");let Bt=await o(this,h).refreshToken(o(this,v)).catch(Ca=>{X("Refresh token error: %s",Ca.message);let ya=new P({message:"Error refreshing access token",type:"token-refresh"});throw ya.source=Ca,ya});if(Bt)return X("Access token refreshed"),this.config({accessToken:Bt}),$t.headers&&($t.headers.Authorization=`Bearer ${Bt}`),await Sa(R,$t,ap).catch(ya=>xa(ya))}else throw It}}customHeaders(e){let t={};if(e)for(let[r,s]of Object.entries(e))["accept","content-type","authorization","user-agent"].includes(r.toLowerCase())||(t[r]=s);return t}get currentAccessToken(){return o(this,v)}get currentOrganization(){return o(this,Lt)}};Mt=new WeakMap,v=new WeakMap,Lt=new WeakMap,Qt=new WeakMap,h=new WeakMap,Zt=new WeakMap;var ba=wa,mp=ba;var ga=a=>a?.type&&a.id&&Gt.includes(a.type),Aa=a=>a&&typeof a.type<"u"&&a.type&&Gt.includes(a.type);var _a=C("jsonapi"),bt=a=>{if(!a)return a;let e;a.links&&delete a.links;let t=a.data,r=a.included;return t?Array.isArray(t)?e=t.map(s=>Pa(s,r)):e=Pa(t,r):e=t,e},yp=(a,e=[])=>e.find(r=>a.id===r.id&&a.type===r.type)||a,Pa=(a,e,t=[])=>{if(_a("denormalize resource: %O, %o",a,e||{}),!a)return a;let r={id:a.id,type:a.type,...a.attributes};return a.relationships&&Object.keys(a.relationships).forEach(s=>{let m=a.relationships[s].data;m?t.filter(R=>R.id===m.id&&R.type===m.type).length>=x.jsonapi.maxResourceIncluded?r[s]=m:Array.isArray(m)?r[s]=m.map(R=>Pa(yp(R,e),e,[...t,R])):r[s]=Pa(yp(m,e),e,[...t,m]):m===null&&(r[s]=null);}),_a("denormalized resource: %O",r),r},Ea=a=>{_a("normalize resource: %O",a);let e={},t={};for(let s in a){if(["type","id"].includes(s))continue;let m=a[s];Array.isArray(m)&&m.length===1&&Aa(m[0])&&m[0].id===null?t[s]={data:[]}:m&&Aa(m)&&m.id===null?t[s]={data:null}:m&&(ga(m)||Array.isArray(m)&&ga(m[0]))?t[s]={data:m}:e[s]=m;}let r={type:a.type,attributes:e,relationships:t};return ga(a)&&(r.id=a.id),_a("normalized resource: %O",r),r};var dp=C("query"),Rp=["_any","_all","_in","_not_in_or_null"],Ap=a=>Rp.some(e=>a.endsWith(e)),gp=["_jcont"],Ep=a=>gp.some(e=>a.endsWith(e)),Oa=a=>a&&(a.filters||a.pageNumber||a.pageSize||a.sort),wt=(a,e)=>{dp("generate query string params: %O, %O",a,e);let t={};return a&&(a.include&&(t.include=a.include.join(",")),a.fields&&(Array.isArray(a.fields)&&(a.fields={[e.type||e]:a.fields}),Object.entries(a.fields).forEach(([r,s])=>{t[`fields[${r}]`]=s.join(",");})),Oa(a)&&(a.sort&&(Array.isArray(a.sort)?t.sort=a.sort.join(","):t.sort=Object.entries(a.sort).map(([r,s])=>`${s==="desc"?"-":""}${r}`).join(",")),a.pageNumber&&(t["page[number]"]=String(a.pageNumber)),a.pageSize&&(t["page[size]"]=String(a.pageSize)),a.filters&&Object.entries(a.filters).forEach(([r,s])=>{let m;if(Array.isArray(s)){if(!Ap(r))throw new P({message:`Incorrect filter [${r}]: Array value is supported only for the following filters: ${Rp.join(", ")}`,type:"request"});m=s.join(",");}else if(typeof s=="object"){if(!Ep(r))throw new P({message:`Incorrect filter [${r}]: Object value is supported only for the following filters: ${gp.join(", ")}`,type:"request"});m=JSON.stringify(s);}else m=String(s);t[`filter[q][${r}]`]=m;})),dp("query string params: %O",t)),t};var Z=C("resource"),ha=class extends Array{constructor(t,r){super(...r||[]);n(this,"meta");this.meta=t;}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(t){return this.length&&t>=0?this[t]:void 0}hasNextPage(){return this.meta.currentPage<this.meta.pageCount}hasPrevPage(){return this.meta.currentPage>1}getRecordCount(){return this.meta.recordCount}getPageCount(){return this.meta.pageCount}get recordCount(){return this.meta.recordCount}get pageCount(){return this.meta.pageCount}},ye=class ye{static init(e){return ye.adapter=new fa(e)}static get(e){if(e)return ye.init(e);if(ye.adapter)return ye.adapter;throw new P({message:"RersourceAdapter not initialized"})}static config(e){ye.get().config(e);}};n(ye,"adapter");var Jt=ye,k,Ia,fa=class{constructor(e){c(this,k);c(this,Ia,{});u(this,k,mp.create(e)),this.localConfig(e);}localConfig(e){}config(e){return Z("config %o",e),this.localConfig(e),o(this,k).config(e),this}get client(){return o(this,k)}async singleton(e,t,r,s){Z("singleton: %o, %O, %O",e,t||{},r||{});let m=wt(t,e);r?.params&&Object.assign(m,r?.params);let R=await o(this,k).request("GET",`${s||e.type}`,void 0,{...r,params:m});return bt(R)}async retrieve(e,t,r){Z("retrieve: %o, %O, %O",e,t||{},r||{});let s=wt(t,e);r?.params&&Object.assign(s,r?.params);let m=await o(this,k).request("GET",`${e.type}/${e.id}`,void 0,{...r,params:s});return bt(m)}async list(e,t,r){Z("list: %o, %O, %O",e,t||{},r||{});let s=wt(t,e);r?.params&&Object.assign(s,r?.params),s["page[number]"]||(s["page[number]"]="1");let m=await o(this,k).request("GET",`${e.type}`,void 0,{...r,params:s}),R=bt(m),d={pageCount:Number(m.meta?.page_count),recordCount:Number(m.meta?.record_count),currentPage:t?.pageNumber||x.default.pageNumber,recordsPerPage:t?.pageSize||x.default.pageSize};return new ha(d,R)}async create(e,t,r){Z("create: %o, %O, %O",e,t||{},r||{});let s=wt(t,e);r?.params&&Object.assign(s,r?.params);let m=Ea(e),R=await o(this,k).request("POST",e.type,m,{...r,params:s});return bt(R)}async update(e,t,r){Z("update: %o, %O, %O",e,t||{},r||{});let s=wt(t,e);r?.params&&Object.assign(s,r?.params);let m=Ea(e),R=await o(this,k).request("PATCH",`${e.type}/${e.id}`,m,{...r,params:s});return bt(R)}async delete(e,t){Z("delete: %o, %O",e,t||{}),await o(this,k).request("DELETE",`${e.type}/${e.id}`,void 0,t);}async fetch(e,t,r,s){Z("fetch: %o, %O, %O",t,r||{},s||{});let m=wt(r,e);s?.params&&Object.assign(m,s?.params);let R=await o(this,k).request("GET",t,void 0,{...s,params:m}),d=bt(R);if(Array.isArray(d)){let Ft=r,ma={pageCount:Number(R.meta?.page_count),recordCount:Number(R.meta?.record_count),currentPage:Ft?.pageNumber||x.default.pageNumber,recordsPerPage:Ft?.pageSize||x.default.pageSize};return new ha(ma,d)}else return d}};k=new WeakMap,Ia=new WeakMap;var Yt,Ht=class{constructor(e){c(this,Yt);Z("new resource instance: %s",this.type()),u(this,Yt,e);}get resources(){return o(this,Yt)||u(this,Yt,Jt.get())}relationshipOneToOne(e){return e===null||typeof e=="string"?{id:e,type:this.type()}:{id:e.id,type:this.type()}}relationshipOneToMany(...e){return e===null||e.length===0||e[0]===null?[{id:null,type:this.type()}]:e.map(t=>({id:t,type:this.type()}))}path(){return this.type()}async update(e,t,r){return this.resources.update({...e,type:this.type()},t,r)}};Yt=new WeakMap,n(Ht,"TYPE");var i=class extends Ht{async retrieve(e,t,r){return this.resources.retrieve(typeof e=="string"?{type:this.type(),id:e}:e,t,r)}async list(e,t){return this.resources.list({type:this.type()},e,t)}async count(e,t){let r={filters:Oa(e)?e.filters:e,pageNumber:1,pageSize:1},s=await this.list(r,t);return Promise.resolve(s.meta.recordCount)}},Ut=class extends Ht{async retrieve(e,t){return this.resources.singleton({type:this.type()},e,t,this.path())}},_p=fa;var de=class de extends i{async create(e,t,r){return this.resources.create({...e,type:de.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:de.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:de.TYPE}:e,t);}async geocoder(e,t,r){let s=e.id||e;return this.resources.fetch({type:"geocoders"},`addresses/${s}/geocoder`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`addresses/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`addresses/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`addresses/${s}/versions`,t,r)}isAddress(e){return e.type&&e.type===de.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return de.TYPE}};n(de,"TYPE","addresses");var Ma=de,er=Ma;var Re=class Re extends i{async create(e,t,r){return this.resources.create({...e,type:Re.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Re.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Re.TYPE}:e,t);}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`adjustments/${s}/versions`,t,r)}isAdjustment(e){return e.type&&e.type===Re.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Re.TYPE}};n(Re,"TYPE","adjustments");var Qa=Re,tr=Qa;var ge=class ge extends i{async create(e,t,r){return this.resources.create({...e,type:ge.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ge.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ge.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`adyen_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`adyen_gateways/${s}/versions`,t,r)}async adyen_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"adyen_payments"},`adyen_gateways/${s}/adyen_payments`,t,r)}isAdyenGateway(e){return e.type&&e.type===ge.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ge.TYPE}};n(ge,"TYPE","adyen_gateways");var Ga=ge,rr=Ga;var I=class I extends i{async create(e,t,r){return this.resources.create({...e,type:I.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:I.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:I.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`adyen_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`adyen_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`adyen_payments/${s}/versions`,t,r)}async _authorize(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_authorize:true},t,r)}async _details(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_details:true},t,r)}isAdyenPayment(e){return e.type&&e.type===I.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return I.TYPE}};n(I,"TYPE","adyen_payments");var Ya=I,sr=Ya;var or=class or extends Ut{isApplication(e){return e.type&&e.type===or.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return or.TYPE}path(){return "application"}};n(or,"TYPE","applications");var Ua=or,nr=Ua;var _e=class _e extends i{async create(e,t,r){return this.resources.create({...e,type:_e.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:_e.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:_e.TYPE}:e,t);}isAttachment(e){return e.type&&e.type===_e.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return _e.TYPE}};n(_e,"TYPE","attachments");var Va=_e,ir=Va;var L=class L extends i{async update(e,t,r){return this.resources.update({...e,type:L.TYPE},t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`authorizations/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`authorizations/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`authorizations/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`authorizations/${s}/versions`,t,r)}async captures(e,t,r){let s=e.id||e;return this.resources.fetch({type:"captures"},`authorizations/${s}/captures`,t,r)}async voids(e,t,r){let s=e.id||e;return this.resources.fetch({type:"voids"},`authorizations/${s}/voids`,t,r)}async _forward(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_forward:true},t,r)}async _capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_capture:true},t,r)}async _capture_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_capture_amount_cents:t},r,s)}async _void(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_void:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_cancel:true},t,r)}isAuthorization(e){return e.type&&e.type===L.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return L.TYPE}};n(L,"TYPE","authorizations");var Fa=L,ar=Fa;var Pe=class Pe extends i{async create(e,t,r){return this.resources.create({...e,type:Pe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Pe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Pe.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`avalara_accounts/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`avalara_accounts/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`avalara_accounts/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`avalara_accounts/${s}/versions`,t,r)}async tax_categories(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${s}/tax_categories`,t,r)}isAvalaraAccount(e){return e.type&&e.type===Pe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Pe.TYPE}};n(Pe,"TYPE","avalara_accounts");var $a=Pe,ur=$a;var he=class he extends i{async create(e,t,r){return this.resources.create({...e,type:he.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:he.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:he.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`axerve_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`axerve_gateways/${s}/versions`,t,r)}async axerve_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"axerve_payments"},`axerve_gateways/${s}/axerve_payments`,t,r)}isAxerveGateway(e){return e.type&&e.type===he.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return he.TYPE}};n(he,"TYPE","axerve_gateways");var Ba=he,cr=Ba;var H=class H extends i{async create(e,t,r){return this.resources.create({...e,type:H.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:H.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:H.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`axerve_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`axerve_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`axerve_payments/${s}/versions`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:H.TYPE,_update:true},t,r)}isAxervePayment(e){return e.type&&e.type===H.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return H.TYPE}};n(H,"TYPE","axerve_payments");var qa=H,pr=qa;var fe=class fe extends i{async create(e,t,r){return this.resources.create({...e,type:fe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:fe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:fe.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`bing_geocoders/${s}/markets`,t,r)}async addresses(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`bing_geocoders/${s}/addresses`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`bing_geocoders/${s}/attachments`,t,r)}isBingGeocoder(e){return e.type&&e.type===fe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return fe.TYPE}};n(fe,"TYPE","bing_geocoders");var Da=fe,lr=Da;var ke=class ke extends i{async create(e,t,r){return this.resources.create({...e,type:ke.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ke.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ke.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`braintree_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`braintree_gateways/${s}/versions`,t,r)}async braintree_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"braintree_payments"},`braintree_gateways/${s}/braintree_payments`,t,r)}isBraintreeGateway(e){return e.type&&e.type===ke.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ke.TYPE}};n(ke,"TYPE","braintree_gateways");var za=ke,mr=za;var Ce=class Ce extends i{async create(e,t,r){return this.resources.create({...e,type:Ce.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ce.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ce.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`braintree_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`braintree_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`braintree_payments/${s}/versions`,t,r)}isBraintreePayment(e){return e.type&&e.type===Ce.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ce.TYPE}};n(Ce,"TYPE","braintree_payments");var ja=Ce,yr=ja;var M=class M extends i{async create(e,t,r){return this.resources.create({...e,type:M.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:M.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:M.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`bundles/${s}/market`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`bundles/${s}/sku_list`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`bundles/${s}/skus`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`bundles/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`bundles/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`bundles/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`bundles/${s}/versions`,t,r)}async _compute_price_amount(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:M.TYPE,_compute_price_amount:true},t,r)}async _compute_compare_at_amount(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:M.TYPE,_compute_compare_at_amount:true},t,r)}isBundle(e){return e.type&&e.type===M.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return M.TYPE}};n(M,"TYPE","bundles");var Wa=M,dr=Wa;var Q=class Q extends i{async create(e,t,r){return this.resources.create({...e,type:Q.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Q.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Q.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`buy_x_pay_y_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`buy_x_pay_y_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`buy_x_pay_y_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`buy_x_pay_y_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`buy_x_pay_y_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`buy_x_pay_y_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`buy_x_pay_y_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`buy_x_pay_y_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`buy_x_pay_y_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`buy_x_pay_y_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`buy_x_pay_y_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`buy_x_pay_y_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Q.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Q.TYPE,_enable:true},t,r)}isBuyXPayYPromotion(e){return e.type&&e.type===Q.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Q.TYPE}};n(Q,"TYPE","buy_x_pay_y_promotions");var Ka=Q,Rr=Ka;var G=class G extends i{async update(e,t,r){return this.resources.update({...e,type:G.TYPE},t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`captures/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`captures/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`captures/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`captures/${s}/versions`,t,r)}async reference_authorization(e,t,r){let s=e.id||e;return this.resources.fetch({type:"authorizations"},`captures/${s}/reference_authorization`,t,r)}async refunds(e,t,r){let s=e.id||e;return this.resources.fetch({type:"refunds"},`captures/${s}/refunds`,t,r)}async return(e,t,r){let s=e.id||e;return this.resources.fetch({type:"returns"},`captures/${s}/return`,t,r)}async _forward(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:G.TYPE,_forward:true},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:G.TYPE,_refund:true},t,r)}async _refund_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:G.TYPE,_refund_amount_cents:t},r,s)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:G.TYPE,_cancel:true},t,r)}isCapture(e){return e.type&&e.type===G.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return G.TYPE}};n(G,"TYPE","captures");var Na=G,gr=Na;var Te=class Te extends i{async create(e,t,r){return this.resources.create({...e,type:Te.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Te.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Te.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`carrier_accounts/${s}/market`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`carrier_accounts/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`carrier_accounts/${s}/versions`,t,r)}isCarrierAccount(e){return e.type&&e.type===Te.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Te.TYPE}};n(Te,"TYPE","carrier_accounts");var Xa=Te,_r=Xa;var Se=class Se extends i{async create(e,t,r){return this.resources.create({...e,type:Se.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Se.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Se.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`checkout_com_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`checkout_com_gateways/${s}/versions`,t,r)}async checkout_com_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"checkout_com_payments"},`checkout_com_gateways/${s}/checkout_com_payments`,t,r)}isCheckoutComGateway(e){return e.type&&e.type===Se.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Se.TYPE}};n(Se,"TYPE","checkout_com_gateways");var Za=Se,Pr=Za;var Y=class Y extends i{async create(e,t,r){return this.resources.create({...e,type:Y.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Y.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Y.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`checkout_com_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`checkout_com_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`checkout_com_payments/${s}/versions`,t,r)}async _details(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Y.TYPE,_details:true},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Y.TYPE,_refresh:true},t,r)}isCheckoutComPayment(e){return e.type&&e.type===Y.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Y.TYPE}};n(Y,"TYPE","checkout_com_payments");var Ha=Y,hr=Ha;var J=class J extends i{async create(e,t,r){return this.resources.create({...e,type:J.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:J.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:J.TYPE}:e,t);}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`cleanups/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`cleanups/${s}/versions`,t,r)}async _interrupt(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:J.TYPE,_interrupt:true},t,r)}isCleanup(e){return e.type&&e.type===J.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return J.TYPE}};n(J,"TYPE","cleanups");var Ja=J,fr=Ja;var xe=class xe extends i{async create(e,t,r){return this.resources.create({...e,type:xe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:xe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:xe.TYPE}:e,t);}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`coupon_codes_promotion_rules/${s}/versions`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`coupon_codes_promotion_rules/${s}/coupons`,t,r)}isCouponCodesPromotionRule(e){return e.type&&e.type===xe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return xe.TYPE}};n(xe,"TYPE","coupon_codes_promotion_rules");var eu=xe,kr=eu;var ve=class ve extends i{async create(e,t,r){return this.resources.create({...e,type:ve.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ve.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ve.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`coupon_recipients/${s}/customer`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`coupon_recipients/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`coupon_recipients/${s}/versions`,t,r)}isCouponRecipient(e){return e.type&&e.type===ve.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ve.TYPE}};n(ve,"TYPE","coupon_recipients");var tu=ve,Cr=tu;var Le=class Le extends i{async create(e,t,r){return this.resources.create({...e,type:Le.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Le.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Le.TYPE}:e,t);}async promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`coupons/${s}/promotion_rule`,t,r)}async coupon_recipient(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_recipients"},`coupons/${s}/coupon_recipient`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`coupons/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`coupons/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`coupons/${s}/versions`,t,r)}isCoupon(e){return e.type&&e.type===Le.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Le.TYPE}};n(Le,"TYPE","coupons");var ru=Le,Tr=ru;var be=class be extends i{async create(e,t,r){return this.resources.create({...e,type:be.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:be.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:be.TYPE}:e,t);}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`custom_promotion_rules/${s}/versions`,t,r)}isCustomPromotionRule(e){return e.type&&e.type===be.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return be.TYPE}};n(be,"TYPE","custom_promotion_rules");var su=be,Sr=su;var we=class we extends i{async create(e,t,r){return this.resources.create({...e,type:we.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:we.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:we.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customer_addresses/${s}/customer`,t,r)}async address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`customer_addresses/${s}/address`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`customer_addresses/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`customer_addresses/${s}/versions`,t,r)}isCustomerAddress(e){return e.type&&e.type===we.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return we.TYPE}};n(we,"TYPE","customer_addresses");var ou=we,xr=ou;var Ae=class Ae extends i{async create(e,t,r){return this.resources.create({...e,type:Ae.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ae.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ae.TYPE}:e,t);}async customers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customer_groups/${s}/customers`,t,r)}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`customer_groups/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`customer_groups/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`customer_groups/${s}/versions`,t,r)}isCustomerGroup(e){return e.type&&e.type===Ae.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ae.TYPE}};n(Ae,"TYPE","customer_groups");var nu=Ae,vr=nu;var ee=class ee extends i{async create(e,t,r){return this.resources.create({...e,type:ee.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ee.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ee.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customer_password_resets/${s}/customer`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`customer_password_resets/${s}/events`,t,r)}async _reset_password_token(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:ee.TYPE,_reset_password_token:t},r,s)}isCustomerPasswordReset(e){return e.type&&e.type===ee.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ee.TYPE}};n(ee,"TYPE","customer_password_resets");var iu=ee,Lr=iu;var Ee=class Ee extends i{async create(e,t,r){return this.resources.create({...e,type:Ee.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ee.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ee.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customer_payment_sources/${s}/customer`,t,r)}async payment_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`customer_payment_sources/${s}/payment_method`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`customer_payment_sources/${s}/versions`,t,r)}isCustomerPaymentSource(e){return e.type&&e.type===Ee.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ee.TYPE}};n(Ee,"TYPE","customer_payment_sources");var au=Ee,br=au;var Oe=class Oe extends i{async create(e,t,r){return this.resources.create({...e,type:Oe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Oe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Oe.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customer_subscriptions/${s}/customer`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`customer_subscriptions/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`customer_subscriptions/${s}/versions`,t,r)}isCustomerSubscription(e){return e.type&&e.type===Oe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Oe.TYPE}};n(Oe,"TYPE","customer_subscriptions");var uu=Oe,wr=uu;var Ie=class Ie extends i{async create(e,t,r){return this.resources.create({...e,type:Ie.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ie.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ie.TYPE}:e,t);}async customer_group(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_groups"},`customers/${s}/customer_group`,t,r)}async customer_addresses(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_addresses"},`customers/${s}/customer_addresses`,t,r)}async customer_payment_sources(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`customers/${s}/customer_payment_sources`,t,r)}async customer_subscriptions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_subscriptions"},`customers/${s}/customer_subscriptions`,t,r)}async orders(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`customers/${s}/orders`,t,r)}async order_subscriptions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`customers/${s}/order_subscriptions`,t,r)}async returns(e,t,r){let s=e.id||e;return this.resources.fetch({type:"returns"},`customers/${s}/returns`,t,r)}async sku_lists(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`customers/${s}/sku_lists`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`customers/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`customers/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`customers/${s}/tags`,t,r)}isCustomer(e){return e.type&&e.type===Ie.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ie.TYPE}};n(Ie,"TYPE","customers");var cu=Ie,Ar=cu;var Me=class Me extends i{async create(e,t,r){return this.resources.create({...e,type:Me.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Me.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Me.TYPE}:e,t);}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`delivery_lead_times/${s}/stock_location`,t,r)}async shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`delivery_lead_times/${s}/shipping_method`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`delivery_lead_times/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`delivery_lead_times/${s}/versions`,t,r)}isDeliveryLeadTime(e){return e.type&&e.type===Me.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Me.TYPE}};n(Me,"TYPE","delivery_lead_times");var pu=Me,Er=pu;var Or=class Or extends i{async discount_engine(e,t,r){let s=e.id||e;return this.resources.fetch({type:"discount_engines"},`discount_engine_items/${s}/discount_engine`,t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`discount_engine_items/${s}/order`,t,r)}isDiscountEngineItem(e){return e.type&&e.type===Or.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Or.TYPE}};n(Or,"TYPE","discount_engine_items");var lu=Or,Ir=lu;var Mr=class Mr extends i{async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`discount_engines/${s}/markets`,t,r)}async discount_engine_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"discount_engine_items"},`discount_engines/${s}/discount_engine_items`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`discount_engines/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`discount_engines/${s}/versions`,t,r)}isDiscountEngine(e){return e.type&&e.type===Mr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Mr.TYPE}};n(Mr,"TYPE","discount_engines");var mu=Mr,Qr=mu;var te=class te extends i{async create(e,t,r){return this.resources.create({...e,type:te.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:te.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:te.TYPE}:e,t);}async shipment(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipments"},`easypost_pickups/${s}/shipment`,t,r)}async parcels(e,t,r){let s=e.id||e;return this.resources.fetch({type:"parcels"},`easypost_pickups/${s}/parcels`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`easypost_pickups/${s}/events`,t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:te.TYPE,_purchase:true},t,r)}isEasypostPickup(e){return e.type&&e.type===te.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return te.TYPE}};n(te,"TYPE","easypost_pickups");var yu=te,Gr=yu;var Yr=class Yr extends i{async webhook(e,t,r){let s=e.id||e;return this.resources.fetch({type:"webhooks"},`event_callbacks/${s}/webhook`,t,r)}isEventCallback(e){return e.type&&e.type===Yr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Yr.TYPE}};n(Yr,"TYPE","event_callbacks");var du=Yr,Ur=du;var At=class At extends i{async update(e,t,r){return this.resources.update({...e,type:At.TYPE},t,r)}async webhooks(e,t,r){let s=e.id||e;return this.resources.fetch({type:"webhooks"},`events/${s}/webhooks`,t,r)}async last_event_callbacks(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_callbacks"},`events/${s}/last_event_callbacks`,t,r)}async _trigger(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:At.TYPE,_trigger:true},t,r)}isEvent(e){return e.type&&e.type===At.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return At.TYPE}};n(At,"TYPE","events");var Ru=At,Vr=Ru;var re=class re extends i{async create(e,t,r){return this.resources.create({...e,type:re.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:re.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:re.TYPE}:e,t);}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`exports/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`exports/${s}/versions`,t,r)}async _interrupt(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:re.TYPE,_interrupt:true},t,r)}isExport(e){return e.type&&e.type===re.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return re.TYPE}};n(re,"TYPE","exports");var gu=re,Fr=gu;var se=class se extends i{async create(e,t,r){return this.resources.create({...e,type:se.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:se.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:se.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`external_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`external_gateways/${s}/versions`,t,r)}async external_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"external_payments"},`external_gateways/${s}/external_payments`,t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:se.TYPE,_reset_circuit:true},t,r)}isExternalGateway(e){return e.type&&e.type===se.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return se.TYPE}};n(se,"TYPE","external_gateways");var _u=se,$r=_u;var Qe=class Qe extends i{async create(e,t,r){return this.resources.create({...e,type:Qe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Qe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Qe.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`external_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`external_payments/${s}/payment_gateway`,t,r)}async wallet(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`external_payments/${s}/wallet`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`external_payments/${s}/versions`,t,r)}isExternalPayment(e){return e.type&&e.type===Qe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Qe.TYPE}};n(Qe,"TYPE","external_payments");var Pu=Qe,Br=Pu;var b=class b extends i{async create(e,t,r){return this.resources.create({...e,type:b.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:b.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:b.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`external_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`external_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`external_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`external_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`external_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`external_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`external_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`external_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`external_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`external_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`external_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`external_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:b.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:b.TYPE,_enable:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:b.TYPE,_reset_circuit:true},t,r)}isExternalPromotion(e){return e.type&&e.type===b.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return b.TYPE}};n(b,"TYPE","external_promotions");var hu=b,qr=hu;var oe=class oe extends i{async create(e,t,r){return this.resources.create({...e,type:oe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:oe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:oe.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`external_tax_calculators/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`external_tax_calculators/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`external_tax_calculators/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`external_tax_calculators/${s}/versions`,t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:oe.TYPE,_reset_circuit:true},t,r)}isExternalTaxCalculator(e){return e.type&&e.type===oe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return oe.TYPE}};n(oe,"TYPE","external_tax_calculators");var fu=oe,Dr=fu;var U=class U extends i{async create(e,t,r){return this.resources.create({...e,type:U.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:U.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:U.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`fixed_amount_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`fixed_amount_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`fixed_amount_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`fixed_amount_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`fixed_amount_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`fixed_amount_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`fixed_amount_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`fixed_amount_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`fixed_amount_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`fixed_amount_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`fixed_amount_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`fixed_amount_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:U.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:U.TYPE,_enable:true},t,r)}isFixedAmountPromotion(e){return e.type&&e.type===U.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return U.TYPE}};n(U,"TYPE","fixed_amount_promotions");var ku=U,zr=ku;var V=class V extends i{async create(e,t,r){return this.resources.create({...e,type:V.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:V.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:V.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`fixed_price_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`fixed_price_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`fixed_price_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`fixed_price_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`fixed_price_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`fixed_price_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`fixed_price_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`fixed_price_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`fixed_price_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`fixed_price_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`fixed_price_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`fixed_price_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:V.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:V.TYPE,_enable:true},t,r)}isFixedPricePromotion(e){return e.type&&e.type===V.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return V.TYPE}};n(V,"TYPE","fixed_price_promotions");var Cu=V,jr=Cu;var F=class F extends i{async create(e,t,r){return this.resources.create({...e,type:F.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:F.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:F.TYPE}:e,t);}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`flex_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`flex_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`flex_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`flex_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`flex_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`flex_promotions/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:F.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:F.TYPE,_enable:true},t,r)}isFlexPromotion(e){return e.type&&e.type===F.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return F.TYPE}};n(F,"TYPE","flex_promotions");var Tu=F,Wr=Tu;var $=class $ extends i{async create(e,t,r){return this.resources.create({...e,type:$.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:$.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:$.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`free_gift_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`free_gift_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`free_gift_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`free_gift_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`free_gift_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`free_gift_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`free_gift_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`free_gift_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`free_gift_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`free_gift_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`free_gift_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`free_gift_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:$.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:$.TYPE,_enable:true},t,r)}isFreeGiftPromotion(e){return e.type&&e.type===$.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return $.TYPE}};n($,"TYPE","free_gift_promotions");var Su=$,Kr=Su;var B=class B extends i{async create(e,t,r){return this.resources.create({...e,type:B.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:B.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:B.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`free_shipping_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`free_shipping_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`free_shipping_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`free_shipping_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`free_shipping_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`free_shipping_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`free_shipping_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`free_shipping_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`free_shipping_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`free_shipping_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`free_shipping_promotions/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:B.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:B.TYPE,_enable:true},t,r)}isFreeShippingPromotion(e){return e.type&&e.type===B.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return B.TYPE}};n(B,"TYPE","free_shipping_promotions");var xu=B,Nr=xu;var Xr=class Xr extends i{async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`geocoders/${s}/markets`,t,r)}async addresses(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`geocoders/${s}/addresses`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`geocoders/${s}/attachments`,t,r)}isGeocoder(e){return e.type&&e.type===Xr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Xr.TYPE}};n(Xr,"TYPE","geocoders");var vu=Xr,Zr=vu;var Ge=class Ge extends i{async create(e,t,r){return this.resources.create({...e,type:Ge.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ge.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ge.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`gift_card_recipients/${s}/customer`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`gift_card_recipients/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`gift_card_recipients/${s}/versions`,t,r)}isGiftCardRecipient(e){return e.type&&e.type===Ge.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ge.TYPE}};n(Ge,"TYPE","gift_card_recipients");var Lu=Ge,Hr=Lu;var T=class T extends i{async create(e,t,r){return this.resources.create({...e,type:T.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:T.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:T.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`gift_cards/${s}/market`,t,r)}async gift_card_recipient(e,t,r){let s=e.id||e;return this.resources.fetch({type:"gift_card_recipients"},`gift_cards/${s}/gift_card_recipient`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`gift_cards/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`gift_cards/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`gift_cards/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`gift_cards/${s}/versions`,t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:T.TYPE,_purchase:true},t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:T.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:T.TYPE,_deactivate:true},t,r)}async _balance_change_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:T.TYPE,_balance_change_cents:t},r,s)}isGiftCard(e){return e.type&&e.type===T.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return T.TYPE}};n(T,"TYPE","gift_cards");var bu=T,Jr=bu;var Ye=class Ye extends i{async create(e,t,r){return this.resources.create({...e,type:Ye.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ye.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ye.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`google_geocoders/${s}/markets`,t,r)}async addresses(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`google_geocoders/${s}/addresses`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`google_geocoders/${s}/attachments`,t,r)}isGoogleGeocoder(e){return e.type&&e.type===Ye.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ye.TYPE}};n(Ye,"TYPE","google_geocoders");var wu=Ye,es=wu;var ne=class ne extends i{async create(e,t,r){return this.resources.create({...e,type:ne.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ne.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ne.TYPE}:e,t);}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`imports/${s}/events`,t,r)}async _interrupt(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ne.TYPE,_interrupt:true},t,r)}isImport(e){return e.type&&e.type===ne.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ne.TYPE}};n(ne,"TYPE","imports");var Au=ne,ts=Au;var q=class q extends i{async create(e,t,r){return this.resources.create({...e,type:q.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:q.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:q.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`in_stock_subscriptions/${s}/market`,t,r)}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`in_stock_subscriptions/${s}/customer`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`in_stock_subscriptions/${s}/sku`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`in_stock_subscriptions/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`in_stock_subscriptions/${s}/versions`,t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:q.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:q.TYPE,_deactivate:true},t,r)}isInStockSubscription(e){return e.type&&e.type===q.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return q.TYPE}};n(q,"TYPE","in_stock_subscriptions");var Eu=q,rs=Eu;var Ue=class Ue extends i{async create(e,t,r){return this.resources.create({...e,type:Ue.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ue.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ue.TYPE}:e,t);}async inventory_stock_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_stock_locations"},`inventory_models/${s}/inventory_stock_locations`,t,r)}async inventory_return_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_return_locations"},`inventory_models/${s}/inventory_return_locations`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`inventory_models/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`inventory_models/${s}/versions`,t,r)}isInventoryModel(e){return e.type&&e.type===Ue.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ue.TYPE}};n(Ue,"TYPE","inventory_models");var Ou=Ue,ss=Ou;var Ve=class Ve extends i{async create(e,t,r){return this.resources.create({...e,type:Ve.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ve.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ve.TYPE}:e,t);}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`inventory_return_locations/${s}/stock_location`,t,r)}async inventory_model(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_models"},`inventory_return_locations/${s}/inventory_model`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`inventory_return_locations/${s}/versions`,t,r)}isInventoryReturnLocation(e){return e.type&&e.type===Ve.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ve.TYPE}};n(Ve,"TYPE","inventory_return_locations");var Iu=Ve,os=Iu;var Fe=class Fe extends i{async create(e,t,r){return this.resources.create({...e,type:Fe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Fe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Fe.TYPE}:e,t);}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`inventory_stock_locations/${s}/stock_location`,t,r)}async inventory_model(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_models"},`inventory_stock_locations/${s}/inventory_model`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`inventory_stock_locations/${s}/versions`,t,r)}isInventoryStockLocation(e){return e.type&&e.type===Fe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Fe.TYPE}};n(Fe,"TYPE","inventory_stock_locations");var Mu=Fe,ns=Mu;var $e=class $e extends i{async create(e,t,r){return this.resources.create({...e,type:$e.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:$e.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:$e.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`klarna_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`klarna_gateways/${s}/versions`,t,r)}async klarna_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"klarna_payments"},`klarna_gateways/${s}/klarna_payments`,t,r)}isKlarnaGateway(e){return e.type&&e.type===$e.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return $e.TYPE}};n($e,"TYPE","klarna_gateways");var Qu=$e,is=Qu;var ie=class ie extends i{async create(e,t,r){return this.resources.create({...e,type:ie.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ie.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ie.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`klarna_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`klarna_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`klarna_payments/${s}/versions`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ie.TYPE,_update:true},t,r)}isKlarnaPayment(e){return e.type&&e.type===ie.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ie.TYPE}};n(ie,"TYPE","klarna_payments");var Gu=ie,as=Gu;var Be=class Be extends i{async create(e,t,r){return this.resources.create({...e,type:Be.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Be.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Be.TYPE}:e,t);}async line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`line_item_options/${s}/line_item`,t,r)}async sku_option(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_options"},`line_item_options/${s}/sku_option`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`line_item_options/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`line_item_options/${s}/tags`,t,r)}isLineItemOption(e){return e.type&&e.type===Be.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Be.TYPE}};n(Be,"TYPE","line_item_options");var Yu=Be,us=Yu;var w=class w extends i{async create(e,t,r){return this.resources.create({...e,type:w.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:w.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:w.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`line_items/${s}/order`,t,r)}async line_item_options(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_item_options"},`line_items/${s}/line_item_options`,t,r)}async return_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"return_line_items"},`line_items/${s}/return_line_items`,t,r)}async stock_reservations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`line_items/${s}/stock_reservations`,t,r)}async stock_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`line_items/${s}/stock_line_items`,t,r)}async stock_transfers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_transfers"},`line_items/${s}/stock_transfers`,t,r)}async notifications(e,t,r){let s=e.id||e;return this.resources.fetch({type:"notifications"},`line_items/${s}/notifications`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`line_items/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`line_items/${s}/tags`,t,r)}async _external_price(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:w.TYPE,_external_price:true},t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:w.TYPE,_reserve_stock:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:w.TYPE,_reset_circuit:true},t,r)}isLineItem(e){return e.type&&e.type===w.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return w.TYPE}};n(w,"TYPE","line_items");var Uu=w,cs=Uu;var D=class D extends i{async create(e,t,r){return this.resources.create({...e,type:D.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:D.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:D.TYPE}:e,t);}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`links/${s}/events`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:D.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:D.TYPE,_enable:true},t,r)}isLink(e){return e.type&&e.type===D.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return D.TYPE}};n(D,"TYPE","links");var Vu=D,ps=Vu;var qe=class qe extends i{async create(e,t,r){return this.resources.create({...e,type:qe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:qe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:qe.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`manual_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`manual_gateways/${s}/versions`,t,r)}isManualGateway(e){return e.type&&e.type===qe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return qe.TYPE}};n(qe,"TYPE","manual_gateways");var Fu=qe,ls=Fu;var De=class De extends i{async create(e,t,r){return this.resources.create({...e,type:De.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:De.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:De.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`manual_tax_calculators/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`manual_tax_calculators/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`manual_tax_calculators/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`manual_tax_calculators/${s}/versions`,t,r)}async tax_rules(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tax_rules"},`manual_tax_calculators/${s}/tax_rules`,t,r)}isManualTaxCalculator(e){return e.type&&e.type===De.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return De.TYPE}};n(De,"TYPE","manual_tax_calculators");var $u=De,ms=$u;var z=class z extends i{async create(e,t,r){return this.resources.create({...e,type:z.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:z.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:z.TYPE}:e,t);}async merchant(e,t,r){let s=e.id||e;return this.resources.fetch({type:"merchants"},`markets/${s}/merchant`,t,r)}async price_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_lists"},`markets/${s}/price_list`,t,r)}async base_price_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_lists"},`markets/${s}/base_price_list`,t,r)}async inventory_model(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_models"},`markets/${s}/inventory_model`,t,r)}async subscription_model(e,t,r){let s=e.id||e;return this.resources.fetch({type:"subscription_models"},`markets/${s}/subscription_model`,t,r)}async tax_calculator(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tax_calculators"},`markets/${s}/tax_calculator`,t,r)}async customer_group(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_groups"},`markets/${s}/customer_group`,t,r)}async geocoder(e,t,r){let s=e.id||e;return this.resources.fetch({type:"geocoders"},`markets/${s}/geocoder`,t,r)}async stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stores"},`markets/${s}/stores`,t,r)}async price_list_schedulers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_list_schedulers"},`markets/${s}/price_list_schedulers`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`markets/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`markets/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:z.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:z.TYPE,_enable:true},t,r)}isMarket(e){return e.type&&e.type===z.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return z.TYPE}};n(z,"TYPE","markets");var Bu=z,ys=Bu;var ze=class ze extends i{async create(e,t,r){return this.resources.create({...e,type:ze.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ze.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ze.TYPE}:e,t);}async address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`merchants/${s}/address`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`merchants/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`merchants/${s}/versions`,t,r)}isMerchant(e){return e.type&&e.type===ze.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ze.TYPE}};n(ze,"TYPE","merchants");var qu=ze,ds=qu;var je=class je extends i{async create(e,t,r){return this.resources.create({...e,type:je.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:je.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:je.TYPE}:e,t);}isNotification(e){return e.type&&e.type===je.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return je.TYPE}};n(je,"TYPE","notifications");var Du=je,Rs=Du;var We=class We extends i{async create(e,t,r){return this.resources.create({...e,type:We.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:We.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:We.TYPE}:e,t);}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`order_amount_promotion_rules/${s}/versions`,t,r)}isOrderAmountPromotionRule(e){return e.type&&e.type===We.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return We.TYPE}};n(We,"TYPE","order_amount_promotion_rules");var zu=We,gs=zu;var Ke=class Ke extends i{async create(e,t,r){return this.resources.create({...e,type:Ke.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ke.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ke.TYPE}:e,t);}async source_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_copies/${s}/source_order`,t,r)}async target_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_copies/${s}/target_order`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`order_copies/${s}/events`,t,r)}async order_subscription(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`order_copies/${s}/order_subscription`,t,r)}isOrderCopy(e){return e.type&&e.type===Ke.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ke.TYPE}};n(Ke,"TYPE","order_copies");var ju=Ke,_s=ju;var Ps=class Ps extends i{async source_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_factories/${s}/source_order`,t,r)}async target_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_factories/${s}/target_order`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`order_factories/${s}/events`,t,r)}isOrderFactory(e){return e.type&&e.type===Ps.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ps.TYPE}};n(Ps,"TYPE","order_factories");var Wu=Ps,hs=Wu;var Ne=class Ne extends i{async create(e,t,r){return this.resources.create({...e,type:Ne.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ne.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ne.TYPE}:e,t);}async order_subscription(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`order_subscription_items/${s}/order_subscription`,t,r)}async source_line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`order_subscription_items/${s}/source_line_item`,t,r)}isOrderSubscriptionItem(e){return e.type&&e.type===Ne.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ne.TYPE}};n(Ne,"TYPE","order_subscription_items");var Ku=Ne,fs=Ku;var S=class S extends i{async create(e,t,r){return this.resources.create({...e,type:S.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:S.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:S.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`order_subscriptions/${s}/market`,t,r)}async subscription_model(e,t,r){let s=e.id||e;return this.resources.fetch({type:"subscription_models"},`order_subscriptions/${s}/subscription_model`,t,r)}async source_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_subscriptions/${s}/source_order`,t,r)}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`order_subscriptions/${s}/customer`,t,r)}async customer_payment_source(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`order_subscriptions/${s}/customer_payment_source`,t,r)}async order_subscription_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscription_items"},`order_subscriptions/${s}/order_subscription_items`,t,r)}async order_factories(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_factories"},`order_subscriptions/${s}/order_factories`,t,r)}async recurring_order_copies(e,t,r){let s=e.id||e;return this.resources.fetch({type:"recurring_order_copies"},`order_subscriptions/${s}/recurring_order_copies`,t,r)}async orders(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`order_subscriptions/${s}/orders`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`order_subscriptions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`order_subscriptions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`order_subscriptions/${s}/versions`,t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_deactivate:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_cancel:true},t,r)}async _convert(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_convert:true},t,r)}isOrderSubscription(e){return e.type&&e.type===S.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return S.TYPE}};n(S,"TYPE","order_subscriptions");var Nu=S,ks=Nu;var y=class y extends i{async create(e,t,r){return this.resources.create({...e,type:y.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:y.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:y.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`orders/${s}/market`,t,r)}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`orders/${s}/customer`,t,r)}async shipping_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`orders/${s}/shipping_address`,t,r)}async billing_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`orders/${s}/billing_address`,t,r)}async store(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stores"},`orders/${s}/store`,t,r)}async available_payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`orders/${s}/available_payment_methods`,t,r)}async available_customer_payment_sources(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`orders/${s}/available_customer_payment_sources`,t,r)}async available_free_skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`orders/${s}/available_free_skus`,t,r)}async available_free_bundles(e,t,r){let s=e.id||e;return this.resources.fetch({type:"bundles"},`orders/${s}/available_free_bundles`,t,r)}async payment_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`orders/${s}/payment_method`,t,r)}async line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`orders/${s}/line_items`,t,r)}async line_item_options(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_item_options"},`orders/${s}/line_item_options`,t,r)}async stock_reservations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`orders/${s}/stock_reservations`,t,r)}async stock_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`orders/${s}/stock_line_items`,t,r)}async stock_transfers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_transfers"},`orders/${s}/stock_transfers`,t,r)}async shipments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipments"},`orders/${s}/shipments`,t,r)}async payment_options(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_options"},`orders/${s}/payment_options`,t,r)}async authorizations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"authorizations"},`orders/${s}/authorizations`,t,r)}async captures(e,t,r){let s=e.id||e;return this.resources.fetch({type:"captures"},`orders/${s}/captures`,t,r)}async voids(e,t,r){let s=e.id||e;return this.resources.fetch({type:"voids"},`orders/${s}/voids`,t,r)}async refunds(e,t,r){let s=e.id||e;return this.resources.fetch({type:"refunds"},`orders/${s}/refunds`,t,r)}async returns(e,t,r){let s=e.id||e;return this.resources.fetch({type:"returns"},`orders/${s}/returns`,t,r)}async order_subscription(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`orders/${s}/order_subscription`,t,r)}async order_subscriptions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`orders/${s}/order_subscriptions`,t,r)}async order_factories(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_factories"},`orders/${s}/order_factories`,t,r)}async order_copies(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_copies"},`orders/${s}/order_copies`,t,r)}async recurring_order_copies(e,t,r){let s=e.id||e;return this.resources.fetch({type:"recurring_order_copies"},`orders/${s}/recurring_order_copies`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`orders/${s}/attachments`,t,r)}async notifications(e,t,r){let s=e.id||e;return this.resources.fetch({type:"notifications"},`orders/${s}/notifications`,t,r)}async links(e,t,r){let s=e.id||e;return this.resources.fetch({type:"links"},`orders/${s}/links`,t,r)}async resource_errors(e,t,r){let s=e.id||e;return this.resources.fetch({type:"resource_errors"},`orders/${s}/resource_errors`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`orders/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`orders/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`orders/${s}/versions`,t,r)}async _archive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_archive:true},t,r)}async _unarchive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_unarchive:true},t,r)}async _pending(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_pending:true},t,r)}async _place(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_place:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_cancel:true},t,r)}async _approve(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_approve:true},t,r)}async _approve_and_capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_approve_and_capture:true},t,r)}async _authorize(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_authorize:true},t,r)}async _authorization_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_authorization_amount_cents:t},r,s)}async _capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_capture:true},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_refund:true},t,r)}async _fulfill(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_fulfill:true},t,r)}async _update_taxes(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_update_taxes:true},t,r)}async _nullify_payment_source(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_nullify_payment_source:true},t,r)}async _fix_payment_source(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_fix_payment_source:true},t,r)}async _billing_address_clone_id(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_billing_address_clone_id:t},r,s)}async _shipping_address_clone_id(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_shipping_address_clone_id:t},r,s)}async _customer_payment_source_id(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_customer_payment_source_id:t},r,s)}async _shipping_address_same_as_billing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_shipping_address_same_as_billing:true},t,r)}async _billing_address_same_as_shipping(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_billing_address_same_as_shipping:true},t,r)}async _commit_invoice(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_commit_invoice:true},t,r)}async _refund_invoice(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_refund_invoice:true},t,r)}async _save_payment_source_to_customer_wallet(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_save_payment_source_to_customer_wallet:true},t,r)}async _save_shipping_address_to_customer_address_book(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_save_shipping_address_to_customer_address_book:true},t,r)}async _save_billing_address_to_customer_address_book(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_save_billing_address_to_customer_address_book:true},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_refresh:true},t,r)}async _validate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_validate:true},t,r)}async _create_subscriptions(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_create_subscriptions:true},t,r)}async _start_editing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_start_editing:true},t,r)}async _stop_editing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_stop_editing:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:y.TYPE,_reset_circuit:true},t,r)}isOrder(e){return e.type&&e.type===y.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return y.TYPE}};n(y,"TYPE","orders");var Xu=y,Cs=Xu;var Ts=class Ts extends Ut{isOrganization(e){return e.type&&e.type===Ts.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ts.TYPE}path(){return "organization"}};n(Ts,"TYPE","organizations");var Zu=Ts,Ss=Zu;var Xe=class Xe extends i{async create(e,t,r){return this.resources.create({...e,type:Xe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Xe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Xe.TYPE}:e,t);}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`packages/${s}/stock_location`,t,r)}async parcels(e,t,r){let s=e.id||e;return this.resources.fetch({type:"parcels"},`packages/${s}/parcels`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`packages/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`packages/${s}/versions`,t,r)}isPackage(e){return e.type&&e.type===Xe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Xe.TYPE}};n(Xe,"TYPE","packages");var Hu=Xe,xs=Hu;var Ze=class Ze extends i{async create(e,t,r){return this.resources.create({...e,type:Ze.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ze.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ze.TYPE}:e,t);}async parcel(e,t,r){let s=e.id||e;return this.resources.fetch({type:"parcels"},`parcel_line_items/${s}/parcel`,t,r)}async stock_line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`parcel_line_items/${s}/stock_line_item`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`parcel_line_items/${s}/versions`,t,r)}isParcelLineItem(e){return e.type&&e.type===Ze.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ze.TYPE}};n(Ze,"TYPE","parcel_line_items");var Ju=Ze,vs=Ju;var He=class He extends i{async create(e,t,r){return this.resources.create({...e,type:He.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:He.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:He.TYPE}:e,t);}async shipment(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipments"},`parcels/${s}/shipment`,t,r)}async package(e,t,r){let s=e.id||e;return this.resources.fetch({type:"packages"},`parcels/${s}/package`,t,r)}async parcel_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"parcel_line_items"},`parcels/${s}/parcel_line_items`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`parcels/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`parcels/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`parcels/${s}/versions`,t,r)}isParcel(e){return e.type&&e.type===He.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return He.TYPE}};n(He,"TYPE","parcels");var ec=He,Ls=ec;var bs=class bs extends i{async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`payment_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`payment_gateways/${s}/versions`,t,r)}isPaymentGateway(e){return e.type&&e.type===bs.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return bs.TYPE}};n(bs,"TYPE","payment_gateways");var tc=bs,ws=tc;var j=class j extends i{async create(e,t,r){return this.resources.create({...e,type:j.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:j.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:j.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`payment_methods/${s}/market`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`payment_methods/${s}/payment_gateway`,t,r)}async store(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stores"},`payment_methods/${s}/store`,t,r)}async orders(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`payment_methods/${s}/orders`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`payment_methods/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`payment_methods/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:j.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:j.TYPE,_enable:true},t,r)}isPaymentMethod(e){return e.type&&e.type===j.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return j.TYPE}};n(j,"TYPE","payment_methods");var rc=j,As=rc;var Je=class Je extends i{async create(e,t,r){return this.resources.create({...e,type:Je.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Je.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Je.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`payment_options/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`payment_options/${s}/attachments`,t,r)}isPaymentOption(e){return e.type&&e.type===Je.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Je.TYPE}};n(Je,"TYPE","payment_options");var sc=Je,Es=sc;var et=class et extends i{async create(e,t,r){return this.resources.create({...e,type:et.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:et.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:et.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`paypal_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`paypal_gateways/${s}/versions`,t,r)}async paypal_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"paypal_payments"},`paypal_gateways/${s}/paypal_payments`,t,r)}isPaypalGateway(e){return e.type&&e.type===et.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return et.TYPE}};n(et,"TYPE","paypal_gateways");var oc=et,Os=oc;var tt=class tt extends i{async create(e,t,r){return this.resources.create({...e,type:tt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:tt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:tt.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`paypal_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`paypal_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`paypal_payments/${s}/versions`,t,r)}isPaypalPayment(e){return e.type&&e.type===tt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return tt.TYPE}};n(tt,"TYPE","paypal_payments");var nc=tt,Is=nc;var W=class W extends i{async create(e,t,r){return this.resources.create({...e,type:W.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:W.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:W.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`percentage_discount_promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`percentage_discount_promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`percentage_discount_promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`percentage_discount_promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`percentage_discount_promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`percentage_discount_promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`percentage_discount_promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`percentage_discount_promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`percentage_discount_promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`percentage_discount_promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`percentage_discount_promotions/${s}/versions`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`percentage_discount_promotions/${s}/skus`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:W.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:W.TYPE,_enable:true},t,r)}isPercentageDiscountPromotion(e){return e.type&&e.type===W.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return W.TYPE}};n(W,"TYPE","percentage_discount_promotions");var ic=W,Ms=ic;var Qs=class Qs extends i{async shipment(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipments"},`pickups/${s}/shipment`,t,r)}async parcels(e,t,r){let s=e.id||e;return this.resources.fetch({type:"parcels"},`pickups/${s}/parcels`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`pickups/${s}/events`,t,r)}isPickup(e){return e.type&&e.type===Qs.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Qs.TYPE}};n(Qs,"TYPE","pickups");var ac=Qs,Gs=ac;var rt=class rt extends i{async create(e,t,r){return this.resources.create({...e,type:rt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:rt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:rt.TYPE}:e,t);}async price(e,t,r){let s=e.id||e;return this.resources.fetch({type:"prices"},`price_frequency_tiers/${s}/price`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`price_frequency_tiers/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`price_frequency_tiers/${s}/versions`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`price_frequency_tiers/${s}/events`,t,r)}isPriceFrequencyTier(e){return e.type&&e.type===rt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return rt.TYPE}};n(rt,"TYPE","price_frequency_tiers");var uc=rt,Ys=uc;var K=class K extends i{async create(e,t,r){return this.resources.create({...e,type:K.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:K.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:K.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`price_list_schedulers/${s}/market`,t,r)}async price_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_lists"},`price_list_schedulers/${s}/price_list`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`price_list_schedulers/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`price_list_schedulers/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:K.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:K.TYPE,_enable:true},t,r)}isPriceListScheduler(e){return e.type&&e.type===K.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return K.TYPE}};n(K,"TYPE","price_list_schedulers");var cc=K,Us=cc;var st=class st extends i{async create(e,t,r){return this.resources.create({...e,type:st.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:st.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:st.TYPE}:e,t);}async prices(e,t,r){let s=e.id||e;return this.resources.fetch({type:"prices"},`price_lists/${s}/prices`,t,r)}async price_list_schedulers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_list_schedulers"},`price_lists/${s}/price_list_schedulers`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`price_lists/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`price_lists/${s}/versions`,t,r)}isPriceList(e){return e.type&&e.type===st.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return st.TYPE}};n(st,"TYPE","price_lists");var pc=st,Vs=pc;var Fs=class Fs extends i{async price(e,t,r){let s=e.id||e;return this.resources.fetch({type:"prices"},`price_tiers/${s}/price`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`price_tiers/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`price_tiers/${s}/versions`,t,r)}isPriceTier(e){return e.type&&e.type===Fs.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Fs.TYPE}};n(Fs,"TYPE","price_tiers");var lc=Fs,$s=lc;var ot=class ot extends i{async create(e,t,r){return this.resources.create({...e,type:ot.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ot.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ot.TYPE}:e,t);}async price(e,t,r){let s=e.id||e;return this.resources.fetch({type:"prices"},`price_volume_tiers/${s}/price`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`price_volume_tiers/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`price_volume_tiers/${s}/versions`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`price_volume_tiers/${s}/events`,t,r)}isPriceVolumeTier(e){return e.type&&e.type===ot.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ot.TYPE}};n(ot,"TYPE","price_volume_tiers");var mc=ot,Bs=mc;var nt=class nt extends i{async create(e,t,r){return this.resources.create({...e,type:nt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:nt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:nt.TYPE}:e,t);}async price_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_lists"},`prices/${s}/price_list`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`prices/${s}/sku`,t,r)}async price_tiers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_tiers"},`prices/${s}/price_tiers`,t,r)}async price_volume_tiers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_volume_tiers"},`prices/${s}/price_volume_tiers`,t,r)}async price_frequency_tiers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"price_frequency_tiers"},`prices/${s}/price_frequency_tiers`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`prices/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`prices/${s}/versions`,t,r)}async jwt_customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`prices/${s}/jwt_customer`,t,r)}async jwt_markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`prices/${s}/jwt_markets`,t,r)}async jwt_stock_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`prices/${s}/jwt_stock_locations`,t,r)}isPrice(e){return e.type&&e.type===nt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return nt.TYPE}};n(nt,"TYPE","prices");var yc=nt,qs=yc;var Ds=class Ds extends i{async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`promotion_rules/${s}/versions`,t,r)}isPromotionRule(e){return e.type&&e.type===Ds.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ds.TYPE}};n(Ds,"TYPE","promotion_rules");var dc=Ds,zs=dc;var js=class js extends i{async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`promotions/${s}/market`,t,r)}async order_amount_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`promotions/${s}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`promotions/${s}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`promotions/${s}/coupon_codes_promotion_rule`,t,r)}async custom_promotion_rule(e,t,r){let s=e.id||e;return this.resources.fetch({type:"custom_promotion_rules"},`promotions/${s}/custom_promotion_rule`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`promotions/${s}/sku_list`,t,r)}async coupons(e,t,r){let s=e.id||e;return this.resources.fetch({type:"coupons"},`promotions/${s}/coupons`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`promotions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`promotions/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`promotions/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`promotions/${s}/versions`,t,r)}isPromotion(e){return e.type&&e.type===js.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return js.TYPE}};n(js,"TYPE","promotions");var Rc=js,Ws=Rc;var it=class it extends i{async create(e,t,r){return this.resources.create({...e,type:it.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:it.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:it.TYPE}:e,t);}async source_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`recurring_order_copies/${s}/source_order`,t,r)}async target_order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`recurring_order_copies/${s}/target_order`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`recurring_order_copies/${s}/events`,t,r)}async order_subscription(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`recurring_order_copies/${s}/order_subscription`,t,r)}isRecurringOrderCopy(e){return e.type&&e.type===it.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return it.TYPE}};n(it,"TYPE","recurring_order_copies");var gc=it,Ks=gc;var Et=class Et extends i{async update(e,t,r){return this.resources.update({...e,type:Et.TYPE},t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`refunds/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`refunds/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`refunds/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`refunds/${s}/versions`,t,r)}async reference_capture(e,t,r){let s=e.id||e;return this.resources.fetch({type:"captures"},`refunds/${s}/reference_capture`,t,r)}async return(e,t,r){let s=e.id||e;return this.resources.fetch({type:"returns"},`refunds/${s}/return`,t,r)}async _forward(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Et.TYPE,_forward:true},t,r)}isRefund(e){return e.type&&e.type===Et.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Et.TYPE}};n(Et,"TYPE","refunds");var _c=Et,Ns=_c;var Xs=class Xs extends i{async stock_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_items"},`reserved_stocks/${s}/stock_item`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`reserved_stocks/${s}/sku`,t,r)}async stock_reservations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`reserved_stocks/${s}/stock_reservations`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`reserved_stocks/${s}/versions`,t,r)}isReservedStock(e){return e.type&&e.type===Xs.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Xs.TYPE}};n(Xs,"TYPE","reserved_stocks");var Pc=Xs,Zs=Pc;var Hs=class Hs extends i{isResourceError(e){return e.type&&e.type===Hs.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Hs.TYPE}};n(Hs,"TYPE","resource_errors");var hc=Hs,Js=hc;var ae=class ae extends i{async create(e,t,r){return this.resources.create({...e,type:ae.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ae.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ae.TYPE}:e,t);}async return(e,t,r){let s=e.id||e;return this.resources.fetch({type:"returns"},`return_line_items/${s}/return`,t,r)}async line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`return_line_items/${s}/line_item`,t,r)}async _restock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ae.TYPE,_restock:true},t,r)}isReturnLineItem(e){return e.type&&e.type===ae.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ae.TYPE}};n(ae,"TYPE","return_line_items");var fc=ae,eo=fc;var _=class _ extends i{async create(e,t,r){return this.resources.create({...e,type:_.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:_.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:_.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`returns/${s}/order`,t,r)}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`returns/${s}/customer`,t,r)}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`returns/${s}/stock_location`,t,r)}async origin_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`returns/${s}/origin_address`,t,r)}async destination_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`returns/${s}/destination_address`,t,r)}async reference_capture(e,t,r){let s=e.id||e;return this.resources.fetch({type:"captures"},`returns/${s}/reference_capture`,t,r)}async reference_refund(e,t,r){let s=e.id||e;return this.resources.fetch({type:"refunds"},`returns/${s}/reference_refund`,t,r)}async return_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"return_line_items"},`returns/${s}/return_line_items`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`returns/${s}/attachments`,t,r)}async resource_errors(e,t,r){let s=e.id||e;return this.resources.fetch({type:"resource_errors"},`returns/${s}/resource_errors`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`returns/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`returns/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`returns/${s}/versions`,t,r)}async _request(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_request:true},t,r)}async _approve(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_approve:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_cancel:true},t,r)}async _ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_ship:true},t,r)}async _reject(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_reject:true},t,r)}async _receive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_receive:true},t,r)}async _restock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_restock:true},t,r)}async _archive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_archive:true},t,r)}async _unarchive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_unarchive:true},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_refund:true},t,r)}async _refund_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:_.TYPE,_refund_amount_cents:t},r,s)}isReturn(e){return e.type&&e.type===_.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return _.TYPE}};n(_,"TYPE","returns");var kc=_,to=kc;var at=class at extends i{async create(e,t,r){return this.resources.create({...e,type:at.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:at.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:at.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`satispay_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`satispay_gateways/${s}/versions`,t,r)}async satispay_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"satispay_payments"},`satispay_gateways/${s}/satispay_payments`,t,r)}isSatispayGateway(e){return e.type&&e.type===at.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return at.TYPE}};n(at,"TYPE","satispay_gateways");var Cc=at,ro=Cc;var ue=class ue extends i{async create(e,t,r){return this.resources.create({...e,type:ue.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ue.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ue.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`satispay_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`satispay_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`satispay_payments/${s}/versions`,t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ue.TYPE,_refresh:true},t,r)}isSatispayPayment(e){return e.type&&e.type===ue.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ue.TYPE}};n(ue,"TYPE","satispay_payments");var Tc=ue,so=Tc;var g=class g extends i{async create(e,t,r){return this.resources.create({...e,type:g.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:g.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:g.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`shipments/${s}/order`,t,r)}async shipping_category(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_categories"},`shipments/${s}/shipping_category`,t,r)}async inventory_stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_stock_locations"},`shipments/${s}/inventory_stock_location`,t,r)}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`shipments/${s}/stock_location`,t,r)}async origin_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`shipments/${s}/origin_address`,t,r)}async shipping_address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`shipments/${s}/shipping_address`,t,r)}async shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`shipments/${s}/shipping_method`,t,r)}async delivery_lead_time(e,t,r){let s=e.id||e;return this.resources.fetch({type:"delivery_lead_times"},`shipments/${s}/delivery_lead_time`,t,r)}async pickup(e,t,r){let s=e.id||e;return this.resources.fetch({type:"pickups"},`shipments/${s}/pickup`,t,r)}async stock_line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`shipments/${s}/stock_line_items`,t,r)}async stock_transfers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_transfers"},`shipments/${s}/stock_transfers`,t,r)}async line_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`shipments/${s}/line_items`,t,r)}async available_shipping_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`shipments/${s}/available_shipping_methods`,t,r)}async carrier_accounts(e,t,r){let s=e.id||e;return this.resources.fetch({type:"carrier_accounts"},`shipments/${s}/carrier_accounts`,t,r)}async parcels(e,t,r){let s=e.id||e;return this.resources.fetch({type:"parcels"},`shipments/${s}/parcels`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipments/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`shipments/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`shipments/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipments/${s}/versions`,t,r)}async _upcoming(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_upcoming:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_cancel:true},t,r)}async _on_hold(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_on_hold:true},t,r)}async _picking(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_picking:true},t,r)}async _packing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_packing:true},t,r)}async _ready_to_ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_ready_to_ship:true},t,r)}async _ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_ship:true},t,r)}async _deliver(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_deliver:true},t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_reserve_stock:true},t,r)}async _release_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_release_stock:true},t,r)}async _decrement_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_decrement_stock:true},t,r)}async _get_rates(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_get_rates:true},t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_purchase:true},t,r)}isShipment(e){return e.type&&e.type===g.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return g.TYPE}};n(g,"TYPE","shipments");var Sc=g,oo=Sc;var ut=class ut extends i{async create(e,t,r){return this.resources.create({...e,type:ut.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ut.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ut.TYPE}:e,t);}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`shipping_categories/${s}/skus`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_categories/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipping_categories/${s}/versions`,t,r)}isShippingCategory(e){return e.type&&e.type===ut.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ut.TYPE}};n(ut,"TYPE","shipping_categories");var xc=ut,no=xc;var io=class io extends i{async shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`shipping_method_tiers/${s}/shipping_method`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_method_tiers/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipping_method_tiers/${s}/versions`,t,r)}isShippingMethodTier(e){return e.type&&e.type===io.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return io.TYPE}};n(io,"TYPE","shipping_method_tiers");var vc=io,ao=vc;var A=class A extends i{async create(e,t,r){return this.resources.create({...e,type:A.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:A.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:A.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`shipping_methods/${s}/market`,t,r)}async shipping_zone(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_zones"},`shipping_methods/${s}/shipping_zone`,t,r)}async shipping_category(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_categories"},`shipping_methods/${s}/shipping_category`,t,r)}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`shipping_methods/${s}/stock_location`,t,r)}async delivery_lead_time_for_shipment(e,t,r){let s=e.id||e;return this.resources.fetch({type:"delivery_lead_times"},`shipping_methods/${s}/delivery_lead_time_for_shipment`,t,r)}async shipping_method_tiers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_method_tiers"},`shipping_methods/${s}/shipping_method_tiers`,t,r)}async shipping_weight_tiers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_weight_tiers"},`shipping_methods/${s}/shipping_weight_tiers`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_methods/${s}/attachments`,t,r)}async notifications(e,t,r){let s=e.id||e;return this.resources.fetch({type:"notifications"},`shipping_methods/${s}/notifications`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipping_methods/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:A.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:A.TYPE,_enable:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:A.TYPE,_reset_circuit:true},t,r)}isShippingMethod(e){return e.type&&e.type===A.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return A.TYPE}};n(A,"TYPE","shipping_methods");var Lc=A,uo=Lc;var ct=class ct extends i{async create(e,t,r){return this.resources.create({...e,type:ct.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ct.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ct.TYPE}:e,t);}async shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`shipping_weight_tiers/${s}/shipping_method`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_weight_tiers/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipping_weight_tiers/${s}/versions`,t,r)}isShippingWeightTier(e){return e.type&&e.type===ct.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ct.TYPE}};n(ct,"TYPE","shipping_weight_tiers");var bc=ct,co=bc;var pt=class pt extends i{async create(e,t,r){return this.resources.create({...e,type:pt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:pt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:pt.TYPE}:e,t);}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_zones/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`shipping_zones/${s}/versions`,t,r)}isShippingZone(e){return e.type&&e.type===pt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return pt.TYPE}};n(pt,"TYPE","shipping_zones");var wc=pt,po=wc;var lt=class lt extends i{async create(e,t,r){return this.resources.create({...e,type:lt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:lt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:lt.TYPE}:e,t);}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`sku_list_items/${s}/sku_list`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`sku_list_items/${s}/sku`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`sku_list_items/${s}/versions`,t,r)}isSkuListItem(e){return e.type&&e.type===lt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return lt.TYPE}};n(lt,"TYPE","sku_list_items");var Ac=lt,lo=Ac;var mt=class mt extends i{async create(e,t,r){return this.resources.create({...e,type:mt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:mt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:mt.TYPE}:e,t);}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`sku_list_promotion_rules/${s}/versions`,t,r)}async sku_list(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`sku_list_promotion_rules/${s}/sku_list`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`sku_list_promotion_rules/${s}/skus`,t,r)}isSkuListPromotionRule(e){return e.type&&e.type===mt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return mt.TYPE}};n(mt,"TYPE","sku_list_promotion_rules");var Ec=mt,mo=Ec;var yt=class yt extends i{async create(e,t,r){return this.resources.create({...e,type:yt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:yt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:yt.TYPE}:e,t);}async customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`sku_lists/${s}/customer`,t,r)}async skus(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`sku_lists/${s}/skus`,t,r)}async sku_list_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_items"},`sku_lists/${s}/sku_list_items`,t,r)}async bundles(e,t,r){let s=e.id||e;return this.resources.fetch({type:"bundles"},`sku_lists/${s}/bundles`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`sku_lists/${s}/attachments`,t,r)}async links(e,t,r){let s=e.id||e;return this.resources.fetch({type:"links"},`sku_lists/${s}/links`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`sku_lists/${s}/versions`,t,r)}isSkuList(e){return e.type&&e.type===yt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return yt.TYPE}};n(yt,"TYPE","sku_lists");var Oc=yt,yo=Oc;var dt=class dt extends i{async create(e,t,r){return this.resources.create({...e,type:dt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:dt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:dt.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`sku_options/${s}/market`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`sku_options/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`sku_options/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`sku_options/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`sku_options/${s}/versions`,t,r)}isSkuOption(e){return e.type&&e.type===dt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return dt.TYPE}};n(dt,"TYPE","sku_options");var Ic=dt,Ro=Ic;var Rt=class Rt extends i{async create(e,t,r){return this.resources.create({...e,type:Rt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Rt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Rt.TYPE}:e,t);}async shipping_category(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_categories"},`skus/${s}/shipping_category`,t,r)}async prices(e,t,r){let s=e.id||e;return this.resources.fetch({type:"prices"},`skus/${s}/prices`,t,r)}async stock_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_items"},`skus/${s}/stock_items`,t,r)}async stock_reservations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`skus/${s}/stock_reservations`,t,r)}async delivery_lead_times(e,t,r){let s=e.id||e;return this.resources.fetch({type:"delivery_lead_times"},`skus/${s}/delivery_lead_times`,t,r)}async sku_options(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_options"},`skus/${s}/sku_options`,t,r)}async sku_list_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_list_items"},`skus/${s}/sku_list_items`,t,r)}async sku_lists(e,t,r){let s=e.id||e;return this.resources.fetch({type:"sku_lists"},`skus/${s}/sku_lists`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`skus/${s}/attachments`,t,r)}async links(e,t,r){let s=e.id||e;return this.resources.fetch({type:"links"},`skus/${s}/links`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`skus/${s}/events`,t,r)}async tags(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tags"},`skus/${s}/tags`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`skus/${s}/versions`,t,r)}async jwt_customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`skus/${s}/jwt_customer`,t,r)}async jwt_markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`skus/${s}/jwt_markets`,t,r)}async jwt_stock_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`skus/${s}/jwt_stock_locations`,t,r)}isSku(e){return e.type&&e.type===Rt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Rt.TYPE}};n(Rt,"TYPE","skus");var Mc=Rt,go=Mc;var ce=class ce extends i{async create(e,t,r){return this.resources.create({...e,type:ce.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ce.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ce.TYPE}:e,t);}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`stock_items/${s}/stock_location`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`stock_items/${s}/sku`,t,r)}async reserved_stock(e,t,r){let s=e.id||e;return this.resources.fetch({type:"reserved_stocks"},`stock_items/${s}/reserved_stock`,t,r)}async stock_reservations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`stock_items/${s}/stock_reservations`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`stock_items/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stock_items/${s}/versions`,t,r)}async _validate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ce.TYPE,_validate:true},t,r)}isStockItem(e){return e.type&&e.type===ce.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ce.TYPE}};n(ce,"TYPE","stock_items");var Qc=ce,_o=Qc;var E=class E extends i{async create(e,t,r){return this.resources.create({...e,type:E.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:E.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:E.TYPE}:e,t);}async shipment(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipments"},`stock_line_items/${s}/shipment`,t,r)}async line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`stock_line_items/${s}/line_item`,t,r)}async stock_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_items"},`stock_line_items/${s}/stock_item`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`stock_line_items/${s}/sku`,t,r)}async stock_reservation(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`stock_line_items/${s}/stock_reservation`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stock_line_items/${s}/versions`,t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_reserve_stock:true},t,r)}async _release_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_release_stock:true},t,r)}async _decrement_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_decrement_stock:true},t,r)}isStockLineItem(e){return e.type&&e.type===E.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return E.TYPE}};n(E,"TYPE","stock_line_items");var Gc=E,Po=Gc;var gt=class gt extends i{async create(e,t,r){return this.resources.create({...e,type:gt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:gt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:gt.TYPE}:e,t);}async address(e,t,r){let s=e.id||e;return this.resources.fetch({type:"addresses"},`stock_locations/${s}/address`,t,r)}async inventory_stock_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_stock_locations"},`stock_locations/${s}/inventory_stock_locations`,t,r)}async inventory_return_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"inventory_return_locations"},`stock_locations/${s}/inventory_return_locations`,t,r)}async stock_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_items"},`stock_locations/${s}/stock_items`,t,r)}async stock_transfers(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_transfers"},`stock_locations/${s}/stock_transfers`,t,r)}async stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stores"},`stock_locations/${s}/stores`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`stock_locations/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stock_locations/${s}/versions`,t,r)}isStockLocation(e){return e.type&&e.type===gt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return gt.TYPE}};n(gt,"TYPE","stock_locations");var Yc=gt,ho=Yc;var pe=class pe extends i{async create(e,t,r){return this.resources.create({...e,type:pe.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:pe.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:pe.TYPE}:e,t);}async line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`stock_reservations/${s}/line_item`,t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`stock_reservations/${s}/order`,t,r)}async stock_line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`stock_reservations/${s}/stock_line_item`,t,r)}async stock_transfer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_transfers"},`stock_reservations/${s}/stock_transfer`,t,r)}async stock_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_items"},`stock_reservations/${s}/stock_item`,t,r)}async reserved_stock(e,t,r){let s=e.id||e;return this.resources.fetch({type:"reserved_stocks"},`stock_reservations/${s}/reserved_stock`,t,r)}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`stock_reservations/${s}/sku`,t,r)}async _pending(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:pe.TYPE,_pending:true},t,r)}isStockReservation(e){return e.type&&e.type===pe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return pe.TYPE}};n(pe,"TYPE","stock_reservations");var Uc=pe,fo=Uc;var f=class f extends i{async create(e,t,r){return this.resources.create({...e,type:f.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:f.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:f.TYPE}:e,t);}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`stock_transfers/${s}/sku`,t,r)}async origin_stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`stock_transfers/${s}/origin_stock_location`,t,r)}async destination_stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`stock_transfers/${s}/destination_stock_location`,t,r)}async shipment(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipments"},`stock_transfers/${s}/shipment`,t,r)}async line_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"line_items"},`stock_transfers/${s}/line_item`,t,r)}async stock_reservation(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_reservations"},`stock_transfers/${s}/stock_reservation`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`stock_transfers/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`stock_transfers/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stock_transfers/${s}/versions`,t,r)}async _upcoming(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_upcoming:true},t,r)}async _on_hold(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_on_hold:true},t,r)}async _picking(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_picking:true},t,r)}async _in_transit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_in_transit:true},t,r)}async _complete(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_complete:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_cancel:true},t,r)}isStockTransfer(e){return e.type&&e.type===f.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return f.TYPE}};n(f,"TYPE","stock_transfers");var Vc=f,ko=Vc;var _t=class _t extends i{async create(e,t,r){return this.resources.create({...e,type:_t.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:_t.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:_t.TYPE}:e,t);}async market(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`stores/${s}/market`,t,r)}async merchant(e,t,r){let s=e.id||e;return this.resources.fetch({type:"merchants"},`stores/${s}/merchant`,t,r)}async stock_location(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`stores/${s}/stock_location`,t,r)}async orders(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`stores/${s}/orders`,t,r)}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`stores/${s}/payment_methods`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`stores/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stores/${s}/versions`,t,r)}isStore(e){return e.type&&e.type===_t.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return _t.TYPE}};n(_t,"TYPE","stores");var Fc=_t,Co=Fc;var Pt=class Pt extends i{async create(e,t,r){return this.resources.create({...e,type:Pt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Pt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Pt.TYPE}:e,t);}async payment_methods(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`stripe_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stripe_gateways/${s}/versions`,t,r)}async stripe_payments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stripe_payments"},`stripe_gateways/${s}/stripe_payments`,t,r)}isStripeGateway(e){return e.type&&e.type===Pt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Pt.TYPE}};n(Pt,"TYPE","stripe_gateways");var $c=Pt,To=$c;var N=class N extends i{async create(e,t,r){return this.resources.create({...e,type:N.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:N.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:N.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`stripe_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`stripe_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stripe_payments/${s}/versions`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:N.TYPE,_update:true},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:N.TYPE,_refresh:true},t,r)}isStripePayment(e){return e.type&&e.type===N.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return N.TYPE}};n(N,"TYPE","stripe_payments");var Bc=N,So=Bc;var ht=class ht extends i{async create(e,t,r){return this.resources.create({...e,type:ht.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ht.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ht.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`stripe_tax_accounts/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`stripe_tax_accounts/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`stripe_tax_accounts/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`stripe_tax_accounts/${s}/versions`,t,r)}async tax_categories(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tax_categories"},`stripe_tax_accounts/${s}/tax_categories`,t,r)}isStripeTaxAccount(e){return e.type&&e.type===ht.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ht.TYPE}};n(ht,"TYPE","stripe_tax_accounts");var qc=ht,xo=qc;var ft=class ft extends i{async create(e,t,r){return this.resources.create({...e,type:ft.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:ft.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ft.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`subscription_models/${s}/markets`,t,r)}async order_subscriptions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`subscription_models/${s}/order_subscriptions`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`subscription_models/${s}/attachments`,t,r)}isSubscriptionModel(e){return e.type&&e.type===ft.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ft.TYPE}};n(ft,"TYPE","subscription_models");var Dc=ft,vo=Dc;var kt=class kt extends i{async create(e,t,r){return this.resources.create({...e,type:kt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:kt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:kt.TYPE}:e,t);}isTag(e){return e.type&&e.type===kt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return kt.TYPE}};n(kt,"TYPE","tags");var zc=kt,Lo=zc;var Ct=class Ct extends i{async create(e,t,r){return this.resources.create({...e,type:Ct.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Ct.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Ct.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`talon_one_accounts/${s}/markets`,t,r)}async discount_engine_items(e,t,r){let s=e.id||e;return this.resources.fetch({type:"discount_engine_items"},`talon_one_accounts/${s}/discount_engine_items`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`talon_one_accounts/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`talon_one_accounts/${s}/versions`,t,r)}isTalonOneAccount(e){return e.type&&e.type===Ct.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ct.TYPE}};n(Ct,"TYPE","talon_one_accounts");var jc=Ct,bo=jc;var wo=class wo extends i{async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`tax_calculators/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`tax_calculators/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`tax_calculators/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`tax_calculators/${s}/versions`,t,r)}isTaxCalculator(e){return e.type&&e.type===wo.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return wo.TYPE}};n(wo,"TYPE","tax_calculators");var Wc=wo,Ao=Wc;var Tt=class Tt extends i{async create(e,t,r){return this.resources.create({...e,type:Tt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:Tt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Tt.TYPE}:e,t);}async sku(e,t,r){let s=e.id||e;return this.resources.fetch({type:"skus"},`tax_categories/${s}/sku`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`tax_categories/${s}/attachments`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`tax_categories/${s}/versions`,t,r)}isTaxCategory(e){return e.type&&e.type===Tt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Tt.TYPE}};n(Tt,"TYPE","tax_categories");var Kc=Tt,Eo=Kc;var St=class St extends i{async create(e,t,r){return this.resources.create({...e,type:St.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:St.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:St.TYPE}:e,t);}async manual_tax_calculator(e,t,r){let s=e.id||e;return this.resources.fetch({type:"manual_tax_calculators"},`tax_rules/${s}/manual_tax_calculator`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`tax_rules/${s}/versions`,t,r)}isTaxRule(e){return e.type&&e.type===St.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return St.TYPE}};n(St,"TYPE","tax_rules");var Nc=St,Oo=Nc;var xt=class xt extends i{async create(e,t,r){return this.resources.create({...e,type:xt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:xt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:xt.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`taxjar_accounts/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`taxjar_accounts/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`taxjar_accounts/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`taxjar_accounts/${s}/versions`,t,r)}async tax_categories(e,t,r){let s=e.id||e;return this.resources.fetch({type:"tax_categories"},`taxjar_accounts/${s}/tax_categories`,t,r)}isTaxjarAccount(e){return e.type&&e.type===xt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return xt.TYPE}};n(xt,"TYPE","taxjar_accounts");var Xc=xt,Io=Xc;var Mo=class Mo extends i{async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`transactions/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`transactions/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`transactions/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`transactions/${s}/versions`,t,r)}isTransaction(e){return e.type&&e.type===Mo.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Mo.TYPE}};n(Mo,"TYPE","transactions");var Zc=Mo,Qo=Zc;var Go=class Go extends i{isVersion(e){return e.type&&e.type===Go.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Go.TYPE}};n(Go,"TYPE","versions");var Hc=Go,Yo=Hc;var le=class le extends i{async create(e,t,r){return this.resources.create({...e,type:le.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:le.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:le.TYPE}:e,t);}async markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`vertex_accounts/${s}/markets`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`vertex_accounts/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`vertex_accounts/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`vertex_accounts/${s}/versions`,t,r)}async _refresh_token(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:le.TYPE,_refresh_token:true},t,r)}isVertexAccount(e){return e.type&&e.type===le.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return le.TYPE}};n(le,"TYPE","vertex_accounts");var Jc=le,Uo=Jc;var Ot=class Ot extends i{async update(e,t,r){return this.resources.update({...e,type:Ot.TYPE},t,r)}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`voids/${s}/order`,t,r)}async attachments(e,t,r){let s=e.id||e;return this.resources.fetch({type:"attachments"},`voids/${s}/attachments`,t,r)}async events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`voids/${s}/events`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`voids/${s}/versions`,t,r)}async reference_authorization(e,t,r){let s=e.id||e;return this.resources.fetch({type:"authorizations"},`voids/${s}/reference_authorization`,t,r)}async _forward(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Ot.TYPE,_forward:true},t,r)}isVoid(e){return e.type&&e.type===Ot.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ot.TYPE}};n(Ot,"TYPE","voids");var ep=Ot,Vo=ep;var O=class O extends i{async create(e,t,r){return this.resources.create({...e,type:O.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:O.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:O.TYPE}:e,t);}async last_event_callbacks(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_callbacks"},`webhooks/${s}/last_event_callbacks`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`webhooks/${s}/versions`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:O.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:O.TYPE,_enable:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:O.TYPE,_reset_circuit:true},t,r)}isWebhook(e){return e.type&&e.type===O.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return O.TYPE}};n(O,"TYPE","webhooks");var tp=O,Fo=tp;var vt=class vt extends i{async create(e,t,r){return this.resources.create({...e,type:vt.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:vt.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:vt.TYPE}:e,t);}async order(e,t,r){let s=e.id||e;return this.resources.fetch({type:"orders"},`wire_transfers/${s}/order`,t,r)}async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`wire_transfers/${s}/versions`,t,r)}isWireTransfer(e){return e.type&&e.type===vt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return vt.TYPE}};n(vt,"TYPE","wire_transfers");var rp=vt,$o=rp;var Gt=["addresses","adjustments","adyen_gateways","adyen_payments","applications","attachments","authorizations","avalara_accounts","axerve_gateways","axerve_payments","bing_geocoders","braintree_gateways","braintree_payments","bundles","buy_x_pay_y_promotions","captures","carrier_accounts","checkout_com_gateways","checkout_com_payments","cleanups","coupon_codes_promotion_rules","coupon_recipients","coupons","custom_promotion_rules","customer_addresses","customer_groups","customer_password_resets","customer_payment_sources","customer_subscriptions","customers","delivery_lead_times","discount_engine_items","discount_engines","easypost_pickups","event_callbacks","events","exports","external_gateways","external_payments","external_promotions","external_tax_calculators","fixed_amount_promotions","fixed_price_promotions","flex_promotions","free_gift_promotions","free_shipping_promotions","geocoders","gift_card_recipients","gift_cards","google_geocoders","imports","in_stock_subscriptions","inventory_models","inventory_return_locations","inventory_stock_locations","klarna_gateways","klarna_payments","line_item_options","line_items","links","manual_gateways","manual_tax_calculators","markets","merchants","notifications","order_amount_promotion_rules","order_copies","order_factories","order_subscription_items","order_subscriptions","orders","organizations","packages","parcel_line_items","parcels","payment_gateways","payment_methods","payment_options","paypal_gateways","paypal_payments","percentage_discount_promotions","pickups","price_frequency_tiers","price_list_schedulers","price_lists","price_tiers","price_volume_tiers","prices","promotion_rules","promotions","recurring_order_copies","refunds","reserved_stocks","resource_errors","return_line_items","returns","satispay_gateways","satispay_payments","shipments","shipping_categories","shipping_method_tiers","shipping_methods","shipping_weight_tiers","shipping_zones","sku_list_items","sku_list_promotion_rules","sku_lists","sku_options","skus","stock_items","stock_line_items","stock_locations","stock_reservations","stock_transfers","stores","stripe_gateways","stripe_payments","stripe_tax_accounts","subscription_models","tags","talon_one_accounts","tax_calculators","tax_categories","tax_rules","taxjar_accounts","transactions","versions","vertex_accounts","voids","webhooks","wire_transfers"],ka=["applications","organizations"];var Vt={resources:a=>a?[...Gt].sort():Gt,singletons:a=>a?[...ka].sort():ka,isSingleton:a=>ka.includes(a),isSdkError:a=>P.isSdkError(a),isApiError:a=>me.isApiError(a),init:a=>op(a),isTokenExpired:a=>Ra(a),get schemaVersion(){return sp}};var Pp=C("commercelayer"),sp="7.8.0";var l,Bo,qo,Do,zo,jo,Wo,Ko,No,Xo,Zo,Ho,Jo,en,tn,rn,sn,on,nn,an,un,cn,pn,ln,mn,yn,dn,Rn,gn,_n,Pn,hn,fn,kn,Cn,Tn,Sn,xn,vn,Ln,bn,wn,An,En,On,In,Mn,Qn,Gn,Yn,Un,Vn,Fn,$n,Bn,qn,Dn,zn,jn,Wn,Kn,Nn,Xn,Zn,Hn,Jn,ei,ti,ri,si,oi,ni,ii,ai,ui,ci,pi,li,mi,yi,di,Ri,gi,_i,Pi,hi,fi,ki,Ci,Ti,Si,xi,vi,Li,bi,wi,Ai,Ei,Oi,Ii,Mi,Qi,Gi,Yi,Ui,Vi,Fi,$i,Bi,qi,Di,zi,ji,Wi,Ki,Ni,Xi,Zi,Hi,Ji,ea,ta,ra,sa,oa,na,ia,aa,ua,ca,pa,la,np=class{constructor(e){n(this,"openApiSchemaVersion",sp);c(this,l);c(this,Bo);c(this,qo);c(this,Do);c(this,zo);c(this,jo);c(this,Wo);c(this,Ko);c(this,No);c(this,Xo);c(this,Zo);c(this,Ho);c(this,Jo);c(this,en);c(this,tn);c(this,rn);c(this,sn);c(this,on);c(this,nn);c(this,an);c(this,un);c(this,cn);c(this,pn);c(this,ln);c(this,mn);c(this,yn);c(this,dn);c(this,Rn);c(this,gn);c(this,_n);c(this,Pn);c(this,hn);c(this,fn);c(this,kn);c(this,Cn);c(this,Tn);c(this,Sn);c(this,xn);c(this,vn);c(this,Ln);c(this,bn);c(this,wn);c(this,An);c(this,En);c(this,On);c(this,In);c(this,Mn);c(this,Qn);c(this,Gn);c(this,Yn);c(this,Un);c(this,Vn);c(this,Fn);c(this,$n);c(this,Bn);c(this,qn);c(this,Dn);c(this,zn);c(this,jn);c(this,Wn);c(this,Kn);c(this,Nn);c(this,Xn);c(this,Zn);c(this,Hn);c(this,Jn);c(this,ei);c(this,ti);c(this,ri);c(this,si);c(this,oi);c(this,ni);c(this,ii);c(this,ai);c(this,ui);c(this,ci);c(this,pi);c(this,li);c(this,mi);c(this,yi);c(this,di);c(this,Ri);c(this,gi);c(this,_i);c(this,Pi);c(this,hi);c(this,fi);c(this,ki);c(this,Ci);c(this,Ti);c(this,Si);c(this,xi);c(this,vi);c(this,Li);c(this,bi);c(this,wi);c(this,Ai);c(this,Ei);c(this,Oi);c(this,Ii);c(this,Mi);c(this,Qi);c(this,Gi);c(this,Yi);c(this,Ui);c(this,Vi);c(this,Fi);c(this,$i);c(this,Bi);c(this,qi);c(this,Di);c(this,zi);c(this,ji);c(this,Wi);c(this,Ki);c(this,Ni);c(this,Xi);c(this,Zi);c(this,Hi);c(this,Ji);c(this,ea);c(this,ta);c(this,ra);c(this,sa);c(this,oa);c(this,na);c(this,ia);c(this,aa);c(this,ua);c(this,ca);c(this,pa);c(this,la);Pp("new commercelayer instance %O",e),u(this,l,new _p(e));}get addresses(){return o(this,Bo)||u(this,Bo,new er(o(this,l)))}get adjustments(){return o(this,qo)||u(this,qo,new tr(o(this,l)))}get adyen_gateways(){return o(this,Do)||u(this,Do,new rr(o(this,l)))}get adyen_payments(){return o(this,zo)||u(this,zo,new sr(o(this,l)))}get application(){return o(this,jo)||u(this,jo,new nr(o(this,l)))}get attachments(){return o(this,Wo)||u(this,Wo,new ir(o(this,l)))}get authorizations(){return o(this,Ko)||u(this,Ko,new ar(o(this,l)))}get avalara_accounts(){return o(this,No)||u(this,No,new ur(o(this,l)))}get axerve_gateways(){return o(this,Xo)||u(this,Xo,new cr(o(this,l)))}get axerve_payments(){return o(this,Zo)||u(this,Zo,new pr(o(this,l)))}get bing_geocoders(){return o(this,Ho)||u(this,Ho,new lr(o(this,l)))}get braintree_gateways(){return o(this,Jo)||u(this,Jo,new mr(o(this,l)))}get braintree_payments(){return o(this,en)||u(this,en,new yr(o(this,l)))}get bundles(){return o(this,tn)||u(this,tn,new dr(o(this,l)))}get buy_x_pay_y_promotions(){return o(this,rn)||u(this,rn,new Rr(o(this,l)))}get captures(){return o(this,sn)||u(this,sn,new gr(o(this,l)))}get carrier_accounts(){return o(this,on)||u(this,on,new _r(o(this,l)))}get checkout_com_gateways(){return o(this,nn)||u(this,nn,new Pr(o(this,l)))}get checkout_com_payments(){return o(this,an)||u(this,an,new hr(o(this,l)))}get cleanups(){return o(this,un)||u(this,un,new fr(o(this,l)))}get coupon_codes_promotion_rules(){return o(this,cn)||u(this,cn,new kr(o(this,l)))}get coupon_recipients(){return o(this,pn)||u(this,pn,new Cr(o(this,l)))}get coupons(){return o(this,ln)||u(this,ln,new Tr(o(this,l)))}get custom_promotion_rules(){return o(this,mn)||u(this,mn,new Sr(o(this,l)))}get customer_addresses(){return o(this,yn)||u(this,yn,new xr(o(this,l)))}get customer_groups(){return o(this,dn)||u(this,dn,new vr(o(this,l)))}get customer_password_resets(){return o(this,Rn)||u(this,Rn,new Lr(o(this,l)))}get customer_payment_sources(){return o(this,gn)||u(this,gn,new br(o(this,l)))}get customer_subscriptions(){return o(this,_n)||u(this,_n,new wr(o(this,l)))}get customers(){return o(this,Pn)||u(this,Pn,new Ar(o(this,l)))}get delivery_lead_times(){return o(this,hn)||u(this,hn,new Er(o(this,l)))}get discount_engine_items(){return o(this,fn)||u(this,fn,new Ir(o(this,l)))}get discount_engines(){return o(this,kn)||u(this,kn,new Qr(o(this,l)))}get easypost_pickups(){return o(this,Cn)||u(this,Cn,new Gr(o(this,l)))}get event_callbacks(){return o(this,Tn)||u(this,Tn,new Ur(o(this,l)))}get events(){return o(this,Sn)||u(this,Sn,new Vr(o(this,l)))}get exports(){return o(this,xn)||u(this,xn,new Fr(o(this,l)))}get external_gateways(){return o(this,vn)||u(this,vn,new $r(o(this,l)))}get external_payments(){return o(this,Ln)||u(this,Ln,new Br(o(this,l)))}get external_promotions(){return o(this,bn)||u(this,bn,new qr(o(this,l)))}get external_tax_calculators(){return o(this,wn)||u(this,wn,new Dr(o(this,l)))}get fixed_amount_promotions(){return o(this,An)||u(this,An,new zr(o(this,l)))}get fixed_price_promotions(){return o(this,En)||u(this,En,new jr(o(this,l)))}get flex_promotions(){return o(this,On)||u(this,On,new Wr(o(this,l)))}get free_gift_promotions(){return o(this,In)||u(this,In,new Kr(o(this,l)))}get free_shipping_promotions(){return o(this,Mn)||u(this,Mn,new Nr(o(this,l)))}get geocoders(){return o(this,Qn)||u(this,Qn,new Zr(o(this,l)))}get gift_card_recipients(){return o(this,Gn)||u(this,Gn,new Hr(o(this,l)))}get gift_cards(){return o(this,Yn)||u(this,Yn,new Jr(o(this,l)))}get google_geocoders(){return o(this,Un)||u(this,Un,new es(o(this,l)))}get imports(){return o(this,Vn)||u(this,Vn,new ts(o(this,l)))}get in_stock_subscriptions(){return o(this,Fn)||u(this,Fn,new rs(o(this,l)))}get inventory_models(){return o(this,$n)||u(this,$n,new ss(o(this,l)))}get inventory_return_locations(){return o(this,Bn)||u(this,Bn,new os(o(this,l)))}get inventory_stock_locations(){return o(this,qn)||u(this,qn,new ns(o(this,l)))}get klarna_gateways(){return o(this,Dn)||u(this,Dn,new is(o(this,l)))}get klarna_payments(){return o(this,zn)||u(this,zn,new as(o(this,l)))}get line_item_options(){return o(this,jn)||u(this,jn,new us(o(this,l)))}get line_items(){return o(this,Wn)||u(this,Wn,new cs(o(this,l)))}get links(){return o(this,Kn)||u(this,Kn,new ps(o(this,l)))}get manual_gateways(){return o(this,Nn)||u(this,Nn,new ls(o(this,l)))}get manual_tax_calculators(){return o(this,Xn)||u(this,Xn,new ms(o(this,l)))}get markets(){return o(this,Zn)||u(this,Zn,new ys(o(this,l)))}get merchants(){return o(this,Hn)||u(this,Hn,new ds(o(this,l)))}get notifications(){return o(this,Jn)||u(this,Jn,new Rs(o(this,l)))}get order_amount_promotion_rules(){return o(this,ei)||u(this,ei,new gs(o(this,l)))}get order_copies(){return o(this,ti)||u(this,ti,new _s(o(this,l)))}get order_factories(){return o(this,ri)||u(this,ri,new hs(o(this,l)))}get order_subscription_items(){return o(this,si)||u(this,si,new fs(o(this,l)))}get order_subscriptions(){return o(this,oi)||u(this,oi,new ks(o(this,l)))}get orders(){return o(this,ni)||u(this,ni,new Cs(o(this,l)))}get organization(){return o(this,ii)||u(this,ii,new Ss(o(this,l)))}get packages(){return o(this,ai)||u(this,ai,new xs(o(this,l)))}get parcel_line_items(){return o(this,ui)||u(this,ui,new vs(o(this,l)))}get parcels(){return o(this,ci)||u(this,ci,new Ls(o(this,l)))}get payment_gateways(){return o(this,pi)||u(this,pi,new ws(o(this,l)))}get payment_methods(){return o(this,li)||u(this,li,new As(o(this,l)))}get payment_options(){return o(this,mi)||u(this,mi,new Es(o(this,l)))}get paypal_gateways(){return o(this,yi)||u(this,yi,new Os(o(this,l)))}get paypal_payments(){return o(this,di)||u(this,di,new Is(o(this,l)))}get percentage_discount_promotions(){return o(this,Ri)||u(this,Ri,new Ms(o(this,l)))}get pickups(){return o(this,gi)||u(this,gi,new Gs(o(this,l)))}get price_frequency_tiers(){return o(this,_i)||u(this,_i,new Ys(o(this,l)))}get price_list_schedulers(){return o(this,Pi)||u(this,Pi,new Us(o(this,l)))}get price_lists(){return o(this,hi)||u(this,hi,new Vs(o(this,l)))}get price_tiers(){return o(this,fi)||u(this,fi,new $s(o(this,l)))}get price_volume_tiers(){return o(this,ki)||u(this,ki,new Bs(o(this,l)))}get prices(){return o(this,Ci)||u(this,Ci,new qs(o(this,l)))}get promotion_rules(){return o(this,Ti)||u(this,Ti,new zs(o(this,l)))}get promotions(){return o(this,Si)||u(this,Si,new Ws(o(this,l)))}get recurring_order_copies(){return o(this,xi)||u(this,xi,new Ks(o(this,l)))}get refunds(){return o(this,vi)||u(this,vi,new Ns(o(this,l)))}get reserved_stocks(){return o(this,Li)||u(this,Li,new Zs(o(this,l)))}get resource_errors(){return o(this,bi)||u(this,bi,new Js(o(this,l)))}get return_line_items(){return o(this,wi)||u(this,wi,new eo(o(this,l)))}get returns(){return o(this,Ai)||u(this,Ai,new to(o(this,l)))}get satispay_gateways(){return o(this,Ei)||u(this,Ei,new ro(o(this,l)))}get satispay_payments(){return o(this,Oi)||u(this,Oi,new so(o(this,l)))}get shipments(){return o(this,Ii)||u(this,Ii,new oo(o(this,l)))}get shipping_categories(){return o(this,Mi)||u(this,Mi,new no(o(this,l)))}get shipping_method_tiers(){return o(this,Qi)||u(this,Qi,new ao(o(this,l)))}get shipping_methods(){return o(this,Gi)||u(this,Gi,new uo(o(this,l)))}get shipping_weight_tiers(){return o(this,Yi)||u(this,Yi,new co(o(this,l)))}get shipping_zones(){return o(this,Ui)||u(this,Ui,new po(o(this,l)))}get sku_list_items(){return o(this,Vi)||u(this,Vi,new lo(o(this,l)))}get sku_list_promotion_rules(){return o(this,Fi)||u(this,Fi,new mo(o(this,l)))}get sku_lists(){return o(this,$i)||u(this,$i,new yo(o(this,l)))}get sku_options(){return o(this,Bi)||u(this,Bi,new Ro(o(this,l)))}get skus(){return o(this,qi)||u(this,qi,new go(o(this,l)))}get stock_items(){return o(this,Di)||u(this,Di,new _o(o(this,l)))}get stock_line_items(){return o(this,zi)||u(this,zi,new Po(o(this,l)))}get stock_locations(){return o(this,ji)||u(this,ji,new ho(o(this,l)))}get stock_reservations(){return o(this,Wi)||u(this,Wi,new fo(o(this,l)))}get stock_transfers(){return o(this,Ki)||u(this,Ki,new ko(o(this,l)))}get stores(){return o(this,Ni)||u(this,Ni,new Co(o(this,l)))}get stripe_gateways(){return o(this,Xi)||u(this,Xi,new To(o(this,l)))}get stripe_payments(){return o(this,Zi)||u(this,Zi,new So(o(this,l)))}get stripe_tax_accounts(){return o(this,Hi)||u(this,Hi,new xo(o(this,l)))}get subscription_models(){return o(this,Ji)||u(this,Ji,new vo(o(this,l)))}get tags(){return o(this,ea)||u(this,ea,new Lo(o(this,l)))}get talon_one_accounts(){return o(this,ta)||u(this,ta,new bo(o(this,l)))}get tax_calculators(){return o(this,ra)||u(this,ra,new Ao(o(this,l)))}get tax_categories(){return o(this,sa)||u(this,sa,new Eo(o(this,l)))}get tax_rules(){return o(this,oa)||u(this,oa,new Oo(o(this,l)))}get taxjar_accounts(){return o(this,na)||u(this,na,new Io(o(this,l)))}get transactions(){return o(this,ia)||u(this,ia,new Qo(o(this,l)))}get versions(){return o(this,aa)||u(this,aa,new Yo(o(this,l)))}get vertex_accounts(){return o(this,ua)||u(this,ua,new Uo(o(this,l)))}get voids(){return o(this,ca)||u(this,ca,new Vo(o(this,l)))}get webhooks(){return o(this,pa)||u(this,pa,new Fo(o(this,l)))}get wire_transfers(){return o(this,la)||u(this,la,new $o(o(this,l)))}get currentOrganization(){return o(this,l)?.client?.currentOrganization}get currentAccessToken(){return o(this,l)?.client?.currentAccessToken}get interceptors(){return o(this,l).client.interceptors}localConfig(e){}config(e){return Pp("config %o",e),this.localConfig(e),o(this,l).config(e),this}resources(){return Vt.resources()}singletons(){return Vt.singletons()}isSingleton(e){return Vt.isSingleton(e)}isApiError(e){return Vt.isApiError(e)}addRequestInterceptor(e,t){return this.interceptors.request={onSuccess:e,onFailure:t},1}addResponseInterceptor(e,t){return this.interceptors.response={onSuccess:e,onFailure:t},1}removeInterceptor(e,t=1){this.interceptors[e]=void 0;}removeInterceptors(){this.removeInterceptor("request"),this.removeInterceptor("response"),this.removeRawResponseReader();}addRawResponseReader(e){let t={id:0,rawResponse:void 0,headers:void 0,ok:true};async function r(s){if(t.rawResponse=await s?.clone().json().catch(()=>{}),t.ok=s.ok,e?.headers){let m={};s.headers.forEach((R,d)=>{m[d]=R;}),t.headers=m;}return s}return this.interceptors.rawReader={onSuccess:r,onFailure:r},t.id=1,t}removeRawResponseReader(){this.interceptors.rawReader=void 0;}};l=new WeakMap,Bo=new WeakMap,qo=new WeakMap,Do=new WeakMap,zo=new WeakMap,jo=new WeakMap,Wo=new WeakMap,Ko=new WeakMap,No=new WeakMap,Xo=new WeakMap,Zo=new WeakMap,Ho=new WeakMap,Jo=new WeakMap,en=new WeakMap,tn=new WeakMap,rn=new WeakMap,sn=new WeakMap,on=new WeakMap,nn=new WeakMap,an=new WeakMap,un=new WeakMap,cn=new WeakMap,pn=new WeakMap,ln=new WeakMap,mn=new WeakMap,yn=new WeakMap,dn=new WeakMap,Rn=new WeakMap,gn=new WeakMap,_n=new WeakMap,Pn=new WeakMap,hn=new WeakMap,fn=new WeakMap,kn=new WeakMap,Cn=new WeakMap,Tn=new WeakMap,Sn=new WeakMap,xn=new WeakMap,vn=new WeakMap,Ln=new WeakMap,bn=new WeakMap,wn=new WeakMap,An=new WeakMap,En=new WeakMap,On=new WeakMap,In=new WeakMap,Mn=new WeakMap,Qn=new WeakMap,Gn=new WeakMap,Yn=new WeakMap,Un=new WeakMap,Vn=new WeakMap,Fn=new WeakMap,$n=new WeakMap,Bn=new WeakMap,qn=new WeakMap,Dn=new WeakMap,zn=new WeakMap,jn=new WeakMap,Wn=new WeakMap,Kn=new WeakMap,Nn=new WeakMap,Xn=new WeakMap,Zn=new WeakMap,Hn=new WeakMap,Jn=new WeakMap,ei=new WeakMap,ti=new WeakMap,ri=new WeakMap,si=new WeakMap,oi=new WeakMap,ni=new WeakMap,ii=new WeakMap,ai=new WeakMap,ui=new WeakMap,ci=new WeakMap,pi=new WeakMap,li=new WeakMap,mi=new WeakMap,yi=new WeakMap,di=new WeakMap,Ri=new WeakMap,gi=new WeakMap,_i=new WeakMap,Pi=new WeakMap,hi=new WeakMap,fi=new WeakMap,ki=new WeakMap,Ci=new WeakMap,Ti=new WeakMap,Si=new WeakMap,xi=new WeakMap,vi=new WeakMap,Li=new WeakMap,bi=new WeakMap,wi=new WeakMap,Ai=new WeakMap,Ei=new WeakMap,Oi=new WeakMap,Ii=new WeakMap,Mi=new WeakMap,Qi=new WeakMap,Gi=new WeakMap,Yi=new WeakMap,Ui=new WeakMap,Vi=new WeakMap,Fi=new WeakMap,$i=new WeakMap,Bi=new WeakMap,qi=new WeakMap,Di=new WeakMap,zi=new WeakMap,ji=new WeakMap,Wi=new WeakMap,Ki=new WeakMap,Ni=new WeakMap,Xi=new WeakMap,Zi=new WeakMap,Hi=new WeakMap,Ji=new WeakMap,ea=new WeakMap,ta=new WeakMap,ra=new WeakMap,sa=new WeakMap,oa=new WeakMap,na=new WeakMap,ia=new WeakMap,aa=new WeakMap,ua=new WeakMap,ca=new WeakMap,pa=new WeakMap,la=new WeakMap;var hp=a=>new np(a),op=hp;var KT=new er,NT=new tr,XT=new rr,ZT=new sr,HT=new nr,JT=new ir,eS=new ar,tS=new ur,rS=new cr,sS=new pr,oS=new lr,nS=new mr,iS=new yr,aS=new dr,uS=new Rr,cS=new gr,pS=new _r,lS=new Pr,mS=new hr,yS=new fr,dS=new kr,RS=new Cr,gS=new Tr,_S=new Sr,PS=new xr,hS=new vr,fS=new Lr,kS=new br,CS=new wr,TS=new Ar,SS=new Er,xS=new Ir,vS=new Qr,LS=new Gr,bS=new Ur,wS=new Vr,AS=new Fr,ES=new $r,OS=new Br,IS=new qr,MS=new Dr,QS=new zr,GS=new jr,YS=new Wr,US=new Kr,VS=new Nr,FS=new Zr,$S=new Hr,BS=new Jr,qS=new es,DS=new ts,zS=new rs,jS=new ss,WS=new os,KS=new ns,NS=new is,XS=new as,ZS=new us,HS=new cs,JS=new ps,ex=new ls,tx=new ms,rx=new ys,sx=new ds,ox=new Rs,nx=new gs,ix=new _s,ax=new hs,ux=new fs,cx=new ks,px=new Cs,lx=new Ss,mx=new xs,yx=new vs,dx=new Ls,Rx=new ws,gx=new As,_x=new Es,Px=new Os,hx=new Is,fx=new Ms,kx=new Gs,Cx=new Ys,Tx=new Us,Sx=new Vs,xx=new $s,vx=new Bs,Lx=new qs,bx=new zs,wx=new Ws,Ax=new Ks,Ex=new Ns,Ox=new Zs,Ix=new Js,Mx=new eo,Qx=new to,Gx=new ro,Yx=new so,Ux=new oo,Vx=new no,Fx=new ao,$x=new uo,Bx=new co,qx=new po,Dx=new lo,zx=new mo,jx=new yo,Wx=new Ro,Kx=new go,Nx=new _o,Xx=new Po,Zx=new ho,Hx=new fo,Jx=new ko,ev=new Co,tv=new To,rv=new So,sv=new xo,ov=new vo,nv=new Lo,iv=new bo,av=new Ao,uv=new Eo,cv=new Oo,pv=new Io,lv=new Qo,mv=new Yo,yv=new Uo,dv=new Vo,Rv=new Fo,gv=new $o,_v=a=>{Jt.init(a);};
2
+ exports.CommerceLayer=hp;exports.CommerceLayerStatic=Vt;exports.addresses=KT;exports.adjustments=NT;exports.adyen_gateways=XT;exports.adyen_payments=ZT;exports.application=HT;exports.attachments=JT;exports.authorizations=eS;exports.avalara_accounts=tS;exports.axerve_gateways=rS;exports.axerve_payments=sS;exports.bing_geocoders=oS;exports.braintree_gateways=nS;exports.braintree_payments=iS;exports.bundles=aS;exports.buy_x_pay_y_promotions=uS;exports.captures=cS;exports.carrier_accounts=pS;exports.checkout_com_gateways=lS;exports.checkout_com_payments=mS;exports.cleanups=yS;exports.coupon_codes_promotion_rules=dS;exports.coupon_recipients=RS;exports.coupons=gS;exports.custom_promotion_rules=_S;exports.customer_addresses=PS;exports.customer_groups=hS;exports.customer_password_resets=fS;exports.customer_payment_sources=kS;exports.customer_subscriptions=CS;exports.customers=TS;exports.default=op;exports.delivery_lead_times=SS;exports.discount_engine_items=xS;exports.discount_engines=vS;exports.easypost_pickups=LS;exports.event_callbacks=bS;exports.events=wS;exports.exportz=AS;exports.external_gateways=ES;exports.external_payments=OS;exports.external_promotions=IS;exports.external_tax_calculators=MS;exports.fixed_amount_promotions=QS;exports.fixed_price_promotions=GS;exports.flex_promotions=YS;exports.free_gift_promotions=US;exports.free_shipping_promotions=VS;exports.geocoders=FS;exports.gift_card_recipients=$S;exports.gift_cards=BS;exports.google_geocoders=qS;exports.imports=DS;exports.in_stock_subscriptions=zS;exports.initCommerceLayer=_v;exports.inventory_models=jS;exports.inventory_return_locations=WS;exports.inventory_stock_locations=KS;exports.klarna_gateways=NS;exports.klarna_payments=XS;exports.line_item_options=ZS;exports.line_items=HS;exports.links=JS;exports.manual_gateways=ex;exports.manual_tax_calculators=tx;exports.markets=rx;exports.merchants=sx;exports.notifications=ox;exports.order_amount_promotion_rules=nx;exports.order_copies=ix;exports.order_factories=ax;exports.order_subscription_items=ux;exports.order_subscriptions=cx;exports.orders=px;exports.organization=lx;exports.packages=mx;exports.parcel_line_items=yx;exports.parcels=dx;exports.payment_gateways=Rx;exports.payment_methods=gx;exports.payment_options=_x;exports.paypal_gateways=Px;exports.paypal_payments=hx;exports.percentage_discount_promotions=fx;exports.pickups=kx;exports.price_frequency_tiers=Cx;exports.price_list_schedulers=Tx;exports.price_lists=Sx;exports.price_tiers=xx;exports.price_volume_tiers=vx;exports.prices=Lx;exports.promotion_rules=bx;exports.promotions=wx;exports.recurring_order_copies=Ax;exports.refunds=Ex;exports.reserved_stocks=Ox;exports.resource_errors=Ix;exports.return_line_items=Mx;exports.returns=Qx;exports.satispay_gateways=Gx;exports.satispay_payments=Yx;exports.shipments=Ux;exports.shipping_categories=Vx;exports.shipping_method_tiers=Fx;exports.shipping_methods=$x;exports.shipping_weight_tiers=Bx;exports.shipping_zones=qx;exports.sku_list_items=Dx;exports.sku_list_promotion_rules=zx;exports.sku_lists=jx;exports.sku_options=Wx;exports.skus=Kx;exports.stock_items=Nx;exports.stock_line_items=Xx;exports.stock_locations=Zx;exports.stock_reservations=Hx;exports.stock_transfers=Jx;exports.stores=ev;exports.stripe_gateways=tv;exports.stripe_payments=rv;exports.stripe_tax_accounts=sv;exports.subscription_models=ov;exports.tags=nv;exports.talon_one_accounts=iv;exports.tax_calculators=av;exports.tax_categories=uv;exports.tax_rules=cv;exports.taxjar_accounts=pv;exports.transactions=lv;exports.versions=mv;exports.vertex_accounts=yv;exports.voids=dv;exports.webhooks=Rv;exports.wire_transfers=gv;