@commercelayer/sdk 6.47.0 → 6.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var ap=i=>{throw TypeError(i)};var hp=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var up=(i,e,t)=>e.has(i)||ap("Cannot "+t);var o=(i,e,t)=>(up(i,e,"read from private field"),t?t.call(i):e.get(i)),u=(i,e,t)=>e.has(i)?ap("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),a=(i,e,t,r)=>(up(i,e,"write to private field"),e.set(i,t),t);var fp=(i,...e)=>{},cp=i=>fp;try{let i=hp("debug");i&&typeof i=="function"&&(cp=i);}catch{}var vp="clsdk",kp=i=>cp(`${vp}:${i}`),T=kp;var Xo=T("fetch"),$t,Ft,Bt,qt,$o=class $o extends Error{constructor(t,r,s,l){super(r);u(this,$t);u(this,Ft);u(this,Bt);u(this,qt);a(this,Ft,t),a(this,Bt,r),s&&a(this,$t,s.errors),l&&a(this,qt,l);}get errors(){return o(this,$t)}get status(){return o(this,Ft)}get statusText(){return o(this,Bt)}get request(){return o(this,qt)}};$t=new WeakMap,Ft=new WeakMap,Bt=new WeakMap,qt=new WeakMap,$o.isFetchError=t=>t instanceof $o;var Vt=$o,No=async(i,e,t)=>{Xo("fetch: %s, %O, native[%s]",i,e||{},t?.fetch?"no":"yes");let r=t?.interceptors;r?.request?.onSuccess&&({url:i,options:e}=await r.request.onSuccess({url:i,options:e}));let l=await(t?.fetch||fetch)(i,e);l.ok?(r?.rawReader?.onSuccess&&await r.rawReader.onSuccess(l),r?.response?.onSuccess&&(l=await r.response.onSuccess(l))):r?.rawReader?.onFailure&&await r.rawReader.onFailure(l);let d=l.body&&l.status!==204?await l.json().then(y=>(Xo("response: %O",y),y)).catch(y=>{if(Xo("error: %s",y.message),l.ok)throw new _({message:"Error parsing API response body",type:"parse"})}):void 0;if(!l.ok){let y=new Vt(l.status,l.statusText,d,e);if(r?.response?.onFailure&&(y=await r.response.onFailure(y)),y)throw y}return d};var Dt=(y=>(y.CLIENT="client",y.REQUEST="request",y.RESPONSE="response",y.CANCEL="cancel",y.PARSE="parse",y.TIMEOUT="timeout",y.TOKEN_REFRESH="token-refresh",y))(Dt||{}),zt=class zt extends Error{static isSdkError(e){return e&&[zt.NAME,_e.NAME].includes(e.name)&&Object.values(Dt).includes(e.type)}constructor(e){super(e.message),this.name=zt.NAME,this.type=e.type||"client";}};zt.NAME="SdkError";var _=zt,jt=class jt extends _{constructor(t){super({...t,type:"response"});this.errors=[];this.name=jt.NAME;}static isApiError(t){return _.isSdkError(t)&&t.name===jt.NAME&&t.type==="response"}first(){return this.errors?.length>0?this.errors[0]:void 0}};jt.NAME="ApiError";var _e=jt,Sp=i=>i instanceof TypeError,Cp=i=>i instanceof DOMException&&i.name==="AbortError",Tp=i=>i instanceof DOMException&&i.name==="TimeoutError",pp=i=>{let e=["INVALID_TOKEN"];return _e.isApiError(i)&&i.status===401&&(e.includes(i.code||"")||i.errors&&i.errors.length>0&&e.includes(i.errors[0].code))},Zo=i=>{if(_.isSdkError(i)||_e.isApiError(i))throw i;let e=new _({message:i.message});if(Vt.isFetchError(i)){let t=new _e(e);t.type="response",t.status=i.status,t.statusText=i.statusText,t.code=String(t.status),t.errors=i.errors||[],!t.message&&t.statusText&&(t.message=t.statusText),e=t;}else Sp(i)?e.type="request":Cp(i)?e.type="cancel":Tp(i)?e.type="timeout":(e.type="client",e.source=i);throw e};var Lp={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:15e3,requiredAttributes:["organization","accessToken"]},jsonapi:{maxResourceIncluded:2}},M=Lp;var Ho=i=>{try{return JSON.parse(atob(i.split(".")[1]))}catch{return}},Fo=i=>{try{return Ho(i).exp*1e3-Date.now()<0}catch{return false}};var te=T("client"),Jo=(i,e)=>`https://${i.toLowerCase()}.${e||M.default.domain}/api`,At,G,P,Wt,tn=class tn{constructor(e){u(this,At);u(this,G);u(this,P);u(this,Wt);te("new client instance %O",e),a(this,At,Jo(e.organization??"",e.domain)),a(this,G,e.accessToken);let t={timeout:e.timeout||M.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,G)};e.userAgent&&(s["User-Agent"]=e.userAgent),t.headers=s,a(this,P,t),te("fetch config: %O",t),a(this,Wt,{});}static create(e){for(let t of M.client.requiredAttributes)if(!e||!e[t])throw new _({message:`Undefined '${t}' parameter`});return new tn(e)}get interceptors(){return o(this,Wt)}get requestHeaders(){return o(this,P).headers||(o(this,P).headers={}),o(this,P).headers}config(e){te("config %o",e);let t=o(this,P);return t.headers||(t.headers={}),e.timeout&&(t.timeout=e.timeout),e.userAgent&&this.userAgent(e.userAgent),e.fetch&&(o(this,P).fetch=e.fetch),e.refreshToken&&(o(this,P).refreshToken=e.refreshToken),e.organization&&a(this,At,Jo(e.organization,e.domain)),e.accessToken&&(a(this,G,e.accessToken),t.headers.Authorization="Bearer "+o(this,G)),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){te("request %s %s, %O, %O",e,t,r||{},s||{}),s?.userAgent&&te("User-Agent header ignored in request config");let l=s?.organization?Jo(s.organization,s.domain):o(this,At),d=new URL(`${l}/${t}`),y=r?JSON.stringify({data:r}):void 0,Gt={...this.requestHeaders,...this.customHeaders(s?.headers)},Uo=s?.accessToken||o(this,G);Uo&&(Gt.Authorization="Bearer "+Uo);let Yt={method:e,body:y,headers:Gt},np=s?.timeout||o(this,P).timeout;np&&(AbortSignal?.timeout?Yt.signal=AbortSignal.timeout(np):te("Timeout not set. Undefined function: %s","AbortSignal.timeout")),s?.params&&Object.entries(s?.params).forEach(([wt,Ut])=>{d.searchParams.append(wt,String(Ut));});let ip={interceptors:this.interceptors,fetch:s?.fetch||o(this,P).fetch};try{return await No(d,Yt,ip).catch(wt=>Zo(wt))}catch(wt){if(pp(wt)&&o(this,P).refreshToken&&Fo(o(this,G))){te("Access token has expired");let Ut=await o(this,P).refreshToken(o(this,G)).catch(Ko=>{te("Refresh token error: %s",Ko.message);let Vo=new _({message:"Error refreshing access token",type:"token-refresh"});throw Vo.source=Ko,Vo});if(Ut)return te("Access token refreshed"),this.config({accessToken:Ut}),Yt.headers&&(Yt.headers.Authorization=`Bearer ${Ut}`),await No(d,Yt,ip).catch(Vo=>Zo(Vo))}else throw wt}}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,G)}};At=new WeakMap,G=new WeakMap,P=new WeakMap,Wt=new WeakMap;var en=tn,lp=en;var Bo=i=>i?.type&&i.id&&Ot.includes(i.type),rn=i=>i&&typeof i.type<"u"&&i.type&&Ot.includes(i.type);var qo=T("jsonapi"),Tt=i=>{if(!i)return i;let e;i.links&&delete i.links;let t=i.data,r=i.included;return t?Array.isArray(t)?e=t.map(s=>Do(s,r)):e=Do(t,r):e=t,e},mp=(i,e=[])=>e.find(r=>i.id===r.id&&i.type===r.type)||i,Do=(i,e,t=[])=>{if(qo("denormalize resource: %O, %o",i,e||{}),!i)return i;let r={id:i.id,type:i.type,...i.attributes};return i.relationships&&Object.keys(i.relationships).forEach(s=>{let l=i.relationships[s].data;l?t.filter(d=>d.id===l.id&&d.type===l.type).length>=M.jsonapi.maxResourceIncluded?r[s]=l:Array.isArray(l)?r[s]=l.map(d=>Do(mp(d,e),e,[...t,d])):r[s]=Do(mp(l,e),e,[...t,l]):l===null&&(r[s]=null);}),qo("denormalized resource: %O",r),r},sn=i=>{qo("normalize resource: %O",i);let e={},t={};for(let s in i){if(["type","id"].includes(s))continue;let l=i[s];Array.isArray(l)&&l.length===1&&rn(l[0])&&l[0].id===null?t[s]={data:[]}:l&&rn(l)&&l.id===null?t[s]={data:null}:l&&(Bo(l)||Array.isArray(l)&&Bo(l[0]))?t[s]={data:l}:e[s]=l;}let r={type:i.type,attributes:e,relationships:t};return Bo(i)&&(r.id=i.id),qo("normalized resource: %O",r),r};var yp=T("query"),dp=["_any","_all","_in","_not_in_or_null"],xp=i=>dp.some(e=>i.endsWith(e)),Rp=["_jcont"],Ep=i=>Rp.some(e=>i.endsWith(e)),on=i=>i&&(i.filters||i.pageNumber||i.pageSize||i.sort),Lt=(i,e)=>{yp("generate query string params: %O, %O",i,e);let t={};return i&&(i.include&&(t.include=i.include.join(",")),i.fields&&(Array.isArray(i.fields)&&(i.fields={[e.type||e]:i.fields}),Object.entries(i.fields).forEach(([r,s])=>{t[`fields[${r}]`]=s.join(",");})),on(i)&&(i.sort&&(Array.isArray(i.sort)?t.sort=i.sort.join(","):t.sort=Object.entries(i.sort).map(([r,s])=>`${s==="desc"?"-":""}${r}`).join(",")),i.pageNumber&&(t["page[number]"]=String(i.pageNumber)),i.pageSize&&(t["page[size]"]=String(i.pageSize)),i.filters&&Object.entries(i.filters).forEach(([r,s])=>{let l;if(Array.isArray(s)){if(!xp(r))throw new _({message:`Incorrect filter [${r}]: Array value is supported only for the following filters: ${dp.join(", ")}`,type:"request"});l=s.join(",");}else if(typeof s=="object"){if(!Ep(r))throw new _({message:`Incorrect filter [${r}]: Object value is supported only for the following filters: ${Rp.join(", ")}`,type:"request"});l=JSON.stringify(s);}else l=String(s);t[`filter[q][${r}]`]=l;})),yp("query string params: %O",t)),t};var re=T("resource"),zo=class extends Array{constructor(e,t){super(...t||[]),this.meta=e;}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(e){return this.length&&e>=0?this[e]: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}};var k,an,nn=class{constructor(e){u(this,k);u(this,an,{});a(this,k,lp.create(e)),this.localConfig(e);}localConfig(e){}config(e){return re("config %o",e),this.localConfig(e),o(this,k).config(e),this}get client(){return o(this,k)}async singleton(e,t,r,s){re("singleton: %o, %O, %O",e,t||{},r||{});let l=Lt(t,e);r?.params&&Object.assign(l,r?.params);let d=await o(this,k).request("GET",`${s||e.type}`,void 0,{...r,params:l});return Tt(d)}async retrieve(e,t,r){re("retrieve: %o, %O, %O",e,t||{},r||{});let s=Lt(t,e);r?.params&&Object.assign(s,r?.params);let l=await o(this,k).request("GET",`${e.type}/${e.id}`,void 0,{...r,params:s});return Tt(l)}async list(e,t,r){re("list: %o, %O, %O",e,t||{},r||{});let s=Lt(t,e);r?.params&&Object.assign(s,r?.params),s["page[number]"]||(s["page[number]"]="1");let l=await o(this,k).request("GET",`${e.type}`,void 0,{...r,params:s}),d=Tt(l),y={pageCount:Number(l.meta?.page_count),recordCount:Number(l.meta?.record_count),currentPage:t?.pageNumber||M.default.pageNumber,recordsPerPage:t?.pageSize||M.default.pageSize};return new zo(y,d)}async create(e,t,r){re("create: %o, %O, %O",e,t||{},r||{});let s=Lt(t,e);r?.params&&Object.assign(s,r?.params);let l=sn(e),d=await o(this,k).request("POST",e.type,l,{...r,params:s});return Tt(d)}async update(e,t,r){re("update: %o, %O, %O",e,t||{},r||{});let s=Lt(t,e);r?.params&&Object.assign(s,r?.params);let l=sn(e),d=await o(this,k).request("PATCH",`${e.type}/${e.id}`,l,{...r,params:s});return Tt(d)}async delete(e,t){re("delete: %o, %O",e,t||{}),await o(this,k).request("DELETE",`${e.type}/${e.id}`,void 0,t);}async fetch(e,t,r,s){re("fetch: %o, %O, %O",t,r||{},s||{});let l=Lt(r,e);s?.params&&Object.assign(l,s?.params);let d=await o(this,k).request("GET",t,void 0,{...s,params:l}),y=Tt(d);if(Array.isArray(y)){let Gt=r,Uo={pageCount:Number(d.meta?.page_count),recordCount:Number(d.meta?.record_count),currentPage:Gt?.pageNumber||M.default.pageNumber,recordsPerPage:Gt?.pageSize||M.default.pageSize};return new zo(Uo,y)}else return y}};k=new WeakMap,an=new WeakMap;var jo=class{constructor(e){re("new resource instance: %s",this.type()),this.resources=e;}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)}},n=class extends jo{async retrieve(e,t,r){let s=typeof e=="string"?{type:this.type(),id:e}:e;if(!s.id)throw new _({message:"Resource id cannot be blank"});return this.resources.retrieve(s,t,r)}async list(e,t){return this.resources.list({type:this.type()},e,t)}async count(e,t){let r={filters:on(e)?e.filters:e,pageNumber:1,pageSize:1},s=await this.list(r,t);return Promise.resolve(s.meta.recordCount)}},Qt=class extends jo{async retrieve(e,t){return this.resources.singleton({type:this.type()},e,t,this.path())}},gp=nn;var B=class B extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`addresses/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:B.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:B.TYPE,_remove_tags:t},r,s)}isAddress(e){return e.type&&e.type===B.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return B.TYPE}};B.TYPE="addresses";var un=B,cn=un;var Pe=class Pe extends n{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 versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`adjustments/${s}/versions`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`adjustments/${s}/event_stores`,t,r)}isAdjustment(e){return e.type&&e.type===Pe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Pe.TYPE}};Pe.TYPE="adjustments";var pn=Pe,ln=pn;var he=class he extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`adyen_gateways/${s}/event_stores`,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===he.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return he.TYPE}};he.TYPE="adyen_gateways";var mn=he,yn=mn;var Y=class Y extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`adyen_payments/${s}/event_stores`,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 _details(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Y.TYPE,_details:true},t,r)}async _balance(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Y.TYPE,_balance:true},t,r)}isAdyenPayment(e){return e.type&&e.type===Y.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Y.TYPE}};Y.TYPE="adyen_payments";var dn=Y,Rn=dn;var Kt=class Kt extends Qt{isApplication(e){return e.type&&e.type===Kt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Kt.TYPE}path(){return "application"}};Kt.TYPE="applications";var gn=Kt,_n=gn;var fe=class fe extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`attachments/${s}/event_stores`,t,r)}isAttachment(e){return e.type&&e.type===fe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return fe.TYPE}};fe.TYPE="attachments";var Pn=fe,hn=Pn;var U=class U extends n{async update(e,t,r){return this.resources.update({...e,type:U.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`authorizations/${s}/event_stores`,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:U.TYPE,_forward:true},t,r)}async _capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:U.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:U.TYPE,_capture_amount_cents:t},r,s)}async _void(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:U.TYPE,_void:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:U.TYPE,_cancel:true},t,r)}isAuthorization(e){return e.type&&e.type===U.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return U.TYPE}};U.TYPE="authorizations";var fn=U,vn=fn;var ve=class ve extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`avalara_accounts/${s}/event_stores`,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===ve.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ve.TYPE}};ve.TYPE="avalara_accounts";var kn=ve,Sn=kn;var ke=class ke extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`axerve_gateways/${s}/event_stores`,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===ke.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ke.TYPE}};ke.TYPE="axerve_gateways";var Cn=ke,Tn=Cn;var se=class se extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`axerve_payments/${s}/event_stores`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:se.TYPE,_update:true},t,r)}isAxervePayment(e){return e.type&&e.type===se.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return se.TYPE}};se.TYPE="axerve_payments";var Ln=se,xn=Ln;var Se=class Se extends n{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"},`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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`bing_geocoders/${s}/event_stores`,t,r)}isBingGeocoder(e){return e.type&&e.type===Se.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Se.TYPE}};Se.TYPE="bing_geocoders";var En=Se,bn=En;var Ce=class Ce extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`braintree_gateways/${s}/event_stores`,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===Ce.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ce.TYPE}};Ce.TYPE="braintree_gateways";var wn=Ce,An=wn;var Te=class Te extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`braintree_payments/${s}/event_stores`,t,r)}isBraintreePayment(e){return e.type&&e.type===Te.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Te.TYPE}};Te.TYPE="braintree_payments";var On=Te,Qn=On;var L=class L extends n{async create(e,t,r){return this.resources.create({...e,type:L.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:L.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:L.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`bundles/${s}/event_stores`,t,r)}async _compute_price_amount(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.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:L.TYPE,_compute_compare_at_amount:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_remove_tags:t},r,s)}isBundle(e){return e.type&&e.type===L.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return L.TYPE}};L.TYPE="bundles";var In=L,Mn=In;var x=class x extends n{async create(e,t,r){return this.resources.create({...e,type:x.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:x.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:x.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`buy_x_pay_y_promotions/${s}/event_stores`,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:x.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:x.TYPE,_enable:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:x.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:x.TYPE,_remove_tags:t},r,s)}isBuyXPayYPromotion(e){return e.type&&e.type===x.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return x.TYPE}};x.TYPE="buy_x_pay_y_promotions";var Gn=x,Yn=Gn;var q=class q extends n{async update(e,t,r){return this.resources.update({...e,type:q.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`captures/${s}/event_stores`,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:q.TYPE,_forward:true},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:q.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:q.TYPE,_refund_amount_cents:t},r,s)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:q.TYPE,_cancel:true},t,r)}isCapture(e){return e.type&&e.type===q.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return q.TYPE}};q.TYPE="captures";var Un=q,Vn=Un;var Le=class Le extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`carrier_accounts/${s}/event_stores`,t,r)}isCarrierAccount(e){return e.type&&e.type===Le.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Le.TYPE}};Le.TYPE="carrier_accounts";var $n=Le,Fn=$n;var xe=class xe extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`checkout_com_gateways/${s}/event_stores`,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===xe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return xe.TYPE}};xe.TYPE="checkout_com_gateways";var Bn=xe,qn=Bn;var D=class D extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`checkout_com_payments/${s}/event_stores`,t,r)}async _details(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:D.TYPE,_details:true},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:D.TYPE,_refresh:true},t,r)}isCheckoutComPayment(e){return e.type&&e.type===D.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return D.TYPE}};D.TYPE="checkout_com_payments";var Dn=D,zn=Dn;var oe=class oe extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`cleanups/${s}/event_stores`,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)}isCleanup(e){return e.type&&e.type===oe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return oe.TYPE}};oe.TYPE="cleanups";var jn=oe,Wn=jn;var Ee=class Ee extends n{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 versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`coupon_codes_promotion_rules/${s}/versions`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`coupon_codes_promotion_rules/${s}/event_stores`,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===Ee.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ee.TYPE}};Ee.TYPE="coupon_codes_promotion_rules";var Kn=Ee,Xn=Kn;var be=class be extends n{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"},`coupon_recipients/${s}/customer`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`coupon_recipients/${s}/event_stores`,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===be.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return be.TYPE}};be.TYPE="coupon_recipients";var Nn=be,Zn=Nn;var z=class z extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`coupons/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:z.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:z.TYPE,_remove_tags:t},r,s)}isCoupon(e){return e.type&&e.type===z.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return z.TYPE}};z.TYPE="coupons";var Hn=z,Jn=Hn;var we=class we extends n{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"},`custom_promotion_rules/${s}/versions`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`custom_promotion_rules/${s}/event_stores`,t,r)}isCustomPromotionRule(e){return e.type&&e.type===we.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return we.TYPE}};we.TYPE="custom_promotion_rules";var ei=we,ti=ei;var Ae=class Ae extends n{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_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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customer_addresses/${s}/event_stores`,t,r)}isCustomerAddress(e){return e.type&&e.type===Ae.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ae.TYPE}};Ae.TYPE="customer_addresses";var ri=Ae,si=ri;var Oe=class Oe extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customer_groups/${s}/event_stores`,t,r)}isCustomerGroup(e){return e.type&&e.type===Oe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Oe.TYPE}};Oe.TYPE="customer_groups";var oi=Oe,ni=oi;var ne=class ne extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customer_password_resets/${s}/event_stores`,t,r)}async _reset_password_token(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:ne.TYPE,_reset_password_token:t},r,s)}isCustomerPasswordReset(e){return e.type&&e.type===ne.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ne.TYPE}};ne.TYPE="customer_password_resets";var ii=ne,ai=ii;var Qe=class Qe extends n{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"},`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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customer_payment_sources/${s}/event_stores`,t,r)}isCustomerPaymentSource(e){return e.type&&e.type===Qe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Qe.TYPE}};Qe.TYPE="customer_payment_sources";var ui=Qe,ci=ui;var Ie=class Ie extends n{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(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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customer_subscriptions/${s}/event_stores`,t,r)}isCustomerSubscription(e){return e.type&&e.type===Ie.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ie.TYPE}};Ie.TYPE="customer_subscriptions";var pi=Ie,li=pi;var E=class E extends n{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 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)}async jwt_customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customers/${s}/jwt_customer`,t,r)}async jwt_markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`customers/${s}/jwt_markets`,t,r)}async jwt_stock_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`customers/${s}/jwt_stock_locations`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customers/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_remove_tags:t},r,s)}async _request_anonymization(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_request_anonymization:true},t,r)}async _cancel_anonymization(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_cancel_anonymization:true},t,r)}isCustomer(e){return e.type&&e.type===E.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return E.TYPE}};E.TYPE="customers";var mi=E,yi=mi;var Me=class Me extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`delivery_lead_times/${s}/event_stores`,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}};Me.TYPE="delivery_lead_times";var di=Me,Ri=di;var Xt=class Xt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`discount_engine_items/${s}/event_stores`,t,r)}isDiscountEngineItem(e){return e.type&&e.type===Xt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Xt.TYPE}};Xt.TYPE="discount_engine_items";var gi=Xt,_i=gi;var Nt=class Nt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`discount_engines/${s}/event_stores`,t,r)}isDiscountEngine(e){return e.type&&e.type===Nt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Nt.TYPE}};Nt.TYPE="discount_engines";var Pi=Nt,hi=Pi;var ie=class ie extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`easypost_pickups/${s}/event_stores`,t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ie.TYPE,_purchase:true},t,r)}isEasypostPickup(e){return e.type&&e.type===ie.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ie.TYPE}};ie.TYPE="easypost_pickups";var fi=ie,vi=fi;var Zt=class Zt extends n{async webhook(e,t,r){let s=e.id||e;return this.resources.fetch({type:"webhooks"},`event_callbacks/${s}/webhook`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`event_callbacks/${s}/event_stores`,t,r)}isEventCallback(e){return e.type&&e.type===Zt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Zt.TYPE}};Zt.TYPE="event_callbacks";var ki=Zt,Si=ki;var Ht=class Ht extends n{isEventStore(e){return e.type&&e.type===Ht.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ht.TYPE}};Ht.TYPE="event_stores";var Ci=Ht,Ti=Ci;var xt=class xt extends n{async update(e,t,r){return this.resources.update({...e,type:xt.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`events/${s}/event_stores`,t,r)}async _trigger(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:xt.TYPE,_trigger:true},t,r)}isEvent(e){return e.type&&e.type===xt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return xt.TYPE}};xt.TYPE="events";var Li=xt,xi=Li;var ae=class ae extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`exports/${s}/event_stores`,t,r)}async _interrupt(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ae.TYPE,_interrupt:true},t,r)}isExport(e){return e.type&&e.type===ae.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ae.TYPE}};ae.TYPE="exports";var Ei=ae,bi=Ei;var ue=class ue extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`external_gateways/${s}/event_stores`,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:ue.TYPE,_reset_circuit:true},t,r)}isExternalGateway(e){return e.type&&e.type===ue.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ue.TYPE}};ue.TYPE="external_gateways";var wi=ue,Ai=wi;var Ge=class Ge extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`external_payments/${s}/event_stores`,t,r)}isExternalPayment(e){return e.type&&e.type===Ge.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ge.TYPE}};Ge.TYPE="external_payments";var Oi=Ge,Qi=Oi;var S=class S extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`external_promotions/${s}/event_stores`,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:S.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_enable:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_remove_tags:t},r,s)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_reset_circuit:true},t,r)}isExternalPromotion(e){return e.type&&e.type===S.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return S.TYPE}};S.TYPE="external_promotions";var Ii=S,Mi=Ii;var ce=class ce extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`external_tax_calculators/${s}/event_stores`,t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ce.TYPE,_reset_circuit:true},t,r)}isExternalTaxCalculator(e){return e.type&&e.type===ce.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ce.TYPE}};ce.TYPE="external_tax_calculators";var Gi=ce,Yi=Gi;var b=class b extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`fixed_amount_promotions/${s}/event_stores`,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: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 _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:b.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:b.TYPE,_remove_tags:t},r,s)}isFixedAmountPromotion(e){return e.type&&e.type===b.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return b.TYPE}};b.TYPE="fixed_amount_promotions";var Ui=b,Vi=Ui;var w=class w extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`fixed_price_promotions/${s}/event_stores`,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: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)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:w.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:w.TYPE,_remove_tags:t},r,s)}isFixedPricePromotion(e){return e.type&&e.type===w.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return w.TYPE}};w.TYPE="fixed_price_promotions";var $i=w,Fi=$i;var A=class A extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`flex_promotions/${s}/event_stores`,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 _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:A.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:A.TYPE,_remove_tags:t},r,s)}isFlexPromotion(e){return e.type&&e.type===A.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return A.TYPE}};A.TYPE="flex_promotions";var Bi=A,qi=Bi;var O=class O extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`free_gift_promotions/${s}/event_stores`,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: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 _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:O.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:O.TYPE,_remove_tags:t},r,s)}isFreeGiftPromotion(e){return e.type&&e.type===O.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return O.TYPE}};O.TYPE="free_gift_promotions";var Di=O,zi=Di;var Q=class Q extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`free_shipping_promotions/${s}/event_stores`,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)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Q.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Q.TYPE,_remove_tags:t},r,s)}isFreeShippingPromotion(e){return e.type&&e.type===Q.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Q.TYPE}};Q.TYPE="free_shipping_promotions";var ji=Q,Wi=ji;var Jt=class Jt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`geocoders/${s}/event_stores`,t,r)}isGeocoder(e){return e.type&&e.type===Jt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Jt.TYPE}};Jt.TYPE="geocoders";var Ki=Jt,Xi=Ki;var Ye=class Ye extends n{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 customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`gift_card_recipients/${s}/customer`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`gift_card_recipients/${s}/event_stores`,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===Ye.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ye.TYPE}};Ye.TYPE="gift_card_recipients";var Ni=Ye,Zi=Ni;var h=class h extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`gift_cards/${s}/event_stores`,t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:h.TYPE,_purchase:true},t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:h.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:h.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:h.TYPE,_balance_change_cents:t},r,s)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:h.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:h.TYPE,_remove_tags:t},r,s)}isGiftCard(e){return e.type&&e.type===h.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return h.TYPE}};h.TYPE="gift_cards";var Hi=h,Ji=Hi;var Ue=class Ue extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`google_geocoders/${s}/event_stores`,t,r)}isGoogleGeocoder(e){return e.type&&e.type===Ue.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ue.TYPE}};Ue.TYPE="google_geocoders";var ea=Ue,ta=ea;var pe=class pe extends n{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 events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`imports/${s}/events`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`imports/${s}/event_stores`,t,r)}async _interrupt(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:pe.TYPE,_interrupt:true},t,r)}isImport(e){return e.type&&e.type===pe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return pe.TYPE}};pe.TYPE="imports";var ra=pe,sa=ra;var j=class j extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`in_stock_subscriptions/${s}/event_stores`,t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:j.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:j.TYPE,_deactivate:true},t,r)}isInStockSubscription(e){return e.type&&e.type===j.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return j.TYPE}};j.TYPE="in_stock_subscriptions";var oa=j,na=oa;var Ve=class Ve extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`inventory_models/${s}/event_stores`,t,r)}isInventoryModel(e){return e.type&&e.type===Ve.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ve.TYPE}};Ve.TYPE="inventory_models";var ia=Ve,aa=ia;var $e=class $e extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`inventory_return_locations/${s}/event_stores`,t,r)}isInventoryReturnLocation(e){return e.type&&e.type===$e.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return $e.TYPE}};$e.TYPE="inventory_return_locations";var ua=$e,ca=ua;var Fe=class Fe extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`inventory_stock_locations/${s}/event_stores`,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}};Fe.TYPE="inventory_stock_locations";var pa=Fe,la=pa;var Be=class Be extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`klarna_gateways/${s}/event_stores`,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===Be.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Be.TYPE}};Be.TYPE="klarna_gateways";var ma=Be,ya=ma;var le=class le extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`klarna_payments/${s}/event_stores`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:le.TYPE,_update:true},t,r)}isKlarnaPayment(e){return e.type&&e.type===le.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return le.TYPE}};le.TYPE="klarna_payments";var da=le,Ra=da;var W=class W extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`line_item_options/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:W.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:W.TYPE,_remove_tags:t},r,s)}isLineItemOption(e){return e.type&&e.type===W.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return W.TYPE}};W.TYPE="line_item_options";var ga=W,_a=ga;var C=class C extends n{async create(e,t,r){return this.resources.create({...e,type:C.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:C.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:C.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`line_items/${s}/event_stores`,t,r)}async _external_price(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:C.TYPE,_external_price:true},t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:C.TYPE,_reserve_stock:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:C.TYPE,_reset_circuit:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:C.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:C.TYPE,_remove_tags:t},r,s)}isLineItem(e){return e.type&&e.type===C.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return C.TYPE}};C.TYPE="line_items";var Pa=C,ha=Pa;var K=class K extends n{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 events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`links/${s}/events`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`links/${s}/event_stores`,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)}isLink(e){return e.type&&e.type===K.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return K.TYPE}};K.TYPE="links";var fa=K,va=fa;var qe=class qe extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`manual_gateways/${s}/event_stores`,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}};qe.TYPE="manual_gateways";var ka=qe,Sa=ka;var De=class De extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`manual_tax_calculators/${s}/event_stores`,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}};De.TYPE="manual_tax_calculators";var Ca=De,Ta=Ca;var X=class X extends n{async create(e,t,r){return this.resources.create({...e,type:X.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:X.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:X.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 discount_engine(e,t,r){let s=e.id||e;return this.resources.fetch({type:"discount_engines"},`markets/${s}/discount_engine`,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 default_shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`markets/${s}/default_shipping_method`,t,r)}async default_payment_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`markets/${s}/default_payment_method`,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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`markets/${s}/event_stores`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:X.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:X.TYPE,_enable:true},t,r)}isMarket(e){return e.type&&e.type===X.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return X.TYPE}};X.TYPE="markets";var La=X,xa=La;var ze=class ze extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`merchants/${s}/event_stores`,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}};ze.TYPE="merchants";var Ea=ze,ba=Ea;var je=class je extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`notifications/${s}/event_stores`,t,r)}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}};je.TYPE="notifications";var wa=je,Aa=wa;var We=class We extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`order_amount_promotion_rules/${s}/event_stores`,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}};We.TYPE="order_amount_promotion_rules";var Oa=We,Qa=Oa;var Ke=class Ke extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`order_copies/${s}/event_stores`,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}};Ke.TYPE="order_copies";var Ia=Ke,Ma=Ia;var er=class er extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`order_factories/${s}/event_stores`,t,r)}isOrderFactory(e){return e.type&&e.type===er.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return er.TYPE}};er.TYPE="order_factories";var Ga=er,Ya=Ga;var Xe=class Xe extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`order_subscription_items/${s}/event_stores`,t,r)}isOrderSubscriptionItem(e){return e.type&&e.type===Xe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Xe.TYPE}};Xe.TYPE="order_subscription_items";var Ua=Xe,Va=Ua;var f=class f extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`order_subscriptions/${s}/event_stores`,t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_deactivate: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)}async _convert(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_convert:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_remove_tags:t},r,s)}isOrderSubscription(e){return e.type&&e.type===f.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return f.TYPE}};f.TYPE="order_subscriptions";var $a=f,Fa=$a;var m=class m extends n{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"},`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 default_shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`orders/${s}/default_shipping_method`,t,r)}async default_payment_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`orders/${s}/default_payment_method`,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 discount_engine_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"discount_engine_items"},`orders/${s}/discount_engine_item`,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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`orders/${s}/event_stores`,t,r)}async _archive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_archive:true},t,r)}async _unarchive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_unarchive:true},t,r)}async _pending(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_pending:true},t,r)}async _place(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_place:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_cancel:true},t,r)}async _approve(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_approve:true},t,r)}async _approve_and_capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_approve_and_capture:true},t,r)}async _authorize(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.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:m.TYPE,_authorization_amount_cents:t},r,s)}async _capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_capture:true},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_refund:true},t,r)}async _fulfill(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_fulfill:true},t,r)}async _update_taxes(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.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:m.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:m.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:m.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:m.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:m.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:m.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:m.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:m.TYPE,_commit_invoice:true},t,r)}async _refund_invoice(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.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:m.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:m.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:m.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:m.TYPE,_refresh:true},t,r)}async _validate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_validate:true},t,r)}async _create_subscriptions(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_create_subscriptions:true},t,r)}async _start_editing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_start_editing:true},t,r)}async _stop_editing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_stop_editing:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_reset_circuit:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_remove_tags:t},r,s)}isOrder(e){return e.type&&e.type===m.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return m.TYPE}};m.TYPE="orders";var Ba=m,qa=Ba;var tr=class tr extends Qt{async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`organization/${s}/event_stores`,t,r)}isOrganization(e){return e.type&&e.type===tr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return tr.TYPE}path(){return "organization"}};tr.TYPE="organizations";var Da=tr,za=Da;var Ne=class Ne extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`packages/${s}/event_stores`,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}};Ne.TYPE="packages";var ja=Ne,Wa=ja;var Ze=class Ze extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`parcel_line_items/${s}/event_stores`,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}};Ze.TYPE="parcel_line_items";var Ka=Ze,Xa=Ka;var He=class He extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`parcels/${s}/event_stores`,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}};He.TYPE="parcels";var Na=He,Za=Na;var rr=class rr extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`payment_gateways/${s}/event_stores`,t,r)}isPaymentGateway(e){return e.type&&e.type===rr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return rr.TYPE}};rr.TYPE="payment_gateways";var Ha=rr,Ja=Ha;var N=class N extends n{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 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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`payment_methods/${s}/event_stores`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:N.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:N.TYPE,_enable:true},t,r)}isPaymentMethod(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.TYPE="payment_methods";var eu=N,tu=eu;var Je=class Je extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`payment_options/${s}/event_stores`,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}};Je.TYPE="payment_options";var ru=Je,su=ru;var et=class et extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`paypal_gateways/${s}/event_stores`,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}};et.TYPE="paypal_gateways";var ou=et,nu=ou;var tt=class tt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`paypal_payments/${s}/event_stores`,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}};tt.TYPE="paypal_payments";var iu=tt,au=iu;var I=class I extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`percentage_discount_promotions/${s}/event_stores`,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:I.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_enable:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_remove_tags:t},r,s)}isPercentageDiscountPromotion(e){return e.type&&e.type===I.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return I.TYPE}};I.TYPE="percentage_discount_promotions";var uu=I,cu=uu;var sr=class sr extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`pickups/${s}/event_stores`,t,r)}isPickup(e){return e.type&&e.type===sr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return sr.TYPE}};sr.TYPE="pickups";var pu=sr,lu=pu;var rt=class rt extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`price_frequency_tiers/${s}/event_stores`,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}};rt.TYPE="price_frequency_tiers";var mu=rt,yu=mu;var Z=class Z extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`price_list_schedulers/${s}/event_stores`,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)}isPriceListScheduler(e){return e.type&&e.type===Z.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Z.TYPE}};Z.TYPE="price_list_schedulers";var du=Z,Ru=du;var st=class st extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`price_lists/${s}/event_stores`,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}};st.TYPE="price_lists";var gu=st,_u=gu;var or=class or extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`price_tiers/${s}/event_stores`,t,r)}isPriceTier(e){return e.type&&e.type===or.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return or.TYPE}};or.TYPE="price_tiers";var Pu=or,hu=Pu;var ot=class ot extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`price_volume_tiers/${s}/event_stores`,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}};ot.TYPE="price_volume_tiers";var fu=ot,vu=fu;var nt=class nt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`prices/${s}/event_stores`,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}};nt.TYPE="prices";var ku=nt,Su=ku;var nr=class nr extends n{async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`promotion_rules/${s}/versions`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`promotion_rules/${s}/event_stores`,t,r)}isPromotionRule(e){return e.type&&e.type===nr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return nr.TYPE}};nr.TYPE="promotion_rules";var Cu=nr,Tu=Cu;var ir=class ir extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`promotions/${s}/event_stores`,t,r)}isPromotion(e){return e.type&&e.type===ir.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ir.TYPE}};ir.TYPE="promotions";var Lu=ir,xu=Lu;var it=class it extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`recurring_order_copies/${s}/event_stores`,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}};it.TYPE="recurring_order_copies";var Eu=it,bu=Eu;var Et=class Et extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`refunds/${s}/event_stores`,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}};Et.TYPE="refunds";var wu=Et,Au=wu;var ar=class ar extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`reserved_stocks/${s}/event_stores`,t,r)}isReservedStock(e){return e.type&&e.type===ar.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ar.TYPE}};ar.TYPE="reserved_stocks";var Ou=ar,Qu=Ou;var ur=class ur extends n{async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`resource_errors/${s}/event_stores`,t,r)}isResourceError(e){return e.type&&e.type===ur.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ur.TYPE}};ur.TYPE="resource_errors";var Iu=ur,Mu=Iu;var me=class me extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`return_line_items/${s}/event_stores`,t,r)}async _restock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:me.TYPE,_restock:true},t,r)}isReturnLineItem(e){return e.type&&e.type===me.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return me.TYPE}};me.TYPE="return_line_items";var Gu=me,Yu=Gu;var g=class g extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`returns/${s}/event_stores`,t,r)}async _request(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_request:true},t,r)}async _approve(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_approve: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 _ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_ship:true},t,r)}async _reject(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_reject:true},t,r)}async _receive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_receive:true},t,r)}async _restock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_restock:true},t,r)}async _archive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_archive:true},t,r)}async _unarchive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_unarchive: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 _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_remove_tags:t},r,s)}isReturn(e){return e.type&&e.type===g.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return g.TYPE}};g.TYPE="returns";var Uu=g,Vu=Uu;var at=class at extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`satispay_gateways/${s}/event_stores`,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}};at.TYPE="satispay_gateways";var $u=at,Fu=$u;var ye=class ye extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`satispay_payments/${s}/event_stores`,t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ye.TYPE,_refresh:true},t,r)}isSatispayPayment(e){return e.type&&e.type===ye.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ye.TYPE}};ye.TYPE="satispay_payments";var Bu=ye,qu=Bu;var R=class R extends n{async create(e,t,r){return this.resources.create({...e,type:R.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:R.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:R.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipments/${s}/event_stores`,t,r)}async _upcoming(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_upcoming:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_cancel:true},t,r)}async _on_hold(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_on_hold:true},t,r)}async _picking(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_picking:true},t,r)}async _packing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_packing:true},t,r)}async _ready_to_ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_ready_to_ship:true},t,r)}async _ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_ship:true},t,r)}async _deliver(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_deliver:true},t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_reserve_stock:true},t,r)}async _release_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_release_stock:true},t,r)}async _decrement_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_decrement_stock:true},t,r)}async _get_rates(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_get_rates:true},t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_purchase:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_remove_tags:t},r,s)}isShipment(e){return e.type&&e.type===R.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return R.TYPE}};R.TYPE="shipments";var Du=R,zu=Du;var ut=class ut extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipping_categories/${s}/event_stores`,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}};ut.TYPE="shipping_categories";var ju=ut,Wu=ju;var cr=class cr extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipping_method_tiers/${s}/event_stores`,t,r)}isShippingMethodTier(e){return e.type&&e.type===cr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return cr.TYPE}};cr.TYPE="shipping_method_tiers";var Ku=cr,Xu=Ku;var V=class V extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipping_methods/${s}/event_stores`,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)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:V.TYPE,_reset_circuit:true},t,r)}isShippingMethod(e){return e.type&&e.type===V.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return V.TYPE}};V.TYPE="shipping_methods";var Nu=V,Zu=Nu;var ct=class ct extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipping_weight_tiers/${s}/event_stores`,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}};ct.TYPE="shipping_weight_tiers";var Hu=ct,Ju=Hu;var pt=class pt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipping_zones/${s}/event_stores`,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}};pt.TYPE="shipping_zones";var ec=pt,tc=ec;var lt=class lt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`sku_list_items/${s}/event_stores`,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}};lt.TYPE="sku_list_items";var rc=lt,sc=rc;var mt=class mt extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`sku_list_promotion_rules/${s}/event_stores`,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}};mt.TYPE="sku_list_promotion_rules";var oc=mt,nc=oc;var yt=class yt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`sku_lists/${s}/event_stores`,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}};yt.TYPE="sku_lists";var ic=yt,ac=ic;var H=class H extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`sku_options/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:H.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:H.TYPE,_remove_tags:t},r,s)}isSkuOption(e){return e.type&&e.type===H.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return H.TYPE}};H.TYPE="sku_options";var uc=H,cc=uc;var J=class J extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`skus/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:J.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:J.TYPE,_remove_tags:t},r,s)}isSku(e){return e.type&&e.type===J.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return J.TYPE}};J.TYPE="skus";var pc=J,lc=pc;var de=class de extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stock_items/${s}/event_stores`,t,r)}async _validate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:de.TYPE,_validate:true},t,r)}isStockItem(e){return e.type&&e.type===de.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return de.TYPE}};de.TYPE="stock_items";var mc=de,yc=mc;var $=class $ extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stock_line_items/${s}/event_stores`,t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:$.TYPE,_reserve_stock:true},t,r)}async _release_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:$.TYPE,_release_stock:true},t,r)}async _decrement_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:$.TYPE,_decrement_stock:true},t,r)}isStockLineItem(e){return e.type&&e.type===$.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return $.TYPE}};$.TYPE="stock_line_items";var dc=$,Rc=dc;var dt=class dt extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stock_locations/${s}/event_stores`,t,r)}isStockLocation(e){return e.type&&e.type===dt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return dt.TYPE}};dt.TYPE="stock_locations";var gc=dt,_c=gc;var Re=class Re extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stock_reservations/${s}/event_stores`,t,r)}async _pending(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Re.TYPE,_pending:true},t,r)}isStockReservation(e){return e.type&&e.type===Re.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Re.TYPE}};Re.TYPE="stock_reservations";var Pc=Re,hc=Pc;var v=class v extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stock_transfers/${s}/event_stores`,t,r)}async _upcoming(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_upcoming:true},t,r)}async _on_hold(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_on_hold:true},t,r)}async _picking(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_picking:true},t,r)}async _in_transit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_in_transit:true},t,r)}async _complete(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_complete:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_cancel:true},t,r)}isStockTransfer(e){return e.type&&e.type===v.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return v.TYPE}};v.TYPE="stock_transfers";var fc=v,vc=fc;var Rt=class Rt extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stores/${s}/event_stores`,t,r)}isStore(e){return e.type&&e.type===Rt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Rt.TYPE}};Rt.TYPE="stores";var kc=Rt,Sc=kc;var gt=class gt extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stripe_gateways/${s}/event_stores`,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===gt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return gt.TYPE}};gt.TYPE="stripe_gateways";var Cc=gt,Tc=Cc;var ee=class ee extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stripe_payments/${s}/event_stores`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ee.TYPE,_update:true},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ee.TYPE,_refresh:true},t,r)}isStripePayment(e){return e.type&&e.type===ee.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ee.TYPE}};ee.TYPE="stripe_payments";var Lc=ee,xc=Lc;var _t=class _t extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stripe_tax_accounts/${s}/event_stores`,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===_t.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return _t.TYPE}};_t.TYPE="stripe_tax_accounts";var Ec=_t,bc=Ec;var Pt=class Pt extends n{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"},`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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`subscription_models/${s}/event_stores`,t,r)}isSubscriptionModel(e){return e.type&&e.type===Pt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Pt.TYPE}};Pt.TYPE="subscription_models";var wc=Pt,Ac=wc;var ht=class ht extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`tags/${s}/event_stores`,t,r)}isTag(e){return e.type&&e.type===ht.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ht.TYPE}};ht.TYPE="tags";var Oc=ht,Qc=Oc;var ft=class ft extends n{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"},`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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`talon_one_accounts/${s}/event_stores`,t,r)}isTalonOneAccount(e){return e.type&&e.type===ft.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ft.TYPE}};ft.TYPE="talon_one_accounts";var Ic=ft,Mc=Ic;var pr=class pr extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`tax_calculators/${s}/event_stores`,t,r)}isTaxCalculator(e){return e.type&&e.type===pr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return pr.TYPE}};pr.TYPE="tax_calculators";var Gc=pr,Yc=Gc;var vt=class vt extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`tax_categories/${s}/event_stores`,t,r)}isTaxCategory(e){return e.type&&e.type===vt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return vt.TYPE}};vt.TYPE="tax_categories";var Uc=vt,Vc=Uc;var kt=class kt extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`tax_rules/${s}/event_stores`,t,r)}isTaxRule(e){return e.type&&e.type===kt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return kt.TYPE}};kt.TYPE="tax_rules";var $c=kt,Fc=$c;var St=class St extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`taxjar_accounts/${s}/event_stores`,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}};St.TYPE="taxjar_accounts";var Bc=St,qc=Bc;var lr=class lr extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`transactions/${s}/event_stores`,t,r)}isTransaction(e){return e.type&&e.type===lr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return lr.TYPE}};lr.TYPE="transactions";var Dc=lr,zc=Dc;var mr=class mr extends n{async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`versions/${s}/event_stores`,t,r)}isVersion(e){return e.type&&e.type===mr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return mr.TYPE}};mr.TYPE="versions";var jc=mr,Wc=jc;var ge=class ge extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`vertex_accounts/${s}/event_stores`,t,r)}async _refresh_token(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ge.TYPE,_refresh_token:true},t,r)}isVertexAccount(e){return e.type&&e.type===ge.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ge.TYPE}};ge.TYPE="vertex_accounts";var Kc=ge,Xc=Kc;var bt=class bt extends n{async update(e,t,r){return this.resources.update({...e,type:bt.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`voids/${s}/event_stores`,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:bt.TYPE,_forward:true},t,r)}isVoid(e){return e.type&&e.type===bt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return bt.TYPE}};bt.TYPE="voids";var Nc=bt,Zc=Nc;var F=class F extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`webhooks/${s}/event_stores`,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)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:F.TYPE,_reset_circuit:true},t,r)}isWebhook(e){return e.type&&e.type===F.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return F.TYPE}};F.TYPE="webhooks";var Hc=F,Jc=Hc;var Ct=class Ct extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`wire_transfers/${s}/event_stores`,t,r)}isWireTransfer(e){return e.type&&e.type===Ct.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ct.TYPE}};Ct.TYPE="wire_transfers";var ep=Ct,tp=ep;var Ot=["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","event_stores","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"],Wo=["applications","organizations"];var It={resources:i=>i?[...Ot].sort():Ot,singletons:i=>i?[...Wo].sort():Wo,isSingleton:i=>Wo.includes(i),isSdkError:i=>_.isSdkError(i),isApiError:i=>_e.isApiError(i),init:i=>sp(i),isTokenExpired:i=>Fo(i),get schemaVersion(){return rp}};var _p=T("commercelayer"),rp="7.9.5";var p,Mt,yr,dr,Rr,gr,_r,Pr,hr,fr,vr,kr,Sr,Cr,Tr,Lr,xr,Er,br,wr,Ar,Or,Qr,Ir,Mr,Gr,Yr,Ur,Vr,$r,Fr,Br,qr,Dr,zr,jr,Wr,Kr,Xr,Nr,Zr,Hr,Jr,es,ts,rs,ss,os,ns,is,as,us,cs,ps,ls,ms,ys,ds,Rs,gs,_s,Ps,hs,fs,vs,ks,Ss,Cs,Ts,Ls,xs,Es,bs,ws,As,Os,Qs,Is,Ms,Gs,Ys,Us,Vs,$s,Fs,Bs,qs,Ds,zs,js,Ws,Ks,Xs,Ns,Zs,Hs,Js,eo,to,ro,so,oo,no,io,ao,uo,co,po,lo,mo,yo,Ro,go,_o,Po,ho,fo,vo,ko,So,Co,To,Lo,xo,Eo,bo,wo,Ao,Oo,Qo,Io,Mo,Go,Yo,op=class{constructor(e){this.openApiSchemaVersion=rp;u(this,p);u(this,Mt);u(this,yr);u(this,dr);u(this,Rr);u(this,gr);u(this,_r);u(this,Pr);u(this,hr);u(this,fr);u(this,vr);u(this,kr);u(this,Sr);u(this,Cr);u(this,Tr);u(this,Lr);u(this,xr);u(this,Er);u(this,br);u(this,wr);u(this,Ar);u(this,Or);u(this,Qr);u(this,Ir);u(this,Mr);u(this,Gr);u(this,Yr);u(this,Ur);u(this,Vr);u(this,$r);u(this,Fr);u(this,Br);u(this,qr);u(this,Dr);u(this,zr);u(this,jr);u(this,Wr);u(this,Kr);u(this,Xr);u(this,Nr);u(this,Zr);u(this,Hr);u(this,Jr);u(this,es);u(this,ts);u(this,rs);u(this,ss);u(this,os);u(this,ns);u(this,is);u(this,as);u(this,us);u(this,cs);u(this,ps);u(this,ls);u(this,ms);u(this,ys);u(this,ds);u(this,Rs);u(this,gs);u(this,_s);u(this,Ps);u(this,hs);u(this,fs);u(this,vs);u(this,ks);u(this,Ss);u(this,Cs);u(this,Ts);u(this,Ls);u(this,xs);u(this,Es);u(this,bs);u(this,ws);u(this,As);u(this,Os);u(this,Qs);u(this,Is);u(this,Ms);u(this,Gs);u(this,Ys);u(this,Us);u(this,Vs);u(this,$s);u(this,Fs);u(this,Bs);u(this,qs);u(this,Ds);u(this,zs);u(this,js);u(this,Ws);u(this,Ks);u(this,Xs);u(this,Ns);u(this,Zs);u(this,Hs);u(this,Js);u(this,eo);u(this,to);u(this,ro);u(this,so);u(this,oo);u(this,no);u(this,io);u(this,ao);u(this,uo);u(this,co);u(this,po);u(this,lo);u(this,mo);u(this,yo);u(this,Ro);u(this,go);u(this,_o);u(this,Po);u(this,ho);u(this,fo);u(this,vo);u(this,ko);u(this,So);u(this,Co);u(this,To);u(this,Lo);u(this,xo);u(this,Eo);u(this,bo);u(this,wo);u(this,Ao);u(this,Oo);u(this,Qo);u(this,Io);u(this,Mo);u(this,Go);u(this,Yo);if(_p("new commercelayer instance %O",e),(!e.organization||!e.domain)&&e.accessToken){let t=Ho(e.accessToken);!e.organization&&t?.organization?.slug&&(e.organization=t.organization.slug),!e.domain&&t?.iss&&(e.domain=String(t.iss).replace("https://auth.",""));}a(this,p,new gp(e)),a(this,Mt,e.organization??"");}get addresses(){return o(this,yr)||a(this,yr,new cn(o(this,p)))}get adjustments(){return o(this,dr)||a(this,dr,new ln(o(this,p)))}get adyen_gateways(){return o(this,Rr)||a(this,Rr,new yn(o(this,p)))}get adyen_payments(){return o(this,gr)||a(this,gr,new Rn(o(this,p)))}get application(){return o(this,_r)||a(this,_r,new _n(o(this,p)))}get attachments(){return o(this,Pr)||a(this,Pr,new hn(o(this,p)))}get authorizations(){return o(this,hr)||a(this,hr,new vn(o(this,p)))}get avalara_accounts(){return o(this,fr)||a(this,fr,new Sn(o(this,p)))}get axerve_gateways(){return o(this,vr)||a(this,vr,new Tn(o(this,p)))}get axerve_payments(){return o(this,kr)||a(this,kr,new xn(o(this,p)))}get bing_geocoders(){return o(this,Sr)||a(this,Sr,new bn(o(this,p)))}get braintree_gateways(){return o(this,Cr)||a(this,Cr,new An(o(this,p)))}get braintree_payments(){return o(this,Tr)||a(this,Tr,new Qn(o(this,p)))}get bundles(){return o(this,Lr)||a(this,Lr,new Mn(o(this,p)))}get buy_x_pay_y_promotions(){return o(this,xr)||a(this,xr,new Yn(o(this,p)))}get captures(){return o(this,Er)||a(this,Er,new Vn(o(this,p)))}get carrier_accounts(){return o(this,br)||a(this,br,new Fn(o(this,p)))}get checkout_com_gateways(){return o(this,wr)||a(this,wr,new qn(o(this,p)))}get checkout_com_payments(){return o(this,Ar)||a(this,Ar,new zn(o(this,p)))}get cleanups(){return o(this,Or)||a(this,Or,new Wn(o(this,p)))}get coupon_codes_promotion_rules(){return o(this,Qr)||a(this,Qr,new Xn(o(this,p)))}get coupon_recipients(){return o(this,Ir)||a(this,Ir,new Zn(o(this,p)))}get coupons(){return o(this,Mr)||a(this,Mr,new Jn(o(this,p)))}get custom_promotion_rules(){return o(this,Gr)||a(this,Gr,new ti(o(this,p)))}get customer_addresses(){return o(this,Yr)||a(this,Yr,new si(o(this,p)))}get customer_groups(){return o(this,Ur)||a(this,Ur,new ni(o(this,p)))}get customer_password_resets(){return o(this,Vr)||a(this,Vr,new ai(o(this,p)))}get customer_payment_sources(){return o(this,$r)||a(this,$r,new ci(o(this,p)))}get customer_subscriptions(){return o(this,Fr)||a(this,Fr,new li(o(this,p)))}get customers(){return o(this,Br)||a(this,Br,new yi(o(this,p)))}get delivery_lead_times(){return o(this,qr)||a(this,qr,new Ri(o(this,p)))}get discount_engine_items(){return o(this,Dr)||a(this,Dr,new _i(o(this,p)))}get discount_engines(){return o(this,zr)||a(this,zr,new hi(o(this,p)))}get easypost_pickups(){return o(this,jr)||a(this,jr,new vi(o(this,p)))}get event_callbacks(){return o(this,Wr)||a(this,Wr,new Si(o(this,p)))}get event_stores(){return o(this,Kr)||a(this,Kr,new Ti(o(this,p)))}get events(){return o(this,Xr)||a(this,Xr,new xi(o(this,p)))}get exports(){return o(this,Nr)||a(this,Nr,new bi(o(this,p)))}get external_gateways(){return o(this,Zr)||a(this,Zr,new Ai(o(this,p)))}get external_payments(){return o(this,Hr)||a(this,Hr,new Qi(o(this,p)))}get external_promotions(){return o(this,Jr)||a(this,Jr,new Mi(o(this,p)))}get external_tax_calculators(){return o(this,es)||a(this,es,new Yi(o(this,p)))}get fixed_amount_promotions(){return o(this,ts)||a(this,ts,new Vi(o(this,p)))}get fixed_price_promotions(){return o(this,rs)||a(this,rs,new Fi(o(this,p)))}get flex_promotions(){return o(this,ss)||a(this,ss,new qi(o(this,p)))}get free_gift_promotions(){return o(this,os)||a(this,os,new zi(o(this,p)))}get free_shipping_promotions(){return o(this,ns)||a(this,ns,new Wi(o(this,p)))}get geocoders(){return o(this,is)||a(this,is,new Xi(o(this,p)))}get gift_card_recipients(){return o(this,as)||a(this,as,new Zi(o(this,p)))}get gift_cards(){return o(this,us)||a(this,us,new Ji(o(this,p)))}get google_geocoders(){return o(this,cs)||a(this,cs,new ta(o(this,p)))}get imports(){return o(this,ps)||a(this,ps,new sa(o(this,p)))}get in_stock_subscriptions(){return o(this,ls)||a(this,ls,new na(o(this,p)))}get inventory_models(){return o(this,ms)||a(this,ms,new aa(o(this,p)))}get inventory_return_locations(){return o(this,ys)||a(this,ys,new ca(o(this,p)))}get inventory_stock_locations(){return o(this,ds)||a(this,ds,new la(o(this,p)))}get klarna_gateways(){return o(this,Rs)||a(this,Rs,new ya(o(this,p)))}get klarna_payments(){return o(this,gs)||a(this,gs,new Ra(o(this,p)))}get line_item_options(){return o(this,_s)||a(this,_s,new _a(o(this,p)))}get line_items(){return o(this,Ps)||a(this,Ps,new ha(o(this,p)))}get links(){return o(this,hs)||a(this,hs,new va(o(this,p)))}get manual_gateways(){return o(this,fs)||a(this,fs,new Sa(o(this,p)))}get manual_tax_calculators(){return o(this,vs)||a(this,vs,new Ta(o(this,p)))}get markets(){return o(this,ks)||a(this,ks,new xa(o(this,p)))}get merchants(){return o(this,Ss)||a(this,Ss,new ba(o(this,p)))}get notifications(){return o(this,Cs)||a(this,Cs,new Aa(o(this,p)))}get order_amount_promotion_rules(){return o(this,Ts)||a(this,Ts,new Qa(o(this,p)))}get order_copies(){return o(this,Ls)||a(this,Ls,new Ma(o(this,p)))}get order_factories(){return o(this,xs)||a(this,xs,new Ya(o(this,p)))}get order_subscription_items(){return o(this,Es)||a(this,Es,new Va(o(this,p)))}get order_subscriptions(){return o(this,bs)||a(this,bs,new Fa(o(this,p)))}get orders(){return o(this,ws)||a(this,ws,new qa(o(this,p)))}get organization(){return o(this,As)||a(this,As,new za(o(this,p)))}get packages(){return o(this,Os)||a(this,Os,new Wa(o(this,p)))}get parcel_line_items(){return o(this,Qs)||a(this,Qs,new Xa(o(this,p)))}get parcels(){return o(this,Is)||a(this,Is,new Za(o(this,p)))}get payment_gateways(){return o(this,Ms)||a(this,Ms,new Ja(o(this,p)))}get payment_methods(){return o(this,Gs)||a(this,Gs,new tu(o(this,p)))}get payment_options(){return o(this,Ys)||a(this,Ys,new su(o(this,p)))}get paypal_gateways(){return o(this,Us)||a(this,Us,new nu(o(this,p)))}get paypal_payments(){return o(this,Vs)||a(this,Vs,new au(o(this,p)))}get percentage_discount_promotions(){return o(this,$s)||a(this,$s,new cu(o(this,p)))}get pickups(){return o(this,Fs)||a(this,Fs,new lu(o(this,p)))}get price_frequency_tiers(){return o(this,Bs)||a(this,Bs,new yu(o(this,p)))}get price_list_schedulers(){return o(this,qs)||a(this,qs,new Ru(o(this,p)))}get price_lists(){return o(this,Ds)||a(this,Ds,new _u(o(this,p)))}get price_tiers(){return o(this,zs)||a(this,zs,new hu(o(this,p)))}get price_volume_tiers(){return o(this,js)||a(this,js,new vu(o(this,p)))}get prices(){return o(this,Ws)||a(this,Ws,new Su(o(this,p)))}get promotion_rules(){return o(this,Ks)||a(this,Ks,new Tu(o(this,p)))}get promotions(){return o(this,Xs)||a(this,Xs,new xu(o(this,p)))}get recurring_order_copies(){return o(this,Ns)||a(this,Ns,new bu(o(this,p)))}get refunds(){return o(this,Zs)||a(this,Zs,new Au(o(this,p)))}get reserved_stocks(){return o(this,Hs)||a(this,Hs,new Qu(o(this,p)))}get resource_errors(){return o(this,Js)||a(this,Js,new Mu(o(this,p)))}get return_line_items(){return o(this,eo)||a(this,eo,new Yu(o(this,p)))}get returns(){return o(this,to)||a(this,to,new Vu(o(this,p)))}get satispay_gateways(){return o(this,ro)||a(this,ro,new Fu(o(this,p)))}get satispay_payments(){return o(this,so)||a(this,so,new qu(o(this,p)))}get shipments(){return o(this,oo)||a(this,oo,new zu(o(this,p)))}get shipping_categories(){return o(this,no)||a(this,no,new Wu(o(this,p)))}get shipping_method_tiers(){return o(this,io)||a(this,io,new Xu(o(this,p)))}get shipping_methods(){return o(this,ao)||a(this,ao,new Zu(o(this,p)))}get shipping_weight_tiers(){return o(this,uo)||a(this,uo,new Ju(o(this,p)))}get shipping_zones(){return o(this,co)||a(this,co,new tc(o(this,p)))}get sku_list_items(){return o(this,po)||a(this,po,new sc(o(this,p)))}get sku_list_promotion_rules(){return o(this,lo)||a(this,lo,new nc(o(this,p)))}get sku_lists(){return o(this,mo)||a(this,mo,new ac(o(this,p)))}get sku_options(){return o(this,yo)||a(this,yo,new cc(o(this,p)))}get skus(){return o(this,Ro)||a(this,Ro,new lc(o(this,p)))}get stock_items(){return o(this,go)||a(this,go,new yc(o(this,p)))}get stock_line_items(){return o(this,_o)||a(this,_o,new Rc(o(this,p)))}get stock_locations(){return o(this,Po)||a(this,Po,new _c(o(this,p)))}get stock_reservations(){return o(this,ho)||a(this,ho,new hc(o(this,p)))}get stock_transfers(){return o(this,fo)||a(this,fo,new vc(o(this,p)))}get stores(){return o(this,vo)||a(this,vo,new Sc(o(this,p)))}get stripe_gateways(){return o(this,ko)||a(this,ko,new Tc(o(this,p)))}get stripe_payments(){return o(this,So)||a(this,So,new xc(o(this,p)))}get stripe_tax_accounts(){return o(this,Co)||a(this,Co,new bc(o(this,p)))}get subscription_models(){return o(this,To)||a(this,To,new Ac(o(this,p)))}get tags(){return o(this,Lo)||a(this,Lo,new Qc(o(this,p)))}get talon_one_accounts(){return o(this,xo)||a(this,xo,new Mc(o(this,p)))}get tax_calculators(){return o(this,Eo)||a(this,Eo,new Yc(o(this,p)))}get tax_categories(){return o(this,bo)||a(this,bo,new Vc(o(this,p)))}get tax_rules(){return o(this,wo)||a(this,wo,new Fc(o(this,p)))}get taxjar_accounts(){return o(this,Ao)||a(this,Ao,new qc(o(this,p)))}get transactions(){return o(this,Oo)||a(this,Oo,new zc(o(this,p)))}get versions(){return o(this,Qo)||a(this,Qo,new Wc(o(this,p)))}get vertex_accounts(){return o(this,Io)||a(this,Io,new Xc(o(this,p)))}get voids(){return o(this,Mo)||a(this,Mo,new Zc(o(this,p)))}get webhooks(){return o(this,Go)||a(this,Go,new Jc(o(this,p)))}get wire_transfers(){return o(this,Yo)||a(this,Yo,new tp(o(this,p)))}get currentOrganization(){return o(this,Mt)}get currentAccessToken(){return o(this,p)?.client?.currentAccessToken}get interceptors(){return o(this,p).client.interceptors}localConfig(e){e.organization&&a(this,Mt,e.organization);}config(e){return _p("config %o",e),this.localConfig(e),e.organization||(e.organization=this.currentOrganization),o(this,p).config(e),this}resources(){return It.resources()}singletons(){return It.singletons()}isSingleton(e){return It.isSingleton(e)}isApiError(e){return It.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 l={};s.headers.forEach((d,y)=>{l[y]=d;}),t.headers=l;}return s}return this.interceptors.rawReader={onSuccess:r,onFailure:r},t.id=1,t}removeRawResponseReader(){this.interceptors.rawReader=void 0;}};p=new WeakMap,Mt=new WeakMap,yr=new WeakMap,dr=new WeakMap,Rr=new WeakMap,gr=new WeakMap,_r=new WeakMap,Pr=new WeakMap,hr=new WeakMap,fr=new WeakMap,vr=new WeakMap,kr=new WeakMap,Sr=new WeakMap,Cr=new WeakMap,Tr=new WeakMap,Lr=new WeakMap,xr=new WeakMap,Er=new WeakMap,br=new WeakMap,wr=new WeakMap,Ar=new WeakMap,Or=new WeakMap,Qr=new WeakMap,Ir=new WeakMap,Mr=new WeakMap,Gr=new WeakMap,Yr=new WeakMap,Ur=new WeakMap,Vr=new WeakMap,$r=new WeakMap,Fr=new WeakMap,Br=new WeakMap,qr=new WeakMap,Dr=new WeakMap,zr=new WeakMap,jr=new WeakMap,Wr=new WeakMap,Kr=new WeakMap,Xr=new WeakMap,Nr=new WeakMap,Zr=new WeakMap,Hr=new WeakMap,Jr=new WeakMap,es=new WeakMap,ts=new WeakMap,rs=new WeakMap,ss=new WeakMap,os=new WeakMap,ns=new WeakMap,is=new WeakMap,as=new WeakMap,us=new WeakMap,cs=new WeakMap,ps=new WeakMap,ls=new WeakMap,ms=new WeakMap,ys=new WeakMap,ds=new WeakMap,Rs=new WeakMap,gs=new WeakMap,_s=new WeakMap,Ps=new WeakMap,hs=new WeakMap,fs=new WeakMap,vs=new WeakMap,ks=new WeakMap,Ss=new WeakMap,Cs=new WeakMap,Ts=new WeakMap,Ls=new WeakMap,xs=new WeakMap,Es=new WeakMap,bs=new WeakMap,ws=new WeakMap,As=new WeakMap,Os=new WeakMap,Qs=new WeakMap,Is=new WeakMap,Ms=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Us=new WeakMap,Vs=new WeakMap,$s=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,qs=new WeakMap,Ds=new WeakMap,zs=new WeakMap,js=new WeakMap,Ws=new WeakMap,Ks=new WeakMap,Xs=new WeakMap,Ns=new WeakMap,Zs=new WeakMap,Hs=new WeakMap,Js=new WeakMap,eo=new WeakMap,to=new WeakMap,ro=new WeakMap,so=new WeakMap,oo=new WeakMap,no=new WeakMap,io=new WeakMap,ao=new WeakMap,uo=new WeakMap,co=new WeakMap,po=new WeakMap,lo=new WeakMap,mo=new WeakMap,yo=new WeakMap,Ro=new WeakMap,go=new WeakMap,_o=new WeakMap,Po=new WeakMap,ho=new WeakMap,fo=new WeakMap,vo=new WeakMap,ko=new WeakMap,So=new WeakMap,Co=new WeakMap,To=new WeakMap,Lo=new WeakMap,xo=new WeakMap,Eo=new WeakMap,bo=new WeakMap,wo=new WeakMap,Ao=new WeakMap,Oo=new WeakMap,Qo=new WeakMap,Io=new WeakMap,Mo=new WeakMap,Go=new WeakMap,Yo=new WeakMap;var Pp=i=>new op(i),sp=Pp;
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var ap=i=>{throw TypeError(i)};var hp=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var up=(i,e,t)=>e.has(i)||ap("Cannot "+t);var o=(i,e,t)=>(up(i,e,"read from private field"),t?t.call(i):e.get(i)),u=(i,e,t)=>e.has(i)?ap("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),a=(i,e,t,r)=>(up(i,e,"write to private field"),e.set(i,t),t);var fp=(i,...e)=>{},cp=i=>fp;try{let i=hp("debug");i&&typeof i=="function"&&(cp=i);}catch{}var vp="clsdk",kp=i=>cp(`${vp}:${i}`),T=kp;var Xo=T("fetch"),$t,Ft,Bt,qt,$o=class $o extends Error{constructor(t,r,s,l){super(r);u(this,$t);u(this,Ft);u(this,Bt);u(this,qt);a(this,Ft,t),a(this,Bt,r),s&&a(this,$t,s.errors),l&&a(this,qt,l);}get errors(){return o(this,$t)}get status(){return o(this,Ft)}get statusText(){return o(this,Bt)}get request(){return o(this,qt)}};$t=new WeakMap,Ft=new WeakMap,Bt=new WeakMap,qt=new WeakMap,$o.isFetchError=t=>t instanceof $o;var Vt=$o,No=async(i,e,t)=>{Xo("fetch: %s, %O, native[%s]",i,e||{},t?.fetch?"no":"yes");let r=t?.interceptors;r?.request?.onSuccess&&({url:i,options:e}=await r.request.onSuccess({url:i,options:e}));let l=await(t?.fetch||fetch)(i,e);l.ok?(r?.rawReader?.onSuccess&&await r.rawReader.onSuccess(l),r?.response?.onSuccess&&(l=await r.response.onSuccess(l))):r?.rawReader?.onFailure&&await r.rawReader.onFailure(l);let d=l.body&&l.status!==204?await l.json().then(y=>(Xo("response: %O",y),y)).catch(y=>{if(Xo("error: %s",y.message),l.ok)throw new _({message:"Error parsing API response body",type:"parse"})}):void 0;if(!l.ok){let y=new Vt(l.status,l.statusText,d,e);if(r?.response?.onFailure&&(y=await r.response.onFailure(y)),y)throw y}return d};var Dt=(y=>(y.CLIENT="client",y.REQUEST="request",y.RESPONSE="response",y.CANCEL="cancel",y.PARSE="parse",y.TIMEOUT="timeout",y.TOKEN_REFRESH="token-refresh",y))(Dt||{}),zt=class zt extends Error{static isSdkError(e){return e&&[zt.NAME,_e.NAME].includes(e.name)&&Object.values(Dt).includes(e.type)}constructor(e){super(e.message),this.name=zt.NAME,this.type=e.type||"client";}};zt.NAME="SdkError";var _=zt,jt=class jt extends _{constructor(t){super({...t,type:"response"});this.errors=[];this.name=jt.NAME;}static isApiError(t){return _.isSdkError(t)&&t.name===jt.NAME&&t.type==="response"}first(){return this.errors?.length>0?this.errors[0]:void 0}};jt.NAME="ApiError";var _e=jt,Sp=i=>i instanceof TypeError,Cp=i=>i instanceof DOMException&&i.name==="AbortError",Tp=i=>i instanceof DOMException&&i.name==="TimeoutError",pp=i=>{let e=["INVALID_TOKEN"];return _e.isApiError(i)&&i.status===401&&(e.includes(i.code||"")||i.errors&&i.errors.length>0&&e.includes(i.errors[0].code))},Zo=i=>{if(_.isSdkError(i)||_e.isApiError(i))throw i;let e=new _({message:i.message});if(Vt.isFetchError(i)){let t=new _e(e);t.type="response",t.status=i.status,t.statusText=i.statusText,t.code=String(t.status),t.errors=i.errors||[],!t.message&&t.statusText&&(t.message=t.statusText),e=t;}else Sp(i)?e.type="request":Cp(i)?e.type="cancel":Tp(i)?e.type="timeout":(e.type="client",e.source=i);throw e};var Lp={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:15e3,requiredAttributes:["organization","accessToken"]},jsonapi:{maxResourceIncluded:2}},M=Lp;var Ho=i=>{try{return JSON.parse(atob(i.split(".")[1]))}catch{return}},Fo=i=>{try{return Ho(i).exp*1e3-Date.now()<0}catch{return false}};var te=T("client"),Jo=(i,e)=>`https://${i.toLowerCase()}.${e||M.default.domain}/api`,At,G,P,Wt,tn=class tn{constructor(e){u(this,At);u(this,G);u(this,P);u(this,Wt);te("new client instance %O",e),a(this,At,Jo(e.organization??"",e.domain)),a(this,G,e.accessToken);let t={timeout:e.timeout||M.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,G)};e.userAgent&&(s["User-Agent"]=e.userAgent),t.headers=s,a(this,P,t),te("fetch config: %O",t),a(this,Wt,{});}static create(e){for(let t of M.client.requiredAttributes)if(!e||!e[t])throw new _({message:`Undefined '${t}' parameter`});return new tn(e)}get interceptors(){return o(this,Wt)}get requestHeaders(){return o(this,P).headers||(o(this,P).headers={}),o(this,P).headers}config(e){te("config %o",e);let t=o(this,P);return t.headers||(t.headers={}),e.timeout&&(t.timeout=e.timeout),e.userAgent&&this.userAgent(e.userAgent),e.fetch&&(o(this,P).fetch=e.fetch),e.refreshToken&&(o(this,P).refreshToken=e.refreshToken),e.organization&&a(this,At,Jo(e.organization,e.domain)),e.accessToken&&(a(this,G,e.accessToken),t.headers.Authorization="Bearer "+o(this,G)),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){te("request %s %s, %O, %O",e,t,r||{},s||{}),s?.userAgent&&te("User-Agent header ignored in request config");let l=s?.organization?Jo(s.organization,s.domain):o(this,At),d=new URL(`${l}/${t}`),y=r?JSON.stringify({data:r}):void 0,Gt={...this.requestHeaders,...this.customHeaders(s?.headers)},Uo=s?.accessToken||o(this,G);Uo&&(Gt.Authorization="Bearer "+Uo);let Yt={method:e,body:y,headers:Gt},np=s?.timeout||o(this,P).timeout;np&&(AbortSignal?.timeout?Yt.signal=AbortSignal.timeout(np):te("Timeout not set. Undefined function: %s","AbortSignal.timeout")),s?.params&&Object.entries(s?.params).forEach(([wt,Ut])=>{d.searchParams.append(wt,String(Ut));});let ip={interceptors:this.interceptors,fetch:s?.fetch||o(this,P).fetch};try{return await No(d,Yt,ip).catch(wt=>Zo(wt))}catch(wt){if(pp(wt)&&o(this,P).refreshToken&&Fo(o(this,G))){te("Access token has expired");let Ut=await o(this,P).refreshToken(o(this,G)).catch(Ko=>{te("Refresh token error: %s",Ko.message);let Vo=new _({message:"Error refreshing access token",type:"token-refresh"});throw Vo.source=Ko,Vo});if(Ut)return te("Access token refreshed"),this.config({accessToken:Ut}),Yt.headers&&(Yt.headers.Authorization=`Bearer ${Ut}`),await No(d,Yt,ip).catch(Vo=>Zo(Vo))}else throw wt}}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,G)}};At=new WeakMap,G=new WeakMap,P=new WeakMap,Wt=new WeakMap;var en=tn,lp=en;var Bo=i=>i?.type&&i.id&&Ot.includes(i.type),rn=i=>i&&typeof i.type<"u"&&i.type&&Ot.includes(i.type);var qo=T("jsonapi"),Tt=i=>{if(!i)return i;let e;i.links&&delete i.links;let t=i.data,r=i.included;return t?Array.isArray(t)?e=t.map(s=>Do(s,r)):e=Do(t,r):e=t,e},mp=(i,e=[])=>e.find(r=>i.id===r.id&&i.type===r.type)||i,Do=(i,e,t=[])=>{if(qo("denormalize resource: %O, %o",i,e||{}),!i)return i;let r={id:i.id,type:i.type,...i.attributes};return i.relationships&&Object.keys(i.relationships).forEach(s=>{let l=i.relationships[s].data;l?t.filter(d=>d.id===l.id&&d.type===l.type).length>=M.jsonapi.maxResourceIncluded?r[s]=l:Array.isArray(l)?r[s]=l.map(d=>Do(mp(d,e),e,[...t,d])):r[s]=Do(mp(l,e),e,[...t,l]):l===null&&(r[s]=null);}),qo("denormalized resource: %O",r),r},sn=i=>{qo("normalize resource: %O",i);let e={},t={};for(let s in i){if(["type","id"].includes(s))continue;let l=i[s];Array.isArray(l)&&l.length===1&&rn(l[0])&&l[0].id===null?t[s]={data:[]}:l&&rn(l)&&l.id===null?t[s]={data:null}:l&&(Bo(l)||Array.isArray(l)&&Bo(l[0]))?t[s]={data:l}:e[s]=l;}let r={type:i.type,attributes:e,relationships:t};return Bo(i)&&(r.id=i.id),qo("normalized resource: %O",r),r};var yp=T("query"),dp=["_any","_all","_in","_not_in_or_null"],xp=i=>dp.some(e=>i.endsWith(e)),Rp=["_jcont"],Ep=i=>Rp.some(e=>i.endsWith(e)),on=i=>i&&(i.filters||i.pageNumber||i.pageSize||i.sort),Lt=(i,e)=>{yp("generate query string params: %O, %O",i,e);let t={};return i&&(i.include&&(t.include=i.include.join(",")),i.fields&&(Array.isArray(i.fields)&&(i.fields={[e.type||e]:i.fields}),Object.entries(i.fields).forEach(([r,s])=>{t[`fields[${r}]`]=s.join(",");})),on(i)&&(i.sort&&(Array.isArray(i.sort)?t.sort=i.sort.join(","):t.sort=Object.entries(i.sort).map(([r,s])=>`${s==="desc"?"-":""}${r}`).join(",")),i.pageNumber&&(t["page[number]"]=String(i.pageNumber)),i.pageSize&&(t["page[size]"]=String(i.pageSize)),i.filters&&Object.entries(i.filters).forEach(([r,s])=>{let l;if(Array.isArray(s)){if(!xp(r))throw new _({message:`Incorrect filter [${r}]: Array value is supported only for the following filters: ${dp.join(", ")}`,type:"request"});l=s.join(",");}else if(typeof s=="object"){if(!Ep(r))throw new _({message:`Incorrect filter [${r}]: Object value is supported only for the following filters: ${Rp.join(", ")}`,type:"request"});l=JSON.stringify(s);}else l=String(s);t[`filter[q][${r}]`]=l;})),yp("query string params: %O",t)),t};var re=T("resource"),zo=class extends Array{constructor(e,t){super(...t||[]),this.meta=e;}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(e){return this.length&&e>=0?this[e]: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}};var k,an,nn=class{constructor(e){u(this,k);u(this,an,{});a(this,k,lp.create(e)),this.localConfig(e);}localConfig(e){}config(e){return re("config %o",e),this.localConfig(e),o(this,k).config(e),this}get client(){return o(this,k)}async singleton(e,t,r,s){re("singleton: %o, %O, %O",e,t||{},r||{});let l=Lt(t,e);r?.params&&Object.assign(l,r?.params);let d=await o(this,k).request("GET",`${s||e.type}`,void 0,{...r,params:l});return Tt(d)}async retrieve(e,t,r){re("retrieve: %o, %O, %O",e,t||{},r||{});let s=Lt(t,e);r?.params&&Object.assign(s,r?.params);let l=await o(this,k).request("GET",`${e.type}/${e.id}`,void 0,{...r,params:s});return Tt(l)}async list(e,t,r){re("list: %o, %O, %O",e,t||{},r||{});let s=Lt(t,e);r?.params&&Object.assign(s,r?.params),s["page[number]"]||(s["page[number]"]="1");let l=await o(this,k).request("GET",`${e.type}`,void 0,{...r,params:s}),d=Tt(l),y={pageCount:Number(l.meta?.page_count),recordCount:Number(l.meta?.record_count),currentPage:t?.pageNumber||M.default.pageNumber,recordsPerPage:t?.pageSize||M.default.pageSize};return new zo(y,d)}async create(e,t,r){re("create: %o, %O, %O",e,t||{},r||{});let s=Lt(t,e);r?.params&&Object.assign(s,r?.params);let l=sn(e),d=await o(this,k).request("POST",e.type,l,{...r,params:s});return Tt(d)}async update(e,t,r){re("update: %o, %O, %O",e,t||{},r||{});let s=Lt(t,e);r?.params&&Object.assign(s,r?.params);let l=sn(e),d=await o(this,k).request("PATCH",`${e.type}/${e.id}`,l,{...r,params:s});return Tt(d)}async delete(e,t){re("delete: %o, %O",e,t||{}),await o(this,k).request("DELETE",`${e.type}/${e.id}`,void 0,t);}async fetch(e,t,r,s){re("fetch: %o, %O, %O",t,r||{},s||{});let l=Lt(r,e);s?.params&&Object.assign(l,s?.params);let d=await o(this,k).request("GET",t,void 0,{...s,params:l}),y=Tt(d);if(Array.isArray(y)){let Gt=r,Uo={pageCount:Number(d.meta?.page_count),recordCount:Number(d.meta?.record_count),currentPage:Gt?.pageNumber||M.default.pageNumber,recordsPerPage:Gt?.pageSize||M.default.pageSize};return new zo(Uo,y)}else return y}};k=new WeakMap,an=new WeakMap;var jo=class{constructor(e){re("new resource instance: %s",this.type()),this.resources=e;}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)}},n=class extends jo{async retrieve(e,t,r){let s=typeof e=="string"?{type:this.type(),id:e}:e;if(!s.id)throw new _({message:"Resource id cannot be blank"});return this.resources.retrieve(s,t,r)}async list(e,t){return this.resources.list({type:this.type()},e,t)}async count(e,t){let r={filters:on(e)?e.filters:e,pageNumber:1,pageSize:1},s=await this.list(r,t);return Promise.resolve(s.meta.recordCount)}},Qt=class extends jo{async retrieve(e,t){return this.resources.singleton({type:this.type()},e,t,this.path())}},gp=nn;var B=class B extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`addresses/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:B.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:B.TYPE,_remove_tags:t},r,s)}isAddress(e){return e.type&&e.type===B.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return B.TYPE}};B.TYPE="addresses";var un=B,cn=un;var Pe=class Pe extends n{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 versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`adjustments/${s}/versions`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`adjustments/${s}/event_stores`,t,r)}isAdjustment(e){return e.type&&e.type===Pe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Pe.TYPE}};Pe.TYPE="adjustments";var pn=Pe,ln=pn;var he=class he extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`adyen_gateways/${s}/event_stores`,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===he.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return he.TYPE}};he.TYPE="adyen_gateways";var mn=he,yn=mn;var Y=class Y extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`adyen_payments/${s}/event_stores`,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 _details(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Y.TYPE,_details:true},t,r)}async _balance(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Y.TYPE,_balance:true},t,r)}isAdyenPayment(e){return e.type&&e.type===Y.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Y.TYPE}};Y.TYPE="adyen_payments";var dn=Y,Rn=dn;var Kt=class Kt extends Qt{isApplication(e){return e.type&&e.type===Kt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Kt.TYPE}path(){return "application"}};Kt.TYPE="applications";var gn=Kt,_n=gn;var fe=class fe extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`attachments/${s}/event_stores`,t,r)}isAttachment(e){return e.type&&e.type===fe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return fe.TYPE}};fe.TYPE="attachments";var Pn=fe,hn=Pn;var U=class U extends n{async update(e,t,r){return this.resources.update({...e,type:U.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`authorizations/${s}/event_stores`,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:U.TYPE,_forward:true},t,r)}async _capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:U.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:U.TYPE,_capture_amount_cents:t},r,s)}async _void(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:U.TYPE,_void:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:U.TYPE,_cancel:true},t,r)}isAuthorization(e){return e.type&&e.type===U.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return U.TYPE}};U.TYPE="authorizations";var fn=U,vn=fn;var ve=class ve extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`avalara_accounts/${s}/event_stores`,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===ve.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ve.TYPE}};ve.TYPE="avalara_accounts";var kn=ve,Sn=kn;var ke=class ke extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`axerve_gateways/${s}/event_stores`,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===ke.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ke.TYPE}};ke.TYPE="axerve_gateways";var Cn=ke,Tn=Cn;var se=class se extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`axerve_payments/${s}/event_stores`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:se.TYPE,_update:true},t,r)}isAxervePayment(e){return e.type&&e.type===se.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return se.TYPE}};se.TYPE="axerve_payments";var Ln=se,xn=Ln;var Se=class Se extends n{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"},`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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`bing_geocoders/${s}/event_stores`,t,r)}isBingGeocoder(e){return e.type&&e.type===Se.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Se.TYPE}};Se.TYPE="bing_geocoders";var En=Se,bn=En;var Ce=class Ce extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`braintree_gateways/${s}/event_stores`,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===Ce.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ce.TYPE}};Ce.TYPE="braintree_gateways";var wn=Ce,An=wn;var Te=class Te extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`braintree_payments/${s}/event_stores`,t,r)}isBraintreePayment(e){return e.type&&e.type===Te.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Te.TYPE}};Te.TYPE="braintree_payments";var On=Te,Qn=On;var L=class L extends n{async create(e,t,r){return this.resources.create({...e,type:L.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:L.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:L.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`bundles/${s}/event_stores`,t,r)}async _compute_price_amount(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.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:L.TYPE,_compute_compare_at_amount:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:L.TYPE,_remove_tags:t},r,s)}isBundle(e){return e.type&&e.type===L.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return L.TYPE}};L.TYPE="bundles";var In=L,Mn=In;var x=class x extends n{async create(e,t,r){return this.resources.create({...e,type:x.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:x.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:x.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`buy_x_pay_y_promotions/${s}/event_stores`,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:x.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:x.TYPE,_enable:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:x.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:x.TYPE,_remove_tags:t},r,s)}isBuyXPayYPromotion(e){return e.type&&e.type===x.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return x.TYPE}};x.TYPE="buy_x_pay_y_promotions";var Gn=x,Yn=Gn;var q=class q extends n{async update(e,t,r){return this.resources.update({...e,type:q.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`captures/${s}/event_stores`,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:q.TYPE,_forward:true},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:q.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:q.TYPE,_refund_amount_cents:t},r,s)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:q.TYPE,_cancel:true},t,r)}isCapture(e){return e.type&&e.type===q.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return q.TYPE}};q.TYPE="captures";var Un=q,Vn=Un;var Le=class Le extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`carrier_accounts/${s}/event_stores`,t,r)}isCarrierAccount(e){return e.type&&e.type===Le.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Le.TYPE}};Le.TYPE="carrier_accounts";var $n=Le,Fn=$n;var xe=class xe extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`checkout_com_gateways/${s}/event_stores`,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===xe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return xe.TYPE}};xe.TYPE="checkout_com_gateways";var Bn=xe,qn=Bn;var D=class D extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`checkout_com_payments/${s}/event_stores`,t,r)}async _details(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:D.TYPE,_details:true},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:D.TYPE,_refresh:true},t,r)}isCheckoutComPayment(e){return e.type&&e.type===D.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return D.TYPE}};D.TYPE="checkout_com_payments";var Dn=D,zn=Dn;var oe=class oe extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`cleanups/${s}/event_stores`,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)}isCleanup(e){return e.type&&e.type===oe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return oe.TYPE}};oe.TYPE="cleanups";var jn=oe,Wn=jn;var Ee=class Ee extends n{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 versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`coupon_codes_promotion_rules/${s}/versions`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`coupon_codes_promotion_rules/${s}/event_stores`,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===Ee.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ee.TYPE}};Ee.TYPE="coupon_codes_promotion_rules";var Kn=Ee,Xn=Kn;var be=class be extends n{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"},`coupon_recipients/${s}/customer`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`coupon_recipients/${s}/event_stores`,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===be.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return be.TYPE}};be.TYPE="coupon_recipients";var Nn=be,Zn=Nn;var z=class z extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`coupons/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:z.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:z.TYPE,_remove_tags:t},r,s)}isCoupon(e){return e.type&&e.type===z.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return z.TYPE}};z.TYPE="coupons";var Hn=z,Jn=Hn;var we=class we extends n{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"},`custom_promotion_rules/${s}/versions`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`custom_promotion_rules/${s}/event_stores`,t,r)}isCustomPromotionRule(e){return e.type&&e.type===we.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return we.TYPE}};we.TYPE="custom_promotion_rules";var ei=we,ti=ei;var Ae=class Ae extends n{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_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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customer_addresses/${s}/event_stores`,t,r)}isCustomerAddress(e){return e.type&&e.type===Ae.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ae.TYPE}};Ae.TYPE="customer_addresses";var ri=Ae,si=ri;var Oe=class Oe extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customer_groups/${s}/event_stores`,t,r)}isCustomerGroup(e){return e.type&&e.type===Oe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Oe.TYPE}};Oe.TYPE="customer_groups";var oi=Oe,ni=oi;var ne=class ne extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customer_password_resets/${s}/event_stores`,t,r)}async _reset_password_token(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:ne.TYPE,_reset_password_token:t},r,s)}isCustomerPasswordReset(e){return e.type&&e.type===ne.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ne.TYPE}};ne.TYPE="customer_password_resets";var ii=ne,ai=ii;var Qe=class Qe extends n{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"},`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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customer_payment_sources/${s}/event_stores`,t,r)}isCustomerPaymentSource(e){return e.type&&e.type===Qe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Qe.TYPE}};Qe.TYPE="customer_payment_sources";var ui=Qe,ci=ui;var Ie=class Ie extends n{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(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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customer_subscriptions/${s}/event_stores`,t,r)}isCustomerSubscription(e){return e.type&&e.type===Ie.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ie.TYPE}};Ie.TYPE="customer_subscriptions";var pi=Ie,li=pi;var E=class E extends n{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 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)}async jwt_customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`customers/${s}/jwt_customer`,t,r)}async jwt_markets(e,t,r){let s=e.id||e;return this.resources.fetch({type:"markets"},`customers/${s}/jwt_markets`,t,r)}async jwt_stock_locations(e,t,r){let s=e.id||e;return this.resources.fetch({type:"stock_locations"},`customers/${s}/jwt_stock_locations`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`customers/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_remove_tags:t},r,s)}async _request_anonymization(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_request_anonymization:true},t,r)}async _cancel_anonymization(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:E.TYPE,_cancel_anonymization:true},t,r)}isCustomer(e){return e.type&&e.type===E.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return E.TYPE}};E.TYPE="customers";var mi=E,yi=mi;var Me=class Me extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`delivery_lead_times/${s}/event_stores`,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}};Me.TYPE="delivery_lead_times";var di=Me,Ri=di;var Xt=class Xt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`discount_engine_items/${s}/event_stores`,t,r)}isDiscountEngineItem(e){return e.type&&e.type===Xt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Xt.TYPE}};Xt.TYPE="discount_engine_items";var gi=Xt,_i=gi;var Nt=class Nt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`discount_engines/${s}/event_stores`,t,r)}isDiscountEngine(e){return e.type&&e.type===Nt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Nt.TYPE}};Nt.TYPE="discount_engines";var Pi=Nt,hi=Pi;var ie=class ie extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`easypost_pickups/${s}/event_stores`,t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ie.TYPE,_purchase:true},t,r)}isEasypostPickup(e){return e.type&&e.type===ie.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ie.TYPE}};ie.TYPE="easypost_pickups";var fi=ie,vi=fi;var Zt=class Zt extends n{async webhook(e,t,r){let s=e.id||e;return this.resources.fetch({type:"webhooks"},`event_callbacks/${s}/webhook`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`event_callbacks/${s}/event_stores`,t,r)}isEventCallback(e){return e.type&&e.type===Zt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Zt.TYPE}};Zt.TYPE="event_callbacks";var ki=Zt,Si=ki;var Ht=class Ht extends n{isEventStore(e){return e.type&&e.type===Ht.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ht.TYPE}};Ht.TYPE="event_stores";var Ci=Ht,Ti=Ci;var xt=class xt extends n{async update(e,t,r){return this.resources.update({...e,type:xt.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`events/${s}/event_stores`,t,r)}async _trigger(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:xt.TYPE,_trigger:true},t,r)}isEvent(e){return e.type&&e.type===xt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return xt.TYPE}};xt.TYPE="events";var Li=xt,xi=Li;var ae=class ae extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`exports/${s}/event_stores`,t,r)}async _interrupt(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ae.TYPE,_interrupt:true},t,r)}isExport(e){return e.type&&e.type===ae.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ae.TYPE}};ae.TYPE="exports";var Ei=ae,bi=Ei;var ue=class ue extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`external_gateways/${s}/event_stores`,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:ue.TYPE,_reset_circuit:true},t,r)}isExternalGateway(e){return e.type&&e.type===ue.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ue.TYPE}};ue.TYPE="external_gateways";var wi=ue,Ai=wi;var Ge=class Ge extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`external_payments/${s}/event_stores`,t,r)}isExternalPayment(e){return e.type&&e.type===Ge.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ge.TYPE}};Ge.TYPE="external_payments";var Oi=Ge,Qi=Oi;var S=class S extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`external_promotions/${s}/event_stores`,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:S.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_enable:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_remove_tags:t},r,s)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:S.TYPE,_reset_circuit:true},t,r)}isExternalPromotion(e){return e.type&&e.type===S.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return S.TYPE}};S.TYPE="external_promotions";var Ii=S,Mi=Ii;var ce=class ce extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`external_tax_calculators/${s}/event_stores`,t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ce.TYPE,_reset_circuit:true},t,r)}isExternalTaxCalculator(e){return e.type&&e.type===ce.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ce.TYPE}};ce.TYPE="external_tax_calculators";var Gi=ce,Yi=Gi;var b=class b extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`fixed_amount_promotions/${s}/event_stores`,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: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 _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:b.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:b.TYPE,_remove_tags:t},r,s)}isFixedAmountPromotion(e){return e.type&&e.type===b.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return b.TYPE}};b.TYPE="fixed_amount_promotions";var Ui=b,Vi=Ui;var w=class w extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`fixed_price_promotions/${s}/event_stores`,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: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)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:w.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:w.TYPE,_remove_tags:t},r,s)}isFixedPricePromotion(e){return e.type&&e.type===w.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return w.TYPE}};w.TYPE="fixed_price_promotions";var $i=w,Fi=$i;var A=class A extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`flex_promotions/${s}/event_stores`,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 _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:A.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:A.TYPE,_remove_tags:t},r,s)}isFlexPromotion(e){return e.type&&e.type===A.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return A.TYPE}};A.TYPE="flex_promotions";var Bi=A,qi=Bi;var O=class O extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`free_gift_promotions/${s}/event_stores`,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: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 _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:O.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:O.TYPE,_remove_tags:t},r,s)}isFreeGiftPromotion(e){return e.type&&e.type===O.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return O.TYPE}};O.TYPE="free_gift_promotions";var Di=O,zi=Di;var Q=class Q extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`free_shipping_promotions/${s}/event_stores`,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)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Q.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Q.TYPE,_remove_tags:t},r,s)}isFreeShippingPromotion(e){return e.type&&e.type===Q.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Q.TYPE}};Q.TYPE="free_shipping_promotions";var ji=Q,Wi=ji;var Jt=class Jt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`geocoders/${s}/event_stores`,t,r)}isGeocoder(e){return e.type&&e.type===Jt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Jt.TYPE}};Jt.TYPE="geocoders";var Ki=Jt,Xi=Ki;var Ye=class Ye extends n{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 customer(e,t,r){let s=e.id||e;return this.resources.fetch({type:"customers"},`gift_card_recipients/${s}/customer`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`gift_card_recipients/${s}/event_stores`,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===Ye.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ye.TYPE}};Ye.TYPE="gift_card_recipients";var Ni=Ye,Zi=Ni;var h=class h extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`gift_cards/${s}/event_stores`,t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:h.TYPE,_purchase:true},t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:h.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:h.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:h.TYPE,_balance_change_cents:t},r,s)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:h.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:h.TYPE,_remove_tags:t},r,s)}isGiftCard(e){return e.type&&e.type===h.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return h.TYPE}};h.TYPE="gift_cards";var Hi=h,Ji=Hi;var Ue=class Ue extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`google_geocoders/${s}/event_stores`,t,r)}isGoogleGeocoder(e){return e.type&&e.type===Ue.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ue.TYPE}};Ue.TYPE="google_geocoders";var ea=Ue,ta=ea;var pe=class pe extends n{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 events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`imports/${s}/events`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`imports/${s}/event_stores`,t,r)}async _interrupt(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:pe.TYPE,_interrupt:true},t,r)}isImport(e){return e.type&&e.type===pe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return pe.TYPE}};pe.TYPE="imports";var ra=pe,sa=ra;var j=class j extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`in_stock_subscriptions/${s}/event_stores`,t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:j.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:j.TYPE,_deactivate:true},t,r)}isInStockSubscription(e){return e.type&&e.type===j.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return j.TYPE}};j.TYPE="in_stock_subscriptions";var oa=j,na=oa;var Ve=class Ve extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`inventory_models/${s}/event_stores`,t,r)}isInventoryModel(e){return e.type&&e.type===Ve.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ve.TYPE}};Ve.TYPE="inventory_models";var ia=Ve,aa=ia;var $e=class $e extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`inventory_return_locations/${s}/event_stores`,t,r)}isInventoryReturnLocation(e){return e.type&&e.type===$e.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return $e.TYPE}};$e.TYPE="inventory_return_locations";var ua=$e,ca=ua;var Fe=class Fe extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`inventory_stock_locations/${s}/event_stores`,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}};Fe.TYPE="inventory_stock_locations";var pa=Fe,la=pa;var Be=class Be extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`klarna_gateways/${s}/event_stores`,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===Be.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Be.TYPE}};Be.TYPE="klarna_gateways";var ma=Be,ya=ma;var le=class le extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`klarna_payments/${s}/event_stores`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:le.TYPE,_update:true},t,r)}isKlarnaPayment(e){return e.type&&e.type===le.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return le.TYPE}};le.TYPE="klarna_payments";var da=le,Ra=da;var W=class W extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`line_item_options/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:W.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:W.TYPE,_remove_tags:t},r,s)}isLineItemOption(e){return e.type&&e.type===W.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return W.TYPE}};W.TYPE="line_item_options";var ga=W,_a=ga;var C=class C extends n{async create(e,t,r){return this.resources.create({...e,type:C.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:C.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:C.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`line_items/${s}/event_stores`,t,r)}async _external_price(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:C.TYPE,_external_price:true},t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:C.TYPE,_reserve_stock:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:C.TYPE,_reset_circuit:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:C.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:C.TYPE,_remove_tags:t},r,s)}isLineItem(e){return e.type&&e.type===C.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return C.TYPE}};C.TYPE="line_items";var Pa=C,ha=Pa;var K=class K extends n{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 events(e,t,r){let s=e.id||e;return this.resources.fetch({type:"events"},`links/${s}/events`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`links/${s}/event_stores`,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)}isLink(e){return e.type&&e.type===K.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return K.TYPE}};K.TYPE="links";var fa=K,va=fa;var qe=class qe extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`manual_gateways/${s}/event_stores`,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}};qe.TYPE="manual_gateways";var ka=qe,Sa=ka;var De=class De extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`manual_tax_calculators/${s}/event_stores`,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}};De.TYPE="manual_tax_calculators";var Ca=De,Ta=Ca;var X=class X extends n{async create(e,t,r){return this.resources.create({...e,type:X.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:X.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:X.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 discount_engine(e,t,r){let s=e.id||e;return this.resources.fetch({type:"discount_engines"},`markets/${s}/discount_engine`,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 default_shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`markets/${s}/default_shipping_method`,t,r)}async default_payment_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`markets/${s}/default_payment_method`,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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`markets/${s}/event_stores`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:X.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:X.TYPE,_enable:true},t,r)}isMarket(e){return e.type&&e.type===X.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return X.TYPE}};X.TYPE="markets";var La=X,xa=La;var ze=class ze extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`merchants/${s}/event_stores`,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}};ze.TYPE="merchants";var Ea=ze,ba=Ea;var je=class je extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`notifications/${s}/event_stores`,t,r)}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}};je.TYPE="notifications";var wa=je,Aa=wa;var We=class We extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`order_amount_promotion_rules/${s}/event_stores`,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}};We.TYPE="order_amount_promotion_rules";var Oa=We,Qa=Oa;var Ke=class Ke extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`order_copies/${s}/event_stores`,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}};Ke.TYPE="order_copies";var Ia=Ke,Ma=Ia;var er=class er extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`order_factories/${s}/event_stores`,t,r)}isOrderFactory(e){return e.type&&e.type===er.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return er.TYPE}};er.TYPE="order_factories";var Ga=er,Ya=Ga;var Xe=class Xe extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`order_subscription_items/${s}/event_stores`,t,r)}isOrderSubscriptionItem(e){return e.type&&e.type===Xe.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Xe.TYPE}};Xe.TYPE="order_subscription_items";var Ua=Xe,Va=Ua;var f=class f extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`order_subscriptions/${s}/event_stores`,t,r)}async _activate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_activate:true},t,r)}async _deactivate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_deactivate: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)}async _convert(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_convert:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:f.TYPE,_remove_tags:t},r,s)}isOrderSubscription(e){return e.type&&e.type===f.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return f.TYPE}};f.TYPE="order_subscriptions";var $a=f,Fa=$a;var m=class m extends n{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"},`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 default_shipping_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"shipping_methods"},`orders/${s}/default_shipping_method`,t,r)}async default_payment_method(e,t,r){let s=e.id||e;return this.resources.fetch({type:"payment_methods"},`orders/${s}/default_payment_method`,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 discount_engine_item(e,t,r){let s=e.id||e;return this.resources.fetch({type:"discount_engine_items"},`orders/${s}/discount_engine_item`,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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`orders/${s}/event_stores`,t,r)}async _archive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_archive:true},t,r)}async _unarchive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_unarchive:true},t,r)}async _pending(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_pending:true},t,r)}async _place(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_place:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_cancel:true},t,r)}async _approve(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_approve:true},t,r)}async _approve_and_capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_approve_and_capture:true},t,r)}async _authorize(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.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:m.TYPE,_authorization_amount_cents:t},r,s)}async _capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_capture:true},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_refund:true},t,r)}async _fulfill(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_fulfill:true},t,r)}async _update_taxes(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.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:m.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:m.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:m.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:m.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:m.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:m.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:m.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:m.TYPE,_commit_invoice:true},t,r)}async _refund_invoice(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.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:m.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:m.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:m.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:m.TYPE,_refresh:true},t,r)}async _validate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_validate:true},t,r)}async _create_subscriptions(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_create_subscriptions:true},t,r)}async _start_editing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_start_editing:true},t,r)}async _stop_editing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_stop_editing:true},t,r)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_reset_circuit:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:m.TYPE,_remove_tags:t},r,s)}isOrder(e){return e.type&&e.type===m.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return m.TYPE}};m.TYPE="orders";var Ba=m,qa=Ba;var tr=class tr extends Qt{async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`organization/${s}/event_stores`,t,r)}isOrganization(e){return e.type&&e.type===tr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return tr.TYPE}path(){return "organization"}};tr.TYPE="organizations";var Da=tr,za=Da;var Ne=class Ne extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`packages/${s}/event_stores`,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}};Ne.TYPE="packages";var ja=Ne,Wa=ja;var Ze=class Ze extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`parcel_line_items/${s}/event_stores`,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}};Ze.TYPE="parcel_line_items";var Ka=Ze,Xa=Ka;var He=class He extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`parcels/${s}/event_stores`,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}};He.TYPE="parcels";var Na=He,Za=Na;var rr=class rr extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`payment_gateways/${s}/event_stores`,t,r)}isPaymentGateway(e){return e.type&&e.type===rr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return rr.TYPE}};rr.TYPE="payment_gateways";var Ha=rr,Ja=Ha;var N=class N extends n{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 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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`payment_methods/${s}/event_stores`,t,r)}async _disable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:N.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:N.TYPE,_enable:true},t,r)}isPaymentMethod(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.TYPE="payment_methods";var eu=N,tu=eu;var Je=class Je extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`payment_options/${s}/event_stores`,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}};Je.TYPE="payment_options";var ru=Je,su=ru;var et=class et extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`paypal_gateways/${s}/event_stores`,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}};et.TYPE="paypal_gateways";var ou=et,nu=ou;var tt=class tt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`paypal_payments/${s}/event_stores`,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}};tt.TYPE="paypal_payments";var iu=tt,au=iu;var I=class I extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`percentage_discount_promotions/${s}/event_stores`,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:I.TYPE,_disable:true},t,r)}async _enable(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_enable:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:I.TYPE,_remove_tags:t},r,s)}isPercentageDiscountPromotion(e){return e.type&&e.type===I.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return I.TYPE}};I.TYPE="percentage_discount_promotions";var uu=I,cu=uu;var sr=class sr extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`pickups/${s}/event_stores`,t,r)}isPickup(e){return e.type&&e.type===sr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return sr.TYPE}};sr.TYPE="pickups";var pu=sr,lu=pu;var rt=class rt extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`price_frequency_tiers/${s}/event_stores`,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}};rt.TYPE="price_frequency_tiers";var mu=rt,yu=mu;var Z=class Z extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`price_list_schedulers/${s}/event_stores`,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)}isPriceListScheduler(e){return e.type&&e.type===Z.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Z.TYPE}};Z.TYPE="price_list_schedulers";var du=Z,Ru=du;var st=class st extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`price_lists/${s}/event_stores`,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}};st.TYPE="price_lists";var gu=st,_u=gu;var or=class or extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`price_tiers/${s}/event_stores`,t,r)}isPriceTier(e){return e.type&&e.type===or.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return or.TYPE}};or.TYPE="price_tiers";var Pu=or,hu=Pu;var ot=class ot extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`price_volume_tiers/${s}/event_stores`,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}};ot.TYPE="price_volume_tiers";var fu=ot,vu=fu;var nt=class nt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`prices/${s}/event_stores`,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}};nt.TYPE="prices";var ku=nt,Su=ku;var nr=class nr extends n{async versions(e,t,r){let s=e.id||e;return this.resources.fetch({type:"versions"},`promotion_rules/${s}/versions`,t,r)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`promotion_rules/${s}/event_stores`,t,r)}isPromotionRule(e){return e.type&&e.type===nr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return nr.TYPE}};nr.TYPE="promotion_rules";var Cu=nr,Tu=Cu;var ir=class ir extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`promotions/${s}/event_stores`,t,r)}isPromotion(e){return e.type&&e.type===ir.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ir.TYPE}};ir.TYPE="promotions";var Lu=ir,xu=Lu;var it=class it extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`recurring_order_copies/${s}/event_stores`,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}};it.TYPE="recurring_order_copies";var Eu=it,bu=Eu;var Et=class Et extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`refunds/${s}/event_stores`,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}};Et.TYPE="refunds";var wu=Et,Au=wu;var ar=class ar extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`reserved_stocks/${s}/event_stores`,t,r)}isReservedStock(e){return e.type&&e.type===ar.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ar.TYPE}};ar.TYPE="reserved_stocks";var Ou=ar,Qu=Ou;var ur=class ur extends n{async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`resource_errors/${s}/event_stores`,t,r)}isResourceError(e){return e.type&&e.type===ur.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ur.TYPE}};ur.TYPE="resource_errors";var Iu=ur,Mu=Iu;var me=class me extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`return_line_items/${s}/event_stores`,t,r)}async _restock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:me.TYPE,_restock:true},t,r)}isReturnLineItem(e){return e.type&&e.type===me.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return me.TYPE}};me.TYPE="return_line_items";var Gu=me,Yu=Gu;var g=class g extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`returns/${s}/event_stores`,t,r)}async _request(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_request:true},t,r)}async _approve(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_approve: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 _ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_ship:true},t,r)}async _reject(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_reject:true},t,r)}async _receive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_receive:true},t,r)}async _restock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_restock:true},t,r)}async _archive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_archive:true},t,r)}async _unarchive(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_unarchive: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 _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:g.TYPE,_remove_tags:t},r,s)}isReturn(e){return e.type&&e.type===g.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return g.TYPE}};g.TYPE="returns";var Uu=g,Vu=Uu;var at=class at extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`satispay_gateways/${s}/event_stores`,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}};at.TYPE="satispay_gateways";var $u=at,Fu=$u;var ye=class ye extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`satispay_payments/${s}/event_stores`,t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ye.TYPE,_refresh:true},t,r)}isSatispayPayment(e){return e.type&&e.type===ye.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ye.TYPE}};ye.TYPE="satispay_payments";var Bu=ye,qu=Bu;var R=class R extends n{async create(e,t,r){return this.resources.create({...e,type:R.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:R.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:R.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipments/${s}/event_stores`,t,r)}async _upcoming(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_upcoming:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_cancel:true},t,r)}async _on_hold(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_on_hold:true},t,r)}async _picking(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_picking:true},t,r)}async _packing(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_packing:true},t,r)}async _ready_to_ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_ready_to_ship:true},t,r)}async _ship(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_ship:true},t,r)}async _deliver(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_deliver:true},t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_reserve_stock:true},t,r)}async _release_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_release_stock:true},t,r)}async _decrement_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_decrement_stock:true},t,r)}async _get_rates(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_get_rates:true},t,r)}async _purchase(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_purchase:true},t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:R.TYPE,_remove_tags:t},r,s)}isShipment(e){return e.type&&e.type===R.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return R.TYPE}};R.TYPE="shipments";var Du=R,zu=Du;var ut=class ut extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipping_categories/${s}/event_stores`,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}};ut.TYPE="shipping_categories";var ju=ut,Wu=ju;var cr=class cr extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipping_method_tiers/${s}/event_stores`,t,r)}isShippingMethodTier(e){return e.type&&e.type===cr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return cr.TYPE}};cr.TYPE="shipping_method_tiers";var Ku=cr,Xu=Ku;var V=class V extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipping_methods/${s}/event_stores`,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)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:V.TYPE,_reset_circuit:true},t,r)}isShippingMethod(e){return e.type&&e.type===V.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return V.TYPE}};V.TYPE="shipping_methods";var Nu=V,Zu=Nu;var ct=class ct extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipping_weight_tiers/${s}/event_stores`,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}};ct.TYPE="shipping_weight_tiers";var Hu=ct,Ju=Hu;var pt=class pt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`shipping_zones/${s}/event_stores`,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}};pt.TYPE="shipping_zones";var ec=pt,tc=ec;var lt=class lt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`sku_list_items/${s}/event_stores`,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}};lt.TYPE="sku_list_items";var rc=lt,sc=rc;var mt=class mt extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`sku_list_promotion_rules/${s}/event_stores`,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}};mt.TYPE="sku_list_promotion_rules";var oc=mt,nc=oc;var yt=class yt extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`sku_lists/${s}/event_stores`,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}};yt.TYPE="sku_lists";var ic=yt,ac=ic;var H=class H extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`sku_options/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:H.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:H.TYPE,_remove_tags:t},r,s)}isSkuOption(e){return e.type&&e.type===H.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return H.TYPE}};H.TYPE="sku_options";var uc=H,cc=uc;var J=class J extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`skus/${s}/event_stores`,t,r)}async _add_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:J.TYPE,_add_tags:t},r,s)}async _remove_tags(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:J.TYPE,_remove_tags:t},r,s)}isSku(e){return e.type&&e.type===J.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return J.TYPE}};J.TYPE="skus";var pc=J,lc=pc;var de=class de extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stock_items/${s}/event_stores`,t,r)}async _validate(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:de.TYPE,_validate:true},t,r)}isStockItem(e){return e.type&&e.type===de.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return de.TYPE}};de.TYPE="stock_items";var mc=de,yc=mc;var $=class $ extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stock_line_items/${s}/event_stores`,t,r)}async _reserve_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:$.TYPE,_reserve_stock:true},t,r)}async _release_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:$.TYPE,_release_stock:true},t,r)}async _decrement_stock(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:$.TYPE,_decrement_stock:true},t,r)}isStockLineItem(e){return e.type&&e.type===$.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return $.TYPE}};$.TYPE="stock_line_items";var dc=$,Rc=dc;var dt=class dt extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stock_locations/${s}/event_stores`,t,r)}isStockLocation(e){return e.type&&e.type===dt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return dt.TYPE}};dt.TYPE="stock_locations";var gc=dt,_c=gc;var Re=class Re extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stock_reservations/${s}/event_stores`,t,r)}async _pending(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Re.TYPE,_pending:true},t,r)}isStockReservation(e){return e.type&&e.type===Re.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Re.TYPE}};Re.TYPE="stock_reservations";var Pc=Re,hc=Pc;var v=class v extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stock_transfers/${s}/event_stores`,t,r)}async _upcoming(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_upcoming:true},t,r)}async _on_hold(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_on_hold:true},t,r)}async _picking(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_picking:true},t,r)}async _in_transit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_in_transit:true},t,r)}async _complete(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_complete:true},t,r)}async _cancel(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:v.TYPE,_cancel:true},t,r)}isStockTransfer(e){return e.type&&e.type===v.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return v.TYPE}};v.TYPE="stock_transfers";var fc=v,vc=fc;var Rt=class Rt extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stores/${s}/event_stores`,t,r)}isStore(e){return e.type&&e.type===Rt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Rt.TYPE}};Rt.TYPE="stores";var kc=Rt,Sc=kc;var gt=class gt extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stripe_gateways/${s}/event_stores`,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===gt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return gt.TYPE}};gt.TYPE="stripe_gateways";var Cc=gt,Tc=Cc;var ee=class ee extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stripe_payments/${s}/event_stores`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ee.TYPE,_update:true},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ee.TYPE,_refresh:true},t,r)}isStripePayment(e){return e.type&&e.type===ee.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ee.TYPE}};ee.TYPE="stripe_payments";var Lc=ee,xc=Lc;var _t=class _t extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`stripe_tax_accounts/${s}/event_stores`,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===_t.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return _t.TYPE}};_t.TYPE="stripe_tax_accounts";var Ec=_t,bc=Ec;var Pt=class Pt extends n{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"},`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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`subscription_models/${s}/event_stores`,t,r)}isSubscriptionModel(e){return e.type&&e.type===Pt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Pt.TYPE}};Pt.TYPE="subscription_models";var wc=Pt,Ac=wc;var ht=class ht extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`tags/${s}/event_stores`,t,r)}isTag(e){return e.type&&e.type===ht.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ht.TYPE}};ht.TYPE="tags";var Oc=ht,Qc=Oc;var ft=class ft extends n{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"},`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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`talon_one_accounts/${s}/event_stores`,t,r)}isTalonOneAccount(e){return e.type&&e.type===ft.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ft.TYPE}};ft.TYPE="talon_one_accounts";var Ic=ft,Mc=Ic;var pr=class pr extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`tax_calculators/${s}/event_stores`,t,r)}isTaxCalculator(e){return e.type&&e.type===pr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return pr.TYPE}};pr.TYPE="tax_calculators";var Gc=pr,Yc=Gc;var vt=class vt extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`tax_categories/${s}/event_stores`,t,r)}isTaxCategory(e){return e.type&&e.type===vt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return vt.TYPE}};vt.TYPE="tax_categories";var Uc=vt,Vc=Uc;var kt=class kt extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`tax_rules/${s}/event_stores`,t,r)}isTaxRule(e){return e.type&&e.type===kt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return kt.TYPE}};kt.TYPE="tax_rules";var $c=kt,Fc=$c;var St=class St extends n{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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`taxjar_accounts/${s}/event_stores`,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}};St.TYPE="taxjar_accounts";var Bc=St,qc=Bc;var lr=class lr extends n{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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`transactions/${s}/event_stores`,t,r)}isTransaction(e){return e.type&&e.type===lr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return lr.TYPE}};lr.TYPE="transactions";var Dc=lr,zc=Dc;var mr=class mr extends n{async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`versions/${s}/event_stores`,t,r)}isVersion(e){return e.type&&e.type===mr.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return mr.TYPE}};mr.TYPE="versions";var jc=mr,Wc=jc;var ge=class ge extends n{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"},`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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`vertex_accounts/${s}/event_stores`,t,r)}async _refresh_token(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:ge.TYPE,_refresh_token:true},t,r)}isVertexAccount(e){return e.type&&e.type===ge.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return ge.TYPE}};ge.TYPE="vertex_accounts";var Kc=ge,Xc=Kc;var bt=class bt extends n{async update(e,t,r){return this.resources.update({...e,type:bt.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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`voids/${s}/event_stores`,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:bt.TYPE,_forward:true},t,r)}isVoid(e){return e.type&&e.type===bt.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return bt.TYPE}};bt.TYPE="voids";var Nc=bt,Zc=Nc;var F=class F extends n{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 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 event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`webhooks/${s}/event_stores`,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)}async _reset_circuit(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:F.TYPE,_reset_circuit:true},t,r)}isWebhook(e){return e.type&&e.type===F.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return F.TYPE}};F.TYPE="webhooks";var Hc=F,Jc=Hc;var Ct=class Ct extends n{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 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)}async event_stores(e,t,r){let s=e.id||e;return this.resources.fetch({type:"event_stores"},`wire_transfers/${s}/event_stores`,t,r)}isWireTransfer(e){return e.type&&e.type===Ct.TYPE}relationship(e){return super.relationshipOneToOne(e)}relationshipToMany(...e){return super.relationshipOneToMany(...e)}type(){return Ct.TYPE}};Ct.TYPE="wire_transfers";var ep=Ct,tp=ep;var Ot=["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","event_stores","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"],Wo=["applications","organizations"];var It={resources:i=>i?[...Ot].sort():Ot,singletons:i=>i?[...Wo].sort():Wo,isSingleton:i=>Wo.includes(i),isSdkError:i=>_.isSdkError(i),isApiError:i=>_e.isApiError(i),init:i=>sp(i),isTokenExpired:i=>Fo(i),get schemaVersion(){return rp}};var _p=T("commercelayer"),rp="7.9.6";var p,Mt,yr,dr,Rr,gr,_r,Pr,hr,fr,vr,kr,Sr,Cr,Tr,Lr,xr,Er,br,wr,Ar,Or,Qr,Ir,Mr,Gr,Yr,Ur,Vr,$r,Fr,Br,qr,Dr,zr,jr,Wr,Kr,Xr,Nr,Zr,Hr,Jr,es,ts,rs,ss,os,ns,is,as,us,cs,ps,ls,ms,ys,ds,Rs,gs,_s,Ps,hs,fs,vs,ks,Ss,Cs,Ts,Ls,xs,Es,bs,ws,As,Os,Qs,Is,Ms,Gs,Ys,Us,Vs,$s,Fs,Bs,qs,Ds,zs,js,Ws,Ks,Xs,Ns,Zs,Hs,Js,eo,to,ro,so,oo,no,io,ao,uo,co,po,lo,mo,yo,Ro,go,_o,Po,ho,fo,vo,ko,So,Co,To,Lo,xo,Eo,bo,wo,Ao,Oo,Qo,Io,Mo,Go,Yo,op=class{constructor(e){this.openApiSchemaVersion=rp;u(this,p);u(this,Mt);u(this,yr);u(this,dr);u(this,Rr);u(this,gr);u(this,_r);u(this,Pr);u(this,hr);u(this,fr);u(this,vr);u(this,kr);u(this,Sr);u(this,Cr);u(this,Tr);u(this,Lr);u(this,xr);u(this,Er);u(this,br);u(this,wr);u(this,Ar);u(this,Or);u(this,Qr);u(this,Ir);u(this,Mr);u(this,Gr);u(this,Yr);u(this,Ur);u(this,Vr);u(this,$r);u(this,Fr);u(this,Br);u(this,qr);u(this,Dr);u(this,zr);u(this,jr);u(this,Wr);u(this,Kr);u(this,Xr);u(this,Nr);u(this,Zr);u(this,Hr);u(this,Jr);u(this,es);u(this,ts);u(this,rs);u(this,ss);u(this,os);u(this,ns);u(this,is);u(this,as);u(this,us);u(this,cs);u(this,ps);u(this,ls);u(this,ms);u(this,ys);u(this,ds);u(this,Rs);u(this,gs);u(this,_s);u(this,Ps);u(this,hs);u(this,fs);u(this,vs);u(this,ks);u(this,Ss);u(this,Cs);u(this,Ts);u(this,Ls);u(this,xs);u(this,Es);u(this,bs);u(this,ws);u(this,As);u(this,Os);u(this,Qs);u(this,Is);u(this,Ms);u(this,Gs);u(this,Ys);u(this,Us);u(this,Vs);u(this,$s);u(this,Fs);u(this,Bs);u(this,qs);u(this,Ds);u(this,zs);u(this,js);u(this,Ws);u(this,Ks);u(this,Xs);u(this,Ns);u(this,Zs);u(this,Hs);u(this,Js);u(this,eo);u(this,to);u(this,ro);u(this,so);u(this,oo);u(this,no);u(this,io);u(this,ao);u(this,uo);u(this,co);u(this,po);u(this,lo);u(this,mo);u(this,yo);u(this,Ro);u(this,go);u(this,_o);u(this,Po);u(this,ho);u(this,fo);u(this,vo);u(this,ko);u(this,So);u(this,Co);u(this,To);u(this,Lo);u(this,xo);u(this,Eo);u(this,bo);u(this,wo);u(this,Ao);u(this,Oo);u(this,Qo);u(this,Io);u(this,Mo);u(this,Go);u(this,Yo);if(_p("new commercelayer instance %O",e),(!e.organization||!e.domain)&&e.accessToken){let t=Ho(e.accessToken);!e.organization&&t?.organization?.slug&&(e.organization=t.organization.slug),!e.domain&&t?.iss&&(e.domain=String(t.iss).replace("https://auth.",""));}a(this,p,new gp(e)),a(this,Mt,e.organization??"");}get addresses(){return o(this,yr)||a(this,yr,new cn(o(this,p)))}get adjustments(){return o(this,dr)||a(this,dr,new ln(o(this,p)))}get adyen_gateways(){return o(this,Rr)||a(this,Rr,new yn(o(this,p)))}get adyen_payments(){return o(this,gr)||a(this,gr,new Rn(o(this,p)))}get application(){return o(this,_r)||a(this,_r,new _n(o(this,p)))}get attachments(){return o(this,Pr)||a(this,Pr,new hn(o(this,p)))}get authorizations(){return o(this,hr)||a(this,hr,new vn(o(this,p)))}get avalara_accounts(){return o(this,fr)||a(this,fr,new Sn(o(this,p)))}get axerve_gateways(){return o(this,vr)||a(this,vr,new Tn(o(this,p)))}get axerve_payments(){return o(this,kr)||a(this,kr,new xn(o(this,p)))}get bing_geocoders(){return o(this,Sr)||a(this,Sr,new bn(o(this,p)))}get braintree_gateways(){return o(this,Cr)||a(this,Cr,new An(o(this,p)))}get braintree_payments(){return o(this,Tr)||a(this,Tr,new Qn(o(this,p)))}get bundles(){return o(this,Lr)||a(this,Lr,new Mn(o(this,p)))}get buy_x_pay_y_promotions(){return o(this,xr)||a(this,xr,new Yn(o(this,p)))}get captures(){return o(this,Er)||a(this,Er,new Vn(o(this,p)))}get carrier_accounts(){return o(this,br)||a(this,br,new Fn(o(this,p)))}get checkout_com_gateways(){return o(this,wr)||a(this,wr,new qn(o(this,p)))}get checkout_com_payments(){return o(this,Ar)||a(this,Ar,new zn(o(this,p)))}get cleanups(){return o(this,Or)||a(this,Or,new Wn(o(this,p)))}get coupon_codes_promotion_rules(){return o(this,Qr)||a(this,Qr,new Xn(o(this,p)))}get coupon_recipients(){return o(this,Ir)||a(this,Ir,new Zn(o(this,p)))}get coupons(){return o(this,Mr)||a(this,Mr,new Jn(o(this,p)))}get custom_promotion_rules(){return o(this,Gr)||a(this,Gr,new ti(o(this,p)))}get customer_addresses(){return o(this,Yr)||a(this,Yr,new si(o(this,p)))}get customer_groups(){return o(this,Ur)||a(this,Ur,new ni(o(this,p)))}get customer_password_resets(){return o(this,Vr)||a(this,Vr,new ai(o(this,p)))}get customer_payment_sources(){return o(this,$r)||a(this,$r,new ci(o(this,p)))}get customer_subscriptions(){return o(this,Fr)||a(this,Fr,new li(o(this,p)))}get customers(){return o(this,Br)||a(this,Br,new yi(o(this,p)))}get delivery_lead_times(){return o(this,qr)||a(this,qr,new Ri(o(this,p)))}get discount_engine_items(){return o(this,Dr)||a(this,Dr,new _i(o(this,p)))}get discount_engines(){return o(this,zr)||a(this,zr,new hi(o(this,p)))}get easypost_pickups(){return o(this,jr)||a(this,jr,new vi(o(this,p)))}get event_callbacks(){return o(this,Wr)||a(this,Wr,new Si(o(this,p)))}get event_stores(){return o(this,Kr)||a(this,Kr,new Ti(o(this,p)))}get events(){return o(this,Xr)||a(this,Xr,new xi(o(this,p)))}get exports(){return o(this,Nr)||a(this,Nr,new bi(o(this,p)))}get external_gateways(){return o(this,Zr)||a(this,Zr,new Ai(o(this,p)))}get external_payments(){return o(this,Hr)||a(this,Hr,new Qi(o(this,p)))}get external_promotions(){return o(this,Jr)||a(this,Jr,new Mi(o(this,p)))}get external_tax_calculators(){return o(this,es)||a(this,es,new Yi(o(this,p)))}get fixed_amount_promotions(){return o(this,ts)||a(this,ts,new Vi(o(this,p)))}get fixed_price_promotions(){return o(this,rs)||a(this,rs,new Fi(o(this,p)))}get flex_promotions(){return o(this,ss)||a(this,ss,new qi(o(this,p)))}get free_gift_promotions(){return o(this,os)||a(this,os,new zi(o(this,p)))}get free_shipping_promotions(){return o(this,ns)||a(this,ns,new Wi(o(this,p)))}get geocoders(){return o(this,is)||a(this,is,new Xi(o(this,p)))}get gift_card_recipients(){return o(this,as)||a(this,as,new Zi(o(this,p)))}get gift_cards(){return o(this,us)||a(this,us,new Ji(o(this,p)))}get google_geocoders(){return o(this,cs)||a(this,cs,new ta(o(this,p)))}get imports(){return o(this,ps)||a(this,ps,new sa(o(this,p)))}get in_stock_subscriptions(){return o(this,ls)||a(this,ls,new na(o(this,p)))}get inventory_models(){return o(this,ms)||a(this,ms,new aa(o(this,p)))}get inventory_return_locations(){return o(this,ys)||a(this,ys,new ca(o(this,p)))}get inventory_stock_locations(){return o(this,ds)||a(this,ds,new la(o(this,p)))}get klarna_gateways(){return o(this,Rs)||a(this,Rs,new ya(o(this,p)))}get klarna_payments(){return o(this,gs)||a(this,gs,new Ra(o(this,p)))}get line_item_options(){return o(this,_s)||a(this,_s,new _a(o(this,p)))}get line_items(){return o(this,Ps)||a(this,Ps,new ha(o(this,p)))}get links(){return o(this,hs)||a(this,hs,new va(o(this,p)))}get manual_gateways(){return o(this,fs)||a(this,fs,new Sa(o(this,p)))}get manual_tax_calculators(){return o(this,vs)||a(this,vs,new Ta(o(this,p)))}get markets(){return o(this,ks)||a(this,ks,new xa(o(this,p)))}get merchants(){return o(this,Ss)||a(this,Ss,new ba(o(this,p)))}get notifications(){return o(this,Cs)||a(this,Cs,new Aa(o(this,p)))}get order_amount_promotion_rules(){return o(this,Ts)||a(this,Ts,new Qa(o(this,p)))}get order_copies(){return o(this,Ls)||a(this,Ls,new Ma(o(this,p)))}get order_factories(){return o(this,xs)||a(this,xs,new Ya(o(this,p)))}get order_subscription_items(){return o(this,Es)||a(this,Es,new Va(o(this,p)))}get order_subscriptions(){return o(this,bs)||a(this,bs,new Fa(o(this,p)))}get orders(){return o(this,ws)||a(this,ws,new qa(o(this,p)))}get organization(){return o(this,As)||a(this,As,new za(o(this,p)))}get packages(){return o(this,Os)||a(this,Os,new Wa(o(this,p)))}get parcel_line_items(){return o(this,Qs)||a(this,Qs,new Xa(o(this,p)))}get parcels(){return o(this,Is)||a(this,Is,new Za(o(this,p)))}get payment_gateways(){return o(this,Ms)||a(this,Ms,new Ja(o(this,p)))}get payment_methods(){return o(this,Gs)||a(this,Gs,new tu(o(this,p)))}get payment_options(){return o(this,Ys)||a(this,Ys,new su(o(this,p)))}get paypal_gateways(){return o(this,Us)||a(this,Us,new nu(o(this,p)))}get paypal_payments(){return o(this,Vs)||a(this,Vs,new au(o(this,p)))}get percentage_discount_promotions(){return o(this,$s)||a(this,$s,new cu(o(this,p)))}get pickups(){return o(this,Fs)||a(this,Fs,new lu(o(this,p)))}get price_frequency_tiers(){return o(this,Bs)||a(this,Bs,new yu(o(this,p)))}get price_list_schedulers(){return o(this,qs)||a(this,qs,new Ru(o(this,p)))}get price_lists(){return o(this,Ds)||a(this,Ds,new _u(o(this,p)))}get price_tiers(){return o(this,zs)||a(this,zs,new hu(o(this,p)))}get price_volume_tiers(){return o(this,js)||a(this,js,new vu(o(this,p)))}get prices(){return o(this,Ws)||a(this,Ws,new Su(o(this,p)))}get promotion_rules(){return o(this,Ks)||a(this,Ks,new Tu(o(this,p)))}get promotions(){return o(this,Xs)||a(this,Xs,new xu(o(this,p)))}get recurring_order_copies(){return o(this,Ns)||a(this,Ns,new bu(o(this,p)))}get refunds(){return o(this,Zs)||a(this,Zs,new Au(o(this,p)))}get reserved_stocks(){return o(this,Hs)||a(this,Hs,new Qu(o(this,p)))}get resource_errors(){return o(this,Js)||a(this,Js,new Mu(o(this,p)))}get return_line_items(){return o(this,eo)||a(this,eo,new Yu(o(this,p)))}get returns(){return o(this,to)||a(this,to,new Vu(o(this,p)))}get satispay_gateways(){return o(this,ro)||a(this,ro,new Fu(o(this,p)))}get satispay_payments(){return o(this,so)||a(this,so,new qu(o(this,p)))}get shipments(){return o(this,oo)||a(this,oo,new zu(o(this,p)))}get shipping_categories(){return o(this,no)||a(this,no,new Wu(o(this,p)))}get shipping_method_tiers(){return o(this,io)||a(this,io,new Xu(o(this,p)))}get shipping_methods(){return o(this,ao)||a(this,ao,new Zu(o(this,p)))}get shipping_weight_tiers(){return o(this,uo)||a(this,uo,new Ju(o(this,p)))}get shipping_zones(){return o(this,co)||a(this,co,new tc(o(this,p)))}get sku_list_items(){return o(this,po)||a(this,po,new sc(o(this,p)))}get sku_list_promotion_rules(){return o(this,lo)||a(this,lo,new nc(o(this,p)))}get sku_lists(){return o(this,mo)||a(this,mo,new ac(o(this,p)))}get sku_options(){return o(this,yo)||a(this,yo,new cc(o(this,p)))}get skus(){return o(this,Ro)||a(this,Ro,new lc(o(this,p)))}get stock_items(){return o(this,go)||a(this,go,new yc(o(this,p)))}get stock_line_items(){return o(this,_o)||a(this,_o,new Rc(o(this,p)))}get stock_locations(){return o(this,Po)||a(this,Po,new _c(o(this,p)))}get stock_reservations(){return o(this,ho)||a(this,ho,new hc(o(this,p)))}get stock_transfers(){return o(this,fo)||a(this,fo,new vc(o(this,p)))}get stores(){return o(this,vo)||a(this,vo,new Sc(o(this,p)))}get stripe_gateways(){return o(this,ko)||a(this,ko,new Tc(o(this,p)))}get stripe_payments(){return o(this,So)||a(this,So,new xc(o(this,p)))}get stripe_tax_accounts(){return o(this,Co)||a(this,Co,new bc(o(this,p)))}get subscription_models(){return o(this,To)||a(this,To,new Ac(o(this,p)))}get tags(){return o(this,Lo)||a(this,Lo,new Qc(o(this,p)))}get talon_one_accounts(){return o(this,xo)||a(this,xo,new Mc(o(this,p)))}get tax_calculators(){return o(this,Eo)||a(this,Eo,new Yc(o(this,p)))}get tax_categories(){return o(this,bo)||a(this,bo,new Vc(o(this,p)))}get tax_rules(){return o(this,wo)||a(this,wo,new Fc(o(this,p)))}get taxjar_accounts(){return o(this,Ao)||a(this,Ao,new qc(o(this,p)))}get transactions(){return o(this,Oo)||a(this,Oo,new zc(o(this,p)))}get versions(){return o(this,Qo)||a(this,Qo,new Wc(o(this,p)))}get vertex_accounts(){return o(this,Io)||a(this,Io,new Xc(o(this,p)))}get voids(){return o(this,Mo)||a(this,Mo,new Zc(o(this,p)))}get webhooks(){return o(this,Go)||a(this,Go,new Jc(o(this,p)))}get wire_transfers(){return o(this,Yo)||a(this,Yo,new tp(o(this,p)))}get currentOrganization(){return o(this,Mt)}get currentAccessToken(){return o(this,p)?.client?.currentAccessToken}get interceptors(){return o(this,p).client.interceptors}localConfig(e){e.organization&&a(this,Mt,e.organization);}config(e){return _p("config %o",e),this.localConfig(e),e.organization||(e.organization=this.currentOrganization),o(this,p).config(e),this}resources(){return It.resources()}singletons(){return It.singletons()}isSingleton(e){return It.isSingleton(e)}isApiError(e){return It.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 l={};s.headers.forEach((d,y)=>{l[y]=d;}),t.headers=l;}return s}return this.interceptors.rawReader={onSuccess:r,onFailure:r},t.id=1,t}removeRawResponseReader(){this.interceptors.rawReader=void 0;}};p=new WeakMap,Mt=new WeakMap,yr=new WeakMap,dr=new WeakMap,Rr=new WeakMap,gr=new WeakMap,_r=new WeakMap,Pr=new WeakMap,hr=new WeakMap,fr=new WeakMap,vr=new WeakMap,kr=new WeakMap,Sr=new WeakMap,Cr=new WeakMap,Tr=new WeakMap,Lr=new WeakMap,xr=new WeakMap,Er=new WeakMap,br=new WeakMap,wr=new WeakMap,Ar=new WeakMap,Or=new WeakMap,Qr=new WeakMap,Ir=new WeakMap,Mr=new WeakMap,Gr=new WeakMap,Yr=new WeakMap,Ur=new WeakMap,Vr=new WeakMap,$r=new WeakMap,Fr=new WeakMap,Br=new WeakMap,qr=new WeakMap,Dr=new WeakMap,zr=new WeakMap,jr=new WeakMap,Wr=new WeakMap,Kr=new WeakMap,Xr=new WeakMap,Nr=new WeakMap,Zr=new WeakMap,Hr=new WeakMap,Jr=new WeakMap,es=new WeakMap,ts=new WeakMap,rs=new WeakMap,ss=new WeakMap,os=new WeakMap,ns=new WeakMap,is=new WeakMap,as=new WeakMap,us=new WeakMap,cs=new WeakMap,ps=new WeakMap,ls=new WeakMap,ms=new WeakMap,ys=new WeakMap,ds=new WeakMap,Rs=new WeakMap,gs=new WeakMap,_s=new WeakMap,Ps=new WeakMap,hs=new WeakMap,fs=new WeakMap,vs=new WeakMap,ks=new WeakMap,Ss=new WeakMap,Cs=new WeakMap,Ts=new WeakMap,Ls=new WeakMap,xs=new WeakMap,Es=new WeakMap,bs=new WeakMap,ws=new WeakMap,As=new WeakMap,Os=new WeakMap,Qs=new WeakMap,Is=new WeakMap,Ms=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Us=new WeakMap,Vs=new WeakMap,$s=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,qs=new WeakMap,Ds=new WeakMap,zs=new WeakMap,js=new WeakMap,Ws=new WeakMap,Ks=new WeakMap,Xs=new WeakMap,Ns=new WeakMap,Zs=new WeakMap,Hs=new WeakMap,Js=new WeakMap,eo=new WeakMap,to=new WeakMap,ro=new WeakMap,so=new WeakMap,oo=new WeakMap,no=new WeakMap,io=new WeakMap,ao=new WeakMap,uo=new WeakMap,co=new WeakMap,po=new WeakMap,lo=new WeakMap,mo=new WeakMap,yo=new WeakMap,Ro=new WeakMap,go=new WeakMap,_o=new WeakMap,Po=new WeakMap,ho=new WeakMap,fo=new WeakMap,vo=new WeakMap,ko=new WeakMap,So=new WeakMap,Co=new WeakMap,To=new WeakMap,Lo=new WeakMap,xo=new WeakMap,Eo=new WeakMap,bo=new WeakMap,wo=new WeakMap,Ao=new WeakMap,Oo=new WeakMap,Qo=new WeakMap,Io=new WeakMap,Mo=new WeakMap,Go=new WeakMap,Yo=new WeakMap;var Pp=i=>new op(i),sp=Pp;
2
2
  exports.CommerceLayer=Pp;exports.CommerceLayerStatic=It;exports.default=sp;