@stacksjs/payments 0.70.45 → 0.70.53
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/LICENSE.md +21 -0
- package/dist/index.js +8 -8
- package/dist/src/billable/webhook.d.ts +9 -0
- package/dist/src/idempotency.d.ts +26 -0
- package/dist/src/index.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var pa=Object.defineProperty;var ya=(n)=>n;function xa(n,i){this[n]=ya.bind(null,i)}var Li=(n,i)=>{for(var l in i)pa(n,l,{get:i[l],enumerable:!0,configurable:!0,set:xa.bind(i,l)})};import{services as fa}from"@stacksjs/config";var ua={};Li(ua,{default:()=>Te,Stripe:()=>_a,Decimal:()=>$});var Bi=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","headers","additionalHeaders","streaming"];function Le(n){return n&&typeof n==="object"&&Bi.some((i)=>Object.prototype.hasOwnProperty.call(n,i))}function Y(n){return Ea(n)}function Ae(n){return encodeURIComponent(n).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/%5B/g,"[").replace(/%5D/g,"]")}function Ga(n){if(n instanceof Date)return Math.floor(n.getTime()/1000).toString();if(n===null)return"";return String(n)}function Ea(n){let i=[];function l(d,t){if(t===void 0)return;if(t===null||typeof t!=="object"||t instanceof Date){i.push(Ae(d)+"="+Ae(Ga(t)));return}if(Array.isArray(t)){for(let a=0;a<t.length;a++)if(t[a]!==void 0)l(d+"["+a+"]",t[a]);return}for(let a of Object.keys(t))l(d+"["+a+"]",t[a])}if(typeof n==="object"&&n!==null)for(let d of Object.keys(n))l(d,n[d]);return i.join("&")}var In=(()=>{let n={"\n":"\\n",'"':"\\\"","\u2028":"\\u2028","\u2029":"\\u2029"};return(i)=>{let l=i.replace(/["\n\r\u2028\u2029]/g,(d)=>n[d]);return(d)=>{return l.replace(/\{([\s\S]+?)\}/g,(t,a)=>{let m=d[a];if(wa(m))return encodeURIComponent(m);return""})}}})();function wa(n){return["number","string","boolean"].includes(typeof n)}function Be(n){let i=n.match(/\{\w+\}/g);if(!i)return[];return i.map((l)=>l.replace(/[{}]/g,""))}function ln(n){if(!Array.isArray(n)||!n[0]||typeof n[0]!=="object")return{};if(!Le(n[0]))return n.shift();let i=Object.keys(n[0]),l=i.filter((d)=>Bi.includes(d));if(l.length>0&&l.length!==i.length)jn(`Options found in arguments (${l.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`);return{}}function Cn(n){let i={host:null,headers:{},settings:{},streaming:!1};if(n.length>0){let l=n[n.length-1];if(typeof l==="string")i.authenticator=Dn(n.pop());else if(Le(l)){let d={...n.pop()},t=Object.keys(d).filter((a)=>!Bi.includes(a));if(t.length)jn(`Invalid options found (${t.join(", ")}); ignoring.`);if(d.apiKey)i.authenticator=Dn(d.apiKey);if(d.idempotencyKey)i.headers["Idempotency-Key"]=d.idempotencyKey;if(d.stripeAccount)i.headers["Stripe-Account"]=d.stripeAccount;if(d.stripeContext){if(i.headers["Stripe-Account"])throw Error("Can't specify both stripeAccount and stripeContext.");i.headers["Stripe-Context"]=d.stripeContext}if(d.apiVersion)i.headers["Stripe-Version"]=d.apiVersion;if(Number.isInteger(d.maxNetworkRetries))i.settings.maxNetworkRetries=d.maxNetworkRetries;if(Number.isInteger(d.timeout))i.settings.timeout=d.timeout;if(d.host)i.host=d.host;if(d.authenticator){if(d.apiKey)throw Error("Can't specify both apiKey and authenticator.");if(typeof d.authenticator!=="function")throw Error("The authenticator must be a function receiving a request as the first parameter.");i.authenticator=d.authenticator}if(d.headers)Object.assign(i.headers,d.headers);if(d.additionalHeaders)Object.assign(i.headers,d.additionalHeaders);if(d.streaming)i.streaming=!0}}return i}function Je(n){let i=this,l=Object.prototype.hasOwnProperty.call(n,"constructor")?n.constructor:function(...d){i.apply(this,d)};return Object.assign(l,i),l.prototype=Object.create(i.prototype),Object.assign(l.prototype,n),l}function ni(n){if(typeof n!=="object")throw Error("Argument must be an object");return Object.keys(n).reduce((i,l)=>{if(n[l]!=null)i[l]=n[l];return i},{})}function Qe(n){if(!(n&&typeof n==="object"))return n;return Object.keys(n).reduce((i,l)=>{return i[Fa(l)]=n[l],i},{})}function Fa(n){return n.split("-").map((i)=>i.charAt(0).toUpperCase()+i.substr(1).toLowerCase()).join("-")}function hn(n,i){if(i)return n.then((l)=>{setTimeout(()=>{i(null,l)},0)},(l)=>{setTimeout(()=>{i(l,null)},0)});return n}function Xe(n){if(n==="OAuth")return"oauth";else return n[0].toLowerCase()+n.substring(1)}function jn(n){if(typeof process.emitWarning!=="function")return console.warn(`Stripe: ${n}`);return process.emitWarning(n,"Stripe")}function za(n){let i=typeof n;return(i==="function"||i==="object")&&!!n}function Ze(n){let i={},l=(d,t)=>{Object.entries(d).forEach(([a,m])=>{let c=t?`${t}[${a}]`:a;if(za(m))if(!(m instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(m,"data"))return l(m,c);else i[c]=m;else i[c]=String(m)})};return l(n,null),i}function ii(n,i,l){if(!Number.isInteger(i))if(l!==void 0)return l;else throw Error(`${n} must be an integer`);return i}function $e(){return typeof process>"u"?{}:{lang_version:process.version}}var Aa=[["ANTIGRAVITY_CLI_ALIAS","antigravity"],["CLAUDECODE","claude_code"],["CLINE_ACTIVE","cline"],["CODEX_SANDBOX","codex_cli"],["CODEX_THREAD_ID","codex_cli"],["CODEX_SANDBOX_NETWORK_DISABLED","codex_cli"],["CODEX_CI","codex_cli"],["CURSOR_AGENT","cursor"],["GEMINI_CLI","gemini_cli"],["OPENCLAW_SHELL","openclaw"],["OPENCODE","open_code"]];function Me(n){for(let[i,l]of Aa)if(n[i])return l;return""}function Dn(n){let i=(l)=>{return l.headers.Authorization="Bearer "+n,Promise.resolve()};return i._apiKey=n,i}function La(n,i){if(this[n]instanceof Date)return Math.floor(this[n].getTime()/1000).toString();return i}function Re(n){return JSON.stringify(n,La)}function ei(n){if(!n)return"v1";return n.startsWith("/v2")?"v2":"v1"}function li(n){if(Array.isArray(n))return n.join(", ");return String(n)}function Ye(n){let i=Array.isArray(n)?n[0]:n;return Number(i)}function Ue(n){return Object.entries(n).map(([i,l])=>{return[i,li(l)]})}class F{getClientName(){throw Error("getClientName not implemented.")}makeRequest(n,i,l,d,t,a,m,c){throw Error("makeRequest not implemented.")}static makeTimeoutError(){let n=TypeError(F.TIMEOUT_ERROR_CODE);return n.code=F.TIMEOUT_ERROR_CODE,n}}F.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];F.TIMEOUT_ERROR_CODE="ETIMEDOUT";class Pn{constructor(n,i){this._statusCode=n,this._headers=i}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw Error("getRawResponse not implemented.")}toStream(n){throw Error("toStream not implemented.")}toJSON(){throw Error("toJSON not implemented.")}}class gn extends F{constructor(n){super();if(!n){if(!globalThis.fetch)throw Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");n=globalThis.fetch}if(globalThis.AbortController)this._fetchFn=gn.makeFetchWithAbortTimeout(n);else this._fetchFn=gn.makeFetchWithRaceTimeout(n)}static makeFetchWithRaceTimeout(n){return(i,l,d)=>{let t,a=new Promise((c,_)=>{t=setTimeout(()=>{t=null,_(F.makeTimeoutError())},d)}),m=n(i,l);return Promise.race([m,a]).finally(()=>{if(t)clearTimeout(t)})}}static makeFetchWithAbortTimeout(n){return async(i,l,d)=>{let t=new AbortController,a=setTimeout(()=>{a=null,t.abort(F.makeTimeoutError())},d);try{return await n(i,{...l,signal:t.signal})}catch(m){if(m.name==="AbortError")throw F.makeTimeoutError();else throw m}finally{if(a)clearTimeout(a)}}}getClientName(){return"fetch"}async makeRequest(n,i,l,d,t,a,m,c){let u=new URL(l,`${m==="http"?"http":"https"}://${n}`);u.port=i;let r=d=="POST"||d=="PUT"||d=="PATCH",s=a||(r?"":void 0),k=await this._fetchFn(u.toString(),{method:d,headers:Ue(t),body:s},c);return new Ji(k)}}class Ji extends Pn{constructor(n){super(n.status,Ji._transformHeadersToObject(n.headers));this._res=n}getRawResponse(){return this._res}toStream(n){return n(),this._res.body}toJSON(){return this._res.json()}static _transformHeadersToObject(n){let i={};for(let l of n){if(!Array.isArray(l)||l.length!=2)throw Error("Response objects produced by the fetch function given to FetchHttpClient do not have an iterable headers map. Response#headers should be an iterable object.");i[l[0]]=l[1]}return i}}class Tn{computeHMACSignature(n,i){throw Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync(n,i){throw Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async(n){throw Error("computeSHA256 not implemented.")}}class vn extends Error{}class Xi extends Tn{constructor(n){super();this.subtleCrypto=n||crypto.subtle}computeHMACSignature(n,i){throw new vn("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(n,i){let l=new TextEncoder,d=await this.subtleCrypto.importKey("raw",l.encode(i),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),t=await this.subtleCrypto.sign("hmac",d,l.encode(n)),a=new Uint8Array(t),m=Array(a.length);for(let c=0;c<a.length;c++)m[c]=Qi[a[c]];return m.join("")}async computeSHA256Async(n){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",n))}}var Qi=Array(256);for(let n=0;n<Qi.length;n++)Qi[n]=n.toString(16).padStart(2,"0");class Zi{constructor(){this._fetchFn=null,this._agent=null}getPlatformInfo(){return null}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(n)=>{let i=Math.random()*16|0;return(n==="x"?i:i&3|8).toString(16)})}secureCompare(n,i){if(n.length!==i.length)return!1;let l=n.length,d=0;for(let t=0;t<l;++t)d|=n.charCodeAt(t)^i.charCodeAt(t);return d===0}createEmitter(){throw Error("createEmitter not implemented.")}tryBufferData(n){throw Error("tryBufferData not implemented.")}createNodeHttpClient(n){throw Error("createNodeHttpClient not implemented.")}createFetchHttpClient(n){return new gn(n)}createDefaultHttpClient(){throw Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider(n){return new Xi(n)}createDefaultCryptoProvider(){throw Error("createDefaultCryptoProvider not implemented.")}}class qe extends Event{constructor(n,i){super(n);this.data=i}}class $i{constructor(){this.eventTarget=new EventTarget,this.listenerMapping=new Map}on(n,i){let l=(d)=>{i(d.data)};return this.listenerMapping.set(i,l),this.eventTarget.addEventListener(n,l)}removeListener(n,i){let l=this.listenerMapping.get(i);return this.listenerMapping.delete(i),this.eventTarget.removeEventListener(n,l)}once(n,i){let l=(d)=>{i(d.data)};return this.listenerMapping.set(i,l),this.eventTarget.addEventListener(n,l,{once:!0})}emit(n,i){return this.eventTarget.dispatchEvent(new qe(n,i))}}class Mi extends Zi{createEmitter(){return new $i}tryBufferData(n){if(n.file.data instanceof ReadableStream)throw Error("Uploading a file as a stream is not supported in non-Node environments. Please open or upvote an issue at github.com/stripe/stripe-node if you use this, detailing your use-case.");return Promise.resolve(n)}createNodeHttpClient(){throw Error("Stripe: `createNodeHttpClient()` is not available in non-Node environments. Please use `createFetchHttpClient()` instead.")}createDefaultHttpClient(){return super.createFetchHttpClient()}createNodeCryptoProvider(){throw Error("Stripe: `createNodeCryptoProvider()` is not available in non-Node environments. Please use `createSubtleCryptoProvider()` instead.")}createDefaultCryptoProvider(){return this.createSubtleCryptoProvider()}}var ci={};Li(ci,{generateV2Error:()=>Yi,generateV1Error:()=>Sn,generateOAuthError:()=>Ri,TemporarySessionExpiredError:()=>ie,StripeUnsupportedResponseTypeError:()=>Ci,StripeUnsupportedGrantTypeError:()=>Ii,StripeSignatureVerificationError:()=>J,StripeRateLimitError:()=>Ki,StripePermissionError:()=>Vi,StripeOAuthInvalidRequestError:()=>Hi,StripeOAuthError:()=>Z,StripeInvalidScopeError:()=>Di,StripeInvalidRequestError:()=>di,StripeInvalidGrantError:()=>Ni,StripeInvalidClientError:()=>Wi,StripeIdempotencyError:()=>ai,StripeError:()=>y,StripeConnectionError:()=>ti,StripeCardError:()=>Ui,StripeAuthenticationError:()=>qi,StripeAPIError:()=>On,RateLimitError:()=>ne});var Sn=(n)=>{let i=n.statusCode;if(i===429||i===400&&n.code==="rate_limit")return new Ki(n);if(i===400||i===404){if(n.type==="idempotency_error")return new ai(n);return new di(n)}if(i===401)return new qi(n);if(i===402)return new Ui(n);if(i===403)return new Vi(n);return new On(n)},Ri=(n)=>{switch(n.type){case"invalid_grant":return new Ni(n);case"invalid_client":return new Wi(n);case"invalid_request":return new Hi(n);case"invalid_scope":return new Di(n);case"unsupported_grant_type":return new Ii(n);case"unsupported_response_type":return new Ci(n);default:return new Z(n)}},Yi=(n)=>{switch(n.type){case"idempotency_error":return new ai(n);case"rate_limit":return new ne(n);case"temporary_session_expired":return new ie(n)}switch(n.code){case"invalid_fields":return new di(n)}return Sn(n)};class y extends Error{constructor(n={},i=null){super(n.message);this.type=i||this.constructor.name,this.raw=n,this.rawType=n.type,this.code=n.code,this.doc_url=n.doc_url,this.param=n.param,this.detail=n.detail,this.headers=n.headers,this.requestId=n.requestId,this.statusCode=n.statusCode,this.message=n.message??"",this.userMessage=n.user_message,this.charge=n.charge,this.decline_code=n.decline_code,this.payment_intent=n.payment_intent,this.payment_method=n.payment_method,this.payment_method_type=n.payment_method_type,this.setup_intent=n.setup_intent,this.source=n.source}}y.generate=Sn;class Ui extends y{constructor(n={}){super(n,"StripeCardError")}}class di extends y{constructor(n={}){super(n,"StripeInvalidRequestError")}}class On extends y{constructor(n={}){super(n,"StripeAPIError")}}class qi extends y{constructor(n={}){super(n,"StripeAuthenticationError")}}class Vi extends y{constructor(n={}){super(n,"StripePermissionError")}}class Ki extends y{constructor(n={}){super(n,"StripeRateLimitError")}}class ti extends y{constructor(n={}){super(n,"StripeConnectionError")}}class J extends y{constructor(n,i,l={}){super(l,"StripeSignatureVerificationError");this.header=n,this.payload=i}}class ai extends y{constructor(n={}){super(n,"StripeIdempotencyError")}}class Z extends y{constructor(n={},i="StripeOAuthError"){super(n,i)}}class Ni extends Z{constructor(n={}){super(n,"StripeInvalidGrantError")}}class Wi extends Z{constructor(n={}){super(n,"StripeInvalidClientError")}}class Hi extends Z{constructor(n={}){super(n,"StripeOAuthInvalidRequestError")}}class Di extends Z{constructor(n={}){super(n,"StripeInvalidScopeError")}}class Ii extends Z{constructor(n={}){super(n,"StripeUnsupportedGrantTypeError")}}class Ci extends Z{constructor(n={}){super(n,"StripeUnsupportedResponseTypeError")}}class ne extends y{constructor(n={}){super(n,"RateLimitError")}}class ie extends y{constructor(n={}){super(n,"TemporarySessionExpiredError")}}var Ba=60;class dn{constructor(n,i){this._stripe=n,this._maxBufferedRequestMetric=i}_normalizeStripeContext(n,i){if(n)return n.toString()||null;return i?.toString()||null}_addHeadersDirectlyToObject(n,i){n.requestId=i["request-id"],n.stripeAccount=n.stripeAccount||i["stripe-account"],n.apiVersion=n.apiVersion||i["stripe-version"],n.idempotencyKey=n.idempotencyKey||i["idempotency-key"]}_makeResponseEvent(n,i,l){let d=Date.now(),t=d-n.request_start_time;return ni({api_version:l["stripe-version"],account:l["stripe-account"],idempotency_key:l["idempotency-key"],method:n.method,path:n.path,status:i,request_id:this._getRequestId(l),elapsed:t,request_start_time:n.request_start_time,request_end_time:d})}_getRequestId(n){return n["request-id"]}_streamingResponseHandler(n,i,l){return(d)=>{let t=d.getHeaders(),a=()=>{let c=this._makeResponseEvent(n,d.getStatusCode(),t);this._stripe._emitter.emit("response",c),this._recordRequestMetrics(this._getRequestId(t),c.elapsed,i)},m=d.toStream(a);return this._addHeadersDirectlyToObject(m,t),l(null,m)}}_jsonResponseHandler(n,i,l,d){return(t)=>{let a=t.getHeaders(),m=this._getRequestId(a),c=t.getStatusCode(),_=this._makeResponseEvent(n,c,a);this._stripe._emitter.emit("response",_),t.toJSON().then((u)=>{if(u.error){let r=typeof u.error==="string";if(r)u.error={type:u.error,message:u.error_description};u.error.headers=a,u.error.statusCode=c,u.error.requestId=m;let s;if(r)s=Ri(u.error);else if(i==="v2")s=Yi(u.error);else s=Sn(u.error);throw s}return u},(u)=>{throw new On({message:"Invalid JSON received from the Stripe API",exception:u,requestId:a["request-id"]})}).then((u)=>{this._recordRequestMetrics(m,_.elapsed,l);let r=t.getRawResponse();this._addHeadersDirectlyToObject(r,a),Object.defineProperty(u,"lastResponse",{enumerable:!1,writable:!1,value:r}),d(null,u)},(u)=>d(u,null))}}static _generateConnectionErrorMessage(n){return`An error occurred with our connection to Stripe.${n>0?` Request was retried ${n} times.`:""}`}static _shouldRetry(n,i,l,d){if(d&&i===0&&F.CONNECTION_CLOSED_ERROR_CODES.includes(d.code))return!0;if(i>=l)return!1;if(!n)return!0;if(n.getHeaders()["stripe-should-retry"]==="false")return!1;if(n.getHeaders()["stripe-should-retry"]==="true")return!0;if(n.getStatusCode()===409)return!0;if(n.getStatusCode()>=500)return!0;return!1}_getSleepTimeInMS(n,i=null){let l=this._stripe.getInitialNetworkRetryDelay(),d=this._stripe.getMaxNetworkRetryDelay(),t=Math.min(l*Math.pow(2,n-1),d);if(t*=0.5*(1+Math.random()),t=Math.max(l,t),Number.isInteger(i)&&i<=Ba)t=Math.max(t,i);return t*1000}_getMaxNetworkRetries(n={}){return n.maxNetworkRetries!==void 0&&Number.isInteger(n.maxNetworkRetries)?n.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey(n,i,l){let d=this._getMaxNetworkRetries(i),t=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if(l==="v2"){if(n==="POST"||n==="DELETE")return t()}else if(l==="v1"){if(n==="POST"&&d>0)return t()}return null}_makeHeaders({contentType:n,contentLength:i,apiVersion:l,clientUserAgent:d,method:t,userSuppliedHeaders:a,userSuppliedSettings:m,stripeAccount:c,stripeContext:_,apiMode:u}){let r={Accept:"application/json","Content-Type":n,"User-Agent":this._getUserAgentString(u),"X-Stripe-Client-User-Agent":d,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":l,"Stripe-Account":c,"Stripe-Context":_,"Idempotency-Key":this._defaultIdempotencyKey(t,m,u)},s=t=="POST"||t=="PUT"||t=="PATCH";if(s||i){if(!s)jn(`${t} method had non-zero contentLength but no payload is expected for this verb`);r["Content-Length"]=i}return Object.assign(ni(r),Qe(a))}_getUserAgentString(n){let i=this._stripe.getConstant("PACKAGE_VERSION"),l=this._stripe._appInfo?this._stripe.getAppInfoAsString():"",d=this._stripe.getConstant("AI_AGENT"),t=`Stripe/${n} NodeBindings/${i}`;if(l)t+=` ${l}`;if(d)t+=` AIAgent/${d}`;return t}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){let n=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:n})}}_recordRequestMetrics(n,i,l){if(this._stripe.getTelemetryEnabled()&&n)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)jn("Request metrics buffer is full, dropping telemetry message.");else{let d={request_id:n,request_duration_ms:i};if(l&&l.length>0)d.usage=l;this._stripe._prevRequestMetrics.push(d)}}_rawRequest(n,i,l,d,t){return new Promise((m,c)=>{let _;try{let h=n.toUpperCase();if(h!=="POST"&&l&&Object.keys(l).length!==0)throw Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let o=[].slice.call([l,d]),f=ln(o),j=h==="POST"?Object.assign({},f):null,P=Cn(o),g=P.headers,O=P.authenticator;_={requestMethod:h,requestPath:i,bodyData:j,queryData:{},authenticator:O,headers:g,host:P.host,streaming:!!P.streaming,settings:{},usage:t||["raw_request"]}}catch(h){c(h);return}function u(h,o){if(h)c(h);else m(o)}let{headers:r,settings:s}=_,k=_.authenticator;this._request(_.requestMethod,_.host,i,_.bodyData,k,{headers:r,settings:s,streaming:_.streaming},_.usage,u)})}_getContentLength(n){return typeof n==="string"?new TextEncoder().encode(n).length:n.length}_request(n,i,l,d,t,a,m=[],c,_=null){let u;t=t??this._stripe._authenticator??null;let r=ei(l),s=(o,f,j,P,g)=>{return setTimeout(o,this._getSleepTimeInMS(P,g),f,j,P+1)},k=(o,f,j)=>{let P=a.settings&&a.settings.timeout&&Number.isInteger(a.settings.timeout)&&a.settings.timeout>=0?a.settings.timeout:this._stripe.getApiField("timeout"),g={host:i||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:l,method:n,headers:Object.assign({},f),body:u,protocol:this._stripe.getApiField("protocol")};t(g).then(()=>{let O=this._stripe.getApiField("httpClient").makeRequest(g.host,g.port,g.path,g.method,g.headers,g.body,g.protocol,P),z=Date.now(),E=ni({api_version:o,account:li(f["Stripe-Account"]),idempotency_key:li(f["Idempotency-Key"]),method:n,path:l,request_start_time:z}),w=j||0,bn=this._getMaxNetworkRetries(a.settings||{});this._stripe._emitter.emit("request",E),O.then((A)=>{if(dn._shouldRetry(A,w,bn))return s(k,o,f,w,Ye(A.getHeaders()["retry-after"]));else if(a.streaming&&A.getStatusCode()<400)return this._streamingResponseHandler(E,m,c)(A);else return this._jsonResponseHandler(E,r,m,c)(A)}).catch((A)=>{if(dn._shouldRetry(null,w,bn,A))return s(k,o,f,w,null);else{let Oa=A.code&&A.code===F.TIMEOUT_ERROR_CODE;return c(new ti({message:Oa?`Request aborted due to timeout being reached (${P}ms)`:dn._generateConnectionErrorMessage(w),detail:A}))}})}).catch((O)=>{throw new y({message:"Unable to authenticate the request",exception:O})})},h=(o,f)=>{if(o)return c(o);u=f,this._stripe.getClientUserAgent((j)=>{let P=this._stripe.getApiField("version"),g=this._makeHeaders({contentType:r=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:this._getContentLength(f),apiVersion:P,clientUserAgent:j,method:n,userSuppliedHeaders:a.headers??null,userSuppliedSettings:a.settings??{},stripeAccount:a.stripeAccount??this._stripe.getApiField("stripeAccount"),stripeContext:this._normalizeStripeContext(a.stripeContext,this._stripe.getApiField("stripeContext")),apiMode:r});k(P,g,0)})};if(_)_(n,d,a.headers,h);else{let o;if(r=="v2")o=d?Re(d):"";else o=Y(d||{});h(null,o)}}}class le{constructor(n,i,l,d){this.index=0,this.pagePromise=n,this.promiseCache={currentPromise:null},this.requestArgs=i,this.spec=l,this.stripeResource=d}async iterate(n){if(!(n&&n.data&&typeof n.data.length==="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let i=He(this.requestArgs);if(this.index<n.data.length){let l=i?n.data.length-1-this.index:this.index,d=n.data[l];return this.index+=1,{value:d,done:!1}}else if(n.has_more){this.index=0,this.pagePromise=this.getNextPage(n);let l=await this.pagePromise;return this.iterate(l)}return{done:!0,value:void 0}}getNextPage(n){throw Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let n=(async()=>{let i=await this._next();return this.promiseCache.currentPromise=null,i})();return this.promiseCache.currentPromise=n,n}}class Ve extends le{getNextPage(n){let i=He(this.requestArgs),l=Za(n,i);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[i?"ending_before":"starting_after"]:l})}}class Ke extends le{getNextPage(n){if(!n.next_page)throw Error("Unexpected: Stripe API response does not have a well-formed `next_page` field, but `has_more` was true.");return this.stripeResource._makeRequest(this.requestArgs,this.spec,{page:n.next_page})}}class Ne{constructor(n,i,l,d){this.firstPagePromise=n,this.currentPageIterator=null,this.nextPageUrl=null,this.requestArgs=i,this.spec=l,this.stripeResource=d}async initFirstPage(){if(this.firstPagePromise){let n=await this.firstPagePromise;this.firstPagePromise=null,this.currentPageIterator=n.data[Symbol.iterator](),this.nextPageUrl=n.next_page_url||null}}async turnPage(){if(!this.nextPageUrl)return null;this.spec.fullPath=this.nextPageUrl;let n=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=n.next_page_url||null,this.currentPageIterator=n.data[Symbol.iterator](),this.currentPageIterator}async next(){if(await this.initFirstPage(),this.currentPageIterator){let l=this.currentPageIterator.next();if(!l.done)return{done:!1,value:l.value}}let n=await this.turnPage();if(!n)return{done:!0,value:void 0};let i=n.next();if(!i.done)return{done:!1,value:i.value};return{done:!0,value:void 0}}}var We=(n,i,l,d)=>{let t=ei(l.fullPath||l.path);if(t!=="v2"&&l.methodType==="search")return ee(new Ke(d,i,l,n));if(t!=="v2"&&l.methodType==="list")return ee(new Ve(d,i,l,n));if(t==="v2"&&l.methodType==="list")return ee(new Ne(d,i,l,n));return null},ee=(n)=>{let i=$a((...t)=>n.next(...t)),l=Ma(i),d={autoPagingEach:i,autoPagingToArray:l,next:()=>n.next(),return:()=>{return{}},[Ja()]:()=>{return d}};return d};function Ja(){if(typeof Symbol<"u"&&Symbol.asyncIterator)return Symbol.asyncIterator;return"@@asyncIterator"}function Qa(n){if(n.length<2)return null;let i=n[1];if(typeof i!=="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof i}`);return i}function Xa(n){if(n.length===0)return;let i=n[0];if(typeof i!=="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof i}`);if(i.length===2)return i;if(i.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${i}`);return function(d,t){let a=i(d);t(a)}}function Za(n,i){let l=i?0:n.data.length-1,d=n.data[l],t=d&&d.id;if(!t)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return t}function $a(n){return function(){let l=[].slice.call(arguments),d=Xa(l),t=Qa(l);if(l.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${l}`);let a=Ra(n,d);return hn(a,t)}}function Ma(n){return function(l,d){let t=l&&l.limit;if(!t)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(t>1e4)throw Error("You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.");let a=new Promise((m,c)=>{let _=[];n((u)=>{if(_.push(u),_.length>=t)return!1}).then(()=>{m(_)}).catch(c)});return hn(a,d)}}function Ra(n,i){return new Promise((l,d)=>{function t(a){if(a.done){l();return}let m=a.value;return new Promise((c)=>{i(m,c)}).then((c)=>{if(c===!1)return t({done:!0,value:void 0});else return n().then(t)})}n().then(t).catch(d)})}function He(n){let i=[].slice.call(n);return!!ln(i).ending_before}function De(n){if(n.path!==void 0&&n.fullPath!==void 0)throw Error(`Method spec specified both a 'path' (${n.path}) and a 'fullPath' (${n.fullPath}).`);return function(...i){let l=typeof i[i.length-1]=="function"&&i.pop();n.urlParams=Be(n.fullPath||this.createResourcePathWithSymbols(n.path||""));let d=hn(this._makeRequest(i,n,{}),l);return Object.assign(d,We(this,i,n,d)),d}}var Ya={"ubb-usage-count":{mode:"significant-figures",value:15},"v1-api":{mode:"decimal-places",value:12}};class x{constructor(n,i){let[l,d]=x.normalize(n,i);this._coefficient=l,this._exponent=d,Object.freeze(this)}static normalize(n,i){if(n===0n)return[0n,0];let l=n,d=i;while(l!==0n&&l%10n===0n)l/=10n,d+=1;return[l,d]}static roundDivision(n,i,l,d){if(i===0n)return n;if(d==="round-down")return n;let t=i>0n===l>0n?1n:-1n;if(d==="round-up")return n+t;if(d==="ceil")return t===1n?n+1n:n;if(d==="floor")return t===-1n?n-1n:n;let a=i<0n?-i:i,m=l<0n?-l:l,c=a*2n,_;if(c===m)_=0;else if(c<m)_=-1;else _=1;if(_<0)return n;if(_>0)return n+t;if(d==="half-up")return n+t;if(d==="half-down")return n;if(n%2n===0n)return n;else return n+t}add(n){let i=n;if(this._exponent===i._exponent)return new x(this._coefficient+i._coefficient,this._exponent);if(this._exponent<i._exponent){let l=10n**BigInt(i._exponent-this._exponent);return new x(this._coefficient+i._coefficient*l,this._exponent)}else{let l=10n**BigInt(this._exponent-i._exponent);return new x(this._coefficient*l+i._coefficient,i._exponent)}}sub(n){let i=n;if(this._exponent===i._exponent)return new x(this._coefficient-i._coefficient,this._exponent);if(this._exponent<i._exponent){let l=10n**BigInt(i._exponent-this._exponent);return new x(this._coefficient-i._coefficient*l,this._exponent)}else{let l=10n**BigInt(this._exponent-i._exponent);return new x(this._coefficient*l-i._coefficient,i._exponent)}}mul(n){let i=n;return new x(this._coefficient*i._coefficient,this._exponent+i._exponent)}div(n,i,l){if(i<0||!Number.isInteger(i))throw Error("precision must be a non-negative integer");let d=n;if(d._coefficient===0n)throw Error("Division by zero");let t=this._exponent-d._exponent+i,a,m,c;if(t>=0){let u=this._coefficient*10n**BigInt(t);a=u/d._coefficient,m=u%d._coefficient,c=d._coefficient}else{let u=d._coefficient*10n**BigInt(-t);a=this._coefficient/u,m=this._coefficient%u,c=u}let _=x.roundDivision(a,m,c,l);return new x(_,-i)}cmp(n){let i=n;if(this._exponent===i._exponent){if(this._coefficient<i._coefficient)return-1;if(this._coefficient>i._coefficient)return 1;return 0}if(this._exponent<i._exponent){let l=10n**BigInt(i._exponent-this._exponent),d=i._coefficient*l;if(this._coefficient<d)return-1;if(this._coefficient>d)return 1;return 0}else{let l=10n**BigInt(this._exponent-i._exponent),d=this._coefficient*l;if(d<i._coefficient)return-1;if(d>i._coefficient)return 1;return 0}}eq(n){return this.cmp(n)===0}lt(n){return this.cmp(n)===-1}lte(n){return this.cmp(n)<=0}gt(n){return this.cmp(n)===1}gte(n){return this.cmp(n)>=0}isZero(){return this._coefficient===0n}isNegative(){return this._coefficient<0n}isPositive(){return this._coefficient>0n}neg(){return new x(-this._coefficient,this._exponent)}abs(){if(this._coefficient<0n)return new x(-this._coefficient,this._exponent);return this}round(n,i){let l=typeof i==="string"?Ya[i]:i;if(l===void 0)throw Error(`Unknown rounding preset: "${i}"`);if(l.value<0||!Number.isInteger(l.value))throw Error("DecimalRoundingOptions.value must be a non-negative integer");if(l.mode==="decimal-places"){let r=this.toFixed(l.value,n);return $.from(r)}if(this._coefficient===0n)return this;let t=(this._coefficient<0n?(-this._coefficient).toString():this._coefficient.toString()).length;if(l.value===0)return $.zero;if(t<=l.value)return this;let a=t-l.value,m=10n**BigInt(a),c=this._coefficient/m,_=this._coefficient%m,u=x.roundDivision(c,_,m,n);return new x(u,this._exponent+a)}toString(){if(this._coefficient===0n)return"0";let n=this._coefficient.toString(),i=n.startsWith("-"),l=i?n.slice(1):n;if(this._exponent<0){let t=-this._exponent;if((t>=l.length?t-l.length:0)>30){if(l.length===1)return`${n}E${String(this._exponent)}`;let m=l[0]??"",c=l.slice(1),_=this._exponent+l.length-1;return`${i?"-":""}${m}.${c}E${String(_)}`}if(t>=l.length){let m="0".repeat(t-l.length);return`${i?"-":""}0.${m}${l}`}else{let m=l.slice(0,l.length-t),c=l.slice(l.length-t);return`${i?"-":""}${m}.${c}`}}if(l.length+this._exponent<=30){if(this._exponent===0)return n;let t="0".repeat(this._exponent);return`${i?"-":""}${l}${t}`}else{if(l.length===1)return`${n}E+${String(this._exponent)}`;let t=l[0]??"",a=l.slice(1),m=this._exponent+l.length-1;return`${i?"-":""}${t}.${a}E+${String(m)}`}}toJSON(){return this.toString()}toNumber(){return Number(this.toString())}toFixed(n,i){if(n<0||!Number.isInteger(n))throw Error("decimalPlaces must be a non-negative integer");let l=(t)=>{let a=t.toString(),m=a.startsWith("-"),c=m?a.slice(1):a;if(n===0)return a;if(n>=c.length){let _="0".repeat(n-c.length);return`${m?"-":""}0.${_}${c}`}else{let _=c.slice(0,c.length-n),u=c.slice(c.length-n);return`${m?"-":""}${_}.${u}`}},d=-n;if(this._exponent===d)return l(this._coefficient);if(this._exponent<d){let t=d-this._exponent,a=10n**BigInt(t),m=this._coefficient/a,c=this._coefficient%a,_=x.roundDivision(m,c,a,i);return l(_)}else{let t=this._exponent-d,a=this._coefficient*10n**BigInt(t);return l(a)}}valueOf(){return this.toString()}}var $={from(n){if(typeof n==="bigint")return new x(n,0);if(typeof n==="number"){if(!Number.isFinite(n))throw Error("Number must be finite");return $.from(n.toString())}let i=n.trim();if(i==="")throw Error("Cannot parse empty string as Decimal");let l=/^([+-]?)(\d+)(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/.exec(i);if(!l)throw Error(`Invalid decimal string: ${n}`);let d=l[1]==="-"?-1n:1n,t=l[2]??"",a=l[3]??"",m=l[4]?Number(l[4]):0;if(!Number.isSafeInteger(m)||m>1e6||m<-1e6)throw Error(`Exponent out of range: ${String(l[4])} exceeds safe integer bounds`);let c=t+a,_=d*BigInt(c),u=m-a.length;if(!Number.isSafeInteger(u)||u>1e6||u<-1e6)throw Error(`Computed exponent out of range: ${String(u)} exceeds safe integer bounds`);return new x(_,u)},zero:new x(0n,0)};var pn=(n,i)=>{if(n==null)return n;switch(i.kind){case"int64_string":return typeof n==="bigint"||typeof n==="number"?String(n):n;case"decimal_string":return typeof n.toFixed==="function"&&typeof n.isZero==="function"?n.toString():n;case"object":{if(typeof n!=="object"||Array.isArray(n))return n;let l=n,d={};for(let t of Object.keys(l)){let a=i.fields[t];d[t]=a?pn(l[t],a):l[t]}return d}case"array":{if(!Array.isArray(n))return n;return n.map((l)=>pn(l,i.element))}case"nullable":return pn(n,i.inner)}},yn=(n,i)=>{if(n==null)return n;switch(i.kind){case"int64_string":if(typeof n==="string")try{return BigInt(n)}catch{throw Error(`Failed to coerce int64_string value: expected an integer string, got '${n}'`)}return n;case"decimal_string":if(typeof n==="string")try{return $.from(n)}catch{throw Error(`Failed to coerce decimal_string value: expected a decimal string, got '${n}'`)}return n;case"object":{if(typeof n!=="object"||Array.isArray(n))return n;let l=n;for(let d of Object.keys(i.fields))if(d in l)l[d]=yn(l[d],i.fields[d]);return l}case"array":{if(!Array.isArray(n))return n;for(let l=0;l<n.length;l++)n[l]=yn(n[l],i.element);return n}case"nullable":return yn(n,i.inner)}};e.extend=Je;e.method=De;e.MAX_BUFFERED_REQUEST_METRICS=100;function e(n,i){if(this._stripe=n,i)throw Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=In(this.basePath||n.getApiField("basePath")),this.resourcePath=this.path,this.path=In(this.path),this.initialize(...arguments)}e.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath(n,i){let l=[this.basePath(i),this.path(i)];if(typeof n==="function"){let d=n(i);if(d)l.push(d)}else l.push(n);return this._joinUrlParts(l)},createResourcePathWithSymbols(n){if(n)return`/${this._joinUrlParts([this.resourcePath,n])}`;else return`/${this.resourcePath}`},_joinUrlParts(n){return n.join("/").replace(/\/{2,}/g,"/")},_getRequestOpts(n,i,l){let d=(i.method||"GET").toUpperCase(),t=i.usage||[],a=i.urlParams||[],m=i.encode||((w)=>w),c=!!i.fullPath,_=In(c?i.fullPath:i.path||""),u=c?i.fullPath:this.createResourcePathWithSymbols(i.path),r=[].slice.call(n),s=a.reduce((w,bn)=>{let A=r.shift();if(typeof A!=="string")throw Error(`Stripe: Argument "${bn}" must be a string, but got: ${A} (on API request to \`${d} ${u}\`)`);return w[bn]=A,w},{}),k=ln(r),h=m(Object.assign({},k,l)),o=Cn(r),f=o.host||i.host,j=!!i.streaming||!!o.streaming;if(r.filter((w)=>w!=null).length)throw Error(`Stripe: Unknown arguments (${r}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${d} \`${u}\`)`);let P=c?_(s):this.createFullPath(_,s),g=Object.assign(o.headers,i.headers);if(i.validator)i.validator(h,{headers:g});let O=i.method==="GET"||i.method==="DELETE";return{requestMethod:d,requestPath:P,bodyData:O?null:h,queryData:O?h:{},authenticator:o.authenticator??null,headers:g,host:f??null,streaming:j,settings:o.settings,usage:t}},_makeRequest(n,i,l){return new Promise((d,t)=>{let a;try{a=this._getRequestOpts(n,i,l)}catch(s){t(s);return}if(i.requestSchema&&a.bodyData)a.bodyData=pn(a.bodyData,i.requestSchema);function m(s,k){if(s)t(s);else try{if(i.responseSchema)yn(k,i.responseSchema);d(i.transformResponseData?i.transformResponseData(k):k)}catch(h){t(h)}}let c=Object.keys(a.queryData).length===0,_=[a.requestPath,c?"":"?",Y(a.queryData)].join(""),{headers:u,settings:r}=a;this._stripe._requestSender._request(a.requestMethod,a.host,_,a.bodyData,a.authenticator,{headers:u,settings:r,streaming:a.streaming},a.usage,m,this.requestDataProcessor?.bind(this))})}};class U{constructor(n=[]){this._segments=[...n]}get segments(){return[...this._segments]}push(n){if(!n)throw Error("Segment cannot be null or undefined");return new U([...this._segments,n])}pop(){if(this._segments.length===0)throw Error("Cannot pop from an empty context");return new U(this._segments.slice(0,-1))}toString(){return this._segments.join("/")}static parse(n){if(!n)return new U([]);return new U(n.split("/"))}}function Ie(n){let i={DEFAULT_TOLERANCE:300,signature:null,constructEvent(r,s,k,h,o,f){try{if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");this.signature.verifyHeader(r,s,k,h||i.DEFAULT_TOLERANCE,o,f)}catch(P){if(P instanceof vn)P.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`";throw P}let j=r instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(r)):JSON.parse(r);if(j&&j.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return j},async constructEventAsync(r,s,k,h,o,f){if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");await this.signature.verifyHeaderAsync(r,s,k,h||i.DEFAULT_TOLERANCE,o,f);let j=r instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(r)):JSON.parse(r);if(j&&j.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return j},generateTestHeaderString:function(r){let s=u(r),k=s.signature||s.cryptoProvider.computeHMACSignature(s.payloadString,s.secret);return s.generateHeaderString(k)},generateTestHeaderStringAsync:async function(r){let s=u(r),k=s.signature||await s.cryptoProvider.computeHMACSignatureAsync(s.payloadString,s.secret);return s.generateHeaderString(k)}},l={EXPECTED_SCHEME:"v1",verifyHeader(r,s,k,h,o,f){let{decodedHeader:j,decodedPayload:P,details:g,suspectPayloadType:O}=t(r,s,this.EXPECTED_SCHEME),z=/\s/.test(k);o=o||_();let E=o.computeHMACSignature(d(P,g),k);return a(P,j,g,E,h,O,z,f),!0},async verifyHeaderAsync(r,s,k,h,o,f){let{decodedHeader:j,decodedPayload:P,details:g,suspectPayloadType:O}=t(r,s,this.EXPECTED_SCHEME),z=/\s/.test(k);o=o||_();let E=await o.computeHMACSignatureAsync(d(P,g),k);return a(P,j,g,E,h,O,z,f)}};function d(r,s){return`${s.timestamp}.${r}`}function t(r,s,k){if(!r)throw new J(s,r,{message:"No webhook payload was provided."});let h=typeof r!="string"&&!(r instanceof Uint8Array),o=new TextDecoder("utf8"),f=r instanceof Uint8Array?o.decode(r):r;if(Array.isArray(s))throw Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(s==null||s=="")throw new J(s,r,{message:"No stripe-signature header value was provided."});let j=s instanceof Uint8Array?o.decode(s):s,P=m(j,k);if(!P||P.timestamp===-1)throw new J(j,f,{message:"Unable to extract timestamp and signatures from header"});if(!P.signatures.length)throw new J(j,f,{message:"No signatures found with expected scheme"});return{decodedPayload:f,decodedHeader:j,details:P,suspectPayloadType:h}}function a(r,s,k,h,o,f,j,P){let g=!!k.signatures.filter(n.secureCompare.bind(n,h)).length,O=`
|
|
3
|
-
Learn more about webhook signing and explore webhook integration examples for various frameworks at https://docs.stripe.com/webhooks/signature`,
|
|
2
|
+
var MX=Object.create;var{getPrototypeOf:jX,defineProperty:jZ,getOwnPropertyNames:_X}=Object;var mX=Object.prototype.hasOwnProperty;function hX(J){return this[J]}var lX,uX,_Z=(J,Z,$)=>{var Q=J!=null&&typeof J==="object";if(Q){var G=Z?lX??=new WeakMap:uX??=new WeakMap,z=G.get(J);if(z)return z}$=J!=null?MX(jX(J)):{};let w=Z||!J||!J.__esModule?jZ($,"default",{value:J,enumerable:!0}):$;for(let X of _X(J))if(!mX.call(w,X))jZ(w,X,{get:hX.bind(J,X),enumerable:!0});if(Q)G.set(J,w);return w};var B=(J,Z)=>()=>(Z||J((Z={exports:{}}).exports,Z),Z.exports);var BJ=import.meta.require;var OJ=B((lZ)=>{Object.defineProperty(lZ,"__esModule",{value:!0});lZ.CryptoProviderOnlySupportsAsyncError=lZ.CryptoProvider=void 0;class mZ{computeHMACSignature(J,Z){throw Error("computeHMACSignature not implemented.")}computeHMACSignatureAsync(J,Z){throw Error("computeHMACSignatureAsync not implemented.")}computeSHA256Async(J){throw Error("computeSHA256 not implemented.")}}lZ.CryptoProvider=mZ;class hZ extends Error{}lZ.CryptoProviderOnlySupportsAsyncError=hZ});var iZ=B((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.NodeCryptoProvider=void 0;var cZ=BJ("crypto"),dX=OJ();class dZ extends dX.CryptoProvider{computeHMACSignature(J,Z){return cZ.createHmac("sha256",Z).update(J,"utf8").digest("hex")}async computeHMACSignatureAsync(J,Z){return await this.computeHMACSignature(J,Z)}async computeSHA256Async(J){return new Uint8Array(await cZ.createHash("sha256").update(J).digest())}}nZ.NodeCryptoProvider=dZ});var kJ=B((oZ)=>{Object.defineProperty(oZ,"__esModule",{value:!0});oZ.HttpClientResponse=oZ.HttpClient=void 0;class XJ{getClientName(){throw Error("getClientName not implemented.")}makeRequest(J,Z,$,Q,G,z,w,X){throw Error("makeRequest not implemented.")}static makeTimeoutError(){let J=TypeError(XJ.TIMEOUT_ERROR_CODE);return J.code=XJ.TIMEOUT_ERROR_CODE,J}}oZ.HttpClient=XJ;XJ.CONNECTION_CLOSED_ERROR_CODES=["ECONNRESET","EPIPE"];XJ.TIMEOUT_ERROR_CODE="ETIMEDOUT";class pZ{constructor(J,Z){this._statusCode=J,this._headers=Z}getStatusCode(){return this._statusCode}getHeaders(){return this._headers}getRawResponse(){throw Error("getRawResponse not implemented.")}toStream(J){throw Error("toStream not implemented.")}toJSON(){throw Error("toJSON not implemented.")}}oZ.HttpClientResponse=pZ});var G9=B(($9)=>{Object.defineProperty($9,"__esModule",{value:!0});$9.NodeHttpClientResponse=$9.NodeHttpClient=void 0;var rZ=BJ("http"),tZ=BJ("https"),M0=kJ(),eZ=rZ.default||rZ,J9=tZ.default||tZ,aX=new eZ.Agent({keepAlive:!0}),iX=new J9.Agent({keepAlive:!0});class Z9 extends M0.HttpClient{constructor(J){super();this._agent=J}getClientName(){return"node"}makeRequest(J,Z,$,Q,G,z,w,X){let K=w==="http",T=this._agent;if(!T)T=K?aX:iX;return new Promise((V,W)=>{let D=(K?eZ:J9).request({host:J,port:Z,path:$,method:Q,agent:T,headers:G,ciphers:"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5"});D.setTimeout(X,()=>{D.destroy(M0.HttpClient.makeTimeoutError())}),D.on("response",(L)=>{V(new j0(L))}),D.on("error",(L)=>{W(L)}),D.once("socket",(L)=>{if(L.connecting)L.once(K?"connect":"secureConnect",()=>{D.write(z),D.end()});else D.write(z),D.end()})})}}$9.NodeHttpClient=Z9;class j0 extends M0.HttpClientResponse{constructor(J){super(J.statusCode,J.headers||{});this._res=J}getRawResponse(){return this._res}toStream(J){return this._res.once("end",()=>J()),this._res}toJSON(){return new Promise((J,Z)=>{let $="";this._res.setEncoding("utf8"),this._res.on("data",(Q)=>{$+=Q}),this._res.once("end",()=>{try{J(JSON.parse($))}catch(Q){Z(Q)}})})}}$9.NodeHttpClientResponse=j0});var _=B((w9)=>{Object.defineProperty(w9,"__esModule",{value:!0});w9.parseHeadersForFetch=w9.parseHttpHeaderAsNumber=w9.parseHttpHeaderAsString=w9.getAPIMode=w9.jsonStringifyRequestData=w9.concat=w9.createApiKeyAuthenticator=w9.detectAIAgent=w9.AI_AGENTS=w9.determineProcessUserAgentProperties=w9.validateInteger=w9.flattenAndStringify=w9.isObject=w9.emitWarning=w9.pascalToCamelCase=w9.callbackifyPromiseWithTimeout=w9.normalizeHeader=w9.normalizeHeaders=w9.removeNullish=w9.protoExtend=w9.getOptionsFromArgs=w9.getDataFromArgs=w9.extractUrlParams=w9.makeURLInterpolator=w9.queryStringifyRequestData=w9.isOptionsHash=void 0;var m0=["apiKey","idempotencyKey","stripeAccount","apiVersion","maxNetworkRetries","timeout","host","authenticator","stripeContext","headers","additionalHeaders","streaming"];function h0(J){return J&&typeof J==="object"&&m0.some((Z)=>Object.prototype.hasOwnProperty.call(J,Z))}w9.isOptionsHash=h0;function oX(J){return rX(J)}w9.queryStringifyRequestData=oX;function z9(J){return encodeURIComponent(J).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/%5B/g,"[").replace(/%5D/g,"]")}function sX(J){if(J instanceof Date)return Math.floor(J.getTime()/1000).toString();if(J===null)return"";return String(J)}function rX(J){let Z=[];function $(Q,G){if(G===void 0)return;if(G===null||typeof G!=="object"||G instanceof Date){Z.push(z9(Q)+"="+z9(sX(G)));return}if(Array.isArray(G)){for(let z=0;z<G.length;z++)if(G[z]!==void 0)$(Q+"["+z+"]",G[z]);return}for(let z of Object.keys(G))$(Q+"["+z+"]",G[z])}if(typeof J==="object"&&J!==null)for(let Q of Object.keys(J))$(Q,J[Q]);return Z.join("&")}w9.makeURLInterpolator=(()=>{let J={"\n":"\\n",'"':"\\\"","\u2028":"\\u2028","\u2029":"\\u2029"};return(Z)=>{let $=Z.replace(/["\n\r\u2028\u2029]/g,(Q)=>J[Q]);return(Q)=>{return $.replace(/\{([\s\S]+?)\}/g,(G,z)=>{let w=Q[z];if(tX(w))return encodeURIComponent(w);return""})}}})();function tX(J){return["number","string","boolean"].includes(typeof J)}function eX(J){let Z=J.match(/\{\w+\}/g);if(!Z)return[];return Z.map(($)=>$.replace(/[{}]/g,""))}w9.extractUrlParams=eX;function JY(J){if(!Array.isArray(J)||!J[0]||typeof J[0]!=="object")return{};if(!h0(J[0]))return J.shift();let Z=Object.keys(J[0]),$=Z.filter((Q)=>m0.includes(Q));if($.length>0&&$.length!==Z.length)l0(`Options found in arguments (${$.join(", ")}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options.`);return{}}w9.getDataFromArgs=JY;function ZY(J){let Z={host:null,headers:{},settings:{},streaming:!1};if(J.length>0){let $=J[J.length-1];if(typeof $==="string")Z.authenticator=_0(J.pop());else if(h0($)){let Q={...J.pop()},G=Object.keys(Q).filter((z)=>!m0.includes(z));if(G.length)l0(`Invalid options found (${G.join(", ")}); ignoring.`);if(Q.apiKey)Z.authenticator=_0(Q.apiKey);if(Q.idempotencyKey)Z.headers["Idempotency-Key"]=Q.idempotencyKey;if(Q.stripeAccount)Z.headers["Stripe-Account"]=Q.stripeAccount;if(Q.stripeContext){if(Z.headers["Stripe-Account"])throw Error("Can't specify both stripeAccount and stripeContext.");Z.headers["Stripe-Context"]=Q.stripeContext}if(Q.apiVersion)Z.headers["Stripe-Version"]=Q.apiVersion;if(Number.isInteger(Q.maxNetworkRetries))Z.settings.maxNetworkRetries=Q.maxNetworkRetries;if(Number.isInteger(Q.timeout))Z.settings.timeout=Q.timeout;if(Q.host)Z.host=Q.host;if(Q.authenticator){if(Q.apiKey)throw Error("Can't specify both apiKey and authenticator.");if(typeof Q.authenticator!=="function")throw Error("The authenticator must be a function receiving a request as the first parameter.");Z.authenticator=Q.authenticator}if(Q.headers)Object.assign(Z.headers,Q.headers);if(Q.additionalHeaders)Object.assign(Z.headers,Q.additionalHeaders);if(Q.streaming)Z.streaming=!0}}return Z}w9.getOptionsFromArgs=ZY;function $Y(J){let Z=this,$=Object.prototype.hasOwnProperty.call(J,"constructor")?J.constructor:function(...Q){Z.apply(this,Q)};return Object.assign($,Z),$.prototype=Object.create(Z.prototype),Object.assign($.prototype,J),$}w9.protoExtend=$Y;function QY(J){if(typeof J!=="object")throw Error("Argument must be an object");return Object.keys(J).reduce((Z,$)=>{if(J[$]!=null)Z[$]=J[$];return Z},{})}w9.removeNullish=QY;function GY(J){if(!(J&&typeof J==="object"))return J;return Object.keys(J).reduce((Z,$)=>{return Z[B9($)]=J[$],Z},{})}w9.normalizeHeaders=GY;function B9(J){return J.split("-").map((Z)=>Z.charAt(0).toUpperCase()+Z.substr(1).toLowerCase()).join("-")}w9.normalizeHeader=B9;function zY(J,Z){if(Z)return J.then(($)=>{setTimeout(()=>{Z(null,$)},0)},($)=>{setTimeout(()=>{Z($,null)},0)});return J}w9.callbackifyPromiseWithTimeout=zY;function BY(J){if(J==="OAuth")return"oauth";else return J[0].toLowerCase()+J.substring(1)}w9.pascalToCamelCase=BY;function l0(J){if(typeof process.emitWarning!=="function")return console.warn(`Stripe: ${J}`);return process.emitWarning(J,"Stripe")}w9.emitWarning=l0;function X9(J){let Z=typeof J;return(Z==="function"||Z==="object")&&!!J}w9.isObject=X9;function XY(J){let Z={},$=(Q,G)=>{Object.entries(Q).forEach(([z,w])=>{let X=G?`${G}[${z}]`:z;if(X9(w))if(!(w instanceof Uint8Array)&&!Object.prototype.hasOwnProperty.call(w,"data"))return $(w,X);else Z[X]=w;else Z[X]=String(w)})};return $(J,null),Z}w9.flattenAndStringify=XY;function YY(J,Z,$){if(!Number.isInteger(Z))if($!==void 0)return $;else throw Error(`${J} must be an integer`);return Z}w9.validateInteger=YY;function wY(){return typeof process>"u"?{}:{lang_version:process.version}}w9.determineProcessUserAgentProperties=wY;w9.AI_AGENTS=[["ANTIGRAVITY_CLI_ALIAS","antigravity"],["CLAUDECODE","claude_code"],["CLINE_ACTIVE","cline"],["CODEX_SANDBOX","codex_cli"],["CODEX_THREAD_ID","codex_cli"],["CODEX_SANDBOX_NETWORK_DISABLED","codex_cli"],["CODEX_CI","codex_cli"],["CURSOR_AGENT","cursor"],["GEMINI_CLI","gemini_cli"],["OPENCLAW_SHELL","openclaw"],["OPENCODE","open_code"]];function UY(J){for(let[Z,$]of w9.AI_AGENTS)if(J[Z])return $;return""}w9.detectAIAgent=UY;function _0(J){let Z=($)=>{return $.headers.Authorization="Bearer "+J,Promise.resolve()};return Z._apiKey=J,Z}w9.createApiKeyAuthenticator=_0;function LY(J){let Z=J.reduce((G,z)=>G+z.length,0),$=new Uint8Array(Z),Q=0;return J.forEach((G)=>{$.set(G,Q),Q+=G.length}),$}w9.concat=LY;function VY(J,Z){if(this[J]instanceof Date)return Math.floor(this[J].getTime()/1000).toString();return Z}function WY(J){return JSON.stringify(J,VY)}w9.jsonStringifyRequestData=WY;function KY(J){if(!J)return"v1";return J.startsWith("/v2")?"v2":"v1"}w9.getAPIMode=KY;function Y9(J){if(Array.isArray(J))return J.join(", ");return String(J)}w9.parseHttpHeaderAsString=Y9;function TY(J){let Z=Array.isArray(J)?J[0]:J;return Number(Z)}w9.parseHttpHeaderAsNumber=TY;function NY(J){return Object.entries(J).map(([Z,$])=>{return[Z,Y9($)]})}w9.parseHeadersForFetch=NY});var K9=B((V9)=>{Object.defineProperty(V9,"__esModule",{value:!0});V9.FetchHttpClientResponse=V9.FetchHttpClient=void 0;var lY=_(),FJ=kJ();class J0 extends FJ.HttpClient{constructor(J){super();if(!J){if(!globalThis.fetch)throw Error("fetch() function not provided and is not defined in the global scope. You must provide a fetch implementation.");J=globalThis.fetch}if(globalThis.AbortController)this._fetchFn=J0.makeFetchWithAbortTimeout(J);else this._fetchFn=J0.makeFetchWithRaceTimeout(J)}static makeFetchWithRaceTimeout(J){return(Z,$,Q)=>{let G,z=new Promise((X,K)=>{G=setTimeout(()=>{G=null,K(FJ.HttpClient.makeTimeoutError())},Q)}),w=J(Z,$);return Promise.race([w,z]).finally(()=>{if(G)clearTimeout(G)})}}static makeFetchWithAbortTimeout(J){return async(Z,$,Q)=>{let G=new AbortController,z=setTimeout(()=>{z=null,G.abort(FJ.HttpClient.makeTimeoutError())},Q);try{return await J(Z,{...$,signal:G.signal})}catch(w){if(w.name==="AbortError")throw FJ.HttpClient.makeTimeoutError();else throw w}finally{if(z)clearTimeout(z)}}}getClientName(){return"fetch"}async makeRequest(J,Z,$,Q,G,z,w,X){let T=new URL($,`${w==="http"?"http":"https"}://${J}`);T.port=Z;let Y=Q=="POST"||Q=="PUT"||Q=="PATCH",V=z||(Y?"":void 0),W=await this._fetchFn(T.toString(),{method:Q,headers:(0,lY.parseHeadersForFetch)(G),body:V},X);return new Z0(W)}}V9.FetchHttpClient=J0;class Z0 extends FJ.HttpClientResponse{constructor(J){super(J.status,Z0._transformHeadersToObject(J.headers));this._res=J}getRawResponse(){return this._res}toStream(J){return J(),this._res.body}toJSON(){return this._res.json()}static _transformHeadersToObject(J){let Z={};for(let $ of J){if(!Array.isArray($)||$.length!=2)throw Error("Response objects produced by the fetch function given to FetchHttpClient do not have an iterable headers map. Response#headers should be an iterable object.");Z[$[0]]=$[1]}return Z}}V9.FetchHttpClientResponse=Z0});var q9=B((H9)=>{Object.defineProperty(H9,"__esModule",{value:!0});H9.SubtleCryptoProvider=void 0;var T9=OJ();class N9 extends T9.CryptoProvider{constructor(J){super();this.subtleCrypto=J||crypto.subtle}computeHMACSignature(J,Z){throw new T9.CryptoProviderOnlySupportsAsyncError("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(J,Z){let $=new TextEncoder,Q=await this.subtleCrypto.importKey("raw",$.encode(Z),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),G=await this.subtleCrypto.sign("hmac",Q,$.encode(J)),z=new Uint8Array(G),w=Array(z.length);for(let X=0;X<z.length;X++)w[X]=u0[z[X]];return w.join("")}async computeSHA256Async(J){return new Uint8Array(await this.subtleCrypto.digest("SHA-256",J))}}H9.SubtleCryptoProvider=N9;var u0=Array(256);for(let J=0;J<u0.length;J++)u0[J]=J.toString(16).padStart(2,"0")});var F9=B((O9)=>{Object.defineProperty(O9,"__esModule",{value:!0});O9.PlatformFunctions=void 0;var cY=K9(),dY=q9();class E9{constructor(){this._fetchFn=null,this._agent=null}getPlatformInfo(){return null}uuid4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(J)=>{let Z=Math.random()*16|0;return(J==="x"?Z:Z&3|8).toString(16)})}secureCompare(J,Z){if(J.length!==Z.length)return!1;let $=J.length,Q=0;for(let G=0;G<$;++G)Q|=J.charCodeAt(G)^Z.charCodeAt(G);return Q===0}createEmitter(){throw Error("createEmitter not implemented.")}tryBufferData(J){throw Error("tryBufferData not implemented.")}createNodeHttpClient(J){throw Error("createNodeHttpClient not implemented.")}createFetchHttpClient(J){return new cY.FetchHttpClient(J)}createDefaultHttpClient(){throw Error("createDefaultHttpClient not implemented.")}createNodeCryptoProvider(){throw Error("createNodeCryptoProvider not implemented.")}createSubtleCryptoProvider(J){return new dY.SubtleCryptoProvider(J)}createDefaultCryptoProvider(){throw Error("createDefaultCryptoProvider not implemented.")}}O9.PlatformFunctions=E9});var CJ=B((b9)=>{Object.defineProperty(b9,"__esModule",{value:!0});b9.TemporarySessionExpiredError=b9.RateLimitError=b9.StripeUnsupportedResponseTypeError=b9.StripeUnsupportedGrantTypeError=b9.StripeInvalidScopeError=b9.StripeOAuthInvalidRequestError=b9.StripeInvalidClientError=b9.StripeInvalidGrantError=b9.StripeOAuthError=b9.StripeIdempotencyError=b9.StripeSignatureVerificationError=b9.StripeConnectionError=b9.StripeRateLimitError=b9.StripePermissionError=b9.StripeAuthenticationError=b9.StripeAPIError=b9.StripeInvalidRequestError=b9.StripeCardError=b9.StripeError=b9.generateV2Error=b9.generateOAuthError=b9.generateV1Error=void 0;var nY=(J)=>{let Z=J.statusCode;if(Z===429||Z===400&&J.code==="rate_limit")return new i0(J);if(Z===400||Z===404){if(J.type==="idempotency_error")return new Q0(J);return new $0(J)}if(Z===401)return new n0(J);if(Z===402)return new c0(J);if(Z===403)return new a0(J);return new d0(J)};b9.generateV1Error=nY;var aY=(J)=>{switch(J.type){case"invalid_grant":return new p0(J);case"invalid_client":return new o0(J);case"invalid_request":return new s0(J);case"invalid_scope":return new r0(J);case"unsupported_grant_type":return new t0(J);case"unsupported_response_type":return new e0(J);default:return new l(J)}};b9.generateOAuthError=aY;var iY=(J)=>{switch(J.type){case"idempotency_error":return new Q0(J);case"rate_limit":return new JZ(J);case"temporary_session_expired":return new ZZ(J)}switch(J.code){case"invalid_fields":return new $0(J)}return b9.generateV1Error(J)};b9.generateV2Error=iY;class g extends Error{constructor(J={},Z=null){super(J.message);this.type=Z||this.constructor.name,this.raw=J,this.rawType=J.type,this.code=J.code,this.doc_url=J.doc_url,this.param=J.param,this.detail=J.detail,this.headers=J.headers,this.requestId=J.requestId,this.statusCode=J.statusCode,this.message=J.message??"",this.userMessage=J.user_message,this.charge=J.charge,this.decline_code=J.decline_code,this.payment_intent=J.payment_intent,this.payment_method=J.payment_method,this.payment_method_type=J.payment_method_type,this.setup_intent=J.setup_intent,this.source=J.source}}b9.StripeError=g;g.generate=b9.generateV1Error;class c0 extends g{constructor(J={}){super(J,"StripeCardError")}}b9.StripeCardError=c0;class $0 extends g{constructor(J={}){super(J,"StripeInvalidRequestError")}}b9.StripeInvalidRequestError=$0;class d0 extends g{constructor(J={}){super(J,"StripeAPIError")}}b9.StripeAPIError=d0;class n0 extends g{constructor(J={}){super(J,"StripeAuthenticationError")}}b9.StripeAuthenticationError=n0;class a0 extends g{constructor(J={}){super(J,"StripePermissionError")}}b9.StripePermissionError=a0;class i0 extends g{constructor(J={}){super(J,"StripeRateLimitError")}}b9.StripeRateLimitError=i0;class C9 extends g{constructor(J={}){super(J,"StripeConnectionError")}}b9.StripeConnectionError=C9;class A9 extends g{constructor(J,Z,$={}){super($,"StripeSignatureVerificationError");this.header=J,this.payload=Z}}b9.StripeSignatureVerificationError=A9;class Q0 extends g{constructor(J={}){super(J,"StripeIdempotencyError")}}b9.StripeIdempotencyError=Q0;class l extends g{constructor(J={},Z="StripeOAuthError"){super(J,Z)}}b9.StripeOAuthError=l;class p0 extends l{constructor(J={}){super(J,"StripeInvalidGrantError")}}b9.StripeInvalidGrantError=p0;class o0 extends l{constructor(J={}){super(J,"StripeInvalidClientError")}}b9.StripeInvalidClientError=o0;class s0 extends l{constructor(J={}){super(J,"StripeOAuthInvalidRequestError")}}b9.StripeOAuthInvalidRequestError=s0;class r0 extends l{constructor(J={}){super(J,"StripeInvalidScopeError")}}b9.StripeInvalidScopeError=r0;class t0 extends l{constructor(J={}){super(J,"StripeUnsupportedGrantTypeError")}}b9.StripeUnsupportedGrantTypeError=t0;class e0 extends l{constructor(J={}){super(J,"StripeUnsupportedResponseTypeError")}}b9.StripeUnsupportedResponseTypeError=e0;class JZ extends g{constructor(J={}){super(J,"RateLimitError")}}b9.RateLimitError=JZ;class ZZ extends g{constructor(J={}){super(J,"TemporarySessionExpiredError")}}b9.TemporarySessionExpiredError=ZZ});var S9=B((g9)=>{Object.defineProperty(g9,"__esModule",{value:!0});g9.NodePlatformFunctions=void 0;var G0=BJ("crypto"),x9=BJ("events"),Kw=iZ(),P9=G9(),Tw=F9(),Nw=CJ(),Hw=_(),I9=BJ("os");class f9 extends Nw.StripeError{}class y9 extends Tw.PlatformFunctions{uuid4(){if(G0.randomUUID)return G0.randomUUID();return super.uuid4()}getPlatformInfo(){return`${process.platform} ${(0,I9.release)()} ${(0,I9.arch)()}`}secureCompare(J,Z){if(!J||!Z)throw Error("secureCompare must receive two arguments");if(J.length!==Z.length)return!1;if(G0.timingSafeEqual){let $=new TextEncoder,Q=$.encode(J),G=$.encode(Z);return G0.timingSafeEqual(Q,G)}return super.secureCompare(J,Z)}createEmitter(){return new x9.EventEmitter}tryBufferData(J){if(!(J.file.data instanceof x9.EventEmitter))return Promise.resolve(J);let Z=[];return new Promise(($,Q)=>{J.file.data.on("data",(G)=>{Z.push(G)}).once("end",()=>{let G=Object.assign({},J);G.file.data=(0,Hw.concat)(Z),$(G)}).on("error",(G)=>{Q(new f9({message:"An error occurred while attempting to process the file for upload.",detail:G}))})})}createNodeHttpClient(J){return new P9.NodeHttpClient(J)}createDefaultHttpClient(){return new P9.NodeHttpClient}createNodeCryptoProvider(){return new Kw.NodeCryptoProvider}createDefaultCryptoProvider(){return this.createNodeCryptoProvider()}}g9.NodePlatformFunctions=y9});var m9=B((j9)=>{Object.defineProperty(j9,"__esModule",{value:!0});j9.RequestSender=void 0;var YJ=CJ(),M9=kJ(),S=_(),Dw=60;class AJ{constructor(J,Z){this._stripe=J,this._maxBufferedRequestMetric=Z}_normalizeStripeContext(J,Z){if(J)return J.toString()||null;return Z?.toString()||null}_addHeadersDirectlyToObject(J,Z){J.requestId=Z["request-id"],J.stripeAccount=J.stripeAccount||Z["stripe-account"],J.apiVersion=J.apiVersion||Z["stripe-version"],J.idempotencyKey=J.idempotencyKey||Z["idempotency-key"]}_makeResponseEvent(J,Z,$){let Q=Date.now(),G=Q-J.request_start_time;return(0,S.removeNullish)({api_version:$["stripe-version"],account:$["stripe-account"],idempotency_key:$["idempotency-key"],method:J.method,path:J.path,status:Z,request_id:this._getRequestId($),elapsed:G,request_start_time:J.request_start_time,request_end_time:Q})}_getRequestId(J){return J["request-id"]}_streamingResponseHandler(J,Z,$){return(Q)=>{let G=Q.getHeaders(),z=()=>{let X=this._makeResponseEvent(J,Q.getStatusCode(),G);this._stripe._emitter.emit("response",X),this._recordRequestMetrics(this._getRequestId(G),X.elapsed,Z)},w=Q.toStream(z);return this._addHeadersDirectlyToObject(w,G),$(null,w)}}_jsonResponseHandler(J,Z,$,Q){return(G)=>{let z=G.getHeaders(),w=this._getRequestId(z),X=G.getStatusCode(),K=this._makeResponseEvent(J,X,z);this._stripe._emitter.emit("response",K),G.toJSON().then((T)=>{if(T.error){let Y=typeof T.error==="string";if(Y)T.error={type:T.error,message:T.error_description};T.error.headers=z,T.error.statusCode=X,T.error.requestId=w;let V;if(Y)V=(0,YJ.generateOAuthError)(T.error);else if(Z==="v2")V=(0,YJ.generateV2Error)(T.error);else V=(0,YJ.generateV1Error)(T.error);throw V}return T},(T)=>{throw new YJ.StripeAPIError({message:"Invalid JSON received from the Stripe API",exception:T,requestId:z["request-id"]})}).then((T)=>{this._recordRequestMetrics(w,K.elapsed,$);let Y=G.getRawResponse();this._addHeadersDirectlyToObject(Y,z),Object.defineProperty(T,"lastResponse",{enumerable:!1,writable:!1,value:Y}),Q(null,T)},(T)=>Q(T,null))}}static _generateConnectionErrorMessage(J){return`An error occurred with our connection to Stripe.${J>0?` Request was retried ${J} times.`:""}`}static _shouldRetry(J,Z,$,Q){if(Q&&Z===0&&M9.HttpClient.CONNECTION_CLOSED_ERROR_CODES.includes(Q.code))return!0;if(Z>=$)return!1;if(!J)return!0;if(J.getHeaders()["stripe-should-retry"]==="false")return!1;if(J.getHeaders()["stripe-should-retry"]==="true")return!0;if(J.getStatusCode()===409)return!0;if(J.getStatusCode()>=500)return!0;return!1}_getSleepTimeInMS(J,Z=null){let $=this._stripe.getInitialNetworkRetryDelay(),Q=this._stripe.getMaxNetworkRetryDelay(),G=Math.min($*Math.pow(2,J-1),Q);if(G*=0.5*(1+Math.random()),G=Math.max($,G),Number.isInteger(Z)&&Z<=Dw)G=Math.max(G,Z);return G*1000}_getMaxNetworkRetries(J={}){return J.maxNetworkRetries!==void 0&&Number.isInteger(J.maxNetworkRetries)?J.maxNetworkRetries:this._stripe.getMaxNetworkRetries()}_defaultIdempotencyKey(J,Z,$){let Q=this._getMaxNetworkRetries(Z),G=()=>`stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;if($==="v2"){if(J==="POST"||J==="DELETE")return G()}else if($==="v1"){if(J==="POST"&&Q>0)return G()}return null}_makeHeaders({contentType:J,contentLength:Z,apiVersion:$,clientUserAgent:Q,method:G,userSuppliedHeaders:z,userSuppliedSettings:w,stripeAccount:X,stripeContext:K,apiMode:T}){let Y={Accept:"application/json","Content-Type":J,"User-Agent":this._getUserAgentString(T),"X-Stripe-Client-User-Agent":Q,"X-Stripe-Client-Telemetry":this._getTelemetryHeader(),"Stripe-Version":$,"Stripe-Account":X,"Stripe-Context":K,"Idempotency-Key":this._defaultIdempotencyKey(G,w,T)},V=G=="POST"||G=="PUT"||G=="PATCH";if(V||Z){if(!V)(0,S.emitWarning)(`${G} method had non-zero contentLength but no payload is expected for this verb`);Y["Content-Length"]=Z}return Object.assign((0,S.removeNullish)(Y),(0,S.normalizeHeaders)(z))}_getUserAgentString(J){let Z=this._stripe.getConstant("PACKAGE_VERSION"),$=this._stripe._appInfo?this._stripe.getAppInfoAsString():"",Q=this._stripe.getConstant("AI_AGENT"),G=`Stripe/${J} NodeBindings/${Z}`;if($)G+=` ${$}`;if(Q)G+=` AIAgent/${Q}`;return G}_getTelemetryHeader(){if(this._stripe.getTelemetryEnabled()&&this._stripe._prevRequestMetrics.length>0){let J=this._stripe._prevRequestMetrics.shift();return JSON.stringify({last_request_metrics:J})}}_recordRequestMetrics(J,Z,$){if(this._stripe.getTelemetryEnabled()&&J)if(this._stripe._prevRequestMetrics.length>this._maxBufferedRequestMetric)(0,S.emitWarning)("Request metrics buffer is full, dropping telemetry message.");else{let Q={request_id:J,request_duration_ms:Z};if($&&$.length>0)Q.usage=$;this._stripe._prevRequestMetrics.push(Q)}}_rawRequest(J,Z,$,Q,G){return new Promise((w,X)=>{let K;try{let D=J.toUpperCase();if(D!=="POST"&&$&&Object.keys($).length!==0)throw Error("rawRequest only supports params on POST requests. Please pass null and add your parameters to path.");let L=[].slice.call([$,Q]),N=(0,S.getDataFromArgs)(L),q=D==="POST"?Object.assign({},N):null,O=(0,S.getOptionsFromArgs)(L),k=O.headers,b=O.authenticator;K={requestMethod:D,requestPath:Z,bodyData:q,queryData:{},authenticator:b,headers:k,host:O.host,streaming:!!O.streaming,settings:{},usage:G||["raw_request"]}}catch(D){X(D);return}function T(D,L){if(D)X(D);else w(L)}let{headers:Y,settings:V}=K,W=K.authenticator;this._request(K.requestMethod,K.host,Z,K.bodyData,W,{headers:Y,settings:V,streaming:K.streaming},K.usage,T)})}_getContentLength(J){return typeof J==="string"?new TextEncoder().encode(J).length:J.length}_request(J,Z,$,Q,G,z,w=[],X,K=null){let T;G=G??this._stripe._authenticator??null;let Y=(0,S.getAPIMode)($),V=(L,N,q,O,k)=>{return setTimeout(L,this._getSleepTimeInMS(O,k),N,q,O+1)},W=(L,N,q)=>{let O=z.settings&&z.settings.timeout&&Number.isInteger(z.settings.timeout)&&z.settings.timeout>=0?z.settings.timeout:this._stripe.getApiField("timeout"),k={host:Z||this._stripe.getApiField("host"),port:this._stripe.getApiField("port"),path:$,method:J,headers:Object.assign({},N),body:T,protocol:this._stripe.getApiField("protocol")};G(k).then(()=>{let b=this._stripe.getApiField("httpClient").makeRequest(k.host,k.port,k.path,k.method,k.headers,k.body,k.protocol,O),I=Date.now(),f=(0,S.removeNullish)({api_version:L,account:(0,S.parseHttpHeaderAsString)(N["Stripe-Account"]),idempotency_key:(0,S.parseHttpHeaderAsString)(N["Idempotency-Key"]),method:J,path:$,request_start_time:I}),y=q||0,EJ=this._getMaxNetworkRetries(z.settings||{});this._stripe._emitter.emit("request",f),b.then((R)=>{if(AJ._shouldRetry(R,y,EJ))return V(W,L,N,y,(0,S.parseHttpHeaderAsNumber)(R.getHeaders()["retry-after"]));else if(z.streaming&&R.getStatusCode()<400)return this._streamingResponseHandler(f,w,X)(R);else return this._jsonResponseHandler(f,Y,w,X)(R)}).catch((R)=>{if(AJ._shouldRetry(null,y,EJ,R))return V(W,L,N,y,null);else{let SX=R.code&&R.code===M9.HttpClient.TIMEOUT_ERROR_CODE;return X(new YJ.StripeConnectionError({message:SX?`Request aborted due to timeout being reached (${O}ms)`:AJ._generateConnectionErrorMessage(y),detail:R}))}})}).catch((b)=>{throw new YJ.StripeError({message:"Unable to authenticate the request",exception:b})})},D=(L,N)=>{if(L)return X(L);T=N,this._stripe.getClientUserAgent((q)=>{let O=this._stripe.getApiField("version"),k=this._makeHeaders({contentType:Y=="v2"?"application/json":"application/x-www-form-urlencoded",contentLength:this._getContentLength(N),apiVersion:O,clientUserAgent:q,method:J,userSuppliedHeaders:z.headers??null,userSuppliedSettings:z.settings??{},stripeAccount:z.stripeAccount??this._stripe.getApiField("stripeAccount"),stripeContext:this._normalizeStripeContext(z.stripeContext,this._stripe.getApiField("stripeContext")),apiMode:Y});W(O,k,0)})};if(K)K(J,Q,z.headers,D);else{let L;if(Y=="v2")L=Q?(0,S.jsonStringifyRequestData)(Q):"";else L=(0,S.queryStringifyRequestData)(Q||{});D(null,L)}}}j9.RequestSender=AJ});var a9=B((d9)=>{Object.defineProperty(d9,"__esModule",{value:!0});d9.makeAutoPaginationMethods=void 0;var z0=_();class GZ{constructor(J,Z,$,Q){this.index=0,this.pagePromise=J,this.promiseCache={currentPromise:null},this.requestArgs=Z,this.spec=$,this.stripeResource=Q}async iterate(J){if(!(J&&J.data&&typeof J.data.length==="number"))throw Error("Unexpected: Stripe API response does not have a well-formed `data` array.");let Z=c9(this.requestArgs);if(this.index<J.data.length){let $=Z?J.data.length-1-this.index:this.index,Q=J.data[$];return this.index+=1,{value:Q,done:!1}}else if(J.has_more){this.index=0,this.pagePromise=this.getNextPage(J);let $=await this.pagePromise;return this.iterate($)}return{done:!0,value:void 0}}getNextPage(J){throw Error("Unimplemented")}async _next(){return this.iterate(await this.pagePromise)}next(){if(this.promiseCache.currentPromise)return this.promiseCache.currentPromise;let J=(async()=>{let Z=await this._next();return this.promiseCache.currentPromise=null,Z})();return this.promiseCache.currentPromise=J,J}}class h9 extends GZ{getNextPage(J){let Z=c9(this.requestArgs),$=Fw(J,Z);return this.stripeResource._makeRequest(this.requestArgs,this.spec,{[Z?"ending_before":"starting_after"]:$})}}class l9 extends GZ{getNextPage(J){if(!J.next_page)throw Error("Unexpected: Stripe API response does not have a well-formed `next_page` field, but `has_more` was true.");return this.stripeResource._makeRequest(this.requestArgs,this.spec,{page:J.next_page})}}class u9{constructor(J,Z,$,Q){this.firstPagePromise=J,this.currentPageIterator=null,this.nextPageUrl=null,this.requestArgs=Z,this.spec=$,this.stripeResource=Q}async initFirstPage(){if(this.firstPagePromise){let J=await this.firstPagePromise;this.firstPagePromise=null,this.currentPageIterator=J.data[Symbol.iterator](),this.nextPageUrl=J.next_page_url||null}}async turnPage(){if(!this.nextPageUrl)return null;this.spec.fullPath=this.nextPageUrl;let J=await this.stripeResource._makeRequest([],this.spec,{});return this.nextPageUrl=J.next_page_url||null,this.currentPageIterator=J.data[Symbol.iterator](),this.currentPageIterator}async next(){if(await this.initFirstPage(),this.currentPageIterator){let $=this.currentPageIterator.next();if(!$.done)return{done:!1,value:$.value}}let J=await this.turnPage();if(!J)return{done:!0,value:void 0};let Z=J.next();if(!Z.done)return{done:!1,value:Z.value};return{done:!0,value:void 0}}}var qw=(J,Z,$,Q)=>{let G=(0,z0.getAPIMode)($.fullPath||$.path);if(G!=="v2"&&$.methodType==="search")return QZ(new l9(Q,Z,$,J));if(G!=="v2"&&$.methodType==="list")return QZ(new h9(Q,Z,$,J));if(G==="v2"&&$.methodType==="list")return QZ(new u9(Q,Z,$,J));return null};d9.makeAutoPaginationMethods=qw;var QZ=(J)=>{let Z=Cw((...G)=>J.next(...G)),$=Aw(Z),Q={autoPagingEach:Z,autoPagingToArray:$,next:()=>J.next(),return:()=>{return{}},[Ew()]:()=>{return Q}};return Q};function Ew(){if(typeof Symbol<"u"&&Symbol.asyncIterator)return Symbol.asyncIterator;return"@@asyncIterator"}function Ow(J){if(J.length<2)return null;let Z=J[1];if(typeof Z!=="function")throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof Z}`);return Z}function kw(J){if(J.length===0)return;let Z=J[0];if(typeof Z!=="function")throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof Z}`);if(Z.length===2)return Z;if(Z.length>2)throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${Z}`);return function(Q,G){let z=Z(Q);G(z)}}function Fw(J,Z){let $=Z?0:J.data.length-1,Q=J.data[$],G=Q&&Q.id;if(!G)throw Error("Unexpected: No `id` found on the last item while auto-paging a list.");return G}function Cw(J){return function(){let $=[].slice.call(arguments),Q=kw($),G=Ow($);if($.length>2)throw Error(`autoPagingEach takes up to two arguments; received ${$}`);let z=bw(J,Q);return(0,z0.callbackifyPromiseWithTimeout)(z,G)}}function Aw(J){return function($,Q){let G=$&&$.limit;if(!G)throw Error("You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.");if(G>1e4)throw Error("You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.");let z=new Promise((w,X)=>{let K=[];J((T)=>{if(K.push(T),K.length>=G)return!1}).then(()=>{w(K)}).catch(X)});return(0,z0.callbackifyPromiseWithTimeout)(z,Q)}}function bw(J,Z){return new Promise(($,Q)=>{function G(z){if(z.done){$();return}let w=z.value;return new Promise((X)=>{Z(w,X)}).then((X)=>{if(X===!1)return G({done:!0,value:void 0});else return J().then(G)})}J().then(G).catch(Q)})}function c9(J){let Z=[].slice.call(J);return!!(0,z0.getDataFromArgs)(Z).ending_before}});var s9=B((p9)=>{Object.defineProperty(p9,"__esModule",{value:!0});p9.stripeMethod=void 0;var i9=_(),vw=a9();function xw(J){if(J.path!==void 0&&J.fullPath!==void 0)throw Error(`Method spec specified both a 'path' (${J.path}) and a 'fullPath' (${J.fullPath}).`);return function(...Z){let $=typeof Z[Z.length-1]=="function"&&Z.pop();J.urlParams=(0,i9.extractUrlParams)(J.fullPath||this.createResourcePathWithSymbols(J.path||""));let Q=(0,i9.callbackifyPromiseWithTimeout)(this._makeRequest(Z,J,{}),$);return Object.assign(Q,(0,vw.makeAutoPaginationMethods)(this,Z,J,Q)),Q}}p9.stripeMethod=xw});var X0=B((t9)=>{Object.defineProperty(t9,"__esModule",{value:!0});t9.Decimal=t9.isDecimal=t9.DEFAULT_DIV_PRECISION=void 0;var Pw={"ubb-usage-count":{mode:"significant-figures",value:15},"v1-api":{mode:"decimal-places",value:12}};t9.DEFAULT_DIV_PRECISION=34;var r9=30,B0=1e6;class v{constructor(J,Z){let[$,Q]=v.normalize(J,Z);this._coefficient=$,this._exponent=Q,Object.freeze(this)}static normalize(J,Z){if(J===0n)return[0n,0];let $=J,Q=Z;while($!==0n&&$%10n===0n)$/=10n,Q+=1;return[$,Q]}static roundDivision(J,Z,$,Q){if(Z===0n)return J;if(Q==="round-down")return J;let G=Z>0n===$>0n?1n:-1n;if(Q==="round-up")return J+G;if(Q==="ceil")return G===1n?J+1n:J;if(Q==="floor")return G===-1n?J-1n:J;let z=Z<0n?-Z:Z,w=$<0n?-$:$,X=z*2n,K;if(X===w)K=0;else if(X<w)K=-1;else K=1;if(K<0)return J;if(K>0)return J+G;if(Q==="half-up")return J+G;if(Q==="half-down")return J;if(J%2n===0n)return J;else return J+G}add(J){let Z=J;if(this._exponent===Z._exponent)return new v(this._coefficient+Z._coefficient,this._exponent);if(this._exponent<Z._exponent){let $=10n**BigInt(Z._exponent-this._exponent);return new v(this._coefficient+Z._coefficient*$,this._exponent)}else{let $=10n**BigInt(this._exponent-Z._exponent);return new v(this._coefficient*$+Z._coefficient,Z._exponent)}}sub(J){let Z=J;if(this._exponent===Z._exponent)return new v(this._coefficient-Z._coefficient,this._exponent);if(this._exponent<Z._exponent){let $=10n**BigInt(Z._exponent-this._exponent);return new v(this._coefficient-Z._coefficient*$,this._exponent)}else{let $=10n**BigInt(this._exponent-Z._exponent);return new v(this._coefficient*$-Z._coefficient,Z._exponent)}}mul(J){let Z=J;return new v(this._coefficient*Z._coefficient,this._exponent+Z._exponent)}div(J,Z,$){if(Z<0||!Number.isInteger(Z))throw Error("precision must be a non-negative integer");let Q=J;if(Q._coefficient===0n)throw Error("Division by zero");let G=this._exponent-Q._exponent+Z,z,w,X;if(G>=0){let T=this._coefficient*10n**BigInt(G);z=T/Q._coefficient,w=T%Q._coefficient,X=Q._coefficient}else{let T=Q._coefficient*10n**BigInt(-G);z=this._coefficient/T,w=this._coefficient%T,X=T}let K=v.roundDivision(z,w,X,$);return new v(K,-Z)}cmp(J){let Z=J;if(this._exponent===Z._exponent){if(this._coefficient<Z._coefficient)return-1;if(this._coefficient>Z._coefficient)return 1;return 0}if(this._exponent<Z._exponent){let $=10n**BigInt(Z._exponent-this._exponent),Q=Z._coefficient*$;if(this._coefficient<Q)return-1;if(this._coefficient>Q)return 1;return 0}else{let $=10n**BigInt(this._exponent-Z._exponent),Q=this._coefficient*$;if(Q<Z._coefficient)return-1;if(Q>Z._coefficient)return 1;return 0}}eq(J){return this.cmp(J)===0}lt(J){return this.cmp(J)===-1}lte(J){return this.cmp(J)<=0}gt(J){return this.cmp(J)===1}gte(J){return this.cmp(J)>=0}isZero(){return this._coefficient===0n}isNegative(){return this._coefficient<0n}isPositive(){return this._coefficient>0n}neg(){return new v(-this._coefficient,this._exponent)}abs(){if(this._coefficient<0n)return new v(-this._coefficient,this._exponent);return this}round(J,Z){let $=typeof Z==="string"?Pw[Z]:Z;if($===void 0)throw Error(`Unknown rounding preset: "${Z}"`);if($.value<0||!Number.isInteger($.value))throw Error("DecimalRoundingOptions.value must be a non-negative integer");if($.mode==="decimal-places"){let Y=this.toFixed($.value,J);return t9.Decimal.from(Y)}if(this._coefficient===0n)return this;let G=(this._coefficient<0n?(-this._coefficient).toString():this._coefficient.toString()).length;if($.value===0)return t9.Decimal.zero;if(G<=$.value)return this;let z=G-$.value,w=10n**BigInt(z),X=this._coefficient/w,K=this._coefficient%w,T=v.roundDivision(X,K,w,J);return new v(T,this._exponent+z)}toString(){if(this._coefficient===0n)return"0";let J=this._coefficient.toString(),Z=J.startsWith("-"),$=Z?J.slice(1):J;if(this._exponent<0){let G=-this._exponent;if((G>=$.length?G-$.length:0)>r9){if($.length===1)return`${J}E${String(this._exponent)}`;let w=$[0]??"",X=$.slice(1),K=this._exponent+$.length-1;return`${Z?"-":""}${w}.${X}E${String(K)}`}if(G>=$.length){let w="0".repeat(G-$.length);return`${Z?"-":""}0.${w}${$}`}else{let w=$.slice(0,$.length-G),X=$.slice($.length-G);return`${Z?"-":""}${w}.${X}`}}if($.length+this._exponent<=r9){if(this._exponent===0)return J;let G="0".repeat(this._exponent);return`${Z?"-":""}${$}${G}`}else{if($.length===1)return`${J}E+${String(this._exponent)}`;let G=$[0]??"",z=$.slice(1),w=this._exponent+$.length-1;return`${Z?"-":""}${G}.${z}E+${String(w)}`}}toJSON(){return this.toString()}toNumber(){return Number(this.toString())}toFixed(J,Z){if(J<0||!Number.isInteger(J))throw Error("decimalPlaces must be a non-negative integer");let $=(G)=>{let z=G.toString(),w=z.startsWith("-"),X=w?z.slice(1):z;if(J===0)return z;if(J>=X.length){let K="0".repeat(J-X.length);return`${w?"-":""}0.${K}${X}`}else{let K=X.slice(0,X.length-J),T=X.slice(X.length-J);return`${w?"-":""}${K}.${T}`}},Q=-J;if(this._exponent===Q)return $(this._coefficient);if(this._exponent<Q){let G=Q-this._exponent,z=10n**BigInt(G),w=this._coefficient/z,X=this._coefficient%z,K=v.roundDivision(w,X,z,Z);return $(K)}else{let G=this._exponent-Q,z=this._coefficient*10n**BigInt(G);return $(z)}}valueOf(){return this.toString()}}function Iw(J){return J instanceof v}t9.isDecimal=Iw;t9.Decimal={from(J){if(typeof J==="bigint")return new v(J,0);if(typeof J==="number"){if(!Number.isFinite(J))throw Error("Number must be finite");return t9.Decimal.from(J.toString())}let Z=J.trim();if(Z==="")throw Error("Cannot parse empty string as Decimal");let $=/^([+-]?)(\d+)(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/.exec(Z);if(!$)throw Error(`Invalid decimal string: ${J}`);let Q=$[1]==="-"?-1n:1n,G=$[2]??"",z=$[3]??"",w=$[4]?Number($[4]):0;if(!Number.isSafeInteger(w)||w>B0||w<-B0)throw Error(`Exponent out of range: ${String($[4])} exceeds safe integer bounds`);let X=G+z,K=Q*BigInt(X),T=w-z.length;if(!Number.isSafeInteger(T)||T>B0||T<-B0)throw Error(`Computed exponent out of range: ${String(T)} exceeds safe integer bounds`);return new v(K,T)},zero:new v(0n,0)}});var J$=B((e9)=>{Object.defineProperty(e9,"__esModule",{value:!0});e9.coerceV2ResponseData=e9.coerceV2RequestData=void 0;var gw=X0(),Rw=(J,Z)=>{if(J==null)return J;switch(Z.kind){case"int64_string":return typeof J==="bigint"||typeof J==="number"?String(J):J;case"decimal_string":return typeof J.toFixed==="function"&&typeof J.isZero==="function"?J.toString():J;case"object":{if(typeof J!=="object"||Array.isArray(J))return J;let $=J,Q={};for(let G of Object.keys($)){let z=Z.fields[G];Q[G]=z?e9.coerceV2RequestData($[G],z):$[G]}return Q}case"array":{if(!Array.isArray(J))return J;return J.map(($)=>e9.coerceV2RequestData($,Z.element))}case"nullable":return e9.coerceV2RequestData(J,Z.inner)}};e9.coerceV2RequestData=Rw;var Sw=(J,Z)=>{if(J==null)return J;switch(Z.kind){case"int64_string":if(typeof J==="string")try{return BigInt(J)}catch{throw Error(`Failed to coerce int64_string value: expected an integer string, got '${J}'`)}return J;case"decimal_string":if(typeof J==="string")try{return gw.Decimal.from(J)}catch{throw Error(`Failed to coerce decimal_string value: expected a decimal string, got '${J}'`)}return J;case"object":{if(typeof J!=="object"||Array.isArray(J))return J;let $=J;for(let Q of Object.keys(Z.fields))if(Q in $)$[Q]=e9.coerceV2ResponseData($[Q],Z.fields[Q]);return $}case"array":{if(!Array.isArray(J))return J;for(let $=0;$<J.length;$++)J[$]=e9.coerceV2ResponseData(J[$],Z.element);return J}case"nullable":return e9.coerceV2ResponseData(J,Z.inner)}};e9.coerceV2ResponseData=Sw});var U=B(($$)=>{Object.defineProperty($$,"__esModule",{value:!0});$$.StripeResource=void 0;var r=_(),Mw=s9(),Z$=J$();xJ.extend=r.protoExtend;xJ.method=Mw.stripeMethod;xJ.MAX_BUFFERED_REQUEST_METRICS=100;function xJ(J,Z){if(this._stripe=J,Z)throw Error("Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.");this.basePath=(0,r.makeURLInterpolator)(this.basePath||J.getApiField("basePath")),this.resourcePath=this.path,this.path=(0,r.makeURLInterpolator)(this.path),this.initialize(...arguments)}$$.StripeResource=xJ;xJ.prototype={_stripe:null,path:"",resourcePath:"",basePath:null,initialize(){},requestDataProcessor:null,validateRequest:null,createFullPath(J,Z){let $=[this.basePath(Z),this.path(Z)];if(typeof J==="function"){let Q=J(Z);if(Q)$.push(Q)}else $.push(J);return this._joinUrlParts($)},createResourcePathWithSymbols(J){if(J)return`/${this._joinUrlParts([this.resourcePath,J])}`;else return`/${this.resourcePath}`},_joinUrlParts(J){return J.join("/").replace(/\/{2,}/g,"/")},_getRequestOpts(J,Z,$){let Q=(Z.method||"GET").toUpperCase(),G=Z.usage||[],z=Z.urlParams||[],w=Z.encode||((y)=>y),X=!!Z.fullPath,K=(0,r.makeURLInterpolator)(X?Z.fullPath:Z.path||""),T=X?Z.fullPath:this.createResourcePathWithSymbols(Z.path),Y=[].slice.call(J),V=z.reduce((y,EJ)=>{let R=Y.shift();if(typeof R!=="string")throw Error(`Stripe: Argument "${EJ}" must be a string, but got: ${R} (on API request to \`${Q} ${T}\`)`);return y[EJ]=R,y},{}),W=(0,r.getDataFromArgs)(Y),D=w(Object.assign({},W,$)),L=(0,r.getOptionsFromArgs)(Y),N=L.host||Z.host,q=!!Z.streaming||!!L.streaming;if(Y.filter((y)=>y!=null).length)throw Error(`Stripe: Unknown arguments (${Y}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${Q} \`${T}\`)`);let O=X?K(V):this.createFullPath(K,V),k=Object.assign(L.headers,Z.headers);if(Z.validator)Z.validator(D,{headers:k});let b=Z.method==="GET"||Z.method==="DELETE";return{requestMethod:Q,requestPath:O,bodyData:b?null:D,queryData:b?D:{},authenticator:L.authenticator??null,headers:k,host:N??null,streaming:q,settings:L.settings,usage:G}},_makeRequest(J,Z,$){return new Promise((Q,G)=>{let z;try{z=this._getRequestOpts(J,Z,$)}catch(V){G(V);return}if(Z.requestSchema&&z.bodyData)z.bodyData=(0,Z$.coerceV2RequestData)(z.bodyData,Z.requestSchema);function w(V,W){if(V)G(V);else try{if(Z.responseSchema)(0,Z$.coerceV2ResponseData)(W,Z.responseSchema);Q(Z.transformResponseData?Z.transformResponseData(W):W)}catch(D){G(D)}}let X=Object.keys(z.queryData).length===0,K=[z.requestPath,X?"":"?",(0,r.queryStringifyRequestData)(z.queryData)].join(""),{headers:T,settings:Y}=z;this._stripe._requestSender._request(z.requestMethod,z.host,K,z.bodyData,z.authenticator,{headers:T,settings:Y,streaming:z.streaming},z.usage,w,this.requestDataProcessor?.bind(this))})}}});var B$=B((G$)=>{Object.defineProperty(G$,"__esModule",{value:!0});G$.StripeContext=void 0;class wJ{constructor(J=[]){this._segments=[...J]}get segments(){return[...this._segments]}push(J){if(!J)throw Error("Segment cannot be null or undefined");return new wJ([...this._segments,J])}pop(){if(this._segments.length===0)throw Error("Cannot pop from an empty context");return new wJ(this._segments.slice(0,-1))}toString(){return this._segments.join("/")}static parse(J){if(!J)return new wJ([]);return new wJ(J.split("/"))}}G$.StripeContext=wJ});var w$=B((X$)=>{Object.defineProperty(X$,"__esModule",{value:!0});X$.createWebhooks=void 0;var n=CJ(),jw=OJ();function _w(J){let Z={DEFAULT_TOLERANCE:300,signature:null,constructEvent(Y,V,W,D,L,N){try{if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");this.signature.verifyHeader(Y,V,W,D||Z.DEFAULT_TOLERANCE,L,N)}catch(O){if(O instanceof jw.CryptoProviderOnlySupportsAsyncError)O.message+="\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`";throw O}let q=Y instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(Y)):JSON.parse(Y);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},async constructEventAsync(Y,V,W,D,L,N){if(!this.signature)throw Error("ERR: missing signature helper, unable to verify");await this.signature.verifyHeaderAsync(Y,V,W,D||Z.DEFAULT_TOLERANCE,L,N);let q=Y instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(Y)):JSON.parse(Y);if(q&&q.object==="v2.core.event")throw Error("You passed an event notification to stripe.webhooks.constructEvent, which expects a webhook payload. Use stripe.parseEventNotification instead.");return q},generateTestHeaderString:function(Y){let V=T(Y),W=V.signature||V.cryptoProvider.computeHMACSignature(V.payloadString,V.secret);return V.generateHeaderString(W)},generateTestHeaderStringAsync:async function(Y){let V=T(Y),W=V.signature||await V.cryptoProvider.computeHMACSignatureAsync(V.payloadString,V.secret);return V.generateHeaderString(W)}},$={EXPECTED_SCHEME:"v1",verifyHeader(Y,V,W,D,L,N){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:b}=G(Y,V,this.EXPECTED_SCHEME),I=/\s/.test(W);L=L||K();let f=L.computeHMACSignature(Q(O,k),W);return z(O,q,k,f,D,b,I,N),!0},async verifyHeaderAsync(Y,V,W,D,L,N){let{decodedHeader:q,decodedPayload:O,details:k,suspectPayloadType:b}=G(Y,V,this.EXPECTED_SCHEME),I=/\s/.test(W);L=L||K();let f=await L.computeHMACSignatureAsync(Q(O,k),W);return z(O,q,k,f,D,b,I,N)}};function Q(Y,V){return`${V.timestamp}.${Y}`}function G(Y,V,W){if(!Y)throw new n.StripeSignatureVerificationError(V,Y,{message:"No webhook payload was provided."});let D=typeof Y!="string"&&!(Y instanceof Uint8Array),L=new TextDecoder("utf8"),N=Y instanceof Uint8Array?L.decode(Y):Y;if(Array.isArray(V))throw Error("Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.");if(V==null||V=="")throw new n.StripeSignatureVerificationError(V,Y,{message:"No stripe-signature header value was provided."});let q=V instanceof Uint8Array?L.decode(V):V,O=w(q,W);if(!O||O.timestamp===-1)throw new n.StripeSignatureVerificationError(q,N,{message:"Unable to extract timestamp and signatures from header"});if(!O.signatures.length)throw new n.StripeSignatureVerificationError(q,N,{message:"No signatures found with expected scheme"});return{decodedPayload:N,decodedHeader:q,details:O,suspectPayloadType:D}}function z(Y,V,W,D,L,N,q,O){let k=!!W.signatures.filter(J.secureCompare.bind(J,D)).length,b=`
|
|
3
|
+
Learn more about webhook signing and explore webhook integration examples for various frameworks at https://docs.stripe.com/webhooks/signature`,I=q?`
|
|
4
4
|
|
|
5
|
-
Note: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value`:"";if(!
|
|
5
|
+
Note: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value`:"";if(!k){if(N)throw new n.StripeSignatureVerificationError(V,Y,{message:`Webhook payload must be provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the _raw_ request body.Payload was provided as a parsed JavaScript object instead.
|
|
6
6
|
Signature verification is impossible without access to the original signed material.
|
|
7
|
-
`+
|
|
8
|
-
`+
|
|
7
|
+
`+b+`
|
|
8
|
+
`+I});throw new n.StripeSignatureVerificationError(V,Y,{message:`No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
|
|
9
9
|
If a webhook request is being forwarded by a third-party tool, ensure that the exact request body, including JSON formatting and new line style, is preserved.
|
|
10
|
-
`+
|
|
11
|
-
`+z})}let E=Math.floor((typeof P==="number"?P:Date.now())/1000)-k.timestamp;if(o>0&&E>o)throw new J(s,r,{message:"Timestamp outside the tolerance zone"});return!0}function m(r,s){if(typeof r!=="string")return null;return r.split(",").reduce((k,h)=>{let o=h.split("=");if(o[0]==="t")k.timestamp=parseInt(o[1],10);if(o[0]===s)k.signatures.push(o[1]);return k},{timestamp:-1,signatures:[]})}let c=null;function _(){if(!c)c=n.createDefaultCryptoProvider();return c}function u(r){if(!r)throw new y({message:"Options are required"});let s=Math.floor(r.timestamp)||Math.floor(Date.now()/1000),k=r.scheme||l.EXPECTED_SCHEME,h=r.cryptoProvider||_(),o=`${s}.${r.payload}`;return{...r,timestamp:s,scheme:k,cryptoProvider:h,payloadString:o,generateHeaderString:(j)=>{return`t=${s},${k}=${j}`}}}return i.signature=l,i}var de="2026-03-25.dahlia";var un={};Li(un,{WebhookEndpoints:()=>la,V2:()=>Lc,Treasury:()=>Ac,Transfers:()=>ea,Topups:()=>ia,Tokens:()=>na,TestHelpers:()=>zc,Terminal:()=>Fc,TaxRates:()=>It,TaxIds:()=>Dt,TaxCodes:()=>Ht,Tax:()=>wc,Subscriptions:()=>Nt,SubscriptionSchedules:()=>Kt,SubscriptionItems:()=>Vt,Sources:()=>qt,Sigma:()=>Ec,ShippingRates:()=>Ut,SetupIntents:()=>Yt,SetupAttempts:()=>Rt,Reviews:()=>Mt,Reporting:()=>Gc,Refunds:()=>$t,Radar:()=>xc,Quotes:()=>Zt,PromotionCodes:()=>Xt,Products:()=>Qt,Prices:()=>Jt,Plans:()=>Bt,Payouts:()=>Lt,PaymentRecords:()=>At,PaymentMethods:()=>zt,PaymentMethodDomains:()=>Ft,PaymentMethodConfigurations:()=>wt,PaymentLinks:()=>Et,PaymentIntents:()=>Gt,PaymentAttemptRecords:()=>xt,OAuth:()=>pt,Mandates:()=>St,Issuing:()=>yc,Invoices:()=>vt,InvoiceRenderingTemplates:()=>Tt,InvoicePayments:()=>gt,InvoiceItems:()=>jt,Identity:()=>pc,Forwarding:()=>Oc,FinancialConnections:()=>Sc,Files:()=>ht,FileLinks:()=>ft,ExchangeRates:()=>ut,Events:()=>kt,EphemeralKeys:()=>ot,Entitlements:()=>vc,Disputes:()=>rt,Customers:()=>ct,CustomerSessions:()=>at,CreditNotes:()=>tt,Coupons:()=>dt,CountrySpecs:()=>lt,ConfirmationTokens:()=>it,Climate:()=>Tc,Checkout:()=>gc,Charges:()=>nt,BillingPortal:()=>Pc,Billing:()=>jc,BalanceTransactions:()=>Cd,BalanceSettings:()=>Dd,Balance:()=>Wd,Apps:()=>hc,ApplicationFees:()=>Nd,ApplePayDomains:()=>Kd,Accounts:()=>he,AccountSessions:()=>Vd,AccountLinks:()=>qd,Account:()=>he});function Ua(n,i){for(let l in i){if(!Object.prototype.hasOwnProperty.call(i,l))continue;let d=l[0].toLowerCase()+l.substring(1),t=new i[l](n);this[d]=t}}function v(n,i){return function(l){return new Ua(l,i)}}var qa=e.method,Ce=e.extend({create:qa({method:"POST",fullPath:"/v2/core/account_links"})});var nl=e.method,il=e.extend({create:nl({method:"POST",fullPath:"/v2/core/account_tokens",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:nl({method:"GET",fullPath:"/v2/core/account_tokens/{id}"})});var H=e.method,el=e.extend({retrieve:H({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:H({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:H({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:H({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:H({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:H({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:H({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})});var xn=e.method,ll=e.extend({create:xn({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:xn({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),update:xn({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),list:xn({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}),del:xn({method:"DELETE",fullPath:"/v2/core/accounts/{account_id}/persons/{id}"})});var dl=e.method,tl=e.extend({create:dl({method:"POST",fullPath:"/v2/core/accounts/{account_id}/person_tokens",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:dl({method:"GET",fullPath:"/v2/core/accounts/{account_id}/person_tokens/{id}"})});var Gn=e.method,al=e.extend({constructor:function(...n){e.apply(this,n),this.persons=new ll(...n),this.personTokens=new tl(...n)},create:Gn({method:"POST",fullPath:"/v2/core/accounts",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:Gn({method:"GET",fullPath:"/v2/core/accounts/{id}",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),update:Gn({method:"POST",fullPath:"/v2/core/accounts/{id}",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),list:Gn({method:"GET",fullPath:"/v2/core/accounts",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}}}}),close:Gn({method:"POST",fullPath:"/v2/core/accounts/{id}/close",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})});var cl=e.method,rl=e.extend({retrieve:cl({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:cl({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})});var tn=e.method,ml=e.extend({create:tn({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:tn({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:tn({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:tn({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:tn({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:tn({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})});var Va=e.method,ol=e.extend({find:Va({method:"GET",fullPath:"/v1/tax/associations/find"})});var En=e.method,sl=e.extend({retrieve:En({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),update:En({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),list:En({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}),approve:En({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),decline:En({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})});var D=e.method,kl=e.extend({create:D({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),capture:D({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),expire:D({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),finalizeAmount:D({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),increment:D({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),respond:D({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),reverse:D({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})});var te=e.method,_l=e.extend({create:te({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:te({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:te({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})});var ri=e.method,ul=e.extend({create:ri({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:ri({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:ri({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:ri({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})});var mi=e.method,fl=e.extend({create:mi({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:mi({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:mi({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:mi({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})});var wn=e.method,bl=e.extend({deliverCard:wn({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:wn({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:wn({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:wn({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"}),submitCard:wn({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/submit"})});var oi=e.method,hl=e.extend({create:oi({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:oi({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:oi({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:oi({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})});var Fn=e.method,jl=e.extend({create:Fn({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:Fn({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:Fn({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:Fn({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:Fn({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})});var Ka=e.method,Pl=e.extend({create:Ka({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})});var Na=e.method,gl=e.extend({create:Na({method:"POST",fullPath:"/v1/terminal/connection_tokens"})});var Wa=e.method,Tl=e.extend({retrieve:Wa({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})});var vl=e.method,Sl=e.extend({retrieve:vl({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:vl({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})});var an=e.method,Ol=e.extend({create:an({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:an({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:an({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:an({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:an({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:an({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})});var ae=e.method,pl=e.extend({create:ae({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:ae({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:ae({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})});var Ha=e.method,yl=e.extend({fundCashBalance:Ha({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})});var ce=e.method,xl=e.extend({create:ce({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:ce({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:ce({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})});var zn=e.method,Gl=e.extend({create:zn({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:zn({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:zn({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:zn({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:zn({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})});var El=e.method,wl=e.extend({retrieve:El({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:El({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})});var q=e.method,Fl=e.extend({create:q({method:"POST",fullPath:"/v2/core/event_destinations"}),retrieve:q({method:"GET",fullPath:"/v2/core/event_destinations/{id}"}),update:q({method:"POST",fullPath:"/v2/core/event_destinations/{id}"}),list:q({method:"GET",fullPath:"/v2/core/event_destinations",methodType:"list"}),del:q({method:"DELETE",fullPath:"/v2/core/event_destinations/{id}"}),disable:q({method:"POST",fullPath:"/v2/core/event_destinations/{id}/disable"}),enable:q({method:"POST",fullPath:"/v2/core/event_destinations/{id}/enable"}),ping:q({method:"POST",fullPath:"/v2/core/event_destinations/{id}/ping"})});var re=e.method,zl=e.extend({retrieve(...n){return re({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:(l)=>{return this.addFetchRelatedObjectIfNeeded(l)}}).apply(this,n)},list(...n){return re({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:(l)=>{return{...l,data:l.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))}}}).apply(this,n)},addFetchRelatedObjectIfNeeded(n){if(!n.related_object||!n.related_object.url)return n;return{...n,fetchRelatedObject:()=>re({method:"GET",fullPath:n.related_object.url}).apply(this,[{stripeContext:n.context,headers:{"Stripe-Request-Trigger":`event=${n.id}`}}])}}});var si=e.method,Al=e.extend({create:si({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:si({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:si({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:si({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})});var I=e.method,Ll=e.extend({create:I({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:I({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:I({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:I({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),close:I({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/close"}),retrieveFeatures:I({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:I({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})});var me=e.method,Bl=e.extend({fail:me({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:me({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:me({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})});var ki=e.method,Jl=e.extend({create:ki({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:ki({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:ki({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:ki({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})});var An=e.method,Ql=e.extend({create:An({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:An({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:An({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:An({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:An({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})});var Da=e.method,Xl=e.extend({create:Da({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})});var Ia=e.method,Zl=e.extend({create:Ia({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})});var Ca=e.method,$l=e.extend({create:Ca({method:"POST",fullPath:"/v2/billing/meter_event_session"})});var nc=e.method,Ml=e.extend({create:nc({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})});var ic=e.method,Rl=e.extend({create:ic({method:"POST",fullPath:"/v1/billing/meter_events"})});var ec=e.method,Yl=e.extend({create:ec({method:"POST",fullPath:"/v2/billing/meter_events"})});var C=e.method,Ul=e.extend({create:C({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:C({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:C({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:C({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:C({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:C({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:C({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})});var lc=e.method,ql=e.extend({create:lc({method:"POST",fullPath:"/v1/terminal/onboarding_links"})});var Ln=e.method,Vl=e.extend({create:Ln({method:"POST",fullPath:"/v1/climate/orders",requestSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),retrieve:Ln({method:"GET",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),update:Ln({method:"POST",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),list:Ln({method:"GET",fullPath:"/v1/climate/orders",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}}}}),cancel:Ln({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})});var _i=e.method,Kl=e.extend({update:_i({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:_i({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:_i({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:_i({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})});var ui=e.method,Nl=e.extend({create:ui({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:ui({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:ui({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:ui({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})});var fi=e.method,Wl=e.extend({update:fi({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:fi({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:fi({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:fi({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})});var bi=e.method,Hl=e.extend({create:bi({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:bi({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:bi({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:bi({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})});var dc=e.method,Dl=e.extend({create:dc({method:"POST",fullPath:"/v1/radar/payment_evaluations"})});var hi=e.method,Il=e.extend({create:hi({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:hi({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:hi({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:hi({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})});var oe=e.method,Cl=e.extend({activate:oe({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:oe({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:oe({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})});var nd=e.method,id=e.extend({retrieve:nd({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:nd({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})});var ed=e.method,ld=e.extend({retrieve:ed({method:"GET",fullPath:"/v1/climate/products/{product}",responseSchema:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}),list:ed({method:"GET",fullPath:"/v1/climate/products",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}}}})});var L=e.method,dd=e.extend({create:L({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:L({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:L({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:L({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:L({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:L({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),collectInputs:L({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_inputs"}),collectPaymentMethod:L({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_payment_method"}),confirmPaymentIntent:L({method:"POST",fullPath:"/v1/terminal/readers/{reader}/confirm_payment_intent"}),processPaymentIntent:L({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:L({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:L({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:L({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})});var se=e.method,td=e.extend({presentPaymentMethod:se({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"}),succeedInputCollection:se({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection"}),timeoutInputCollection:se({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection"})});var tc=e.method,ad=e.extend({create:tc({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})});var cd=e.method,rd=e.extend({retrieve:cd({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:cd({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})});var ac=e.method,md=e.extend({create:ac({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})});var od=e.method,sd=e.extend({retrieve:od({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:od({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})});var cc=e.method,kd=e.extend({expire:cc({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})});var ji=e.method,_d=e.extend({create:ji({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:ji({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:ji({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:ji({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})});var ke=e.method,ud=e.extend({create:ke({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:ke({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:ke({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})});var fd=e.method,bd=e.extend({retrieve:fd({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:fd({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})});var _e=e.method,hd=e.extend({create:_e({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:_e({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:_e({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})});var jd=e.method,Pd=e.extend({retrieve:jd({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:jd({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})});var Pi=e.method,gd=e.extend({create:Pi({method:"POST",fullPath:"/v1/apps/secrets"}),list:Pi({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:Pi({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:Pi({method:"GET",fullPath:"/v1/apps/secrets/find"})});var rc=e.method,Td=e.extend({create:rc({method:"POST",fullPath:"/v1/billing_portal/sessions"})});var cn=e.method,vd=e.extend({create:cn({method:"POST",fullPath:"/v1/checkout/sessions",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:cn({method:"GET",fullPath:"/v1/checkout/sessions/{session}",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:cn({method:"POST",fullPath:"/v1/checkout/sessions/{session}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:cn({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),expire:cn({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:cn({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})});var Sd=e.method,Od=e.extend({create:Sd({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:Sd({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})});var pd=e.method,yd=e.extend({retrieve:pd({method:"GET",fullPath:"/v1/tax/settings"}),update:pd({method:"POST",fullPath:"/v1/tax/settings"})});var xd=e.method,Gd=e.extend({retrieve:xd({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:xd({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})});var Bn=e.method,Ed=e.extend({create:Bn({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:Bn({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:Bn({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:Bn({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:Bn({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})});var ue=e.method,wd=e.extend({retrieve:ue({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:ue({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:ue({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})});var Fd=e.method,zd=e.extend({retrieve:Fd({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}",responseSchema:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}),list:Fd({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}})});var Ad=e.method,Ld=e.extend({retrieve:Ad({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:Ad({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})});var fe=e.method,Bd=e.extend({retrieve:fe({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),update:fe({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),list:fe({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})});var gi=e.method,Jd=e.extend({retrieve:gi({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:gi({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:gi({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:gi({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})});var be=e.method,Qd=e.extend({createForceCapture:be({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),createUnlinkedRefund:be({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),refund:be({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})});var Xd=e.method,Zd=e.extend({retrieve:Xd({method:"GET",fullPath:"/v1/treasury/transactions/{id}",responseSchema:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}),list:Xd({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}}}})});var Ti=e.method,$d=e.extend({create:Ti({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:Ti({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:Ti({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:Ti({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})});var Jn=e.method,Md=e.extend({create:Jn({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:Jn({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:Jn({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:Jn({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:Jn({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})});var Rd=e.method,Yd=e.extend({retrieve:Rd({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:Rd({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})});var rn=e.method,Ud=e.extend({create:rn({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:rn({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:rn({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:rn({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:rn({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:rn({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})});var S=e.method,he=e.extend({create:S({method:"POST",fullPath:"/v1/accounts"}),retrieve(n,...i){if(typeof n==="string")return S({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[n,...i]);else{if(n===null||n===void 0)[].shift.apply([n,...i]);return S({method:"GET",fullPath:"/v1/account"}).apply(this,[n,...i])}},update:S({method:"POST",fullPath:"/v1/accounts/{account}"}),list:S({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:S({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:S({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:S({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:S({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:S({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:S({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:S({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:S({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:S({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:S({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:S({method:"GET",fullPath:"/v1/account"}),retrieveCapability:S({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:S({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:S({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:S({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:S({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:S({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})});var mc=e.method,qd=e.extend({create:mc({method:"POST",fullPath:"/v1/account_links"})});var oc=e.method,Vd=e.extend({create:oc({method:"POST",fullPath:"/v1/account_sessions"})});var vi=e.method,Kd=e.extend({create:vi({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:vi({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:vi({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:vi({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})});var mn=e.method,Nd=e.extend({retrieve:mn({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:mn({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:mn({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:mn({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:mn({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:mn({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})});var sc=e.method,Wd=e.extend({retrieve:sc({method:"GET",fullPath:"/v1/balance"})});var Hd=e.method,Dd=e.extend({retrieve:Hd({method:"GET",fullPath:"/v1/balance_settings"}),update:Hd({method:"POST",fullPath:"/v1/balance_settings"})});var Id=e.method,Cd=e.extend({retrieve:Id({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:Id({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})});var on=e.method,nt=e.extend({create:on({method:"POST",fullPath:"/v1/charges"}),retrieve:on({method:"GET",fullPath:"/v1/charges/{charge}"}),update:on({method:"POST",fullPath:"/v1/charges/{charge}"}),list:on({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:on({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:on({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})});var kc=e.method,it=e.extend({retrieve:kc({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})});var et=e.method,lt=e.extend({retrieve:et({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:et({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})});var Qn=e.method,dt=e.extend({create:Qn({method:"POST",fullPath:"/v1/coupons"}),retrieve:Qn({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:Qn({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:Qn({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:Qn({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})});var V=e.method,tt=e.extend({create:V({method:"POST",fullPath:"/v1/credit_notes",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:V({method:"GET",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:V({method:"POST",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:V({method:"GET",fullPath:"/v1/credit_notes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:V({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),listPreviewLineItems:V({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),preview:V({method:"GET",fullPath:"/v1/credit_notes/preview",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),voidCreditNote:V({method:"POST",fullPath:"/v1/credit_notes/{id}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})});var _c=e.method,at=e.extend({create:_c({method:"POST",fullPath:"/v1/customer_sessions"})});var T=e.method,ct=e.extend({create:T({method:"POST",fullPath:"/v1/customers",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:T({method:"GET",fullPath:"/v1/customers/{customer}"}),update:T({method:"POST",fullPath:"/v1/customers/{customer}",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:T({method:"GET",fullPath:"/v1/customers",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),del:T({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:T({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:T({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:T({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:T({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:T({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:T({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:T({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:T({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:T({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:T({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:T({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:T({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:T({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:T({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:T({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:T({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:T({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:T({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:T({method:"GET",fullPath:"/v1/customers/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),updateBalanceTransaction:T({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:T({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:T({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:T({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})});var Si=e.method,rt=e.extend({retrieve:Si({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:Si({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:Si({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:Si({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})});var mt=e.method,ot=e.extend({create:mt({method:"POST",fullPath:"/v1/ephemeral_keys",validator:(n,i)=>{if(!i.headers||!i.headers["Stripe-Version"])throw Error("Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node")}}),del:mt({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})});var st=e.method,kt=e.extend({retrieve:st({method:"GET",fullPath:"/v1/events/{id}"}),list:st({method:"GET",fullPath:"/v1/events",methodType:"list"})});var _t=e.method,ut=e.extend({retrieve:_t({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:_t({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})});var Oi=e.method,ft=e.extend({create:Oi({method:"POST",fullPath:"/v1/file_links"}),retrieve:Oi({method:"GET",fullPath:"/v1/file_links/{link}"}),update:Oi({method:"POST",fullPath:"/v1/file_links/{link}"}),list:Oi({method:"GET",fullPath:"/v1/file_links",methodType:"list"})});var uc=(n,i,l)=>{let d=(Math.round(Math.random()*10000000000000000)+Math.round(Math.random()*10000000000000000)).toString();l["Content-Type"]=`multipart/form-data; boundary=${d}`;let t=new TextEncoder,a=new Uint8Array(0),m=t.encode(`\r
|
|
12
|
-
`);function c(r){let s=a,k=r instanceof Uint8Array?r:new Uint8Array(t.encode(r));a=new Uint8Array(s.length+k.length+2),a.set(s),a.set(k,s.length),a.set(m,a.length-2)}function _(r){return`"${r.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}let u=Ze(i);for(let r in u){if(!Object.prototype.hasOwnProperty.call(u,r))continue;let s=u[r];if(c(`--${d}`),Object.prototype.hasOwnProperty.call(s,"data")){let k=s;c(`Content-Disposition: form-data; name=${_(r)}; filename=${_(k.name||"blob")}`),c(`Content-Type: ${k.type||"application/octet-stream"}`),c(""),c(k.data)}else c(`Content-Disposition: form-data; name=${_(r)}`),c(""),c(s)}return c(`--${d}--`),a};function bt(n,i,l,d){if(i=i||{},n!=="POST")return d(null,Y(i));this._stripe._platformFunctions.tryBufferData(i).then((t)=>{let a=uc(n,t,l);return d(null,a)}).catch((t)=>d(t,null))}var je=e.method,ht=e.extend({create:je({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:je({method:"GET",fullPath:"/v1/files/{file}"}),list:je({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:bt});var Xn=e.method,jt=e.extend({create:Xn({method:"POST",fullPath:"/v1/invoiceitems",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),retrieve:Xn({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}",responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),update:Xn({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),list:Xn({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}}}}),del:Xn({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})});var Pt=e.method,gt=e.extend({retrieve:Pt({method:"GET",fullPath:"/v1/invoice_payments/{invoice_payment}"}),list:Pt({method:"GET",fullPath:"/v1/invoice_payments",methodType:"list"})});var pi=e.method,Tt=e.extend({retrieve:pi({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:pi({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:pi({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:pi({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})});var G=e.method,vt=e.extend({create:G({method:"POST",fullPath:"/v1/invoices",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:G({method:"GET",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:G({method:"POST",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:G({method:"GET",fullPath:"/v1/invoices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),del:G({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:G({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),attachPayment:G({method:"POST",fullPath:"/v1/invoices/{invoice}/attach_payment",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),createPreview:G({method:"POST",fullPath:"/v1/invoices/create_preview",requestSchema:{kind:"object",fields:{invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},schedule_details:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}},subscription_details:{kind:"object",fields:{items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),finalizeInvoice:G({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),listLineItems:G({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),markUncollectible:G({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),pay:G({method:"POST",fullPath:"/v1/invoices/{invoice}/pay",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),removeLines:G({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),search:G({method:"GET",fullPath:"/v1/invoices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),sendInvoice:G({method:"POST",fullPath:"/v1/invoices/{invoice}/send",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLines:G({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLineItem:G({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),voidInvoice:G({method:"POST",fullPath:"/v1/invoices/{invoice}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})});var fc=e.method,St=e.extend({retrieve:fc({method:"GET",fullPath:"/v1/mandates/{mandate}"})});var Ot=e.method,Pe="connect.stripe.com",pt=e.extend({basePath:"/",authorizeUrl(n,i){n=n||{},i=i||{};let l="oauth/authorize";if(i.express)l=`express/${l}`;if(!n.response_type)n.response_type="code";if(!n.client_id)n.client_id=this._stripe.getClientId();if(!n.scope)n.scope="read_write";return`https://${Pe}/${l}?${Y(n)}`},token:Ot({method:"POST",path:"oauth/token",host:Pe}),deauthorize(n,...i){if(!n.client_id)n.client_id=this._stripe.getClientId();return Ot({method:"POST",path:"oauth/deauthorize",host:Pe}).apply(this,[n,...i])}});var yt=e.method,xt=e.extend({retrieve:yt({method:"GET",fullPath:"/v1/payment_attempt_records/{id}"}),list:yt({method:"GET",fullPath:"/v1/payment_attempt_records",methodType:"list"})});var B=e.method,Gt=e.extend({create:B({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:B({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:B({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:B({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:B({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:B({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:B({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:B({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:B({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),listAmountDetailsLineItems:B({method:"GET",fullPath:"/v1/payment_intents/{intent}/amount_details_line_items",methodType:"list"}),search:B({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:B({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})});var Zn=e.method,Et=e.extend({create:Zn({method:"POST",fullPath:"/v1/payment_links",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:Zn({method:"GET",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:Zn({method:"POST",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:Zn({method:"GET",fullPath:"/v1/payment_links",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),listLineItems:Zn({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})});var yi=e.method,wt=e.extend({create:yi({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:yi({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:yi({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:yi({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})});var $n=e.method,Ft=e.extend({create:$n({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:$n({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:$n({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:$n({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:$n({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})});var sn=e.method,zt=e.extend({create:sn({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:sn({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:sn({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:sn({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:sn({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:sn({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})});var K=e.method,At=e.extend({retrieve:K({method:"GET",fullPath:"/v1/payment_records/{id}"}),reportPayment:K({method:"POST",fullPath:"/v1/payment_records/report_payment"}),reportPaymentAttempt:K({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt"}),reportPaymentAttemptCanceled:K({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_canceled"}),reportPaymentAttemptFailed:K({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_failed"}),reportPaymentAttemptGuaranteed:K({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_guaranteed"}),reportPaymentAttemptInformational:K({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_informational"}),reportRefund:K({method:"POST",fullPath:"/v1/payment_records/{id}/report_refund"})});var kn=e.method,Lt=e.extend({create:kn({method:"POST",fullPath:"/v1/payouts"}),retrieve:kn({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:kn({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:kn({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:kn({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:kn({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})});var Mn=e.method,Bt=e.extend({create:Mn({method:"POST",fullPath:"/v1/plans",requestSchema:{kind:"object",fields:{amount_decimal:{kind:"decimal_string"},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),retrieve:Mn({method:"GET",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),update:Mn({method:"POST",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),list:Mn({method:"GET",fullPath:"/v1/plans",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),del:Mn({method:"DELETE",fullPath:"/v1/plans/{plan}"})});var Rn=e.method,Jt=e.extend({create:Rn({method:"POST",fullPath:"/v1/prices",requestSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),retrieve:Rn({method:"GET",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),update:Rn({method:"POST",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),list:Rn({method:"GET",fullPath:"/v1/prices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),search:Rn({method:"GET",fullPath:"/v1/prices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})});var Q=e.method,Qt=e.extend({create:Q({method:"POST",fullPath:"/v1/products",requestSchema:{kind:"object",fields:{default_price_data:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}}}}),retrieve:Q({method:"GET",fullPath:"/v1/products/{id}"}),update:Q({method:"POST",fullPath:"/v1/products/{id}"}),list:Q({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:Q({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:Q({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:Q({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:Q({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:Q({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:Q({method:"GET",fullPath:"/v1/products/search",methodType:"search"})});var xi=e.method,Xt=e.extend({create:xi({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:xi({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:xi({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:xi({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})});var X=e.method,Zt=e.extend({create:X({method:"POST",fullPath:"/v1/quotes",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:X({method:"GET",fullPath:"/v1/quotes/{quote}",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),update:X({method:"POST",fullPath:"/v1/quotes/{quote}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:X({method:"GET",fullPath:"/v1/quotes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),accept:X({method:"POST",fullPath:"/v1/quotes/{quote}/accept",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),cancel:X({method:"POST",fullPath:"/v1/quotes/{quote}/cancel",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),finalizeQuote:X({method:"POST",fullPath:"/v1/quotes/{quote}/finalize",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),listComputedUpfrontLineItems:X({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),listLineItems:X({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),pdf:X({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})});var Yn=e.method,$t=e.extend({create:Yn({method:"POST",fullPath:"/v1/refunds"}),retrieve:Yn({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:Yn({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:Yn({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:Yn({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})});var ge=e.method,Mt=e.extend({retrieve:ge({method:"GET",fullPath:"/v1/reviews/{review}"}),list:ge({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:ge({method:"POST",fullPath:"/v1/reviews/{review}/approve"})});var bc=e.method,Rt=e.extend({list:bc({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})});var nn=e.method,Yt=e.extend({create:nn({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:nn({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:nn({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:nn({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:nn({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:nn({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:nn({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})});var Gi=e.method,Ut=e.extend({create:Gi({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:Gi({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:Gi({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:Gi({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})});var Un=e.method,qt=e.extend({create:Un({method:"POST",fullPath:"/v1/sources"}),retrieve:Un({method:"GET",fullPath:"/v1/sources/{source}"}),update:Un({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:Un({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:Un({method:"POST",fullPath:"/v1/sources/{source}/verify"})});var qn=e.method,Vt=e.extend({create:qn({method:"POST",fullPath:"/v1/subscription_items",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),retrieve:qn({method:"GET",fullPath:"/v1/subscription_items/{item}",responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),update:qn({method:"POST",fullPath:"/v1/subscription_items/{item}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),list:qn({method:"GET",fullPath:"/v1/subscription_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),del:qn({method:"DELETE",fullPath:"/v1/subscription_items/{item}"})});var _n=e.method,Kt=e.extend({create:_n({method:"POST",fullPath:"/v1/subscription_schedules",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:_n({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:_n({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),list:_n({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:_n({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:_n({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})});var M=e.method,Nt=e.extend({create:M({method:"POST",fullPath:"/v1/subscriptions",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:M({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),update:M({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),list:M({method:"GET",fullPath:"/v1/subscriptions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}),cancel:M({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),deleteDiscount:M({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),migrate:M({method:"POST",fullPath:"/v1/subscriptions/{subscription}/migrate",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),resume:M({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),search:M({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}})});var Wt=e.method,Ht=e.extend({retrieve:Wt({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:Wt({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})});var Ei=e.method,Dt=e.extend({create:Ei({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:Ei({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:Ei({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:Ei({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})});var wi=e.method,It=e.extend({create:wi({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:wi({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:wi({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:wi({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})});var Ct=e.method,na=e.extend({create:Ct({method:"POST",fullPath:"/v1/tokens"}),retrieve:Ct({method:"GET",fullPath:"/v1/tokens/{token}"})});var Vn=e.method,ia=e.extend({create:Vn({method:"POST",fullPath:"/v1/topups"}),retrieve:Vn({method:"GET",fullPath:"/v1/topups/{topup}"}),update:Vn({method:"POST",fullPath:"/v1/topups/{topup}"}),list:Vn({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:Vn({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})});var N=e.method,ea=e.extend({create:N({method:"POST",fullPath:"/v1/transfers"}),retrieve:N({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:N({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:N({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:N({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:N({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:N({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:N({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})});var Kn=e.method,la=e.extend({create:Kn({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:Kn({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:Kn({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:Kn({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:Kn({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})});var hc=v("apps",{Secrets:gd}),jc=v("billing",{Alerts:ml,CreditBalanceSummary:Tl,CreditBalanceTransactions:Sl,CreditGrants:Ol,MeterEventAdjustments:Xl,MeterEvents:Rl,Meters:Ul}),Pc=v("billingPortal",{Configurations:hl,Sessions:Td}),gc=v("checkout",{Sessions:vd}),Tc=v("climate",{Orders:Vl,Products:ld,Suppliers:Gd}),vc=v("entitlements",{ActiveEntitlements:rl,Features:Al}),Sc=v("financialConnections",{Accounts:el,Sessions:Od,Transactions:Ld}),Oc=v("forwarding",{Requests:hd}),pc=v("identity",{VerificationReports:Yd,VerificationSessions:Ud}),yc=v("issuing",{Authorizations:sl,Cardholders:ul,Cards:fl,Disputes:Gl,PersonalizationDesigns:Il,PhysicalBundles:id,Tokens:wd,Transactions:Bd}),xc=v("radar",{EarlyFraudWarnings:wl,PaymentEvaluations:Dl,ValueListItems:$d,ValueLists:Md}),Gc=v("reporting",{ReportRuns:ud,ReportTypes:bd}),Ec=v("sigma",{ScheduledQueryRuns:Pd}),wc=v("tax",{Associations:ol,Calculations:_l,Registrations:_d,Settings:yd,Transactions:Jd}),Fc=v("terminal",{Configurations:jl,ConnectionTokens:gl,Locations:Ql,OnboardingLinks:ql,Readers:dd}),zc=v("testHelpers",{ConfirmationTokens:Pl,Customers:yl,Refunds:kd,TestClocks:Ed,Issuing:v("issuing",{Authorizations:kl,Cards:bl,PersonalizationDesigns:Cl,Transactions:Qd}),Terminal:v("terminal",{Readers:td}),Treasury:v("treasury",{InboundTransfers:Bl,OutboundPayments:Kl,OutboundTransfers:Wl,ReceivedCredits:ad,ReceivedDebits:md})}),Ac=v("treasury",{CreditReversals:pl,DebitReversals:xl,FinancialAccounts:Ll,InboundTransfers:Jl,OutboundPayments:Nl,OutboundTransfers:Hl,ReceivedCredits:rd,ReceivedDebits:sd,TransactionEntries:zd,Transactions:Zd}),Lc=v("v2",{Billing:v("billing",{MeterEventAdjustments:Zl,MeterEventSession:$l,MeterEventStream:Ml,MeterEvents:Yl}),Core:v("core",{AccountLinks:Ce,AccountTokens:il,Accounts:al,EventDestinations:Fl,Events:zl})});var da="api.stripe.com",ta="443",aa="/v1/",ca=de,ra=80000,ma=5,oa=0.5,Bc=["name","version","url","partner_id"],sa=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],Jc=(n)=>new dn(n,e.MAX_BUFFERED_REQUEST_METRICS);function ka(n,i=Jc){d.PACKAGE_VERSION="21.0.1",d.API_VERSION=de;let l=typeof process<"u"&&process.env?Me(process.env):"";d.AI_AGENT=l,d.USER_AGENT={bindings_version:d.PACKAGE_VERSION,lang:"node",typescript:!1,...$e(),...l?{ai_agent:l}:{}},d.StripeResource=e,d.StripeContext=U,d.resources=un,d.HttpClient=F,d.HttpClientResponse=Pn,d.CryptoProvider=Tn,d.webhooks=Ie(n),d.Decimal=$;function d(t,a={}){if(!(this instanceof d))return new d(t,a);let m=this._getPropsFromConfig(a);this._platformFunctions=n,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=d.PACKAGE_VERSION,this.on=this._emitter.on.bind(this._emitter),this.once=this._emitter.once.bind(this._emitter),this.off=this._emitter.removeListener.bind(this._emitter);let c=m.httpAgent||null;this._api={host:m.host||da,port:m.port||ta,protocol:m.protocol||"https",basePath:aa,version:m.apiVersion||ca,timeout:ii("timeout",m.timeout,ra),maxNetworkRetries:ii("maxNetworkRetries",m.maxNetworkRetries,2),agent:c,httpClient:m.httpClient||(c?this._platformFunctions.createNodeHttpClient(c):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:m.stripeAccount||null,stripeContext:m.stripeContext||null};let _=m.typescript||!1;if(_!==d.USER_AGENT.typescript)d.USER_AGENT.typescript=_;if(m.appInfo)this._setAppInfo(m.appInfo);this._prepResources(),this._setAuthenticator(t,m.authenticator),this.errors=ci,this.webhooks=d.webhooks,this._prevRequestMetrics=[],this._enableTelemetry=m.telemetry!==!1,this._requestSender=i(this),this.StripeResource=d.StripeResource,this.Decimal=d.Decimal}return d.errors=ci,d.createNodeHttpClient=n.createNodeHttpClient,d.createFetchHttpClient=n.createFetchHttpClient,d.createNodeCryptoProvider=n.createNodeCryptoProvider,d.createSubtleCryptoProvider=n.createSubtleCryptoProvider,d.prototype={_appInfo:void 0,on:null,off:null,once:null,VERSION:null,StripeResource:null,webhooks:null,errors:null,_api:null,_prevRequestMetrics:null,_emitter:null,_enableTelemetry:null,_requestSender:null,_platformFunctions:null,rawRequest(t,a,m,c){return this._requestSender._rawRequest(t,a,m,c)},_setAuthenticator(t,a){if(t&&a)throw Error("Can't specify both apiKey and authenticator");if(!t&&!a)throw Error("Neither apiKey nor config.authenticator provided");this._authenticator=t?Dn(t):a},_setAppInfo(t){if(t&&typeof t!=="object")throw Error("AppInfo must be an object.");if(t&&!t.name)throw Error("AppInfo.name is required");t=t||{},this._appInfo=Bc.reduce((a,m)=>{if(typeof t[m]=="string")a=a||{},a[m]=t[m];return a},{})},_setApiField(t,a){this._api[t]=a},getApiField(t){return this._api[t]},setClientId(t){this._clientId=t},getClientId(){return this._clientId},getConstant:(t)=>{switch(t){case"DEFAULT_HOST":return da;case"DEFAULT_PORT":return ta;case"DEFAULT_BASE_PATH":return aa;case"DEFAULT_API_VERSION":return ca;case"DEFAULT_TIMEOUT":return ra;case"MAX_NETWORK_RETRY_DELAY_SEC":return ma;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return oa}return d[t]},getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(t,a,m){let c=ii(t,a,m);this._setApiField(t,c)},getMaxNetworkRetryDelay(){return ma},getInitialNetworkRetryDelay(){return oa},getClientUserAgent(t){return this.getClientUserAgentSeeded(d.USER_AGENT,t)},getClientUserAgentSeeded(t,a){let m={};for(let u in t){if(!Object.prototype.hasOwnProperty.call(t,u))continue;m[u]=encodeURIComponent(t[u]??"null")}let c=this._platformFunctions.getPlatformInfo();if(c&&this.getTelemetryEnabled())m.platform=encodeURIComponent(c);else delete m.platform;let _=this.getApiField("httpClient");if(_)m.httplib=encodeURIComponent(_.getClientName());if(this._appInfo)m.application=this._appInfo;a(JSON.stringify(m))},getAppInfoAsString(){if(!this._appInfo)return"";let t=this._appInfo.name;if(this._appInfo.version)t+=`/${this._appInfo.version}`;if(this._appInfo.url)t+=` (${this._appInfo.url})`;return t},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let t in un){if(!Object.prototype.hasOwnProperty.call(un,t))continue;this[Xe(t)]=new un[t](this)}},_getPropsFromConfig(t){if(!t)return{};let a=typeof t==="string";if(!(t===Object(t)&&!Array.isArray(t))&&!a)throw Error("Config must either be an object or a string");if(a)return{apiVersion:t};if(Object.keys(t).filter((_)=>!sa.includes(_)).length>0)throw Error(`Config object may only contain the following: ${sa.join(", ")}`);return t},parseEventNotification(t,a,m,c,_,u){this.webhooks.signature.verifyHeader(t,a,m,c||this.webhooks.DEFAULT_TOLERANCE,_,u);let r=t instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(t)):JSON.parse(t);if(r&&r.object==="event")throw Error("You passed a webhook payload to stripe.parseEventNotification, which expects an event notification. Use stripe.webhooks.constructEvent instead.");if(r.context)r.context=U.parse(r.context);return r.fetchEvent=()=>{return this._requestSender._rawRequest("GET",`/v2/core/events/${r.id}`,void 0,{stripeContext:r.context,headers:{"Stripe-Request-Trigger":`event=${r.id}`}},["fetch_event"])},r.fetchRelatedObject=()=>{if(!r.related_object)return Promise.resolve(null);return this._requestSender._rawRequest("GET",r.related_object.url,void 0,{stripeContext:r.context,headers:{"Stripe-Request-Trigger":`event=${r.id}`}},["fetch_related_object"])},r}},d}var _a=ka(new Mi),Te=_a;var ve=null,b=new Proxy({},{get(n,i){if(!ve){let l=fa?.stripe?.secretKey;if(!l)throw Error("Stripe secret key is not configured. Set STRIPE_SECRET_KEY in your .env file.");let d=fa?.stripe?.apiVersion??"2026-01-28.preview";ve=new Te(l,{apiVersion:d})}return ve[i]}});import{config as Qc}from"@stacksjs/config";import{log as Xc}from"@stacksjs/logging";function ba(){let n=Qc||{};return(n.payment?.currency||n.billing?.currency||process.env.STRIPE_CURRENCY||"usd").toLowerCase()}var Fi=(()=>{async function n(t,a,m){let c={currency:ba(),amount:a};if(t.hasStripeId())c.customer=t.stripe_id;let _={...c,...m};return await b.paymentIntents.create(_)}async function i(t){try{return await b.paymentIntents.retrieve(t)}catch(a){return Xc.error(a),null}}async function l(t,a={}){if(!t||typeof t!=="string")throw Error("[payments/refund] paymentIntentId is required");if(a.amount!=null){if(typeof a.amount!=="number"||!Number.isFinite(a.amount)||a.amount<=0)throw Error("[payments/refund] amount must be a positive finite number");try{let r=await b.paymentIntents.retrieve(t),s=r.amount_received??r.amount;if(s&&a.amount>s)throw Error(`[payments/refund] amount ${a.amount} exceeds captured amount ${s}`)}catch(r){if(r instanceof Error&&r.message.startsWith("[payments/refund]"))throw r}}let{idempotencyKey:m,...c}=a,_={payment_intent:t,...c},u={idempotencyKey:m||`refund:${t}:${c.amount??"full"}`};return await b.refunds.create(_,u)}async function d(t,a,m,c){let u={...{confirmation_method:"automatic",confirm:!0,payment_method:m,currency:ba(),amount:a},...c};return await n(t,a,u)}return{createPayment:n,charge:d,findPayment:i,refund:l}})();import{config as Zc}from"@stacksjs/config";function ha(n,i){if(!n)return;let l;try{l=new URL(n)}catch{throw Error(`[payments/checkout] ${i} is not a valid URL: ${n}`)}let d=Zc?.app?.url;if(!d)return;let t;try{t=new URL(d.startsWith("http")?d:`https://${d}`).origin}catch{return}if(l.origin!==t)throw Error(`[payments/checkout] ${i} origin (${l.origin}) does not match app origin (${t})`)}var Se=(()=>{async function n(i,l){if(!i.hasStripeId())throw Error("Customer does not exist in Stripe");if(!i.stripe_id)throw Error("User has no Stripe ID");ha(l.success_url,"success_url"),ha(l.cancel_url,"cancel_url");let t={...{customer:i.stripe_id,mode:"payment",success_url:l.success_url,cancel_url:l.cancel_url},...l};return await b.checkout.sessions.create(t)}return{create:n}})();var R=(()=>{function n(o){return o.stripe_id||""}function i(o){return{line1:o.address?.line1,city:o.address?.city,state:o.address?.state,postal_code:o.address?.postal_code,country:o.address?.country}}function l(){return[]}function d(o){return o}function t(o){return Boolean(o.stripe_id)}async function a(o,f={}){if(t(o))throw Error("Customer already created");if(!f.name&&k(o))f.name=k(o);if(!f.email&&h(o))f.email=h(o);let j=await b.customers.create(f);return await o.update({stripe_id:j.id}),j}async function m(o,f={}){if(!o.stripe_id)throw Error("User does not have a Stripe customer ID. Create a customer first.");return await b.customers.update(o.stripe_id,f)}async function c(o){if(!t(o))throw Error("User does not have a Stripe ID");try{if(!o.stripe_id)throw Error("User has no Stripe ID");let f=await b.customers.del(o.stripe_id);return await o.update({stripe_id:""}),f}catch(f){if(f.statusCode===404)throw Error("Customer not found in Stripe");throw f}}async function _(o,f={}){if(!t(o))return await a(o,f);try{let j=await b.customers.retrieve(o.stripe_id);if(j.deleted)throw Error("Customer was deleted");return j}catch(j){if(j.statusCode===404)return await a(o,f);throw j}}async function u(o){if(!t(o))return;try{let f=await b.customers.retrieve(o.stripe_id);if(f.deleted)throw Error("Customer was deleted in Stripe");return f}catch(f){if(f.statusCode===404)throw Error("Customer not found in Stripe");throw f}}async function r(o,f){if(!t(o))return await a(o,f);try{if((await b.customers.retrieve(o.stripe_id)).deleted)return await a(o,f);return await m(o,f)}catch(j){if(j.statusCode===404)return await a(o,f);throw j}}async function s(o,f){return await m(o,{name:k(o),email:h(o),address:i(f),preferred_locales:l(),metadata:f.metadata?d(f.metadata):{}})}function k(o){return o.name||""}function h(o){return o.email||""}return{stripeId:n,hasStripeId:t,createStripeCustomer:a,updateStripeCustomer:m,createOrGetStripeUser:_,createOrUpdateStripeUser:r,deleteStripeUser:c,retrieveStripeUser:u,syncStripeCustomerDetails:s}})();var Oe=(()=>{async function n(i){if(!i.hasStripeId())throw Error("Customer does not exist in Stripe");if(!i.stripe_id)throw Error("User has no Stripe ID");return await b.invoices.list({customer:i.stripe_id,expand:["data.payment_intent.payment_method"]})}return{list:n}})();import{db as W}from"@stacksjs/database";import{PaymentMethod as pe}from"@stacksjs/orm";var Nn=(()=>{async function n(r,s){if(!r.hasStripeId())throw Error("Customer does not exist in Stripe");let k;if(typeof s==="string")k=await b.paymentMethods.retrieve(s);else k=s;if(k.customer!==r.stripe_id)k=await b.paymentMethods.attach(k.id,{customer:r.stripe_id});return await d(r,k),k}async function i(r,s){if(!r.hasStripeId())throw Error("Customer does not exist in Stripe");let k=await b.paymentMethods.retrieve(s),h=await W.selectFrom("payment_methods").where("provider_id","=",s).selectAll().executeTakeFirst();if(!r.stripe_id)throw Error("User has no Stripe ID");if(k.customer!==r.stripe_id)await b.paymentMethods.attach(k.id,{customer:r.stripe_id});let o=await b.customers.update(r.stripe_id,{invoice_settings:{default_payment_method:s}});if(await W.updateTable("payment_methods").set({is_default:!1}).where("user_id","=",r.id).executeTakeFirst(),h)await t(h);return o}async function l(r,s){if(!r.hasStripeId())throw Error("Customer does not exist in Stripe");let k=await W.selectFrom("payment_methods").where("id","=",s).selectAll().executeTakeFirst();if(!k?.provider_id)throw Error(`Payment method with id ${s} not found`);let h=await b.paymentMethods.retrieve(String(k.provider_id));if(h.customer!==r.stripe_id)await b.paymentMethods.attach(h.id,{customer:r.stripe_id});if(!r.stripe_id)throw Error("User has no Stripe ID");let o=await b.customers.update(r.stripe_id,{invoice_settings:{default_payment_method:String(k.provider_id)}});return await W.updateTable("payment_methods").set({is_default:!1}).where("user_id","=",r.id).executeTakeFirst(),await W.updateTable("payment_methods").set({is_default:!0}).where("id","=",s).executeTakeFirst(),o}async function d(r,s){if(!r.hasStripeId())throw Error("Customer does not exist in Stripe");if(!s.card?.brand||!s.card?.exp_year||!s.card?.exp_month)throw Error("Invalid payment method: missing required card details");let k={type:"card",last_four:String(s.card.last4),brand:s.card.brand,exp_year:s.card.exp_year,exp_month:s.card.exp_month,user_id:r.id,provider_id:s.id};if(s.customer!==r.stripe_id)await b.paymentMethods.attach(s.id,{customer:r.stripe_id});return await pe.create(k)}async function t(r){return await r.update({is_default:!0})}async function a(r,s){if(!r.hasStripeId())throw Error("Customer does not exist in Stripe");let k=typeof s==="string"?await W.selectFrom("payment_methods").where("provider_id","=",s).selectAll().executeTakeFirst():await pe.find(s);if(!k?.provider_id)throw Error(`Payment method with id ${s} not found`);if((await b.paymentMethods.retrieve(String(k.provider_id))).customer!==r.stripe_id)throw Error("Payment method does not belong to this customer");return await k.delete(),await b.paymentMethods.detach(String(k.provider_id))}async function m(r,s,k){if(!r.hasStripeId())throw Error("Customer does not exist in Stripe");if((await b.paymentMethods.retrieve(s)).customer!==r.stripe_id)throw Error("Payment method does not belong to this customer");return await b.paymentMethods.update(s,k)}async function c(r){if(!r.hasStripeId())throw Error("Customer does not exist in Stripe");return await W.selectFrom("payment_methods").selectAll().where("user_id","=",r.id).execute()}async function _(r,s){if(!r.hasStripeId())throw Error("Customer does not exist in Stripe");return await W.selectFrom("payment_methods").where("id","=",s).selectAll().executeTakeFirst()}async function u(r){if(!r.hasStripeId())throw Error("Customer does not exist in Stripe");return await pe.where("user_id",r.id).where("is_default",!0).first()}return{addPaymentMethod:n,deletePaymentMethod:a,retrieveDefaultPaymentMethod:u,updatePaymentMethod:m,listPaymentMethods:c,setDefaultPaymentMethod:l,storePaymentMethod:d,retrievePaymentMethod:_,setUserDefaultPayment:i}})();var Wn=(()=>{async function n(l){let d=await b.prices.list({lookup_keys:[l]});if(!d.data.length)return;return d.data[0]}async function i(l,d){let t=await n(l);if(t)return t;return await b.prices.create({...d,lookup_key:l})}return{retrieveByLookupKey:n,createOrGet:i}})();var zi=(()=>{async function n(c){return await b.products.create(c)}async function i(c){return await b.products.retrieve(c)}async function l(c,_){return await b.products.update(c,_)}async function d(c={}){return await b.products.list({active:!0,...c})}async function t(c){return await b.products.update(c,{active:!1})}async function a(c,_){let u=await b.products.create(c),r=await b.prices.create({..._,product:u.id});return{product:u,price:r}}async function m(c,_={query:""}){return await b.products.search({..._,query:c})}return{create:n,retrieve:i,update:l,list:d,archive:t,createWithPrice:a,search:m}})(),ja=(()=>{async function n(c){return await b.prices.create(c)}async function i(c){return await b.prices.retrieve(c)}async function l(c,_){return await b.prices.update(c,_)}async function d(c={}){return await b.prices.list({active:!0,...c})}async function t(c,_={}){return await b.prices.list({product:c,active:!0,..._})}async function a(c,_={query:""}){return await b.prices.search({..._,query:c})}async function m(c){return await b.prices.update(c,{active:!1})}return{create:n,retrieve:i,update:l,list:d,listByProduct:t,search:a,archive:m}})(),Hn=(()=>{async function n(c){return await b.coupons.create(c)}async function i(c){return await b.coupons.retrieve(c)}async function l(c,_){return await b.coupons.update(c,_)}async function d(c){return await b.coupons.del(c)}async function t(c={}){return await b.coupons.list(c)}async function a(c){return await b.promotionCodes.create(c)}async function m(c){try{let _=await b.promotionCodes.list({code:c,active:!0});if(_.data.length>0)return _.data[0]??null;return null}catch{return null}}return{create:n,retrieve:i,update:l,delete:d,list:t,createPromotionCode:a,retrievePromotionCode:m}})();import{db as en}from"@stacksjs/database";var fn=(()=>{async function n(k,h,o,f){let j=await Wn.retrieveByLookupKey(o);if(!j)throw Error("Price does not exist in Stripe");let P=[{price:j.id,quantity:1}],z={...{customer:await R.createOrGetStripeUser(k,{}).then((w)=>{if(!w||!w.id)throw Error("Customer does not exist in Stripe");return w.id}),payment_behavior:"allow_incomplete",expand:["latest_invoice.payment_intent"],items:P},...f},E=await b.subscriptions.create(z);return await u(k,h,o,E),E}async function i(k,h,o,f={}){let j=await Wn.retrieveByLookupKey(o),P=await k?.activeSubscription();if(!j)throw Error("New price does not exist in Stripe");if(!P)throw Error("No active subscription for user!");let g=P.subscription?.provider_id;if(!g)throw Error("Active subscription has no provider ID");let O=await b.subscriptions.retrieve(g);if(!O)throw Error("Subscription does not exist in Stripe");let z=O.items.data[0]?.id;if(!z)throw Error("No subscription items found in the subscription");await b.subscriptions.update(g,{items:[{id:z,price:j.id,quantity:1}],proration_behavior:"create_prorations"});let E=await b.subscriptions.retrieve(g);if(!P.subscription?.id)throw Error("Active subscription has no database ID");return await r(P.subscription.id,h,E),E}async function l(k,h){if(!await b.subscriptions.retrieve(k))throw Error("Subscription does not exist or does not belong to the user");let f=await b.subscriptions.cancel(k,h);return await t(k),f}async function d(k,h){if(!k.hasStripeId())throw Error("Customer does not exist in Stripe");return await b.subscriptions.retrieve(h)}async function t(k){await en.updateTable("subscriptions").set({provider_status:"canceled"}).where("provider_id","=",k).executeTakeFirst()}function a(k){return k.provider_status==="active"}function m(k){return k.provider_status==="trialing"}async function c(k,h){let o=await en.selectFrom("subscriptions").where("user_id","=",k.id).where("type","=",h).selectAll().executeTakeFirst();if(!o)return!1;return o.provider_status==="incomplete"}async function _(k,h){let o=await en.selectFrom("subscriptions").where("user_id","=",k.id).where("type","=",h).selectAll().executeTakeFirst();if(!o)return!1;let f=await a(o),j=await m(o);return f||j}async function u(k,h,o,f){let j=f.items.data[0];if(!j)throw Error("Stripe subscription contains no line items \u2014 cannot store subscription");let P=s({user_id:k.id,type:h,unit_price:Number(j.price.unit_amount),provider_id:f.id,provider_status:f.status,provider_price_id:j.price.id,quantity:j.quantity,trial_ends_at:f.trial_end!=null?String(f.trial_end):void 0,ends_at:f.current_period_end!=null?String(f.current_period_end):void 0,provider_type:"stripe",last_used_at:f.current_period_end!=null?String(f.current_period_end):void 0}),g=await en.insertInto("subscriptions").values(P).executeTakeFirst();if(!g)throw Error("Failed to insert subscription record");return await en.selectFrom("subscriptions").where("id","=",Number(g.insertId)).selectAll().executeTakeFirst()}async function r(k,h,o){let f=await en.selectFrom("subscriptions").where("id","=",k).selectAll().executeTakeFirst(),j=o.items.data[0];if(!j)throw Error("Stripe subscription contains no line items \u2014 cannot update subscription");return await en?.updateTable("subscriptions").set({type:h,provider_price_id:j.price.id,unit_price:Number(j.price.unit_amount)}).where("id","=",k).executeTakeFirst(),f}function s(k){return Object.fromEntries(Object.entries(k).filter(([h,o])=>o!=null))}return{create:n,update:i,isValid:_,isIncomplete:c,cancel:l,retrieve:d}})();var Pa=(()=>{async function n(i,l){let a={...{customer:await R.createOrGetStripeUser(i,{}).then((m)=>{if(!m||!m.id)throw Error("Customer does not exist in Stripe");return m.id}),payment_method_types:["card"]},...l};return await b.setupIntents.create(a)}return{create:n}})();var ye=new Map;function p(n,i){let l=ye.get(n)||[];l.push(i),ye.set(n,l)}function $c(n){for(let[i,l]of Object.entries(n))p(i,l)}function ga(n,i,l,d){if(d!=null&&Number.isFinite(d)&&d>0)return b.webhooks.constructEvent(n,i,l,d);return b.webhooks.constructEvent(n,i,l)}async function Ta(n){let i=ye.get(n.type)||[];if(i.length===0)return{handled:!1,eventType:n.type};let l=[];for(let d of i)try{await d(n)}catch(t){l.push(t instanceof Error?t.message:String(t))}return{handled:!0,eventType:n.type,...l.length>0?{errors:l}:{}}}async function xe(n,i,l){try{let d=ga(n,i,l.secret,l.tolerance);return{success:!0,eventType:(await Ta(d)).eventType}}catch(d){return{success:!1,error:d instanceof Error?d.message:"Unknown error"}}}function Ge(n){if(n.succeeded)p("payment_intent.succeeded",n.succeeded);if(n.failed)p("payment_intent.payment_failed",n.failed);if(n.created)p("payment_intent.created",n.created);if(n.canceled)p("payment_intent.canceled",n.canceled)}function Ee(n){if(n.created)p("customer.subscription.created",n.created);if(n.updated)p("customer.subscription.updated",n.updated);if(n.deleted)p("customer.subscription.deleted",n.deleted);if(n.trialWillEnd)p("customer.subscription.trial_will_end",n.trialWillEnd)}function we(n){if(n.paid)p("invoice.paid",n.paid);if(n.paymentFailed)p("invoice.payment_failed",n.paymentFailed);if(n.created)p("invoice.created",n.created);if(n.finalized)p("invoice.finalized",n.finalized)}function Fe(n){if(n.completed)p("checkout.session.completed",n.completed);if(n.expired)p("checkout.session.expired",n.expired)}function ze(n){if(n.succeeded)p("charge.succeeded",n.succeeded);if(n.failed)p("charge.failed",n.failed);if(n.refunded)p("charge.refunded",n.refunded);if(n.disputed)p("charge.dispute.created",n.disputed)}function Mc(n){if(n.type.startsWith("payment_intent."))return n.data.object;return null}function Rc(n){if(n.type.startsWith("customer.subscription."))return n.data.object;return null}function Yc(n){if(n.type.startsWith("invoice."))return n.data.object;return null}function Uc(n){if(n.type.startsWith("checkout.session."))return n.data.object;return null}function qc(n){if(n.type.startsWith("charge."))return n.data.object;return null}function Vc(n){if(n.type.startsWith("customer.")&&!n.type.includes("subscription"))return n.data.object;return null}var va={onWebhookEvent:p,registerWebhookHandlers:$c,constructEvent:ga,handleWebhookEvent:Ta,processWebhook:xe,onPaymentIntent:Ge,onSubscription:Ee,onInvoice:we,onCheckout:Fe,onCharge:ze,getPaymentIntent:Mc,getSubscription:Rc,getInvoice:Yc,getCheckoutSession:Uc,getCharge:qc,getCustomer:Vc};async function Kc(n,i,l,d={}){return Fi.charge(n,i,l,d)}async function Nc(n,i,l={}){return Fi.createPayment(n,i,l)}async function Wc(n,i,l={}){return Fi.refund(n,{amount:i,...l})}async function Hc(n,i,l={}){return Se.create(n,{line_items:i,mode:"payment",...l})}async function Dc(n,i,l={}){return Se.create(n,{line_items:[{price:i,quantity:1}],mode:"subscription",...l})}async function Ic(n,i,l={}){return fn.create(n,"default",i,l)}async function Cc(n,i=!1){return fn.cancel(n,{prorate:!i,invoice_now:i})}async function nr(n,i="default"){return fn.isValid(n,i)}async function ir(n,i,l="default"){return fn.update(n,l,i,{})}async function er(n,i={}){return R.createOrGetStripeUser(n,i)}async function lr(n,i){return R.updateStripeCustomer(n,i)}async function dr(n){return R.deleteStripeUser(n)}async function tr(n,i){return Nn.addPaymentMethod(n,i)}async function ar(n,i){return Nn.setUserDefaultPayment(n,i)}async function cr(n,i){return Nn.deletePaymentMethod(n,i)}async function rr(n,i={}){return Pa.create(n,i)}async function mr(n){return Oe.list(n)}async function or(n,i={}){return b.invoices.create({customer:n,...i})}async function sr(n){return b.invoices.pay(n)}async function kr(n,i,l={}){let{currency:d="usd",interval:t,description:a,metadata:m}=l,c={unit_amount:i,currency:d};if(t)c.recurring={interval:t};return zi.createWithPrice({name:n,description:a,metadata:m},c)}async function _r(n){return Wn.retrieveByLookupKey(n)}async function ur(n={}){return zi.list(n)}async function fr(n){let i={duration:n.duration||"once"};if(n.percentOff)i.percent_off=n.percentOff;else if(n.amountOff)i.amount_off=n.amountOff,i.currency=n.currency||"usd";if(n.name)i.name=n.name;if(n.durationInMonths)i.duration_in_months=n.durationInMonths;if(n.maxRedemptions)i.max_redemptions=n.maxRedemptions;return Hn.create(i)}async function br(n,i,l={}){return Hn.createPromotionCode({promotion:{type:"coupon",coupon:n},code:i,...l})}async function hr(n){return Hn.retrievePromotionCode(n)}function jr(n,i){let l=globalThis.config||{},d=(i||l.payment?.currency||l.billing?.currency||process.env.STRIPE_CURRENCY||"usd").toLowerCase(),t=l.app?.locale||"en-US";return new Intl.NumberFormat(t,{style:"currency",currency:d.toUpperCase()}).format(n/100)}function Pr(n){return Math.round(n*100)}function gr(n){return n/100}var Tr={charge:Kc,createPayment:Nc,refund:Wc,checkout:Hc,subscriptionCheckout:Dc,subscribe:Ic,cancelSubscription:Cc,hasActiveSubscription:nr,changeSubscription:ir,getOrCreateCustomer:er,updateCustomer:lr,deleteCustomer:dr,addPaymentMethod:tr,setDefaultPaymentMethod:ar,removePaymentMethod:cr,createSetupIntent:rr,getInvoices:mr,createInvoice:or,payInvoice:sr,createProduct:kr,getPrice:_r,listProducts:ur,createCoupon:fr,createPromoCode:br,validatePromoCode:hr,formatAmount:jr,toCents:Pr,toDollars:gr,webhook:va,onPaymentIntent:Ge,onSubscription:Ee,onInvoice:we,onCheckout:Fe,onCharge:ze,processWebhook:xe,stripe:b,customer:R,subscription:fn,invoice:Oe,paymentMethod:Nn,product:zi,price:ja,coupon:Hn},vr=Tr;import{saas as Sr}from"@stacksjs/config";import{err as Or,ok as pr}from"@stacksjs/error-handling";import{log as yr}from"@stacksjs/logging";import{stripe as Sa}from"@stacksjs/payments";async function tj(){let n=Sr.plans;try{if(n!==void 0&&n.length)for(let i of n){let l=await Sa.products.create({name:i.productName,description:i.description,metadata:i.metadata});for(let d of i.pricing)if(l){let t={unit_amount:d.price,currency:d.currency,product:l.id,lookup_key:d.key};if(d.interval)t.recurring={interval:d.interval};await Sa.prices.create(t)}}return pr("Migrations generated")}catch(i){let l=i instanceof Error?i:Error(String(i));return yr.error(l),Or(l)}}import{db as Ai}from"@stacksjs/database";var rj=(()=>{async function n(l,d,t){let a=await Ai.selectFrom("payment_products").where("id","=",d).selectAll().executeTakeFirst();if(!a)throw Error(`Payment product with id ${d} not found.`);let m={name:a.name,description:t.description??"",amount:a.unit_price,brand:t.brand,type:t.type??"one-time",provider_id:t.provider_id,user_id:l.id},c=await Ai.insertInto("payment_transactions").values(m).executeTakeFirst();if(!c)throw Error("Failed to insert payment transaction");return await Ai.selectFrom("payment_transactions").where("id","=",Number(c.insertId)).selectAll().executeTakeFirst()}async function i(l){return await Ai.selectFrom("payment_transactions").where("user_id","=",l.id).selectAll().execute()}return{store:n,list:i}})();export{hr as validatePromoCode,lr as updateCustomer,gr as toDollars,Pr as toCents,Dc as subscriptionCheckout,Ic as subscribe,b as stripe,ar as setDefaultPaymentMethod,cr as removePaymentMethod,$c as registerWebhookHandlers,Wc as refund,xe as processWebhook,sr as payInvoice,p as onWebhookEvent,Ee as onSubscription,Ge as onPaymentIntent,we as onInvoice,Fe as onCheckout,ze as onCharge,va as manageWebhook,rj as manageTransaction,fn as manageSubscription,Pa as manageSetupIntent,zi as manageProduct,ja as managePriceExtended,Wn as managePrice,Nn as managePaymentMethod,Oe as manageInvoice,R as manageCustomer,Hn as manageCoupon,Se as manageCheckout,Fi as manageCharge,ur as listProducts,nr as hasActiveSubscription,Ta as handleWebhookEvent,Rc as getSubscription,_r as getPrice,Mc as getPaymentIntent,er as getOrCreateCustomer,mr as getInvoices,Yc as getInvoice,Vc as getCustomer,Uc as getCheckoutSession,qc as getCharge,jr as formatAmount,dr as deleteCustomer,tj as createStripeProduct,rr as createSetupIntent,br as createPromoCode,kr as createProduct,Nc as createPayment,or as createInvoice,fr as createCoupon,ga as constructEvent,Hc as checkout,Kc as charge,ir as changeSubscription,Cc as cancelSubscription,tr as addPaymentMethod,ua as Stripe,vr as Payment};
|
|
10
|
+
`+b+`
|
|
11
|
+
`+I})}let f=Math.floor((typeof O==="number"?O:Date.now())/1000)-W.timestamp;if(L>0&&f>L)throw new n.StripeSignatureVerificationError(V,Y,{message:"Timestamp outside the tolerance zone"});return!0}function w(Y,V){if(typeof Y!=="string")return null;return Y.split(",").reduce((W,D)=>{let L=D.split("=");if(L[0]==="t")W.timestamp=parseInt(L[1],10);if(L[0]===V)W.signatures.push(L[1]);return W},{timestamp:-1,signatures:[]})}let X=null;function K(){if(!X)X=J.createDefaultCryptoProvider();return X}function T(Y){if(!Y)throw new n.StripeError({message:"Options are required"});let V=Math.floor(Y.timestamp)||Math.floor(Date.now()/1000),W=Y.scheme||$.EXPECTED_SCHEME,D=Y.cryptoProvider||K(),L=`${V}.${Y.payload}`;return{...Y,timestamp:V,scheme:W,cryptoProvider:D,payloadString:L,generateHeaderString:(q)=>{return`t=${V},${W}=${q}`}}}return Z.signature=$,Z}X$.createWebhooks=_w});var V$=B((U$)=>{Object.defineProperty(U$,"__esModule",{value:!0});U$.ApiMajorVersion=U$.ApiVersion=void 0;U$.ApiVersion="2026-03-25.dahlia";U$.ApiMajorVersion="dahlia"});var T$=B((W$)=>{Object.defineProperty(W$,"__esModule",{value:!0});W$.resourceNamespace=void 0;function hw(J,Z){for(let $ in Z){if(!Object.prototype.hasOwnProperty.call(Z,$))continue;let Q=$[0].toLowerCase()+$.substring(1),G=new Z[$](J);this[Q]=G}}function lw(J,Z){return function($){return new hw($,Z)}}W$.resourceNamespace=lw});var q$=B((H$)=>{Object.defineProperty(H$,"__esModule",{value:!0});H$.AccountLinks=void 0;var N$=U(),uw=N$.StripeResource.method;H$.AccountLinks=N$.StripeResource.extend({create:uw({method:"POST",fullPath:"/v2/core/account_links"})})});var C$=B((k$)=>{Object.defineProperty(k$,"__esModule",{value:!0});k$.AccountTokens=void 0;var O$=U(),E$=O$.StripeResource.method;k$.AccountTokens=O$.StripeResource.extend({create:E$({method:"POST",fullPath:"/v2/core/account_tokens",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:E$({method:"GET",fullPath:"/v2/core/account_tokens/{id}"})})});var x$=B((b$)=>{Object.defineProperty(b$,"__esModule",{value:!0});b$.Accounts=void 0;var A$=U(),t=A$.StripeResource.method;b$.Accounts=A$.StripeResource.extend({retrieve:t({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}"}),list:t({method:"GET",fullPath:"/v1/financial_connections/accounts",methodType:"list"}),disconnect:t({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/disconnect"}),listOwners:t({method:"GET",fullPath:"/v1/financial_connections/accounts/{account}/owners",methodType:"list"}),refresh:t({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/refresh"}),subscribe:t({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/subscribe"}),unsubscribe:t({method:"POST",fullPath:"/v1/financial_connections/accounts/{account}/unsubscribe"})})});var y$=B((I$)=>{Object.defineProperty(I$,"__esModule",{value:!0});I$.Persons=void 0;var P$=U(),PJ=P$.StripeResource.method;I$.Persons=P$.StripeResource.extend({create:PJ({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:PJ({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),update:PJ({method:"POST",fullPath:"/v2/core/accounts/{account_id}/persons/{id}",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),list:PJ({method:"GET",fullPath:"/v2/core/accounts/{account_id}/persons",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}),del:PJ({method:"DELETE",fullPath:"/v2/core/accounts/{account_id}/persons/{id}"})})});var j$=B((S$)=>{Object.defineProperty(S$,"__esModule",{value:!0});S$.PersonTokens=void 0;var R$=U(),g$=R$.StripeResource.method;S$.PersonTokens=R$.StripeResource.extend({create:g$({method:"POST",fullPath:"/v2/core/accounts/{account_id}/person_tokens",requestSchema:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}),retrieve:g$({method:"GET",fullPath:"/v2/core/accounts/{account_id}/person_tokens/{id}"})})});var h$=B((_$)=>{Object.defineProperty(_$,"__esModule",{value:!0});_$.Accounts=void 0;var zZ=U(),cw=y$(),dw=j$(),IJ=zZ.StripeResource.method;_$.Accounts=zZ.StripeResource.extend({constructor:function(...J){zZ.StripeResource.apply(this,J),this.persons=new cw.Persons(...J),this.personTokens=new dw.PersonTokens(...J)},create:IJ({method:"POST",fullPath:"/v2/core/accounts",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),retrieve:IJ({method:"GET",fullPath:"/v2/core/accounts/{id}",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),update:IJ({method:"POST",fullPath:"/v2/core/accounts/{id}",requestSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}},responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}),list:IJ({method:"GET",fullPath:"/v2/core/accounts",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}}}}}),close:IJ({method:"POST",fullPath:"/v2/core/accounts/{id}/close",responseSchema:{kind:"object",fields:{identity:{kind:"object",fields:{individual:{kind:"object",fields:{relationship:{kind:"object",fields:{percent_ownership:{kind:"decimal_string"}}}}}}}}}})})});var n$=B((c$)=>{Object.defineProperty(c$,"__esModule",{value:!0});c$.ActiveEntitlements=void 0;var u$=U(),l$=u$.StripeResource.method;c$.ActiveEntitlements=u$.StripeResource.extend({retrieve:l$({method:"GET",fullPath:"/v1/entitlements/active_entitlements/{id}"}),list:l$({method:"GET",fullPath:"/v1/entitlements/active_entitlements",methodType:"list"})})});var o$=B((i$)=>{Object.defineProperty(i$,"__esModule",{value:!0});i$.Alerts=void 0;var a$=U(),UJ=a$.StripeResource.method;i$.Alerts=a$.StripeResource.extend({create:UJ({method:"POST",fullPath:"/v1/billing/alerts"}),retrieve:UJ({method:"GET",fullPath:"/v1/billing/alerts/{id}"}),list:UJ({method:"GET",fullPath:"/v1/billing/alerts",methodType:"list"}),activate:UJ({method:"POST",fullPath:"/v1/billing/alerts/{id}/activate"}),archive:UJ({method:"POST",fullPath:"/v1/billing/alerts/{id}/archive"}),deactivate:UJ({method:"POST",fullPath:"/v1/billing/alerts/{id}/deactivate"})})});var e$=B((r$)=>{Object.defineProperty(r$,"__esModule",{value:!0});r$.Associations=void 0;var s$=U(),nw=s$.StripeResource.method;r$.Associations=s$.StripeResource.extend({find:nw({method:"GET",fullPath:"/v1/tax/associations/find"})})});var Q8=B((Z8)=>{Object.defineProperty(Z8,"__esModule",{value:!0});Z8.Authorizations=void 0;var J8=U(),fJ=J8.StripeResource.method;Z8.Authorizations=J8.StripeResource.extend({retrieve:fJ({method:"GET",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),update:fJ({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),list:fJ({method:"GET",fullPath:"/v1/issuing/authorizations",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}),approve:fJ({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/approve",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),decline:fJ({method:"POST",fullPath:"/v1/issuing/authorizations/{authorization}/decline",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var X8=B((z8)=>{Object.defineProperty(z8,"__esModule",{value:!0});z8.Authorizations=void 0;var G8=U(),e=G8.StripeResource.method;z8.Authorizations=G8.StripeResource.extend({create:e({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),capture:e({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),expire:e({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/expire",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),finalizeAmount:e({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/finalize_amount",requestSchema:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),increment:e({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/increment",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),respond:e({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}),reverse:e({method:"POST",fullPath:"/v1/test_helpers/issuing/authorizations/{authorization}/reverse",responseSchema:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var L8=B((w8)=>{Object.defineProperty(w8,"__esModule",{value:!0});w8.Calculations=void 0;var Y8=U(),BZ=Y8.StripeResource.method;w8.Calculations=Y8.StripeResource.extend({create:BZ({method:"POST",fullPath:"/v1/tax/calculations"}),retrieve:BZ({method:"GET",fullPath:"/v1/tax/calculations/{calculation}"}),listLineItems:BZ({method:"GET",fullPath:"/v1/tax/calculations/{calculation}/line_items",methodType:"list"})})});var T8=B((W8)=>{Object.defineProperty(W8,"__esModule",{value:!0});W8.Cardholders=void 0;var V8=U(),w0=V8.StripeResource.method;W8.Cardholders=V8.StripeResource.extend({create:w0({method:"POST",fullPath:"/v1/issuing/cardholders"}),retrieve:w0({method:"GET",fullPath:"/v1/issuing/cardholders/{cardholder}"}),update:w0({method:"POST",fullPath:"/v1/issuing/cardholders/{cardholder}"}),list:w0({method:"GET",fullPath:"/v1/issuing/cardholders",methodType:"list"})})});var q8=B((H8)=>{Object.defineProperty(H8,"__esModule",{value:!0});H8.Cards=void 0;var N8=U(),U0=N8.StripeResource.method;H8.Cards=N8.StripeResource.extend({create:U0({method:"POST",fullPath:"/v1/issuing/cards"}),retrieve:U0({method:"GET",fullPath:"/v1/issuing/cards/{card}"}),update:U0({method:"POST",fullPath:"/v1/issuing/cards/{card}"}),list:U0({method:"GET",fullPath:"/v1/issuing/cards",methodType:"list"})})});var F8=B((O8)=>{Object.defineProperty(O8,"__esModule",{value:!0});O8.Cards=void 0;var E8=U(),yJ=E8.StripeResource.method;O8.Cards=E8.StripeResource.extend({deliverCard:yJ({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/deliver"}),failCard:yJ({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/fail"}),returnCard:yJ({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/return"}),shipCard:yJ({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/ship"}),submitCard:yJ({method:"POST",fullPath:"/v1/test_helpers/issuing/cards/{card}/shipping/submit"})})});var v8=B((A8)=>{Object.defineProperty(A8,"__esModule",{value:!0});A8.Configurations=void 0;var C8=U(),L0=C8.StripeResource.method;A8.Configurations=C8.StripeResource.extend({create:L0({method:"POST",fullPath:"/v1/billing_portal/configurations"}),retrieve:L0({method:"GET",fullPath:"/v1/billing_portal/configurations/{configuration}"}),update:L0({method:"POST",fullPath:"/v1/billing_portal/configurations/{configuration}"}),list:L0({method:"GET",fullPath:"/v1/billing_portal/configurations",methodType:"list"})})});var f8=B((P8)=>{Object.defineProperty(P8,"__esModule",{value:!0});P8.Configurations=void 0;var x8=U(),gJ=x8.StripeResource.method;P8.Configurations=x8.StripeResource.extend({create:gJ({method:"POST",fullPath:"/v1/terminal/configurations"}),retrieve:gJ({method:"GET",fullPath:"/v1/terminal/configurations/{configuration}"}),update:gJ({method:"POST",fullPath:"/v1/terminal/configurations/{configuration}"}),list:gJ({method:"GET",fullPath:"/v1/terminal/configurations",methodType:"list"}),del:gJ({method:"DELETE",fullPath:"/v1/terminal/configurations/{configuration}"})})});var S8=B((g8)=>{Object.defineProperty(g8,"__esModule",{value:!0});g8.ConfirmationTokens=void 0;var y8=U(),aw=y8.StripeResource.method;g8.ConfirmationTokens=y8.StripeResource.extend({create:aw({method:"POST",fullPath:"/v1/test_helpers/confirmation_tokens"})})});var m8=B((j8)=>{Object.defineProperty(j8,"__esModule",{value:!0});j8.ConnectionTokens=void 0;var M8=U(),iw=M8.StripeResource.method;j8.ConnectionTokens=M8.StripeResource.extend({create:iw({method:"POST",fullPath:"/v1/terminal/connection_tokens"})})});var c8=B((l8)=>{Object.defineProperty(l8,"__esModule",{value:!0});l8.CreditBalanceSummary=void 0;var h8=U(),pw=h8.StripeResource.method;l8.CreditBalanceSummary=h8.StripeResource.extend({retrieve:pw({method:"GET",fullPath:"/v1/billing/credit_balance_summary"})})});var p8=B((a8)=>{Object.defineProperty(a8,"__esModule",{value:!0});a8.CreditBalanceTransactions=void 0;var n8=U(),d8=n8.StripeResource.method;a8.CreditBalanceTransactions=n8.StripeResource.extend({retrieve:d8({method:"GET",fullPath:"/v1/billing/credit_balance_transactions/{id}"}),list:d8({method:"GET",fullPath:"/v1/billing/credit_balance_transactions",methodType:"list"})})});var t8=B((s8)=>{Object.defineProperty(s8,"__esModule",{value:!0});s8.CreditGrants=void 0;var o8=U(),LJ=o8.StripeResource.method;s8.CreditGrants=o8.StripeResource.extend({create:LJ({method:"POST",fullPath:"/v1/billing/credit_grants"}),retrieve:LJ({method:"GET",fullPath:"/v1/billing/credit_grants/{id}"}),update:LJ({method:"POST",fullPath:"/v1/billing/credit_grants/{id}"}),list:LJ({method:"GET",fullPath:"/v1/billing/credit_grants",methodType:"list"}),expire:LJ({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/expire"}),voidGrant:LJ({method:"POST",fullPath:"/v1/billing/credit_grants/{id}/void"})})});var $Q=B((JQ)=>{Object.defineProperty(JQ,"__esModule",{value:!0});JQ.CreditReversals=void 0;var e8=U(),XZ=e8.StripeResource.method;JQ.CreditReversals=e8.StripeResource.extend({create:XZ({method:"POST",fullPath:"/v1/treasury/credit_reversals"}),retrieve:XZ({method:"GET",fullPath:"/v1/treasury/credit_reversals/{credit_reversal}"}),list:XZ({method:"GET",fullPath:"/v1/treasury/credit_reversals",methodType:"list"})})});var BQ=B((GQ)=>{Object.defineProperty(GQ,"__esModule",{value:!0});GQ.Customers=void 0;var QQ=U(),ow=QQ.StripeResource.method;GQ.Customers=QQ.StripeResource.extend({fundCashBalance:ow({method:"POST",fullPath:"/v1/test_helpers/customers/{customer}/fund_cash_balance"})})});var UQ=B((YQ)=>{Object.defineProperty(YQ,"__esModule",{value:!0});YQ.DebitReversals=void 0;var XQ=U(),YZ=XQ.StripeResource.method;YQ.DebitReversals=XQ.StripeResource.extend({create:YZ({method:"POST",fullPath:"/v1/treasury/debit_reversals"}),retrieve:YZ({method:"GET",fullPath:"/v1/treasury/debit_reversals/{debit_reversal}"}),list:YZ({method:"GET",fullPath:"/v1/treasury/debit_reversals",methodType:"list"})})});var KQ=B((VQ)=>{Object.defineProperty(VQ,"__esModule",{value:!0});VQ.Disputes=void 0;var LQ=U(),RJ=LQ.StripeResource.method;VQ.Disputes=LQ.StripeResource.extend({create:RJ({method:"POST",fullPath:"/v1/issuing/disputes"}),retrieve:RJ({method:"GET",fullPath:"/v1/issuing/disputes/{dispute}"}),update:RJ({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}"}),list:RJ({method:"GET",fullPath:"/v1/issuing/disputes",methodType:"list"}),submit:RJ({method:"POST",fullPath:"/v1/issuing/disputes/{dispute}/submit"})})});var qQ=B((HQ)=>{Object.defineProperty(HQ,"__esModule",{value:!0});HQ.EarlyFraudWarnings=void 0;var NQ=U(),TQ=NQ.StripeResource.method;HQ.EarlyFraudWarnings=NQ.StripeResource.extend({retrieve:TQ({method:"GET",fullPath:"/v1/radar/early_fraud_warnings/{early_fraud_warning}"}),list:TQ({method:"GET",fullPath:"/v1/radar/early_fraud_warnings",methodType:"list"})})});var FQ=B((OQ)=>{Object.defineProperty(OQ,"__esModule",{value:!0});OQ.EventDestinations=void 0;var EQ=U(),a=EQ.StripeResource.method;OQ.EventDestinations=EQ.StripeResource.extend({create:a({method:"POST",fullPath:"/v2/core/event_destinations"}),retrieve:a({method:"GET",fullPath:"/v2/core/event_destinations/{id}"}),update:a({method:"POST",fullPath:"/v2/core/event_destinations/{id}"}),list:a({method:"GET",fullPath:"/v2/core/event_destinations",methodType:"list"}),del:a({method:"DELETE",fullPath:"/v2/core/event_destinations/{id}"}),disable:a({method:"POST",fullPath:"/v2/core/event_destinations/{id}/disable"}),enable:a({method:"POST",fullPath:"/v2/core/event_destinations/{id}/enable"}),ping:a({method:"POST",fullPath:"/v2/core/event_destinations/{id}/ping"})})});var vQ=B((AQ)=>{Object.defineProperty(AQ,"__esModule",{value:!0});AQ.Events=void 0;var CQ=U(),wZ=CQ.StripeResource.method;AQ.Events=CQ.StripeResource.extend({retrieve(...J){return wZ({method:"GET",fullPath:"/v2/core/events/{id}",transformResponseData:($)=>{return this.addFetchRelatedObjectIfNeeded($)}}).apply(this,J)},list(...J){return wZ({method:"GET",fullPath:"/v2/core/events",methodType:"list",transformResponseData:($)=>{return{...$,data:$.data.map(this.addFetchRelatedObjectIfNeeded.bind(this))}}}).apply(this,J)},addFetchRelatedObjectIfNeeded(J){if(!J.related_object||!J.related_object.url)return J;return{...J,fetchRelatedObject:()=>wZ({method:"GET",fullPath:J.related_object.url}).apply(this,[{stripeContext:J.context,headers:{"Stripe-Request-Trigger":`event=${J.id}`}}])}}})});var fQ=B((PQ)=>{Object.defineProperty(PQ,"__esModule",{value:!0});PQ.Features=void 0;var xQ=U(),V0=xQ.StripeResource.method;PQ.Features=xQ.StripeResource.extend({create:V0({method:"POST",fullPath:"/v1/entitlements/features"}),retrieve:V0({method:"GET",fullPath:"/v1/entitlements/features/{id}"}),update:V0({method:"POST",fullPath:"/v1/entitlements/features/{id}"}),list:V0({method:"GET",fullPath:"/v1/entitlements/features",methodType:"list"})})});var SQ=B((gQ)=>{Object.defineProperty(gQ,"__esModule",{value:!0});gQ.FinancialAccounts=void 0;var yQ=U(),JJ=yQ.StripeResource.method;gQ.FinancialAccounts=yQ.StripeResource.extend({create:JJ({method:"POST",fullPath:"/v1/treasury/financial_accounts"}),retrieve:JJ({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),update:JJ({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}"}),list:JJ({method:"GET",fullPath:"/v1/treasury/financial_accounts",methodType:"list"}),close:JJ({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/close"}),retrieveFeatures:JJ({method:"GET",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"}),updateFeatures:JJ({method:"POST",fullPath:"/v1/treasury/financial_accounts/{financial_account}/features"})})});var mQ=B((jQ)=>{Object.defineProperty(jQ,"__esModule",{value:!0});jQ.InboundTransfers=void 0;var MQ=U(),UZ=MQ.StripeResource.method;jQ.InboundTransfers=MQ.StripeResource.extend({fail:UZ({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/fail"}),returnInboundTransfer:UZ({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/return"}),succeed:UZ({method:"POST",fullPath:"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed"})})});var cQ=B((lQ)=>{Object.defineProperty(lQ,"__esModule",{value:!0});lQ.InboundTransfers=void 0;var hQ=U(),W0=hQ.StripeResource.method;lQ.InboundTransfers=hQ.StripeResource.extend({create:W0({method:"POST",fullPath:"/v1/treasury/inbound_transfers"}),retrieve:W0({method:"GET",fullPath:"/v1/treasury/inbound_transfers/{id}"}),list:W0({method:"GET",fullPath:"/v1/treasury/inbound_transfers",methodType:"list"}),cancel:W0({method:"POST",fullPath:"/v1/treasury/inbound_transfers/{inbound_transfer}/cancel"})})});var iQ=B((nQ)=>{Object.defineProperty(nQ,"__esModule",{value:!0});nQ.Locations=void 0;var dQ=U(),SJ=dQ.StripeResource.method;nQ.Locations=dQ.StripeResource.extend({create:SJ({method:"POST",fullPath:"/v1/terminal/locations"}),retrieve:SJ({method:"GET",fullPath:"/v1/terminal/locations/{location}"}),update:SJ({method:"POST",fullPath:"/v1/terminal/locations/{location}"}),list:SJ({method:"GET",fullPath:"/v1/terminal/locations",methodType:"list"}),del:SJ({method:"DELETE",fullPath:"/v1/terminal/locations/{location}"})})});var rQ=B((oQ)=>{Object.defineProperty(oQ,"__esModule",{value:!0});oQ.MeterEventAdjustments=void 0;var pQ=U(),sw=pQ.StripeResource.method;oQ.MeterEventAdjustments=pQ.StripeResource.extend({create:sw({method:"POST",fullPath:"/v1/billing/meter_event_adjustments"})})});var Z7=B((eQ)=>{Object.defineProperty(eQ,"__esModule",{value:!0});eQ.MeterEventAdjustments=void 0;var tQ=U(),rw=tQ.StripeResource.method;eQ.MeterEventAdjustments=tQ.StripeResource.extend({create:rw({method:"POST",fullPath:"/v2/billing/meter_event_adjustments"})})});var z7=B((Q7)=>{Object.defineProperty(Q7,"__esModule",{value:!0});Q7.MeterEventSession=void 0;var $7=U(),tw=$7.StripeResource.method;Q7.MeterEventSession=$7.StripeResource.extend({create:tw({method:"POST",fullPath:"/v2/billing/meter_event_session"})})});var w7=B((X7)=>{Object.defineProperty(X7,"__esModule",{value:!0});X7.MeterEventStream=void 0;var B7=U(),ew=B7.StripeResource.method;X7.MeterEventStream=B7.StripeResource.extend({create:ew({method:"POST",fullPath:"/v2/billing/meter_event_stream",host:"meter-events.stripe.com"})})});var W7=B((L7)=>{Object.defineProperty(L7,"__esModule",{value:!0});L7.MeterEvents=void 0;var U7=U(),J3=U7.StripeResource.method;L7.MeterEvents=U7.StripeResource.extend({create:J3({method:"POST",fullPath:"/v1/billing/meter_events"})})});var H7=B((T7)=>{Object.defineProperty(T7,"__esModule",{value:!0});T7.MeterEvents=void 0;var K7=U(),Z3=K7.StripeResource.method;T7.MeterEvents=K7.StripeResource.extend({create:Z3({method:"POST",fullPath:"/v2/billing/meter_events"})})});var O7=B((q7)=>{Object.defineProperty(q7,"__esModule",{value:!0});q7.Meters=void 0;var D7=U(),ZJ=D7.StripeResource.method;q7.Meters=D7.StripeResource.extend({create:ZJ({method:"POST",fullPath:"/v1/billing/meters"}),retrieve:ZJ({method:"GET",fullPath:"/v1/billing/meters/{id}"}),update:ZJ({method:"POST",fullPath:"/v1/billing/meters/{id}"}),list:ZJ({method:"GET",fullPath:"/v1/billing/meters",methodType:"list"}),deactivate:ZJ({method:"POST",fullPath:"/v1/billing/meters/{id}/deactivate"}),listEventSummaries:ZJ({method:"GET",fullPath:"/v1/billing/meters/{id}/event_summaries",methodType:"list"}),reactivate:ZJ({method:"POST",fullPath:"/v1/billing/meters/{id}/reactivate"})})});var A7=B((F7)=>{Object.defineProperty(F7,"__esModule",{value:!0});F7.OnboardingLinks=void 0;var k7=U(),$3=k7.StripeResource.method;F7.OnboardingLinks=k7.StripeResource.extend({create:$3({method:"POST",fullPath:"/v1/terminal/onboarding_links"})})});var P7=B((v7)=>{Object.defineProperty(v7,"__esModule",{value:!0});v7.Orders=void 0;var b7=U(),MJ=b7.StripeResource.method;v7.Orders=b7.StripeResource.extend({create:MJ({method:"POST",fullPath:"/v1/climate/orders",requestSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),retrieve:MJ({method:"GET",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),update:MJ({method:"POST",fullPath:"/v1/climate/orders/{order}",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}),list:MJ({method:"GET",fullPath:"/v1/climate/orders",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}}}}}),cancel:MJ({method:"POST",fullPath:"/v1/climate/orders/{order}/cancel",responseSchema:{kind:"object",fields:{metric_tons:{kind:"decimal_string"}}}})})});var g7=B((f7)=>{Object.defineProperty(f7,"__esModule",{value:!0});f7.OutboundPayments=void 0;var I7=U(),K0=I7.StripeResource.method;f7.OutboundPayments=I7.StripeResource.extend({update:K0({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}"}),fail:K0({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/fail"}),post:K0({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/post"}),returnOutboundPayment:K0({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_payments/{id}/return"})})});var j7=B((S7)=>{Object.defineProperty(S7,"__esModule",{value:!0});S7.OutboundPayments=void 0;var R7=U(),T0=R7.StripeResource.method;S7.OutboundPayments=R7.StripeResource.extend({create:T0({method:"POST",fullPath:"/v1/treasury/outbound_payments"}),retrieve:T0({method:"GET",fullPath:"/v1/treasury/outbound_payments/{id}"}),list:T0({method:"GET",fullPath:"/v1/treasury/outbound_payments",methodType:"list"}),cancel:T0({method:"POST",fullPath:"/v1/treasury/outbound_payments/{id}/cancel"})})});var l7=B((m7)=>{Object.defineProperty(m7,"__esModule",{value:!0});m7.OutboundTransfers=void 0;var _7=U(),N0=_7.StripeResource.method;m7.OutboundTransfers=_7.StripeResource.extend({update:N0({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}"}),fail:N0({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail"}),post:N0({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post"}),returnOutboundTransfer:N0({method:"POST",fullPath:"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return"})})});var n7=B((c7)=>{Object.defineProperty(c7,"__esModule",{value:!0});c7.OutboundTransfers=void 0;var u7=U(),H0=u7.StripeResource.method;c7.OutboundTransfers=u7.StripeResource.extend({create:H0({method:"POST",fullPath:"/v1/treasury/outbound_transfers"}),retrieve:H0({method:"GET",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}"}),list:H0({method:"GET",fullPath:"/v1/treasury/outbound_transfers",methodType:"list"}),cancel:H0({method:"POST",fullPath:"/v1/treasury/outbound_transfers/{outbound_transfer}/cancel"})})});var o7=B((i7)=>{Object.defineProperty(i7,"__esModule",{value:!0});i7.PaymentEvaluations=void 0;var a7=U(),Q3=a7.StripeResource.method;i7.PaymentEvaluations=a7.StripeResource.extend({create:Q3({method:"POST",fullPath:"/v1/radar/payment_evaluations"})})});var e7=B((r7)=>{Object.defineProperty(r7,"__esModule",{value:!0});r7.PersonalizationDesigns=void 0;var s7=U(),D0=s7.StripeResource.method;r7.PersonalizationDesigns=s7.StripeResource.extend({create:D0({method:"POST",fullPath:"/v1/issuing/personalization_designs"}),retrieve:D0({method:"GET",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),update:D0({method:"POST",fullPath:"/v1/issuing/personalization_designs/{personalization_design}"}),list:D0({method:"GET",fullPath:"/v1/issuing/personalization_designs",methodType:"list"})})});var Q4=B((Z4)=>{Object.defineProperty(Z4,"__esModule",{value:!0});Z4.PersonalizationDesigns=void 0;var J4=U(),LZ=J4.StripeResource.method;Z4.PersonalizationDesigns=J4.StripeResource.extend({activate:LZ({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate"}),deactivate:LZ({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate"}),reject:LZ({method:"POST",fullPath:"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject"})})});var Y4=B((B4)=>{Object.defineProperty(B4,"__esModule",{value:!0});B4.PhysicalBundles=void 0;var z4=U(),G4=z4.StripeResource.method;B4.PhysicalBundles=z4.StripeResource.extend({retrieve:G4({method:"GET",fullPath:"/v1/issuing/physical_bundles/{physical_bundle}"}),list:G4({method:"GET",fullPath:"/v1/issuing/physical_bundles",methodType:"list"})})});var W4=B((L4)=>{Object.defineProperty(L4,"__esModule",{value:!0});L4.Products=void 0;var U4=U(),w4=U4.StripeResource.method;L4.Products=U4.StripeResource.extend({retrieve:w4({method:"GET",fullPath:"/v1/climate/products/{product}",responseSchema:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}),list:w4({method:"GET",fullPath:"/v1/climate/products",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{metric_tons_available:{kind:"decimal_string"}}}}}}})})});var H4=B((T4)=>{Object.defineProperty(T4,"__esModule",{value:!0});T4.Readers=void 0;var K4=U(),M=K4.StripeResource.method;T4.Readers=K4.StripeResource.extend({create:M({method:"POST",fullPath:"/v1/terminal/readers"}),retrieve:M({method:"GET",fullPath:"/v1/terminal/readers/{reader}"}),update:M({method:"POST",fullPath:"/v1/terminal/readers/{reader}"}),list:M({method:"GET",fullPath:"/v1/terminal/readers",methodType:"list"}),del:M({method:"DELETE",fullPath:"/v1/terminal/readers/{reader}"}),cancelAction:M({method:"POST",fullPath:"/v1/terminal/readers/{reader}/cancel_action"}),collectInputs:M({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_inputs"}),collectPaymentMethod:M({method:"POST",fullPath:"/v1/terminal/readers/{reader}/collect_payment_method"}),confirmPaymentIntent:M({method:"POST",fullPath:"/v1/terminal/readers/{reader}/confirm_payment_intent"}),processPaymentIntent:M({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_payment_intent"}),processSetupIntent:M({method:"POST",fullPath:"/v1/terminal/readers/{reader}/process_setup_intent"}),refundPayment:M({method:"POST",fullPath:"/v1/terminal/readers/{reader}/refund_payment"}),setReaderDisplay:M({method:"POST",fullPath:"/v1/terminal/readers/{reader}/set_reader_display"})})});var O4=B((q4)=>{Object.defineProperty(q4,"__esModule",{value:!0});q4.Readers=void 0;var D4=U(),VZ=D4.StripeResource.method;q4.Readers=D4.StripeResource.extend({presentPaymentMethod:VZ({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/present_payment_method"}),succeedInputCollection:VZ({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/succeed_input_collection"}),timeoutInputCollection:VZ({method:"POST",fullPath:"/v1/test_helpers/terminal/readers/{reader}/timeout_input_collection"})})});var A4=B((F4)=>{Object.defineProperty(F4,"__esModule",{value:!0});F4.ReceivedCredits=void 0;var k4=U(),G3=k4.StripeResource.method;F4.ReceivedCredits=k4.StripeResource.extend({create:G3({method:"POST",fullPath:"/v1/test_helpers/treasury/received_credits"})})});var I4=B((x4)=>{Object.defineProperty(x4,"__esModule",{value:!0});x4.ReceivedCredits=void 0;var v4=U(),b4=v4.StripeResource.method;x4.ReceivedCredits=v4.StripeResource.extend({retrieve:b4({method:"GET",fullPath:"/v1/treasury/received_credits/{id}"}),list:b4({method:"GET",fullPath:"/v1/treasury/received_credits",methodType:"list"})})});var R4=B((y4)=>{Object.defineProperty(y4,"__esModule",{value:!0});y4.ReceivedDebits=void 0;var f4=U(),z3=f4.StripeResource.method;y4.ReceivedDebits=f4.StripeResource.extend({create:z3({method:"POST",fullPath:"/v1/test_helpers/treasury/received_debits"})})});var m4=B((j4)=>{Object.defineProperty(j4,"__esModule",{value:!0});j4.ReceivedDebits=void 0;var M4=U(),S4=M4.StripeResource.method;j4.ReceivedDebits=M4.StripeResource.extend({retrieve:S4({method:"GET",fullPath:"/v1/treasury/received_debits/{id}"}),list:S4({method:"GET",fullPath:"/v1/treasury/received_debits",methodType:"list"})})});var c4=B((l4)=>{Object.defineProperty(l4,"__esModule",{value:!0});l4.Refunds=void 0;var h4=U(),B3=h4.StripeResource.method;l4.Refunds=h4.StripeResource.extend({expire:B3({method:"POST",fullPath:"/v1/test_helpers/refunds/{refund}/expire"})})});var i4=B((n4)=>{Object.defineProperty(n4,"__esModule",{value:!0});n4.Registrations=void 0;var d4=U(),q0=d4.StripeResource.method;n4.Registrations=d4.StripeResource.extend({create:q0({method:"POST",fullPath:"/v1/tax/registrations"}),retrieve:q0({method:"GET",fullPath:"/v1/tax/registrations/{id}"}),update:q0({method:"POST",fullPath:"/v1/tax/registrations/{id}"}),list:q0({method:"GET",fullPath:"/v1/tax/registrations",methodType:"list"})})});var r4=B((o4)=>{Object.defineProperty(o4,"__esModule",{value:!0});o4.ReportRuns=void 0;var p4=U(),WZ=p4.StripeResource.method;o4.ReportRuns=p4.StripeResource.extend({create:WZ({method:"POST",fullPath:"/v1/reporting/report_runs"}),retrieve:WZ({method:"GET",fullPath:"/v1/reporting/report_runs/{report_run}"}),list:WZ({method:"GET",fullPath:"/v1/reporting/report_runs",methodType:"list"})})});var $5=B((J5)=>{Object.defineProperty(J5,"__esModule",{value:!0});J5.ReportTypes=void 0;var e4=U(),t4=e4.StripeResource.method;J5.ReportTypes=e4.StripeResource.extend({retrieve:t4({method:"GET",fullPath:"/v1/reporting/report_types/{report_type}"}),list:t4({method:"GET",fullPath:"/v1/reporting/report_types",methodType:"list"})})});var B5=B((G5)=>{Object.defineProperty(G5,"__esModule",{value:!0});G5.Requests=void 0;var Q5=U(),KZ=Q5.StripeResource.method;G5.Requests=Q5.StripeResource.extend({create:KZ({method:"POST",fullPath:"/v1/forwarding/requests"}),retrieve:KZ({method:"GET",fullPath:"/v1/forwarding/requests/{id}"}),list:KZ({method:"GET",fullPath:"/v1/forwarding/requests",methodType:"list"})})});var L5=B((w5)=>{Object.defineProperty(w5,"__esModule",{value:!0});w5.ScheduledQueryRuns=void 0;var Y5=U(),X5=Y5.StripeResource.method;w5.ScheduledQueryRuns=Y5.StripeResource.extend({retrieve:X5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs/{scheduled_query_run}"}),list:X5({method:"GET",fullPath:"/v1/sigma/scheduled_query_runs",methodType:"list"})})});var T5=B((W5)=>{Object.defineProperty(W5,"__esModule",{value:!0});W5.Secrets=void 0;var V5=U(),E0=V5.StripeResource.method;W5.Secrets=V5.StripeResource.extend({create:E0({method:"POST",fullPath:"/v1/apps/secrets"}),list:E0({method:"GET",fullPath:"/v1/apps/secrets",methodType:"list"}),deleteWhere:E0({method:"POST",fullPath:"/v1/apps/secrets/delete"}),find:E0({method:"GET",fullPath:"/v1/apps/secrets/find"})})});var q5=B((H5)=>{Object.defineProperty(H5,"__esModule",{value:!0});H5.Sessions=void 0;var N5=U(),X3=N5.StripeResource.method;H5.Sessions=N5.StripeResource.extend({create:X3({method:"POST",fullPath:"/v1/billing_portal/sessions"})})});var F5=B((O5)=>{Object.defineProperty(O5,"__esModule",{value:!0});O5.Sessions=void 0;var E5=U(),VJ=E5.StripeResource.method;O5.Sessions=E5.StripeResource.extend({create:VJ({method:"POST",fullPath:"/v1/checkout/sessions",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:VJ({method:"GET",fullPath:"/v1/checkout/sessions/{session}",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:VJ({method:"POST",fullPath:"/v1/checkout/sessions/{session}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:VJ({method:"GET",fullPath:"/v1/checkout/sessions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),expire:VJ({method:"POST",fullPath:"/v1/checkout/sessions/{session}/expire",responseSchema:{kind:"object",fields:{currency_conversion:{kind:"nullable",inner:{kind:"object",fields:{fx_rate:{kind:"decimal_string"}}}},line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:VJ({method:"GET",fullPath:"/v1/checkout/sessions/{session}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var x5=B((b5)=>{Object.defineProperty(b5,"__esModule",{value:!0});b5.Sessions=void 0;var A5=U(),C5=A5.StripeResource.method;b5.Sessions=A5.StripeResource.extend({create:C5({method:"POST",fullPath:"/v1/financial_connections/sessions"}),retrieve:C5({method:"GET",fullPath:"/v1/financial_connections/sessions/{session}"})})});var g5=B((f5)=>{Object.defineProperty(f5,"__esModule",{value:!0});f5.Settings=void 0;var I5=U(),P5=I5.StripeResource.method;f5.Settings=I5.StripeResource.extend({retrieve:P5({method:"GET",fullPath:"/v1/tax/settings"}),update:P5({method:"POST",fullPath:"/v1/tax/settings"})})});var _5=B((M5)=>{Object.defineProperty(M5,"__esModule",{value:!0});M5.Suppliers=void 0;var S5=U(),R5=S5.StripeResource.method;M5.Suppliers=S5.StripeResource.extend({retrieve:R5({method:"GET",fullPath:"/v1/climate/suppliers/{supplier}"}),list:R5({method:"GET",fullPath:"/v1/climate/suppliers",methodType:"list"})})});var u5=B((h5)=>{Object.defineProperty(h5,"__esModule",{value:!0});h5.TestClocks=void 0;var m5=U(),jJ=m5.StripeResource.method;h5.TestClocks=m5.StripeResource.extend({create:jJ({method:"POST",fullPath:"/v1/test_helpers/test_clocks"}),retrieve:jJ({method:"GET",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),list:jJ({method:"GET",fullPath:"/v1/test_helpers/test_clocks",methodType:"list"}),del:jJ({method:"DELETE",fullPath:"/v1/test_helpers/test_clocks/{test_clock}"}),advance:jJ({method:"POST",fullPath:"/v1/test_helpers/test_clocks/{test_clock}/advance"})})});var a5=B((d5)=>{Object.defineProperty(d5,"__esModule",{value:!0});d5.Tokens=void 0;var c5=U(),TZ=c5.StripeResource.method;d5.Tokens=c5.StripeResource.extend({retrieve:TZ({method:"GET",fullPath:"/v1/issuing/tokens/{token}"}),update:TZ({method:"POST",fullPath:"/v1/issuing/tokens/{token}"}),list:TZ({method:"GET",fullPath:"/v1/issuing/tokens",methodType:"list"})})});var r5=B((o5)=>{Object.defineProperty(o5,"__esModule",{value:!0});o5.TransactionEntries=void 0;var p5=U(),i5=p5.StripeResource.method;o5.TransactionEntries=p5.StripeResource.extend({retrieve:i5({method:"GET",fullPath:"/v1/treasury/transaction_entries/{id}",responseSchema:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}),list:i5({method:"GET",fullPath:"/v1/treasury/transaction_entries",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}})})});var $G=B((JG)=>{Object.defineProperty(JG,"__esModule",{value:!0});JG.Transactions=void 0;var e5=U(),t5=e5.StripeResource.method;JG.Transactions=e5.StripeResource.extend({retrieve:t5({method:"GET",fullPath:"/v1/financial_connections/transactions/{transaction}"}),list:t5({method:"GET",fullPath:"/v1/financial_connections/transactions",methodType:"list"})})});var BG=B((GG)=>{Object.defineProperty(GG,"__esModule",{value:!0});GG.Transactions=void 0;var QG=U(),NZ=QG.StripeResource.method;GG.Transactions=QG.StripeResource.extend({retrieve:NZ({method:"GET",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),update:NZ({method:"POST",fullPath:"/v1/issuing/transactions/{transaction}",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),list:NZ({method:"GET",fullPath:"/v1/issuing/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}})})});var UG=B((YG)=>{Object.defineProperty(YG,"__esModule",{value:!0});YG.Transactions=void 0;var XG=U(),O0=XG.StripeResource.method;YG.Transactions=XG.StripeResource.extend({retrieve:O0({method:"GET",fullPath:"/v1/tax/transactions/{transaction}"}),createFromCalculation:O0({method:"POST",fullPath:"/v1/tax/transactions/create_from_calculation"}),createReversal:O0({method:"POST",fullPath:"/v1/tax/transactions/create_reversal"}),listLineItems:O0({method:"GET",fullPath:"/v1/tax/transactions/{transaction}/line_items",methodType:"list"})})});var KG=B((VG)=>{Object.defineProperty(VG,"__esModule",{value:!0});VG.Transactions=void 0;var LG=U(),HZ=LG.StripeResource.method;VG.Transactions=LG.StripeResource.extend({createForceCapture:HZ({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_force_capture",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),createUnlinkedRefund:HZ({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/create_unlinked_refund",requestSchema:{kind:"object",fields:{purchase_details:{kind:"object",fields:{fleet:{kind:"object",fields:{reported_breakdown:{kind:"object",fields:{fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},non_fuel:{kind:"object",fields:{gross_amount_decimal:{kind:"decimal_string"}}},tax:{kind:"object",fields:{local_amount_decimal:{kind:"decimal_string"},national_amount_decimal:{kind:"decimal_string"}}}}}}},fuel:{kind:"object",fields:{quantity_decimal:{kind:"decimal_string"},unit_cost_decimal:{kind:"decimal_string"}}},receipt:{kind:"array",element:{kind:"object",fields:{quantity:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}),refund:HZ({method:"POST",fullPath:"/v1/test_helpers/issuing/transactions/{transaction}/refund",responseSchema:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}})})});var qG=B((HG)=>{Object.defineProperty(HG,"__esModule",{value:!0});HG.Transactions=void 0;var NG=U(),TG=NG.StripeResource.method;HG.Transactions=NG.StripeResource.extend({retrieve:TG({method:"GET",fullPath:"/v1/treasury/transactions/{id}",responseSchema:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}),list:TG({method:"GET",fullPath:"/v1/treasury/transactions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{entries:{kind:"nullable",inner:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{flow_details:{kind:"nullable",inner:{kind:"object",fields:{issuing_authorization:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},transactions:{kind:"array",element:{kind:"object",fields:{purchase_details:{kind:"nullable",inner:{kind:"object",fields:{fleet:{kind:"nullable",inner:{kind:"object",fields:{reported_breakdown:{kind:"nullable",inner:{kind:"object",fields:{fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},non_fuel:{kind:"nullable",inner:{kind:"object",fields:{gross_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tax:{kind:"nullable",inner:{kind:"object",fields:{local_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},national_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}},fuel:{kind:"nullable",inner:{kind:"object",fields:{quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_cost_decimal:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}}}}}}}})})});var FG=B((OG)=>{Object.defineProperty(OG,"__esModule",{value:!0});OG.ValueListItems=void 0;var EG=U(),k0=EG.StripeResource.method;OG.ValueListItems=EG.StripeResource.extend({create:k0({method:"POST",fullPath:"/v1/radar/value_list_items"}),retrieve:k0({method:"GET",fullPath:"/v1/radar/value_list_items/{item}"}),list:k0({method:"GET",fullPath:"/v1/radar/value_list_items",methodType:"list"}),del:k0({method:"DELETE",fullPath:"/v1/radar/value_list_items/{item}"})})});var vG=B((AG)=>{Object.defineProperty(AG,"__esModule",{value:!0});AG.ValueLists=void 0;var CG=U(),_J=CG.StripeResource.method;AG.ValueLists=CG.StripeResource.extend({create:_J({method:"POST",fullPath:"/v1/radar/value_lists"}),retrieve:_J({method:"GET",fullPath:"/v1/radar/value_lists/{value_list}"}),update:_J({method:"POST",fullPath:"/v1/radar/value_lists/{value_list}"}),list:_J({method:"GET",fullPath:"/v1/radar/value_lists",methodType:"list"}),del:_J({method:"DELETE",fullPath:"/v1/radar/value_lists/{value_list}"})})});var yG=B((IG)=>{Object.defineProperty(IG,"__esModule",{value:!0});IG.VerificationReports=void 0;var PG=U(),xG=PG.StripeResource.method;IG.VerificationReports=PG.StripeResource.extend({retrieve:xG({method:"GET",fullPath:"/v1/identity/verification_reports/{report}"}),list:xG({method:"GET",fullPath:"/v1/identity/verification_reports",methodType:"list"})})});var MG=B((RG)=>{Object.defineProperty(RG,"__esModule",{value:!0});RG.VerificationSessions=void 0;var gG=U(),WJ=gG.StripeResource.method;RG.VerificationSessions=gG.StripeResource.extend({create:WJ({method:"POST",fullPath:"/v1/identity/verification_sessions"}),retrieve:WJ({method:"GET",fullPath:"/v1/identity/verification_sessions/{session}"}),update:WJ({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}"}),list:WJ({method:"GET",fullPath:"/v1/identity/verification_sessions",methodType:"list"}),cancel:WJ({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/cancel"}),redact:WJ({method:"POST",fullPath:"/v1/identity/verification_sessions/{session}/redact"})})});var DZ=B((_G)=>{Object.defineProperty(_G,"__esModule",{value:!0});_G.Accounts=void 0;var jG=U(),A=jG.StripeResource.method;_G.Accounts=jG.StripeResource.extend({create:A({method:"POST",fullPath:"/v1/accounts"}),retrieve(J,...Z){if(typeof J==="string")return A({method:"GET",fullPath:"/v1/accounts/{id}"}).apply(this,[J,...Z]);else{if(J===null||J===void 0)[].shift.apply([J,...Z]);return A({method:"GET",fullPath:"/v1/account"}).apply(this,[J,...Z])}},update:A({method:"POST",fullPath:"/v1/accounts/{account}"}),list:A({method:"GET",fullPath:"/v1/accounts",methodType:"list"}),del:A({method:"DELETE",fullPath:"/v1/accounts/{account}"}),createExternalAccount:A({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts"}),createLoginLink:A({method:"POST",fullPath:"/v1/accounts/{account}/login_links"}),createPerson:A({method:"POST",fullPath:"/v1/accounts/{account}/persons"}),deleteExternalAccount:A({method:"DELETE",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),deletePerson:A({method:"DELETE",fullPath:"/v1/accounts/{account}/persons/{person}"}),listCapabilities:A({method:"GET",fullPath:"/v1/accounts/{account}/capabilities",methodType:"list"}),listExternalAccounts:A({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts",methodType:"list"}),listPersons:A({method:"GET",fullPath:"/v1/accounts/{account}/persons",methodType:"list"}),reject:A({method:"POST",fullPath:"/v1/accounts/{account}/reject"}),retrieveCurrent:A({method:"GET",fullPath:"/v1/account"}),retrieveCapability:A({method:"GET",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),retrieveExternalAccount:A({method:"GET",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),retrievePerson:A({method:"GET",fullPath:"/v1/accounts/{account}/persons/{person}"}),updateCapability:A({method:"POST",fullPath:"/v1/accounts/{account}/capabilities/{capability}"}),updateExternalAccount:A({method:"POST",fullPath:"/v1/accounts/{account}/external_accounts/{id}"}),updatePerson:A({method:"POST",fullPath:"/v1/accounts/{account}/persons/{person}"})})});var cG=B((lG)=>{Object.defineProperty(lG,"__esModule",{value:!0});lG.AccountLinks=void 0;var hG=U(),Y3=hG.StripeResource.method;lG.AccountLinks=hG.StripeResource.extend({create:Y3({method:"POST",fullPath:"/v1/account_links"})})});var iG=B((nG)=>{Object.defineProperty(nG,"__esModule",{value:!0});nG.AccountSessions=void 0;var dG=U(),w3=dG.StripeResource.method;nG.AccountSessions=dG.StripeResource.extend({create:w3({method:"POST",fullPath:"/v1/account_sessions"})})});var rG=B((oG)=>{Object.defineProperty(oG,"__esModule",{value:!0});oG.ApplePayDomains=void 0;var pG=U(),F0=pG.StripeResource.method;oG.ApplePayDomains=pG.StripeResource.extend({create:F0({method:"POST",fullPath:"/v1/apple_pay/domains"}),retrieve:F0({method:"GET",fullPath:"/v1/apple_pay/domains/{domain}"}),list:F0({method:"GET",fullPath:"/v1/apple_pay/domains",methodType:"list"}),del:F0({method:"DELETE",fullPath:"/v1/apple_pay/domains/{domain}"})})});var Z6=B((eG)=>{Object.defineProperty(eG,"__esModule",{value:!0});eG.ApplicationFees=void 0;var tG=U(),KJ=tG.StripeResource.method;eG.ApplicationFees=tG.StripeResource.extend({retrieve:KJ({method:"GET",fullPath:"/v1/application_fees/{id}"}),list:KJ({method:"GET",fullPath:"/v1/application_fees",methodType:"list"}),createRefund:KJ({method:"POST",fullPath:"/v1/application_fees/{id}/refunds"}),listRefunds:KJ({method:"GET",fullPath:"/v1/application_fees/{id}/refunds",methodType:"list"}),retrieveRefund:KJ({method:"GET",fullPath:"/v1/application_fees/{fee}/refunds/{id}"}),updateRefund:KJ({method:"POST",fullPath:"/v1/application_fees/{fee}/refunds/{id}"})})});var z6=B((Q6)=>{Object.defineProperty(Q6,"__esModule",{value:!0});Q6.Balance=void 0;var $6=U(),U3=$6.StripeResource.method;Q6.Balance=$6.StripeResource.extend({retrieve:U3({method:"GET",fullPath:"/v1/balance"})})});var U6=B((Y6)=>{Object.defineProperty(Y6,"__esModule",{value:!0});Y6.BalanceSettings=void 0;var X6=U(),B6=X6.StripeResource.method;Y6.BalanceSettings=X6.StripeResource.extend({retrieve:B6({method:"GET",fullPath:"/v1/balance_settings"}),update:B6({method:"POST",fullPath:"/v1/balance_settings"})})});var T6=B((W6)=>{Object.defineProperty(W6,"__esModule",{value:!0});W6.BalanceTransactions=void 0;var V6=U(),L6=V6.StripeResource.method;W6.BalanceTransactions=V6.StripeResource.extend({retrieve:L6({method:"GET",fullPath:"/v1/balance_transactions/{id}"}),list:L6({method:"GET",fullPath:"/v1/balance_transactions",methodType:"list"})})});var q6=B((H6)=>{Object.defineProperty(H6,"__esModule",{value:!0});H6.Charges=void 0;var N6=U(),TJ=N6.StripeResource.method;H6.Charges=N6.StripeResource.extend({create:TJ({method:"POST",fullPath:"/v1/charges"}),retrieve:TJ({method:"GET",fullPath:"/v1/charges/{charge}"}),update:TJ({method:"POST",fullPath:"/v1/charges/{charge}"}),list:TJ({method:"GET",fullPath:"/v1/charges",methodType:"list"}),capture:TJ({method:"POST",fullPath:"/v1/charges/{charge}/capture"}),search:TJ({method:"GET",fullPath:"/v1/charges/search",methodType:"search"})})});var F6=B((O6)=>{Object.defineProperty(O6,"__esModule",{value:!0});O6.ConfirmationTokens=void 0;var E6=U(),L3=E6.StripeResource.method;O6.ConfirmationTokens=E6.StripeResource.extend({retrieve:L3({method:"GET",fullPath:"/v1/confirmation_tokens/{confirmation_token}"})})});var x6=B((b6)=>{Object.defineProperty(b6,"__esModule",{value:!0});b6.CountrySpecs=void 0;var A6=U(),C6=A6.StripeResource.method;b6.CountrySpecs=A6.StripeResource.extend({retrieve:C6({method:"GET",fullPath:"/v1/country_specs/{country}"}),list:C6({method:"GET",fullPath:"/v1/country_specs",methodType:"list"})})});var y6=B((I6)=>{Object.defineProperty(I6,"__esModule",{value:!0});I6.Coupons=void 0;var P6=U(),mJ=P6.StripeResource.method;I6.Coupons=P6.StripeResource.extend({create:mJ({method:"POST",fullPath:"/v1/coupons"}),retrieve:mJ({method:"GET",fullPath:"/v1/coupons/{coupon}"}),update:mJ({method:"POST",fullPath:"/v1/coupons/{coupon}"}),list:mJ({method:"GET",fullPath:"/v1/coupons",methodType:"list"}),del:mJ({method:"DELETE",fullPath:"/v1/coupons/{coupon}"})})});var M6=B((R6)=>{Object.defineProperty(R6,"__esModule",{value:!0});R6.CreditNotes=void 0;var g6=U(),i=g6.StripeResource.method;R6.CreditNotes=g6.StripeResource.extend({create:i({method:"POST",fullPath:"/v1/credit_notes",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:i({method:"GET",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:i({method:"POST",fullPath:"/v1/credit_notes/{id}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:i({method:"GET",fullPath:"/v1/credit_notes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),listLineItems:i({method:"GET",fullPath:"/v1/credit_notes/{credit_note}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),listPreviewLineItems:i({method:"GET",fullPath:"/v1/credit_notes/preview/lines",methodType:"list",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),preview:i({method:"GET",fullPath:"/v1/credit_notes/preview",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),voidCreditNote:i({method:"POST",fullPath:"/v1/credit_notes/{id}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var h6=B((_6)=>{Object.defineProperty(_6,"__esModule",{value:!0});_6.CustomerSessions=void 0;var j6=U(),V3=j6.StripeResource.method;_6.CustomerSessions=j6.StripeResource.extend({create:V3({method:"POST",fullPath:"/v1/customer_sessions"})})});var d6=B((u6)=>{Object.defineProperty(u6,"__esModule",{value:!0});u6.Customers=void 0;var l6=U(),F=l6.StripeResource.method;u6.Customers=l6.StripeResource.extend({create:F({method:"POST",fullPath:"/v1/customers",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:F({method:"GET",fullPath:"/v1/customers/{customer}"}),update:F({method:"POST",fullPath:"/v1/customers/{customer}",responseSchema:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:F({method:"GET",fullPath:"/v1/customers",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),del:F({method:"DELETE",fullPath:"/v1/customers/{customer}"}),createBalanceTransaction:F({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions"}),createFundingInstructions:F({method:"POST",fullPath:"/v1/customers/{customer}/funding_instructions"}),createSource:F({method:"POST",fullPath:"/v1/customers/{customer}/sources"}),createTaxId:F({method:"POST",fullPath:"/v1/customers/{customer}/tax_ids"}),deleteDiscount:F({method:"DELETE",fullPath:"/v1/customers/{customer}/discount"}),deleteSource:F({method:"DELETE",fullPath:"/v1/customers/{customer}/sources/{id}"}),deleteTaxId:F({method:"DELETE",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),listBalanceTransactions:F({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions",methodType:"list"}),listCashBalanceTransactions:F({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions",methodType:"list"}),listPaymentMethods:F({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods",methodType:"list"}),listSources:F({method:"GET",fullPath:"/v1/customers/{customer}/sources",methodType:"list"}),listTaxIds:F({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids",methodType:"list"}),retrieveBalanceTransaction:F({method:"GET",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),retrieveCashBalance:F({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance"}),retrieveCashBalanceTransaction:F({method:"GET",fullPath:"/v1/customers/{customer}/cash_balance_transactions/{transaction}"}),retrievePaymentMethod:F({method:"GET",fullPath:"/v1/customers/{customer}/payment_methods/{payment_method}"}),retrieveSource:F({method:"GET",fullPath:"/v1/customers/{customer}/sources/{id}"}),retrieveTaxId:F({method:"GET",fullPath:"/v1/customers/{customer}/tax_ids/{id}"}),search:F({method:"GET",fullPath:"/v1/customers/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{subscriptions:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),updateBalanceTransaction:F({method:"POST",fullPath:"/v1/customers/{customer}/balance_transactions/{transaction}"}),updateCashBalance:F({method:"POST",fullPath:"/v1/customers/{customer}/cash_balance"}),updateSource:F({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}"}),verifySource:F({method:"POST",fullPath:"/v1/customers/{customer}/sources/{id}/verify"})})});var p6=B((a6)=>{Object.defineProperty(a6,"__esModule",{value:!0});a6.Disputes=void 0;var n6=U(),C0=n6.StripeResource.method;a6.Disputes=n6.StripeResource.extend({retrieve:C0({method:"GET",fullPath:"/v1/disputes/{dispute}"}),update:C0({method:"POST",fullPath:"/v1/disputes/{dispute}"}),list:C0({method:"GET",fullPath:"/v1/disputes",methodType:"list"}),close:C0({method:"POST",fullPath:"/v1/disputes/{dispute}/close"})})});var e6=B((r6)=>{Object.defineProperty(r6,"__esModule",{value:!0});r6.EphemeralKeys=void 0;var s6=U(),o6=s6.StripeResource.method;r6.EphemeralKeys=s6.StripeResource.extend({create:o6({method:"POST",fullPath:"/v1/ephemeral_keys",validator:(J,Z)=>{if(!Z.headers||!Z.headers["Stripe-Version"])throw Error("Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node")}}),del:o6({method:"DELETE",fullPath:"/v1/ephemeral_keys/{key}"})})});var Gz=B(($z)=>{Object.defineProperty($z,"__esModule",{value:!0});$z.Events=void 0;var Zz=U(),Jz=Zz.StripeResource.method;$z.Events=Zz.StripeResource.extend({retrieve:Jz({method:"GET",fullPath:"/v1/events/{id}"}),list:Jz({method:"GET",fullPath:"/v1/events",methodType:"list"})})});var wz=B((Xz)=>{Object.defineProperty(Xz,"__esModule",{value:!0});Xz.ExchangeRates=void 0;var Bz=U(),zz=Bz.StripeResource.method;Xz.ExchangeRates=Bz.StripeResource.extend({retrieve:zz({method:"GET",fullPath:"/v1/exchange_rates/{rate_id}"}),list:zz({method:"GET",fullPath:"/v1/exchange_rates",methodType:"list"})})});var Wz=B((Lz)=>{Object.defineProperty(Lz,"__esModule",{value:!0});Lz.FileLinks=void 0;var Uz=U(),A0=Uz.StripeResource.method;Lz.FileLinks=Uz.StripeResource.extend({create:A0({method:"POST",fullPath:"/v1/file_links"}),retrieve:A0({method:"GET",fullPath:"/v1/file_links/{link}"}),update:A0({method:"POST",fullPath:"/v1/file_links/{link}"}),list:A0({method:"GET",fullPath:"/v1/file_links",methodType:"list"})})});var Hz=B((Tz)=>{Object.defineProperty(Tz,"__esModule",{value:!0});Tz.multipartRequestDataProcessor=void 0;var Kz=_(),W3=(J,Z,$)=>{let Q=(Math.round(Math.random()*10000000000000000)+Math.round(Math.random()*10000000000000000)).toString();$["Content-Type"]=`multipart/form-data; boundary=${Q}`;let G=new TextEncoder,z=new Uint8Array(0),w=G.encode(`\r
|
|
12
|
+
`);function X(Y){let V=z,W=Y instanceof Uint8Array?Y:new Uint8Array(G.encode(Y));z=new Uint8Array(V.length+W.length+2),z.set(V),z.set(W,V.length),z.set(w,z.length-2)}function K(Y){return`"${Y.replace(/"|"/g,"%22").replace(/\r\n|\r|\n/g," ")}"`}let T=(0,Kz.flattenAndStringify)(Z);for(let Y in T){if(!Object.prototype.hasOwnProperty.call(T,Y))continue;let V=T[Y];if(X(`--${Q}`),Object.prototype.hasOwnProperty.call(V,"data")){let W=V;X(`Content-Disposition: form-data; name=${K(Y)}; filename=${K(W.name||"blob")}`),X(`Content-Type: ${W.type||"application/octet-stream"}`),X(""),X(W.data)}else X(`Content-Disposition: form-data; name=${K(Y)}`),X(""),X(V)}return X(`--${Q}--`),z};function K3(J,Z,$,Q){if(Z=Z||{},J!=="POST")return Q(null,(0,Kz.queryStringifyRequestData)(Z));this._stripe._platformFunctions.tryBufferData(Z).then((G)=>{let z=W3(J,G,$);return Q(null,z)}).catch((G)=>Q(G,null))}Tz.multipartRequestDataProcessor=K3});var Oz=B((qz)=>{Object.defineProperty(qz,"__esModule",{value:!0});qz.Files=void 0;var T3=Hz(),Dz=U(),qZ=Dz.StripeResource.method;qz.Files=Dz.StripeResource.extend({create:qZ({method:"POST",fullPath:"/v1/files",headers:{"Content-Type":"multipart/form-data"},host:"files.stripe.com"}),retrieve:qZ({method:"GET",fullPath:"/v1/files/{file}"}),list:qZ({method:"GET",fullPath:"/v1/files",methodType:"list"}),requestDataProcessor:T3.multipartRequestDataProcessor})});var Az=B((Fz)=>{Object.defineProperty(Fz,"__esModule",{value:!0});Fz.InvoiceItems=void 0;var kz=U(),hJ=kz.StripeResource.method;Fz.InvoiceItems=kz.StripeResource.extend({create:hJ({method:"POST",fullPath:"/v1/invoiceitems",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),retrieve:hJ({method:"GET",fullPath:"/v1/invoiceitems/{invoiceitem}",responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),update:hJ({method:"POST",fullPath:"/v1/invoiceitems/{invoiceitem}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}),list:hJ({method:"GET",fullPath:"/v1/invoiceitems",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"decimal_string"}}}}}}}),del:hJ({method:"DELETE",fullPath:"/v1/invoiceitems/{invoiceitem}"})})});var Iz=B((xz)=>{Object.defineProperty(xz,"__esModule",{value:!0});xz.InvoicePayments=void 0;var vz=U(),bz=vz.StripeResource.method;xz.InvoicePayments=vz.StripeResource.extend({retrieve:bz({method:"GET",fullPath:"/v1/invoice_payments/{invoice_payment}"}),list:bz({method:"GET",fullPath:"/v1/invoice_payments",methodType:"list"})})});var Rz=B((yz)=>{Object.defineProperty(yz,"__esModule",{value:!0});yz.InvoiceRenderingTemplates=void 0;var fz=U(),b0=fz.StripeResource.method;yz.InvoiceRenderingTemplates=fz.StripeResource.extend({retrieve:b0({method:"GET",fullPath:"/v1/invoice_rendering_templates/{template}"}),list:b0({method:"GET",fullPath:"/v1/invoice_rendering_templates",methodType:"list"}),archive:b0({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/archive"}),unarchive:b0({method:"POST",fullPath:"/v1/invoice_rendering_templates/{template}/unarchive"})})});var _z=B((Mz)=>{Object.defineProperty(Mz,"__esModule",{value:!0});Mz.Invoices=void 0;var Sz=U(),P=Sz.StripeResource.method;Mz.Invoices=Sz.StripeResource.extend({create:P({method:"POST",fullPath:"/v1/invoices",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),retrieve:P({method:"GET",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),update:P({method:"POST",fullPath:"/v1/invoices/{invoice}",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),list:P({method:"GET",fullPath:"/v1/invoices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),del:P({method:"DELETE",fullPath:"/v1/invoices/{invoice}"}),addLines:P({method:"POST",fullPath:"/v1/invoices/{invoice}/add_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),attachPayment:P({method:"POST",fullPath:"/v1/invoices/{invoice}/attach_payment",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),createPreview:P({method:"POST",fullPath:"/v1/invoices/create_preview",requestSchema:{kind:"object",fields:{invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},schedule_details:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}},subscription_details:{kind:"object",fields:{items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),finalizeInvoice:P({method:"POST",fullPath:"/v1/invoices/{invoice}/finalize",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),listLineItems:P({method:"GET",fullPath:"/v1/invoices/{invoice}/lines",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),markUncollectible:P({method:"POST",fullPath:"/v1/invoices/{invoice}/mark_uncollectible",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),pay:P({method:"POST",fullPath:"/v1/invoices/{invoice}/pay",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),removeLines:P({method:"POST",fullPath:"/v1/invoices/{invoice}/remove_lines",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),search:P({method:"GET",fullPath:"/v1/invoices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),sendInvoice:P({method:"POST",fullPath:"/v1/invoices/{invoice}/send",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLines:P({method:"POST",fullPath:"/v1/invoices/{invoice}/update_lines",requestSchema:{kind:"object",fields:{lines:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),updateLineItem:P({method:"POST",fullPath:"/v1/invoices/{invoice}/lines/{line_item_id}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}},quantity_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),voidInvoice:P({method:"POST",fullPath:"/v1/invoices/{invoice}/void",responseSchema:{kind:"object",fields:{lines:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{pricing:{kind:"nullable",inner:{kind:"object",fields:{unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},quantity_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}})})});var uz=B((hz)=>{Object.defineProperty(hz,"__esModule",{value:!0});hz.Mandates=void 0;var mz=U(),N3=mz.StripeResource.method;hz.Mandates=mz.StripeResource.extend({retrieve:N3({method:"GET",fullPath:"/v1/mandates/{mandate}"})})});var iz=B((nz)=>{Object.defineProperty(nz,"__esModule",{value:!0});nz.OAuth=void 0;var dz=U(),H3=_(),cz=dz.StripeResource.method,EZ="connect.stripe.com";nz.OAuth=dz.StripeResource.extend({basePath:"/",authorizeUrl(J,Z){J=J||{},Z=Z||{};let $="oauth/authorize";if(Z.express)$=`express/${$}`;if(!J.response_type)J.response_type="code";if(!J.client_id)J.client_id=this._stripe.getClientId();if(!J.scope)J.scope="read_write";return`https://${EZ}/${$}?${(0,H3.queryStringifyRequestData)(J)}`},token:cz({method:"POST",path:"oauth/token",host:EZ}),deauthorize(J,...Z){if(!J.client_id)J.client_id=this._stripe.getClientId();return cz({method:"POST",path:"oauth/deauthorize",host:EZ}).apply(this,[J,...Z])}})});var tz=B((sz)=>{Object.defineProperty(sz,"__esModule",{value:!0});sz.PaymentAttemptRecords=void 0;var oz=U(),pz=oz.StripeResource.method;sz.PaymentAttemptRecords=oz.StripeResource.extend({retrieve:pz({method:"GET",fullPath:"/v1/payment_attempt_records/{id}"}),list:pz({method:"GET",fullPath:"/v1/payment_attempt_records",methodType:"list"})})});var $1=B((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.PaymentIntents=void 0;var ez=U(),j=ez.StripeResource.method;J1.PaymentIntents=ez.StripeResource.extend({create:j({method:"POST",fullPath:"/v1/payment_intents"}),retrieve:j({method:"GET",fullPath:"/v1/payment_intents/{intent}"}),update:j({method:"POST",fullPath:"/v1/payment_intents/{intent}"}),list:j({method:"GET",fullPath:"/v1/payment_intents",methodType:"list"}),applyCustomerBalance:j({method:"POST",fullPath:"/v1/payment_intents/{intent}/apply_customer_balance"}),cancel:j({method:"POST",fullPath:"/v1/payment_intents/{intent}/cancel"}),capture:j({method:"POST",fullPath:"/v1/payment_intents/{intent}/capture"}),confirm:j({method:"POST",fullPath:"/v1/payment_intents/{intent}/confirm"}),incrementAuthorization:j({method:"POST",fullPath:"/v1/payment_intents/{intent}/increment_authorization"}),listAmountDetailsLineItems:j({method:"GET",fullPath:"/v1/payment_intents/{intent}/amount_details_line_items",methodType:"list"}),search:j({method:"GET",fullPath:"/v1/payment_intents/search",methodType:"search"}),verifyMicrodeposits:j({method:"POST",fullPath:"/v1/payment_intents/{intent}/verify_microdeposits"})})});var B1=B((G1)=>{Object.defineProperty(G1,"__esModule",{value:!0});G1.PaymentLinks=void 0;var Q1=U(),lJ=Q1.StripeResource.method;G1.PaymentLinks=Q1.StripeResource.extend({create:lJ({method:"POST",fullPath:"/v1/payment_links",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),retrieve:lJ({method:"GET",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),update:lJ({method:"POST",fullPath:"/v1/payment_links/{payment_link}",responseSchema:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}),list:lJ({method:"GET",fullPath:"/v1/payment_links",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}),listLineItems:lJ({method:"GET",fullPath:"/v1/payment_links/{payment_link}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}})})});var U1=B((Y1)=>{Object.defineProperty(Y1,"__esModule",{value:!0});Y1.PaymentMethodConfigurations=void 0;var X1=U(),v0=X1.StripeResource.method;Y1.PaymentMethodConfigurations=X1.StripeResource.extend({create:v0({method:"POST",fullPath:"/v1/payment_method_configurations"}),retrieve:v0({method:"GET",fullPath:"/v1/payment_method_configurations/{configuration}"}),update:v0({method:"POST",fullPath:"/v1/payment_method_configurations/{configuration}"}),list:v0({method:"GET",fullPath:"/v1/payment_method_configurations",methodType:"list"})})});var K1=B((V1)=>{Object.defineProperty(V1,"__esModule",{value:!0});V1.PaymentMethodDomains=void 0;var L1=U(),uJ=L1.StripeResource.method;V1.PaymentMethodDomains=L1.StripeResource.extend({create:uJ({method:"POST",fullPath:"/v1/payment_method_domains"}),retrieve:uJ({method:"GET",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),update:uJ({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}"}),list:uJ({method:"GET",fullPath:"/v1/payment_method_domains",methodType:"list"}),validate:uJ({method:"POST",fullPath:"/v1/payment_method_domains/{payment_method_domain}/validate"})})});var D1=B((N1)=>{Object.defineProperty(N1,"__esModule",{value:!0});N1.PaymentMethods=void 0;var T1=U(),NJ=T1.StripeResource.method;N1.PaymentMethods=T1.StripeResource.extend({create:NJ({method:"POST",fullPath:"/v1/payment_methods"}),retrieve:NJ({method:"GET",fullPath:"/v1/payment_methods/{payment_method}"}),update:NJ({method:"POST",fullPath:"/v1/payment_methods/{payment_method}"}),list:NJ({method:"GET",fullPath:"/v1/payment_methods",methodType:"list"}),attach:NJ({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/attach"}),detach:NJ({method:"POST",fullPath:"/v1/payment_methods/{payment_method}/detach"})})});var k1=B((E1)=>{Object.defineProperty(E1,"__esModule",{value:!0});E1.PaymentRecords=void 0;var q1=U(),p=q1.StripeResource.method;E1.PaymentRecords=q1.StripeResource.extend({retrieve:p({method:"GET",fullPath:"/v1/payment_records/{id}"}),reportPayment:p({method:"POST",fullPath:"/v1/payment_records/report_payment"}),reportPaymentAttempt:p({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt"}),reportPaymentAttemptCanceled:p({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_canceled"}),reportPaymentAttemptFailed:p({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_failed"}),reportPaymentAttemptGuaranteed:p({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_guaranteed"}),reportPaymentAttemptInformational:p({method:"POST",fullPath:"/v1/payment_records/{id}/report_payment_attempt_informational"}),reportRefund:p({method:"POST",fullPath:"/v1/payment_records/{id}/report_refund"})})});var b1=B((C1)=>{Object.defineProperty(C1,"__esModule",{value:!0});C1.Payouts=void 0;var F1=U(),HJ=F1.StripeResource.method;C1.Payouts=F1.StripeResource.extend({create:HJ({method:"POST",fullPath:"/v1/payouts"}),retrieve:HJ({method:"GET",fullPath:"/v1/payouts/{payout}"}),update:HJ({method:"POST",fullPath:"/v1/payouts/{payout}"}),list:HJ({method:"GET",fullPath:"/v1/payouts",methodType:"list"}),cancel:HJ({method:"POST",fullPath:"/v1/payouts/{payout}/cancel"}),reverse:HJ({method:"POST",fullPath:"/v1/payouts/{payout}/reverse"})})});var I1=B((x1)=>{Object.defineProperty(x1,"__esModule",{value:!0});x1.Plans=void 0;var v1=U(),cJ=v1.StripeResource.method;x1.Plans=v1.StripeResource.extend({create:cJ({method:"POST",fullPath:"/v1/plans",requestSchema:{kind:"object",fields:{amount_decimal:{kind:"decimal_string"},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}}}},responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),retrieve:cJ({method:"GET",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),update:cJ({method:"POST",fullPath:"/v1/plans/{plan}",responseSchema:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),list:cJ({method:"GET",fullPath:"/v1/plans",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),del:cJ({method:"DELETE",fullPath:"/v1/plans/{plan}"})})});var R1=B((y1)=>{Object.defineProperty(y1,"__esModule",{value:!0});y1.Prices=void 0;var f1=U(),dJ=f1.StripeResource.method;y1.Prices=f1.StripeResource.extend({create:dJ({method:"POST",fullPath:"/v1/prices",requestSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}},responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),retrieve:dJ({method:"GET",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),update:dJ({method:"POST",fullPath:"/v1/prices/{price}",responseSchema:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}),list:dJ({method:"GET",fullPath:"/v1/prices",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}),search:dJ({method:"GET",fullPath:"/v1/prices/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}})})});var _1=B((M1)=>{Object.defineProperty(M1,"__esModule",{value:!0});M1.Products=void 0;var S1=U(),m=S1.StripeResource.method;M1.Products=S1.StripeResource.extend({create:m({method:"POST",fullPath:"/v1/products",requestSchema:{kind:"object",fields:{default_price_data:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"decimal_string"},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}},unit_amount_decimal:{kind:"decimal_string"}}}}}}),retrieve:m({method:"GET",fullPath:"/v1/products/{id}"}),update:m({method:"POST",fullPath:"/v1/products/{id}"}),list:m({method:"GET",fullPath:"/v1/products",methodType:"list"}),del:m({method:"DELETE",fullPath:"/v1/products/{id}"}),createFeature:m({method:"POST",fullPath:"/v1/products/{product}/features"}),deleteFeature:m({method:"DELETE",fullPath:"/v1/products/{product}/features/{id}"}),listFeatures:m({method:"GET",fullPath:"/v1/products/{product}/features",methodType:"list"}),retrieveFeature:m({method:"GET",fullPath:"/v1/products/{product}/features/{id}"}),search:m({method:"GET",fullPath:"/v1/products/search",methodType:"search"})})});var u1=B((h1)=>{Object.defineProperty(h1,"__esModule",{value:!0});h1.PromotionCodes=void 0;var m1=U(),x0=m1.StripeResource.method;h1.PromotionCodes=m1.StripeResource.extend({create:x0({method:"POST",fullPath:"/v1/promotion_codes"}),retrieve:x0({method:"GET",fullPath:"/v1/promotion_codes/{promotion_code}"}),update:x0({method:"POST",fullPath:"/v1/promotion_codes/{promotion_code}"}),list:x0({method:"GET",fullPath:"/v1/promotion_codes",methodType:"list"})})});var a1=B((d1)=>{Object.defineProperty(d1,"__esModule",{value:!0});d1.Quotes=void 0;var c1=U(),h=c1.StripeResource.method;d1.Quotes=c1.StripeResource.extend({create:h({method:"POST",fullPath:"/v1/quotes",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),retrieve:h({method:"GET",fullPath:"/v1/quotes/{quote}",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),update:h({method:"POST",fullPath:"/v1/quotes/{quote}",requestSchema:{kind:"object",fields:{line_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),list:h({method:"GET",fullPath:"/v1/quotes",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}}}}),accept:h({method:"POST",fullPath:"/v1/quotes/{quote}/accept",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),cancel:h({method:"POST",fullPath:"/v1/quotes/{quote}/cancel",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),finalizeQuote:h({method:"POST",fullPath:"/v1/quotes/{quote}/finalize",responseSchema:{kind:"object",fields:{computed:{kind:"object",fields:{upfront:{kind:"object",fields:{line_items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}}}),listComputedUpfrontLineItems:h({method:"GET",fullPath:"/v1/quotes/{quote}/computed_upfront_line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),listLineItems:h({method:"GET",fullPath:"/v1/quotes/{quote}/line_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{price:{kind:"nullable",inner:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}),pdf:h({method:"GET",fullPath:"/v1/quotes/{quote}/pdf",host:"files.stripe.com",streaming:!0})})});var s1=B((p1)=>{Object.defineProperty(p1,"__esModule",{value:!0});p1.Refunds=void 0;var i1=U(),nJ=i1.StripeResource.method;p1.Refunds=i1.StripeResource.extend({create:nJ({method:"POST",fullPath:"/v1/refunds"}),retrieve:nJ({method:"GET",fullPath:"/v1/refunds/{refund}"}),update:nJ({method:"POST",fullPath:"/v1/refunds/{refund}"}),list:nJ({method:"GET",fullPath:"/v1/refunds",methodType:"list"}),cancel:nJ({method:"POST",fullPath:"/v1/refunds/{refund}/cancel"})})});var JB=B((t1)=>{Object.defineProperty(t1,"__esModule",{value:!0});t1.Reviews=void 0;var r1=U(),OZ=r1.StripeResource.method;t1.Reviews=r1.StripeResource.extend({retrieve:OZ({method:"GET",fullPath:"/v1/reviews/{review}"}),list:OZ({method:"GET",fullPath:"/v1/reviews",methodType:"list"}),approve:OZ({method:"POST",fullPath:"/v1/reviews/{review}/approve"})})});var GB=B(($B)=>{Object.defineProperty($B,"__esModule",{value:!0});$B.SetupAttempts=void 0;var ZB=U(),D3=ZB.StripeResource.method;$B.SetupAttempts=ZB.StripeResource.extend({list:D3({method:"GET",fullPath:"/v1/setup_attempts",methodType:"list"})})});var YB=B((BB)=>{Object.defineProperty(BB,"__esModule",{value:!0});BB.SetupIntents=void 0;var zB=U(),$J=zB.StripeResource.method;BB.SetupIntents=zB.StripeResource.extend({create:$J({method:"POST",fullPath:"/v1/setup_intents"}),retrieve:$J({method:"GET",fullPath:"/v1/setup_intents/{intent}"}),update:$J({method:"POST",fullPath:"/v1/setup_intents/{intent}"}),list:$J({method:"GET",fullPath:"/v1/setup_intents",methodType:"list"}),cancel:$J({method:"POST",fullPath:"/v1/setup_intents/{intent}/cancel"}),confirm:$J({method:"POST",fullPath:"/v1/setup_intents/{intent}/confirm"}),verifyMicrodeposits:$J({method:"POST",fullPath:"/v1/setup_intents/{intent}/verify_microdeposits"})})});var VB=B((UB)=>{Object.defineProperty(UB,"__esModule",{value:!0});UB.ShippingRates=void 0;var wB=U(),P0=wB.StripeResource.method;UB.ShippingRates=wB.StripeResource.extend({create:P0({method:"POST",fullPath:"/v1/shipping_rates"}),retrieve:P0({method:"GET",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),update:P0({method:"POST",fullPath:"/v1/shipping_rates/{shipping_rate_token}"}),list:P0({method:"GET",fullPath:"/v1/shipping_rates",methodType:"list"})})});var NB=B((KB)=>{Object.defineProperty(KB,"__esModule",{value:!0});KB.Sources=void 0;var WB=U(),aJ=WB.StripeResource.method;KB.Sources=WB.StripeResource.extend({create:aJ({method:"POST",fullPath:"/v1/sources"}),retrieve:aJ({method:"GET",fullPath:"/v1/sources/{source}"}),update:aJ({method:"POST",fullPath:"/v1/sources/{source}"}),listSourceTransactions:aJ({method:"GET",fullPath:"/v1/sources/{source}/source_transactions",methodType:"list"}),verify:aJ({method:"POST",fullPath:"/v1/sources/{source}/verify"})})});var EB=B((DB)=>{Object.defineProperty(DB,"__esModule",{value:!0});DB.SubscriptionItems=void 0;var HB=U(),iJ=HB.StripeResource.method;DB.SubscriptionItems=HB.StripeResource.extend({create:iJ({method:"POST",fullPath:"/v1/subscription_items",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),retrieve:iJ({method:"GET",fullPath:"/v1/subscription_items/{item}",responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),update:iJ({method:"POST",fullPath:"/v1/subscription_items/{item}",requestSchema:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}},responseSchema:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}),list:iJ({method:"GET",fullPath:"/v1/subscription_items",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}),del:iJ({method:"DELETE",fullPath:"/v1/subscription_items/{item}"})})});var CB=B((kB)=>{Object.defineProperty(kB,"__esModule",{value:!0});kB.SubscriptionSchedules=void 0;var OB=U(),DJ=OB.StripeResource.method;kB.SubscriptionSchedules=OB.StripeResource.extend({create:DJ({method:"POST",fullPath:"/v1/subscription_schedules",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:DJ({method:"GET",fullPath:"/v1/subscription_schedules/{schedule}"}),update:DJ({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}",requestSchema:{kind:"object",fields:{phases:{kind:"array",element:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}}}}}}),list:DJ({method:"GET",fullPath:"/v1/subscription_schedules",methodType:"list"}),cancel:DJ({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/cancel"}),release:DJ({method:"POST",fullPath:"/v1/subscription_schedules/{schedule}/release"})})});var xB=B((bB)=>{Object.defineProperty(bB,"__esModule",{value:!0});bB.Subscriptions=void 0;var AB=U(),u=AB.StripeResource.method;bB.Subscriptions=AB.StripeResource.extend({create:u({method:"POST",fullPath:"/v1/subscriptions",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),retrieve:u({method:"GET",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),update:u({method:"POST",fullPath:"/v1/subscriptions/{subscription_exposed_id}",requestSchema:{kind:"object",fields:{add_invoice_items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}},items:{kind:"array",element:{kind:"object",fields:{price_data:{kind:"object",fields:{unit_amount_decimal:{kind:"decimal_string"}}}}}}}},responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),list:u({method:"GET",fullPath:"/v1/subscriptions",methodType:"list",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}}),cancel:u({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),deleteDiscount:u({method:"DELETE",fullPath:"/v1/subscriptions/{subscription_exposed_id}/discount"}),migrate:u({method:"POST",fullPath:"/v1/subscriptions/{subscription}/migrate",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),resume:u({method:"POST",fullPath:"/v1/subscriptions/{subscription}/resume",responseSchema:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}),search:u({method:"GET",fullPath:"/v1/subscriptions/search",methodType:"search",responseSchema:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{items:{kind:"object",fields:{data:{kind:"array",element:{kind:"object",fields:{plan:{kind:"object",fields:{amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}},price:{kind:"object",fields:{currency_options:{kind:"array",element:{kind:"object",fields:{tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},tiers:{kind:"array",element:{kind:"object",fields:{flat_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}},unit_amount_decimal:{kind:"nullable",inner:{kind:"decimal_string"}}}}}}}}}}}}}}})})});var gB=B((fB)=>{Object.defineProperty(fB,"__esModule",{value:!0});fB.TaxCodes=void 0;var IB=U(),PB=IB.StripeResource.method;fB.TaxCodes=IB.StripeResource.extend({retrieve:PB({method:"GET",fullPath:"/v1/tax_codes/{id}"}),list:PB({method:"GET",fullPath:"/v1/tax_codes",methodType:"list"})})});var jB=B((SB)=>{Object.defineProperty(SB,"__esModule",{value:!0});SB.TaxIds=void 0;var RB=U(),I0=RB.StripeResource.method;SB.TaxIds=RB.StripeResource.extend({create:I0({method:"POST",fullPath:"/v1/tax_ids"}),retrieve:I0({method:"GET",fullPath:"/v1/tax_ids/{id}"}),list:I0({method:"GET",fullPath:"/v1/tax_ids",methodType:"list"}),del:I0({method:"DELETE",fullPath:"/v1/tax_ids/{id}"})})});var lB=B((mB)=>{Object.defineProperty(mB,"__esModule",{value:!0});mB.TaxRates=void 0;var _B=U(),f0=_B.StripeResource.method;mB.TaxRates=_B.StripeResource.extend({create:f0({method:"POST",fullPath:"/v1/tax_rates"}),retrieve:f0({method:"GET",fullPath:"/v1/tax_rates/{tax_rate}"}),update:f0({method:"POST",fullPath:"/v1/tax_rates/{tax_rate}"}),list:f0({method:"GET",fullPath:"/v1/tax_rates",methodType:"list"})})});var aB=B((dB)=>{Object.defineProperty(dB,"__esModule",{value:!0});dB.Tokens=void 0;var cB=U(),uB=cB.StripeResource.method;dB.Tokens=cB.StripeResource.extend({create:uB({method:"POST",fullPath:"/v1/tokens"}),retrieve:uB({method:"GET",fullPath:"/v1/tokens/{token}"})})});var sB=B((pB)=>{Object.defineProperty(pB,"__esModule",{value:!0});pB.Topups=void 0;var iB=U(),pJ=iB.StripeResource.method;pB.Topups=iB.StripeResource.extend({create:pJ({method:"POST",fullPath:"/v1/topups"}),retrieve:pJ({method:"GET",fullPath:"/v1/topups/{topup}"}),update:pJ({method:"POST",fullPath:"/v1/topups/{topup}"}),list:pJ({method:"GET",fullPath:"/v1/topups",methodType:"list"}),cancel:pJ({method:"POST",fullPath:"/v1/topups/{topup}/cancel"})})});var JX=B((tB)=>{Object.defineProperty(tB,"__esModule",{value:!0});tB.Transfers=void 0;var rB=U(),o=rB.StripeResource.method;tB.Transfers=rB.StripeResource.extend({create:o({method:"POST",fullPath:"/v1/transfers"}),retrieve:o({method:"GET",fullPath:"/v1/transfers/{transfer}"}),update:o({method:"POST",fullPath:"/v1/transfers/{transfer}"}),list:o({method:"GET",fullPath:"/v1/transfers",methodType:"list"}),createReversal:o({method:"POST",fullPath:"/v1/transfers/{id}/reversals"}),listReversals:o({method:"GET",fullPath:"/v1/transfers/{id}/reversals",methodType:"list"}),retrieveReversal:o({method:"GET",fullPath:"/v1/transfers/{transfer}/reversals/{id}"}),updateReversal:o({method:"POST",fullPath:"/v1/transfers/{transfer}/reversals/{id}"})})});var GX=B(($X)=>{Object.defineProperty($X,"__esModule",{value:!0});$X.WebhookEndpoints=void 0;var ZX=U(),oJ=ZX.StripeResource.method;$X.WebhookEndpoints=ZX.StripeResource.extend({create:oJ({method:"POST",fullPath:"/v1/webhook_endpoints"}),retrieve:oJ({method:"GET",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),update:oJ({method:"POST",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"}),list:oJ({method:"GET",fullPath:"/v1/webhook_endpoints",methodType:"list"}),del:oJ({method:"DELETE",fullPath:"/v1/webhook_endpoints/{webhook_endpoint}"})})});var BX=B((E)=>{Object.defineProperty(E,"__esModule",{value:!0});E.Subscriptions=E.SubscriptionSchedules=E.SubscriptionItems=E.Sources=E.ShippingRates=E.SetupIntents=E.SetupAttempts=E.Reviews=E.Refunds=E.Quotes=E.PromotionCodes=E.Products=E.Prices=E.Plans=E.Payouts=E.PaymentRecords=E.PaymentMethods=E.PaymentMethodDomains=E.PaymentMethodConfigurations=E.PaymentLinks=E.PaymentIntents=E.PaymentAttemptRecords=E.OAuth=E.Mandates=E.Invoices=E.InvoiceRenderingTemplates=E.InvoicePayments=E.InvoiceItems=E.Files=E.FileLinks=E.ExchangeRates=E.Events=E.EphemeralKeys=E.Disputes=E.Customers=E.CustomerSessions=E.CreditNotes=E.Coupons=E.CountrySpecs=E.ConfirmationTokens=E.Charges=E.BalanceTransactions=E.BalanceSettings=E.Balance=E.ApplicationFees=E.ApplePayDomains=E.Accounts=E.AccountSessions=E.AccountLinks=E.Account=void 0;E.V2=E.Treasury=E.TestHelpers=E.Terminal=E.Tax=E.Sigma=E.Reporting=E.Radar=E.Issuing=E.Identity=E.Forwarding=E.FinancialConnections=E.Entitlements=E.Climate=E.Checkout=E.BillingPortal=E.Billing=E.Apps=E.WebhookEndpoints=E.Transfers=E.Topups=E.Tokens=E.TaxRates=E.TaxIds=E.TaxCodes=void 0;var C=T$(),q3=q$(),E3=C$(),O3=x$(),k3=h$(),F3=n$(),C3=o$(),A3=e$(),b3=Q8(),v3=X8(),x3=L8(),P3=T8(),I3=q8(),f3=F8(),y3=v8(),g3=f8(),R3=S8(),S3=m8(),M3=c8(),j3=p8(),_3=t8(),m3=$Q(),h3=BQ(),l3=UQ(),u3=KQ(),c3=qQ(),d3=FQ(),n3=vQ(),a3=fQ(),i3=SQ(),p3=mQ(),o3=cQ(),s3=iQ(),r3=rQ(),t3=Z7(),e3=z7(),JU=w7(),ZU=W7(),$U=H7(),QU=O7(),GU=A7(),zU=P7(),BU=g7(),XU=j7(),YU=l7(),wU=n7(),UU=o7(),LU=e7(),VU=Q4(),WU=Y4(),KU=W4(),TU=H4(),NU=O4(),HU=A4(),DU=I4(),qU=R4(),EU=m4(),OU=c4(),kU=i4(),FU=r4(),CU=$5(),AU=B5(),bU=L5(),vU=T5(),xU=q5(),PU=F5(),IU=x5(),fU=g5(),yU=_5(),gU=u5(),RU=a5(),SU=r5(),MU=$G(),jU=BG(),_U=UG(),mU=KG(),hU=qG(),lU=FG(),uU=vG(),cU=yG(),dU=MG(),nU=DZ();Object.defineProperty(E,"Account",{enumerable:!0,get:function(){return nU.Accounts}});var aU=cG();Object.defineProperty(E,"AccountLinks",{enumerable:!0,get:function(){return aU.AccountLinks}});var iU=iG();Object.defineProperty(E,"AccountSessions",{enumerable:!0,get:function(){return iU.AccountSessions}});var pU=DZ();Object.defineProperty(E,"Accounts",{enumerable:!0,get:function(){return pU.Accounts}});var oU=rG();Object.defineProperty(E,"ApplePayDomains",{enumerable:!0,get:function(){return oU.ApplePayDomains}});var sU=Z6();Object.defineProperty(E,"ApplicationFees",{enumerable:!0,get:function(){return sU.ApplicationFees}});var rU=z6();Object.defineProperty(E,"Balance",{enumerable:!0,get:function(){return rU.Balance}});var tU=U6();Object.defineProperty(E,"BalanceSettings",{enumerable:!0,get:function(){return tU.BalanceSettings}});var eU=T6();Object.defineProperty(E,"BalanceTransactions",{enumerable:!0,get:function(){return eU.BalanceTransactions}});var JL=q6();Object.defineProperty(E,"Charges",{enumerable:!0,get:function(){return JL.Charges}});var ZL=F6();Object.defineProperty(E,"ConfirmationTokens",{enumerable:!0,get:function(){return ZL.ConfirmationTokens}});var $L=x6();Object.defineProperty(E,"CountrySpecs",{enumerable:!0,get:function(){return $L.CountrySpecs}});var QL=y6();Object.defineProperty(E,"Coupons",{enumerable:!0,get:function(){return QL.Coupons}});var GL=M6();Object.defineProperty(E,"CreditNotes",{enumerable:!0,get:function(){return GL.CreditNotes}});var zL=h6();Object.defineProperty(E,"CustomerSessions",{enumerable:!0,get:function(){return zL.CustomerSessions}});var BL=d6();Object.defineProperty(E,"Customers",{enumerable:!0,get:function(){return BL.Customers}});var XL=p6();Object.defineProperty(E,"Disputes",{enumerable:!0,get:function(){return XL.Disputes}});var YL=e6();Object.defineProperty(E,"EphemeralKeys",{enumerable:!0,get:function(){return YL.EphemeralKeys}});var wL=Gz();Object.defineProperty(E,"Events",{enumerable:!0,get:function(){return wL.Events}});var UL=wz();Object.defineProperty(E,"ExchangeRates",{enumerable:!0,get:function(){return UL.ExchangeRates}});var LL=Wz();Object.defineProperty(E,"FileLinks",{enumerable:!0,get:function(){return LL.FileLinks}});var VL=Oz();Object.defineProperty(E,"Files",{enumerable:!0,get:function(){return VL.Files}});var WL=Az();Object.defineProperty(E,"InvoiceItems",{enumerable:!0,get:function(){return WL.InvoiceItems}});var KL=Iz();Object.defineProperty(E,"InvoicePayments",{enumerable:!0,get:function(){return KL.InvoicePayments}});var TL=Rz();Object.defineProperty(E,"InvoiceRenderingTemplates",{enumerable:!0,get:function(){return TL.InvoiceRenderingTemplates}});var NL=_z();Object.defineProperty(E,"Invoices",{enumerable:!0,get:function(){return NL.Invoices}});var HL=uz();Object.defineProperty(E,"Mandates",{enumerable:!0,get:function(){return HL.Mandates}});var DL=iz();Object.defineProperty(E,"OAuth",{enumerable:!0,get:function(){return DL.OAuth}});var qL=tz();Object.defineProperty(E,"PaymentAttemptRecords",{enumerable:!0,get:function(){return qL.PaymentAttemptRecords}});var EL=$1();Object.defineProperty(E,"PaymentIntents",{enumerable:!0,get:function(){return EL.PaymentIntents}});var OL=B1();Object.defineProperty(E,"PaymentLinks",{enumerable:!0,get:function(){return OL.PaymentLinks}});var kL=U1();Object.defineProperty(E,"PaymentMethodConfigurations",{enumerable:!0,get:function(){return kL.PaymentMethodConfigurations}});var FL=K1();Object.defineProperty(E,"PaymentMethodDomains",{enumerable:!0,get:function(){return FL.PaymentMethodDomains}});var CL=D1();Object.defineProperty(E,"PaymentMethods",{enumerable:!0,get:function(){return CL.PaymentMethods}});var AL=k1();Object.defineProperty(E,"PaymentRecords",{enumerable:!0,get:function(){return AL.PaymentRecords}});var bL=b1();Object.defineProperty(E,"Payouts",{enumerable:!0,get:function(){return bL.Payouts}});var vL=I1();Object.defineProperty(E,"Plans",{enumerable:!0,get:function(){return vL.Plans}});var xL=R1();Object.defineProperty(E,"Prices",{enumerable:!0,get:function(){return xL.Prices}});var PL=_1();Object.defineProperty(E,"Products",{enumerable:!0,get:function(){return PL.Products}});var IL=u1();Object.defineProperty(E,"PromotionCodes",{enumerable:!0,get:function(){return IL.PromotionCodes}});var fL=a1();Object.defineProperty(E,"Quotes",{enumerable:!0,get:function(){return fL.Quotes}});var yL=s1();Object.defineProperty(E,"Refunds",{enumerable:!0,get:function(){return yL.Refunds}});var gL=JB();Object.defineProperty(E,"Reviews",{enumerable:!0,get:function(){return gL.Reviews}});var RL=GB();Object.defineProperty(E,"SetupAttempts",{enumerable:!0,get:function(){return RL.SetupAttempts}});var SL=YB();Object.defineProperty(E,"SetupIntents",{enumerable:!0,get:function(){return SL.SetupIntents}});var ML=VB();Object.defineProperty(E,"ShippingRates",{enumerable:!0,get:function(){return ML.ShippingRates}});var jL=NB();Object.defineProperty(E,"Sources",{enumerable:!0,get:function(){return jL.Sources}});var _L=EB();Object.defineProperty(E,"SubscriptionItems",{enumerable:!0,get:function(){return _L.SubscriptionItems}});var mL=CB();Object.defineProperty(E,"SubscriptionSchedules",{enumerable:!0,get:function(){return mL.SubscriptionSchedules}});var hL=xB();Object.defineProperty(E,"Subscriptions",{enumerable:!0,get:function(){return hL.Subscriptions}});var lL=gB();Object.defineProperty(E,"TaxCodes",{enumerable:!0,get:function(){return lL.TaxCodes}});var uL=jB();Object.defineProperty(E,"TaxIds",{enumerable:!0,get:function(){return uL.TaxIds}});var cL=lB();Object.defineProperty(E,"TaxRates",{enumerable:!0,get:function(){return cL.TaxRates}});var dL=aB();Object.defineProperty(E,"Tokens",{enumerable:!0,get:function(){return dL.Tokens}});var nL=sB();Object.defineProperty(E,"Topups",{enumerable:!0,get:function(){return nL.Topups}});var aL=JX();Object.defineProperty(E,"Transfers",{enumerable:!0,get:function(){return aL.Transfers}});var iL=GX();Object.defineProperty(E,"WebhookEndpoints",{enumerable:!0,get:function(){return iL.WebhookEndpoints}});E.Apps=(0,C.resourceNamespace)("apps",{Secrets:vU.Secrets});E.Billing=(0,C.resourceNamespace)("billing",{Alerts:C3.Alerts,CreditBalanceSummary:M3.CreditBalanceSummary,CreditBalanceTransactions:j3.CreditBalanceTransactions,CreditGrants:_3.CreditGrants,MeterEventAdjustments:r3.MeterEventAdjustments,MeterEvents:ZU.MeterEvents,Meters:QU.Meters});E.BillingPortal=(0,C.resourceNamespace)("billingPortal",{Configurations:y3.Configurations,Sessions:xU.Sessions});E.Checkout=(0,C.resourceNamespace)("checkout",{Sessions:PU.Sessions});E.Climate=(0,C.resourceNamespace)("climate",{Orders:zU.Orders,Products:KU.Products,Suppliers:yU.Suppliers});E.Entitlements=(0,C.resourceNamespace)("entitlements",{ActiveEntitlements:F3.ActiveEntitlements,Features:a3.Features});E.FinancialConnections=(0,C.resourceNamespace)("financialConnections",{Accounts:O3.Accounts,Sessions:IU.Sessions,Transactions:MU.Transactions});E.Forwarding=(0,C.resourceNamespace)("forwarding",{Requests:AU.Requests});E.Identity=(0,C.resourceNamespace)("identity",{VerificationReports:cU.VerificationReports,VerificationSessions:dU.VerificationSessions});E.Issuing=(0,C.resourceNamespace)("issuing",{Authorizations:b3.Authorizations,Cardholders:P3.Cardholders,Cards:I3.Cards,Disputes:u3.Disputes,PersonalizationDesigns:LU.PersonalizationDesigns,PhysicalBundles:WU.PhysicalBundles,Tokens:RU.Tokens,Transactions:jU.Transactions});E.Radar=(0,C.resourceNamespace)("radar",{EarlyFraudWarnings:c3.EarlyFraudWarnings,PaymentEvaluations:UU.PaymentEvaluations,ValueListItems:lU.ValueListItems,ValueLists:uU.ValueLists});E.Reporting=(0,C.resourceNamespace)("reporting",{ReportRuns:FU.ReportRuns,ReportTypes:CU.ReportTypes});E.Sigma=(0,C.resourceNamespace)("sigma",{ScheduledQueryRuns:bU.ScheduledQueryRuns});E.Tax=(0,C.resourceNamespace)("tax",{Associations:A3.Associations,Calculations:x3.Calculations,Registrations:kU.Registrations,Settings:fU.Settings,Transactions:_U.Transactions});E.Terminal=(0,C.resourceNamespace)("terminal",{Configurations:g3.Configurations,ConnectionTokens:S3.ConnectionTokens,Locations:s3.Locations,OnboardingLinks:GU.OnboardingLinks,Readers:TU.Readers});E.TestHelpers=(0,C.resourceNamespace)("testHelpers",{ConfirmationTokens:R3.ConfirmationTokens,Customers:h3.Customers,Refunds:OU.Refunds,TestClocks:gU.TestClocks,Issuing:(0,C.resourceNamespace)("issuing",{Authorizations:v3.Authorizations,Cards:f3.Cards,PersonalizationDesigns:VU.PersonalizationDesigns,Transactions:mU.Transactions}),Terminal:(0,C.resourceNamespace)("terminal",{Readers:NU.Readers}),Treasury:(0,C.resourceNamespace)("treasury",{InboundTransfers:p3.InboundTransfers,OutboundPayments:BU.OutboundPayments,OutboundTransfers:YU.OutboundTransfers,ReceivedCredits:HU.ReceivedCredits,ReceivedDebits:qU.ReceivedDebits})});E.Treasury=(0,C.resourceNamespace)("treasury",{CreditReversals:m3.CreditReversals,DebitReversals:l3.DebitReversals,FinancialAccounts:i3.FinancialAccounts,InboundTransfers:o3.InboundTransfers,OutboundPayments:XU.OutboundPayments,OutboundTransfers:wU.OutboundTransfers,ReceivedCredits:DU.ReceivedCredits,ReceivedDebits:EU.ReceivedDebits,TransactionEntries:SU.TransactionEntries,Transactions:hU.Transactions});E.V2=(0,C.resourceNamespace)("v2",{Billing:(0,C.resourceNamespace)("billing",{MeterEventAdjustments:t3.MeterEventAdjustments,MeterEventSession:e3.MeterEventSession,MeterEventStream:JU.MeterEventStream,MeterEvents:$U.MeterEvents}),Core:(0,C.resourceNamespace)("core",{AccountLinks:q3.AccountLinks,AccountTokens:E3.AccountTokens,Accounts:k3.Accounts,EventDestinations:d3.EventDestinations,Events:n3.Events})})});var kX=B((EX)=>{Object.defineProperty(EX,"__esModule",{value:!0});EX.createStripe=void 0;var XX=CJ(),VV=m9(),DX=U(),YX=B$(),WV=w$(),qX=V$(),KV=OJ(),TV=X0(),wX=kJ(),y0=BX(),QJ=_(),UX="api.stripe.com",LX="443",VX="/v1/",WX=qX.ApiVersion,KX=80000,TX=5,NX=0.5,NV=["name","version","url","partner_id"],HX=["authenticator","apiVersion","typescript","maxNetworkRetries","httpAgent","httpClient","timeout","host","port","protocol","telemetry","appInfo","stripeAccount","stripeContext"],HV=(J)=>new VV.RequestSender(J,DX.StripeResource.MAX_BUFFERED_REQUEST_METRICS);function DV(J,Z=HV){Q.PACKAGE_VERSION="21.0.1",Q.API_VERSION=qX.ApiVersion;let $=typeof process<"u"&&process.env?(0,QJ.detectAIAgent)(process.env):"";Q.AI_AGENT=$,Q.USER_AGENT={bindings_version:Q.PACKAGE_VERSION,lang:"node",typescript:!1,...(0,QJ.determineProcessUserAgentProperties)(),...$?{ai_agent:$}:{}},Q.StripeResource=DX.StripeResource,Q.StripeContext=YX.StripeContext,Q.resources=y0,Q.HttpClient=wX.HttpClient,Q.HttpClientResponse=wX.HttpClientResponse,Q.CryptoProvider=KV.CryptoProvider,Q.webhooks=(0,WV.createWebhooks)(J),Q.Decimal=TV.Decimal;function Q(G,z={}){if(!(this instanceof Q))return new Q(G,z);let w=this._getPropsFromConfig(z);this._platformFunctions=J,Object.defineProperty(this,"_emitter",{value:this._platformFunctions.createEmitter(),enumerable:!1,configurable:!1,writable:!1}),this.VERSION=Q.PACKAGE_VERSION,this.on=this._emitter.on.bind(this._emitter),this.once=this._emitter.once.bind(this._emitter),this.off=this._emitter.removeListener.bind(this._emitter);let X=w.httpAgent||null;this._api={host:w.host||UX,port:w.port||LX,protocol:w.protocol||"https",basePath:VX,version:w.apiVersion||WX,timeout:(0,QJ.validateInteger)("timeout",w.timeout,KX),maxNetworkRetries:(0,QJ.validateInteger)("maxNetworkRetries",w.maxNetworkRetries,2),agent:X,httpClient:w.httpClient||(X?this._platformFunctions.createNodeHttpClient(X):this._platformFunctions.createDefaultHttpClient()),dev:!1,stripeAccount:w.stripeAccount||null,stripeContext:w.stripeContext||null};let K=w.typescript||!1;if(K!==Q.USER_AGENT.typescript)Q.USER_AGENT.typescript=K;if(w.appInfo)this._setAppInfo(w.appInfo);this._prepResources(),this._setAuthenticator(G,w.authenticator),this.errors=XX,this.webhooks=Q.webhooks,this._prevRequestMetrics=[],this._enableTelemetry=w.telemetry!==!1,this._requestSender=Z(this),this.StripeResource=Q.StripeResource,this.Decimal=Q.Decimal}return Q.errors=XX,Q.createNodeHttpClient=J.createNodeHttpClient,Q.createFetchHttpClient=J.createFetchHttpClient,Q.createNodeCryptoProvider=J.createNodeCryptoProvider,Q.createSubtleCryptoProvider=J.createSubtleCryptoProvider,Q.prototype={_appInfo:void 0,on:null,off:null,once:null,VERSION:null,StripeResource:null,webhooks:null,errors:null,_api:null,_prevRequestMetrics:null,_emitter:null,_enableTelemetry:null,_requestSender:null,_platformFunctions:null,rawRequest(G,z,w,X){return this._requestSender._rawRequest(G,z,w,X)},_setAuthenticator(G,z){if(G&&z)throw Error("Can't specify both apiKey and authenticator");if(!G&&!z)throw Error("Neither apiKey nor config.authenticator provided");this._authenticator=G?(0,QJ.createApiKeyAuthenticator)(G):z},_setAppInfo(G){if(G&&typeof G!=="object")throw Error("AppInfo must be an object.");if(G&&!G.name)throw Error("AppInfo.name is required");G=G||{},this._appInfo=NV.reduce((z,w)=>{if(typeof G[w]=="string")z=z||{},z[w]=G[w];return z},{})},_setApiField(G,z){this._api[G]=z},getApiField(G){return this._api[G]},setClientId(G){this._clientId=G},getClientId(){return this._clientId},getConstant:(G)=>{switch(G){case"DEFAULT_HOST":return UX;case"DEFAULT_PORT":return LX;case"DEFAULT_BASE_PATH":return VX;case"DEFAULT_API_VERSION":return WX;case"DEFAULT_TIMEOUT":return KX;case"MAX_NETWORK_RETRY_DELAY_SEC":return TX;case"INITIAL_NETWORK_RETRY_DELAY_SEC":return NX}return Q[G]},getMaxNetworkRetries(){return this.getApiField("maxNetworkRetries")},_setApiNumberField(G,z,w){let X=(0,QJ.validateInteger)(G,z,w);this._setApiField(G,X)},getMaxNetworkRetryDelay(){return TX},getInitialNetworkRetryDelay(){return NX},getClientUserAgent(G){return this.getClientUserAgentSeeded(Q.USER_AGENT,G)},getClientUserAgentSeeded(G,z){let w={};for(let T in G){if(!Object.prototype.hasOwnProperty.call(G,T))continue;w[T]=encodeURIComponent(G[T]??"null")}let X=this._platformFunctions.getPlatformInfo();if(X&&this.getTelemetryEnabled())w.platform=encodeURIComponent(X);else delete w.platform;let K=this.getApiField("httpClient");if(K)w.httplib=encodeURIComponent(K.getClientName());if(this._appInfo)w.application=this._appInfo;z(JSON.stringify(w))},getAppInfoAsString(){if(!this._appInfo)return"";let G=this._appInfo.name;if(this._appInfo.version)G+=`/${this._appInfo.version}`;if(this._appInfo.url)G+=` (${this._appInfo.url})`;return G},getTelemetryEnabled(){return this._enableTelemetry},_prepResources(){for(let G in y0){if(!Object.prototype.hasOwnProperty.call(y0,G))continue;this[(0,QJ.pascalToCamelCase)(G)]=new y0[G](this)}},_getPropsFromConfig(G){if(!G)return{};let z=typeof G==="string";if(!(G===Object(G)&&!Array.isArray(G))&&!z)throw Error("Config must either be an object or a string");if(z)return{apiVersion:G};if(Object.keys(G).filter((K)=>!HX.includes(K)).length>0)throw Error(`Config object may only contain the following: ${HX.join(", ")}`);return G},parseEventNotification(G,z,w,X,K,T){this.webhooks.signature.verifyHeader(G,z,w,X||this.webhooks.DEFAULT_TOLERANCE,K,T);let Y=G instanceof Uint8Array?JSON.parse(new TextDecoder("utf8").decode(G)):JSON.parse(G);if(Y&&Y.object==="event")throw Error("You passed a webhook payload to stripe.parseEventNotification, which expects an event notification. Use stripe.webhooks.constructEvent instead.");if(Y.context)Y.context=YX.StripeContext.parse(Y.context);return Y.fetchEvent=()=>{return this._requestSender._rawRequest("GET",`/v2/core/events/${Y.id}`,void 0,{stripeContext:Y.context,headers:{"Stripe-Request-Trigger":`event=${Y.id}`}},["fetch_event"])},Y.fetchRelatedObject=()=>{if(!Y.related_object)return Promise.resolve(null);return this._requestSender._rawRequest("GET",Y.related_object.url,void 0,{stripeContext:Y.context,headers:{"Stripe-Request-Trigger":`event=${Y.id}`}},["fetch_related_object"])},Y}},Q}EX.createStripe=DV});var FZ=B((FX,sJ)=>{Object.defineProperty(FX,"__esModule",{value:!0});var qV=S9(),EV=kX(),OV=X0(),kZ=(0,EV.createStripe)(new qV.NodePlatformFunctions);sJ.exports=kZ;sJ.exports.Stripe=kZ;sJ.exports.default=kZ;sJ.exports.Decimal=OV.Decimal});var AX=_Z(FZ(),1);import{services as CX}from"@stacksjs/config";var CZ=null,H=new Proxy({},{get(J,Z){if(!CZ){let $=CX?.stripe?.secretKey;if(!$)throw Error("Stripe secret key is not configured. Set STRIPE_SECRET_KEY in your .env file.");let Q=CX?.stripe?.apiVersion??"2026-01-28.preview";CZ=new AX.default($,{apiVersion:Q})}return CZ[Z]}});import{config as FV}from"@stacksjs/config";import{log as CV}from"@stacksjs/logging";import{createHash as bX}from"crypto";var AZ="stacks",bZ="v1",kV=255;function c(J,...Z){let $=Z.filter((z)=>z!==null&&z!==void 0&&z!=="").map((z)=>String(z)).join(":"),Q=$?`${AZ}:${J}:${$}:${bZ}`:`${AZ}:${J}:${bZ}`;if(Q.length<=kV)return Q;let G=bX("sha256").update($).digest("hex").slice(0,32);return`${AZ}:${J}:${G}:${bZ}`}function GJ(J,...Z){let $=bX("sha256").update(`${Date.now()}:${Math.random()}`).digest("hex").slice(0,16);return c(J,...Z,$)}function vX(){let J=FV||{};return(J.payment?.currency||J.billing?.currency||process.env.STRIPE_CURRENCY||"usd").toLowerCase()}var g0=(()=>{async function J(G,z,w){let X={currency:vX(),amount:z};if(G.hasStripeId())X.customer=G.stripe_id;let K={...X,...w};return await H.paymentIntents.create(K,{idempotencyKey:GJ("payment_intent.create",G.id,z)})}async function Z(G){try{return await H.paymentIntents.retrieve(G)}catch(z){return CV.error(z),null}}async function $(G,z={}){if(!G||typeof G!=="string")throw Error("[payments/refund] paymentIntentId is required");if(z.amount!=null){if(typeof z.amount!=="number"||!Number.isFinite(z.amount)||z.amount<=0)throw Error("[payments/refund] amount must be a positive finite number");try{let Y=await H.paymentIntents.retrieve(G),V=Y.amount_received??Y.amount;if(V&&z.amount>V)throw Error(`[payments/refund] amount ${z.amount} exceeds captured amount ${V}`)}catch(Y){if(Y instanceof Error&&Y.message.startsWith("[payments/refund]"))throw Y}}let{idempotencyKey:w,...X}=z,K={payment_intent:G,...X},T={idempotencyKey:w||`refund:${G}:${X.amount??"full"}`};return await H.refunds.create(K,T)}async function Q(G,z,w,X){let T={...{confirmation_method:"automatic",confirm:!0,payment_method:w,currency:vX(),amount:z},...X};return await J(G,z,T)}return{createPayment:J,charge:Q,findPayment:Z,refund:$}})();import{config as AV}from"@stacksjs/config";function xX(J,Z){if(!J)return;let $;try{$=new URL(J)}catch{throw Error(`[payments/checkout] ${Z} is not a valid URL: ${J}`)}let Q=AV?.app?.url;if(!Q)return;let G;try{G=new URL(Q.startsWith("http")?Q:`https://${Q}`).origin}catch{return}if($.origin!==G)throw Error(`[payments/checkout] ${Z} origin (${$.origin}) does not match app origin (${G})`)}var vZ=(()=>{async function J(Z,$){let Q=$.customer||Z.stripe_id;if(!Q)throw Error("User has no Stripe customer");xX($.success_url,"success_url"),xX($.cancel_url,"cancel_url");let z={...{customer:Q,mode:"payment",success_url:$.success_url,cancel_url:$.cancel_url},...$};return await H.checkout.sessions.create(z,{idempotencyKey:GJ("checkout.session.create",Z.id)})}return{create:J}})();var d=(()=>{function J(L){return L.stripe_id||""}function Z(L){return{line1:L.address?.line1,city:L.address?.city,state:L.address?.state,postal_code:L.address?.postal_code,country:L.address?.country}}function $(){return[]}function Q(L){return L}function G(L){return Boolean(L.stripe_id)}async function z(L,N={}){if(G(L))throw Error("Customer already created");if(!N.name&&W(L))N.name=W(L);if(!N.email&&D(L))N.email=D(L);let q=await H.customers.create(N,{idempotencyKey:c("customer.create",L.id)});return await L.update({stripe_id:q.id}),q}async function w(L,N={}){if(!L.stripe_id)throw Error("User does not have a Stripe customer ID. Create a customer first.");return await H.customers.update(L.stripe_id,N,{idempotencyKey:c("customer.update",L.id,L.stripe_id)})}async function X(L){if(!G(L))throw Error("User does not have a Stripe ID");try{if(!L.stripe_id)throw Error("User has no Stripe ID");let N=await H.customers.del(L.stripe_id);return await L.update({stripe_id:""}),N}catch(N){if(N.statusCode===404)throw Error("Customer not found in Stripe");throw N}}async function K(L,N={}){if(!G(L))return await z(L,N);try{let q=await H.customers.retrieve(L.stripe_id);if(q.deleted)throw Error("Customer was deleted");return q}catch(q){if(q.statusCode===404)return await z(L,N);throw q}}async function T(L){if(!G(L))return;try{let N=await H.customers.retrieve(L.stripe_id);if(N.deleted)throw Error("Customer was deleted in Stripe");return N}catch(N){if(N.statusCode===404)throw Error("Customer not found in Stripe");throw N}}async function Y(L,N){if(!G(L))return await z(L,N);try{if((await H.customers.retrieve(L.stripe_id)).deleted)return await z(L,N);return await w(L,N)}catch(q){if(q.statusCode===404)return await z(L,N);throw q}}async function V(L,N){return await w(L,{name:W(L),email:D(L),address:Z(N),preferred_locales:$(),metadata:N.metadata?Q(N.metadata):{}})}function W(L){return L.name||""}function D(L){return L.email||""}return{stripeId:J,hasStripeId:G,createStripeCustomer:z,updateStripeCustomer:w,createOrGetStripeUser:K,createOrUpdateStripeUser:Y,deleteStripeUser:X,retrieveStripeUser:T,syncStripeCustomerDetails:V}})();var xZ=(()=>{async function J(Z){if(!Z.hasStripeId())throw Error("Customer does not exist in Stripe");if(!Z.stripe_id)throw Error("User has no Stripe ID");return await H.invoices.list({customer:Z.stripe_id,expand:["data.payment_intent.payment_method"]})}return{list:J}})();import{db as s}from"@stacksjs/database";import{PaymentMethod as PZ}from"@stacksjs/orm";var rJ=(()=>{async function J(Y,V){if(!Y.hasStripeId())throw Error("Customer does not exist in Stripe");let W;if(typeof V==="string")W=await H.paymentMethods.retrieve(V);else W=V;if(W.customer!==Y.stripe_id)W=await H.paymentMethods.attach(W.id,{customer:Y.stripe_id});return await Q(Y,W),W}async function Z(Y,V){if(!Y.hasStripeId())throw Error("Customer does not exist in Stripe");let W=await H.paymentMethods.retrieve(V),D=await s.selectFrom("payment_methods").where("provider_id","=",V).selectAll().executeTakeFirst();if(!Y.stripe_id)throw Error("User has no Stripe ID");if(W.customer!==Y.stripe_id)await H.paymentMethods.attach(W.id,{customer:Y.stripe_id});let L=await H.customers.update(Y.stripe_id,{invoice_settings:{default_payment_method:V}});if(await s.updateTable("payment_methods").set({is_default:!1}).where("user_id","=",Y.id).executeTakeFirst(),D)await G(D);return L}async function $(Y,V){if(!Y.hasStripeId())throw Error("Customer does not exist in Stripe");let W=await s.selectFrom("payment_methods").where("id","=",V).selectAll().executeTakeFirst();if(!W?.provider_id)throw Error(`Payment method with id ${V} not found`);let D=await H.paymentMethods.retrieve(String(W.provider_id));if(D.customer!==Y.stripe_id)await H.paymentMethods.attach(D.id,{customer:Y.stripe_id});if(!Y.stripe_id)throw Error("User has no Stripe ID");let L=await H.customers.update(Y.stripe_id,{invoice_settings:{default_payment_method:String(W.provider_id)}});return await s.updateTable("payment_methods").set({is_default:!1}).where("user_id","=",Y.id).executeTakeFirst(),await s.updateTable("payment_methods").set({is_default:!0}).where("id","=",V).executeTakeFirst(),L}async function Q(Y,V){if(!Y.hasStripeId())throw Error("Customer does not exist in Stripe");if(!V.card?.brand||!V.card?.exp_year||!V.card?.exp_month)throw Error("Invalid payment method: missing required card details");let W={type:"card",last_four:String(V.card.last4),brand:V.card.brand,exp_year:V.card.exp_year,exp_month:V.card.exp_month,user_id:Y.id,provider_id:V.id};if(V.customer!==Y.stripe_id)await H.paymentMethods.attach(V.id,{customer:Y.stripe_id});return await PZ.create(W)}async function G(Y){return await Y.update({is_default:!0})}async function z(Y,V){if(!Y.hasStripeId())throw Error("Customer does not exist in Stripe");let W=typeof V==="string"?await s.selectFrom("payment_methods").where("provider_id","=",V).selectAll().executeTakeFirst():await PZ.find(V);if(!W?.provider_id)throw Error(`Payment method with id ${V} not found`);if((await H.paymentMethods.retrieve(String(W.provider_id))).customer!==Y.stripe_id)throw Error("Payment method does not belong to this customer");return await W.delete(),await H.paymentMethods.detach(String(W.provider_id))}async function w(Y,V,W){if(!Y.hasStripeId())throw Error("Customer does not exist in Stripe");if((await H.paymentMethods.retrieve(V)).customer!==Y.stripe_id)throw Error("Payment method does not belong to this customer");return await H.paymentMethods.update(V,W)}async function X(Y){if(!Y.hasStripeId())throw Error("Customer does not exist in Stripe");return await s.selectFrom("payment_methods").selectAll().where("user_id","=",Y.id).execute()}async function K(Y,V){if(!Y.hasStripeId())throw Error("Customer does not exist in Stripe");return await s.selectFrom("payment_methods").where("id","=",V).selectAll().executeTakeFirst()}async function T(Y){if(!Y.hasStripeId())throw Error("Customer does not exist in Stripe");return await PZ.where("user_id",Y.id).where("is_default",!0).first()}return{addPaymentMethod:J,deletePaymentMethod:z,retrieveDefaultPaymentMethod:T,updatePaymentMethod:w,listPaymentMethods:X,setDefaultPaymentMethod:$,storePaymentMethod:Q,retrievePaymentMethod:K,setUserDefaultPayment:Z}})();var tJ=(()=>{async function J($){let Q=await H.prices.list({lookup_keys:[$]});if(!Q.data.length)return;return Q.data[0]}async function Z($,Q){let G=await J($);if(G)return G;return await H.prices.create({...Q,lookup_key:$})}return{retrieveByLookupKey:J,createOrGet:Z}})();var R0=(()=>{async function J(X){return await H.products.create(X)}async function Z(X){return await H.products.retrieve(X)}async function $(X,K){return await H.products.update(X,K)}async function Q(X={}){return await H.products.list({active:!0,...X})}async function G(X){return await H.products.update(X,{active:!1})}async function z(X,K){let T=await H.products.create(X),Y=await H.prices.create({...K,product:T.id});return{product:T,price:Y}}async function w(X,K={query:""}){return await H.products.search({...K,query:X})}return{create:J,retrieve:Z,update:$,list:Q,archive:G,createWithPrice:z,search:w}})(),PX=(()=>{async function J(X){return await H.prices.create(X)}async function Z(X){return await H.prices.retrieve(X)}async function $(X,K){return await H.prices.update(X,K)}async function Q(X={}){return await H.prices.list({active:!0,...X})}async function G(X,K={}){return await H.prices.list({product:X,active:!0,...K})}async function z(X,K={query:""}){return await H.prices.search({...K,query:X})}async function w(X){return await H.prices.update(X,{active:!1})}return{create:J,retrieve:Z,update:$,list:Q,listByProduct:G,search:z,archive:w}})(),eJ=(()=>{async function J(X){return await H.coupons.create(X)}async function Z(X){return await H.coupons.retrieve(X)}async function $(X,K){return await H.coupons.update(X,K)}async function Q(X){return await H.coupons.del(X)}async function G(X={}){return await H.coupons.list(X)}async function z(X){return await H.promotionCodes.create(X)}async function w(X){try{let K=await H.promotionCodes.list({code:X,active:!0});if(K.data.length>0)return K.data[0]??null;return null}catch{return null}}return{create:J,retrieve:Z,update:$,delete:Q,list:G,createPromotionCode:z,retrievePromotionCode:w}})();import{db as zJ}from"@stacksjs/database";import{HttpError as bV}from"@stacksjs/error-handling";import{isUniqueViolation as vV}from"@stacksjs/orm";var qJ=(()=>{async function J(W,D,L,N){let q=await tJ.retrieveByLookupKey(L);if(!q)throw Error("Price does not exist in Stripe");let O=[{price:q.id,quantity:1}],I={...{customer:await d.createOrGetStripeUser(W,{}).then((y)=>{if(!y||!y.id)throw Error("Customer does not exist in Stripe");return y.id}),payment_behavior:"allow_incomplete",expand:["latest_invoice.payment_intent"],items:O},...N},f=await H.subscriptions.create(I,{idempotencyKey:c("subscription.create",W.id,D,L)});return await T(W,D,L,f),f}async function Z(W,D,L,N={}){let q=await tJ.retrieveByLookupKey(L),O=await W?.activeSubscription();if(!q)throw Error("New price does not exist in Stripe");if(!O)throw Error("No active subscription for user!");let k=O.subscription?.provider_id;if(!k)throw Error("Active subscription has no provider ID");let b=await H.subscriptions.retrieve(k);if(!b)throw Error("Subscription does not exist in Stripe");let I=b.items.data[0]?.id;if(!I)throw Error("No subscription items found in the subscription");await H.subscriptions.update(k,{items:[{id:I,price:q.id,quantity:1}],proration_behavior:"create_prorations"},{idempotencyKey:c("subscription.update",k,q.id)});let f=await H.subscriptions.retrieve(k);if(!O.subscription?.id)throw Error("Active subscription has no database ID");return await Y(O.subscription.id,D,f),f}async function $(W,D){if(!await H.subscriptions.retrieve(W))throw Error("Subscription does not exist or does not belong to the user");let N=await H.subscriptions.cancel(W,D,{idempotencyKey:c("subscription.cancel",W)});return await G(W),N}async function Q(W,D){if(!W.hasStripeId())throw Error("Customer does not exist in Stripe");return await H.subscriptions.retrieve(D)}async function G(W){await zJ.updateTable("subscriptions").set({provider_status:"canceled"}).where("provider_id","=",W).executeTakeFirst()}function z(W){return W.provider_status==="active"}function w(W){return W.provider_status==="trialing"}async function X(W,D){let L=await zJ.selectFrom("subscriptions").where("user_id","=",W.id).where("type","=",D).selectAll().executeTakeFirst();if(!L)return!1;return L.provider_status==="incomplete"}async function K(W,D){let L=await zJ.selectFrom("subscriptions").where("user_id","=",W.id).where("type","=",D).selectAll().executeTakeFirst();if(!L)return!1;let N=await z(L),q=await w(L);return N||q}async function T(W,D,L,N){let q=N.items.data[0];if(!q)throw Error("Stripe subscription contains no line items \u2014 cannot store subscription");let O=V({user_id:W.id,type:D,unit_price:Number(q.price.unit_amount),provider_id:N.id,provider_status:N.status,provider_price_id:q.price.id,quantity:q.quantity,trial_ends_at:N.trial_end!=null?String(N.trial_end):void 0,ends_at:N.current_period_end!=null?String(N.current_period_end):void 0,provider_type:"stripe",last_used_at:N.current_period_end!=null?String(N.current_period_end):void 0}),k;try{k=await zJ.insertInto("subscriptions").values(O).executeTakeFirst()}catch(I){if(vV(I))throw new bV(409,"A subscription with this provider ID already exists");throw I}if(!k)throw Error("Failed to insert subscription record");return await zJ.selectFrom("subscriptions").where("id","=",Number(k.insertId)).selectAll().executeTakeFirst()}async function Y(W,D,L){let N=await zJ.selectFrom("subscriptions").where("id","=",W).selectAll().executeTakeFirst(),q=L.items.data[0];if(!q)throw Error("Stripe subscription contains no line items \u2014 cannot update subscription");return await zJ?.updateTable("subscriptions").set({type:D,provider_price_id:q.price.id,unit_price:Number(q.price.unit_amount)}).where("id","=",W).executeTakeFirst(),N}function V(W){return Object.fromEntries(Object.entries(W).filter(([D,L])=>L!=null))}return{create:J,update:Z,isValid:K,isIncomplete:X,cancel:$,retrieve:Q}})();var IX=(()=>{async function J(Z,$){let z={...{customer:await d.createOrGetStripeUser(Z,{}).then((w)=>{if(!w||!w.id)throw Error("Customer does not exist in Stripe");return w.id}),payment_method_types:["card"]},...$};return await H.setupIntents.create(z,{idempotencyKey:GJ("setup_intent.create",Z.id)})}return{create:J}})();var IZ=new Map;function x(J,Z){let $=IZ.get(J)||[];$.push(Z),IZ.set(J,$)}function xV(J){for(let[Z,$]of Object.entries(J))x(Z,$)}function PV(J,Z,$,Q){if(Q!=null&&Number.isFinite(Q)&&Q>0)return H.webhooks.constructEvent(J,Z,$,Q);return H.webhooks.constructEvent(J,Z,$)}async function fX(J,Z,$,Q){if(Q!=null&&Number.isFinite(Q)&&Q>0)return await H.webhooks.constructEventAsync(J,Z,$,Q);return await H.webhooks.constructEventAsync(J,Z,$)}async function yX(J){let Z=IZ.get(J.type)||[];if(Z.length===0)return{handled:!1,eventType:J.type};let $=[];for(let Q of Z)try{await Q(J)}catch(G){$.push(G instanceof Error?G.message:String(G))}return{handled:!0,eventType:J.type,...$.length>0?{errors:$}:{}}}async function fZ(J,Z,$){try{let Q=await fX(J,Z,$.secret,$.tolerance),G=await yX(Q);if(G.errors&&G.errors.length>0)return{success:!1,eventType:G.eventType,error:G.errors.join("; ")};return{success:!0,eventType:G.eventType}}catch(Q){return{success:!1,error:Q instanceof Error?Q.message:"Unknown error"}}}function yZ(J){if(J.succeeded)x("payment_intent.succeeded",J.succeeded);if(J.failed)x("payment_intent.payment_failed",J.failed);if(J.created)x("payment_intent.created",J.created);if(J.canceled)x("payment_intent.canceled",J.canceled)}function gZ(J){if(J.created)x("customer.subscription.created",J.created);if(J.updated)x("customer.subscription.updated",J.updated);if(J.deleted)x("customer.subscription.deleted",J.deleted);if(J.trialWillEnd)x("customer.subscription.trial_will_end",J.trialWillEnd)}function RZ(J){if(J.paid)x("invoice.paid",J.paid);if(J.paymentFailed)x("invoice.payment_failed",J.paymentFailed);if(J.created)x("invoice.created",J.created);if(J.finalized)x("invoice.finalized",J.finalized)}function SZ(J){if(J.completed)x("checkout.session.completed",J.completed);if(J.expired)x("checkout.session.expired",J.expired)}function MZ(J){if(J.succeeded)x("charge.succeeded",J.succeeded);if(J.failed)x("charge.failed",J.failed);if(J.refunded)x("charge.refunded",J.refunded);if(J.disputed)x("charge.dispute.created",J.disputed)}function IV(J){if(J.type.startsWith("payment_intent."))return J.data.object;return null}function fV(J){if(J.type.startsWith("customer.subscription."))return J.data.object;return null}function yV(J){if(J.type.startsWith("invoice."))return J.data.object;return null}function gV(J){if(J.type.startsWith("checkout.session."))return J.data.object;return null}function RV(J){if(J.type.startsWith("charge."))return J.data.object;return null}function SV(J){if(J.type.startsWith("customer.")&&!J.type.includes("subscription"))return J.data.object;return null}var gX={onWebhookEvent:x,registerWebhookHandlers:xV,constructEvent:PV,constructEventAsync:fX,handleWebhookEvent:yX,processWebhook:fZ,onPaymentIntent:yZ,onSubscription:gZ,onInvoice:RZ,onCheckout:SZ,onCharge:MZ,getPaymentIntent:IV,getSubscription:fV,getInvoice:yV,getCheckoutSession:gV,getCharge:RV,getCustomer:SV};async function MV(J,Z,$,Q={}){return g0.charge(J,Z,$,Q)}async function jV(J,Z,$={}){return g0.createPayment(J,Z,$)}async function _V(J,Z,$={}){return g0.refund(J,{amount:Z,...$})}async function mV(J,Z,$={}){return vZ.create(J,{line_items:Z,mode:"payment",...$})}async function hV(J,Z,$={}){return vZ.create(J,{line_items:[{price:Z,quantity:1}],mode:"subscription",...$})}async function lV(J,Z,$={}){return qJ.create(J,"default",Z,$)}async function uV(J,Z=!1){return qJ.cancel(J,{prorate:!Z,invoice_now:Z})}async function cV(J,Z="default"){return qJ.isValid(J,Z)}async function dV(J,Z,$="default"){return qJ.update(J,$,Z,{})}async function nV(J,Z={}){return d.createOrGetStripeUser(J,Z)}async function aV(J,Z){return d.updateStripeCustomer(J,Z)}async function iV(J){return d.deleteStripeUser(J)}async function pV(J,Z){return rJ.addPaymentMethod(J,Z)}async function oV(J,Z){return rJ.setUserDefaultPayment(J,Z)}async function sV(J,Z){return rJ.deletePaymentMethod(J,Z)}async function rV(J,Z={}){return IX.create(J,Z)}async function tV(J){return xZ.list(J)}async function eV(J,Z={}){return H.invoices.create({customer:J,...Z})}async function JW(J){return H.invoices.pay(J)}async function ZW(J,Z,$={}){let{currency:Q="usd",interval:G,description:z,metadata:w}=$,X={unit_amount:Z,currency:Q};if(G)X.recurring={interval:G};return R0.createWithPrice({name:J,description:z,metadata:w},X)}async function $W(J){return tJ.retrieveByLookupKey(J)}async function QW(J={}){return R0.list(J)}async function GW(J){let Z={duration:J.duration||"once"};if(J.percentOff)Z.percent_off=J.percentOff;else if(J.amountOff)Z.amount_off=J.amountOff,Z.currency=J.currency||"usd";if(J.name)Z.name=J.name;if(J.durationInMonths)Z.duration_in_months=J.durationInMonths;if(J.maxRedemptions)Z.max_redemptions=J.maxRedemptions;return eJ.create(Z)}async function zW(J,Z,$={}){return eJ.createPromotionCode({promotion:{type:"coupon",coupon:J},code:Z,...$})}async function BW(J){return eJ.retrievePromotionCode(J)}function XW(J,Z){let $=globalThis.config||{},Q=(Z||$.payment?.currency||$.billing?.currency||process.env.STRIPE_CURRENCY||"usd").toLowerCase(),G=$.app?.locale||"en-US";return new Intl.NumberFormat(G,{style:"currency",currency:Q.toUpperCase()}).format(J/100)}function YW(J){return Math.round(J*100)}function wW(J){return J/100}var UW={charge:MV,createPayment:jV,refund:_V,checkout:mV,subscriptionCheckout:hV,subscribe:lV,cancelSubscription:uV,hasActiveSubscription:cV,changeSubscription:dV,getOrCreateCustomer:nV,updateCustomer:aV,deleteCustomer:iV,addPaymentMethod:pV,setDefaultPaymentMethod:oV,removePaymentMethod:sV,createSetupIntent:rV,getInvoices:tV,createInvoice:eV,payInvoice:JW,createProduct:ZW,getPrice:$W,listProducts:QW,createCoupon:GW,createPromoCode:zW,validatePromoCode:BW,formatAmount:XW,toCents:YW,toDollars:wW,webhook:gX,onPaymentIntent:yZ,onSubscription:gZ,onInvoice:RZ,onCheckout:SZ,onCharge:MZ,processWebhook:fZ,stripe:H,customer:d,subscription:qJ,invoice:xZ,paymentMethod:rJ,product:R0,price:PX,coupon:eJ},LW=UW;import{saas as VW}from"@stacksjs/config";import{err as WW,ok as KW}from"@stacksjs/error-handling";import{log as TW}from"@stacksjs/logging";import{stripe as RX}from"@stacksjs/payments";async function HD(){let J=VW.plans;try{if(J!==void 0&&J.length)for(let Z of J){let $=await RX.products.create({name:Z.productName,description:Z.description,metadata:Z.metadata});for(let Q of Z.pricing)if($){let G={unit_amount:Q.price,currency:Q.currency,product:$.id,lookup_key:Q.key};if(Q.interval)G.recurring={interval:Q.interval};await RX.prices.create(G)}}return KW("Migrations generated")}catch(Z){let $=Z instanceof Error?Z:Error(String(Z));return TW.error($),WW($)}}import{db as S0}from"@stacksjs/database";var ED=(()=>{async function J($,Q,G){let z=await S0.selectFrom("payment_products").where("id","=",Q).selectAll().executeTakeFirst();if(!z)throw Error(`Payment product with id ${Q} not found.`);let w={name:z.name,description:G.description??"",amount:z.unit_price,brand:G.brand,type:G.type??"one-time",provider_id:G.provider_id,user_id:$.id},X=await S0.insertInto("payment_transactions").values(w).executeTakeFirst();if(!X)throw Error("Failed to insert payment transaction");return await S0.selectFrom("payment_transactions").where("id","=",Number(X.insertId)).selectAll().executeTakeFirst()}async function Z($){return await S0.selectFrom("payment_transactions").where("user_id","=",$.id).selectAll().execute()}return{store:J,list:Z}})();var hD=_Z(FZ(),1);export{BW as validatePromoCode,aV as updateCustomer,wW as toDollars,YW as toCents,hV as subscriptionCheckout,lV as subscribe,H as stripe,c as stacksIdempotencyKey,oV as setDefaultPaymentMethod,sV as removePaymentMethod,xV as registerWebhookHandlers,_V as refund,fZ as processWebhook,JW as payInvoice,x as onWebhookEvent,gZ as onSubscription,yZ as onPaymentIntent,RZ as onInvoice,SZ as onCheckout,MZ as onCharge,gX as manageWebhook,ED as manageTransaction,qJ as manageSubscription,IX as manageSetupIntent,R0 as manageProduct,PX as managePriceExtended,tJ as managePrice,rJ as managePaymentMethod,xZ as manageInvoice,d as manageCustomer,eJ as manageCoupon,vZ as manageCheckout,g0 as manageCharge,QW as listProducts,cV as hasActiveSubscription,yX as handleWebhookEvent,fV as getSubscription,$W as getPrice,IV as getPaymentIntent,nV as getOrCreateCustomer,tV as getInvoices,yV as getInvoice,SV as getCustomer,gV as getCheckoutSession,RV as getCharge,GJ as freshIdempotencyKey,XW as formatAmount,iV as deleteCustomer,HD as createStripeProduct,rV as createSetupIntent,zW as createPromoCode,ZW as createProduct,jV as createPayment,eV as createInvoice,GW as createCoupon,fX as constructEventAsync,PV as constructEvent,mV as checkout,MV as charge,dV as changeSubscription,uV as cancelSubscription,pV as addPaymentMethod,hD as Stripe,LW as Payment};
|